@worldfirst/worldfirst-js 0.0.1775118337-dev.8 → 1.0.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/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region \0rolldown/runtime.js
2
- var e = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), t = /* @__PURE__ */ e(((e) => {
2
+ var e = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), t = /* @__PURE__ */ e(((e) => {
3
3
  var t = e && e.__extends || (function() {
4
4
  var e = function(t, n) {
5
5
  return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
@@ -225,7 +225,7 @@ var e = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), t
225
225
  }), e;
226
226
  }();
227
227
  e.ScriptTracker = o;
228
- var s = "LOCAL"?.toUpperCase() || "PROD";
228
+ var s = "PROD"?.toUpperCase() || "PROD";
229
229
  e.tracker = new o({
230
230
  appId: "180020050100012557",
231
231
  env: [
@@ -239,7 +239,7 @@ var e = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), t
239
239
  performance: !1,
240
240
  error: !1
241
241
  });
242
- })), r = (0, (/* @__PURE__ */ e(((e) => {
242
+ })), r = (/* @__PURE__ */ e(((e) => {
243
243
  var r = e && e.__awaiter || function(e, t, n, r) {
244
244
  function i(e) {
245
245
  return e instanceof n ? e : new n(function(t) {
@@ -463,20 +463,764 @@ var e = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), t
463
463
  }), e.apply(void 0, n)]);
464
464
  };
465
465
  }
466
- })))().createLoader)({
467
- sdkURL: {
468
- DEV: "https://sdk-dev.marmot-cloud.com/package/worldfirst-js/dev-1775118337/index.js",
469
- LOCAL: "http://localhost:7981/index.js",
470
- PROD: "https://js.worldfirst.com/v2/index.js"
471
- }.LOCAL,
466
+ })))(), i = (e) => [...new Set(e)], a = (e, t) => e.filter((e) => !t.includes(e)), o = (e, t) => e.filter((e) => t.includes(e)), s = (e) => typeof e == "bigint" || !Number.isNaN(Number(e)) && Math.floor(Number(e)) === e, c = (e) => typeof e == "bigint" || e >= 0 && Number.isSafeInteger(e);
467
+ function l(e, t) {
468
+ if (t.length === 0) return e;
469
+ let n, r = [...e];
470
+ for (let e = r.length - 1, i = 0, a = 0; e > 0; e--, i++) {
471
+ i %= t.length, a += n = t[i].codePointAt(0);
472
+ let o = (n + i + a) % e, s = r[e], c = r[o];
473
+ r[o] = s, r[e] = c;
474
+ }
475
+ return r;
476
+ }
477
+ var u = (e, t) => {
478
+ let n = [], r = e;
479
+ if (typeof r == "bigint") {
480
+ let e = BigInt(t.length);
481
+ do
482
+ n.unshift(t[Number(r % e)]), r /= e;
483
+ while (r > BigInt(0));
484
+ } else do
485
+ n.unshift(t[r % t.length]), r = Math.floor(r / t.length);
486
+ while (r > 0);
487
+ return n;
488
+ }, d = (e, t) => e.reduce((n, r) => {
489
+ let i = t.indexOf(r);
490
+ if (i === -1) throw Error(`The provided ID (${e.join("")}) is invalid, as it contains characters that do not exist in the alphabet (${t.join("")})`);
491
+ if (typeof n == "bigint") return n * BigInt(t.length) + BigInt(i);
492
+ let a = n * t.length + i;
493
+ return Number.isSafeInteger(a) ? a : (v("Unable to decode the provided string, due to lack of support for BigInt numbers in the current environment"), BigInt(n) * BigInt(t.length) + BigInt(i));
494
+ }, 0), f = /^\+?\d+$/, p = (e) => {
495
+ if (!f.test(e)) return NaN;
496
+ let t = Number.parseInt(e, 10);
497
+ return Number.isSafeInteger(t) ? t : (v("Unable to encode the provided BigInt string without loss of information due to lack of support for BigInt type in the current environment"), BigInt(e));
498
+ }, m = (e, t, n) => Array.from({ length: Math.ceil(e.length / t) }, (r, i) => n(e.slice(i * t, (i + 1) * t))), h = (e) => new RegExp(e.map((e) => _(e)).sort((e, t) => t.length - e.length).join("|")), g = (e) => RegExp(`^[${e.map((e) => _(e)).sort((e, t) => t.length - e.length).join("")}]+$`), _ = (e) => e.replace(/[\s#$()*+,.?[\\\]^{|}-]/g, "\\$&"), v = (e = "BigInt is not available in this environment") => {
499
+ if (typeof BigInt != "function") throw TypeError(e);
500
+ }, y = 16, b = 3.5, x = 12, S = 16, C = 12, w = 100;
501
+ new class {
502
+ constructor(e = "", t = 0, n = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", r = "cfhistuCFHISTU") {
503
+ if (this.minLength = t, typeof t != "number") throw TypeError(`Hashids: Provided 'minLength' has to be a number (is ${typeof t})`);
504
+ if (typeof e != "string") throw TypeError(`Hashids: Provided 'salt' has to be a string (is ${typeof e})`);
505
+ if (typeof n != "string") throw TypeError(`Hashids: Provided alphabet has to be a string (is ${typeof n})`);
506
+ let s = Array.from(e), c = Array.from(n), u = Array.from(r);
507
+ this.salt = s;
508
+ let d = i(c);
509
+ if (d.length < y) throw Error(`Hashids: alphabet must contain at least ${y} unique characters, provided: ${d.join("")}`);
510
+ this.alphabet = a(d, u);
511
+ let f = o(u, d);
512
+ this.seps = l(f, s);
513
+ let p, m;
514
+ (this.seps.length === 0 || this.alphabet.length / this.seps.length > b) && (p = Math.ceil(this.alphabet.length / b), p > this.seps.length && (m = p - this.seps.length, this.seps.push(...this.alphabet.slice(0, m)), this.alphabet = this.alphabet.slice(m))), this.alphabet = l(this.alphabet, s);
515
+ let _ = Math.ceil(this.alphabet.length / x);
516
+ this.alphabet.length < 3 ? (this.guards = this.seps.slice(0, _), this.seps = this.seps.slice(_)) : (this.guards = this.alphabet.slice(0, _), this.alphabet = this.alphabet.slice(_)), this.guardsRegExp = h(this.guards), this.sepsRegExp = h(this.seps), this.allowedCharsRegExp = g([
517
+ ...this.alphabet,
518
+ ...this.guards,
519
+ ...this.seps
520
+ ]);
521
+ }
522
+ encode(e, ...t) {
523
+ let n = Array.isArray(e) ? e : [...e == null ? [] : [e], ...t];
524
+ return n.length === 0 || (n.every(s) || (n = n.map((e) => typeof e == "bigint" || typeof e == "number" ? e : p(String(e)))), !n.every(c)) ? "" : this._encode(n).join("");
525
+ }
526
+ decode(e) {
527
+ return !e || typeof e != "string" || e.length === 0 ? [] : this._decode(e);
528
+ }
529
+ encodeHex(e) {
530
+ let t = e;
531
+ switch (typeof t) {
532
+ case "bigint":
533
+ t = t.toString(S);
534
+ break;
535
+ case "string":
536
+ if (!/^[\dA-Fa-f]+$/.test(t)) return "";
537
+ break;
538
+ default: throw Error(`Hashids: The provided value is neither a string, nor a BigInt (got: ${typeof t})`);
539
+ }
540
+ let n = m(t, C, (e) => Number.parseInt(`1${e}`, 16));
541
+ return this.encode(n);
542
+ }
543
+ decodeHex(e) {
544
+ return this.decode(e).map((e) => e.toString(S).slice(1)).join("");
545
+ }
546
+ isValidId(e) {
547
+ return this.allowedCharsRegExp.test(e);
548
+ }
549
+ _encode(e) {
550
+ let { alphabet: t } = this, n = e.reduce((e, t, n) => e + (typeof t == "bigint" ? Number(t % BigInt(n + w)) : t % (n + w)), 0), r = [t[n % t.length]], i = [...r], { seps: a } = this, { guards: o } = this;
551
+ if (e.forEach((n, o) => {
552
+ let s = i.concat(this.salt, t);
553
+ t = l(t, s);
554
+ let c = u(n, t);
555
+ if (r.push(...c), o + 1 < e.length) {
556
+ let e = c[0].codePointAt(0) + o, t = typeof n == "bigint" ? Number(n % BigInt(e)) : n % e;
557
+ r.push(a[t % a.length]);
558
+ }
559
+ }), r.length < this.minLength) {
560
+ let e = (n + r[0].codePointAt(0)) % o.length;
561
+ if (r.unshift(o[e]), r.length < this.minLength) {
562
+ let e = (n + r[2].codePointAt(0)) % o.length;
563
+ r.push(o[e]);
564
+ }
565
+ }
566
+ let s = Math.floor(t.length / 2);
567
+ for (; r.length < this.minLength;) {
568
+ t = l(t, t), r.unshift(...t.slice(s)), r.push(...t.slice(0, s));
569
+ let e = r.length - this.minLength;
570
+ if (e > 0) {
571
+ let t = e / 2;
572
+ r = r.slice(t, t + this.minLength);
573
+ }
574
+ }
575
+ return r;
576
+ }
577
+ _decode(e) {
578
+ if (!this.isValidId(e)) throw Error(`The provided ID (${e}) is invalid, as it contains characters that do not exist in the alphabet (${this.guards.join("")}${this.seps.join("")}${this.alphabet.join("")})`);
579
+ let t = e.split(this.guardsRegExp), n = t[+(t.length === 3 || t.length === 2)];
580
+ if (n.length === 0) return [];
581
+ let r = n[Symbol.iterator]().next().value, i = n.slice(r.length).split(this.sepsRegExp), a = this.alphabet, o = [];
582
+ for (let e of i) {
583
+ let t = [
584
+ r,
585
+ ...this.salt,
586
+ ...a
587
+ ], n = l(a, t.slice(0, a.length));
588
+ o.push(d(Array.from(e), n)), a = n;
589
+ }
590
+ return this._encode(o).join("") === e ? o : [];
591
+ }
592
+ }("intl-open-sdk", 6);
593
+ //#endregion
594
+ //#region node_modules/@antintl/opensdk-bridge/lib/types.js
595
+ var T = {
596
+ HANDSHAKE: "OPENSDK@HANDSHAKE",
597
+ UPDATE_CONFIG: "OPENSDK@UPDATE_CONFIG",
598
+ SUBMIT: "OPENSDK@SUBMIT",
599
+ SUBMIT_REPLY: "OPENSDK@SUBMIT_REPLY",
600
+ REDIRECT: "OPENSDK@REDIRECT",
601
+ OPEN_MODAL: "OPENSDK@OPEN_MODAL",
602
+ OPEN_MODAL_ERROR: "OPENSDK@OPEN_MODAL_ERROR",
603
+ CLOSE_MODAL: "OPENSDK@CLOSE_MODAL",
604
+ ERROR: "OPENSDK@ERROR",
605
+ HANDSHAKE_ACK: "OPENSDK@HANDSHAKE_ACK",
606
+ TRANSFER_RECEIVE_PORT: "OPENSDK@TRANSFER_RECEIVE_PORT",
607
+ MESSAGE: "OPENSDK@MESSAGE",
608
+ TRANSFER_SEND_PORT: "OPENSDK@TRANSFER_SEND_PORT",
609
+ TRANSFER_APP_PORT: "OPENSDK@TRANSFER_APP_PORT",
610
+ TRANSFER_MODAL_PORT: "OPENSDK@TRANSFER_MODAL_PORT",
611
+ TRANSFER_MODAL_APPEARANCE: "OPENSDK@TRANSFER_MODAL_APPEARANCE",
612
+ HEIGHT_UPDATE: "OPENSDK@HEIGHT_UPDATE"
613
+ };
614
+ (/* @__PURE__ */ e(((e, t) => {
615
+ var n = "Expected a function", r = NaN, i = "[object Symbol]", a = /^\s+|\s+$/g, o = /^[-+]0x[0-9a-f]+$/i, s = /^0b[01]+$/i, c = /^0o[0-7]+$/i, l = parseInt, u = typeof global == "object" && global && global.Object === Object && global, d = typeof self == "object" && self && self.Object === Object && self, f = u || d || Function("return this")(), p = Object.prototype.toString, m = Math.max, h = Math.min, g = function() {
616
+ return f.Date.now();
617
+ };
618
+ function _(e, t, r) {
619
+ var i, a, o, s, c, l, u = 0, d = !1, f = !1, p = !0;
620
+ if (typeof e != "function") throw TypeError(n);
621
+ t = x(t) || 0, v(r) && (d = !!r.leading, f = "maxWait" in r, o = f ? m(x(r.maxWait) || 0, t) : o, p = "trailing" in r ? !!r.trailing : p);
622
+ function _(t) {
623
+ var n = i, r = a;
624
+ return i = a = void 0, u = t, s = e.apply(r, n), s;
625
+ }
626
+ function y(e) {
627
+ return u = e, c = setTimeout(C, t), d ? _(e) : s;
628
+ }
629
+ function b(e) {
630
+ var n = e - l, r = e - u, i = t - n;
631
+ return f ? h(i, o - r) : i;
632
+ }
633
+ function S(e) {
634
+ var n = e - l, r = e - u;
635
+ return l === void 0 || n >= t || n < 0 || f && r >= o;
636
+ }
637
+ function C() {
638
+ var e = g();
639
+ if (S(e)) return w(e);
640
+ c = setTimeout(C, b(e));
641
+ }
642
+ function w(e) {
643
+ return c = void 0, p && i ? _(e) : (i = a = void 0, s);
644
+ }
645
+ function T() {
646
+ c !== void 0 && clearTimeout(c), u = 0, i = l = a = c = void 0;
647
+ }
648
+ function E() {
649
+ return c === void 0 ? s : w(g());
650
+ }
651
+ function D() {
652
+ var e = g(), n = S(e);
653
+ if (i = arguments, a = this, l = e, n) {
654
+ if (c === void 0) return y(l);
655
+ if (f) return c = setTimeout(C, t), _(l);
656
+ }
657
+ return c === void 0 && (c = setTimeout(C, t)), s;
658
+ }
659
+ return D.cancel = T, D.flush = E, D;
660
+ }
661
+ function v(e) {
662
+ var t = typeof e;
663
+ return !!e && (t == "object" || t == "function");
664
+ }
665
+ function y(e) {
666
+ return !!e && typeof e == "object";
667
+ }
668
+ function b(e) {
669
+ return typeof e == "symbol" || y(e) && p.call(e) == i;
670
+ }
671
+ function x(e) {
672
+ if (typeof e == "number") return e;
673
+ if (b(e)) return r;
674
+ if (v(e)) {
675
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
676
+ e = v(t) ? t + "" : t;
677
+ }
678
+ if (typeof e != "string") return e === 0 ? e : +e;
679
+ e = e.replace(a, "");
680
+ var n = s.test(e);
681
+ return n || c.test(e) ? l(e.slice(2), n ? 2 : 8) : o.test(e) ? r : +e;
682
+ }
683
+ t.exports = _;
684
+ })))(), T.TRANSFER_RECEIVE_PORT, T.TRANSFER_SEND_PORT, T.TRANSFER_MODAL_PORT, T.TRANSFER_MODAL_APPEARANCE, T.OPEN_MODAL_ERROR, T.TRANSFER_APP_PORT, T.CLOSE_MODAL, T.OPEN_MODAL, T.REDIRECT, T.MESSAGE;
685
+ //#endregion
686
+ //#region node_modules/@antintl/opensdk-bridge/lib/OpenSDKTracker.js
687
+ var E = "https://cdn.marmot-cloud.com/tnpm-package/@antintl-opensdk-debugger/1.0.1/dist/tracker.umd.js", D = class {
688
+ options;
689
+ tracker;
690
+ trackId;
691
+ constructor(e) {
692
+ this.initialOptions(e);
693
+ }
694
+ initialOptions(e) {
695
+ return this.options = {
696
+ ...this.options,
697
+ ...e,
698
+ appId: e?.appId || this.options?.appId || "180020050100012557",
699
+ performance: e?.performance === !0 || this.options?.performance === !0,
700
+ error: e?.error === !0 || this.options?.error === !0
701
+ }, "trackId" in this.options && (this.trackId = this.options.trackId), this.options;
702
+ }
703
+ loadTacker(e) {
704
+ let t = (0, r.loadScript)(E, "intlSdkTracker");
705
+ return t ? t.then((t) => t.variable?.getTrackerInstance(this.initialOptions(e))) : Promise.resolve(void 0);
706
+ }
707
+ async initTracker(e) {
708
+ if (this.tracker && !e) return this.tracker;
709
+ let t = await this.loadTacker(e);
710
+ return t && (this.tracker = t), t;
711
+ }
712
+ safeCall(e) {
713
+ return this.initTracker().then(e);
714
+ }
715
+ setTrackId(e) {
716
+ this.trackId = e, this.set({ trackId: e });
717
+ }
718
+ set(e) {
719
+ this.safeCall((t) => t?.set(e));
720
+ }
721
+ pv() {
722
+ this.safeCall((e) => e?.pv());
723
+ }
724
+ log(...e) {
725
+ this.trackId && (e[0].d18 = this.trackId), this.safeCall((t) => t?.log(...e));
726
+ }
727
+ click(...e) {
728
+ this.safeCall((t) => t?.click(...e));
729
+ }
730
+ expo(...e) {
731
+ this.safeCall((t) => t?.expo(...e));
732
+ }
733
+ onSendData(...e) {
734
+ this.safeCall((t) => t?.onSendData(...e));
735
+ }
736
+ offSendData(...e) {
737
+ this.safeCall((t) => t?.offSendData(...e));
738
+ }
739
+ pageMonitor(...e) {
740
+ this.safeCall((t) => t?.pageMonitor(...e));
741
+ }
742
+ reportCustomizedPerformance(...e) {
743
+ this.safeCall((t) => t?.reportCustomizedPerformance(...e));
744
+ }
745
+ };
746
+ new D(), (/* @__PURE__ */ e(((e, t) => {
747
+ var n = 200, r = "__lodash_hash_undefined__", i = 800, a = 16, o = 9007199254740991, s = "[object Arguments]", c = "[object Array]", l = "[object AsyncFunction]", u = "[object Boolean]", d = "[object Date]", f = "[object Error]", p = "[object Function]", m = "[object GeneratorFunction]", h = "[object Map]", g = "[object Number]", _ = "[object Null]", v = "[object Object]", y = "[object Proxy]", b = "[object RegExp]", x = "[object Set]", S = "[object String]", C = "[object Undefined]", w = "[object WeakMap]", T = "[object ArrayBuffer]", E = "[object DataView]", D = "[object Float32Array]", ee = "[object Float64Array]", te = "[object Int8Array]", ne = "[object Int16Array]", re = "[object Int32Array]", ie = "[object Uint8Array]", ae = "[object Uint8ClampedArray]", O = "[object Uint16Array]", k = "[object Uint32Array]", oe = /[\\^$.*+?()[\]{}|]/g, se = /^\[object .+?Constructor\]$/, ce = /^(?:0|[1-9]\d*)$/, A = {};
748
+ A[D] = A[ee] = A[te] = A[ne] = A[re] = A[ie] = A[ae] = A[O] = A[k] = !0, A[s] = A[c] = A[T] = A[u] = A[E] = A[d] = A[f] = A[p] = A[h] = A[g] = A[v] = A[b] = A[x] = A[S] = A[w] = !1;
749
+ var le = typeof global == "object" && global && global.Object === Object && global, ue = typeof self == "object" && self && self.Object === Object && self, j = le || ue || Function("return this")(), de = typeof e == "object" && e && !e.nodeType && e, M = de && typeof t == "object" && t && !t.nodeType && t, fe = M && M.exports === de, pe = fe && le.process, me = function() {
750
+ try {
751
+ return M && M.require && M.require("util").types || pe && pe.binding && pe.binding("util");
752
+ } catch {}
753
+ }(), he = me && me.isTypedArray;
754
+ function ge(e, t, n) {
755
+ switch (n.length) {
756
+ case 0: return e.call(t);
757
+ case 1: return e.call(t, n[0]);
758
+ case 2: return e.call(t, n[0], n[1]);
759
+ case 3: return e.call(t, n[0], n[1], n[2]);
760
+ }
761
+ return e.apply(t, n);
762
+ }
763
+ function _e(e, t) {
764
+ for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n);
765
+ return r;
766
+ }
767
+ function ve(e) {
768
+ return function(t) {
769
+ return e(t);
770
+ };
771
+ }
772
+ function ye(e, t) {
773
+ return e?.[t];
774
+ }
775
+ function be(e, t) {
776
+ return function(n) {
777
+ return e(t(n));
778
+ };
779
+ }
780
+ var xe = Array.prototype, Se = Function.prototype, N = Object.prototype, P = j["__core-js_shared__"], F = Se.toString, I = N.hasOwnProperty, Ce = function() {
781
+ var e = /[^.]+$/.exec(P && P.keys && P.keys.IE_PROTO || "");
782
+ return e ? "Symbol(src)_1." + e : "";
783
+ }(), we = N.toString, Te = F.call(Object), Ee = RegExp("^" + F.call(I).replace(oe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), L = fe ? j.Buffer : void 0, De = j.Symbol, Oe = j.Uint8Array, ke = L ? L.allocUnsafe : void 0, Ae = be(Object.getPrototypeOf, Object), je = Object.create, Me = N.propertyIsEnumerable, Ne = xe.splice, R = De ? De.toStringTag : void 0, z = function() {
784
+ try {
785
+ var e = Ct(Object, "defineProperty");
786
+ return e({}, "", {}), e;
787
+ } catch {}
788
+ }(), Pe = L ? L.isBuffer : void 0, Fe = Math.max, Ie = Date.now, Le = Ct(j, "Map"), B = Ct(Object, "create"), Re = function() {
789
+ function e() {}
790
+ return function(t) {
791
+ if (!Q(t)) return {};
792
+ if (je) return je(t);
793
+ e.prototype = t;
794
+ var n = new e();
795
+ return e.prototype = void 0, n;
796
+ };
797
+ }();
798
+ function V(e) {
799
+ var t = -1, n = e == null ? 0 : e.length;
800
+ for (this.clear(); ++t < n;) {
801
+ var r = e[t];
802
+ this.set(r[0], r[1]);
803
+ }
804
+ }
805
+ function ze() {
806
+ this.__data__ = B ? B(null) : {}, this.size = 0;
807
+ }
808
+ function Be(e) {
809
+ var t = this.has(e) && delete this.__data__[e];
810
+ return this.size -= +!!t, t;
811
+ }
812
+ function Ve(e) {
813
+ var t = this.__data__;
814
+ if (B) {
815
+ var n = t[e];
816
+ return n === r ? void 0 : n;
817
+ }
818
+ return I.call(t, e) ? t[e] : void 0;
819
+ }
820
+ function He(e) {
821
+ var t = this.__data__;
822
+ return B ? t[e] !== void 0 : I.call(t, e);
823
+ }
824
+ function Ue(e, t) {
825
+ var n = this.__data__;
826
+ return this.size += +!this.has(e), n[e] = B && t === void 0 ? r : t, this;
827
+ }
828
+ V.prototype.clear = ze, V.prototype.delete = Be, V.prototype.get = Ve, V.prototype.has = He, V.prototype.set = Ue;
829
+ function H(e) {
830
+ var t = -1, n = e == null ? 0 : e.length;
831
+ for (this.clear(); ++t < n;) {
832
+ var r = e[t];
833
+ this.set(r[0], r[1]);
834
+ }
835
+ }
836
+ function We() {
837
+ this.__data__ = [], this.size = 0;
838
+ }
839
+ function Ge(e) {
840
+ var t = this.__data__, n = K(t, e);
841
+ return n < 0 ? !1 : (n == t.length - 1 ? t.pop() : Ne.call(t, n, 1), --this.size, !0);
842
+ }
843
+ function Ke(e) {
844
+ var t = this.__data__, n = K(t, e);
845
+ return n < 0 ? void 0 : t[n][1];
846
+ }
847
+ function qe(e) {
848
+ return K(this.__data__, e) > -1;
849
+ }
850
+ function Je(e, t) {
851
+ var n = this.__data__, r = K(n, e);
852
+ return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
853
+ }
854
+ H.prototype.clear = We, H.prototype.delete = Ge, H.prototype.get = Ke, H.prototype.has = qe, H.prototype.set = Je;
855
+ function U(e) {
856
+ var t = -1, n = e == null ? 0 : e.length;
857
+ for (this.clear(); ++t < n;) {
858
+ var r = e[t];
859
+ this.set(r[0], r[1]);
860
+ }
861
+ }
862
+ function Ye() {
863
+ this.size = 0, this.__data__ = {
864
+ hash: new V(),
865
+ map: new (Le || H)(),
866
+ string: new V()
867
+ };
868
+ }
869
+ function Xe(e) {
870
+ var t = Y(this, e).delete(e);
871
+ return this.size -= +!!t, t;
872
+ }
873
+ function Ze(e) {
874
+ return Y(this, e).get(e);
875
+ }
876
+ function Qe(e) {
877
+ return Y(this, e).has(e);
878
+ }
879
+ function $e(e, t) {
880
+ var n = Y(this, e), r = n.size;
881
+ return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
882
+ }
883
+ U.prototype.clear = Ye, U.prototype.delete = Xe, U.prototype.get = Ze, U.prototype.has = Qe, U.prototype.set = $e;
884
+ function W(e) {
885
+ var t = this.__data__ = new H(e);
886
+ this.size = t.size;
887
+ }
888
+ function et() {
889
+ this.__data__ = new H(), this.size = 0;
890
+ }
891
+ function tt(e) {
892
+ var t = this.__data__, n = t.delete(e);
893
+ return this.size = t.size, n;
894
+ }
895
+ function nt(e) {
896
+ return this.__data__.get(e);
897
+ }
898
+ function rt(e) {
899
+ return this.__data__.has(e);
900
+ }
901
+ function it(e, t) {
902
+ var r = this.__data__;
903
+ if (r instanceof H) {
904
+ var i = r.__data__;
905
+ if (!Le || i.length < n - 1) return i.push([e, t]), this.size = ++r.size, this;
906
+ r = this.__data__ = new U(i);
907
+ }
908
+ return r.set(e, t), this.size = r.size, this;
909
+ }
910
+ W.prototype.clear = et, W.prototype.delete = tt, W.prototype.get = nt, W.prototype.has = rt, W.prototype.set = it;
911
+ function at(e, t) {
912
+ var n = Rt(e), r = !n && Lt(e), i = !n && !r && Vt(e), a = !n && !r && !i && Gt(e), o = n || r || i || a, s = o ? _e(e.length, String) : [], c = s.length;
913
+ for (var l in e) (t || I.call(e, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || Et(l, c))) && s.push(l);
914
+ return s;
915
+ }
916
+ function G(e, t, n) {
917
+ (n !== void 0 && !Z(e[t], n) || n === void 0 && !(t in e)) && q(e, t, n);
918
+ }
919
+ function ot(e, t, n) {
920
+ var r = e[t];
921
+ (!(I.call(e, t) && Z(r, n)) || n === void 0 && !(t in e)) && q(e, t, n);
922
+ }
923
+ function K(e, t) {
924
+ for (var n = e.length; n--;) if (Z(e[n][0], t)) return n;
925
+ return -1;
926
+ }
927
+ function q(e, t, n) {
928
+ t == "__proto__" && z ? z(e, t, {
929
+ configurable: !0,
930
+ enumerable: !0,
931
+ value: n,
932
+ writable: !0
933
+ }) : e[t] = n;
934
+ }
935
+ var st = St();
936
+ function J(e) {
937
+ return e == null ? e === void 0 ? C : _ : R && R in Object(e) ? wt(e) : Mt(e);
938
+ }
939
+ function ct(e) {
940
+ return $(e) && J(e) == s;
941
+ }
942
+ function lt(e) {
943
+ return !Q(e) || kt(e) ? !1 : (Ht(e) ? Ee : se).test(It(e));
944
+ }
945
+ function ut(e) {
946
+ return $(e) && Ut(e.length) && !!A[J(e)];
947
+ }
948
+ function dt(e) {
949
+ if (!Q(e)) return jt(e);
950
+ var t = At(e), n = [];
951
+ for (var r in e) r == "constructor" && (t || !I.call(e, r)) || n.push(r);
952
+ return n;
953
+ }
954
+ function ft(e, t, n, r, i) {
955
+ e !== t && st(t, function(a, o) {
956
+ if (i ||= new W(), Q(a)) pt(e, t, o, n, ft, r, i);
957
+ else {
958
+ var s = r ? r(X(e, o), a, o + "", e, t, i) : void 0;
959
+ s === void 0 && (s = a), G(e, o, s);
960
+ }
961
+ }, qt);
962
+ }
963
+ function pt(e, t, n, r, i, a, o) {
964
+ var s = X(e, n), c = X(t, n), l = o.get(c);
965
+ if (l) {
966
+ G(e, n, l);
967
+ return;
968
+ }
969
+ var u = a ? a(s, c, n + "", e, t, o) : void 0, d = u === void 0;
970
+ if (d) {
971
+ var f = Rt(c), p = !f && Vt(c), m = !f && !p && Gt(c);
972
+ u = c, f || p || m ? Rt(s) ? u = s : Bt(s) ? u = yt(s) : p ? (d = !1, u = gt(c, !0)) : m ? (d = !1, u = vt(c, !0)) : u = [] : Wt(c) || Lt(c) ? (u = s, Lt(s) ? u = Kt(s) : (!Q(s) || Ht(s)) && (u = Tt(c))) : d = !1;
973
+ }
974
+ d && (o.set(c, u), i(u, c, r, a, o), o.delete(c)), G(e, n, u);
975
+ }
976
+ function mt(e, t) {
977
+ return Pt(Nt(e, t, Xt), e + "");
978
+ }
979
+ var ht = z ? function(e, t) {
980
+ return z(e, "toString", {
981
+ configurable: !0,
982
+ enumerable: !1,
983
+ value: Yt(t),
984
+ writable: !0
985
+ });
986
+ } : Xt;
987
+ function gt(e, t) {
988
+ if (t) return e.slice();
989
+ var n = e.length, r = ke ? ke(n) : new e.constructor(n);
990
+ return e.copy(r), r;
991
+ }
992
+ function _t(e) {
993
+ var t = new e.constructor(e.byteLength);
994
+ return new Oe(t).set(new Oe(e)), t;
995
+ }
996
+ function vt(e, t) {
997
+ var n = t ? _t(e.buffer) : e.buffer;
998
+ return new e.constructor(n, e.byteOffset, e.length);
999
+ }
1000
+ function yt(e, t) {
1001
+ var n = -1, r = e.length;
1002
+ for (t ||= Array(r); ++n < r;) t[n] = e[n];
1003
+ return t;
1004
+ }
1005
+ function bt(e, t, n, r) {
1006
+ var i = !n;
1007
+ n ||= {};
1008
+ for (var a = -1, o = t.length; ++a < o;) {
1009
+ var s = t[a], c = r ? r(n[s], e[s], s, n, e) : void 0;
1010
+ c === void 0 && (c = e[s]), i ? q(n, s, c) : ot(n, s, c);
1011
+ }
1012
+ return n;
1013
+ }
1014
+ function xt(e) {
1015
+ return mt(function(t, n) {
1016
+ var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
1017
+ for (a = e.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && Dt(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), t = Object(t); ++r < i;) {
1018
+ var s = n[r];
1019
+ s && e(t, s, r, a);
1020
+ }
1021
+ return t;
1022
+ });
1023
+ }
1024
+ function St(e) {
1025
+ return function(t, n, r) {
1026
+ for (var i = -1, a = Object(t), o = r(t), s = o.length; s--;) {
1027
+ var c = o[e ? s : ++i];
1028
+ if (n(a[c], c, a) === !1) break;
1029
+ }
1030
+ return t;
1031
+ };
1032
+ }
1033
+ function Y(e, t) {
1034
+ var n = e.__data__;
1035
+ return Ot(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
1036
+ }
1037
+ function Ct(e, t) {
1038
+ var n = ye(e, t);
1039
+ return lt(n) ? n : void 0;
1040
+ }
1041
+ function wt(e) {
1042
+ var t = I.call(e, R), n = e[R];
1043
+ try {
1044
+ e[R] = void 0;
1045
+ var r = !0;
1046
+ } catch {}
1047
+ var i = we.call(e);
1048
+ return r && (t ? e[R] = n : delete e[R]), i;
1049
+ }
1050
+ function Tt(e) {
1051
+ return typeof e.constructor == "function" && !At(e) ? Re(Ae(e)) : {};
1052
+ }
1053
+ function Et(e, t) {
1054
+ var n = typeof e;
1055
+ return t ??= o, !!t && (n == "number" || n != "symbol" && ce.test(e)) && e > -1 && e % 1 == 0 && e < t;
1056
+ }
1057
+ function Dt(e, t, n) {
1058
+ if (!Q(n)) return !1;
1059
+ var r = typeof t;
1060
+ return (r == "number" ? zt(n) && Et(t, n.length) : r == "string" && t in n) ? Z(n[t], e) : !1;
1061
+ }
1062
+ function Ot(e) {
1063
+ var t = typeof e;
1064
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
1065
+ }
1066
+ function kt(e) {
1067
+ return !!Ce && Ce in e;
1068
+ }
1069
+ function At(e) {
1070
+ var t = e && e.constructor;
1071
+ return e === (typeof t == "function" && t.prototype || N);
1072
+ }
1073
+ function jt(e) {
1074
+ var t = [];
1075
+ if (e != null) for (var n in Object(e)) t.push(n);
1076
+ return t;
1077
+ }
1078
+ function Mt(e) {
1079
+ return we.call(e);
1080
+ }
1081
+ function Nt(e, t, n) {
1082
+ return t = Fe(t === void 0 ? e.length - 1 : t, 0), function() {
1083
+ for (var r = arguments, i = -1, a = Fe(r.length - t, 0), o = Array(a); ++i < a;) o[i] = r[t + i];
1084
+ i = -1;
1085
+ for (var s = Array(t + 1); ++i < t;) s[i] = r[i];
1086
+ return s[t] = n(o), ge(e, this, s);
1087
+ };
1088
+ }
1089
+ function X(e, t) {
1090
+ if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__") return e[t];
1091
+ }
1092
+ var Pt = Ft(ht);
1093
+ function Ft(e) {
1094
+ var t = 0, n = 0;
1095
+ return function() {
1096
+ var r = Ie(), o = a - (r - n);
1097
+ if (n = r, o > 0) {
1098
+ if (++t >= i) return arguments[0];
1099
+ } else t = 0;
1100
+ return e.apply(void 0, arguments);
1101
+ };
1102
+ }
1103
+ function It(e) {
1104
+ if (e != null) {
1105
+ try {
1106
+ return F.call(e);
1107
+ } catch {}
1108
+ try {
1109
+ return e + "";
1110
+ } catch {}
1111
+ }
1112
+ return "";
1113
+ }
1114
+ function Z(e, t) {
1115
+ return e === t || e !== e && t !== t;
1116
+ }
1117
+ var Lt = ct(function() {
1118
+ return arguments;
1119
+ }()) ? ct : function(e) {
1120
+ return $(e) && I.call(e, "callee") && !Me.call(e, "callee");
1121
+ }, Rt = Array.isArray;
1122
+ function zt(e) {
1123
+ return e != null && Ut(e.length) && !Ht(e);
1124
+ }
1125
+ function Bt(e) {
1126
+ return $(e) && zt(e);
1127
+ }
1128
+ var Vt = Pe || Zt;
1129
+ function Ht(e) {
1130
+ if (!Q(e)) return !1;
1131
+ var t = J(e);
1132
+ return t == p || t == m || t == l || t == y;
1133
+ }
1134
+ function Ut(e) {
1135
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= o;
1136
+ }
1137
+ function Q(e) {
1138
+ var t = typeof e;
1139
+ return e != null && (t == "object" || t == "function");
1140
+ }
1141
+ function $(e) {
1142
+ return typeof e == "object" && !!e;
1143
+ }
1144
+ function Wt(e) {
1145
+ if (!$(e) || J(e) != v) return !1;
1146
+ var t = Ae(e);
1147
+ if (t === null) return !0;
1148
+ var n = I.call(t, "constructor") && t.constructor;
1149
+ return typeof n == "function" && n instanceof n && F.call(n) == Te;
1150
+ }
1151
+ var Gt = he ? ve(he) : ut;
1152
+ function Kt(e) {
1153
+ return bt(e, qt(e));
1154
+ }
1155
+ function qt(e) {
1156
+ return zt(e) ? at(e, !0) : dt(e);
1157
+ }
1158
+ var Jt = xt(function(e, t, n) {
1159
+ ft(e, t, n);
1160
+ });
1161
+ function Yt(e) {
1162
+ return function() {
1163
+ return e;
1164
+ };
1165
+ }
1166
+ function Xt(e) {
1167
+ return e;
1168
+ }
1169
+ function Zt() {
1170
+ return !1;
1171
+ }
1172
+ t.exports = Jt;
1173
+ })))();
1174
+ //#endregion
1175
+ //#region node_modules/@antintl/opensdk-core/lib/toolset/internalTracker.js
1176
+ var ee = new D({
1177
+ appId: "180020050100012557",
1178
+ performance: !1,
1179
+ error: !1
1180
+ }), te = "7981", ne = (e = "") => (t) => {
1181
+ ee.log({
1182
+ code: `${te}${e}`,
1183
+ ...t
1184
+ });
1185
+ }, re = ne(), ie = ne("event"), ae = (e, t, n, r) => {
1186
+ if (e === "ERROR") {
1187
+ let e = r || {};
1188
+ re({
1189
+ msg: e.code || n,
1190
+ d1: t,
1191
+ d2: e.reason,
1192
+ d3: e.stack,
1193
+ d4: e.traceId,
1194
+ d5: e.operationType,
1195
+ d6: n
1196
+ });
1197
+ } else if (n.includes(":HOST:") || n.includes(":WEBAPP:")) {
1198
+ let [i, a, o] = n.split(":");
1199
+ ie({
1200
+ msg: o,
1201
+ d1: t,
1202
+ d2: i,
1203
+ d3: a,
1204
+ d4: JSON.stringify(r),
1205
+ d5: "无",
1206
+ d6: e
1207
+ });
1208
+ }
1209
+ window.sdkDebugger?.log(e, t, n, r);
1210
+ }, O = "PROD", k = {
1211
+ DEV: "https://sdk-dev.marmot-cloud.com/package/worldfirst-js/1.0.0/dist/index.js",
1212
+ LOCAL: "http://localhost:7981/index.js",
1213
+ PROD: "http://js-dev.worldfirst.com/v1/dist/index.js"
1214
+ }, oe = (0, r.createLoader)({
1215
+ sdkURL: k[O],
472
1216
  globalName: "WorldFirstSDK",
473
1217
  namespace: "WorldFirstSDK"
474
- }), i = async (e) => {
475
- let { env: t, ...n } = e || {}, i = t || "prod";
476
- return r({
1218
+ }), se = async (e) => {
1219
+ let { env: t, ...n } = e || {}, r = t || "prod";
1220
+ return ae("INFO", "SDK_INTERNAL", `loadWorldFirst stageName: ${O}`, k), oe({
477
1221
  ...n,
478
- env: i
1222
+ env: r
479
1223
  });
480
1224
  };
481
1225
  //#endregion
482
- export { i as loadWorldFirst };
1226
+ export { se as loadWorldFirst };