@polyv/product-sdk 1.3.0-rc-20250814.1 → 1.5.0-rc-20250925.1

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/index.es.js CHANGED
@@ -1,4 +1,163 @@
1
- var PolyvApiUrl = /* @__PURE__ */ function(PolyvApiUrl2) {
1
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
2
+ function hasOwnProp(r, n) {
3
+ return hasOwnProperty.call(r, n);
4
+ }
5
+ function assignProps(r) {
6
+ if (null == r) throw new TypeError("Cannot convert undefined or null to object");
7
+ for (var o = 0; o < (arguments.length <= 1 ? 0 : arguments.length - 1); o++) {
8
+ var t = o + 1 < 1 || arguments.length <= o + 1 ? void 0 : arguments[o + 1];
9
+ if (null != t) for (var n in t) "__proto__" !== n && hasOwnProp(t, n) && (r[n] = t[n]);
10
+ }
11
+ return r;
12
+ }
13
+ function _typeof$8(o) {
14
+ "@babel/helpers - typeof";
15
+ return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
16
+ return typeof o2;
17
+ } : function(o2) {
18
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
19
+ }, _typeof$8(o);
20
+ }
21
+ function addToResult(n, o, e, t) {
22
+ if (null == e && (e = ""), "" !== e || !t.ignoreEmpty) {
23
+ if ("function" == typeof t.encode) {
24
+ o = t.encode(o);
25
+ e = -1 !== ["boolean", "string", "number"].indexOf(_typeof$8(e)) ? t.encode(String(e)) : "";
26
+ }
27
+ n.push(o + "=" + e);
28
+ }
29
+ }
30
+ function handleMultiValues(n, o, e, t) {
31
+ e.forEach(function(e2) {
32
+ addToResult(n, o, e2, t);
33
+ });
34
+ }
35
+ function stringify(n, o) {
36
+ var e = assignProps({
37
+ encode: encodeURIComponent
38
+ }, o), t = [];
39
+ var i, r;
40
+ for (i in n) hasOwnProp(n, i) && (r = n[i], Array.isArray(r) ? handleMultiValues(t, i, r, e) : addToResult(t, i, r, e));
41
+ return t.join("&");
42
+ }
43
+ function splitURL(e) {
44
+ var t = {
45
+ leftContext: ""
46
+ };
47
+ var n = e.indexOf("#");
48
+ return -1 !== n && (t.hash = e.slice(n + 1), e = e.slice(0, n)), n = e.indexOf("?"), -1 !== n && (t.search = e.slice(n + 1), e = e.slice(0, n)), t.leftContext = e, t;
49
+ }
50
+ function joinURL(e) {
51
+ var t = e.leftContext;
52
+ return null != e.search && (t += "?" + e.search), null != e.hash && (t += "#" + e.hash), t;
53
+ }
54
+ function concat(i, r, t) {
55
+ if (i = String(i), null == r) return i;
56
+ if (!(r = "string" == typeof r ? r.replace(/^[?&]/, "") : stringify(r, t))) return i;
57
+ var n = splitURL(i);
58
+ var e = n.search || "";
59
+ return e && "&" !== e.slice(-1) && (e += "&"), e += r, n.search = e, joinURL(n);
60
+ }
61
+ function boolToYN(o) {
62
+ if ("boolean" != typeof o) throw new Error("The value argument must be a boolean type");
63
+ return o ? "Y" : "N";
64
+ }
65
+ function ynToBool(o, n) {
66
+ var e = String(o).toUpperCase();
67
+ if ("Y" !== e && "N" !== e) {
68
+ if (null == n) throw new Error('The value argument must be "Y" or "N"');
69
+ e = String(n).toUpperCase();
70
+ }
71
+ return "Y" === e;
72
+ }
73
+ function _typeof$7(o) {
74
+ "@babel/helpers - typeof";
75
+ return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
76
+ return typeof o2;
77
+ } : function(o2) {
78
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
79
+ }, _typeof$7(o);
80
+ }
81
+ function _classCallCheck$a(a, n) {
82
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
83
+ }
84
+ function _defineProperties$5(e, r) {
85
+ for (var t = 0; t < r.length; t++) {
86
+ var o = r[t];
87
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$7(o.key), o);
88
+ }
89
+ }
90
+ function _createClass$a(e, r, t) {
91
+ return r && _defineProperties$5(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
92
+ }
93
+ function _toPropertyKey$7(t) {
94
+ var i = _toPrimitive$7(t, "string");
95
+ return "symbol" == _typeof$7(i) ? i : i + "";
96
+ }
97
+ function _toPrimitive$7(t, r) {
98
+ if ("object" != _typeof$7(t) || !t) return t;
99
+ var e = t[Symbol.toPrimitive];
100
+ if (void 0 !== e) {
101
+ var i = e.call(t, r);
102
+ if ("object" != _typeof$7(i)) return i;
103
+ throw new TypeError("@@toPrimitive must return a primitive value.");
104
+ }
105
+ return String(t);
106
+ }
107
+ var EventEmitter = /* @__PURE__ */ (function() {
108
+ function EventEmitter2() {
109
+ _classCallCheck$a(this, EventEmitter2);
110
+ this.__eventStore = {};
111
+ }
112
+ return _createClass$a(EventEmitter2, [{
113
+ key: "__addOnEvent",
114
+ value: function __addOnEvent(t, e, n, o) {
115
+ if (!e || !n) return;
116
+ var r = this.__eventStore[e];
117
+ r || (r = []), r.push({
118
+ type: t,
119
+ handler: n,
120
+ callbackHandler: n.bind(o)
121
+ }), this.__eventStore[e] = r;
122
+ }
123
+ }, {
124
+ key: "on",
125
+ value: function on(t, e) {
126
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
127
+ this.__addOnEvent("normal", t, e, n);
128
+ }
129
+ }, {
130
+ key: "once",
131
+ value: function once(t, e) {
132
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
133
+ this.__addOnEvent("once", t, e, n);
134
+ }
135
+ }, {
136
+ key: "off",
137
+ value: function off(t, e) {
138
+ var n = this.__eventStore[t];
139
+ n && (n = n.filter(function(t2) {
140
+ return t2.handler !== e;
141
+ }), this.__eventStore[t] = n);
142
+ }
143
+ }, {
144
+ key: "emit",
145
+ value: function emit(t, e, n) {
146
+ var _this = this;
147
+ var o = this.__eventStore[t];
148
+ o && o.forEach(function(o2) {
149
+ var r = o2.type, _ = o2.handler, s = o2.callbackHandler;
150
+ "function" == typeof s && s(e, n), "once" === r && _this.off(t, _);
151
+ });
152
+ }
153
+ }, {
154
+ key: "destroy",
155
+ value: function destroy() {
156
+ this.__eventStore = {};
157
+ }
158
+ }]);
159
+ })();
160
+ var PolyvApiUrl = /* @__PURE__ */ (function(PolyvApiUrl2) {
2
161
  PolyvApiUrl2["GetProductTagList"] = "/live/v4/watch/channel/product/tag/list";
3
162
  PolyvApiUrl2["GetProductListByShowId"] = "/live/v3/sdk/watch/interactive/product/list-by-showId";
4
163
  PolyvApiUrl2["GetProductListByTag"] = "/live/v4/watch/channel/product/list";
@@ -20,27 +179,129 @@ var PolyvApiUrl = /* @__PURE__ */ function(PolyvApiUrl2) {
20
179
  PolyvApiUrl2["EndProductExplain"] = "/live/v4/channel/product/product-explain/end-now";
21
180
  PolyvApiUrl2["RestartProductExplain"] = "/live/v4/channel/product/product-explain/restart-now";
22
181
  PolyvApiUrl2["DeleteProductExplain"] = "/live/v4/channel/product/product-explain/delete";
182
+ PolyvApiUrl2["GetCurrentProductExplain"] = "/live/v4/channel/product/product-explain/get-current-product-id";
23
183
  PolyvApiUrl2["OpenProductPrice"] = "/live/v4/channel/product/open-price";
24
184
  PolyvApiUrl2["HideProductPrice"] = "/live/v4/channel/product/un-open-price";
25
185
  PolyvApiUrl2["ProductPushRule"] = "/live/v4/channel/product/push/rule";
186
+ PolyvApiUrl2["UpdateProductPushRule"] = "/live/v4/channel/product/push/rule/save";
26
187
  PolyvApiUrl2["PushProduct"] = "/live/v4/channel/product/push/push";
27
188
  PolyvApiUrl2["CancelPushProduct"] = "/live/v4/channel/product/push/cancel-push";
28
189
  PolyvApiUrl2["BatchDeleteProduct"] = "/live/v4/channel/product/delete-batch";
29
190
  PolyvApiUrl2["BatchShelfProduct"] = "/live/v4/channel/product/shelf-batch";
191
+ PolyvApiUrl2["TopProduct"] = "/live/v4/channel/product/topping";
192
+ PolyvApiUrl2["CancelTopProduct"] = "/live/v4/channel/product/un-topping";
193
+ PolyvApiUrl2["ToggleProductSoldOut"] = "/live/v4/channel/product/update-mark-as-soldout";
194
+ PolyvApiUrl2["GetProductEnabled"] = "/live/v4/channel/product/menu/get-enabled";
195
+ PolyvApiUrl2["UpdateProductEnabled"] = "/live/v4/channel/product/menu/update-enabled";
196
+ PolyvApiUrl2["UpdateProductSort"] = "/live/v4/channel/product/sort-rank";
197
+ PolyvApiUrl2["MoveProduct"] = "/live/v4/channel/product/sort-rank-by-type";
30
198
  return PolyvApiUrl2;
31
- }({});
32
- function boolToYN(o) {
33
- if ("boolean" != typeof o) throw new Error("The value argument must be a boolean type");
34
- return o ? "Y" : "N";
35
- }
36
- function ynToBool(o, n) {
37
- var e = String(o).toUpperCase();
38
- if ("Y" !== e && "N" !== e) {
39
- if (null == n) throw new Error('The value argument must be "Y" or "N"');
40
- e = String(n).toUpperCase();
41
- }
42
- return "Y" === e;
43
- }
199
+ })({});
200
+ var ProductPushRule = /* @__PURE__ */ (function(ProductPushRule2) {
201
+ ProductPushRule2["BigCard"] = "bigCard";
202
+ ProductPushRule2["SmallCard"] = "smallCard";
203
+ return ProductPushRule2;
204
+ })({});
205
+ var ProductEvents = /* @__PURE__ */ (function(ProductEvents2) {
206
+ ProductEvents2["OnSaleProduct"] = "OnSaleProduct";
207
+ ProductEvents2["OffSaleProduct"] = "OffSaleProduct";
208
+ ProductEvents2["AddProduct"] = "AddProduct";
209
+ ProductEvents2["DeleteProduct"] = "DeleteProduct";
210
+ ProductEvents2["ChangeProduct"] = "ChangeProduct";
211
+ ProductEvents2["MoveProduct"] = "MoveProduct";
212
+ ProductEvents2["ChangeProductRank"] = "ChangeProductRank";
213
+ ProductEvents2["ProductSoldOut"] = "ProductSoldOut";
214
+ ProductEvents2["PushProduct"] = "PushProduct";
215
+ ProductEvents2["CancelPushProduct"] = "CancelPushProduct";
216
+ ProductEvents2["ProductListEnabled"] = "ProductListEnabled";
217
+ ProductEvents2["RefreshProductList"] = "RefreshProductList";
218
+ ProductEvents2["ProductClick"] = "ProductClick";
219
+ ProductEvents2["ProductClickTimes"] = "ProductClickTimes";
220
+ return ProductEvents2;
221
+ })({});
222
+ var ProductType = /* @__PURE__ */ (function(ProductType2) {
223
+ ProductType2["Normal"] = "normal";
224
+ ProductType2["Finance"] = "finance";
225
+ ProductType2["Position"] = "position";
226
+ return ProductType2;
227
+ })({});
228
+ var ProductLinkType = /* @__PURE__ */ (function(ProductLinkType2) {
229
+ ProductLinkType2[ProductLinkType2["Normal"] = 10] = "Normal";
230
+ ProductLinkType2[ProductLinkType2["MultiPlatform"] = 11] = "MultiPlatform";
231
+ ProductLinkType2[ProductLinkType2["Native"] = 12] = "Native";
232
+ return ProductLinkType2;
233
+ })({});
234
+ var ProductLinkJumpWay = /* @__PURE__ */ (function(ProductLinkJumpWay2) {
235
+ ProductLinkJumpWay2["PopUp"] = "POP_UP";
236
+ ProductLinkJumpWay2["NewWindow"] = "NEW_WINDOW";
237
+ ProductLinkJumpWay2["CurrentWindow"] = "CURRENT_WINDOW";
238
+ return ProductLinkJumpWay2;
239
+ })({});
240
+ var ProductStatus = /* @__PURE__ */ (function(ProductStatus2) {
241
+ ProductStatus2[ProductStatus2["OnSale"] = 1] = "OnSale";
242
+ ProductStatus2[ProductStatus2["OffSale"] = 2] = "OffSale";
243
+ return ProductStatus2;
244
+ })({});
245
+ var ProductMediaType = /* @__PURE__ */ (function(ProductMediaType2) {
246
+ ProductMediaType2["Image"] = "image";
247
+ ProductMediaType2["MaterialVideo"] = "material-video";
248
+ return ProductMediaType2;
249
+ })({});
250
+ var ProductExplainStatus = /* @__PURE__ */ (function(ProductExplainStatus2) {
251
+ ProductExplainStatus2["NotExplained"] = "notExplained";
252
+ ProductExplainStatus2["Explaining"] = "explaining";
253
+ ProductExplainStatus2["Explained"] = "explained";
254
+ return ProductExplainStatus2;
255
+ })({});
256
+ var ProductExplainType = /* @__PURE__ */ (function(ProductExplainType2) {
257
+ ProductExplainType2["Live"] = "live";
258
+ ProductExplainType2["Playback"] = "recordFile";
259
+ return ProductExplainType2;
260
+ })({});
261
+ var ProductExplainOperation = /* @__PURE__ */ (function(ProductExplainOperation2) {
262
+ ProductExplainOperation2["Start"] = "start";
263
+ ProductExplainOperation2["End"] = "end";
264
+ ProductExplainOperation2["Restart"] = "restart";
265
+ return ProductExplainOperation2;
266
+ })({});
267
+ var ProductBuyType = /* @__PURE__ */ (function(ProductBuyType2) {
268
+ ProductBuyType2["DirectBuy"] = "inner";
269
+ ProductBuyType2["Link"] = "link";
270
+ return ProductBuyType2;
271
+ })({});
272
+ var ProductPriceType = /* @__PURE__ */ (function(ProductPriceType2) {
273
+ ProductPriceType2["Amount"] = "AMOUNT";
274
+ ProductPriceType2["Custom"] = "CUSTOM";
275
+ return ProductPriceType2;
276
+ })({});
277
+ var ProductDeliveryType = /* @__PURE__ */ (function(ProductDeliveryType2) {
278
+ ProductDeliveryType2["Express"] = "express";
279
+ ProductDeliveryType2["Virtual"] = "virtual";
280
+ return ProductDeliveryType2;
281
+ })({});
282
+ var ProductServiceType = /* @__PURE__ */ (function(ProductServiceType2) {
283
+ ProductServiceType2["WxWorkCode"] = "wxWorkCode";
284
+ ProductServiceType2["Custom"] = "custom";
285
+ return ProductServiceType2;
286
+ })({});
287
+ var ProductMoveOperation = /* @__PURE__ */ (function(ProductMoveOperation2) {
288
+ ProductMoveOperation2["MoveUp"] = "moveUp";
289
+ ProductMoveOperation2["MoveDown"] = "moveDown";
290
+ return ProductMoveOperation2;
291
+ })({});
292
+ var ProductSortType = /* @__PURE__ */ (function(ProductSortType2) {
293
+ ProductSortType2["Asc"] = "ASC";
294
+ ProductSortType2["Desc"] = "DESC";
295
+ return ProductSortType2;
296
+ })({});
297
+ var AuthType = /* @__PURE__ */ (function(AuthType2) {
298
+ AuthType2["None"] = "none";
299
+ AuthType2["Custom"] = "custom";
300
+ AuthType2["External"] = "external";
301
+ AuthType2["Direct"] = "direct";
302
+ AuthType2["EnterpriseWeChat"] = "enterpriseWeChat";
303
+ return AuthType2;
304
+ })({});
44
305
  function canMatchKeywords(e, t) {
45
306
  e = e.toLowerCase();
46
307
  var n = /[/\s;_-]/, s = /[/\s;_-]/;
@@ -81,36 +342,36 @@ var osRules = [{
81
342
  name: "android",
82
343
  regExp: /\bAdr\s([\d.]+)(?:\b|_)/
83
344
  }];
84
- function _typeof$8(o) {
345
+ function _typeof$6(o) {
85
346
  "@babel/helpers - typeof";
86
- return _typeof$8 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
347
+ return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
87
348
  return typeof o2;
88
349
  } : function(o2) {
89
350
  return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
90
- }, _typeof$8(o);
351
+ }, _typeof$6(o);
91
352
  }
92
- function _classCallCheck$a(a, n) {
353
+ function _classCallCheck$9(a, n) {
93
354
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
94
355
  }
95
- function _defineProperties$5(e, r) {
356
+ function _defineProperties$4(e, r) {
96
357
  for (var t = 0; t < r.length; t++) {
97
358
  var o = r[t];
98
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$7(o.key), o);
359
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$6(o.key), o);
99
360
  }
100
361
  }
101
- function _createClass$a(e, r, t) {
102
- return r && _defineProperties$5(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
362
+ function _createClass$9(e, r, t) {
363
+ return r && _defineProperties$4(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
103
364
  }
104
- function _toPropertyKey$7(t) {
105
- var i = _toPrimitive$7(t, "string");
106
- return "symbol" == _typeof$8(i) ? i : i + "";
365
+ function _toPropertyKey$6(t) {
366
+ var i = _toPrimitive$6(t, "string");
367
+ return "symbol" == _typeof$6(i) ? i : i + "";
107
368
  }
108
- function _toPrimitive$7(t, r) {
109
- if ("object" != _typeof$8(t) || !t) return t;
369
+ function _toPrimitive$6(t, r) {
370
+ if ("object" != _typeof$6(t) || !t) return t;
110
371
  var e = t[Symbol.toPrimitive];
111
372
  if (void 0 !== e) {
112
373
  var i = e.call(t, r);
113
- if ("object" != _typeof$8(i)) return i;
374
+ if ("object" != _typeof$6(i)) return i;
114
375
  throw new TypeError("@@toPrimitive must return a primitive value.");
115
376
  }
116
377
  return String(t);
@@ -123,12 +384,12 @@ function compareVersions(r, e) {
123
384
  }
124
385
  return n.length - s.length;
125
386
  }
126
- var Version = /* @__PURE__ */ function() {
387
+ var Version = /* @__PURE__ */ (function() {
127
388
  function Version2(r) {
128
- _classCallCheck$a(this, Version2);
389
+ _classCallCheck$9(this, Version2);
129
390
  this._ver = (r || "").replace(/_/g, ".").replace(/\.+$/, ""), Object.freeze(this);
130
391
  }
131
- return _createClass$a(Version2, [{
392
+ return _createClass$9(Version2, [{
132
393
  key: "_compare",
133
394
  value: function _compare(r, e) {
134
395
  if (!this._ver || !r) return false;
@@ -168,11 +429,11 @@ var Version = /* @__PURE__ */ function() {
168
429
  return this._ver;
169
430
  }
170
431
  }]);
171
- }();
172
- function _createClass$9(e, r, t) {
432
+ })();
433
+ function _createClass$8(e, r, t) {
173
434
  return Object.defineProperty(e, "prototype", { writable: false }), e;
174
435
  }
175
- function _classCallCheck$9(a, n) {
436
+ function _classCallCheck$8(a, n) {
176
437
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
177
438
  }
178
439
  var propMap$3 = {
@@ -196,8 +457,8 @@ function platformToOS(s) {
196
457
  return "windows";
197
458
  }
198
459
  }
199
- var OSInfo = /* @__PURE__ */ _createClass$9(function OSInfo2(s, o) {
200
- _classCallCheck$9(this, OSInfo2);
460
+ var OSInfo = /* @__PURE__ */ _createClass$8(function OSInfo2(s, o) {
461
+ _classCallCheck$8(this, OSInfo2);
201
462
  var i;
202
463
  var e;
203
464
  if (this.isIOS = false, this.isAndroid = false, this.isHarmonyOS = false, this.isOpenHarmony = false, this.isWindows = false, this.isMacOS = false, null == o ? void 0 : o.platform) {
@@ -329,10 +590,10 @@ var androidRules = [{
329
590
  name: "vivo",
330
591
  modelRegExp: /^V[12]\d{3}[A-Z]{0,2}$/
331
592
  }];
332
- function _createClass$8(e, r, t) {
593
+ function _createClass$7(e, r, t) {
333
594
  return Object.defineProperty(e, "prototype", { writable: false }), e;
334
595
  }
335
- function _classCallCheck$8(a, n) {
596
+ function _classCallCheck$7(a, n) {
336
597
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
337
598
  }
338
599
  var propMap$2 = {
@@ -346,8 +607,8 @@ var propMap$2 = {
346
607
  oneplus: "isOnePlus",
347
608
  samsung: "isSamsung"
348
609
  };
349
- var BrandInfo = /* @__PURE__ */ _createClass$8(function BrandInfo2(i, s) {
350
- _classCallCheck$8(this, BrandInfo2);
610
+ var BrandInfo = /* @__PURE__ */ _createClass$7(function BrandInfo2(i, s) {
611
+ _classCallCheck$7(this, BrandInfo2);
351
612
  var e;
352
613
  if (this.isHuawei = false, this.isMi = false, this.isOppo = false, this.isVivo = false, this.isOnePlus = false, this.isSamsung = false, this.isIPod = false, this.isIPhone = false, this.isIPad = false, this.isMac = false, this.isApple = false, s.isIOS ? (e = appleRules, this.isApple = true) : s.isMacOS ? (this.isMac = true, this.isApple = true) : (s.isAndroid || s.isOpenHarmony) && (e = androidRules), e) {
353
614
  var o = execRules(i, e);
@@ -377,10 +638,10 @@ var browserRules = [{
377
638
  name: "opera-presto",
378
639
  regExp: /\bOpera\/([\d.]+)/
379
640
  }];
380
- function _createClass$7(e, r, t) {
641
+ function _createClass$6(e, r, t) {
381
642
  return Object.defineProperty(e, "prototype", { writable: false }), e;
382
643
  }
383
- function _classCallCheck$7(a, n) {
644
+ function _classCallCheck$6(a, n) {
384
645
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
385
646
  }
386
647
  var propMap$1 = {
@@ -391,8 +652,8 @@ var propMap$1 = {
391
652
  firefox: "isFirefox",
392
653
  "opera-presto": "isPrestoOpera"
393
654
  };
394
- var BrowserInfo = /* @__PURE__ */ _createClass$7(function BrowserInfo2(e) {
395
- _classCallCheck$7(this, BrowserInfo2);
655
+ var BrowserInfo = /* @__PURE__ */ _createClass$6(function BrowserInfo2(e) {
656
+ _classCallCheck$6(this, BrowserInfo2);
396
657
  this.isChrome = false, this.isSafari = false, this.isEdge = false, this.isIE = false, this.isFirefox = false, this.isPrestoOpera = false;
397
658
  var s = execRules(e, browserRules);
398
659
  s ? (this[propMap$1[s.name]] = true, this.version = new Version(s.version)) : this.version = new Version(""), Object.freeze(this);
@@ -453,10 +714,10 @@ var clientRules = [{
453
714
  regExp: /\bbaiduboxpad\b/i
454
715
  }];
455
716
  clientRules = clientRules.concat(browserRules);
456
- function _createClass$6(e, r, t) {
717
+ function _createClass$5(e, r, t) {
457
718
  return Object.defineProperty(e, "prototype", { writable: false }), e;
458
719
  }
459
- function _classCallCheck$6(a, n) {
720
+ function _classCallCheck$5(a, n) {
460
721
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
461
722
  }
462
723
  var propMap = {
@@ -480,202 +741,69 @@ var propMap = {
480
741
  ie: "isIE",
481
742
  firefox: "isFirefox"
482
743
  };
483
- var ClientInfo = /* @__PURE__ */ _createClass$6(function ClientInfo2(i) {
484
- _classCallCheck$6(this, ClientInfo2);
744
+ var ClientInfo = /* @__PURE__ */ _createClass$5(function ClientInfo2(i) {
745
+ _classCallCheck$5(this, ClientInfo2);
485
746
  this.isWxWork = false, this.isWx = false, this.isWxMiniProgram = false, this.isDing = false, this.isQQ = false, this.isWeibo = false, this.isEdge = false, this.isOpera = false, this.isQQBrowser = false, this.isUCBrowser = false, this.isQuark = false, this.isMaxthon = false, this.isTheWorld = false, this.isBaiduBrowser = false, this.isBaiduApp = false, this.isChrome = false, this.isSafari = false, this.isIE = false, this.isFirefox = false;
486
747
  var s = execRules(i, clientRules);
487
748
  s ? (this[propMap[s.name]] = true, this.version = new Version(s.version)) : this.version = new Version(""), this.isWxMiniProgram = (this.isWx || this.isWxWork) && /\bMiniProgramEnv\b/.test(i), Object.freeze(this);
488
749
  });
489
- function _createClass$5(e, r, t) {
750
+ function _createClass$4(e, r, t) {
490
751
  return Object.defineProperty(e, "prototype", { writable: false }), e;
491
752
  }
492
- function _classCallCheck$5(a, n) {
753
+ function _classCallCheck$4(a, n) {
493
754
  if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
494
755
  }
495
- var UAInfo = /* @__PURE__ */ _createClass$5(function UAInfo2(t, i) {
496
- _classCallCheck$5(this, UAInfo2);
756
+ var UAInfo = /* @__PURE__ */ _createClass$4(function UAInfo2(t, i) {
757
+ _classCallCheck$4(this, UAInfo2);
497
758
  this.os = Object.freeze(new OSInfo(t, i)), this.brand = Object.freeze(new BrandInfo(t, this.os)), this.browser = Object.freeze(new BrowserInfo(t)), this.client = Object.freeze(new ClientInfo(t)), this.isTablet = this.brand.isIPad || /\bTablet\b/i.test(t) || this.os.isAndroid && !/\bMobile\b/i.test(t), this.os.isIOS || this.os.isAndroid || this.isTablet ? this.isPortable = true : /\(X11[;)]/i.test(t) || /\b(Windows\sNT|Macintosh)\b/.test(t) ? this.isPortable = false : this.isPortable = /mobile|android/i.test(t), Object.freeze(this);
498
759
  });
499
760
  var currentUAInfo;
500
761
  function getCurrentUAInfo() {
501
762
  return currentUAInfo || (currentUAInfo = Object.freeze("undefined" != typeof window ? new UAInfo(window.navigator.userAgent, window.navigator) : new UAInfo(""))), currentUAInfo;
502
763
  }
503
- var hasOwnProperty = Object.prototype.hasOwnProperty;
504
- function hasOwnProp(r, n) {
505
- return hasOwnProperty.call(r, n);
506
- }
507
- function assignProps(r) {
508
- if (null == r) throw new TypeError("Cannot convert undefined or null to object");
509
- for (var o = 0; o < (arguments.length <= 1 ? 0 : arguments.length - 1); o++) {
510
- var t = o + 1 < 1 || arguments.length <= o + 1 ? void 0 : arguments[o + 1];
511
- if (null != t) for (var n in t) "__proto__" !== n && hasOwnProp(t, n) && (r[n] = t[n]);
512
- }
513
- return r;
514
- }
515
- function _typeof$7(o) {
516
- "@babel/helpers - typeof";
517
- return _typeof$7 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
518
- return typeof o2;
519
- } : function(o2) {
520
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
521
- }, _typeof$7(o);
522
- }
523
- function addToResult(n, o, e, t) {
524
- if (null == e && (e = ""), "" !== e || !t.ignoreEmpty) {
525
- if ("function" == typeof t.encode) {
526
- o = t.encode(o);
527
- e = -1 !== ["boolean", "string", "number"].indexOf(_typeof$7(e)) ? t.encode(String(e)) : "";
528
- }
529
- n.push(o + "=" + e);
530
- }
531
- }
532
- function handleMultiValues(n, o, e, t) {
533
- e.forEach(function(e2) {
534
- addToResult(n, o, e2, t);
535
- });
536
- }
537
- function stringify(n, o) {
538
- var e = assignProps({
539
- encode: encodeURIComponent
540
- }, o), t = [];
541
- var i, r;
542
- for (i in n) hasOwnProp(n, i) && (r = n[i], Array.isArray(r) ? handleMultiValues(t, i, r, e) : addToResult(t, i, r, e));
543
- return t.join("&");
544
- }
545
- function splitURL(e) {
546
- var t = {
547
- leftContext: ""
548
- };
549
- var n = e.indexOf("#");
550
- return -1 !== n && (t.hash = e.slice(n + 1), e = e.slice(0, n)), n = e.indexOf("?"), -1 !== n && (t.search = e.slice(n + 1), e = e.slice(0, n)), t.leftContext = e, t;
551
- }
552
- function joinURL(e) {
553
- var t = e.leftContext;
554
- return null != e.search && (t += "?" + e.search), null != e.hash && (t += "#" + e.hash), t;
555
- }
556
- function concat(i, r, t) {
557
- if (i = String(i), null == r) return i;
558
- if (!(r = "string" == typeof r ? r.replace(/^[?&]/, "") : stringify(r, t))) return i;
559
- var n = splitURL(i);
560
- var e = n.search || "";
561
- return e && "&" !== e.slice(-1) && (e += "&"), e += r, n.search = e, joinURL(n);
562
- }
563
764
  (function(i, n, o, t) {
564
765
  return new (o || (o = Promise))(function(e, a) {
565
766
  function r(i2) {
566
767
  try {
567
- k(t.next(i2));
768
+ d(t.next(i2));
568
769
  } catch (i3) {
569
770
  a(i3);
570
771
  }
571
772
  }
572
773
  function l(i2) {
573
774
  try {
574
- k(t["throw"](i2));
775
+ d(t["throw"](i2));
575
776
  } catch (i3) {
576
777
  a(i3);
577
778
  }
578
779
  }
579
- function k(i2) {
780
+ function d(i2) {
580
781
  var n2;
581
782
  i2.done ? e(i2.value) : (n2 = i2.value, n2 instanceof o ? n2 : new o(function(i3) {
582
783
  i3(n2);
583
784
  })).then(r, l);
584
785
  }
585
- k((t = t.apply(i, n || [])).next());
786
+ d((t = t.apply(i, n || [])).next());
586
787
  });
587
788
  });
588
789
  var uaInfo = getCurrentUAInfo();
589
790
  uaInfo.os.isAndroid;
590
- uaInfo.os.isIOS;
591
- var LinkType;
592
- !function(i) {
593
- i[i.Normal = 10] = "Normal", i[i.MultiPlatform = 11] = "MultiPlatform", i[i.Native = 12] = "Native";
594
- }(LinkType || (LinkType = {}));
595
- var LinkJumpWay;
596
- !function(i) {
597
- i.PopUp = "POP_UP", i.NewWindow = "NEW_WINDOW", i.CurrentWindow = "CURRENT_WINDOW";
598
- }(LinkJumpWay || (LinkJumpWay = {}));
599
- var ProductType = /* @__PURE__ */ function(ProductType2) {
600
- ProductType2["Normal"] = "normal";
601
- ProductType2["Finance"] = "finance";
602
- ProductType2["Position"] = "position";
603
- return ProductType2;
604
- }({});
605
- var ProductLinkType = /* @__PURE__ */ function(ProductLinkType2) {
606
- ProductLinkType2[ProductLinkType2["Normal"] = 10] = "Normal";
607
- ProductLinkType2[ProductLinkType2["MultiPlatform"] = 11] = "MultiPlatform";
608
- ProductLinkType2[ProductLinkType2["Native"] = 12] = "Native";
609
- return ProductLinkType2;
610
- }({});
611
- var ProductLinkJumpWay = /* @__PURE__ */ function(ProductLinkJumpWay2) {
612
- ProductLinkJumpWay2["PopUp"] = "POP_UP";
613
- ProductLinkJumpWay2["NewWindow"] = "NEW_WINDOW";
614
- ProductLinkJumpWay2["CurrentWindow"] = "CURRENT_WINDOW";
615
- return ProductLinkJumpWay2;
616
- }({});
617
- var ProductStatus = /* @__PURE__ */ function(ProductStatus2) {
618
- ProductStatus2[ProductStatus2["OnSale"] = 1] = "OnSale";
619
- ProductStatus2[ProductStatus2["OffSale"] = 2] = "OffSale";
620
- return ProductStatus2;
621
- }({});
622
- var ProductMediaType = /* @__PURE__ */ function(ProductMediaType2) {
623
- ProductMediaType2["Image"] = "image";
624
- ProductMediaType2["MaterialVideo"] = "material-video";
625
- return ProductMediaType2;
626
- }({});
627
- var ProductExplainStatus = /* @__PURE__ */ function(ProductExplainStatus2) {
628
- ProductExplainStatus2["NotExplained"] = "notExplained";
629
- ProductExplainStatus2["Explaining"] = "explaining";
630
- ProductExplainStatus2["Explained"] = "explained";
631
- return ProductExplainStatus2;
632
- }({});
633
- var ProductExplainType = /* @__PURE__ */ function(ProductExplainType2) {
634
- ProductExplainType2["Live"] = "live";
635
- ProductExplainType2["Playback"] = "recordFile";
636
- return ProductExplainType2;
637
- }({});
638
- var ProductExplainOperation = /* @__PURE__ */ function(ProductExplainOperation2) {
639
- ProductExplainOperation2["Start"] = "start";
640
- ProductExplainOperation2["End"] = "end";
641
- ProductExplainOperation2["Restart"] = "restart";
642
- return ProductExplainOperation2;
643
- }({});
644
- var ProductBuyType = /* @__PURE__ */ function(ProductBuyType2) {
645
- ProductBuyType2["DirectBuy"] = "inner";
646
- ProductBuyType2["Link"] = "link";
647
- return ProductBuyType2;
648
- }({});
649
- var ProductPriceType = /* @__PURE__ */ function(ProductPriceType2) {
650
- ProductPriceType2["Amount"] = "AMOUNT";
651
- ProductPriceType2["Custom"] = "CUSTOM";
652
- return ProductPriceType2;
653
- }({});
654
- var ProductDeliveryType = /* @__PURE__ */ function(ProductDeliveryType2) {
655
- ProductDeliveryType2["Express"] = "express";
656
- ProductDeliveryType2["Virtual"] = "virtual";
657
- return ProductDeliveryType2;
658
- }({});
659
- var ProductServiceType = /* @__PURE__ */ function(ProductServiceType2) {
660
- ProductServiceType2["WxWorkCode"] = "wxWorkCode";
661
- ProductServiceType2["Custom"] = "custom";
662
- return ProductServiceType2;
663
- }({});
664
- var AuthType = /* @__PURE__ */ function(AuthType2) {
665
- AuthType2["None"] = "none";
666
- AuthType2["Custom"] = "custom";
667
- AuthType2["External"] = "external";
668
- AuthType2["Direct"] = "direct";
669
- AuthType2["EnterpriseWeChat"] = "enterpriseWeChat";
670
- return AuthType2;
671
- }({});
672
- function _typeof$6(o) {
791
+ uaInfo.os.isIOS;
792
+ var LinkType;
793
+ !(function(i) {
794
+ i[i.Normal = 10] = "Normal", i[i.MultiPlatform = 11] = "MultiPlatform", i[i.Native = 12] = "Native";
795
+ })(LinkType || (LinkType = {}));
796
+ var LinkJumpWay;
797
+ !(function(i) {
798
+ i.PopUp = "POP_UP", i.NewWindow = "NEW_WINDOW", i.CurrentWindow = "CURRENT_WINDOW";
799
+ })(LinkJumpWay || (LinkJumpWay = {}));
800
+ function _typeof$5(o) {
673
801
  "@babel/helpers - typeof";
674
- return _typeof$6 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
802
+ return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
675
803
  return typeof o2;
676
804
  } : function(o2) {
677
805
  return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
678
- }, _typeof$6(o);
806
+ }, _typeof$5(o);
679
807
  }
680
808
  function ownKeys$4(e, r) {
681
809
  var t = Object.keys(e);
@@ -699,18 +827,18 @@ function _objectSpread$4(e) {
699
827
  return e;
700
828
  }
701
829
  function _defineProperty$5(e, r, t) {
702
- return (r = _toPropertyKey$6(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
830
+ return (r = _toPropertyKey$5(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e;
703
831
  }
704
- function _toPropertyKey$6(t) {
705
- var i = _toPrimitive$6(t, "string");
706
- return "symbol" == _typeof$6(i) ? i : i + "";
832
+ function _toPropertyKey$5(t) {
833
+ var i = _toPrimitive$5(t, "string");
834
+ return "symbol" == _typeof$5(i) ? i : i + "";
707
835
  }
708
- function _toPrimitive$6(t, r) {
709
- if ("object" != _typeof$6(t) || !t) return t;
836
+ function _toPrimitive$5(t, r) {
837
+ if ("object" != _typeof$5(t) || !t) return t;
710
838
  var e = t[Symbol.toPrimitive];
711
839
  if (void 0 !== e) {
712
840
  var i = e.call(t, r);
713
- if ("object" != _typeof$6(i)) return i;
841
+ if ("object" != _typeof$5(i)) return i;
714
842
  throw new TypeError("@@toPrimitive must return a primitive value.");
715
843
  }
716
844
  return ("string" === r ? String : Number)(t);
@@ -748,7 +876,8 @@ function filterInternalData(internalData) {
748
876
  pushRule: internalData.productPushRule,
749
877
  pushLogId: internalData.logId,
750
878
  rank: internalData.rank,
751
- originalData: internalData
879
+ originalData: internalData,
880
+ topping: ynToBool(internalData.toppingEnable, "N")
752
881
  };
753
882
  var linkData = {
754
883
  linkType: internalData.linkType,
@@ -846,122 +975,53 @@ function filterInternalData(internalData) {
846
975
  }
847
976
  return productData;
848
977
  }
849
- function _typeof$5(o) {
978
+ function _typeof$4(o) {
850
979
  "@babel/helpers - typeof";
851
- return _typeof$5 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
980
+ return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
852
981
  return typeof o2;
853
982
  } : function(o2) {
854
983
  return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
855
- }, _typeof$5(o);
984
+ }, _typeof$4(o);
856
985
  }
857
- function _classCallCheck$4(a, n) {
858
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
986
+ function _slicedToArray(r, e) {
987
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
859
988
  }
860
- function _defineProperties$4(e, r) {
861
- for (var t = 0; t < r.length; t++) {
862
- var o = r[t];
863
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$5(o.key), o);
864
- }
989
+ function _nonIterableRest() {
990
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
865
991
  }
866
- function _createClass$4(e, r, t) {
867
- return r && _defineProperties$4(e.prototype, r), Object.defineProperty(e, "prototype", { writable: false }), e;
992
+ function _unsupportedIterableToArray(r, a) {
993
+ if (r) {
994
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
995
+ var t = {}.toString.call(r).slice(8, -1);
996
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
997
+ }
868
998
  }
869
- function _toPropertyKey$5(t) {
870
- var i = _toPrimitive$5(t, "string");
871
- return "symbol" == _typeof$5(i) ? i : i + "";
999
+ function _arrayLikeToArray(r, a) {
1000
+ (null == a || a > r.length) && (a = r.length);
1001
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
1002
+ return n;
872
1003
  }
873
- function _toPrimitive$5(t, r) {
874
- if ("object" != _typeof$5(t) || !t) return t;
875
- var e = t[Symbol.toPrimitive];
876
- if (void 0 !== e) {
877
- var i = e.call(t, r);
878
- if ("object" != _typeof$5(i)) return i;
879
- throw new TypeError("@@toPrimitive must return a primitive value.");
1004
+ function _iterableToArrayLimit(r, l) {
1005
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
1006
+ if (null != t) {
1007
+ var e, n, i, u, a = [], f = true, o = false;
1008
+ try {
1009
+ if (i = (t = t.call(r)).next, 0 === l) ;
1010
+ else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ;
1011
+ } catch (r2) {
1012
+ o = true, n = r2;
1013
+ } finally {
1014
+ try {
1015
+ if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
1016
+ } finally {
1017
+ if (o) throw n;
1018
+ }
1019
+ }
1020
+ return a;
880
1021
  }
881
- return String(t);
882
1022
  }
883
- var EventEmitter = /* @__PURE__ */ function() {
884
- function EventEmitter2() {
885
- _classCallCheck$4(this, EventEmitter2);
886
- this.__eventStore = {};
887
- }
888
- return _createClass$4(EventEmitter2, [{
889
- key: "__addOnEvent",
890
- value: function __addOnEvent(t, e, n, o) {
891
- if (!e || !n) return;
892
- var r = this.__eventStore[e];
893
- r || (r = []), r.push({
894
- type: t,
895
- handler: n,
896
- callbackHandler: n.bind(o)
897
- }), this.__eventStore[e] = r;
898
- }
899
- }, {
900
- key: "on",
901
- value: function on(t, e) {
902
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
903
- this.__addOnEvent("normal", t, e, n);
904
- }
905
- }, {
906
- key: "once",
907
- value: function once(t, e) {
908
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this;
909
- this.__addOnEvent("once", t, e, n);
910
- }
911
- }, {
912
- key: "off",
913
- value: function off(t, e) {
914
- var n = this.__eventStore[t];
915
- n && (n = n.filter(function(t2) {
916
- return t2.handler !== e;
917
- }), this.__eventStore[t] = n);
918
- }
919
- }, {
920
- key: "emit",
921
- value: function emit(t, e) {
922
- var _this = this;
923
- var n = this.__eventStore[t];
924
- n && n.forEach(function(n2) {
925
- var o = n2.type, r = n2.handler, _ = n2.callbackHandler;
926
- "function" == typeof _ && _(e), "once" === o && _this.off(t, r);
927
- });
928
- }
929
- }, {
930
- key: "destroy",
931
- value: function destroy() {
932
- this.__eventStore = {};
933
- }
934
- }]);
935
- }();
936
- var ProductPushRule = /* @__PURE__ */ function(ProductPushRule2) {
937
- ProductPushRule2["BigCard"] = "bigCard";
938
- ProductPushRule2["SmallCard"] = "smallCard";
939
- return ProductPushRule2;
940
- }({});
941
- var ProductEvents = /* @__PURE__ */ function(ProductEvents2) {
942
- ProductEvents2["OnSaleProduct"] = "OnSaleProduct";
943
- ProductEvents2["OffSaleProduct"] = "OffSaleProduct";
944
- ProductEvents2["AddProduct"] = "AddProduct";
945
- ProductEvents2["DeleteProduct"] = "DeleteProduct";
946
- ProductEvents2["ChangeProduct"] = "ChangeProduct";
947
- ProductEvents2["MoveProduct"] = "MoveProduct";
948
- ProductEvents2["ChangeProductRank"] = "ChangeProductRank";
949
- ProductEvents2["ProductSoldOut"] = "ProductSoldOut";
950
- ProductEvents2["PushProduct"] = "PushProduct";
951
- ProductEvents2["CancelPushProduct"] = "CancelPushProduct";
952
- ProductEvents2["ProductListEnabled"] = "ProductListEnabled";
953
- ProductEvents2["RefreshProductList"] = "RefreshProductList";
954
- ProductEvents2["ProductClick"] = "ProductClick";
955
- ProductEvents2["ProductClickTimes"] = "ProductClickTimes";
956
- return ProductEvents2;
957
- }({});
958
- function _typeof$4(o) {
959
- "@babel/helpers - typeof";
960
- return _typeof$4 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
961
- return typeof o2;
962
- } : function(o2) {
963
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
964
- }, _typeof$4(o);
1023
+ function _arrayWithHoles(r) {
1024
+ if (Array.isArray(r)) return r;
965
1025
  }
966
1026
  function ownKeys$3(e, r) {
967
1027
  var t = Object.keys(e);
@@ -989,7 +1049,7 @@ function _regenerator$3() {
989
1049
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
990
1050
  function i(r2, n2, o2, i2) {
991
1051
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
992
- return _regeneratorDefine2$3(u2, "_invoke", function(r3, n3, o3) {
1052
+ return _regeneratorDefine2$3(u2, "_invoke", (function(r3, n3, o3) {
993
1053
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
994
1054
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
995
1055
  } };
@@ -1022,7 +1082,7 @@ function _regenerator$3() {
1022
1082
  }
1023
1083
  return { value: t, done: y };
1024
1084
  };
1025
- }(r2, o2, i2), true), u2;
1085
+ })(r2, o2, i2), true), u2;
1026
1086
  }
1027
1087
  var a = {};
1028
1088
  function Generator() {
@@ -1054,15 +1114,12 @@ function _regeneratorDefine2$3(e, r, n, t) {
1054
1114
  i = 0;
1055
1115
  }
1056
1116
  _regeneratorDefine2$3 = function _regeneratorDefine(e2, r2, n2, t2) {
1057
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
1058
- else {
1059
- var o = function o2(r3, n3) {
1060
- _regeneratorDefine2$3(e2, r3, function(e3) {
1061
- return this._invoke(r3, n3, e3);
1062
- });
1063
- };
1064
- o("next", 0), o("throw", 1), o("return", 2);
1117
+ function o(r3, n3) {
1118
+ _regeneratorDefine2$3(e2, r3, function(e3) {
1119
+ return this._invoke(r3, n3, e3);
1120
+ });
1065
1121
  }
1122
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
1066
1123
  }, _regeneratorDefine2$3(e, r, n, t);
1067
1124
  }
1068
1125
  function asyncGeneratorStep$3(n, t, e, r, o, a, c) {
@@ -1118,8 +1175,8 @@ function _toPrimitive$4(t, r) {
1118
1175
  return String(t);
1119
1176
  }
1120
1177
  var appName = "product";
1121
- var Product = /* @__PURE__ */ function() {
1122
- function Product2(iarCore, config) {
1178
+ var Product = /* @__PURE__ */ (function() {
1179
+ function Product2(interactionCore, config) {
1123
1180
  var _this = this;
1124
1181
  _classCallCheck$3(this, Product2);
1125
1182
  _defineProperty$4(this, "ProductType", ProductType);
@@ -1134,6 +1191,8 @@ var Product = /* @__PURE__ */ function() {
1134
1191
  _defineProperty$4(this, "ProductDeliveryType", ProductDeliveryType);
1135
1192
  _defineProperty$4(this, "ProductServiceType", ProductServiceType);
1136
1193
  _defineProperty$4(this, "ProductPushRule", ProductPushRule);
1194
+ _defineProperty$4(this, "ProductMoveOperation", ProductMoveOperation);
1195
+ _defineProperty$4(this, "ProductSortType", ProductSortType);
1137
1196
  _defineProperty$4(this, "eventEmitter", new EventEmitter());
1138
1197
  _defineProperty$4(this, "__isPushingProduct", false);
1139
1198
  _defineProperty$4(this, "__handleProductMessage", function(socketData) {
@@ -1250,12 +1309,12 @@ var Product = /* @__PURE__ */ function() {
1250
1309
  times: socketData.times
1251
1310
  });
1252
1311
  });
1253
- this.iarCore = iarCore;
1312
+ this.interactionCore = interactionCore;
1254
1313
  this.config = config;
1255
- iarCore.addSocketHandles(appName, {
1314
+ interactionCore.addSocketHandles(appName, {
1256
1315
  PRODUCT_MESSAGE: this.__handleProductMessage
1257
1316
  });
1258
- iarCore.addSocketHandles(appName, {
1317
+ interactionCore.addSocketHandles(appName, {
1259
1318
  REFRESH_PRODUCT_LIST: this.__handleRefreshProductList,
1260
1319
  PRODUCT_CLICK: this.__handleProductClickEvent,
1261
1320
  PRODUCT_CLICK_TIMES: this.__handleProductClickTimes
@@ -1278,7 +1337,7 @@ var Product = /* @__PURE__ */ function() {
1278
1337
  */
1279
1338
  }, {
1280
1339
  key: "getProductTagList",
1281
- value: function() {
1340
+ value: (function() {
1282
1341
  var _getProductTagList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee() {
1283
1342
  var _params$pageNumber, _params$pageSize;
1284
1343
  var params, pageNumber, pageSize, _args = arguments;
@@ -1288,7 +1347,7 @@ var Product = /* @__PURE__ */ function() {
1288
1347
  params = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
1289
1348
  pageNumber = (_params$pageNumber = params.pageNumber) !== null && _params$pageNumber !== void 0 ? _params$pageNumber : 1;
1290
1349
  pageSize = (_params$pageSize = params.pageSize) !== null && _params$pageSize !== void 0 ? _params$pageSize : 10;
1291
- return _context.a(2, this.iarCore.polyvApi.get(PolyvApiUrl.GetProductTagList, {
1350
+ return _context.a(2, this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductTagList, {
1292
1351
  pageNumber,
1293
1352
  pageSize
1294
1353
  }));
@@ -1299,10 +1358,10 @@ var Product = /* @__PURE__ */ function() {
1299
1358
  return _getProductTagList.apply(this, arguments);
1300
1359
  }
1301
1360
  return getProductTagList;
1302
- }()
1361
+ })()
1303
1362
  }, {
1304
1363
  key: "getProductList",
1305
- value: function() {
1364
+ value: (function() {
1306
1365
  var _getProductList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee2() {
1307
1366
  var params, _params$count, count, productList, toppingProduct, total, _params$page, page, data, _data, _args2 = arguments;
1308
1367
  return _regenerator$3().w(function(_context2) {
@@ -1318,7 +1377,7 @@ var Product = /* @__PURE__ */ function() {
1318
1377
  }
1319
1378
  _params$page = params.page, page = _params$page === void 0 ? 1 : _params$page;
1320
1379
  _context2.n = 1;
1321
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductListByTag, {
1380
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByTag, {
1322
1381
  keyword: params.keyword,
1323
1382
  tagId: params.tagId,
1324
1383
  pageNumber: page,
@@ -1332,7 +1391,7 @@ var Product = /* @__PURE__ */ function() {
1332
1391
  break;
1333
1392
  case 2:
1334
1393
  _context2.n = 3;
1335
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductListByShowId, {
1394
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByShowId, {
1336
1395
  count,
1337
1396
  showId: params.displayNumber
1338
1397
  }, {
@@ -1358,10 +1417,10 @@ var Product = /* @__PURE__ */ function() {
1358
1417
  return _getProductList.apply(this, arguments);
1359
1418
  }
1360
1419
  return getProductList;
1361
- }()
1420
+ })()
1362
1421
  }, {
1363
1422
  key: "getLaunchProductList",
1364
- value: function() {
1423
+ value: (function() {
1365
1424
  var _getLaunchProductList = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee3(params) {
1366
1425
  var _params$pageNumber2, pageNumber, _params$pageSize2, pageSize, status, keyword, data;
1367
1426
  return _regenerator$3().w(function(_context3) {
@@ -1369,7 +1428,7 @@ var Product = /* @__PURE__ */ function() {
1369
1428
  case 0:
1370
1429
  _params$pageNumber2 = params.pageNumber, pageNumber = _params$pageNumber2 === void 0 ? 1 : _params$pageNumber2, _params$pageSize2 = params.pageSize, pageSize = _params$pageSize2 === void 0 ? 10 : _params$pageSize2, status = params.status, keyword = params.keyword;
1371
1430
  _context3.n = 1;
1372
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductListByLaunch, {
1431
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductListByLaunch, {
1373
1432
  pageNumber,
1374
1433
  pageSize,
1375
1434
  status,
@@ -1395,10 +1454,10 @@ var Product = /* @__PURE__ */ function() {
1395
1454
  return _getLaunchProductList.apply(this, arguments);
1396
1455
  }
1397
1456
  return getLaunchProductList;
1398
- }()
1457
+ })()
1399
1458
  }, {
1400
1459
  key: "getProductData",
1401
- value: function() {
1460
+ value: (function() {
1402
1461
  var _getProductData = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee4(productId) {
1403
1462
  var _productData$detail;
1404
1463
  var data, productData, res;
@@ -1406,7 +1465,7 @@ var Product = /* @__PURE__ */ function() {
1406
1465
  while (1) switch (_context4.n) {
1407
1466
  case 0:
1408
1467
  _context4.n = 1;
1409
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetProductDataById, {
1468
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductDataById, {
1410
1469
  productId
1411
1470
  }, {
1412
1471
  useAESDecrypt: true
@@ -1419,7 +1478,7 @@ var Product = /* @__PURE__ */ function() {
1419
1478
  break;
1420
1479
  }
1421
1480
  _context4.n = 2;
1422
- return this.iarCore.otherApi.get(productData.detail, {});
1481
+ return this.interactionCore.otherApi.get(productData.detail, {});
1423
1482
  case 2:
1424
1483
  res = _context4.v;
1425
1484
  productData.detail = res.productDetail;
@@ -1432,10 +1491,10 @@ var Product = /* @__PURE__ */ function() {
1432
1491
  return _getProductData.apply(this, arguments);
1433
1492
  }
1434
1493
  return getProductData;
1435
- }()
1494
+ })()
1436
1495
  }, {
1437
1496
  key: "sendProductClickEvent",
1438
- value: function() {
1497
+ value: (function() {
1439
1498
  var _sendProductClickEvent = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee5(params) {
1440
1499
  var _this$config, _this$config$getProdu;
1441
1500
  var userInfo, channelInfo, productConfig;
@@ -1443,11 +1502,11 @@ var Product = /* @__PURE__ */ function() {
1443
1502
  while (1) switch (_context5.n) {
1444
1503
  case 0:
1445
1504
  _context5.n = 1;
1446
- return this.iarCore.getUserInfo();
1505
+ return this.interactionCore.getUserInfo();
1447
1506
  case 1:
1448
1507
  userInfo = _context5.v;
1449
1508
  _context5.n = 2;
1450
- return this.iarCore.getChannelInfo();
1509
+ return this.interactionCore.getChannelInfo();
1451
1510
  case 2:
1452
1511
  channelInfo = _context5.v;
1453
1512
  _context5.n = 3;
@@ -1460,7 +1519,7 @@ var Product = /* @__PURE__ */ function() {
1460
1519
  }
1461
1520
  return _context5.a(2);
1462
1521
  case 4:
1463
- this.iarCore.emitSocket({
1522
+ this.interactionCore.emitSocket({
1464
1523
  EVENT: "PRODUCT_CLICK",
1465
1524
  data: {
1466
1525
  productId: params.productId,
@@ -1479,7 +1538,7 @@ var Product = /* @__PURE__ */ function() {
1479
1538
  return _sendProductClickEvent.apply(this, arguments);
1480
1539
  }
1481
1540
  return sendProductClickEvent;
1482
- }()
1541
+ })()
1483
1542
  }, {
1484
1543
  key: "closeProductPush",
1485
1544
  value: function closeProductPush() {
@@ -1497,7 +1556,7 @@ var Product = /* @__PURE__ */ function() {
1497
1556
  */
1498
1557
  }, {
1499
1558
  key: "getProductExplainEnabled",
1500
- value: function() {
1559
+ value: (function() {
1501
1560
  var _getProductExplainEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee6() {
1502
1561
  var _this$config2, _this$config2$getProd, _productConfig$produc;
1503
1562
  var productConfig;
@@ -1516,18 +1575,18 @@ var Product = /* @__PURE__ */ function() {
1516
1575
  return _getProductExplainEnabled.apply(this, arguments);
1517
1576
  }
1518
1577
  return getProductExplainEnabled;
1519
- }()
1578
+ })()
1520
1579
  }, {
1521
1580
  key: "generateProductExplainPageUrl",
1522
- value: function() {
1581
+ value: (function() {
1523
1582
  var _generateProductExplainPageUrl = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee7(params) {
1524
1583
  var domainInfo, channelInfo, queryParams;
1525
1584
  return _regenerator$3().w(function(_context7) {
1526
1585
  while (1) switch (_context7.n) {
1527
1586
  case 0:
1528
- domainInfo = this.iarCore.getDomainInfo();
1587
+ domainInfo = this.interactionCore.getDomainInfo();
1529
1588
  _context7.n = 1;
1530
- return this.iarCore.getChannelInfo();
1589
+ return this.interactionCore.getChannelInfo();
1531
1590
  case 1:
1532
1591
  channelInfo = _context7.v;
1533
1592
  queryParams = _objectSpread$3({
@@ -1541,10 +1600,10 @@ var Product = /* @__PURE__ */ function() {
1541
1600
  return _generateProductExplainPageUrl.apply(this, arguments);
1542
1601
  }
1543
1602
  return generateProductExplainPageUrl;
1544
- }()
1603
+ })()
1545
1604
  }, {
1546
1605
  key: "getOutLinkProductRedirectEnabled",
1547
- value: function() {
1606
+ value: (function() {
1548
1607
  var _getOutLinkProductRedirectEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee8() {
1549
1608
  var _this$config3, _this$config3$getProd, _productConfig$outLin;
1550
1609
  var productConfig;
@@ -1563,10 +1622,10 @@ var Product = /* @__PURE__ */ function() {
1563
1622
  return _getOutLinkProductRedirectEnabled.apply(this, arguments);
1564
1623
  }
1565
1624
  return getOutLinkProductRedirectEnabled;
1566
- }()
1625
+ })()
1567
1626
  }, {
1568
1627
  key: "getProductPayOrderEnabled",
1569
- value: function() {
1628
+ value: (function() {
1570
1629
  var _getProductPayOrderEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee9() {
1571
1630
  var _this$config4, _this$config4$getProd, _productConfig$produc2;
1572
1631
  var productConfig;
@@ -1591,10 +1650,10 @@ var Product = /* @__PURE__ */ function() {
1591
1650
  return _getProductPayOrderEnabled.apply(this, arguments);
1592
1651
  }
1593
1652
  return getProductPayOrderEnabled;
1594
- }()
1653
+ })()
1595
1654
  }, {
1596
1655
  key: "getProductHotSaleConfig",
1597
- value: function() {
1656
+ value: (function() {
1598
1657
  var _getProductHotSaleConfig = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee0() {
1599
1658
  var _this$config5, _this$config5$getProd, _productConfig$produc3;
1600
1659
  var productConfig;
@@ -1622,7 +1681,7 @@ var Product = /* @__PURE__ */ function() {
1622
1681
  return _getProductHotSaleConfig.apply(this, arguments);
1623
1682
  }
1624
1683
  return getProductHotSaleConfig;
1625
- }()
1684
+ })()
1626
1685
  }, {
1627
1686
  key: "getCurrentPushingProductId",
1628
1687
  value: function getCurrentPushingProductId() {
@@ -1630,6 +1689,7 @@ var Product = /* @__PURE__ */ function() {
1630
1689
  }
1631
1690
  /**
1632
1691
  * 获取当前推送中的商品数据
1692
+ * @param productId 可选,指定商品ID,如果不提供则获取当前配置中的推送商品
1633
1693
  * @example
1634
1694
  * ```js
1635
1695
  * const productData = await productTarget.getCurrentPushingProduct();
@@ -1638,7 +1698,7 @@ var Product = /* @__PURE__ */ function() {
1638
1698
  */
1639
1699
  }, {
1640
1700
  key: "getCurrentPushingProduct",
1641
- value: function() {
1701
+ value: (function() {
1642
1702
  var _getCurrentPushingProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee1(productId) {
1643
1703
  var _this$config6, _this$config6$getProd;
1644
1704
  var productConfig, pid, pushRule, _productConfig$channe, _productConfig$channe2, result;
@@ -1676,21 +1736,21 @@ var Product = /* @__PURE__ */ function() {
1676
1736
  return _getCurrentPushingProduct.apply(this, arguments);
1677
1737
  }
1678
1738
  return getCurrentPushingProduct;
1679
- }()
1739
+ })()
1680
1740
  }, {
1681
1741
  key: "_explainProduct",
1682
- value: function() {
1742
+ value: (function() {
1683
1743
  var _explainProduct2 = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee10(productId, recordType) {
1684
1744
  var channelInfo, data, apiPath, _t;
1685
1745
  return _regenerator$3().w(function(_context10) {
1686
1746
  while (1) switch (_context10.n) {
1687
1747
  case 0:
1688
1748
  _context10.n = 1;
1689
- return this.iarCore.getChannelInfo();
1749
+ return this.interactionCore.getChannelInfo();
1690
1750
  case 1:
1691
1751
  channelInfo = _context10.v;
1692
1752
  data = {
1693
- sessionId: channelInfo.sessionId,
1753
+ sessionId: channelInfo.sessionId || "",
1694
1754
  productId
1695
1755
  };
1696
1756
  _t = recordType;
@@ -1707,7 +1767,7 @@ var Product = /* @__PURE__ */ function() {
1707
1767
  data.recordType = recordType;
1708
1768
  return _context10.a(3, 5);
1709
1769
  case 5:
1710
- return _context10.a(2, this.iarCore.polyvApi.post(apiPath, {
1770
+ return _context10.a(2, this.interactionCore.polyvApi.post(apiPath, {
1711
1771
  data
1712
1772
  }));
1713
1773
  }
@@ -1717,7 +1777,7 @@ var Product = /* @__PURE__ */ function() {
1717
1777
  return _explainProduct2.apply(this, arguments);
1718
1778
  }
1719
1779
  return _explainProduct;
1720
- }()
1780
+ })()
1721
1781
  /**
1722
1782
  * 开始商品讲解
1723
1783
  * @param productId 商品 id
@@ -1767,13 +1827,15 @@ var Product = /* @__PURE__ */ function() {
1767
1827
  */
1768
1828
  }, {
1769
1829
  key: "deleteExplain",
1770
- value: function() {
1830
+ value: (function() {
1771
1831
  var _deleteExplain = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee11(productId) {
1772
1832
  return _regenerator$3().w(function(_context11) {
1773
1833
  while (1) switch (_context11.n) {
1774
1834
  case 0:
1775
- return _context11.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.DeleteProductExplain, {
1776
- productId
1835
+ return _context11.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.DeleteProductExplain, {
1836
+ data: {
1837
+ productId
1838
+ }
1777
1839
  }));
1778
1840
  }
1779
1841
  }, _callee11, this);
@@ -1782,231 +1844,436 @@ var Product = /* @__PURE__ */ function() {
1782
1844
  return _deleteExplain.apply(this, arguments);
1783
1845
  }
1784
1846
  return deleteExplain;
1785
- }()
1847
+ })()
1786
1848
  }, {
1787
- key: "openProductPrice",
1788
- value: function() {
1789
- var _openProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee12(productId) {
1849
+ key: "getCurrentProductExplain",
1850
+ value: (function() {
1851
+ var _getCurrentProductExplain = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee12() {
1852
+ var explainingId;
1790
1853
  return _regenerator$3().w(function(_context12) {
1791
1854
  while (1) switch (_context12.n) {
1792
1855
  case 0:
1793
- return _context12.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.OpenProductPrice, {
1856
+ _context12.n = 1;
1857
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetCurrentProductExplain, {});
1858
+ case 1:
1859
+ explainingId = _context12.v;
1860
+ return _context12.a(2, explainingId);
1861
+ }
1862
+ }, _callee12, this);
1863
+ }));
1864
+ function getCurrentProductExplain() {
1865
+ return _getCurrentProductExplain.apply(this, arguments);
1866
+ }
1867
+ return getCurrentProductExplain;
1868
+ })()
1869
+ }, {
1870
+ key: "openProductPrice",
1871
+ value: (function() {
1872
+ var _openProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee13(productId) {
1873
+ return _regenerator$3().w(function(_context13) {
1874
+ while (1) switch (_context13.n) {
1875
+ case 0:
1876
+ return _context13.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.OpenProductPrice, {
1794
1877
  productId
1795
1878
  }));
1796
1879
  }
1797
- }, _callee12, this);
1880
+ }, _callee13, this);
1798
1881
  }));
1799
1882
  function openProductPrice(_x9) {
1800
1883
  return _openProductPrice.apply(this, arguments);
1801
1884
  }
1802
1885
  return openProductPrice;
1803
- }()
1886
+ })()
1804
1887
  }, {
1805
1888
  key: "hideProductPrice",
1806
- value: function() {
1807
- var _hideProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee13(productId) {
1808
- return _regenerator$3().w(function(_context13) {
1809
- while (1) switch (_context13.n) {
1889
+ value: (function() {
1890
+ var _hideProductPrice = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee14(productId) {
1891
+ return _regenerator$3().w(function(_context14) {
1892
+ while (1) switch (_context14.n) {
1810
1893
  case 0:
1811
- return _context13.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.HideProductPrice, {
1894
+ return _context14.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.HideProductPrice, {
1812
1895
  productId
1813
1896
  }));
1814
1897
  }
1815
- }, _callee13, this);
1898
+ }, _callee14, this);
1816
1899
  }));
1817
1900
  function hideProductPrice(_x0) {
1818
1901
  return _hideProductPrice.apply(this, arguments);
1819
1902
  }
1820
1903
  return hideProductPrice;
1821
- }()
1904
+ })()
1822
1905
  }, {
1823
1906
  key: "getProductSetting",
1824
- value: function() {
1825
- var _getProductSetting = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee14() {
1907
+ value: (function() {
1908
+ var _getProductSetting = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee15() {
1826
1909
  var data;
1827
- return _regenerator$3().w(function(_context14) {
1828
- while (1) switch (_context14.n) {
1910
+ return _regenerator$3().w(function(_context15) {
1911
+ while (1) switch (_context15.n) {
1829
1912
  case 0:
1830
- _context14.n = 1;
1831
- return this.iarCore.polyvApi.get(PolyvApiUrl.ProductPushRule, {});
1913
+ _context15.n = 1;
1914
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.ProductPushRule, {});
1832
1915
  case 1:
1833
- data = _context14.v;
1834
- return _context14.a(2, {
1916
+ data = _context15.v;
1917
+ return _context15.a(2, {
1835
1918
  pushingProduct: data.channelProductPushingStatusVO,
1836
1919
  productPushRule: data.productPushRule,
1837
1920
  productExplainEnabled: ynToBool(data.productExplainEnabled, "N"),
1838
- productExplainingAutoPushAndSticky: ynToBool(data.productExplainingAutoPushAndSticky, "N")
1921
+ productExplainingAutoPushAndSticky: ynToBool(data.productExplainingAutoPushAndSticky, "N"),
1922
+ hideProductPriceEnabled: ynToBool(data.hideProductPriceEnabled, "N"),
1923
+ productListSortType: data.productListSortType
1839
1924
  });
1840
1925
  }
1841
- }, _callee14, this);
1926
+ }, _callee15, this);
1842
1927
  }));
1843
1928
  function getProductSetting() {
1844
1929
  return _getProductSetting.apply(this, arguments);
1845
1930
  }
1846
1931
  return getProductSetting;
1847
- }()
1932
+ })()
1933
+ }, {
1934
+ key: "updateProductSetting",
1935
+ value: (function() {
1936
+ var _updateProductSetting = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee16(params) {
1937
+ var booleanFields, payload;
1938
+ return _regenerator$3().w(function(_context16) {
1939
+ while (1) switch (_context16.n) {
1940
+ case 0:
1941
+ booleanFields = ["productExplainEnabled", "productExplainingAutoPushAndSticky", "hideProductPriceEnabled"];
1942
+ payload = Object.entries(params).reduce(function(acc, _ref) {
1943
+ var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], value = _ref2[1];
1944
+ if (value === void 0) return acc;
1945
+ var fieldKey = key;
1946
+ if (booleanFields.includes(fieldKey) && typeof value === "boolean") {
1947
+ acc[key] = boolToYN(value);
1948
+ } else {
1949
+ acc[key] = value;
1950
+ }
1951
+ return acc;
1952
+ }, {});
1953
+ return _context16.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.UpdateProductPushRule, payload));
1954
+ }
1955
+ }, _callee16, this);
1956
+ }));
1957
+ function updateProductSetting(_x1) {
1958
+ return _updateProductSetting.apply(this, arguments);
1959
+ }
1960
+ return updateProductSetting;
1961
+ })()
1848
1962
  }, {
1849
1963
  key: "pushProduct",
1850
- value: function() {
1851
- var _pushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee15(productId, rule) {
1852
- return _regenerator$3().w(function(_context15) {
1853
- while (1) switch (_context15.n) {
1964
+ value: (function() {
1965
+ var _pushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee17(productId, rule) {
1966
+ return _regenerator$3().w(function(_context17) {
1967
+ while (1) switch (_context17.n) {
1854
1968
  case 0:
1855
- return _context15.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.PushProduct, {
1969
+ return _context17.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.PushProduct, {
1856
1970
  productId,
1857
1971
  productPushRule: rule || ProductPushRule.SmallCard
1858
1972
  }));
1859
1973
  }
1860
- }, _callee15, this);
1974
+ }, _callee17, this);
1861
1975
  }));
1862
- function pushProduct(_x1, _x10) {
1976
+ function pushProduct(_x10, _x11) {
1863
1977
  return _pushProduct.apply(this, arguments);
1864
1978
  }
1865
1979
  return pushProduct;
1866
- }()
1980
+ })()
1867
1981
  }, {
1868
1982
  key: "cancelPushProduct",
1869
- value: function() {
1870
- var _cancelPushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee16(productId) {
1871
- return _regenerator$3().w(function(_context16) {
1872
- while (1) switch (_context16.n) {
1983
+ value: (function() {
1984
+ var _cancelPushProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee18(productId) {
1985
+ return _regenerator$3().w(function(_context18) {
1986
+ while (1) switch (_context18.n) {
1873
1987
  case 0:
1874
- return _context16.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.CancelPushProduct, {
1988
+ return _context18.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.CancelPushProduct, {
1875
1989
  productId
1876
1990
  }));
1877
1991
  }
1878
- }, _callee16, this);
1992
+ }, _callee18, this);
1879
1993
  }));
1880
- function cancelPushProduct(_x11) {
1994
+ function cancelPushProduct(_x12) {
1881
1995
  return _cancelPushProduct.apply(this, arguments);
1882
1996
  }
1883
1997
  return cancelPushProduct;
1884
- }()
1998
+ })()
1885
1999
  }, {
1886
2000
  key: "batchDeleteProduct",
1887
- value: function() {
1888
- var _batchDeleteProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee17(productIds) {
1889
- return _regenerator$3().w(function(_context17) {
1890
- while (1) switch (_context17.n) {
2001
+ value: (function() {
2002
+ var _batchDeleteProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee19(productIds) {
2003
+ return _regenerator$3().w(function(_context19) {
2004
+ while (1) switch (_context19.n) {
1891
2005
  case 0:
1892
- return _context17.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.BatchDeleteProduct, {
2006
+ return _context19.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchDeleteProduct, {
1893
2007
  productIds
1894
2008
  }));
1895
2009
  }
1896
- }, _callee17, this);
2010
+ }, _callee19, this);
1897
2011
  }));
1898
- function batchDeleteProduct(_x12) {
2012
+ function batchDeleteProduct(_x13) {
1899
2013
  return _batchDeleteProduct.apply(this, arguments);
1900
2014
  }
1901
2015
  return batchDeleteProduct;
1902
- }()
2016
+ })()
1903
2017
  }, {
1904
2018
  key: "batchOnShelfProduct",
1905
- value: function() {
1906
- var _batchOnShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee18(productIds) {
1907
- return _regenerator$3().w(function(_context18) {
1908
- while (1) switch (_context18.n) {
2019
+ value: (function() {
2020
+ var _batchOnShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee20(productIds) {
2021
+ return _regenerator$3().w(function(_context20) {
2022
+ while (1) switch (_context20.n) {
1909
2023
  case 0:
1910
- return _context18.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
2024
+ return _context20.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
1911
2025
  productIds,
1912
2026
  status: ProductStatus.OnSale
1913
2027
  }));
1914
2028
  }
1915
- }, _callee18, this);
2029
+ }, _callee20, this);
1916
2030
  }));
1917
- function batchOnShelfProduct(_x13) {
2031
+ function batchOnShelfProduct(_x14) {
1918
2032
  return _batchOnShelfProduct.apply(this, arguments);
1919
2033
  }
1920
2034
  return batchOnShelfProduct;
1921
- }()
2035
+ })()
1922
2036
  }, {
1923
2037
  key: "batchOffShelfProduct",
1924
- value: function() {
1925
- var _batchOffShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee19(productIds) {
1926
- return _regenerator$3().w(function(_context19) {
1927
- while (1) switch (_context19.n) {
2038
+ value: (function() {
2039
+ var _batchOffShelfProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee21(productIds) {
2040
+ return _regenerator$3().w(function(_context21) {
2041
+ while (1) switch (_context21.n) {
1928
2042
  case 0:
1929
- return _context19.a(2, this.iarCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
2043
+ return _context21.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.BatchShelfProduct, {
1930
2044
  productIds,
1931
2045
  status: ProductStatus.OffSale
1932
2046
  }));
1933
2047
  }
1934
- }, _callee19, this);
2048
+ }, _callee21, this);
1935
2049
  }));
1936
- function batchOffShelfProduct(_x14) {
2050
+ function batchOffShelfProduct(_x15) {
1937
2051
  return _batchOffShelfProduct.apply(this, arguments);
1938
2052
  }
1939
2053
  return batchOffShelfProduct;
1940
- }()
2054
+ })()
2055
+ }, {
2056
+ key: "topProduct",
2057
+ value: (function() {
2058
+ var _topProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee22(productId) {
2059
+ return _regenerator$3().w(function(_context22) {
2060
+ while (1) switch (_context22.n) {
2061
+ case 0:
2062
+ return _context22.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.TopProduct, {
2063
+ productId
2064
+ }));
2065
+ }
2066
+ }, _callee22, this);
2067
+ }));
2068
+ function topProduct(_x16) {
2069
+ return _topProduct.apply(this, arguments);
2070
+ }
2071
+ return topProduct;
2072
+ })()
2073
+ }, {
2074
+ key: "cancelTopProduct",
2075
+ value: (function() {
2076
+ var _cancelTopProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee23(productId) {
2077
+ return _regenerator$3().w(function(_context23) {
2078
+ while (1) switch (_context23.n) {
2079
+ case 0:
2080
+ return _context23.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.CancelTopProduct, {
2081
+ productId
2082
+ }));
2083
+ }
2084
+ }, _callee23, this);
2085
+ }));
2086
+ function cancelTopProduct(_x17) {
2087
+ return _cancelTopProduct.apply(this, arguments);
2088
+ }
2089
+ return cancelTopProduct;
2090
+ })()
2091
+ }, {
2092
+ key: "setProductSoldOut",
2093
+ value: (function() {
2094
+ var _setProductSoldOut = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee24(productId) {
2095
+ return _regenerator$3().w(function(_context24) {
2096
+ while (1) switch (_context24.n) {
2097
+ case 0:
2098
+ return _context24.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.ToggleProductSoldOut, {
2099
+ productId,
2100
+ markAsSoldout: "Y"
2101
+ }));
2102
+ }
2103
+ }, _callee24, this);
2104
+ }));
2105
+ function setProductSoldOut(_x18) {
2106
+ return _setProductSoldOut.apply(this, arguments);
2107
+ }
2108
+ return setProductSoldOut;
2109
+ })()
2110
+ }, {
2111
+ key: "cancelProductSoldOut",
2112
+ value: (function() {
2113
+ var _cancelProductSoldOut = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee25(productId) {
2114
+ return _regenerator$3().w(function(_context25) {
2115
+ while (1) switch (_context25.n) {
2116
+ case 0:
2117
+ return _context25.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.ToggleProductSoldOut, {
2118
+ productId,
2119
+ markAsSoldout: "N"
2120
+ }));
2121
+ }
2122
+ }, _callee25, this);
2123
+ }));
2124
+ function cancelProductSoldOut(_x19) {
2125
+ return _cancelProductSoldOut.apply(this, arguments);
2126
+ }
2127
+ return cancelProductSoldOut;
2128
+ })()
2129
+ }, {
2130
+ key: "getProductEnabled",
2131
+ value: (function() {
2132
+ var _getProductEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee26() {
2133
+ var enabled;
2134
+ return _regenerator$3().w(function(_context26) {
2135
+ while (1) switch (_context26.n) {
2136
+ case 0:
2137
+ _context26.n = 1;
2138
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetProductEnabled, {});
2139
+ case 1:
2140
+ enabled = _context26.v;
2141
+ return _context26.a(2, ynToBool(enabled, "N"));
2142
+ }
2143
+ }, _callee26, this);
2144
+ }));
2145
+ function getProductEnabled() {
2146
+ return _getProductEnabled.apply(this, arguments);
2147
+ }
2148
+ return getProductEnabled;
2149
+ })()
2150
+ }, {
2151
+ key: "updateProductEnabled",
2152
+ value: (function() {
2153
+ var _updateProductEnabled = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee27(enabled) {
2154
+ return _regenerator$3().w(function(_context27) {
2155
+ while (1) switch (_context27.n) {
2156
+ case 0:
2157
+ _context27.n = 1;
2158
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.UpdateProductEnabled, {
2159
+ enabled: boolToYN(enabled)
2160
+ });
2161
+ case 1:
2162
+ return _context27.a(2);
2163
+ }
2164
+ }, _callee27, this);
2165
+ }));
2166
+ function updateProductEnabled(_x20) {
2167
+ return _updateProductEnabled.apply(this, arguments);
2168
+ }
2169
+ return updateProductEnabled;
2170
+ })()
2171
+ }, {
2172
+ key: "updateProductSort",
2173
+ value: (function() {
2174
+ var _updateProductSort = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee28(params) {
2175
+ return _regenerator$3().w(function(_context28) {
2176
+ while (1) switch (_context28.n) {
2177
+ case 0:
2178
+ return _context28.a(2, this.interactionCore.polyvApi.post(concat(PolyvApiUrl.UpdateProductSort, params), {}));
2179
+ }
2180
+ }, _callee28, this);
2181
+ }));
2182
+ function updateProductSort(_x21) {
2183
+ return _updateProductSort.apply(this, arguments);
2184
+ }
2185
+ return updateProductSort;
2186
+ })()
2187
+ }, {
2188
+ key: "moveProduct",
2189
+ value: (function() {
2190
+ var _moveProduct = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee29(productId, operation) {
2191
+ var type;
2192
+ return _regenerator$3().w(function(_context29) {
2193
+ while (1) switch (_context29.n) {
2194
+ case 0:
2195
+ type = operation === ProductMoveOperation.MoveUp ? 10 : 20;
2196
+ return _context29.a(2, this.interactionCore.polyvApi.post(PolyvApiUrl.MoveProduct, {
2197
+ productId,
2198
+ type
2199
+ }));
2200
+ }
2201
+ }, _callee29, this);
2202
+ }));
2203
+ function moveProduct(_x22, _x23) {
2204
+ return _moveProduct.apply(this, arguments);
2205
+ }
2206
+ return moveProduct;
2207
+ })()
1941
2208
  }, {
1942
2209
  key: "getSupportToDirectBuy",
1943
- value: function() {
1944
- var _getSupportToDirectBuy = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee20() {
2210
+ value: (function() {
2211
+ var _getSupportToDirectBuy = _asyncToGenerator$3(/* @__PURE__ */ _regenerator$3().m(function _callee30() {
1945
2212
  var _this$config7, _this$config7$getProd;
1946
2213
  var userInfo, productConfig, authType, notSupportAuthTypes;
1947
- return _regenerator$3().w(function(_context20) {
1948
- while (1) switch (_context20.n) {
2214
+ return _regenerator$3().w(function(_context30) {
2215
+ while (1) switch (_context30.n) {
1949
2216
  case 0:
1950
- _context20.n = 1;
2217
+ _context30.n = 1;
1951
2218
  return this.getProductPayOrderEnabled();
1952
2219
  case 1:
1953
- if (_context20.v) {
1954
- _context20.n = 2;
2220
+ if (_context30.v) {
2221
+ _context30.n = 2;
1955
2222
  break;
1956
2223
  }
1957
- return _context20.a(2, false);
2224
+ return _context30.a(2, false);
1958
2225
  case 2:
1959
- _context20.n = 3;
1960
- return this.iarCore.getUserInfo();
2226
+ _context30.n = 3;
2227
+ return this.interactionCore.getUserInfo();
1961
2228
  case 3:
1962
- userInfo = _context20.v;
2229
+ userInfo = _context30.v;
1963
2230
  if (userInfo.unionId) {
1964
- _context20.n = 4;
2231
+ _context30.n = 4;
1965
2232
  break;
1966
2233
  }
1967
- return _context20.a(2, false);
2234
+ return _context30.a(2, false);
1968
2235
  case 4:
1969
- _context20.n = 5;
2236
+ _context30.n = 5;
1970
2237
  return (_this$config7 = this.config) === null || _this$config7 === void 0 || (_this$config7$getProd = _this$config7.getProductConfig) === null || _this$config7$getProd === void 0 ? void 0 : _this$config7$getProd.call(_this$config7);
1971
2238
  case 5:
1972
- productConfig = _context20.v;
2239
+ productConfig = _context30.v;
1973
2240
  if (productConfig !== null && productConfig !== void 0 && productConfig.directBuyEnabled) {
1974
- _context20.n = 6;
2241
+ _context30.n = 6;
1975
2242
  break;
1976
2243
  }
1977
- return _context20.a(2, false);
2244
+ return _context30.a(2, false);
1978
2245
  case 6:
1979
2246
  authType = userInfo.authType;
1980
2247
  if (!(!authType || authType === AuthType.None)) {
1981
- _context20.n = 7;
2248
+ _context30.n = 7;
1982
2249
  break;
1983
2250
  }
1984
- return _context20.a(2, true);
2251
+ return _context30.a(2, true);
1985
2252
  case 7:
1986
2253
  notSupportAuthTypes = [AuthType.Custom, AuthType.External, AuthType.Direct, AuthType.EnterpriseWeChat];
1987
2254
  if (!notSupportAuthTypes.includes(authType)) {
1988
- _context20.n = 8;
2255
+ _context30.n = 8;
1989
2256
  break;
1990
2257
  }
1991
- return _context20.a(2, false);
2258
+ return _context30.a(2, false);
1992
2259
  case 8:
1993
- return _context20.a(2, true);
2260
+ return _context30.a(2, true);
1994
2261
  }
1995
- }, _callee20, this);
2262
+ }, _callee30, this);
1996
2263
  }));
1997
2264
  function getSupportToDirectBuy() {
1998
2265
  return _getSupportToDirectBuy.apply(this, arguments);
1999
2266
  }
2000
2267
  return getSupportToDirectBuy;
2001
- }()
2268
+ })()
2002
2269
  }]);
2003
- }();
2004
- var PaymentProvider = /* @__PURE__ */ function(PaymentProvider2) {
2270
+ })();
2271
+ var PaymentProvider = /* @__PURE__ */ (function(PaymentProvider2) {
2005
2272
  PaymentProvider2["Wechat"] = "WECHAT";
2006
2273
  PaymentProvider2["Alipay"] = "ALIPAY";
2007
2274
  return PaymentProvider2;
2008
- }({});
2009
- var OrderStatus = /* @__PURE__ */ function(OrderStatus2) {
2275
+ })({});
2276
+ var OrderStatus = /* @__PURE__ */ (function(OrderStatus2) {
2010
2277
  OrderStatus2["WaitPay"] = "wait_pay";
2011
2278
  OrderStatus2["WaitDelivery"] = "wait_delivery";
2012
2279
  OrderStatus2["Delivering"] = "delivering";
@@ -2015,27 +2282,27 @@ var OrderStatus = /* @__PURE__ */ function(OrderStatus2) {
2015
2282
  OrderStatus2["Refunding"] = "refunding";
2016
2283
  OrderStatus2["Refunded"] = "refunded";
2017
2284
  return OrderStatus2;
2018
- }({});
2019
- var PayStatus = /* @__PURE__ */ function(PayStatus2) {
2285
+ })({});
2286
+ var PayStatus = /* @__PURE__ */ (function(PayStatus2) {
2020
2287
  PayStatus2["WaitPay"] = "wait_pay";
2021
2288
  PayStatus2["Payed"] = "payed";
2022
2289
  PayStatus2["Free"] = "free";
2023
2290
  return PayStatus2;
2024
- }({});
2025
- var RefundStatus = /* @__PURE__ */ function(RefundStatus2) {
2291
+ })({});
2292
+ var RefundStatus = /* @__PURE__ */ (function(RefundStatus2) {
2026
2293
  RefundStatus2["Success"] = "SUCCESS";
2027
2294
  RefundStatus2["Fail"] = "FAIL";
2028
2295
  RefundStatus2["Processing"] = "PROCESSING";
2029
2296
  return RefundStatus2;
2030
- }({});
2031
- var CreateOrderFailReason = /* @__PURE__ */ function(CreateOrderFailReason2) {
2297
+ })({});
2298
+ var CreateOrderFailReason = /* @__PURE__ */ (function(CreateOrderFailReason2) {
2032
2299
  CreateOrderFailReason2["Unknown"] = "unknown";
2033
2300
  return CreateOrderFailReason2;
2034
- }({});
2035
- var OrderRefundFailReason = /* @__PURE__ */ function(OrderRefundFailReason2) {
2301
+ })({});
2302
+ var OrderRefundFailReason = /* @__PURE__ */ (function(OrderRefundFailReason2) {
2036
2303
  OrderRefundFailReason2["Unknown"] = "unknown";
2037
2304
  return OrderRefundFailReason2;
2038
- }({});
2305
+ })({});
2039
2306
  function _typeof$3(o) {
2040
2307
  "@babel/helpers - typeof";
2041
2308
  return _typeof$3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -2253,7 +2520,7 @@ function _regenerator$2() {
2253
2520
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
2254
2521
  function i(r2, n2, o2, i2) {
2255
2522
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
2256
- return _regeneratorDefine2$2(u2, "_invoke", function(r3, n3, o3) {
2523
+ return _regeneratorDefine2$2(u2, "_invoke", (function(r3, n3, o3) {
2257
2524
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
2258
2525
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
2259
2526
  } };
@@ -2286,7 +2553,7 @@ function _regenerator$2() {
2286
2553
  }
2287
2554
  return { value: t, done: y };
2288
2555
  };
2289
- }(r2, o2, i2), true), u2;
2556
+ })(r2, o2, i2), true), u2;
2290
2557
  }
2291
2558
  var a = {};
2292
2559
  function Generator() {
@@ -2318,15 +2585,12 @@ function _regeneratorDefine2$2(e, r, n, t) {
2318
2585
  i = 0;
2319
2586
  }
2320
2587
  _regeneratorDefine2$2 = function _regeneratorDefine(e2, r2, n2, t2) {
2321
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
2322
- else {
2323
- var o = function o2(r3, n3) {
2324
- _regeneratorDefine2$2(e2, r3, function(e3) {
2325
- return this._invoke(r3, n3, e3);
2326
- });
2327
- };
2328
- o("next", 0), o("throw", 1), o("return", 2);
2588
+ function o(r3, n3) {
2589
+ _regeneratorDefine2$2(e2, r3, function(e3) {
2590
+ return this._invoke(r3, n3, e3);
2591
+ });
2329
2592
  }
2593
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
2330
2594
  }, _regeneratorDefine2$2(e, r, n, t);
2331
2595
  }
2332
2596
  function asyncGeneratorStep$2(n, t, e, r, o, a, c) {
@@ -2381,8 +2645,8 @@ function _toPrimitive$2(t, r) {
2381
2645
  }
2382
2646
  return String(t);
2383
2647
  }
2384
- var Order = /* @__PURE__ */ function() {
2385
- function Order2(iarCore, config) {
2648
+ var Order = /* @__PURE__ */ (function() {
2649
+ function Order2(interactionCore, config) {
2386
2650
  _classCallCheck$2(this, Order2);
2387
2651
  _defineProperty$2(this, "OrderStatus", OrderStatus);
2388
2652
  _defineProperty$2(this, "PayStatus", PayStatus);
@@ -2393,12 +2657,12 @@ var Order = /* @__PURE__ */ function() {
2393
2657
  _defineProperty$2(this, "RefundStatus", RefundStatus);
2394
2658
  _defineProperty$2(this, "CreateOrderFailReason", CreateOrderFailReason);
2395
2659
  _defineProperty$2(this, "OrderRefundFailReason", OrderRefundFailReason);
2396
- this.iarCore = iarCore;
2660
+ this.interactionCore = interactionCore;
2397
2661
  this.config = config;
2398
2662
  }
2399
2663
  return _createClass$2(Order2, [{
2400
2664
  key: "getOrderList",
2401
- value: function() {
2665
+ value: (function() {
2402
2666
  var _getOrderList = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee() {
2403
2667
  var params, _params$pageNumber, pageNumber, _params$pageSize, pageSize, orderStatus, res, _args = arguments;
2404
2668
  return _regenerator$2().w(function(_context) {
@@ -2407,7 +2671,7 @@ var Order = /* @__PURE__ */ function() {
2407
2671
  params = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
2408
2672
  _params$pageNumber = params.pageNumber, pageNumber = _params$pageNumber === void 0 ? 1 : _params$pageNumber, _params$pageSize = params.pageSize, pageSize = _params$pageSize === void 0 ? 10 : _params$pageSize, orderStatus = params.orderStatus;
2409
2673
  _context.n = 1;
2410
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderList, {
2674
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderList, {
2411
2675
  pageNumber,
2412
2676
  pageSize,
2413
2677
  orderStatus
@@ -2428,17 +2692,17 @@ var Order = /* @__PURE__ */ function() {
2428
2692
  return _getOrderList.apply(this, arguments);
2429
2693
  }
2430
2694
  return getOrderList;
2431
- }()
2695
+ })()
2432
2696
  }, {
2433
2697
  key: "getOrderDetail",
2434
- value: function() {
2698
+ value: (function() {
2435
2699
  var _getOrderDetail = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee2(params) {
2436
2700
  var internalDetail;
2437
2701
  return _regenerator$2().w(function(_context2) {
2438
2702
  while (1) switch (_context2.n) {
2439
2703
  case 0:
2440
2704
  _context2.n = 1;
2441
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderDetail, {
2705
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderDetail, {
2442
2706
  orderNo: params.orderNo,
2443
2707
  syncPayStatus: boolToYN(params.syncPayStatus)
2444
2708
  });
@@ -2452,18 +2716,18 @@ var Order = /* @__PURE__ */ function() {
2452
2716
  return _getOrderDetail.apply(this, arguments);
2453
2717
  }
2454
2718
  return getOrderDetail;
2455
- }()
2719
+ })()
2456
2720
  }, {
2457
2721
  key: "createOrder",
2458
- value: function() {
2722
+ value: (function() {
2459
2723
  var _createOrder = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee3(params) {
2460
2724
  var res, _t;
2461
2725
  return _regenerator$2().w(function(_context3) {
2462
- while (1) switch (_context3.n) {
2726
+ while (1) switch (_context3.p = _context3.n) {
2463
2727
  case 0:
2464
2728
  _context3.p = 0;
2465
2729
  _context3.n = 1;
2466
- return this.iarCore.polyvApi.post(PolyvApiUrl.CreateOrder, params);
2730
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.CreateOrder, params);
2467
2731
  case 1:
2468
2732
  res = _context3.v;
2469
2733
  return _context3.a(2, _objectSpread$1({
@@ -2484,15 +2748,15 @@ var Order = /* @__PURE__ */ function() {
2484
2748
  return _createOrder.apply(this, arguments);
2485
2749
  }
2486
2750
  return createOrder;
2487
- }()
2751
+ })()
2488
2752
  }, {
2489
2753
  key: "confirmOrder",
2490
- value: function() {
2754
+ value: (function() {
2491
2755
  var _confirmOrder = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee4(orderNo) {
2492
2756
  return _regenerator$2().w(function(_context4) {
2493
2757
  while (1) switch (_context4.n) {
2494
2758
  case 0:
2495
- return _context4.a(2, this.iarCore.polyvApi.post(concat(PolyvApiUrl.ConfirmOrder, {
2759
+ return _context4.a(2, this.interactionCore.polyvApi.post(concat(PolyvApiUrl.ConfirmOrder, {
2496
2760
  orderNo
2497
2761
  }), {}));
2498
2762
  }
@@ -2502,18 +2766,18 @@ var Order = /* @__PURE__ */ function() {
2502
2766
  return _confirmOrder.apply(this, arguments);
2503
2767
  }
2504
2768
  return confirmOrder;
2505
- }()
2769
+ })()
2506
2770
  }, {
2507
2771
  key: "applyOrderRefund",
2508
- value: function() {
2772
+ value: (function() {
2509
2773
  var _applyOrderRefund = _asyncToGenerator$2(/* @__PURE__ */ _regenerator$2().m(function _callee5(orderNo) {
2510
2774
  var res, _t2;
2511
2775
  return _regenerator$2().w(function(_context5) {
2512
- while (1) switch (_context5.n) {
2776
+ while (1) switch (_context5.p = _context5.n) {
2513
2777
  case 0:
2514
2778
  _context5.p = 0;
2515
2779
  _context5.n = 1;
2516
- return this.iarCore.polyvApi.post(PolyvApiUrl.ApplyOrderRefund, {
2780
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.ApplyOrderRefund, {
2517
2781
  orderNo
2518
2782
  });
2519
2783
  case 1:
@@ -2536,9 +2800,9 @@ var Order = /* @__PURE__ */ function() {
2536
2800
  return _applyOrderRefund.apply(this, arguments);
2537
2801
  }
2538
2802
  return applyOrderRefund;
2539
- }()
2803
+ })()
2540
2804
  }]);
2541
- }();
2805
+ })();
2542
2806
  function mapInternalAddressToAddressData(data) {
2543
2807
  if (!data) {
2544
2808
  return {
@@ -2570,7 +2834,7 @@ function _regenerator$1() {
2570
2834
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
2571
2835
  function i(r2, n2, o2, i2) {
2572
2836
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
2573
- return _regeneratorDefine2$1(u2, "_invoke", function(r3, n3, o3) {
2837
+ return _regeneratorDefine2$1(u2, "_invoke", (function(r3, n3, o3) {
2574
2838
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
2575
2839
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
2576
2840
  } };
@@ -2603,7 +2867,7 @@ function _regenerator$1() {
2603
2867
  }
2604
2868
  return { value: t, done: y };
2605
2869
  };
2606
- }(r2, o2, i2), true), u2;
2870
+ })(r2, o2, i2), true), u2;
2607
2871
  }
2608
2872
  var a = {};
2609
2873
  function Generator() {
@@ -2635,15 +2899,12 @@ function _regeneratorDefine2$1(e, r, n, t) {
2635
2899
  i = 0;
2636
2900
  }
2637
2901
  _regeneratorDefine2$1 = function _regeneratorDefine(e2, r2, n2, t2) {
2638
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
2639
- else {
2640
- var o = function o2(r3, n3) {
2641
- _regeneratorDefine2$1(e2, r3, function(e3) {
2642
- return this._invoke(r3, n3, e3);
2643
- });
2644
- };
2645
- o("next", 0), o("throw", 1), o("return", 2);
2902
+ function o(r3, n3) {
2903
+ _regeneratorDefine2$1(e2, r3, function(e3) {
2904
+ return this._invoke(r3, n3, e3);
2905
+ });
2646
2906
  }
2907
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
2647
2908
  }, _regeneratorDefine2$1(e, r, n, t);
2648
2909
  }
2649
2910
  function ownKeys(e, r) {
@@ -2719,15 +2980,15 @@ function _toPrimitive$1(t, r) {
2719
2980
  }
2720
2981
  return String(t);
2721
2982
  }
2722
- var Address = /* @__PURE__ */ function() {
2723
- function Address2(iarCore, config) {
2983
+ var Address = /* @__PURE__ */ (function() {
2984
+ function Address2(interactionCore, config) {
2724
2985
  _classCallCheck$1(this, Address2);
2725
- this.iarCore = iarCore;
2986
+ this.interactionCore = interactionCore;
2726
2987
  this.config = config;
2727
2988
  }
2728
2989
  return _createClass$1(Address2, [{
2729
2990
  key: "getAddressList",
2730
- value: function() {
2991
+ value: (function() {
2731
2992
  var _getAddressList = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee() {
2732
2993
  var options, _options$pageNumber, pageNumber, _options$pageSize, pageSize, res, _args = arguments;
2733
2994
  return _regenerator$1().w(function(_context) {
@@ -2736,7 +2997,7 @@ var Address = /* @__PURE__ */ function() {
2736
2997
  options = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};
2737
2998
  _options$pageNumber = options.pageNumber, pageNumber = _options$pageNumber === void 0 ? 1 : _options$pageNumber, _options$pageSize = options.pageSize, pageSize = _options$pageSize === void 0 ? 10 : _options$pageSize;
2738
2999
  _context.n = 1;
2739
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetAddressList, {
3000
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetAddressList, {
2740
3001
  pageNumber,
2741
3002
  pageSize
2742
3003
  });
@@ -2752,17 +3013,17 @@ var Address = /* @__PURE__ */ function() {
2752
3013
  return _getAddressList.apply(this, arguments);
2753
3014
  }
2754
3015
  return getAddressList;
2755
- }()
3016
+ })()
2756
3017
  }, {
2757
3018
  key: "getDefaultAddress",
2758
- value: function() {
3019
+ value: (function() {
2759
3020
  var _getDefaultAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee2() {
2760
3021
  var res;
2761
3022
  return _regenerator$1().w(function(_context2) {
2762
3023
  while (1) switch (_context2.n) {
2763
3024
  case 0:
2764
3025
  _context2.n = 1;
2765
- return this.iarCore.polyvApi.get(PolyvApiUrl.GetDefaultAddress, {});
3026
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.GetDefaultAddress, {});
2766
3027
  case 1:
2767
3028
  res = _context2.v;
2768
3029
  return _context2.a(2, mapInternalAddressToAddressData(res));
@@ -2773,17 +3034,17 @@ var Address = /* @__PURE__ */ function() {
2773
3034
  return _getDefaultAddress.apply(this, arguments);
2774
3035
  }
2775
3036
  return getDefaultAddress;
2776
- }()
3037
+ })()
2777
3038
  }, {
2778
3039
  key: "addAddress",
2779
- value: function() {
3040
+ value: (function() {
2780
3041
  var _addAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee3(params) {
2781
3042
  var res;
2782
3043
  return _regenerator$1().w(function(_context3) {
2783
3044
  while (1) switch (_context3.n) {
2784
3045
  case 0:
2785
3046
  _context3.n = 1;
2786
- return this.iarCore.polyvApi.post(PolyvApiUrl.AddAddress, params);
3047
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.AddAddress, params);
2787
3048
  case 1:
2788
3049
  res = _context3.v;
2789
3050
  return _context3.a(2, mapInternalAddressToAddressData(res));
@@ -2794,16 +3055,16 @@ var Address = /* @__PURE__ */ function() {
2794
3055
  return _addAddress.apply(this, arguments);
2795
3056
  }
2796
3057
  return addAddress;
2797
- }()
3058
+ })()
2798
3059
  }, {
2799
3060
  key: "updateAddress",
2800
- value: function() {
3061
+ value: (function() {
2801
3062
  var _updateAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee4(params) {
2802
3063
  return _regenerator$1().w(function(_context4) {
2803
3064
  while (1) switch (_context4.n) {
2804
3065
  case 0:
2805
3066
  _context4.n = 1;
2806
- return this.iarCore.polyvApi.post(PolyvApiUrl.UpdateAddress, params);
3067
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.UpdateAddress, params);
2807
3068
  case 1:
2808
3069
  return _context4.a(2, _context4.v);
2809
3070
  }
@@ -2813,16 +3074,16 @@ var Address = /* @__PURE__ */ function() {
2813
3074
  return _updateAddress.apply(this, arguments);
2814
3075
  }
2815
3076
  return updateAddress;
2816
- }()
3077
+ })()
2817
3078
  }, {
2818
3079
  key: "deleteAddress",
2819
- value: function() {
3080
+ value: (function() {
2820
3081
  var _deleteAddress = _asyncToGenerator$1(/* @__PURE__ */ _regenerator$1().m(function _callee5(id) {
2821
3082
  return _regenerator$1().w(function(_context5) {
2822
3083
  while (1) switch (_context5.n) {
2823
3084
  case 0:
2824
3085
  _context5.n = 1;
2825
- return this.iarCore.polyvApi.post(PolyvApiUrl.DeleteAddress, {
3086
+ return this.interactionCore.polyvApi.post(PolyvApiUrl.DeleteAddress, {
2826
3087
  id
2827
3088
  });
2828
3089
  case 1:
@@ -2834,9 +3095,9 @@ var Address = /* @__PURE__ */ function() {
2834
3095
  return _deleteAddress.apply(this, arguments);
2835
3096
  }
2836
3097
  return deleteAddress;
2837
- }()
3098
+ })()
2838
3099
  }]);
2839
- }();
3100
+ })();
2840
3101
  function _typeof(o) {
2841
3102
  "@babel/helpers - typeof";
2842
3103
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -2850,7 +3111,7 @@ function _regenerator() {
2850
3111
  var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag";
2851
3112
  function i(r2, n2, o2, i2) {
2852
3113
  var c2 = n2 && n2.prototype instanceof Generator ? n2 : Generator, u2 = Object.create(c2.prototype);
2853
- return _regeneratorDefine2(u2, "_invoke", function(r3, n3, o3) {
3114
+ return _regeneratorDefine2(u2, "_invoke", (function(r3, n3, o3) {
2854
3115
  var i3, c3, u3, f2 = 0, p = o3 || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d2(t2, r4) {
2855
3116
  return i3 = t2, c3 = 0, u3 = e, G.n = r4, a;
2856
3117
  } };
@@ -2883,7 +3144,7 @@ function _regenerator() {
2883
3144
  }
2884
3145
  return { value: t, done: y };
2885
3146
  };
2886
- }(r2, o2, i2), true), u2;
3147
+ })(r2, o2, i2), true), u2;
2887
3148
  }
2888
3149
  var a = {};
2889
3150
  function Generator() {
@@ -2915,15 +3176,12 @@ function _regeneratorDefine2(e, r, n, t) {
2915
3176
  i = 0;
2916
3177
  }
2917
3178
  _regeneratorDefine2 = function _regeneratorDefine(e2, r2, n2, t2) {
2918
- if (r2) i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2;
2919
- else {
2920
- var o = function o2(r3, n3) {
2921
- _regeneratorDefine2(e2, r3, function(e3) {
2922
- return this._invoke(r3, n3, e3);
2923
- });
2924
- };
2925
- o("next", 0), o("throw", 1), o("return", 2);
3179
+ function o(r3, n3) {
3180
+ _regeneratorDefine2(e2, r3, function(e3) {
3181
+ return this._invoke(r3, n3, e3);
3182
+ });
2926
3183
  }
3184
+ r2 ? i ? i(e2, r2, { value: n2, enumerable: !t2, configurable: !t2, writable: !t2 }) : e2[r2] = n2 : (o("next", 0), o("throw", 1), o("return", 2));
2927
3185
  }, _regeneratorDefine2(e, r, n, t);
2928
3186
  }
2929
3187
  function asyncGeneratorStep(n, t, e, r, o, a, c) {
@@ -2978,23 +3236,23 @@ function _toPrimitive(t, r) {
2978
3236
  }
2979
3237
  return String(t);
2980
3238
  }
2981
- var Payment = /* @__PURE__ */ function() {
2982
- function Payment2(iarCore, config) {
3239
+ var Payment = /* @__PURE__ */ (function() {
3240
+ function Payment2(interactionCore, config) {
2983
3241
  _classCallCheck(this, Payment2);
2984
3242
  _defineProperty(this, "PaymentProvider", PaymentProvider);
2985
- this.iarCore = iarCore;
3243
+ this.interactionCore = interactionCore;
2986
3244
  this.config = config;
2987
3245
  }
2988
3246
  return _createClass(Payment2, [{
2989
3247
  key: "getPayOrderParams",
2990
- value: function() {
3248
+ value: (function() {
2991
3249
  var _getPayOrderParams = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee(options) {
2992
3250
  var res;
2993
3251
  return _regenerator().w(function(_context) {
2994
3252
  while (1) switch (_context.n) {
2995
3253
  case 0:
2996
3254
  _context.n = 1;
2997
- return this.iarCore.polyvApi.get(PolyvApiUrl.PayOrder, options);
3255
+ return this.interactionCore.polyvApi.get(PolyvApiUrl.PayOrder, options);
2998
3256
  case 1:
2999
3257
  res = _context.v;
3000
3258
  return _context.a(2, mapInternalCreateOrderResponse(res));
@@ -3005,7 +3263,7 @@ var Payment = /* @__PURE__ */ function() {
3005
3263
  return _getPayOrderParams.apply(this, arguments);
3006
3264
  }
3007
3265
  return getPayOrderParams;
3008
- }()
3266
+ })()
3009
3267
  }, {
3010
3268
  key: "getPayProviders",
3011
3269
  value: (
@@ -3017,7 +3275,7 @@ var Payment = /* @__PURE__ */ function() {
3017
3275
  * console.log('支付方式', data);
3018
3276
  * ```
3019
3277
  */
3020
- function() {
3278
+ (function() {
3021
3279
  var _getPayProviders = _asyncToGenerator(/* @__PURE__ */ _regenerator().m(function _callee2() {
3022
3280
  var _this = this;
3023
3281
  var fetchPromise;
@@ -3030,7 +3288,7 @@ var Payment = /* @__PURE__ */ function() {
3030
3288
  }
3031
3289
  return _context2.a(2, this.__payProviderCache);
3032
3290
  case 1:
3033
- fetchPromise = this.iarCore.polyvApi.get(PolyvApiUrl.GetOrderPaymentProviders, {})["catch"](function(error) {
3291
+ fetchPromise = this.interactionCore.polyvApi.get(PolyvApiUrl.GetOrderPaymentProviders, {})["catch"](function(error) {
3034
3292
  _this.__payProviderCache = void 0;
3035
3293
  throw error;
3036
3294
  });
@@ -3046,16 +3304,16 @@ var Payment = /* @__PURE__ */ function() {
3046
3304
  return _getPayProviders.apply(this, arguments);
3047
3305
  }
3048
3306
  return getPayProviders;
3049
- }()
3307
+ })()
3050
3308
  )
3051
3309
  }]);
3052
- }();
3310
+ })();
3053
3311
  ;
3054
3312
  console.log(
3055
3313
  "%c@polyv/product-sdk",
3056
3314
  "background:#67C23A;padding: 2px 6px;border-radius: 3px;color: #fff",
3057
- "[version: 1.3.0-rc-20250814.1]",
3058
- "[buildTime: 2025-08-14 03:10:27]"
3315
+ "[version: 1.5.0-rc-20250925.1]",
3316
+ "[buildTime: 2025-09-25 02:55:45]"
3059
3317
  );
3060
3318
  export {
3061
3319
  Address,
@@ -3077,9 +3335,11 @@ export {
3077
3335
  ProductLinkJumpWay,
3078
3336
  ProductLinkType,
3079
3337
  ProductMediaType,
3338
+ ProductMoveOperation,
3080
3339
  ProductPriceType,
3081
3340
  ProductPushRule,
3082
3341
  ProductServiceType,
3342
+ ProductSortType,
3083
3343
  ProductStatus,
3084
3344
  ProductType,
3085
3345
  RefundStatus