s-platform-landing-section 0.1.36-beta.1 → 0.1.36-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -115,33 +115,34 @@ var getDurationValue = function getDurationValue(attributes) {
115
115
  return durationAtt ? ((durationAtt === null || durationAtt === void 0 ? void 0 : (_durationAtt$value = durationAtt.value) === null || _durationAtt$value === void 0 ? void 0 : _durationAtt$value[0]) || "0") + " p" : "";
116
116
  };
117
117
  var genProductSlugVi = function genProductSlugVi(productName, id) {
118
- var _productName$replace;
119
- return (productName === null || productName === void 0 ? void 0 : (_productName$replace = productName.replace(/\s+/g, "-")) === null || _productName$replace === void 0 ? void 0 : _productName$replace.replace(/\//g, "~")) + "-" + id;
118
+ var _productName$replace, _productName$replace$, _productName$replace$2, _productName$replace$3, _productName$replace$4;
119
+ var slug = productName === null || productName === void 0 ? void 0 : (_productName$replace = productName.replace(/%/g, 'pct')) === null || _productName$replace === void 0 ? void 0 : (_productName$replace$ = _productName$replace.replace(/\//g, 'fs')) === null || _productName$replace$ === void 0 ? void 0 : (_productName$replace$2 = _productName$replace$.replace(/&/g, 'amp')) === null || _productName$replace$2 === void 0 ? void 0 : (_productName$replace$3 = _productName$replace$2.replace(/-/g, 'hyp')) === null || _productName$replace$3 === void 0 ? void 0 : (_productName$replace$4 = _productName$replace$3.replace(/\s+/g, '-')) === null || _productName$replace$4 === void 0 ? void 0 : _productName$replace$4.replace(/(?:[\0-!#%-'\*\+\/<-\?\\\^`\{\}\x7F-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07C9\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u088F-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09EF\u09F2-\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B70\u0B72-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5C\u0C5E\u0C5F\u0C62-\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDC\u0CDF\u0CE2-\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57-\u0D5E\u0D62-\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0EDB\u0EE0-\u0EFF\u0F01-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u1040-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16F0\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u194F\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19FF\u1A17-\u1A1F\u1A55-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BFF\u1C24-\u1C4C\u1C50-\u1C59\u1C7E\u1C7F\u1C8B-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u2182\u2185-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3007-\u3030\u3036-\u303A\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA620-\uA629\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6E6-\uA716\uA720\uA721\uA789\uA78A\uA7CE\uA7CF\uA7D2\uA7D4\uA7DD-\uA7F1\uA802\uA806\uA80B\uA823-\uA83F\uA874-\uA881\uA8B4-\uA8F1\uA8F8-\uA8FA\uA8FC\uA8FF-\uA909\uA926-\uA92F\uA947-\uA95F\uA97D-\uA983\uA9B3-\uA9CE\uA9D0-\uA9DF\uA9E5\uA9F0-\uA9F9\uA9FF\uAA29-\uAA3F\uAA43\uAA4C-\uAA5F\uAA77-\uAA79\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAC3-\uAADA\uAADE\uAADF\uAAEB-\uAAF1\uAAF5-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABE3-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB1E\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFE6F\uFE75\uFEFD-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF20-\uDF2C\uDF41\uDF4A-\uDF4F\uDF76-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0-\uDFFF]|\uD801[\uDC9E-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6F\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDBF\uDDF4-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE01-\uDE0F\uDE14\uDE18\uDE36-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE5-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD24-\uDD49\uDD66-\uDD6E\uDD86-\uDE7F\uDEAA-\uDEAF\uDEB2-\uDEC1\uDEC5-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF46-\uDF6F\uDF82-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC00-\uDC02\uDC38-\uDC70\uDC73\uDC74\uDC76-\uDC82\uDCB0-\uDCCF\uDCE9-\uDD02\uDD27-\uDD43\uDD45\uDD46\uDD48-\uDD4F\uDD73-\uDD75\uDD77-\uDD82\uDDB3-\uDDC0\uDDC5-\uDDD9\uDDDB\uDDDD-\uDDFF\uDE12\uDE2C-\uDE3E\uDE41-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEDF-\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A-\uDF3C\uDF3E-\uDF4F\uDF51-\uDF5C\uDF62-\uDF7F\uDF8A\uDF8C\uDF8D\uDF8F\uDFB6\uDFB8-\uDFD0\uDFD2\uDFD4-\uDFFF]|\uD805[\uDC35-\uDC46\uDC4B-\uDC5E\uDC62-\uDC7F\uDCB0-\uDCC3\uDCC6\uDCC8-\uDD7F\uDDAF-\uDDD7\uDDDC-\uDDFF\uDE30-\uDE43\uDE45-\uDE7F\uDEAB-\uDEB7\uDEB9-\uDEFF\uDF1B-\uDF3F\uDF47-\uDFFF]|\uD806[\uDC2C-\uDC9F\uDCE0-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD30-\uDD3E\uDD40\uDD42-\uDD9F\uDDA8\uDDA9\uDDD1-\uDDE0\uDDE2\uDDE4-\uDDFF\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE4F\uDE51-\uDE5B\uDE8A-\uDE9C\uDE9E-\uDEAF\uDEF9-\uDFBF\uDFE1-\uDFFF]|\uD807[\uDC09\uDC2F-\uDC3F\uDC41-\uDC71\uDC90-\uDCFF\uDD07\uDD0A\uDD31-\uDD45\uDD47-\uDD5F\uDD66\uDD69\uDD8A-\uDD97\uDD99-\uDEDF\uDEF3-\uDF01\uDF03\uDF11\uDF34-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC00-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD812-\uD817\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD834\uD836\uD83C-\uD83F\uD87C\uD87D\uD87F\uD889-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF1-\uDFFF]|\uD80D[\uDC30-\uDC40\uDC47-\uDC5F]|\uD810[\uDFFB-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD818[\uDC00-\uDCFF\uDD1E-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F-\uDE6F\uDEBF-\uDECF\uDEEE-\uDEFF\uDF30-\uDF3F\uDF44-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDD3F\uDD6D-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4F\uDF51-\uDF92\uDFA0-\uDFDF\uDFE2\uDFE4-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFE\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD31\uDD33-\uDD4F\uDD53\uDD54\uDD56-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDF24\uDF2B-\uDFFF]|\uD838[\uDC00-\uDC2F\uDC6E-\uDCFF\uDD2D-\uDD36\uDD3E-\uDD4D\uDD4F-\uDE8F\uDEAE-\uDEBF\uDEEC-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDDCF\uDDEE\uDDEF\uDDF1-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5-\uDCFF\uDD44-\uDD4A\uDD4C-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF3A-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD888[\uDFB0-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, '');
120
+ return slug + "-" + id;
120
121
  };
121
122
  var getLinkProductDetail = function getLinkProductDetail(product) {
122
123
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
123
- return "/san-pham/" + slug;
124
+ return "/san-pham/" + encodeURIComponent(slug);
124
125
  };
125
126
  var getLinkServiceDetail = function getLinkServiceDetail(product) {
126
127
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.productName, product === null || product === void 0 ? void 0 : product.productId);
127
- return "/dich-vu/" + slug;
128
+ return "/dich-vu/" + encodeURIComponent(slug);
128
129
  };
129
130
  var getLinkNewsDetail = function getLinkNewsDetail(news) {
130
131
  var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.title, news === null || news === void 0 ? void 0 : news.articleId);
131
132
  var category = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
132
- return "/tin-tuc/" + category + "/" + slug;
133
+ return "/tin-tuc/" + encodeURIComponent(category) + "/" + encodeURIComponent(slug);
133
134
  };
134
135
  var getLinkNewsByCategory = function getLinkNewsByCategory(news) {
135
136
  var slug = genProductSlugVi(news === null || news === void 0 ? void 0 : news.catName, news === null || news === void 0 ? void 0 : news.catId);
136
- return "/tin-tuc-theo-danh-muc/" + slug;
137
+ return "/tin-tuc-theo-danh-muc/" + encodeURIComponent(slug);
137
138
  };
138
139
  var getLinkProductsByCategory = function getLinkProductsByCategory(product) {
139
140
  if (product !== null && product !== void 0 && product.categoryName) {
140
141
  var slug = genProductSlugVi(product === null || product === void 0 ? void 0 : product.categoryName, product === null || product === void 0 ? void 0 : product.categoryId);
141
- return "/danh-muc/" + slug;
142
+ return "/danh-muc/" + encodeURIComponent(slug);
142
143
  } else {
143
144
  var _slug12 = genProductSlugVi(product === null || product === void 0 ? void 0 : product.cateName, product === null || product === void 0 ? void 0 : product.categoryId);
144
- return "/danh-muc/" + _slug12;
145
+ return "/danh-muc/" + encodeURIComponent(_slug12);
145
146
  }
146
147
  };
147
148
  var LinkToPage = function LinkToPage(props) {
@@ -155,7 +156,7 @@ var genLinkSearch = function genLinkSearch(keyword) {
155
156
  };
156
157
  var configSvg = function configSvg(data) {
157
158
  var _data$replace, _data$replace$replace;
158
- return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width="[^"]*"/, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height="[^"]*"/, '');
159
+ return data === null || data === void 0 ? void 0 : (_data$replace = data.replace(/<path(?![^>]*fill=")[^>]*>/g, "<path fill=\"currentColor\" $&")) === null || _data$replace === void 0 ? void 0 : (_data$replace$replace = _data$replace.replace(/width=['"][^'"]*['"]/g, '')) === null || _data$replace$replace === void 0 ? void 0 : _data$replace$replace.replace(/height=['"][^'"]*['"]/g, '');
159
160
  };
160
161
  var urlMappings = {
161
162
  "/products": "/san-pham",
@@ -436,7 +437,7 @@ var NavBar7 = function NavBar7(props) {
436
437
  href: "/",
437
438
  className: "flex items-center gap-2"
438
439
  }, /*#__PURE__*/React__default.createElement("img", {
439
- className: "object-cover w-12 max-h-12",
440
+ className: "object-contain w-12 h-12",
440
441
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
441
442
  }), /*#__PURE__*/React__default.createElement("h3", {
442
443
  className: "text-xl md:text-2xl text-primary font-headingFont text-wrap line-clamp-2 leading-tight"
@@ -499,7 +500,7 @@ var NavBar7 = function NavBar7(props) {
499
500
  href: "/",
500
501
  className: "flex flex-1 gap-2 items-center"
501
502
  }, /*#__PURE__*/React__default.createElement("img", {
502
- className: "object-cover w-12 max-h-12",
503
+ className: "object-contain w-12 h-12",
503
504
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
504
505
  }), /*#__PURE__*/React__default.createElement("h3", {
505
506
  className: "text-xl md:text-2xl font-headingFont text-wrap text-primary line-clamp-2"
@@ -533,7 +534,7 @@ var NavBar7 = function NavBar7(props) {
533
534
  className: "flex gap-2 items-center mb-2"
534
535
  }, /*#__PURE__*/React__default.createElement("img", {
535
536
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
536
- className: "max-h-14 w-14 object-cover"
537
+ className: "h-14 w-14 object-contain"
537
538
  }), /*#__PURE__*/React__default.createElement("h3", {
538
539
  className: "text-xl font-headingFont text-primary line-clamp-1"
539
540
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
@@ -729,7 +730,7 @@ var NavBar1 = function NavBar1(props) {
729
730
  href: "/",
730
731
  className: "flex items-center gap-2"
731
732
  }, /*#__PURE__*/React__default.createElement("img", {
732
- className: "object-cover w-12 max-h-12",
733
+ className: "object-contain w-12 h-12",
733
734
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
734
735
  alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
735
736
  }), /*#__PURE__*/React__default.createElement("h3", {
@@ -791,7 +792,7 @@ var NavBar1 = function NavBar1(props) {
791
792
  href: "/",
792
793
  className: "flex flex-1 gap-2 items-center"
793
794
  }, /*#__PURE__*/React__default.createElement("img", {
794
- className: "object-cover w-12 max-h-12",
795
+ className: "object-contain w-12 h-12",
795
796
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
796
797
  alt: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName
797
798
  }), /*#__PURE__*/React__default.createElement("h3", {
@@ -826,7 +827,7 @@ var NavBar1 = function NavBar1(props) {
826
827
  className: "flex gap-2 items-center mb-2"
827
828
  }, /*#__PURE__*/React__default.createElement("img", {
828
829
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
829
- className: "max-h-14 w-14 bg-cover bg-no-repeat"
830
+ className: "h-14 w-14 object-contain"
830
831
  }), /*#__PURE__*/React__default.createElement("div", {
831
832
  className: "text-xl font-headingFont text-primary line-clamp-1"
832
833
  }, shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopName))), /*#__PURE__*/React__default.createElement("button", {
@@ -1236,7 +1237,7 @@ var Hero2 = function Hero2(props) {
1236
1237
  className: "absolute inset-y-0 right-[2%] md:right-[4%] w-[58%] md:w-[54%] flex flex-col gap-2 md:gap-4 xl:gap-6 justify-center items-start px-4 pt-4 pb-2 md:px-8 md:pt-8 md:pb-6 xl:p-8"
1237
1238
  }, shopConfig !== null && shopConfig !== void 0 && shopConfig.logoUrl ? /*#__PURE__*/React__default.createElement("img", {
1238
1239
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl,
1239
- className: "h-6 w-6 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
1240
+ className: "h-6 w-6 object-contain sm:h-10 sm:w-10 md:h-12 md:w-12 lg:w-14 lg:h-14 xl:h-20 xl:w-20"
1240
1241
  }) : null, /*#__PURE__*/React__default.createElement("div", {
1241
1242
  className: "font-medium line-clamp-2 lg:line-clamp-1 text-2xl md:text-3xl lg:text-4xl xl:text-6xl",
1242
1243
  style: {
@@ -1262,7 +1263,7 @@ var Hero5 = function Hero5(props) {
1262
1263
  }), /*#__PURE__*/React__default.createElement("div", {
1263
1264
  className: "absolute inset-0 flex flex-col top-[8%] md:top-[10%] gap-1 md:gap-4 p-4 lg:p-10 w-3/5 md:w-1/2 max-w-[90%] left-1 lg:left-10 xl:left-20"
1264
1265
  }, /*#__PURE__*/React__default.createElement("div", {
1265
- className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2 xl:line-clamp-1",
1266
+ className: "text-xl sm:text-2xl md:text-3xl lg:text-4xl text-textHeading overflow-hidden text-ellipsis font-medium line-clamp-2",
1266
1267
  style: {
1267
1268
  lineHeight: 1.5
1268
1269
  }
@@ -1285,14 +1286,14 @@ var Hero6 = function Hero6(props) {
1285
1286
  alt: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title,
1286
1287
  className: "object-cover w-full min-h-[30vh] max-h-[100vh]"
1287
1288
  }), /*#__PURE__*/React__default.createElement("div", {
1288
- className: "absolute inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10 md:px-20 "
1289
+ className: "absolute w-full md:w-2/3 mx-auto inset-0 flex flex-col items-center justify-center md:gap-1 lg:gap-2 text-center py-1 md:py-4 px-10"
1289
1290
  }, data !== null && data !== void 0 && (_data$data3 = data.data) !== null && _data$data3 !== void 0 && (_data$data3$ = _data$data3[0]) !== null && _data$data3$ !== void 0 && _data$data3$.title ? /*#__PURE__*/React__default.createElement("div", {
1290
1291
  className: "text-primary font-headingFont text-center line-clamp-1 text-2xl md:text-4xl xl:text-6xl text-ellipsis",
1291
1292
  style: {
1292
1293
  lineHeight: "2"
1293
1294
  }
1294
1295
  }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : _data$data4$.title) : null, /*#__PURE__*/React__default.createElement("div", {
1295
- className: "flex flex-col gap-2 md:gap-4 lg:gap-6 "
1296
+ className: "flex flex-col gap-4 lg:gap-6 "
1296
1297
  }, data !== null && data !== void 0 && (_data$data5 = data.data) !== null && _data$data5 !== void 0 && (_data$data5$ = _data$data5[0]) !== null && _data$data5$ !== void 0 && _data$data5$.description ? /*#__PURE__*/React__default.createElement("div", {
1297
1298
  className: "line-clamp-2 lg:line-clamp-3 md:text-xl xl:text-2xl",
1298
1299
  style: {
@@ -7641,20 +7642,17 @@ var CategoryController = function CategoryController(props) {
7641
7642
 
7642
7643
  var Hero13 = function Hero13(props) {
7643
7644
  var _sectionData$, _sectionData$$srcImag, _data$data, _data$data$;
7644
- var listRef = React.useRef(null);
7645
- var _useState = React.useState(false);
7646
7645
  var shopConfig = props.shopConfig,
7647
7646
  data = props.data;
7648
7647
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7649
- var _CategoryController = CategoryController(props);
7650
7648
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("img", {
7651
7649
  src: sectionData === null || sectionData === void 0 ? void 0 : (_sectionData$ = sectionData[0]) === null || _sectionData$ === void 0 ? void 0 : (_sectionData$$srcImag = _sectionData$.srcImages) === null || _sectionData$$srcImag === void 0 ? void 0 : _sectionData$$srcImag[0],
7652
7650
  alt: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.title,
7653
7651
  className: "w-full object-cover"
7654
7652
  }), /*#__PURE__*/React__default.createElement("div", {
7655
7653
  className: "fixed right-6 bottom-10 md:bottom-24 z-50 flex flex-col gap-4 w-max"
7656
- }, /*#__PURE__*/React__default.createElement("a", {
7657
- href: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopPhone ? "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) : "#"
7654
+ }, (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone) && /*#__PURE__*/React__default.createElement("a", {
7655
+ href: "tel:" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopPhone)
7658
7656
  }, /*#__PURE__*/React__default.createElement("div", {
7659
7657
  className: "relative w-max"
7660
7658
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7663,9 +7661,9 @@ var Hero13 = function Hero13(props) {
7663
7661
  className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7664
7662
  }, /*#__PURE__*/React__default.createElement(ai.AiOutlinePhone, {
7665
7663
  size: 36
7666
- })))), /*#__PURE__*/React__default.createElement("a", {
7664
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) && /*#__PURE__*/React__default.createElement("a", {
7667
7665
  href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopMessenger) || "#",
7668
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopMessenger ? "_blank" : "_self"
7666
+ target: "_blank"
7669
7667
  }, /*#__PURE__*/React__default.createElement("div", {
7670
7668
  className: "relative w-max"
7671
7669
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7674,9 +7672,9 @@ var Hero13 = function Hero13(props) {
7674
7672
  className: "relative z-10 p-2 rounded-full bg-primary text-textButton animate-bounce"
7675
7673
  }, /*#__PURE__*/React__default.createElement(fa.FaFacebookMessenger, {
7676
7674
  size: 32
7677
- })))), /*#__PURE__*/React__default.createElement("a", {
7678
- href: (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopFacebookPage) || "#",
7679
- target: shopConfig !== null && shopConfig !== void 0 && shopConfig.shopFacebookPage ? "_blank" : "_self"
7675
+ })))), (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) && /*#__PURE__*/React__default.createElement("a", {
7676
+ href: "https://zalo.me/" + (shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.shopZalo) || "#",
7677
+ target: "_blank"
7680
7678
  }, /*#__PURE__*/React__default.createElement("div", {
7681
7679
  className: "relative w-max"
7682
7680
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -7726,7 +7724,9 @@ var Hero15 = function Hero15(props) {
7726
7724
  var _props$data = props.data,
7727
7725
  data = _props$data === void 0 ? {} : _props$data,
7728
7726
  _props$shopConfigStyl = props.shopConfigStyle,
7729
- shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl;
7727
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
7728
+ _props$Link = props.Link,
7729
+ Link = _props$Link === void 0 ? null : _props$Link;
7730
7730
  return /*#__PURE__*/React__default.createElement("div", {
7731
7731
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-2 py-12 !bg-primary gap-6 md:gap-10"
7732
7732
  }, /*#__PURE__*/React__default.createElement("img", {
@@ -7741,7 +7741,8 @@ var Hero15 = function Hero15(props) {
7741
7741
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), /*#__PURE__*/React__default.createElement("hr", {
7742
7742
  className: "w-1/3"
7743
7743
  }), (data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$buttons = _data$data4$.buttons) === null || _data$data4$$buttons === void 0 ? void 0 : _data$data4$$buttons.length) > 0 ? /*#__PURE__*/React__default.createElement(LinkToPage, {
7744
- href: (data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : (_data$data5$$buttons = _data$data5$.buttons) === null || _data$data5$$buttons === void 0 ? void 0 : (_data$data5$$buttons$ = _data$data5$$buttons[0]) === null || _data$data5$$buttons$ === void 0 ? void 0 : _data$data5$$buttons$.route) || (data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : (_data$data6$$buttons = _data$data6$.buttons) === null || _data$data6$$buttons === void 0 ? void 0 : (_data$data6$$buttons$ = _data$data6$$buttons[0]) === null || _data$data6$$buttons$ === void 0 ? void 0 : _data$data6$$buttons$.link) || "#"
7744
+ Link: Link,
7745
+ href: convertURL(data === null || data === void 0 ? void 0 : (_data$data5 = data.data) === null || _data$data5 === void 0 ? void 0 : (_data$data5$ = _data$data5[0]) === null || _data$data5$ === void 0 ? void 0 : (_data$data5$$buttons = _data$data5$.buttons) === null || _data$data5$$buttons === void 0 ? void 0 : (_data$data5$$buttons$ = _data$data5$$buttons[0]) === null || _data$data5$$buttons$ === void 0 ? void 0 : _data$data5$$buttons$.route) || (data === null || data === void 0 ? void 0 : (_data$data6 = data.data) === null || _data$data6 === void 0 ? void 0 : (_data$data6$ = _data$data6[0]) === null || _data$data6$ === void 0 ? void 0 : (_data$data6$$buttons = _data$data6$.buttons) === null || _data$data6$$buttons === void 0 ? void 0 : (_data$data6$$buttons$ = _data$data6$$buttons[0]) === null || _data$data6$$buttons$ === void 0 ? void 0 : _data$data6$$buttons$.link) || "#"
7745
7746
  }, /*#__PURE__*/React__default.createElement(Button, {
7746
7747
  label: data === null || data === void 0 ? void 0 : (_data$data7 = data.data) === null || _data$data7 === void 0 ? void 0 : (_data$data7$ = _data$data7[0]) === null || _data$data7$ === void 0 ? void 0 : (_data$data7$$buttons = _data$data7$.buttons) === null || _data$data7$$buttons === void 0 ? void 0 : (_data$data7$$buttons$ = _data$data7$$buttons[0]) === null || _data$data7$$buttons$ === void 0 ? void 0 : _data$data7$$buttons$.label,
7747
7748
  shopConfigStyle: shopConfigStyle,
@@ -7753,7 +7754,7 @@ var Hero15 = function Hero15(props) {
7753
7754
  };
7754
7755
 
7755
7756
  var Hero16 = function Hero16(props) {
7756
- var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data2$$srcImage;
7757
+ var _data$data, _data$data$, _data$data$$srcImages, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$, _data$data4$$srcImage;
7757
7758
  var _props$data = props.data,
7758
7759
  data = _props$data === void 0 ? {} : _props$data,
7759
7760
  _props$shopConfigStyl = props.shopConfigStyle,
@@ -7774,19 +7775,19 @@ var Hero16 = function Hero16(props) {
7774
7775
  className: "min-h-[480px] w-full h-full relative"
7775
7776
  }, /*#__PURE__*/React__default.createElement("img", {
7776
7777
  src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : (_data$data$$srcImages = _data$data$.srcImages) === null || _data$data$$srcImages === void 0 ? void 0 : _data$data$$srcImages[0],
7777
- className: "object-cover max-w-full h-auto"
7778
+ className: "object-cover w-full h-full min-h-[480px]"
7778
7779
  }), /*#__PURE__*/React__default.createElement("div", {
7779
7780
  className: "absolute top-0 left-0 z-0 bg-secondary opacity-80 w-full h-full"
7780
7781
  }), /*#__PURE__*/React__default.createElement("div", {
7781
- className: "w-full md:w-2/3 absolute top-[10%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
7782
+ className: "w-full sm:w-2/3 absolute z-20 top-[15%] md:top-1/3 left-0 z-10 px-4 xl:px-20 flex flex-col gap-6 text-textButton my-auto"
7782
7783
  }, /*#__PURE__*/React__default.createElement("h2", {
7783
7784
  className: "font-medium text-2xl lg:text-4xl"
7784
- }, "Thu\u1ED1c t\u1ED1t, gi\xE1 t\u1ED1t - V\xEC s\u1EE9c kh\u1ECFe c\u1EE7a b\u1EA1n"), /*#__PURE__*/React__default.createElement("div", {
7785
+ }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.title), /*#__PURE__*/React__default.createElement("div", {
7785
7786
  className: " text-lg lg:text-2xl"
7786
- }, "Ch\xFAng t\xF4i lu\xF4n n\u1ED5 l\u1EF1c h\u1EBFt m\xECnh cung c\u1EA5p s\u1EA3n ph\u1EA9m v\xE0 d\u1ECBch v\u1EE5 \u0111\xFAng v\u1EDBi gi\xE1 tr\u1ECB m\xE0 kh\xE1ch h\xE0ng mong \u0111\u1EE3i."), /*#__PURE__*/React__default.createElement("div", {
7787
- className: "flex flex-col md:flex-row gap-4 w-full"
7787
+ }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.description), /*#__PURE__*/React__default.createElement("div", {
7788
+ className: "flex flex-col sm:flex-row gap-4 w-full"
7788
7789
  }, /*#__PURE__*/React__default.createElement(Input, {
7789
- wrapClassName: "w-full md:w-2/3 xl:w-[85%]",
7790
+ wrapClassName: "w-2/3 sm:w-[80%] xl:w-[85%]",
7790
7791
  icons: /*#__PURE__*/React__default.createElement(lu.LuSearch, {
7791
7792
  className: "text-gray3",
7792
7793
  size: 18
@@ -7819,32 +7820,37 @@ var Hero16 = function Hero16(props) {
7819
7820
  d: "M75.1847 149.804C55 189.553 14.9932 204.532 0 212H480V0C424.514 20.7319 393 94.1529 216.361 62.1956C120.186 44.7957 96.1405 108.537 75.1847 149.804Z",
7820
7821
  fill: "currentColor"
7821
7822
  }))), /*#__PURE__*/React__default.createElement("img", {
7822
- src: data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : (_data$data2$$srcImage = _data$data2$.srcImages) === null || _data$data2$$srcImage === void 0 ? void 0 : _data$data2$$srcImage[1],
7823
- className: "object-cover w-[28%] h-auto absolute right-10 opacity-100 bottom-0 z-10"
7823
+ src: data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$ = _data$data4[0]) === null || _data$data4$ === void 0 ? void 0 : (_data$data4$$srcImage = _data$data4$.srcImages) === null || _data$data4$$srcImage === void 0 ? void 0 : _data$data4$$srcImage[1],
7824
+ className: "object-cover w-[25%] h-auto max-h-full absolute right-10 opacity-100 bottom-0 z-10"
7824
7825
  }));
7825
7826
  };
7826
7827
 
7827
7828
  var Features2 = function Features2(props) {
7828
- var data = props.data;
7829
+ var data = props.data,
7830
+ _props$Link = props.Link,
7831
+ Link = _props$Link === void 0 ? null : _props$Link;
7829
7832
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
7830
7833
  return /*#__PURE__*/React__default.createElement("div", {
7831
7834
  className: "" + SECTION_DEFAULT_CLASS
7832
7835
  }, /*#__PURE__*/React__default.createElement("div", {
7833
7836
  className: "p-6 grid grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 lg:gap-8 rounded-xl bg-bgSecondary"
7834
7837
  }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
7835
- return /*#__PURE__*/React__default.createElement("div", {
7838
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
7839
+ Link: Link,
7840
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
7841
+ }, /*#__PURE__*/React__default.createElement("div", {
7836
7842
  className: "flex flex-col gap-2 items-center text-sm lg:text-lg font-semibold text-center",
7837
7843
  key: "dfgg-" + index
7838
7844
  }, item !== null && item !== void 0 && item.svgImage ? /*#__PURE__*/React__default.createElement("div", {
7839
- className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 h-24",
7845
+ className: "w-12 text-primary md:w-16 lg:w-20 xl:w-24 aspect-square",
7840
7846
  dangerouslySetInnerHTML: {
7841
7847
  __html: configSvg(item === null || item === void 0 ? void 0 : item.svgImage)
7842
7848
  }
7843
7849
  }) : /*#__PURE__*/React__default.createElement("img", {
7844
7850
  src: item === null || item === void 0 ? void 0 : item.srcImage,
7845
- className: "w-12 md:w-16 lg:w-20 xl:w-24 text-primary",
7851
+ className: "w-12 md:w-16 lg:w-20 object-contain xl:w-24 aspect-square text-primary",
7846
7852
  alt: "logo"
7847
- }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title));
7853
+ }), /*#__PURE__*/React__default.createElement("div", null, item === null || item === void 0 ? void 0 : item.title)));
7848
7854
  })));
7849
7855
  };
7850
7856
 
@@ -7936,11 +7942,6 @@ var ProductController = function ProductController(props) {
7936
7942
  var _res$data2, _res$data3;
7937
7943
  setProducts(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.data);
7938
7944
  setPage(res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.page);
7939
- var url = new URL(window.location.href);
7940
- if (/^(\/(danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
7941
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
7942
- window.history.replaceState({}, '', url.pathname + url.search);
7943
- }
7944
7945
  }
7945
7946
  setLoading(false);
7946
7947
  });
@@ -8503,6 +8504,8 @@ var ModalNotification = function ModalNotification(props) {
8503
8504
  onCloseFormBooking = props.onCloseFormBooking,
8504
8505
  _props$isButtonClose = props.isButtonClose,
8505
8506
  isButtonClose = _props$isButtonClose === void 0 ? true : _props$isButtonClose,
8507
+ _props$isMaskClose = props.isMaskClose,
8508
+ isMaskClose = _props$isMaskClose === void 0 ? false : _props$isMaskClose,
8506
8509
  _props$className = props.className,
8507
8510
  className = _props$className === void 0 ? "" : _props$className,
8508
8511
  _props$style = props.style,
@@ -8517,6 +8520,9 @@ var ModalNotification = function ModalNotification(props) {
8517
8520
  }, []);
8518
8521
  var handleClickOutside = function handleClickOutside(event) {
8519
8522
  event.stopPropagation();
8523
+ if (isMaskClose) {
8524
+ return;
8525
+ }
8520
8526
  if (onClose) {
8521
8527
  onClose === null || onClose === void 0 ? void 0 : onClose();
8522
8528
  }
@@ -9163,6 +9169,8 @@ var Select$2 = React.forwardRef(function (props, ref) {
9163
9169
  selectClassName = _props$selectClassNam === void 0 ? "" : _props$selectClassNam,
9164
9170
  _props$disabled = props.disabled,
9165
9171
  disabled = _props$disabled === void 0 ? false : _props$disabled,
9172
+ _props$loading = props.loading,
9173
+ loading = _props$loading === void 0 ? false : _props$loading,
9166
9174
  _props$rules = props.rules,
9167
9175
  rules = _props$rules === void 0 ? [] : _props$rules,
9168
9176
  options = props.options,
@@ -9206,6 +9214,7 @@ var Select$2 = React.forwardRef(function (props, ref) {
9206
9214
  nextTrigger = _useState7[0],
9207
9215
  setNextTrigger = _useState7[1];
9208
9216
  var optionRef = React.useRef(null);
9217
+ var triggeredRef = React.useRef(false);
9209
9218
  React.useEffect(function () {
9210
9219
  if (isMulti) setValue(defaultValue);
9211
9220
  }, [defaultValue]);
@@ -9214,34 +9223,33 @@ var Select$2 = React.forwardRef(function (props, ref) {
9214
9223
  if (!isMulti) setValue(defaultValue);
9215
9224
  }, [options]);
9216
9225
  React.useEffect(function () {
9226
+ var _optionRef$current;
9217
9227
  if (typeof setParams !== 'function') return;
9218
- var handleScroll = function handleScroll() {
9219
- if (!optionRef.current) return;
9220
- var children = optionRef.current.querySelectorAll('div.option');
9221
- var parentRect = optionRef.current.getBoundingClientRect();
9222
- children.forEach(function (child, index) {
9223
- var rect = child.getBoundingClientRect();
9224
- if (rect.top >= parentRect.top && rect.bottom <= parentRect.bottom) {
9225
- if (index === nextTrigger) {
9226
- setParams === null || setParams === void 0 ? void 0 : setParams(function (prev) {
9227
- return _extends({}, prev, {
9228
- size: (prev === null || prev === void 0 ? void 0 : prev.size) + 8
9229
- });
9230
- });
9231
- setNextTrigger(function (prev) {
9232
- return prev + 8;
9233
- });
9234
- }
9235
- }
9236
- });
9237
- };
9238
- if (optionRef.current) {
9239
- optionRef.current.addEventListener('scroll', handleScroll);
9240
- }
9241
- return function () {
9242
- if (optionRef.current) {
9243
- optionRef.current.removeEventListener('scroll', handleScroll);
9228
+ triggeredRef.current = false;
9229
+ var options = (_optionRef$current = optionRef.current) === null || _optionRef$current === void 0 ? void 0 : _optionRef$current.querySelectorAll('div.option');
9230
+ if (!options || options.length === 0) return;
9231
+ var targetElement = options[nextTrigger];
9232
+ if (!targetElement) return;
9233
+ var observer = new IntersectionObserver(function (_ref) {
9234
+ var entry = _ref[0];
9235
+ if (entry.isIntersecting && !triggeredRef.current) {
9236
+ triggeredRef.current = true;
9237
+ setParams(function (prev) {
9238
+ return _extends({}, prev, {
9239
+ size: prev.size + 8
9240
+ });
9241
+ });
9242
+ setNextTrigger(function (prev) {
9243
+ return prev + 8;
9244
+ });
9244
9245
  }
9246
+ }, {
9247
+ root: optionRef.current,
9248
+ threshold: 1.0
9249
+ });
9250
+ observer.observe(targetElement);
9251
+ return function () {
9252
+ observer.disconnect();
9245
9253
  };
9246
9254
  }, [listOptions, nextTrigger]);
9247
9255
  React.useEffect(function () {
@@ -9433,7 +9441,7 @@ var Select$2 = React.forwardRef(function (props, ref) {
9433
9441
  })) : null, /*#__PURE__*/React__default.createElement("div", {
9434
9442
  className: "overflow-y-auto max-h-72 scroll-container",
9435
9443
  ref: optionRef
9436
- }, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
9444
+ }, (listOptions === null || listOptions === void 0 ? void 0 : listOptions.length) > 0 ? /*#__PURE__*/React__default.createElement("div", null, listOptions === null || listOptions === void 0 ? void 0 : listOptions.map(function (item, index) {
9437
9445
  return /*#__PURE__*/React__default.createElement("div", {
9438
9446
  key: "gjfd-" + index,
9439
9447
  className: "option px-2 cursor-default py-1.5 flex items-center hover:bg-gray-100 rounded-lg",
@@ -9445,7 +9453,9 @@ var Select$2 = React.forwardRef(function (props, ref) {
9445
9453
  }), renderItem ? renderItem(item) : /*#__PURE__*/React__default.createElement("div", {
9446
9454
  className: " whitespace-nowrap line-clamp-1"
9447
9455
  }, item === null || item === void 0 ? void 0 : item.label));
9448
- }) : /*#__PURE__*/React__default.createElement("div", {
9456
+ }), loading ? /*#__PURE__*/React__default.createElement("div", {
9457
+ className: "flex justify-center py-4"
9458
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : null) : /*#__PURE__*/React__default.createElement("div", {
9449
9459
  className: "py-6 text-center"
9450
9460
  }, "Kh\xF4ng c\xF3 k\u1EBFt qu\u1EA3")))) : null), error ? /*#__PURE__*/React__default.createElement("div", {
9451
9461
  className: "text-danger"
@@ -9499,7 +9509,8 @@ var BookingForm = function BookingForm(props) {
9499
9509
  var _ProductController = ProductController(_extends({}, props, {
9500
9510
  params: productsParams
9501
9511
  })),
9502
- products = _ProductController.products;
9512
+ products = _ProductController.products,
9513
+ loading = _ProductController.loading;
9503
9514
  var _BookingController = BookingController(props),
9504
9515
  _BookingController$cr = _BookingController.createSchedule,
9505
9516
  createSchedule = _BookingController$cr === void 0 ? function () {} : _BookingController$cr;
@@ -9684,6 +9695,7 @@ var BookingForm = function BookingForm(props) {
9684
9695
  setParams: setProductsParams,
9685
9696
  ref: inputSelectedRef,
9686
9697
  isMulti: true,
9698
+ loading: loading,
9687
9699
  defaultValue: listProductSelected,
9688
9700
  onClick: handleSelectedProduct,
9689
9701
  handleSearchOption: handleSearchProducts,
@@ -10060,13 +10072,13 @@ var ServiceDetail1 = function ServiceDetail1(props) {
10060
10072
  product: product,
10061
10073
  className: "w-full aspect-square !object-contain rounded-2xl"
10062
10074
  })), /*#__PURE__*/React__default.createElement("div", {
10063
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10075
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
10064
10076
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10065
10077
  return /*#__PURE__*/React__default.createElement("img", {
10066
10078
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10067
10079
  key: item === null || item === void 0 ? void 0 : item.imageId,
10068
10080
  alt: "",
10069
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10081
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10070
10082
  onClick: function onClick() {
10071
10083
  handleDisplayImage(item);
10072
10084
  }
@@ -10187,7 +10199,7 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10187
10199
  }, /*#__PURE__*/React__default.createElement("div", {
10188
10200
  className: "flex flex-col gap-4 col-span-2"
10189
10201
  }, /*#__PURE__*/React__default.createElement("div", {
10190
- className: "rounded-2xl p-2 bg-background border"
10202
+ className: "rounded-2xl bg-background border"
10191
10203
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
10192
10204
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
10193
10205
  className: "w-full aspect-square object-contain rounded-2xl"
@@ -10195,13 +10207,13 @@ var TreatmentDetail1 = function TreatmentDetail1(props) {
10195
10207
  product: product,
10196
10208
  className: "w-full aspect-square !object-contain rounded-2xl"
10197
10209
  })), /*#__PURE__*/React__default.createElement("div", {
10198
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
10210
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
10199
10211
  }, product === null || product === void 0 ? void 0 : (_product$images = product.images) === null || _product$images === void 0 ? void 0 : _product$images.map(function (item) {
10200
10212
  return /*#__PURE__*/React__default.createElement("img", {
10201
10213
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
10202
10214
  key: item === null || item === void 0 ? void 0 : item.imageId,
10203
10215
  alt: "",
10204
- className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " h-16 w-16 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10216
+ className: (displayImage ? "" : "first:border first:opacity-100 first:brightness-100") + " \n h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full rounded-md lg:rounded-lg aspect-square object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 bg-background"),
10205
10217
  onClick: function onClick() {
10206
10218
  handleDisplayImage(item);
10207
10219
  }
@@ -10323,7 +10335,7 @@ var ProductItem3 = function ProductItem3(props) {
10323
10335
  className: "w-full border border-stroke rounded-2xl " + className
10324
10336
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10325
10337
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10326
- className: "w-full h-48 md:h-60 xl:h-[304px] rounded-t-2xl"
10338
+ className: "w-full rounded-t-2xl"
10327
10339
  }), /*#__PURE__*/React__default.createElement("div", {
10328
10340
  className: "p-4 flex flex-col gap-2 md:gap-4 items-start"
10329
10341
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10350,7 +10362,7 @@ var ProductItem4 = function ProductItem4(props) {
10350
10362
  className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
10351
10363
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10352
10364
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10353
- className: "w-full h-40 sm:h-56 lg:h-60 xl:h-64 bg-cover bg-no-repeat rounded-2xl"
10365
+ className: "w-full rounded-2xl"
10354
10366
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10355
10367
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis text-lg"
10356
10368
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10385,7 +10397,7 @@ var ProductItem5 = function ProductItem5(props) {
10385
10397
  className: "w-full flex flex-col gap-4 rounded-2xl p-1 " + className
10386
10398
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10387
10399
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10388
- className: "w-full w-full h-44 md:h-56 lg:h-64 xl:h-72 bg-cover bg-no-repeat rounded-2xl"
10400
+ className: "w-full rounded-2xl"
10389
10401
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10390
10402
  className: "text-start line-clamp-1 w-full overflow-hidden text-ellipsis mb-2"
10391
10403
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10418,7 +10430,7 @@ var ProductItem6 = function ProductItem6(props) {
10418
10430
  className: "w-full border border-stroke flex flex-col gap-2 md:gap-4 rounded-2xl p-2 md:p-4 xl:p-6 " + className
10419
10431
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10420
10432
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10421
- className: "w-full h-48 md:h-60 xl:h-72 rounded-2xl"
10433
+ className: "w-full !aspect-[3/4] rounded-2xl"
10422
10434
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10423
10435
  className: "text start line-clamp-1 w-full overflow-hidden text-ellipsis"
10424
10436
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10453,7 +10465,7 @@ var ProductItem7 = function ProductItem7(props) {
10453
10465
  className: "px-2 md:px-4 xl:px-6"
10454
10466
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10455
10467
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10456
- className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl"
10468
+ className: "w-full hover:scale-105 transition duration-300 ease-in-out rounded-2xl !object-contain"
10457
10469
  })), (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.price) !== (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) && product !== null && product !== void 0 && (_product$productInfo3 = product.productInfo) !== null && _product$productInfo3 !== void 0 && _product$productInfo3.priceBeforeDiscount ? /*#__PURE__*/React__default.createElement("div", {
10458
10470
  className: "absolute top-4 left-0 py-1 px-4 rounded-r-2xl bg-danger text-textButton font-semibold shadow-lg"
10459
10471
  }, "-", Math.round(100 - (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.price) / (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) * 100)) : null), /*#__PURE__*/React__default.createElement("div", {
@@ -10486,7 +10498,7 @@ var ProductItem8 = function ProductItem8(props) {
10486
10498
  className: "relative "
10487
10499
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10488
10500
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10489
- className: "h-[340px] md:h-[400px] xl:h-[460px] rounded"
10501
+ className: "!aspect-[5/8] rounded"
10490
10502
  }), /*#__PURE__*/React__default.createElement("div", {
10491
10503
  className: "absolute bottom-0 rounded-b pb-6 px-4 bg-gradient-to-t from-black/50 to-transparent flex flex-col items-center h-1/2 gap-2 w-full justify-end "
10492
10504
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -10519,7 +10531,7 @@ var ProductItem9 = function ProductItem9(props) {
10519
10531
  className: "w-full flex flex-col gap-4 rounded-2xl p-2 md:p-6 bg-bgSecondary " + className
10520
10532
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10521
10533
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10522
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-44 md:h-56 xl:h-60"
10534
+ className: "hover:scale-105 transition duration-300 ease-in-out !object-contain !aspect-[9/8]"
10523
10535
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10524
10536
  className: "text-start line-clamp-2 font-medium min-h-12 w-full overflow-hidden text-ellipsis mb-2"
10525
10537
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10651,7 +10663,7 @@ var ProductItem11 = function ProductItem11(props) {
10651
10663
  className: "overflow-hidden"
10652
10664
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10653
10665
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10654
- className: "hover:scale-105 transition duration-300 ease-in-out w-full h-56 sm:h-64 lg:h-72 xl:h-[302px]"
10666
+ className: "hover:scale-105 transition duration-300 ease-in-out"
10655
10667
  })), /*#__PURE__*/React__default.createElement("div", {
10656
10668
  className: "p-4 flex flex-col gap-4"
10657
10669
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
@@ -10672,7 +10684,7 @@ var ProductItem11 = function ProductItem11(props) {
10672
10684
  };
10673
10685
 
10674
10686
  var TreatmentItem1 = function TreatmentItem1(props) {
10675
- var _product$productInfo;
10687
+ var _product$productInfo, _product$productInfo2;
10676
10688
  var product = props.product,
10677
10689
  _props$Link = props.Link,
10678
10690
  Link = _props$Link === void 0 ? null : _props$Link,
@@ -10685,7 +10697,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10685
10697
  className: "w-full flex flex-col gap-4 rounded-2xl p-1"
10686
10698
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
10687
10699
  product: product === null || product === void 0 ? void 0 : product.productInfo,
10688
- className: "w-full w-full h-[189px] md:h-[238px] xl:h-[304px] rounded-2xl"
10700
+ className: " rounded-2xl"
10689
10701
  }), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
10690
10702
  className: "line-clamp-1 mb-2 font-medium text-lg"
10691
10703
  }, product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -10695,7 +10707,7 @@ var TreatmentItem1 = function TreatmentItem1(props) {
10695
10707
  className: "flex flex-col md:flex-row gap-2 md:items-center md:gap-6 "
10696
10708
  }, /*#__PURE__*/React__default.createElement("div", {
10697
10709
  className: "whitespace-nowrap"
10698
- }, "Th\u1EDDi gian: 120p"), /*#__PURE__*/React__default.createElement(Button, {
10710
+ }, "Th\u1EDDi gian: ", getDurationValue(product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.attributes)), /*#__PURE__*/React__default.createElement(Button, {
10699
10711
  shopConfigStyle: shopConfigStyle,
10700
10712
  label: "\u0110\u1EB7t l\u1ECBch",
10701
10713
  className: "w-full"
@@ -10774,7 +10786,14 @@ var Products2 = function Products2(props) {
10774
10786
  var _useState2 = React.useState(false),
10775
10787
  canGoNext = _useState2[0],
10776
10788
  setCanGoNext = _useState2[1];
10777
- var _ProductController = ProductController(props),
10789
+ var _useState3 = React.useState({
10790
+ size: 16,
10791
+ isSale: true
10792
+ }),
10793
+ params = _useState3[0];
10794
+ var _ProductController = ProductController(_extends({}, props, {
10795
+ params: params
10796
+ })),
10778
10797
  _ProductController$pr = _ProductController.products,
10779
10798
  products = _ProductController$pr === void 0 ? [] : _ProductController$pr,
10780
10799
  _ProductController$lo = _ProductController.loading,
@@ -11380,7 +11399,7 @@ var Products11 = function Products11(props) {
11380
11399
  _props$Link = props.Link,
11381
11400
  Link = _props$Link === void 0 ? null : _props$Link,
11382
11401
  _props$categoryId = props.categoryId,
11383
- categoryId = _props$categoryId === void 0 ? 0 : _props$categoryId,
11402
+ categoryId = _props$categoryId === void 0 ? "" : _props$categoryId,
11384
11403
  _props$ProductItem = props.ProductItem,
11385
11404
  ProductItem = _props$ProductItem === void 0 ? null : _props$ProductItem;
11386
11405
  var _useState = React.useState({
@@ -11423,13 +11442,18 @@ var Products11 = function Products11(props) {
11423
11442
  });
11424
11443
  };
11425
11444
  var handleChooseCategory = function handleChooseCategory(category) {
11445
+ if (categoryId) {
11446
+ var newUrl = getLinkProductsByCategory(category);
11447
+ window.history.replaceState(null, '', newUrl);
11448
+ }
11426
11449
  setCategorySelected(category);
11427
11450
  setFilterItem(listFilter === null || listFilter === void 0 ? void 0 : listFilter[0]);
11428
11451
  setParams(function (prev) {
11429
- return _extends({}, prev, {
11452
+ return {
11453
+ page: 0,
11430
11454
  categoryId: category === null || category === void 0 ? void 0 : category.categoryId,
11431
11455
  size: 12
11432
- });
11456
+ };
11433
11457
  });
11434
11458
  window.scrollTo({
11435
11459
  top: 0,
@@ -11452,48 +11476,38 @@ var Products11 = function Products11(props) {
11452
11476
  return (a === null || a === void 0 ? void 0 : (_a$productInfo = a.productInfo) === null || _a$productInfo === void 0 ? void 0 : _a$productInfo.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo = b.productInfo) === null || _b$productInfo === void 0 ? void 0 : _b$productInfo.price);
11453
11477
  });
11454
11478
  setProductsFilter(productsCopy);
11455
- } else if ((filterItem === null || filterItem === void 0 ? void 0 : filterItem.value) === "discount") {
11456
- var _productsCopy2;
11457
- var _productsCopy = [].concat(products);
11458
- _productsCopy = (_productsCopy2 = _productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
11459
- var _product$productInfo, _product$productInfo2, _product$productInfo3;
11460
- return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
11461
- });
11462
- setProductsFilter(_productsCopy);
11463
11479
  } else {
11464
11480
  setProductsFilter(products);
11465
11481
  }
11466
11482
  }, [products, categorySelected]);
11467
11483
  var handleFilter = function handleFilter(item) {
11468
11484
  setFilterItem(item);
11469
- if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight)) {
11485
+ if ((item === null || item === void 0 ? void 0 : item.value) === "sortPriceDESC" && !(params !== null && params !== void 0 && params.isHighlight) && !(params !== null && params !== void 0 && params.isSale)) {
11470
11486
  var productsCopy = [].concat(products);
11471
11487
  productsCopy === null || productsCopy === void 0 ? void 0 : productsCopy.sort(function (a, b) {
11472
11488
  var _a$productInfo2, _b$productInfo2;
11473
11489
  return (a === null || a === void 0 ? void 0 : (_a$productInfo2 = a.productInfo) === null || _a$productInfo2 === void 0 ? void 0 : _a$productInfo2.price) - (b === null || b === void 0 ? void 0 : (_b$productInfo2 = b.productInfo) === null || _b$productInfo2 === void 0 ? void 0 : _b$productInfo2.price);
11474
11490
  });
11475
11491
  setProductsFilter(productsCopy);
11476
- } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
11477
- var _productsCopy4;
11478
- var _productsCopy3 = [].concat(products);
11479
- _productsCopy3 = (_productsCopy4 = _productsCopy3) === null || _productsCopy4 === void 0 ? void 0 : _productsCopy4.filter(function (product) {
11480
- var _product$productInfo4, _product$productInfo5, _product$productInfo6;
11481
- return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
11492
+ } else if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
11493
+ setParams({
11494
+ page: 0,
11495
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11496
+ size: 12,
11497
+ isSale: true
11482
11498
  });
11483
- setProductsFilter(_productsCopy3);
11484
11499
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
11485
- setParams(function (prev) {
11486
- return _extends({}, prev, {
11487
- isHighlight: true
11488
- });
11500
+ setParams({
11501
+ page: 0,
11502
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11503
+ size: 12,
11504
+ isHighlight: true
11489
11505
  });
11490
11506
  } else {
11491
- setParams(function (prev) {
11492
- return {
11493
- page: 0,
11494
- categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11495
- size: 12
11496
- };
11507
+ setParams({
11508
+ page: 0,
11509
+ categoryId: categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId,
11510
+ size: 12
11497
11511
  });
11498
11512
  }
11499
11513
  };
@@ -11502,7 +11516,7 @@ var Products11 = function Products11(props) {
11502
11516
  }, /*#__PURE__*/React__default.createElement("div", {
11503
11517
  className: "md:sticky top-16 self-start"
11504
11518
  }, (categories === null || categories === void 0 ? void 0 : categories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11505
- className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 overflow-y-auto"
11519
+ className: " flex flex-col gap-2 rounded-2xl bg-bgSecondary p-4 max-h-96 scroll-container overflow-y-auto"
11506
11520
  }, categories === null || categories === void 0 ? void 0 : categories.map(function (item, index) {
11507
11521
  return /*#__PURE__*/React__default.createElement("div", {
11508
11522
  className: "px-6 py-2 hover:bg-gray-100 hover:text-primary cursor-pointer rounded-lg " + ((categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.categoryId) === (item === null || item === void 0 ? void 0 : item.categoryId) ? " bg-primary text-textButton" : ""),
@@ -11791,7 +11805,7 @@ var listFilter$1 = [{
11791
11805
  }
11792
11806
  }];
11793
11807
  var ProductSearch1 = function ProductSearch1(props) {
11794
- var _window, _window$location, _productsFilter$slice;
11808
+ var _window, _window$location, _products$slice;
11795
11809
  var _props$Link = props.Link,
11796
11810
  Link = _props$Link === void 0 ? null : _props$Link,
11797
11811
  _props$SectionTitle = props.SectionTitle,
@@ -11801,21 +11815,18 @@ var ProductSearch1 = function ProductSearch1(props) {
11801
11815
  shopConfigStyle = props.shopConfigStyle;
11802
11816
  var queryParams = new URLSearchParams((_window = window) === null || _window === void 0 ? void 0 : (_window$location = _window.location) === null || _window$location === void 0 ? void 0 : _window$location.search);
11803
11817
  var keywordValue = queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('tu-khoa');
11804
- var _useState = React.useState([]),
11805
- productsFilter = _useState[0],
11806
- setProductsFilter = _useState[1];
11807
- var _useState2 = React.useState({
11818
+ var _useState = React.useState({
11808
11819
  productName: keywordValue,
11809
11820
  size: 12
11810
11821
  }),
11811
- params = _useState2[0],
11812
- setParams = _useState2[1];
11813
- var _useState3 = React.useState(true),
11814
- isGetMore = _useState3[0],
11815
- setIsGetMore = _useState3[1];
11816
- var _useState4 = React.useState(false),
11817
- isAutoGetList = _useState4[0],
11818
- setIsAutoGetList = _useState4[1];
11822
+ params = _useState[0],
11823
+ setParams = _useState[1];
11824
+ var _useState2 = React.useState(true),
11825
+ isGetMore = _useState2[0],
11826
+ setIsGetMore = _useState2[1];
11827
+ var _useState3 = React.useState(false),
11828
+ isAutoGetList = _useState3[0],
11829
+ setIsAutoGetList = _useState3[1];
11819
11830
  var _ProductController = ProductController(_extends({}, props, {
11820
11831
  params: params,
11821
11832
  isAutoGetList: isAutoGetList
@@ -11823,9 +11834,6 @@ var ProductSearch1 = function ProductSearch1(props) {
11823
11834
  products = _ProductController.products,
11824
11835
  loading = _ProductController.loading,
11825
11836
  page = _ProductController.page;
11826
- var _useState5 = React.useState({}),
11827
- filterValue = _useState5[0],
11828
- setFilterValue = _useState5[1];
11829
11837
  React.useEffect(function () {
11830
11838
  setIsAutoGetList(true);
11831
11839
  setParams(function (prev) {
@@ -11834,19 +11842,6 @@ var ProductSearch1 = function ProductSearch1(props) {
11834
11842
  });
11835
11843
  });
11836
11844
  }, [keywordValue]);
11837
- React.useEffect(function () {
11838
- if ((filterValue === null || filterValue === void 0 ? void 0 : filterValue.value) === "discount") {
11839
- var _productsCopy;
11840
- var productsCopy = [].concat(products);
11841
- productsCopy = (_productsCopy = productsCopy) === null || _productsCopy === void 0 ? void 0 : _productsCopy.filter(function (product) {
11842
- var _product$productInfo, _product$productInfo2, _product$productInfo3;
11843
- return (product === null || product === void 0 ? void 0 : (_product$productInfo = product.productInfo) === null || _product$productInfo === void 0 ? void 0 : _product$productInfo.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo2 = product.productInfo) === null || _product$productInfo2 === void 0 ? void 0 : _product$productInfo2.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo3 = product.productInfo) === null || _product$productInfo3 === void 0 ? void 0 : _product$productInfo3.price);
11844
- });
11845
- setProductsFilter(productsCopy);
11846
- } else {
11847
- setProductsFilter(products);
11848
- }
11849
- }, [products]);
11850
11845
  var handleGetMoreProducts = function handleGetMoreProducts() {
11851
11846
  setIsGetMore(false);
11852
11847
  setParams(function (prev) {
@@ -11856,20 +11851,17 @@ var ProductSearch1 = function ProductSearch1(props) {
11856
11851
  });
11857
11852
  };
11858
11853
  var handleFilter = function handleFilter(item) {
11859
- setFilterValue(item);
11860
- if ((item === null || item === void 0 ? void 0 : item.value) === "discount" && !(params !== null && params !== void 0 && params.isHighlight)) {
11861
- var _productsCopy2;
11862
- var productsCopy = [].concat(products);
11863
- productsCopy = (_productsCopy2 = productsCopy) === null || _productsCopy2 === void 0 ? void 0 : _productsCopy2.filter(function (product) {
11864
- var _product$productInfo4, _product$productInfo5, _product$productInfo6;
11865
- return (product === null || product === void 0 ? void 0 : (_product$productInfo4 = product.productInfo) === null || _product$productInfo4 === void 0 ? void 0 : _product$productInfo4.priceBeforeDiscount) && (product === null || product === void 0 ? void 0 : (_product$productInfo5 = product.productInfo) === null || _product$productInfo5 === void 0 ? void 0 : _product$productInfo5.priceBeforeDiscount) !== (product === null || product === void 0 ? void 0 : (_product$productInfo6 = product.productInfo) === null || _product$productInfo6 === void 0 ? void 0 : _product$productInfo6.price);
11854
+ if ((item === null || item === void 0 ? void 0 : item.value) === "discount") {
11855
+ setParams({
11856
+ size: 12,
11857
+ productName: keywordValue,
11858
+ isSale: true
11866
11859
  });
11867
- setProductsFilter(productsCopy);
11868
11860
  } else if ((item === null || item === void 0 ? void 0 : item.value) === "isHighlight") {
11869
- setParams(function (prev) {
11870
- return _extends({}, prev, {
11871
- isHighlight: true
11872
- });
11861
+ setParams({
11862
+ size: 12,
11863
+ productName: keywordValue,
11864
+ isHighlight: true
11873
11865
  });
11874
11866
  } else {
11875
11867
  setParams({
@@ -11893,15 +11885,15 @@ var ProductSearch1 = function ProductSearch1(props) {
11893
11885
  onClick: handleFilter
11894
11886
  }), loading && isGetMore ? /*#__PURE__*/React__default.createElement("div", {
11895
11887
  className: "m-auto mt-20 min-h-32"
11896
- }, /*#__PURE__*/React__default.createElement(Loading, null)) : (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11888
+ }, /*#__PURE__*/React__default.createElement(Loading, null)) : (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
11897
11889
  className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-x-2 gap-y-4 md:gap-4 xl:gap-6"
11898
- }, productsFilter === null || productsFilter === void 0 ? void 0 : (_productsFilter$slice = productsFilter.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _productsFilter$slice === void 0 ? void 0 : _productsFilter$slice.map(function (product, idx) {
11890
+ }, products === null || products === void 0 ? void 0 : (_products$slice = products.slice(0, (params === null || params === void 0 ? void 0 : params.size) - 4)) === null || _products$slice === void 0 ? void 0 : _products$slice.map(function (product, idx) {
11899
11891
  return /*#__PURE__*/React__default.createElement(ProductItem, {
11900
11892
  Link: Link,
11901
11893
  product: product,
11902
11894
  key: "htrhr-" + idx
11903
11895
  });
11904
- })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (productsFilter === null || productsFilter === void 0 ? void 0 : productsFilter.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
11896
+ })) : /*#__PURE__*/React__default.createElement(NotFoundProduct, null), !loading && (products === null || products === void 0 ? void 0 : products.length) > (params === null || params === void 0 ? void 0 : params.size) - 4 ? /*#__PURE__*/React__default.createElement(Button, {
11905
11897
  label: "Xem thêm",
11906
11898
  onClick: handleGetMoreProducts,
11907
11899
  className: "mx-auto " + (shopConfigStyle === null || shopConfigStyle === void 0 ? void 0 : shopConfigStyle.buttonClass),
@@ -12281,12 +12273,12 @@ var ProductDetail10 = function ProductDetail10(props) {
12281
12273
  return /*#__PURE__*/React__default.createElement("div", {
12282
12274
  className: SECTION_CLASS + " mt-0 md:mt-0 mb-0 " + ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "bg-bgSecondary pb-8" : "bg-background")
12283
12275
  }, /*#__PURE__*/React__default.createElement("div", {
12284
- className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 md:gap-6 bg-bgSecondary"
12276
+ className: ((shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingTemplateCode) === 'fashion_1' ? "" : "px-4 md:px-6") + " py-4 md:py-6 rounded-2xl grid grid-cols-1 md:grid-cols-5 gap-3 md:gap-6 bg-bgSecondary"
12285
12277
  }, /*#__PURE__*/React__default.createElement("div", {
12286
- className: "flex flex-col gap-4 col-span-2 "
12278
+ className: "flex flex-col gap-4 md:col-span-2 "
12287
12279
  }, displayImage ? /*#__PURE__*/React__default.createElement("img", {
12288
12280
  src: displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageUrl,
12289
- className: "w-full border rounded-2xl p-2 bg-background aspect-square object-contain rounded-2xl "
12281
+ className: "w-full border bg-background aspect-square object-contain rounded-2xl "
12290
12282
  }) : /*#__PURE__*/React__default.createElement("div", {
12291
12283
  className: "flex justify-center items-center w-full border rounded-2xl aspect-square",
12292
12284
  style: {
@@ -12297,19 +12289,19 @@ var ProductDetail10 = function ProductDetail10(props) {
12297
12289
  height: "25%",
12298
12290
  fill: "#D9D9D9"
12299
12291
  })), /*#__PURE__*/React__default.createElement("div", {
12300
- className: "flex gap-1 w-[80vw] overflow-x-auto md:w-full md:gap-2 md:flex-wrap"
12292
+ className: "flex gap-2 pb-3 md:pb-0 overflow-x-auto md:w-full lg:gap-3 md:grid md:grid-cols-4 xl:grid-cols-5"
12301
12293
  }, product === null || product === void 0 ? void 0 : (_product$images2 = product.images) === null || _product$images2 === void 0 ? void 0 : _product$images2.map(function (item) {
12302
12294
  return /*#__PURE__*/React__default.createElement("img", {
12303
12295
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12304
12296
  key: item === null || item === void 0 ? void 0 : item.imageId,
12305
12297
  alt: "",
12306
- className: "cursor-pointer h-16 w-16 rounded-lg bg-background\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12298
+ className: "cursor-pointer h-20 w-20 md:max-h-32 md:max-w-32 md:h-full md:w-full aspect-square rounded-md lg:rounded-lg bg-background object-contain\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border" : "opacity-50 brightness-75 "),
12307
12299
  onClick: function onClick() {
12308
12300
  handleDisplayImage(item);
12309
12301
  }
12310
12302
  });
12311
12303
  }))), /*#__PURE__*/React__default.createElement("div", {
12312
- className: "col-span-3"
12304
+ className: "md:col-span-3 "
12313
12305
  }, /*#__PURE__*/React__default.createElement("p", {
12314
12306
  className: "font-semibold text-2xl"
12315
12307
  }, product === null || product === void 0 ? void 0 : product.productName), /*#__PURE__*/React__default.createElement(ProductPrice, {
@@ -12323,7 +12315,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12323
12315
  }, /*#__PURE__*/React__default.createElement("div", {
12324
12316
  className: "min-w-24"
12325
12317
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12326
- className: "flex gap-2"
12318
+ className: "flex flex-wrap gap-2"
12327
12319
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12328
12320
  return /*#__PURE__*/React__default.createElement("button", {
12329
12321
  key: i,
@@ -12375,7 +12367,7 @@ var ProductDetail10 = function ProductDetail10(props) {
12375
12367
  __html: product === null || product === void 0 ? void 0 : product.description
12376
12368
  }
12377
12369
  }), !isSeeMore && !hiddenButton ? /*#__PURE__*/React__default.createElement("div", {
12378
- className: "h-10 relative -mt-10 rounded-b-lg",
12370
+ className: "h-28 relative -mt-28 rounded-b-lg",
12379
12371
  style: {
12380
12372
  background: "linear-gradient(to top, #81818169 0%, #00000003 50%)"
12381
12373
  }
@@ -12520,7 +12512,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12520
12512
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12521
12513
  key: item === null || item === void 0 ? void 0 : item.imageId,
12522
12514
  alt: "",
12523
- className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12515
+ className: "cursor-pointer px-3 py-2 !h-24 !w-24 object-contain aspect-square rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12524
12516
  onClick: function onClick() {
12525
12517
  handleDisplayImage(item);
12526
12518
  }
@@ -12552,7 +12544,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12552
12544
  src: item === null || item === void 0 ? void 0 : item.imageUrl,
12553
12545
  key: item === null || item === void 0 ? void 0 : item.imageId,
12554
12546
  alt: "",
12555
- className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-cover rounded-lg \n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12547
+ className: "cursor-pointer px-2 py-1 !h-24 !w-24 object-contain rounded-lg aspect-square\n " + ((displayImage === null || displayImage === void 0 ? void 0 : displayImage.imageId) === (item === null || item === void 0 ? void 0 : item.imageId) ? "border border-primary" : ""),
12556
12548
  onClick: function onClick() {
12557
12549
  handleDisplayImage(item);
12558
12550
  }
@@ -12572,7 +12564,7 @@ var ProductDetail11 = function ProductDetail11(props) {
12572
12564
  }, /*#__PURE__*/React__default.createElement("div", {
12573
12565
  className: "min-w-24 my-auto"
12574
12566
  }, option === null || option === void 0 ? void 0 : option.name, ":"), /*#__PURE__*/React__default.createElement("div", {
12575
- className: "flex gap-2"
12567
+ className: "flex flex-wrap gap-2"
12576
12568
  }, ((option === null || option === void 0 ? void 0 : option.value) || []).map(function (v, i) {
12577
12569
  return /*#__PURE__*/React__default.createElement("button", {
12578
12570
  key: i,
@@ -13034,7 +13026,9 @@ var Banner1 = function Banner1(props) {
13034
13026
  var data = props.data,
13035
13027
  shopConfigStyle = props.shopConfigStyle,
13036
13028
  _props$SectionTitle = props.SectionTitle,
13037
- SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle;
13029
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
13030
+ _props$Link = props.Link,
13031
+ Link = _props$Link === void 0 ? null : _props$Link;
13038
13032
  var sectionData = data === null || data === void 0 ? void 0 : data.data;
13039
13033
  return /*#__PURE__*/React__default.createElement("div", {
13040
13034
  className: "" + SECTION_DEFAULT_CLASS
@@ -13044,12 +13038,15 @@ var Banner1 = function Banner1(props) {
13044
13038
  }), /*#__PURE__*/React__default.createElement("div", {
13045
13039
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4 lg:gap-6 mt-6"
13046
13040
  }, sectionData && sectionData.length > 0 && sectionData.map(function (item, index) {
13047
- return /*#__PURE__*/React__default.createElement("img", {
13041
+ return /*#__PURE__*/React__default.createElement(LinkToPage, {
13042
+ Link: Link,
13043
+ href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#"
13044
+ }, /*#__PURE__*/React__default.createElement("img", {
13048
13045
  src: item === null || item === void 0 ? void 0 : item.srcImage,
13049
13046
  alt: "",
13050
13047
  className: "rounded-2xl",
13051
13048
  key: "hnfhn-" + index
13052
- });
13049
+ }));
13053
13050
  })));
13054
13051
  };
13055
13052
 
@@ -13139,25 +13136,30 @@ var Banner3 = function Banner3(props) {
13139
13136
  };
13140
13137
 
13141
13138
  var Banner4 = function Banner4(props) {
13142
- var _data$data, _data$data$, _data$data2, _data$data2$slice;
13139
+ var _data$data, _data$data$, _data$data2, _data$data2$, _data$data3, _data$data3$, _data$data4, _data$data4$slice;
13143
13140
  var data = props.data,
13144
13141
  _props$Link = props.Link,
13145
13142
  Link = _props$Link === void 0 ? null : _props$Link;
13146
13143
  return /*#__PURE__*/React__default.createElement("div", {
13147
13144
  className: SECTION_CLASS_PADDING + " grid grid-cols-1 bg-bgSecondary md:grid-cols-3 gap-6"
13145
+ }, /*#__PURE__*/React__default.createElement(LinkToPage, {
13146
+ className: "md:col-span-2",
13147
+ Link: Link,
13148
+ href: convertURL(data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.route) || (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$ = _data$data2[0]) === null || _data$data2$ === void 0 ? void 0 : _data$data2$.link) || "#"
13148
13149
  }, /*#__PURE__*/React__default.createElement("img", {
13149
- src: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$ = _data$data[0]) === null || _data$data$ === void 0 ? void 0 : _data$data$.srcImage,
13150
- className: "md:col-span-2 object-cover w-full h-full rounded-[10px]"
13151
- }), /*#__PURE__*/React__default.createElement("div", {
13152
- className: "flex flex-col gap-6"
13153
- }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(1, 3)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
13150
+ src: data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$ = _data$data3[0]) === null || _data$data3$ === void 0 ? void 0 : _data$data3$.srcImage,
13151
+ className: " object-cover w-full h-full rounded-[10px]"
13152
+ })), /*#__PURE__*/React__default.createElement("div", {
13153
+ className: "flex flex-col gap-6 h-full"
13154
+ }, data === null || data === void 0 ? void 0 : (_data$data4 = data.data) === null || _data$data4 === void 0 ? void 0 : (_data$data4$slice = _data$data4.slice(1, 3)) === null || _data$data4$slice === void 0 ? void 0 : _data$data4$slice.map(function (item, index) {
13154
13155
  return /*#__PURE__*/React__default.createElement(LinkToPage, {
13155
13156
  Link: Link,
13156
13157
  href: convertURL(item === null || item === void 0 ? void 0 : item.route) || (item === null || item === void 0 ? void 0 : item.link) || "#",
13158
+ className: "flex-1 min-h-0",
13157
13159
  key: "djsd-" + index
13158
13160
  }, /*#__PURE__*/React__default.createElement("img", {
13159
13161
  src: item === null || item === void 0 ? void 0 : item.srcImage,
13160
- className: "object-cover w-full h-full rounded-xl"
13162
+ className: "object-cover w-full h-full rounded-[10px]"
13161
13163
  }));
13162
13164
  })));
13163
13165
  };
@@ -13564,7 +13566,7 @@ var Footer1 = function Footer1(props) {
13564
13566
  href: "/",
13565
13567
  className: "flex items-center"
13566
13568
  }, /*#__PURE__*/React__default.createElement("img", {
13567
- className: "object-cover w-14 max-h-14",
13569
+ className: "object-contain w-14 h-14",
13568
13570
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
13569
13571
  }), /*#__PURE__*/React__default.createElement("h3", {
13570
13572
  className: "text-2xl md:text-3xl ms-2 font-headingFont ",
@@ -13707,7 +13709,7 @@ var Footer7 = function Footer7(props) {
13707
13709
  href: "/",
13708
13710
  className: "flex items-center gap-2"
13709
13711
  }, /*#__PURE__*/React__default.createElement("img", {
13710
- className: "object-cover w-14 max-h-14",
13712
+ className: "object-contain w-14 h-14",
13711
13713
  src: shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.logoUrl
13712
13714
  }), /*#__PURE__*/React__default.createElement("h3", {
13713
13715
  className: " text-2xl md:text-3xl ms-2 font-headingFont ",
@@ -14004,13 +14006,13 @@ var CustomerRating8 = function CustomerRating8(props) {
14004
14006
  }, item === null || item === void 0 ? void 0 : item.description), /*#__PURE__*/React__default.createElement("div", {
14005
14007
  className: "flex gap-2 "
14006
14008
  }, /*#__PURE__*/React__default.createElement(ri.RiDoubleQuotesL, {
14007
- className: "text-gray3",
14008
- size: 36
14009
+ className: "flex-shrink-0 text-gray4",
14010
+ size: 16
14009
14011
  }), /*#__PURE__*/React__default.createElement("div", {
14010
14012
  className: "pt-4"
14011
- }, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement(ri.RiDoubleQuotesL, {
14012
- className: " mt-auto text-gray3",
14013
- size: 36
14013
+ }, item === null || item === void 0 ? void 0 : item.content), /*#__PURE__*/React__default.createElement(ri.RiDoubleQuotesR, {
14014
+ className: "flex-shrink-0 mt-auto text-gray4",
14015
+ size: 16
14014
14016
  })));
14015
14017
  }))));
14016
14018
  };
@@ -14261,21 +14263,21 @@ var Gallery2 = function Gallery2(props) {
14261
14263
  }, data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : (_data$data$slice = _data$data.slice(0, 2)) === null || _data$data$slice === void 0 ? void 0 : _data$data$slice.map(function (item, index) {
14262
14264
  return /*#__PURE__*/React__default.createElement("img", {
14263
14265
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14264
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl"
14266
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl"
14265
14267
  });
14266
14268
  })), /*#__PURE__*/React__default.createElement("div", {
14267
14269
  className: "flex flex-col gap-2 md:gap-4"
14268
14270
  }, data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : (_data$data2$slice = _data$data2.slice(2, 4)) === null || _data$data2$slice === void 0 ? void 0 : _data$data2$slice.map(function (item, index) {
14269
14271
  return /*#__PURE__*/React__default.createElement("img", {
14270
14272
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14271
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl odd:h-[130%]"
14273
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl odd:h-[130%]"
14272
14274
  });
14273
14275
  })), /*#__PURE__*/React__default.createElement("div", {
14274
14276
  className: "flex flex-col gap-2 md:gap-4"
14275
14277
  }, data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : (_data$data3$slice = _data$data3.slice(4, 6)) === null || _data$data3$slice === void 0 ? void 0 : _data$data3$slice.map(function (item, index) {
14276
14278
  return /*#__PURE__*/React__default.createElement("img", {
14277
14279
  src: item === null || item === void 0 ? void 0 : item.srcImage,
14278
- className: "w-full h-full object-cover rounded-xl md:rounded-2xl even:h-[130%]"
14280
+ className: "w-full h-full object-cover rounded-lg md:rounded-2xl even:h-[130%]"
14279
14281
  });
14280
14282
  })))));
14281
14283
  };
@@ -14370,12 +14372,12 @@ var Breadcrumb1 = function Breadcrumb1(props) {
14370
14372
  return e === null || e === void 0 ? void 0 : e.length;
14371
14373
  })) === null || _route$route$split$fi === void 0 ? void 0 : _route$route$split$fi.slice(0, 2);
14372
14374
  items = (_items = items) === null || _items === void 0 ? void 0 : _items.map(function (e) {
14373
- var _e, _e$replace, _e$replace$replace, _e$replace$replace$re;
14375
+ var _e, _e$replace, _e$replace$replace, _e$replace$replace$re, _e$replace$replace$re2;
14374
14376
  if (e === "product") e = "products";else if (e === "service") e = "services";
14375
14377
  return (routes === null || routes === void 0 ? void 0 : routes.find(function (r) {
14376
14378
  return (r === null || r === void 0 ? void 0 : r.name) === e;
14377
14379
  })) || {
14378
- label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(/-{3}/g, "###")) === null || _e$replace === void 0 ? void 0 : (_e$replace$replace = _e$replace.replace(/-/g, " ")) === null || _e$replace$replace === void 0 ? void 0 : (_e$replace$replace$re = _e$replace$replace.replace(/###/g, "-")) === null || _e$replace$replace$re === void 0 ? void 0 : _e$replace$replace$re.replace(/~/g, "/")
14380
+ label: (_e = e) === null || _e === void 0 ? void 0 : (_e$replace = _e.replace(/pct/g, '%')) === null || _e$replace === void 0 ? void 0 : (_e$replace$replace = _e$replace.replace(/fs/g, '/')) === null || _e$replace$replace === void 0 ? void 0 : (_e$replace$replace$re = _e$replace$replace.replace(/amp/g, '&')) === null || _e$replace$replace$re === void 0 ? void 0 : (_e$replace$replace$re2 = _e$replace$replace$re.replace(/-/g, ' ')) === null || _e$replace$replace$re2 === void 0 ? void 0 : _e$replace$replace$re2.replace(/hyp/g, '-')
14379
14381
  };
14380
14382
  });
14381
14383
  (_items2 = items) === null || _items2 === void 0 ? void 0 : _items2.unshift({
@@ -14383,7 +14385,6 @@ var Breadcrumb1 = function Breadcrumb1(props) {
14383
14385
  label: "Trang chủ",
14384
14386
  route: "/"
14385
14387
  });
14386
- console.log(items);
14387
14388
  setItems(items);
14388
14389
  };
14389
14390
  return /*#__PURE__*/React__default.createElement("div", {
@@ -15628,7 +15629,7 @@ var ShopHighlights2 = function ShopHighlights2(props) {
15628
15629
  }) : /*#__PURE__*/React__default.createElement("img", {
15629
15630
  src: item === null || item === void 0 ? void 0 : item.srcImage,
15630
15631
  alt: "logo",
15631
- className: "w-16 h-16 p-3 rounded-full bg-primary"
15632
+ className: "w-16 h-16 p-3 rounded-full object-cover bg-primary"
15632
15633
  }), /*#__PURE__*/React__default.createElement("div", {
15633
15634
  className: "font-medium text-lg"
15634
15635
  }, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
@@ -15660,7 +15661,7 @@ var ShopHighlights5 = function ShopHighlights5(props) {
15660
15661
  }) : /*#__PURE__*/React__default.createElement("img", {
15661
15662
  src: item === null || item === void 0 ? void 0 : item.srcImage,
15662
15663
  alt: "logo",
15663
- className: "w-16 h-16 rounded-full bg-primary"
15664
+ className: "w-16 h-16 rounded-full object-cover bg-primary"
15664
15665
  }), /*#__PURE__*/React__default.createElement("div", {
15665
15666
  className: "font-semibold text-xl text-textHeading pt-2 border-t border-textHeading"
15666
15667
  }, item === null || item === void 0 ? void 0 : (_item$title = item.title) === null || _item$title === void 0 ? void 0 : _item$title.toUpperCase()), /*#__PURE__*/React__default.createElement("div", {
@@ -15690,7 +15691,7 @@ var ShopHighlights6 = function ShopHighlights6(props) {
15690
15691
  }) : /*#__PURE__*/React__default.createElement("img", {
15691
15692
  src: item === null || item === void 0 ? void 0 : item.srcImage,
15692
15693
  alt: "logo",
15693
- className: "w-16 h-16"
15694
+ className: "w-16 h-16 object-cover"
15694
15695
  }), /*#__PURE__*/React__default.createElement("div", {
15695
15696
  className: " w-44 h-0.5 rounded-full bg-primary"
15696
15697
  }), /*#__PURE__*/React__default.createElement("div", {
@@ -15869,7 +15870,7 @@ var ShopHighlights10 = function ShopHighlights10(props) {
15869
15870
  className: "flex-grow text-lg leading-relaxed text-center text-textSecondary"
15870
15871
  }, item === null || item === void 0 ? void 0 : item.description)), /*#__PURE__*/React__default.createElement("img", {
15871
15872
  src: item === null || item === void 0 ? void 0 : item.srcImage,
15872
- className: "h-56 lg:h-72 object-cover mt-auto border-4 border-secondary"
15873
+ className: "aspect-video object-cover mt-auto border-4 border-secondary"
15873
15874
  })));
15874
15875
  })));
15875
15876
  };
@@ -15961,11 +15962,6 @@ var NewsController = function NewsController(props) {
15961
15962
  var _response$data2, _response$data2$data, _response$data3, _response$data3$data;
15962
15963
  setNewsArticles(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$data = _response$data2.data) === null || _response$data2$data === void 0 ? void 0 : _response$data2$data.content);
15963
15964
  setPage(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$data = _response$data3.data) === null || _response$data3$data === void 0 ? void 0 : _response$data3$data.totalElements);
15964
- var url = new URL(window.location.href);
15965
- if (/^(\/(tin-tuc-theo-danh-muc))\/[^/]+-\d+$/.test(url.pathname)) {
15966
- url.pathname = url.pathname.replace(/\/[^/]+-\d+$/, "");
15967
- window.history.replaceState({}, '', url.pathname + url.search);
15968
- }
15969
15965
  }
15970
15966
  setLoading(false);
15971
15967
  });
@@ -16199,7 +16195,8 @@ var News1 = function News1(props) {
16199
16195
  shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
16200
16196
  _props$Link = props.Link,
16201
16197
  Link = _props$Link === void 0 ? null : _props$Link,
16202
- catId = props.catId;
16198
+ _props$catId = props.catId,
16199
+ catId = _props$catId === void 0 ? "" : _props$catId;
16203
16200
  var _useState = React.useState({
16204
16201
  page: 0,
16205
16202
  sort: "timeUpdate,DESC",
@@ -16239,6 +16236,18 @@ var News1 = function News1(props) {
16239
16236
  setCategorySelected(category);
16240
16237
  }
16241
16238
  }, [newsCategories]);
16239
+ var handleSelectedCateogry = function handleSelectedCateogry(item) {
16240
+ if (catId) {
16241
+ var newUrl = getLinkNewsByCategory(item);
16242
+ window.history.replaceState(null, '', newUrl);
16243
+ }
16244
+ setCategorySelected(item);
16245
+ setParams(function (prev) {
16246
+ return _extends({}, prev, {
16247
+ catId: item === null || item === void 0 ? void 0 : item.catId
16248
+ });
16249
+ });
16250
+ };
16242
16251
  return /*#__PURE__*/React__default.createElement("div", {
16243
16252
  className: SECTION_CLASS + " grid grid-cols-1 md:grid-cols-3 gap-6"
16244
16253
  }, /*#__PURE__*/React__default.createElement("div", {
@@ -16259,12 +16268,7 @@ var News1 = function News1(props) {
16259
16268
  className: "px-6 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
16260
16269
  key: "sdjfdh-" + index,
16261
16270
  onClick: function onClick() {
16262
- setCategorySelected(item);
16263
- setParams(function (prev) {
16264
- return _extends({}, prev, {
16265
- catId: item === null || item === void 0 ? void 0 : item.catId
16266
- });
16267
- });
16271
+ handleSelectedCateogry(item);
16268
16272
  }
16269
16273
  }, /*#__PURE__*/React__default.createElement("div", {
16270
16274
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16318,12 +16322,7 @@ var News1 = function News1(props) {
16318
16322
  className: "px-4 hover:bg-gray-100 hover:text-primary cursor-pointer " + ((item === null || item === void 0 ? void 0 : item.catId) === (categorySelected === null || categorySelected === void 0 ? void 0 : categorySelected.catId) ? "bg-gray-100 text-primary" : "") + " ",
16319
16323
  key: "sdjfdh-" + index,
16320
16324
  onClick: function onClick() {
16321
- setCategorySelected(item);
16322
- setParams(function (prev) {
16323
- return _extends({}, prev, {
16324
- catId: item === null || item === void 0 ? void 0 : item.catId
16325
- });
16326
- });
16325
+ handleSelectedCateogry(item);
16327
16326
  }
16328
16327
  }, /*#__PURE__*/React__default.createElement("div", {
16329
16328
  className: "border-b border-dashed py-4 " + ((newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) - 1 === index ? "border-b-0" : "")
@@ -16419,7 +16418,7 @@ var NewsDetail1 = function NewsDetail1(props) {
16419
16418
  }), (newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.length) > 0 ? /*#__PURE__*/React__default.createElement("div", {
16420
16419
  className: "top-6 block md:hidden"
16421
16420
  }, /*#__PURE__*/React__default.createElement("div", {
16422
- className: "px-6 bg-primary rounded-t-lg text-lg text-textButton text-center"
16421
+ className: "px-6 py-3 bg-primary rounded-t-lg text-lg text-textButton text-center"
16423
16422
  }, "Chuy\xEAn m\u1EE5c"), /*#__PURE__*/React__default.createElement("div", {
16424
16423
  className: "rounded-b-lg bg-bgSecondary"
16425
16424
  }, newsCategories === null || newsCategories === void 0 ? void 0 : newsCategories.map(function (item, index) {
@@ -16475,6 +16474,193 @@ var NewsDetail1 = function NewsDetail1(props) {
16475
16474
  }))) : null);
16476
16475
  };
16477
16476
 
16477
+ var submitFormApi = function submitFormApi(landingShopConfigId, data) {
16478
+ return api({
16479
+ method: "post",
16480
+ url: endpointLandingShop + "/" + landingShopConfigId + "/form",
16481
+ data: data
16482
+ });
16483
+ };
16484
+
16485
+ var Form = function Form(props) {
16486
+ var _data$data, _data$data2, _data$data3;
16487
+ var _props$shopConfigStyl = props.shopConfigStyle,
16488
+ shopConfigStyle = _props$shopConfigStyl === void 0 ? {} : _props$shopConfigStyl,
16489
+ _props$shopConfig = props.shopConfig,
16490
+ shopConfig = _props$shopConfig === void 0 ? {} : _props$shopConfig,
16491
+ _props$data = props.data,
16492
+ data = _props$data === void 0 ? {} : _props$data,
16493
+ _props$SectionTitle = props.SectionTitle,
16494
+ SectionTitle = _props$SectionTitle === void 0 ? null : _props$SectionTitle,
16495
+ _props$router = props.router,
16496
+ router = _props$router === void 0 ? function () {} : _props$router;
16497
+ var _shopConfigStyle$colo = shopConfigStyle.color,
16498
+ _shopConfigStyle$colo2 = _shopConfigStyle$colo === void 0 ? {} : _shopConfigStyle$colo,
16499
+ _shopConfigStyle$colo3 = _shopConfigStyle$colo2.background,
16500
+ background = _shopConfigStyle$colo3 === void 0 ? "#fff" : _shopConfigStyle$colo3;
16501
+ var fields = (data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.fields) || [];
16502
+ var redirectUrl = (data === null || data === void 0 ? void 0 : (_data$data2 = data.data) === null || _data$data2 === void 0 ? void 0 : _data$data2.redirect_url) || "";
16503
+ var srcImage = data === null || data === void 0 ? void 0 : (_data$data3 = data.data) === null || _data$data3 === void 0 ? void 0 : _data$data3.srcImage;
16504
+ var _useState = React.useState(false),
16505
+ isLoading = _useState[0],
16506
+ setIsLoading = _useState[1];
16507
+ var fieldRefs = React.useRef({});
16508
+ var getFieldRef = function getFieldRef(key) {
16509
+ if (!fieldRefs.current[key]) {
16510
+ fieldRefs.current[key] = React__default.createRef();
16511
+ }
16512
+ return fieldRefs.current[key];
16513
+ };
16514
+ var formatFieldsWithValue = function formatFieldsWithValue() {
16515
+ return fields.map(function (field, index) {
16516
+ var _ref$current;
16517
+ var key = (field === null || field === void 0 ? void 0 : field.title) || "field-" + index;
16518
+ var ref = getFieldRef(key);
16519
+ var getValue = ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getValue;
16520
+ var value = getValue ? getValue() : undefined;
16521
+ return _extends({}, field, {
16522
+ value: value
16523
+ });
16524
+ });
16525
+ };
16526
+ var handleSubmit = function handleSubmit() {
16527
+ try {
16528
+ setIsLoading(true);
16529
+ return Promise.resolve(_finallyRethrows(function () {
16530
+ return _catch(function () {
16531
+ var isValid = true;
16532
+ var payload = {};
16533
+ fields.forEach(function (field, index) {
16534
+ var _ref$current2, _ref$current3;
16535
+ var key = (field === null || field === void 0 ? void 0 : field.title) || "field-" + index;
16536
+ var ref = getFieldRef(key);
16537
+ var validate = ref === null || ref === void 0 ? void 0 : (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.validateData;
16538
+ var getValue = ref === null || ref === void 0 ? void 0 : (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.getValue;
16539
+ var ok = validate ? validate() : true;
16540
+ if (ok === false) {
16541
+ isValid = false;
16542
+ }
16543
+ payload[key] = getValue ? getValue() : undefined;
16544
+ });
16545
+ if (!isValid) return;
16546
+ var fieldsWithValue = formatFieldsWithValue();
16547
+ var body = {
16548
+ title: data === null || data === void 0 ? void 0 : data.sectionTitle,
16549
+ data: JSON.stringify(fieldsWithValue)
16550
+ };
16551
+ var _temp = function () {
16552
+ if (shopConfig !== null && shopConfig !== void 0 && shopConfig.landingShopConfigId) {
16553
+ return Promise.resolve(submitFormApi(shopConfig === null || shopConfig === void 0 ? void 0 : shopConfig.landingShopConfigId, body)).then(function (res) {
16554
+ var _res$data, _res$data$status;
16555
+ if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$status = _res$data.status) === null || _res$data$status === void 0 ? void 0 : _res$data$status.code) == '200') {
16556
+ router === null || router === void 0 ? void 0 : router.push(redirectUrl || "/");
16557
+ }
16558
+ });
16559
+ }
16560
+ }();
16561
+ if (_temp && _temp.then) return _temp.then(function () {});
16562
+ }, function (error) {
16563
+ console.log(error);
16564
+ });
16565
+ }, function (_wasThrown, _result) {
16566
+ setIsLoading(false);
16567
+ if (_wasThrown) throw _result;
16568
+ return _result;
16569
+ }));
16570
+ } catch (e) {
16571
+ return Promise.reject(e);
16572
+ }
16573
+ };
16574
+ var renderField = function renderField(field, index) {
16575
+ var _field$title;
16576
+ var key = (field === null || field === void 0 ? void 0 : field.title) || "field-" + index;
16577
+ var commonProps = {
16578
+ label: field === null || field === void 0 ? void 0 : field.title,
16579
+ placeholder: "Nh\u1EADp " + ((field === null || field === void 0 ? void 0 : (_field$title = field.title) === null || _field$title === void 0 ? void 0 : _field$title.toLowerCase()) || ""),
16580
+ className: "!bg-bgSecondary",
16581
+ rules: field !== null && field !== void 0 && field.required ? [{
16582
+ type: "required",
16583
+ message: "Bắt buộc nhập"
16584
+ }] : [],
16585
+ labelClassName: "font-medium"
16586
+ };
16587
+ if ((field === null || field === void 0 ? void 0 : field.type) === "phone") {
16588
+ return /*#__PURE__*/React__default.createElement(InputPhoneNumber, _extends({
16589
+ key: key
16590
+ }, commonProps, {
16591
+ rules: [].concat(commonProps.rules, [{
16592
+ type: "pattern",
16593
+ pattern: pattern === null || pattern === void 0 ? void 0 : pattern.phoneNumberPattern,
16594
+ message: "Số điện thoại không hợp lệ!"
16595
+ }]),
16596
+ className: "bg-white",
16597
+ wrapClassName: "w-full",
16598
+ ref: getFieldRef(key)
16599
+ }));
16600
+ }
16601
+ if ((field === null || field === void 0 ? void 0 : field.type) === "area") {
16602
+ return /*#__PURE__*/React__default.createElement(TextArea, _extends({
16603
+ key: key
16604
+ }, commonProps, {
16605
+ className: "w-full",
16606
+ textareaClassName: "w-full p-3 bg-white",
16607
+ ref: getFieldRef(key)
16608
+ }));
16609
+ }
16610
+ var extraRules = [];
16611
+ if ((field === null || field === void 0 ? void 0 : field.type) === "email") {
16612
+ extraRules.push({
16613
+ type: "pattern",
16614
+ pattern: /\S+@\S+\.\S+/,
16615
+ message: "Email không hợp lệ"
16616
+ });
16617
+ }
16618
+ return /*#__PURE__*/React__default.createElement(Input, _extends({
16619
+ key: key
16620
+ }, commonProps, {
16621
+ type: (field === null || field === void 0 ? void 0 : field.type) === "email" ? "email" : "text",
16622
+ ref: getFieldRef(key),
16623
+ rules: [].concat(commonProps.rules, extraRules)
16624
+ }));
16625
+ };
16626
+ return /*#__PURE__*/React__default.createElement("div", {
16627
+ className: "relative w-full px-4 xl:px-20 py-12",
16628
+ style: {
16629
+ backgroundColor: background
16630
+ }
16631
+ }, SectionTitle ? /*#__PURE__*/React__default.createElement(SectionTitle, {
16632
+ data: data,
16633
+ shopConfigStyle: shopConfigStyle
16634
+ }) : null, /*#__PURE__*/React__default.createElement("div", {
16635
+ className: "mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-12 items-start"
16636
+ }, /*#__PURE__*/React__default.createElement("div", {
16637
+ className: "space-y-4"
16638
+ }, srcImage ? /*#__PURE__*/React__default.createElement("div", {
16639
+ className: "w-full"
16640
+ }, /*#__PURE__*/React__default.createElement("img", {
16641
+ src: srcImage,
16642
+ alt: "form-banner",
16643
+ className: "w-full h-auto rounded-xl object-cover"
16644
+ })) : null), /*#__PURE__*/React__default.createElement("div", {
16645
+ className: "grid gap-4 rounded-2xl p-6 border bg-white"
16646
+ }, fields !== null && fields !== void 0 && fields.length ? /*#__PURE__*/React__default.createElement("div", {
16647
+ className: "grid grid-cols-1 gap-4"
16648
+ }, fields === null || fields === void 0 ? void 0 : fields.map(renderField)) : /*#__PURE__*/React__default.createElement("div", null, "Ch\u01B0a c\xF3 c\u1EA5u h\xECnh tr\u01B0\u1EDDng"), /*#__PURE__*/React__default.createElement("div", {
16649
+ className: "text-center"
16650
+ }, isLoading ? /*#__PURE__*/React__default.createElement("div", {
16651
+ className: "flex gap-2 justify-center items-center"
16652
+ }, /*#__PURE__*/React__default.createElement(Loading, {
16653
+ size: 24
16654
+ }), /*#__PURE__*/React__default.createElement("span", {
16655
+ className: "ml-2"
16656
+ }, "\u0110ang g\u1EEDi th\xF4ng tin...")) : /*#__PURE__*/React__default.createElement(Button, {
16657
+ label: "Gửi thông tin",
16658
+ shopConfigStyle: shopConfigStyle,
16659
+ onClick: handleSubmit,
16660
+ disabled: isLoading
16661
+ })))));
16662
+ };
16663
+
16478
16664
  exports.About1 = About1;
16479
16665
  exports.About5 = About5;
16480
16666
  exports.About6 = About6;
@@ -16505,6 +16691,7 @@ exports.Features2 = Features2;
16505
16691
  exports.Features3 = Features3;
16506
16692
  exports.Footer1 = Footer1;
16507
16693
  exports.Footer7 = Footer7;
16694
+ exports.Form = Form;
16508
16695
  exports.Gallery1 = Gallery1;
16509
16696
  exports.Gallery2 = Gallery2;
16510
16697
  exports.Gallery3 = Gallery3;