ysyt-react-agent-lib 1.2.35 → 1.2.36

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.
@@ -2184,7 +2184,7 @@ const kb = "5.24.0", Qv = {
2184
2184
  wireframe: !1,
2185
2185
  // Motion
2186
2186
  motion: !0
2187
- }), Mn = Math.round;
2187
+ }), Tn = Math.round;
2188
2188
  function Fl(t, e) {
2189
2189
  const n = t.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [], r = n.map((i) => parseFloat(i));
2190
2190
  for (let i = 0; i < 3; i += 1)
@@ -2252,7 +2252,7 @@ class Wt {
2252
2252
  getHue() {
2253
2253
  if (typeof this._h > "u") {
2254
2254
  const e = this.getMax() - this.getMin();
2255
- e === 0 ? this._h = 0 : this._h = Mn(60 * (this.r === this.getMax() ? (this.g - this.b) / e + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / e + 2 : (this.r - this.g) / e + 4));
2255
+ e === 0 ? this._h = 0 : this._h = Tn(60 * (this.r === this.getMax() ? (this.g - this.b) / e + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / e + 2 : (this.r - this.g) / e + 4));
2256
2256
  }
2257
2257
  return this._h;
2258
2258
  }
@@ -2304,10 +2304,10 @@ class Wt {
2304
2304
  */
2305
2305
  mix(e, n = 50) {
2306
2306
  const r = this._c(e), i = n / 100, o = (s) => (r[s] - this[s]) * i + this[s], a = {
2307
- r: Mn(o("r")),
2308
- g: Mn(o("g")),
2309
- b: Mn(o("b")),
2310
- a: Mn(o("a") * 100) / 100
2307
+ r: Tn(o("r")),
2308
+ g: Tn(o("g")),
2309
+ b: Tn(o("b")),
2310
+ a: Tn(o("a") * 100) / 100
2311
2311
  };
2312
2312
  return this._c(a);
2313
2313
  }
@@ -2336,7 +2336,7 @@ class Wt {
2336
2336
  }, e);
2337
2337
  }
2338
2338
  onBackground(e) {
2339
- const n = this._c(e), r = this.a + n.a * (1 - this.a), i = (o) => Mn((this[o] * this.a + n[o] * n.a * (1 - this.a)) / r);
2339
+ const n = this._c(e), r = this.a + n.a * (1 - this.a), i = (o) => Tn((this[o] * this.a + n[o] * n.a * (1 - this.a)) / r);
2340
2340
  return this._c({
2341
2341
  r: i("r"),
2342
2342
  g: i("g"),
@@ -2367,7 +2367,7 @@ class Wt {
2367
2367
  e += r.length === 2 ? r : "0" + r;
2368
2368
  const i = (this.b || 0).toString(16);
2369
2369
  if (e += i.length === 2 ? i : "0" + i, typeof this.a == "number" && this.a >= 0 && this.a < 1) {
2370
- const o = Mn(this.a * 255).toString(16);
2370
+ const o = Tn(this.a * 255).toString(16);
2371
2371
  e += o.length === 2 ? o : "0" + o;
2372
2372
  }
2373
2373
  return e;
@@ -2383,7 +2383,7 @@ class Wt {
2383
2383
  }
2384
2384
  /** CSS support color pattern */
2385
2385
  toHslString() {
2386
- const e = this.getHue(), n = Mn(this.getSaturation() * 100), r = Mn(this.getLightness() * 100);
2386
+ const e = this.getHue(), n = Tn(this.getSaturation() * 100), r = Tn(this.getLightness() * 100);
2387
2387
  return this.a !== 1 ? `hsla(${e},${n}%,${r}%,${this.a})` : `hsl(${e},${n}%,${r}%)`;
2388
2388
  }
2389
2389
  /** Same as toHsb */
@@ -2438,14 +2438,14 @@ class Wt {
2438
2438
  a: i
2439
2439
  }) {
2440
2440
  if (this._h = e % 360, this._s = n, this._l = r, this.a = typeof i == "number" ? i : 1, n <= 0) {
2441
- const g = Mn(r * 255);
2441
+ const g = Tn(r * 255);
2442
2442
  this.r = g, this.g = g, this.b = g;
2443
2443
  }
2444
2444
  let o = 0, a = 0, s = 0;
2445
2445
  const A = e / 60, l = (1 - Math.abs(2 * r - 1)) * n, u = l * (1 - Math.abs(A % 2 - 1));
2446
2446
  A >= 0 && A < 1 ? (o = l, a = u) : A >= 1 && A < 2 ? (o = u, a = l) : A >= 2 && A < 3 ? (a = l, s = u) : A >= 3 && A < 4 ? (a = u, s = l) : A >= 4 && A < 5 ? (o = u, s = l) : A >= 5 && A < 6 && (o = l, s = u);
2447
2447
  const d = r - l / 2;
2448
- this.r = Mn((o + d) * 255), this.g = Mn((a + d) * 255), this.b = Mn((s + d) * 255);
2448
+ this.r = Tn((o + d) * 255), this.g = Tn((a + d) * 255), this.b = Tn((s + d) * 255);
2449
2449
  }
2450
2450
  fromHsv({
2451
2451
  h: e,
@@ -2454,10 +2454,10 @@ class Wt {
2454
2454
  a: i
2455
2455
  }) {
2456
2456
  this._h = e % 360, this._s = n, this._v = r, this.a = typeof i == "number" ? i : 1;
2457
- const o = Mn(r * 255);
2457
+ const o = Tn(r * 255);
2458
2458
  if (this.r = o, this.g = o, this.b = o, n <= 0)
2459
2459
  return;
2460
- const a = e / 60, s = Math.floor(a), A = a - s, l = Mn(r * (1 - n) * 255), u = Mn(r * (1 - n * A) * 255), d = Mn(r * (1 - n * (1 - A)) * 255);
2460
+ const a = e / 60, s = Math.floor(a), A = a - s, l = Tn(r * (1 - n) * 255), u = Tn(r * (1 - n * A) * 255), d = Tn(r * (1 - n * (1 - A)) * 255);
2461
2461
  switch (s) {
2462
2462
  case 0:
2463
2463
  this.g = d, this.b = l;
@@ -2501,7 +2501,7 @@ class Wt {
2501
2501
  fromRgbString(e) {
2502
2502
  const n = Fl(e, (r, i) => (
2503
2503
  // Convert percentage to number. e.g. 50% -> 128
2504
- i.includes("%") ? Mn(r / 100 * 255) : r
2504
+ i.includes("%") ? Tn(r / 100 * 255) : r
2505
2505
  ));
2506
2506
  this.r = n[0], this.g = n[1], this.b = n[2], this.a = n[3];
2507
2507
  }
@@ -5832,7 +5832,7 @@ const cw = function(t, e) {
5832
5832
  throw d !== n && A < t.length && x({ type: "end" }), M = p, E = g < t.length ? t.charAt(g) : null, b = g < t.length ? O(g, g + 1) : O(g, g), new Qf(Qf.buildMessage(M, E), M, E, b);
5833
5833
  var M, E, b;
5834
5834
  };
5835
- var In;
5835
+ var xn;
5836
5836
  (function(t) {
5837
5837
  t.parse = function(e, n) {
5838
5838
  const r = { startRule: n };
@@ -5849,7 +5849,7 @@ var In;
5849
5849
  const n = t.parse(e, "SIP_URI");
5850
5850
  return n !== -1 ? n : void 0;
5851
5851
  };
5852
- })(In = In || (In = {}));
5852
+ })(xn = xn || (xn = {}));
5853
5853
  const uw = { 100: "Trying", 180: "Ringing", 181: "Call Is Being Forwarded", 182: "Queued", 183: "Session Progress", 199: "Early Dialog Terminated", 200: "OK", 202: "Accepted", 204: "No Notification", 300: "Multiple Choices", 301: "Moved Permanently", 302: "Moved Temporarily", 305: "Use Proxy", 380: "Alternative Service", 400: "Bad Request", 401: "Unauthorized", 402: "Payment Required", 403: "Forbidden", 404: "Not Found", 405: "Method Not Allowed", 406: "Not Acceptable", 407: "Proxy Authentication Required", 408: "Request Timeout", 410: "Gone", 412: "Conditional Request Failed", 413: "Request Entity Too Large", 414: "Request-URI Too Long", 415: "Unsupported Media Type", 416: "Unsupported URI Scheme", 417: "Unknown Resource-Priority", 420: "Bad Extension", 421: "Extension Required", 422: "Session Interval Too Small", 423: "Interval Too Brief", 428: "Use Identity Header", 429: "Provide Referrer Identity", 430: "Flow Failed", 433: "Anonymity Disallowed", 436: "Bad Identity-Info", 437: "Unsupported Certificate", 438: "Invalid Identity Header", 439: "First Hop Lacks Outbound Support", 440: "Max-Breadth Exceeded", 469: "Bad Info Package", 470: "Consent Needed", 478: "Unresolvable Destination", 480: "Temporarily Unavailable", 481: "Call/Transaction Does Not Exist", 482: "Loop Detected", 483: "Too Many Hops", 484: "Address Incomplete", 485: "Ambiguous", 486: "Busy Here", 487: "Request Terminated", 488: "Not Acceptable Here", 489: "Bad Event", 491: "Request Pending", 493: "Undecipherable", 494: "Security Agreement Required", 500: "Internal Server Error", 501: "Not Implemented", 502: "Bad Gateway", 503: "Service Unavailable", 504: "Server Time-out", 505: "Version Not Supported", 513: "Message Too Large", 580: "Precondition Failure", 600: "Busy Everywhere", 603: "Decline", 604: "Does Not Exist Anywhere", 606: "Not Acceptable" };
5854
5854
  function Ji(t, e = 32) {
5855
5855
  let n = "";
@@ -5897,7 +5897,7 @@ class m0 {
5897
5897
  if (e = _r(e), !this.headers[e] || n >= this.headers[e].length) return;
5898
5898
  const r = this.headers[e][n], i = r.raw;
5899
5899
  if (r.parsed) return r.parsed;
5900
- const o = In.parse(i, e.replace(/-/g, "_"));
5900
+ const o = xn.parse(i, e.replace(/-/g, "_"));
5901
5901
  return o === -1 ? void this.headers[e].splice(n, 1) : (r.parsed = o, o);
5902
5902
  }
5903
5903
  s(e, n = 0) {
@@ -6370,7 +6370,7 @@ let tu = class E0 {
6370
6370
  if (e.message.hasHeader("P-Asserted-Identity")) {
6371
6371
  const i = e.message.getHeader("P-Asserted-Identity");
6372
6372
  if (!i) throw new Error("Header undefined.");
6373
- this._assertedIdentity = In.nameAddrHeaderParse(i);
6373
+ this._assertedIdentity = xn.nameAddrHeaderParse(i);
6374
6374
  }
6375
6375
  const r = { sessionDescriptionHandlerOptions: this.sessionDescriptionHandlerOptionsReInvite, sessionDescriptionHandlerModifiers: this.sessionDescriptionHandlerModifiersReInvite };
6376
6376
  this.generateResponseOfferAnswerInDialog(r).then((i) => {
@@ -6597,7 +6597,7 @@ let nu = class extends tu {
6597
6597
  }, A);
6598
6598
  }
6599
6599
  const a = this.request.getHeader("P-Asserted-Identity");
6600
- a && (this._assertedIdentity = In.nameAddrHeaderParse(a)), this._contact = this.userAgent.contact.toString();
6600
+ a && (this._assertedIdentity = xn.nameAddrHeaderParse(a)), this._contact = this.userAgent.contact.toString();
6601
6601
  const s = r.parseHeader("Content-Disposition");
6602
6602
  s && s.type === "render" && (this._renderbody = r.body, this._rendertype = r.getHeader("Content-Type")), this._id = r.callId + r.fromTag, this.userAgent._sessions[this._id] = this;
6603
6603
  }
@@ -6784,9 +6784,9 @@ let nu = class extends tu {
6784
6784
  const o = r.anonymous || !1, a = e.contact.toString({ anonymous: o, outbound: o ? !e.contact.tempGruu : !e.contact.pubGruu });
6785
6785
  o && e.configuration.uri && (i.params.fromDisplayName = "Anonymous", i.params.fromUri = "sip:anonymous@anonymous.invalid");
6786
6786
  let s = e.userAgentCore.configuration.aor;
6787
- if (i.params.fromUri && (s = typeof i.params.fromUri == "string" ? In.URIParse(i.params.fromUri) : i.params.fromUri), !s) throw new TypeError("Invalid from URI: " + i.params.fromUri);
6787
+ if (i.params.fromUri && (s = typeof i.params.fromUri == "string" ? xn.URIParse(i.params.fromUri) : i.params.fromUri), !s) throw new TypeError("Invalid from URI: " + i.params.fromUri);
6788
6788
  let A = n;
6789
- if (i.params.toUri && (A = typeof i.params.toUri == "string" ? In.URIParse(i.params.toUri) : i.params.toUri), !A) throw new TypeError("Invalid to URI: " + i.params.toUri);
6789
+ if (i.params.toUri && (A = typeof i.params.toUri == "string" ? xn.URIParse(i.params.toUri) : i.params.toUri), !A) throw new TypeError("Invalid to URI: " + i.params.toUri);
6790
6790
  const l = Object.assign({}, i.params);
6791
6791
  l.fromTag = this.fromTag;
6792
6792
  const u = (i.extraHeaders || []).slice();
@@ -6880,7 +6880,7 @@ let nu = class extends tu {
6880
6880
  onAccept(e) {
6881
6881
  if (this.logger.log("Inviter.onAccept"), this.state !== he.Establishing) return this.logger.error(`Accept received while in state ${this.state}, dropping response`), Promise.reject(new Error(`Invalid session state ${this.state}`));
6882
6882
  const n = e.message, r = e.session;
6883
- switch (n.hasHeader("P-Asserted-Identity") && (this._assertedIdentity = In.nameAddrHeaderParse(n.getHeader("P-Asserted-Identity"))), r.delegate = { onAck: (i) => this.onAckRequest(i), onBye: (i) => this.onByeRequest(i), onInfo: (i) => this.onInfoRequest(i), onInvite: (i) => this.onInviteRequest(i), onMessage: (i) => this.onMessageRequest(i), onNotify: (i) => this.onNotifyRequest(i), onPrack: (i) => this.onPrackRequest(i), onRefer: (i) => this.onReferRequest(i) }, this._dialog = r, r.signalingState) {
6883
+ switch (n.hasHeader("P-Asserted-Identity") && (this._assertedIdentity = xn.nameAddrHeaderParse(n.getHeader("P-Asserted-Identity"))), r.delegate = { onAck: (i) => this.onAckRequest(i), onBye: (i) => this.onByeRequest(i), onInfo: (i) => this.onInfoRequest(i), onInvite: (i) => this.onInviteRequest(i), onMessage: (i) => this.onMessageRequest(i), onNotify: (i) => this.onNotifyRequest(i), onPrack: (i) => this.onPrackRequest(i), onRefer: (i) => this.onReferRequest(i) }, this._dialog = r, r.signalingState) {
6884
6884
  case Qe.Initial:
6885
6885
  case Qe.HaveLocalOffer:
6886
6886
  return this.logger.error("Received 2xx response to INVITE without a session description"), this.ackAndBye(e, 400, "Missing session description"), this.stateTransition(he.Terminated), Promise.reject(new Error("Bad Media Description"));
@@ -6928,7 +6928,7 @@ let nu = class extends tu {
6928
6928
  if (this.logger.log("Inviter.onProgress"), this.state !== he.Establishing) return this.logger.error(`Progress received while in state ${this.state}, dropping response`), Promise.reject(new Error(`Invalid session state ${this.state}`));
6929
6929
  if (!this.outgoingInviteRequest) throw new Error("Outgoing INVITE request undefined.");
6930
6930
  const r = e.message, i = e.session;
6931
- r.hasHeader("P-Asserted-Identity") && (this._assertedIdentity = In.nameAddrHeaderParse(r.getHeader("P-Asserted-Identity")));
6931
+ r.hasHeader("P-Asserted-Identity") && (this._assertedIdentity = xn.nameAddrHeaderParse(r.getHeader("P-Asserted-Identity")));
6932
6932
  const o = r.getHeader("require"), a = r.getHeader("rseq"), s = !!(o && o.includes("100rel") && a && Number(a)), A = [];
6933
6933
  switch (s && A.push("RAck: " + r.getHeader("rseq") + " " + r.getHeader("cseq")), i.signalingState) {
6934
6934
  case Qe.Initial:
@@ -6982,7 +6982,7 @@ let ru = class zi {
6982
6982
  this.disposed = !1, this._contacts = [], this._retryAfter = void 0, this._state = jt.Initial, this._waiting = !1, this._stateEventEmitter = new Za(), this._waitingEventEmitter = new Za(), this.userAgent = e;
6983
6983
  const r = e.configuration.uri.clone();
6984
6984
  if (r.user = void 0, this.options = Object.assign(Object.assign(Object.assign({}, zi.defaultOptions()), { registrar: r }), zi.stripUndefinedProperties(n)), this.options.extraContactHeaderParams = (this.options.extraContactHeaderParams || []).slice(), this.options.extraHeaders = (this.options.extraHeaders || []).slice(), !this.options.registrar) throw new Error("Registrar undefined.");
6985
- if (this.options.registrar = this.options.registrar.clone(), this.options.regId && !this.options.instanceId ? this.options.instanceId = this.userAgent.instanceId : !this.options.regId && this.options.instanceId && (this.options.regId = 1), this.options.instanceId && In.parse(this.options.instanceId, "uuid") === -1) throw new Error("Invalid instanceId.");
6985
+ if (this.options.registrar = this.options.registrar.clone(), this.options.regId && !this.options.instanceId ? this.options.instanceId = this.userAgent.instanceId : !this.options.regId && this.options.instanceId && (this.options.regId = 1), this.options.instanceId && xn.parse(this.options.instanceId, "uuid") === -1) throw new Error("Invalid instanceId.");
6986
6986
  if (this.options.regId && this.options.regId < 0) throw new Error("Invalid regId.");
6987
6987
  const i = this.options.registrar, o = this.options.params && this.options.params.fromUri || e.userAgentCore.configuration.aor, a = this.options.params && this.options.params.toUri || e.configuration.uri, s = this.options.params || {}, A = (n.extraHeaders || []).slice();
6988
6988
  if (this.request = e.userAgentCore.makeOutgoingRequestMessage(We.REGISTER, i, o, a, s, A, void 0), this.expires = this.options.expires || zi.defaultExpires, this.expires < 0) throw new Error("Invalid expires.");
@@ -7060,11 +7060,11 @@ let ru = class zi {
7060
7060
  if (o === void 0) return this.logger.error("Contact pointing to us is missing expires parameter, dropping response"), this.unregistered(), void this.waitingToggle(!1);
7061
7061
  if (a.hasParam("temp-gruu")) {
7062
7062
  const A = a.getParam("temp-gruu");
7063
- A && (this.userAgent.contact.tempGruu = In.URIParse(A.replace(/"/g, "")));
7063
+ A && (this.userAgent.contact.tempGruu = xn.URIParse(A.replace(/"/g, "")));
7064
7064
  }
7065
7065
  if (a.hasParam("pub-gruu")) {
7066
7066
  const A = a.getParam("pub-gruu");
7067
- A && (this.userAgent.contact.pubGruu = In.URIParse(A.replace(/"/g, "")));
7067
+ A && (this.userAgent.contact.pubGruu = xn.URIParse(A.replace(/"/g, "")));
7068
7068
  }
7069
7069
  this.registered(o), e.requestDelegate && e.requestDelegate.onAccept && e.requestDelegate.onAccept(i), this.waitingToggle(!1);
7070
7070
  }, onProgress: (i) => {
@@ -7426,7 +7426,7 @@ function S0(t, e) {
7426
7426
  r.setHeader("to", l), u = r.parseHeader("to"), u && (r.to = u, r.toTag = u.getParam("tag"));
7427
7427
  break;
7428
7428
  case "record-route":
7429
- if (u = In.parse(l, "Record_Route"), u === -1) {
7429
+ if (u = xn.parse(l, "Record_Route"), u === -1) {
7430
7430
  u = void 0;
7431
7431
  break;
7432
7432
  }
@@ -7444,7 +7444,7 @@ function S0(t, e) {
7444
7444
  break;
7445
7445
  case "contact":
7446
7446
  case "m":
7447
- if (u = In.parse(l, "Contact"), u === -1) {
7447
+ if (u = xn.parse(l, "Contact"), u === -1) {
7448
7448
  u = void 0;
7449
7449
  break;
7450
7450
  }
@@ -7489,7 +7489,7 @@ function S0(t, e) {
7489
7489
  let o = 0, a = r.indexOf(`\r
7490
7490
  `);
7491
7491
  if (a === -1) return void i.warn("no CRLF found, not a SIP message, discarded");
7492
- const s = r.substring(0, a), A = In.parse(s, "Request_Response");
7492
+ const s = r.substring(0, a), A = xn.parse(s, "Request_Response");
7493
7493
  let l, u;
7494
7494
  if (A !== -1) {
7495
7495
  for (A.status_code ? (l = new ji(), l.statusCode = A.status_code, l.reasonPhrase = A.reason_phrase) : (l = new Qo(), l.method = A.method, l.ruri = A.uri), l.data = r, o = a + 2; ; ) {
@@ -9456,7 +9456,7 @@ let N0 = class D0 {
9456
9456
  a !== void 0 && this.logger.warn('The transport option "wsServers" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'), s !== void 0 && this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'), a && !n.server && (typeof a == "string" && (n.server = a), a instanceof Array && (n.server = a[0]));
9457
9457
  }
9458
9458
  this.configuration = Object.assign(Object.assign({}, D0.defaultOptions), n);
9459
- const r = this.configuration.server, i = In.parse(r, "absoluteURI");
9459
+ const r = this.configuration.server, i = xn.parse(r, "absoluteURI");
9460
9460
  if (i === -1) throw this.logger.error(`Invalid WebSocket Server URL "${r}"`), new Error("Invalid WebSocket Server URL");
9461
9461
  if (!["wss", "ws", "udp"].includes(i.scheme)) throw this.logger.error(`Invalid scheme in WebSocket Server URL "${r}"`), new Error("Invalid scheme in WebSocket Server URL");
9462
9462
  this._protocol = i.scheme.toUpperCase();
@@ -9745,11 +9745,11 @@ let Hf = class Xs {
9745
9745
  const n = this.options.transportOptions, r = n.maxReconnectionAttempts, i = n.reconnectionTimeout;
9746
9746
  r !== void 0 && this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'), i !== void 0 && this.logger.warn('The transport option "reconnectionTimeout" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'), e.reconnectionDelay === void 0 && i !== void 0 && (this.options.reconnectionDelay = i), e.reconnectionAttempts === void 0 && r !== void 0 && (this.options.reconnectionAttempts = r);
9747
9747
  }
9748
- if (e.reconnectionDelay !== void 0 && this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'), e.reconnectionAttempts !== void 0 && this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'), this._transport = new this.options.transportConstructor(this.getLogger("sip.Transport"), this.options.transportOptions), this.initTransportCallbacks(), this._contact = this.initContact(), this._instanceId = this.options.instanceId ? this.options.instanceId : Xs.newUUID(), In.parse(this._instanceId, "uuid") === -1) throw new Error("Invalid instanceId.");
9748
+ if (e.reconnectionDelay !== void 0 && this.logger.warn('The user agent option "reconnectionDelay" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'), e.reconnectionAttempts !== void 0 && this.logger.warn('The user agent option "reconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'), this._transport = new this.options.transportConstructor(this.getLogger("sip.Transport"), this.options.transportOptions), this.initTransportCallbacks(), this._contact = this.initContact(), this._instanceId = this.options.instanceId ? this.options.instanceId : Xs.newUUID(), xn.parse(this._instanceId, "uuid") === -1) throw new Error("Invalid instanceId.");
9749
9749
  this._userAgentCore = this.initCore();
9750
9750
  }
9751
9751
  static makeURI(e) {
9752
- return In.URIParse(e);
9752
+ return xn.URIParse(e);
9753
9753
  }
9754
9754
  static defaultOptions() {
9755
9755
  return { allowLegacyNotifications: !1, authorizationHa1: "", authorizationPassword: "", authorizationUsername: "", delegate: {}, contactName: "", contactParams: { transport: "ws" }, displayName: "", forceRport: !1, gracefulShutdown: !0, hackAllowUnregisteredOptionTags: !1, hackIpInContact: !1, hackViaTcp: !1, instanceId: "", instanceIdAlwaysAdded: !1, logBuiltinEnabled: !0, logConfiguration: !0, logConnector: () => {
@@ -9991,12 +9991,12 @@ let Hf = class Xs {
9991
9991
  r && r.forEach((i) => i(n));
9992
9992
  }
9993
9993
  };
9994
- var Nt, Tn, ot, ur, ie, Ge, zt;
9994
+ var Nt, wn, ot, ur, ie, Ge, zt;
9995
9995
  (function(t) {
9996
9996
  t[t.IDLE = 1] = "IDLE", t[t.BUSY = 2] = "BUSY", t[t.RINGING = 3] = "RINGING", t[t.OFFLINE = 0] = "OFFLINE", t[t.UNREGISTERED = 4] = "UNREGISTERED";
9997
9997
  })(Nt || (Nt = {})), function(t) {
9998
9998
  t.OUTGOING = "outgoing", t.INCOMING = "incoming", t.CONSULT = "consult", t.MEETING = "meeting", t.TRANSFER = "transfer", t.PREDICT_OUT_CALL = "predict_out_call";
9999
- }(Tn || (Tn = {})), function(t) {
9999
+ }(wn || (wn = {})), function(t) {
10000
10000
  t[t.OUT_CALL = 100] = "OUT_CALL", t[t.AGENT_STATE = 101] = "AGENT_STATE", t[t.OUT_CALL_INCOMING_CALL = 102] = "OUT_CALL_INCOMING_CALL", t[t.OUT_CALL_RINGING = 103] = "OUT_CALL_RINGING", t[t.OUT_CALL_ANSWER = 104] = "OUT_CALL_ANSWER", t[t.CALL_HOLD = 105] = "CALL_HOLD", t[t.CALL_UNHOLD = 106] = "CALL_UNHOLD", t[t.OUT_CALL_END = 107] = "OUT_CALL_END", t[t.CONSULT_REQUEST = 108] = "CONSULT_REQUEST", t[t.CONSULT_RINGING = 109] = "CONSULT_RINGING", t[t.CONSULT_ANSWER = 110] = "CONSULT_ANSWER", t[t.CONSULT_FAIL = 111] = "CONSULT_FAIL", t[t.MUTE = 112] = "MUTE", t[t.UNMUTE = 113] = "UNMUTE", t[t.CONSULT_CALL_IN = 114] = "CONSULT_CALL_IN", t[t.CONSULT_CALL_IN_SUCCESS = 115] = "CONSULT_CALL_IN_SUCCESS", t[t.CONSULT_RETURN_CALL = 125] = "CONSULT_RETURN_CALL", t[t.CONSULT_RETURN_CALL_SUCCESS = 126] = "CONSULT_RETURN_CALL_SUCCESS", t[t.CONSULT_TRANSFER = 116] = "CONSULT_TRANSFER", t[t.CONSULT_TRANSFER_FAILED = 118] = "CONSULT_TRANSFER_FAILED", t[t.CONSULT_TRANSFER_OFF_HOOK = 117] = "CONSULT_TRANSFER_OFF_HOOK", t[t.INCOMING_CALL = 119] = "INCOMING_CALL", t[t.INCOMING_CALL_OFF_HOOK = 120] = "INCOMING_CALL_OFF_HOOK", t[t.INCOMING_CALL_END = 121] = "INCOMING_CALL_END", t[t.SATISFACTION_EVALUATION = 122] = "SATISFACTION_EVALUATION", t[t.CONSULT_THREE_WAY = 123] = "CONSULT_THREE_WAY", t[t.CONSULT_THREE_WAY_RESULT = 124] = "CONSULT_THREE_WAY_RESULT", t[t.TRANSFER = 127] = "TRANSFER", t[t.TRANSFER_FAILED = 128] = "TRANSFER_FAILED", t[t.TRANSFER_INCOMING_CALL = 129] = "TRANSFER_INCOMING_CALL", t[t.TRANSFER_OFF_HOOK = 130] = "TRANSFER_OFF_HOOK", t[t.AGENT_HANGUP = 131] = "AGENT_HANGUP", t[t.KICK_OFFLINE = 132] = "KICK_OFFLINE", t[t.CONTINUOUS_NOT_ANSWER = 133] = "CONTINUOUS_NOT_ANSWER", t[t.PREVIEW_OUT_CALL = 134] = "PREVIEW_OUT_CALL", t[t.SIGN_OUT = 135] = "SIGN_OUT", t[t.SIGN_IN_SWITCH_DEVICE = 136] = "SIGN_IN_SWITCH_DEVICE", t[t.LISTEN_CALL_FAILED = 137] = "LISTEN_CALL_FAILED", t[t.LISTEN_INCOMING_CALL = 138] = "LISTEN_INCOMING_CALL", t[t.LISTEN_INCOMING_CALL_OFF_HOOK = 139] = "LISTEN_INCOMING_CALL_OFF_HOOK", t[t.EAR_SPEECH = 140] = "EAR_SPEECH", t[t.STOP_EAR_SPEECH = 141] = "STOP_EAR_SPEECH", t[t.CALL_FORCE_INSERT = 142] = "CALL_FORCE_INSERT", t[t.INTERNAL_CALL_START_CONSULT = 145] = "INTERNAL_CALL_START_CONSULT", t[t.INTERNAL_CALL_END_CONSULT = 146] = "INTERNAL_CALL_END_CONSULT", t[t.CALL_SIP_INCOMING_CALL = 147] = "CALL_SIP_INCOMING_CALL";
10001
10001
  }(ot || (ot = {})), function(t) {
10002
10002
  t.WEB_RTC_CONNECTING = "connecting", t.WEB_RTC_CONNECTED = "connected", t.WEB_RTC_DISCONNECTING = "disconnecting", t.WEB_RTC_DISCONNECTED = "disconnected", t.WEB_RTC_REGISTERED = "registered", t.WEB_RTC_UNREGISTERED = "unregistered", t.WEB_RTC_TERMINATED = "terminated", t.WEB_RTC_REGISTER_FAILED = "register_failed", t.WEB_RTC_ANSWER_FAILED = "answer_failed", t.WEB_RTC_SEND_DTMF = "send_dtmf";
@@ -10517,11 +10517,11 @@ function H0(t) {
10517
10517
  return i.json = async () => o, i;
10518
10518
  }] } });
10519
10519
  }
10520
- async function wn(t, e, n) {
10520
+ async function In(t, e, n) {
10521
10521
  const r = H0(n), i = "api/" + t.replace(/^\/+/, "");
10522
10522
  return r.post(i, { json: e }).json();
10523
10523
  }
10524
- const zf = (t, e) => wn(`${kr}/state/change?h=${e}`, t, { h: e }), Jw = () => async function(t, e) {
10524
+ const zf = (t, e) => In(`${kr}/state/change?h=${e}`, t, { h: e }), Jw = () => async function(t, e) {
10525
10525
  const n = H0(), r = t.replace(/^\/+/, "");
10526
10526
  return n.post(r, { json: e }).json();
10527
10527
  }("/heartbeat", {});
@@ -10543,7 +10543,7 @@ class an {
10543
10543
  const a = Z.agentInfo.agent_no;
10544
10544
  if (a) {
10545
10545
  const A = JSON.stringify({ level: r, module: i, content: e, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
10546
- (s = { agent_no: a, content: A }, wn("/v1/aicc/ccs/softphone/log", s)).catch(() => {
10546
+ (s = { agent_no: a, content: A }, In("/v1/aicc/ccs/softphone/log", s)).catch(() => {
10547
10547
  });
10548
10548
  }
10549
10549
  var s;
@@ -10688,7 +10688,7 @@ class _w {
10688
10688
  });
10689
10689
  }
10690
10690
  handleIncomingCall(e) {
10691
- this.incomingInvitation = e, this.handleSessionState(e, !1), e.progress({ statusCode: 180, reasonPhrase: "Ringing" }).catch((n) => console.error("发送 180 失败", n)), H.get("direction") === Tn.OUTGOING && this.answerCall();
10691
+ this.incomingInvitation = e, this.handleSessionState(e, !1), e.progress({ statusCode: 180, reasonPhrase: "Ringing" }).catch((n) => console.error("发送 180 失败", n)), H.get("direction") === wn.OUTGOING && this.answerCall();
10692
10692
  }
10693
10693
  async answerCall() {
10694
10694
  var e;
@@ -10824,7 +10824,7 @@ class Va {
10824
10824
  const { data: n, success: r } = e, { device: i } = n;
10825
10825
  i === 1 && await Va.initRtcFn(), this.roleData.changeDevice(i);
10826
10826
  const { agent_no: o } = Z.agentInfo;
10827
- await ((s) => wn(`${kr}/device/change`, s))({ agent_no: o, answer_device: i }), H.updateAnswerDevice(i);
10827
+ await ((s) => In(`${kr}/device/change`, s))({ agent_no: o, answer_device: i }), H.updateAnswerDevice(i);
10828
10828
  const a = H.get("actionConfigs");
10829
10829
  H.updateActionConfigs(a), i === 2 && Z.stateObject.state === Nt.UNREGISTERED && await this._changeState({ data: { ...Z.stateBeforeChange, state_name: Z.stateBeforeChange.state === Nt.IDLE ? "空闲" : "忙碌" } }, "q"), r == null || r({ code: 0, msg: "请求成功" });
10830
10830
  } catch (n) {
@@ -10840,7 +10840,7 @@ class Va {
10840
10840
  }
10841
10841
  async _agentLogin(e) {
10842
10842
  try {
10843
- const r = await (n = { agent_no: e }, wn(`${kr}/agent/login`, n));
10843
+ const r = await (n = { agent_no: e }, In(`${kr}/agent/login`, n));
10844
10844
  Z.agentInfo = r.data;
10845
10845
  } catch (r) {
10846
10846
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(r.message).msg), r;
@@ -10861,7 +10861,7 @@ class Va {
10861
10861
  try {
10862
10862
  const { phone: r } = e.data, i = {};
10863
10863
  au(r) ? i.trace_id = r : i.phone = r.replace(/[\s\r\n-]+/g, "");
10864
- const o = await ((a) => wn(`${_i}/crm/popups`, a))({ ...i });
10864
+ const o = await ((a) => In(`${_i}/crm/popups`, a))({ ...i });
10865
10865
  (n = e.success) == null || n.call(e, o);
10866
10866
  } catch (r) {
10867
10867
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(r.message).msg), r;
@@ -10884,7 +10884,7 @@ class Va {
10884
10884
  const { agent_no: n } = Z.agentInfo;
10885
10885
  try {
10886
10886
  this.roleData.agentInfo();
10887
- const i = await ((o) => wn(`${kr}/agent/free`, o))({ agent_no: n });
10887
+ const i = await ((o) => In(`${kr}/agent/free`, o))({ agent_no: n });
10888
10888
  (r = e.success) == null || r.call(e, i);
10889
10889
  } catch (i) {
10890
10890
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(i.message).msg), i;
@@ -10893,7 +10893,7 @@ class Va {
10893
10893
  async getAgentState(e) {
10894
10894
  var n;
10895
10895
  try {
10896
- const r = await wn(`${_i}/agent/statecfg/list`, {}), i = (r.data || []).filter((o) => o.enable === 0).filter((o) => o.state !== 0 && o.state !== 3).filter((o) => o.state_name !== "通话中" && o.state_name !== "整理" && o.state_name !== "未注册" && o.state_name !== "离线接听").map((o) => ({ state: o.state, state_name: o.state_name })).reverse();
10896
+ const r = await In(`${_i}/agent/statecfg/list`, {}), i = (r.data || []).filter((o) => o.enable === 0).filter((o) => o.state !== 0 && o.state !== 3).filter((o) => o.state_name !== "通话中" && o.state_name !== "整理" && o.state_name !== "未注册" && o.state_name !== "离线接听").map((o) => ({ state: o.state, state_name: o.state_name })).reverse();
10897
10897
  (n = e.success) == null || n.call(e, { ...r, data: i });
10898
10898
  } catch (r) {
10899
10899
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(r.message).msg), r;
@@ -10904,7 +10904,7 @@ class Va {
10904
10904
  try {
10905
10905
  this.roleData.agentInfo(), this.roleData.requestInfo(e), this.roleData.setAgentExplicit(e.data.number);
10906
10906
  const { agent_id: r } = Z.agentInfo;
10907
- await ((i) => wn(`${_i}/agent/update`, i))({ agent_id: r, out_display_number: e.data.number }), H.updateSelectOutNumber(e.data.number), (n = e.success) == null || n.call(e, { code: 0, msg: "请求成功" });
10907
+ await ((i) => In(`${_i}/agent/update`, i))({ agent_id: r, out_display_number: e.data.number }), H.updateSelectOutNumber(e.data.number), (n = e.success) == null || n.call(e, { code: 0, msg: "请求成功" });
10908
10908
  } catch (r) {
10909
10909
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(r.message).msg), r;
10910
10910
  }
@@ -10915,7 +10915,7 @@ class Va {
10915
10915
  this.roleData.requestInfo(e);
10916
10916
  const { agent_no: r } = e.data;
10917
10917
  if (!r) throw new Error(JSON.stringify({ code: 1, msg: 'Parameter "agent_no" is required' }));
10918
- const i = await ((o) => wn(`${kr}/agent/islogin`, o))({ agent_no: r });
10918
+ const i = await ((o) => In(`${kr}/agent/islogin`, o))({ agent_no: r });
10919
10919
  (n = e.success) == null || n.call(e, i);
10920
10920
  } catch (r) {
10921
10921
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(r.message).msg), r;
@@ -10924,7 +10924,7 @@ class Va {
10924
10924
  async getCallRecord(e) {
10925
10925
  try {
10926
10926
  this.roleData.agentInfo();
10927
- const { success: n } = e, r = /* @__PURE__ */ new Date(), i = new Date(r.getFullYear(), r.getMonth(), r.getDate(), 0, 0, 0), o = new Date(r.getFullYear(), r.getMonth(), r.getDate(), 23, 59, 59), a = [this.formatDate(i), this.formatDate(o)], { agent_no: s } = Z.agentInfo, A = await ((g) => wn(`${_i}/agent/recordpage`, g))({ start_time: a[0], end_time: a[1], page_no: 1, page_size: 10, agent_no_list: [s] }), { code: l, msg: u, data: d } = A;
10927
+ const { success: n } = e, r = /* @__PURE__ */ new Date(), i = new Date(r.getFullYear(), r.getMonth(), r.getDate(), 0, 0, 0), o = new Date(r.getFullYear(), r.getMonth(), r.getDate(), 23, 59, 59), a = [this.formatDate(i), this.formatDate(o)], { agent_no: s } = Z.agentInfo, A = await ((g) => In(`${_i}/agent/recordpage`, g))({ start_time: a[0], end_time: a[1], page_no: 1, page_size: 10, agent_no_list: [s] }), { code: l, msg: u, data: d } = A;
10928
10928
  n == null || n({ code: l, msg: u, data: d });
10929
10929
  } catch (n) {
10930
10930
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(n.message).msg), n;
@@ -10934,7 +10934,7 @@ class Va {
10934
10934
  this.roleData.agentInfo();
10935
10935
  try {
10936
10936
  const { agent_no: n } = Z.agentInfo, { data: r, success: i } = e;
10937
- await ((o) => wn(`${kr}/agent/logout`, o))({ ...r, agent_no: n }), i == null || i({ code: 0, msg: "" });
10937
+ await ((o) => In(`${kr}/agent/logout`, o))({ ...r, agent_no: n }), i == null || i({ code: 0, msg: "" });
10938
10938
  } catch (n) {
10939
10939
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(n.message).msg), n;
10940
10940
  }
@@ -10943,7 +10943,7 @@ class Va {
10943
10943
  try {
10944
10944
  const { agent_no: n } = Z.agentInfo, { data: r, success: i } = e;
10945
10945
  if (this.roleData.agentInfo(), this.roleData.requestInfo(e), !r.monitored_agent_no) throw new Error(JSON.stringify({ code: 1, msg: 'Parameter "monitored_agent_no" is required' }));
10946
- await ((o) => wn(`${kr}/call/monitor`, o))({ ...r, monitor_agent_no: n }), Z.monitoredAgentNo = r.monitored_agent_no, i == null || i({ code: 0, msg: "" });
10946
+ await ((o) => In(`${kr}/call/monitor`, o))({ ...r, monitor_agent_no: n }), Z.monitoredAgentNo = r.monitored_agent_no, i == null || i({ code: 0, msg: "" });
10947
10947
  } catch (n) {
10948
10948
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(n.message).msg), n;
10949
10949
  }
@@ -10954,7 +10954,7 @@ class Va {
10954
10954
  this.roleData.agentInfo();
10955
10955
  const { success: o } = e;
10956
10956
  if (!r) throw new Error(JSON.stringify({ code: 1, msg: "当前未有监听坐席" }));
10957
- await ((a) => wn(`${kr}/call/whisper`, a))({ monitored_agent_no: r, monitor_agent_no: i }), o == null || o({ code: 0, msg: "" });
10957
+ await ((a) => In(`${kr}/call/whisper`, a))({ monitored_agent_no: r, monitor_agent_no: i }), o == null || o({ code: 0, msg: "" });
10958
10958
  } catch (n) {
10959
10959
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(n.message).msg), n;
10960
10960
  }
@@ -10966,7 +10966,7 @@ class Va {
10966
10966
  const { agent_no: i } = n;
10967
10967
  this.roleData.agentInfo();
10968
10968
  const { success: o } = e;
10969
- await ((a) => wn(`${kr}/call/stopwhisper`, a))({ monitor_agent_no: i, monitored_agent_no: r }), o == null || o({ code: 0, msg: "" });
10969
+ await ((a) => In(`${kr}/call/stopwhisper`, a))({ monitor_agent_no: i, monitored_agent_no: r }), o == null || o({ code: 0, msg: "" });
10970
10970
  } catch (n) {
10971
10971
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(n.message).msg), n;
10972
10972
  }
@@ -10977,7 +10977,7 @@ class Va {
10977
10977
  this.roleData.agentInfo();
10978
10978
  const { success: o } = e;
10979
10979
  if (!r) throw new Error(JSON.stringify({ code: 1, msg: "当前未有监听坐席" }));
10980
- await ((a) => wn(`${kr}/call/bargein`, a))({ monitored_agent_no: r, monitor_agent_no: i }), o == null || o({ code: 0, msg: "" });
10980
+ await ((a) => In(`${kr}/call/bargein`, a))({ monitored_agent_no: r, monitor_agent_no: i }), o == null || o({ code: 0, msg: "" });
10981
10981
  } catch (n) {
10982
10982
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(n.message).msg), n;
10983
10983
  }
@@ -10988,7 +10988,7 @@ class Va {
10988
10988
  this.roleData.agentInfo();
10989
10989
  const { success: o } = e;
10990
10990
  if (!r) throw new Error(JSON.stringify({ code: 1, msg: "当前未有监听坐席" }));
10991
- await ((a) => wn(`${kr}/call/intercept`, a))({ monitored_agent_no: r, monitor_agent_no: i }), o == null || o({ code: 0, msg: "" });
10991
+ await ((a) => In(`${kr}/call/intercept`, a))({ monitored_agent_no: r, monitor_agent_no: i }), o == null || o({ code: 0, msg: "" });
10992
10992
  } catch (n) {
10993
10993
  throw ge.emit(Ge.FAIL_NOTIFICATION, JSON.parse(n.message).msg), n;
10994
10994
  }
@@ -11018,7 +11018,7 @@ class un {
11018
11018
  }
11019
11019
  inCallAutoAnswer() {
11020
11020
  const { soft_device_auto_answer: e, auto_answer_time: n } = Z.agentInfo, r = e === 1, i = H.get("direction");
11021
- if (r && i === Tn.INCOMING) {
11021
+ if (r && i === wn.INCOMING) {
11022
11022
  const o = Number(n) || 0;
11023
11023
  o > 0 && (Z.autoAnswerTimer = setTimeout(() => {
11024
11024
  var a;
@@ -11067,7 +11067,7 @@ class un {
11067
11067
  }
11068
11068
  if (o !== 0 && Jf("%cWebSocket 收到消息:", "color: blue; font-weight: bold;", i), o !== ot.OUT_CALL && o !== ot.PREVIEW_OUT_CALL || (Z.isAgentHangup = !1, s !== 0 ? (H.reset(), ge.emit(ie.OUT_FAILED, A), ge.emit(Ge.FAIL_NOTIFICATION, A), H.updateActionConfigs(Wn), setTimeout(() => {
11069
11069
  H.updateCustomerInfo(void 0);
11070
- }, 500), this.stateIdleChange("h")) : s === 0 && (ge.emit(ie.OUT_SUCCESS), Z.sessionId = a.session_id, H.updateIsCalling(!0), clearTimeout(Z.autoStateTimer))), o === ot.AGENT_STATE) {
11070
+ }, 500), this.stateIdleChange("h")) : s === 0 && (H.updateDirection(wn.OUTGOING), ge.emit(ie.OUT_SUCCESS), Z.sessionId = a.session_id, H.updateIsCalling(!0), clearTimeout(Z.autoStateTimer))), o === ot.AGENT_STATE) {
11071
11071
  const { state: d, state_name: g } = a;
11072
11072
  Z.stateObject = { state: d, state_name: g }, (u = Z.stateBeforeChange) != null && u.state || Z.stateObject.state !== Nt.IDLE && (Z.stateObject.state !== Nt.BUSY || g === "整理") || (Z.stateBeforeChange = Z.stateObject), g === "振铃中" && H.updateDisplayText(zt.AGENT_RINGING);
11073
11073
  const p = H.get("isCalling");
@@ -11084,14 +11084,14 @@ class un {
11084
11084
  else if (a.device_type === 4 && a.agent_no !== Z.agentInfo.agent_no) {
11085
11085
  ge.emit(ie.TRANSFER_FAILED, "未知原因"), ge.emit(Ge.FAIL_NOTIFICATION, "转接失败");
11086
11086
  const d = H.get("direction");
11087
- d === Tn.OUTGOING ? H.updateActionConfigs(Si) : d === Tn.INCOMING && H.updateActionConfigs(Ki);
11087
+ d === wn.OUTGOING ? H.updateActionConfigs(Si) : d === wn.INCOMING && H.updateActionConfigs(Ki);
11088
11088
  } else a.device_type === 5 && a.agent_no === Z.agentInfo.agent_no && (Z.monitoredAgentNo = "", Z.earSpeakAgent = "", H.reset(), ge.emit(ie.LISTEN_HANGUP, { session_id: a.session_id }), H.updateActionConfigs(Wn), this.putAgentState(!0, 5));
11089
11089
  } else if (o === ot.OUT_CALL_RINGING) a.type === 1 && (Z.isAgentHangup = !1, ge.emit(ie.OUT_RINGING, { session_id: Z.sessionId, type: a.type }), H.updateDisplayText(zt.RINGING));
11090
11090
  else if (o === ot.OUT_CALL_ANSWER) Z.isAgentHangup = !1, clearTimeout(Z.autoStateTimer), H.updateIsCalling(!0), H.updateOutCallIsAnswer(!0), H.updateDisplayText(zt.CALLING), a.direction === 8 ? (ge.emit(ie.INTERNAL_OUT_OFF_ANSWER, { session_id: Z.sessionId }), H.updateActionConfigs(Vl)) : (ge.emit(ie.OUT_OFF_ANSWER, { session_id: Z.sessionId }), H.updateActionConfigs(Si));
11091
11091
  else if (o === ot.CONSULT_RINGING) Z.isAgentHangup = !1, ge.emit(ie.CONSULT_RINGING, { session_id: a.session_id }), H.updateDisplayText(zt.AGENT_RINGING), H.updateActionConfigs([]), clearTimeout(Z.autoStateTimer);
11092
11092
  else if (o === ot.CONSULT_ANSWER) Z.isAgentHangup = !1, ge.emit(ie.CONSULT_OFF_HOOK, { session_id: a.session_id }), H.updateConsultIsAnswer(!0), H.updateDisplayText(zt.CONSULTING), H.updateActionConfigs(Yf);
11093
11093
  else if (o === ot.CONSULT_FAIL) ge.emit(ie.CONSULT_FAILED, { custom_reason: a.custom_reason }), H.updateDisplayText(zt.CALLING), H.updateActionConfigs(Si);
11094
- else if (o === ot.CONSULT_CALL_IN) Z.isAgentHangup = !1, ge.emit(ie.CONSULT_INCOMING, { agent_no: a.agent_no, agent_mane: a.agent_name, session_id: a.session_id }), Z.sessionId = a.session_id, H.updateIsCalling(!0), H.updateDirection(Tn.CONSULT), H.updateDisplayText(zt.CONSULT_CALL_IN), H.updateActionConfigs(Ts), Z.enableBrowserAlert && Fo.show("📞 咨询来电", `坐席 [${a.agent_name}] 正在咨询...`, () => {
11094
+ else if (o === ot.CONSULT_CALL_IN) Z.isAgentHangup = !1, ge.emit(ie.CONSULT_INCOMING, { agent_no: a.agent_no, agent_mane: a.agent_name, session_id: a.session_id }), Z.sessionId = a.session_id, H.updateIsCalling(!0), H.updateDirection(wn.CONSULT), H.updateDisplayText(zt.CONSULT_CALL_IN), H.updateActionConfigs(Ts), Z.enableBrowserAlert && Fo.show("📞 咨询来电", `坐席 [${a.agent_name}] 正在咨询...`, () => {
11095
11095
  ge.emit(Ge.NOTIFICATION_CLICK, { agent_mane: a.agent_name, agent_no: a.agent_no });
11096
11096
  }, Z.browserAlertTime);
11097
11097
  else if (o === ot.CONSULT_CALL_IN_SUCCESS) ge.emit(ie.CONSULT_CALL_IN_SUCCESS, { session_id: a.session_id }), H.updateConsultIsAnswer(!0), H.updateDisplayText(zt.CALLING), H.updateActionConfigs(e2);
@@ -11102,8 +11102,8 @@ class un {
11102
11102
  else if (o === ot.CALL_UNHOLD) s === 0 ? (H.updateDisplayText(zt.CALLING), H.updateIsHold(!1), ge.emit(ie.UNHOLD_SUCCESS)) : (ge.emit(ie.UNHOLD_FAILED, A), ge.emit(Ge.FAIL_NOTIFICATION, A));
11103
11103
  else if (o === ot.CONSULT_TRANSFER) Z.isAgentHangup = !1, s === 0 ? ge.emit(ie.CONSULT_TRANSFER_SUCCESS) : (ge.emit(ie.CONSULT_TRANSFER_FAILED, A), ge.emit(Ge.FAIL_NOTIFICATION, A));
11104
11104
  else if (o === ot.CONSULT_TRANSFER_FAILED) ge.emit(ie.CONSULT_TRANSFER_FAILED, a.status);
11105
- else if (o === ot.CONSULT_TRANSFER_OFF_HOOK) H.updateDirection(Tn.INCOMING), H.updateDisplayText(zt.CALLING), ge.emit(ie.CONSULT_TRANSFER_OFF_HOOK), H.updateActionConfigs(Ki), H.updateIncomingIsAnswer(!0), H.updateConsultIsAnswer(!1);
11106
- else if (o === ot.INCOMING_CALL) Z.isAgentHangup = !1, clearTimeout(Z.autoStateTimer), Z.sessionId = a.session_id, H.updateIsCalling(!0), H.updateDirection(Tn.INCOMING), H.updateDisplayText(zt.INCOMING_CALL), this.inCallAutoAnswer(), a.direction !== 1 && a.direction !== 4 && a.direction !== 7 || (this.getCustomerInfo(a.trace_id || a.customer_phone, "incoming_call"), ge.emit(ie.INCOMING_CALL, { customer_phone: a.customer_phone, trace_id: a.trace_id, session_id: a.session_id })), a.direction === 8 && (this.getCustomerInfo(a.trace_id || a.customer_phone, "incoming_call_in"), ge.emit(ie.INCOMING_CALL_IN, { customer_phone: a.customer_phone, trace_id: a.trace_id, session_id: a.session_id })), a.direction === 3 && (this.getCustomerInfo(a.trace_id || a.customer_phone, "predict_incoming_call"), ge.emit(ie.PREDICT_INCOMING_CALL, { customer_phone: a.customer_phone, trace_id: a.trace_id, session_id: a.session_id })), a.direction === 6 && (this.getCustomerInfo(a.trace_id || a.customer_phone, "dual_call_incoming_call"), ge.emit(ie.DUAL_CALL_INCOMING_CALL, { customer_phone: a.customer_phone, trace_id: a.trace_id, session_id: a.session_id })), H.updateActionConfigs(Ts), Z.enableBrowserAlert && Fo.show("📞 客户来电", `客户 [${a.customer_phone}] 正在呼入...`, () => {
11105
+ else if (o === ot.CONSULT_TRANSFER_OFF_HOOK) H.updateDirection(wn.INCOMING), H.updateDisplayText(zt.CALLING), ge.emit(ie.CONSULT_TRANSFER_OFF_HOOK), H.updateActionConfigs(Ki), H.updateIncomingIsAnswer(!0), H.updateConsultIsAnswer(!1);
11106
+ else if (o === ot.INCOMING_CALL) Z.isAgentHangup = !1, clearTimeout(Z.autoStateTimer), Z.sessionId = a.session_id, H.updateIsCalling(!0), H.updateDirection(wn.INCOMING), H.updateDisplayText(zt.INCOMING_CALL), this.inCallAutoAnswer(), a.direction !== 1 && a.direction !== 4 && a.direction !== 7 || (this.getCustomerInfo(a.trace_id || a.customer_phone, "incoming_call"), ge.emit(ie.INCOMING_CALL, { customer_phone: a.customer_phone, trace_id: a.trace_id, session_id: a.session_id })), a.direction === 8 && (this.getCustomerInfo(a.trace_id || a.customer_phone, "incoming_call_in"), ge.emit(ie.INCOMING_CALL_IN, { customer_phone: a.customer_phone, trace_id: a.trace_id, session_id: a.session_id })), a.direction === 3 && (this.getCustomerInfo(a.trace_id || a.customer_phone, "predict_incoming_call"), ge.emit(ie.PREDICT_INCOMING_CALL, { customer_phone: a.customer_phone, trace_id: a.trace_id, session_id: a.session_id })), a.direction === 6 && (this.getCustomerInfo(a.trace_id || a.customer_phone, "dual_call_incoming_call"), ge.emit(ie.DUAL_CALL_INCOMING_CALL, { customer_phone: a.customer_phone, trace_id: a.trace_id, session_id: a.session_id })), H.updateActionConfigs(Ts), Z.enableBrowserAlert && Fo.show("📞 客户来电", `客户 [${a.customer_phone}] 正在呼入...`, () => {
11107
11107
  ge.emit(Ge.NOTIFICATION_CLICK, { customer_phone: a.customer_phone });
11108
11108
  }, Z.browserAlertTime);
11109
11109
  else if (o === ot.INCOMING_CALL_OFF_HOOK) H.updateIncomingIsAnswer(!0), a.direction === 8 ? (H.updateActionConfigs(Vl), ge.emit(ie.INCOMING_CALL_IN_OFF_HOOK, { session_id: Z.sessionId })) : (H.updateActionConfigs(Ki), ge.emit(ie.INCOMING_CALL_OFF_HOOK, { session_id: Z.sessionId })), H.updateDisplayText(zt.CALLING);
@@ -11116,13 +11116,13 @@ class un {
11116
11116
  else if (a.device_type === 4 && a.agent_no !== Z.agentInfo.agent_no) {
11117
11117
  ge.emit(ie.TRANSFER_FAILED, "未知原因"), ge.emit(Ge.FAIL_NOTIFICATION, "转接失败");
11118
11118
  const d = H.get("direction");
11119
- d === Tn.OUTGOING ? H.updateActionConfigs(Si) : d === Tn.INCOMING && H.updateActionConfigs(Ki);
11119
+ d === wn.OUTGOING ? H.updateActionConfigs(Si) : d === wn.INCOMING && H.updateActionConfigs(Ki);
11120
11120
  } else a.device_type === 5 && a.agent_no === Z.agentInfo.agent_no && (this.putAgentState(!0, 5), Z.monitoredAgentNo = "", Z.earSpeakAgent = "", H.reset(), ge.emit(ie.LISTEN_HANGUP, { session_id: a.session_id }), H.updateActionConfigs(Wn));
11121
11121
  else this.putAgentState(!0), H.reset(), ge.emit(ie.INCOMING_CALL_END, { session_id: a.session_id, isAgentHangup: Z.isAgentHangup }), H.updateActionConfigs(Wn);
11122
11122
  } else if (o === ot.SATISFACTION_EVALUATION) s === 0 ? ge.emit(ie.SATISFACTION_EVALUATION_SUCCESS) : (ge.emit(ie.SATISFACTION_EVALUATION_FAILED, A), ge.emit(Ge.FAIL_NOTIFICATION, A));
11123
11123
  else if (o === ot.CONSULT_THREE_WAY) s !== 0 ? (ge.emit(ie.CONSULT_THREE_WAY_FAILED, A), ge.emit(Ge.FAIL_NOTIFICATION, A)) : s === 0 && H.updateIsMeeting(!0);
11124
- else if (o === ot.CONSULT_THREE_WAY_RESULT) a.status === "success" ? (H.updateDirection(Tn.MEETING), H.updateDisplayText(zt.MEETING), H.updateActionConfigs(t2), ge.emit(ie.CONSULT_THREE_WAY_SUCCESS)) : (ge.emit(ie.CONSULT_THREE_WAY_FAILED, { conf_name: a.conf_name }), H.updateIsMeeting(!1));
11125
- else if (o === ot.TRANSFER_INCOMING_CALL) Z.isAgentHangup = !1, clearTimeout(Z.autoStateTimer), a.agent_no === Z.agentInfo.agent_no ? (H.updateDisplayText(zt.TRANSFERRING), ge.emit(ie.TRANSFER_PROGRESS), H.updateActionConfigs([]), H.updateTransferIsAnswer(!0)) : (Z.sessionId = a.session_id, ge.emit(ie.TRANSFER_INCOMING_CALL, { agent_no: a.agent_no, agent_name: a.agent_name, session_id: a.session_id }), H.updateIsCalling(!0), H.updateDirection(Tn.TRANSFER), H.updateDisplayText(zt.TRANSFER_INCOMING_CALL), H.updateActionConfigs(Ts), Z.enableBrowserAlert && Fo.show("📞 转接来电", `坐席 [${a.agent_no}] 正在转接...`, () => {
11124
+ else if (o === ot.CONSULT_THREE_WAY_RESULT) a.status === "success" ? (H.updateDirection(wn.MEETING), H.updateDisplayText(zt.MEETING), H.updateActionConfigs(t2), ge.emit(ie.CONSULT_THREE_WAY_SUCCESS)) : (ge.emit(ie.CONSULT_THREE_WAY_FAILED, { conf_name: a.conf_name }), H.updateIsMeeting(!1));
11125
+ else if (o === ot.TRANSFER_INCOMING_CALL) Z.isAgentHangup = !1, clearTimeout(Z.autoStateTimer), a.agent_no === Z.agentInfo.agent_no ? (H.updateDisplayText(zt.TRANSFERRING), ge.emit(ie.TRANSFER_PROGRESS), H.updateActionConfigs([]), H.updateTransferIsAnswer(!0)) : (Z.sessionId = a.session_id, ge.emit(ie.TRANSFER_INCOMING_CALL, { agent_no: a.agent_no, agent_name: a.agent_name, session_id: a.session_id }), H.updateIsCalling(!0), H.updateDirection(wn.TRANSFER), H.updateDisplayText(zt.TRANSFER_INCOMING_CALL), H.updateActionConfigs(Ts), Z.enableBrowserAlert && Fo.show("📞 转接来电", `坐席 [${a.agent_no}] 正在转接...`, () => {
11126
11126
  ge.emit(Ge.NOTIFICATION_CLICK, { agent_no: a.agent_no });
11127
11127
  }, Z.browserAlertTime));
11128
11128
  else if (o === ot.TRANSFER_OFF_HOOK) ge.emit(ie.TRANSFER_OFF_HOOK, { session_id: Z.sessionId }), H.updateTransferIsAnswer(!1), H.updateDisplayText(zt.CALLING), H.updateActionConfigs(Ki, a.direction !== 8);
@@ -11130,9 +11130,9 @@ class un {
11130
11130
  if (a.status === "failed") {
11131
11131
  ge.emit(ie.TRANSFER_FAILED, "未知原因"), ge.emit(Ge.FAIL_NOTIFICATION, "转接失败");
11132
11132
  const d = H.get("direction");
11133
- d === Tn.OUTGOING ? H.updateActionConfigs(Si) : d === Tn.INCOMING && H.updateActionConfigs(Ki);
11133
+ d === wn.OUTGOING ? H.updateActionConfigs(Si) : d === wn.INCOMING && H.updateActionConfigs(Ki);
11134
11134
  }
11135
- } else o === ot.KICK_OFFLINE ? ge.emit(Ge.KICK_OFF) : o === ot.CONTINUOUS_NOT_ANSWER ? (ge.emit(Ge.FAIL_NOTIFICATION, `已连续 ${a.miss_count} 次未接, 设置忙碌`), this.stateBusyChange()) : o === ot.SIGN_OUT ? ge.emit(Ge.SIGN_OUT) : o === ot.SIGN_IN_SWITCH_DEVICE ? ge.emit(Ge.SIGN_IN_SWITCH_DEVICE, a) : o === ot.LISTEN_INCOMING_CALL ? (clearTimeout(Z.autoStateTimer), Z.sessionId = a.session_id, H.updateIsCalling(!0), H.updateDirection(Tn.INCOMING), this.inCallAutoAnswer(), H.updateDisplayText(zt.LISTENING), H.updateActionConfigs(Ts), ge.emit(ie.LISTEN_INCOMING_CALL, { session_id: a.session_id }), Z.enableBrowserAlert && Fo.show("📞 监听来电", "正在来电...", () => {
11135
+ } else o === ot.KICK_OFFLINE ? ge.emit(Ge.KICK_OFF) : o === ot.CONTINUOUS_NOT_ANSWER ? (ge.emit(Ge.FAIL_NOTIFICATION, `已连续 ${a.miss_count} 次未接, 设置忙碌`), this.stateBusyChange()) : o === ot.SIGN_OUT ? ge.emit(Ge.SIGN_OUT) : o === ot.SIGN_IN_SWITCH_DEVICE ? ge.emit(Ge.SIGN_IN_SWITCH_DEVICE, a) : o === ot.LISTEN_INCOMING_CALL ? (clearTimeout(Z.autoStateTimer), Z.sessionId = a.session_id, H.updateIsCalling(!0), H.updateDirection(wn.INCOMING), this.inCallAutoAnswer(), H.updateDisplayText(zt.LISTENING), H.updateActionConfigs(Ts), ge.emit(ie.LISTEN_INCOMING_CALL, { session_id: a.session_id }), Z.enableBrowserAlert && Fo.show("📞 监听来电", "正在来电...", () => {
11136
11136
  ge.emit(Ge.NOTIFICATION_CLICK, { customer_phone: a.customer_phone });
11137
11137
  }, Z.browserAlertTime)) : o === ot.LISTEN_INCOMING_CALL_OFF_HOOK ? (Z.monitoredAgentNo = a.monitored_agent_no, Z.earSpeakAgent = "", H.updateIncomingIsAnswer(!0), ge.emit(ie.LISTEN_INCOMING_CALL_OFF_HOOK, { session_id: Z.sessionId, monitored_agent_no: a.monitored_agent_no }), H.updateActionConfigs(Wf), H.updateDisplayText(zt.CALLING)) : o === ot.LISTEN_CALL_FAILED ? a.status === "failed" && (ge.emit(ie.LISTEN_CALL_FAILED), Z.monitoredAgentNo = "") : o === ot.EAR_SPEECH ? a.status === "success" ? (a.monitored_agent_no === Z.agentInfo.agent_no && (H.updateActionConfigs(n2), ge.emit(ie.EAR_SPEECH_BE_SUCCESS)), a.monitor_agent_no === Z.agentInfo.agent_no && (H.updateActionConfigs(r2), ge.emit(ie.EAR_SPEECH_SUCCESS, { monitored_agent_no: a.monitored_agent_no, monitor_agent_no: a.monitor_agent_no }), Z.earSpeakAgent = a.monitored_agent_no)) : ge.emit(ie.EAR_SPEECH_FAILED) : o === ot.STOP_EAR_SPEECH ? a.status === "success" ? (a.monitored_agent_no === Z.agentInfo.agent_no && H.updateActionConfigs(Ki), a.monitor_agent_no === Z.agentInfo.agent_no && H.updateActionConfigs(Wf), Z.earSpeakAgent = "", ge.emit(ie.STOP_EAR_SPEECH_SUCCESS)) : ge.emit(ie.STOP_EAR_SPEECH_FAILED) : o === ot.CALL_FORCE_INSERT ? a.status === "success" ? (a.monitored_agent_no === Z.agentInfo.agent_no && (H.updateActionConfigs(o2), ge.emit(ie.CALL_FORCE_INSERT_SUCCESS, { monitored_agent_no: a.monitored_agent_no, monitor_agent_no: a.monitor_agent_no })), a.monitor_agent_no === Z.agentInfo.agent_no && (H.updateActionConfigs(i2), ge.emit(ie.CALL_FORCE_INSERT_SUCCESS_LISTENER, { monitored_agent_no: a.monitored_agent_no, monitor_agent_no: a.monitor_agent_no }))) : ge.emit(ie.CALL_FORCE_INSERT_FAILED) : o === ot.INTERNAL_CALL_START_CONSULT ? a.agent_no === Z.agentInfo.agent_no ? (H.updateConsultIsAnswer(!0), H.updateActionConfigs(Yf), H.updateDisplayText(zt.CONSULTING)) : (H.updateDisplayText(zt.OTHER_SIDE_CONSULTING), H.updateActionConfigs([])) : o === ot.INTERNAL_CALL_END_CONSULT ? (H.updateActionConfigs(Vl), H.updateDisplayText(""), H.updateConsultIsAnswer(!1)) : o === ot.CALL_SIP_INCOMING_CALL && ge.emit(ie.CALL_SIP_INCOMING_CALL);
11138
11138
  }, this.ws.onclose = (r) => {
@@ -11243,7 +11243,7 @@ class s2 {
11243
11243
  au(e) ? n.trace_id = e : n.customer_phone = e.replace(/[\s\r\n-]+/g, "");
11244
11244
  const r = H.get("isCalling"), i = H.get("selectOutNumber") || "";
11245
11245
  if (r) throw an.error(`正在呼叫中,请勿重复点击;session id: ${Z.sessionId}`, "call-api.ts 142 makeCall"), new Error(JSON.stringify({ code: 1, msg: "正在呼叫中,请勿重复点击" }));
11246
- H.updateDirection(Tn.OUTGOING), un.__internalSend({ type: ot.OUT_CALL, data: { ...n, caller: i.replace(/[\s\r\n-]+/g, "") } });
11246
+ H.updateDirection(wn.OUTGOING), un.__internalSend({ type: ot.OUT_CALL, data: { ...n, caller: i.replace(/[\s\r\n-]+/g, "") } });
11247
11247
  }
11248
11248
  previewCall(e, n) {
11249
11249
  const r = {};
@@ -11251,7 +11251,7 @@ class s2 {
11251
11251
  const i = H.get("isCalling"), o = H.get("selectOutNumber") || "";
11252
11252
  if (i) throw an.error(`正在呼叫中,请勿重复点击;session id: ${Z.sessionId}`, "call-api.ts 162 previewCall"), new Error(JSON.stringify({ code: 1, msg: "正在呼叫中,请勿重复点击" }));
11253
11253
  if (typeof e != "string" || e.trim() === "") throw new Error(JSON.stringify({ code: 1, msg: "外呼号码非法" }));
11254
- H.updateDirection(Tn.OUTGOING), un.__internalSend({ type: ot.PREVIEW_OUT_CALL, data: { ...r, caller: o, preview_task_id: n } });
11254
+ H.updateDirection(wn.OUTGOING), un.__internalSend({ type: ot.PREVIEW_OUT_CALL, data: { ...r, caller: o, preview_task_id: n } });
11255
11255
  }
11256
11256
  async hangup() {
11257
11257
  if (!H.get("isCalling")) throw an.error("当前没有通话", "call-api.ts 178 hangup"), new Error(JSON.stringify({ code: 1, msg: "当前没有通话" }));
@@ -11398,11 +11398,11 @@ const PA = class PA {
11398
11398
  const a = new URL(Ri).host;
11399
11399
  o = Ri.includes("https") ? `wss://${a}` : `ws://${a}`;
11400
11400
  const s = un.getInstance({ url: `${o}/ccs-ws/api/v1/ws/call/${Kl}?Authorization=`, sipClient: null, onOpen: async () => {
11401
- const A = await wn(`${_i}/config/swiftms`, {});
11401
+ const A = await In(`${_i}/config/swiftms`, {});
11402
11402
  cn(this, no, A.data);
11403
- const l = await wn(`${_i}/ring/query`, {});
11403
+ const l = await In(`${_i}/ring/query`, {});
11404
11404
  cn(this, Ni, l.data);
11405
- const u = await wn(`${_i}/audio/list`, {});
11405
+ const u = await In(`${_i}/audio/list`, {});
11406
11406
  cn(this, ro, u.data), Z.logBuiltinEnabled = n || !1, Z.browserAlertTime = r || 5e3, await nt(this, mn)._agentLogin(Kl), an.info("初始化成功", "index.ts");
11407
11407
  const { current_answer_device: d, current_state: g, out_display_number: p, out_display_select_switch: v } = Z.agentInfo;
11408
11408
  g === Nt.IDLE ? (H.updateActionConfigs(Wn), Z.stateObject = { state: g, state_name: "空闲" }, Z.stateBeforeChange = Z.stateObject) : g === Nt.BUSY ? (H.updateActionConfigs(fA), Z.stateObject = { state: g, state_name: "忙碌" }, Z.stateBeforeChange = Z.stateObject) : g === Nt.UNREGISTERED && (H.updateActionConfigs(fA), Z.stateObject = { state: g, state_name: "未注册" }), v === 1 ? H.updateSelectOutNumber(p) : H.updateSelectOutNumber(""), H.updateAnswerDevice(d), Va.setInitRtcFn(this.initWebRtc), d === 1 && (await this.initWebRtc(), s.setSipClient(nt(this, Pn))), cn(this, gn, new s2(nt(this, Pn))), Z.enableBrowserAlert = e, e && Fo.requestPermission(), ge.emit(Ge.AGENT_INIT_STATUS, !0), cn(this, io, !0), clearInterval(cr._timer), cr._timer = null, vs(this, Hi, q0).call(this), i == null || i();
@@ -18947,7 +18947,7 @@ function fr(t) {
18947
18947
  function Dx(t) {
18948
18948
  return t === "string" || t === "url" || t === "hex" || t === "email" || t === "date" || t === "pattern";
18949
18949
  }
18950
- function xn(t, e) {
18950
+ function Rn(t, e) {
18951
18951
  return !!(t == null || e === "array" && Array.isArray(t) && !t.length || Dx(e) && typeof t == "string" && !t);
18952
18952
  }
18953
18953
  function Bx(t, e, n) {
@@ -19060,7 +19060,7 @@ var bo = "enum", jx = function(e, n, r, i, o) {
19060
19060
  return !1;
19061
19061
  v && (u = n.length), p && (u = n.replace(l, "_").length), a ? u !== e.len && i.push(fr(o.messages[d].len, e.fullField, e.len)) : s && !A && u < e.min ? i.push(fr(o.messages[d].min, e.fullField, e.min)) : A && !s && u > e.max ? i.push(fr(o.messages[d].max, e.fullField, e.max)) : s && A && (u < e.min || u > e.max) && i.push(fr(o.messages[d].range, e.fullField, e.min, e.max));
19062
19062
  }, Z1 = function(e, n, r, i, o, a) {
19063
- e.required && (!r.hasOwnProperty(e.field) || xn(n, a || e.type)) && i.push(fr(o.messages.required, e.fullField));
19063
+ e.required && (!r.hasOwnProperty(e.field) || Rn(n, a || e.type)) && i.push(fr(o.messages.required, e.fullField));
19064
19064
  }, Ps;
19065
19065
  const Hx = function() {
19066
19066
  if (Ps)
@@ -19164,7 +19164,7 @@ const Ft = {
19164
19164
  var Zx = function(e, n, r, i, o) {
19165
19165
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19166
19166
  if (s) {
19167
- if (xn(n) && !e.required)
19167
+ if (Rn(n) && !e.required)
19168
19168
  return r();
19169
19169
  Ft.required(e, n, i, a, o);
19170
19170
  }
@@ -19180,7 +19180,7 @@ var Zx = function(e, n, r, i, o) {
19180
19180
  }, Vx = function(e, n, r, i, o) {
19181
19181
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19182
19182
  if (s) {
19183
- if (xn(n) && !e.required)
19183
+ if (Rn(n) && !e.required)
19184
19184
  return r();
19185
19185
  Ft.required(e, n, i, a, o), n !== void 0 && Ft.type(e, n, i, a, o);
19186
19186
  }
@@ -19188,9 +19188,9 @@ var Zx = function(e, n, r, i, o) {
19188
19188
  }, zx = function(e, n, r, i, o) {
19189
19189
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19190
19190
  if (s) {
19191
- if (xn(n, "date") && !e.required)
19191
+ if (Rn(n, "date") && !e.required)
19192
19192
  return r();
19193
- if (Ft.required(e, n, i, a, o), !xn(n, "date")) {
19193
+ if (Ft.required(e, n, i, a, o), !Rn(n, "date")) {
19194
19194
  var A;
19195
19195
  n instanceof Date ? A = n : A = new Date(n), Ft.type(e, A, i, a, o), A && Ft.range(e, A.getTime(), i, a, o);
19196
19196
  }
@@ -19199,7 +19199,7 @@ var Zx = function(e, n, r, i, o) {
19199
19199
  }, Yx = "enum", Wx = function(e, n, r, i, o) {
19200
19200
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19201
19201
  if (s) {
19202
- if (xn(n) && !e.required)
19202
+ if (Rn(n) && !e.required)
19203
19203
  return r();
19204
19204
  Ft.required(e, n, i, a, o), n !== void 0 && Ft[Yx](e, n, i, a, o);
19205
19205
  }
@@ -19207,7 +19207,7 @@ var Zx = function(e, n, r, i, o) {
19207
19207
  }, Jx = function(e, n, r, i, o) {
19208
19208
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19209
19209
  if (s) {
19210
- if (xn(n) && !e.required)
19210
+ if (Rn(n) && !e.required)
19211
19211
  return r();
19212
19212
  Ft.required(e, n, i, a, o), n !== void 0 && (Ft.type(e, n, i, a, o), Ft.range(e, n, i, a, o));
19213
19213
  }
@@ -19215,7 +19215,7 @@ var Zx = function(e, n, r, i, o) {
19215
19215
  }, _x = function(e, n, r, i, o) {
19216
19216
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19217
19217
  if (s) {
19218
- if (xn(n) && !e.required)
19218
+ if (Rn(n) && !e.required)
19219
19219
  return r();
19220
19220
  Ft.required(e, n, i, a, o), n !== void 0 && (Ft.type(e, n, i, a, o), Ft.range(e, n, i, a, o));
19221
19221
  }
@@ -19223,7 +19223,7 @@ var Zx = function(e, n, r, i, o) {
19223
19223
  }, Xx = function(e, n, r, i, o) {
19224
19224
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19225
19225
  if (s) {
19226
- if (xn(n) && !e.required)
19226
+ if (Rn(n) && !e.required)
19227
19227
  return r();
19228
19228
  Ft.required(e, n, i, a, o), n !== void 0 && Ft.type(e, n, i, a, o);
19229
19229
  }
@@ -19231,7 +19231,7 @@ var Zx = function(e, n, r, i, o) {
19231
19231
  }, $x = function(e, n, r, i, o) {
19232
19232
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19233
19233
  if (s) {
19234
- if (n === "" && (n = void 0), xn(n) && !e.required)
19234
+ if (n === "" && (n = void 0), Rn(n) && !e.required)
19235
19235
  return r();
19236
19236
  Ft.required(e, n, i, a, o), n !== void 0 && (Ft.type(e, n, i, a, o), Ft.range(e, n, i, a, o));
19237
19237
  }
@@ -19239,7 +19239,7 @@ var Zx = function(e, n, r, i, o) {
19239
19239
  }, e3 = function(e, n, r, i, o) {
19240
19240
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19241
19241
  if (s) {
19242
- if (xn(n) && !e.required)
19242
+ if (Rn(n) && !e.required)
19243
19243
  return r();
19244
19244
  Ft.required(e, n, i, a, o), n !== void 0 && Ft.type(e, n, i, a, o);
19245
19245
  }
@@ -19247,17 +19247,17 @@ var Zx = function(e, n, r, i, o) {
19247
19247
  }, t3 = function(e, n, r, i, o) {
19248
19248
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19249
19249
  if (s) {
19250
- if (xn(n, "string") && !e.required)
19250
+ if (Rn(n, "string") && !e.required)
19251
19251
  return r();
19252
- Ft.required(e, n, i, a, o), xn(n, "string") || Ft.pattern(e, n, i, a, o);
19252
+ Ft.required(e, n, i, a, o), Rn(n, "string") || Ft.pattern(e, n, i, a, o);
19253
19253
  }
19254
19254
  r(a);
19255
19255
  }, n3 = function(e, n, r, i, o) {
19256
19256
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19257
19257
  if (s) {
19258
- if (xn(n) && !e.required)
19258
+ if (Rn(n) && !e.required)
19259
19259
  return r();
19260
- Ft.required(e, n, i, a, o), xn(n) || Ft.type(e, n, i, a, o);
19260
+ Ft.required(e, n, i, a, o), Rn(n) || Ft.type(e, n, i, a, o);
19261
19261
  }
19262
19262
  r(a);
19263
19263
  }, r3 = function(e, n, r, i, o) {
@@ -19266,17 +19266,17 @@ var Zx = function(e, n, r, i, o) {
19266
19266
  }, i3 = function(e, n, r, i, o) {
19267
19267
  var a = [], s = e.required || !e.required && i.hasOwnProperty(e.field);
19268
19268
  if (s) {
19269
- if (xn(n, "string") && !e.required)
19269
+ if (Rn(n, "string") && !e.required)
19270
19270
  return r();
19271
- Ft.required(e, n, i, a, o, "string"), xn(n, "string") || (Ft.type(e, n, i, a, o), Ft.range(e, n, i, a, o), Ft.pattern(e, n, i, a, o), e.whitespace === !0 && Ft.whitespace(e, n, i, a, o));
19271
+ Ft.required(e, n, i, a, o, "string"), Rn(n, "string") || (Ft.type(e, n, i, a, o), Ft.range(e, n, i, a, o), Ft.pattern(e, n, i, a, o), e.whitespace === !0 && Ft.whitespace(e, n, i, a, o));
19272
19272
  }
19273
19273
  r(a);
19274
19274
  }, nc = function(e, n, r, i, o) {
19275
19275
  var a = e.type, s = [], A = e.required || !e.required && i.hasOwnProperty(e.field);
19276
19276
  if (A) {
19277
- if (xn(n, a) && !e.required)
19277
+ if (Rn(n, a) && !e.required)
19278
19278
  return r();
19279
- Ft.required(e, n, i, s, o, a), xn(n, a) || Ft.type(e, n, i, s, o);
19279
+ Ft.required(e, n, i, s, o, a), Rn(n, a) || Ft.type(e, n, i, s, o);
19280
19280
  }
19281
19281
  r(s);
19282
19282
  };
@@ -24957,7 +24957,7 @@ function hO(t, e, n, r, i, o, a) {
24957
24957
  typeof zn == "number" && (Pt < pe.left && (Ne -= Pt - pe.left - Fe, U.x + ce < pe.left + zn && (Ne += U.x - pe.left + ce - zn)), ft > pe.right && (Ne -= ft - pe.right - Fe, U.x > pe.right - zn && (Ne += U.x - pe.right + zn)));
24958
24958
  var or = X === !0 ? 0 : X;
24959
24959
  typeof or == "number" && (Pe < pe.top && (at -= Pe - pe.top - Me, U.y + de < pe.top + or && (at += U.y - pe.top + de - or)), et > pe.bottom && (at -= et - pe.bottom - Me, U.y > pe.bottom - or && (at += U.y - pe.bottom + or)));
24960
- var vr = L.x + Ne, Cr = vr + z, Yr = L.y + at, ii = Yr + me, xt = U.x, Ze = xt + ce, ht = U.y, wt = ht + de, Dt = Math.max(vr, xt), kt = Math.min(Cr, Ze), Rn = (Dt + kt) / 2, On = Rn - vr, Xn = Math.max(Yr, ht), ar = Math.min(ii, wt), $n = (Xn + ar) / 2, er = $n - Yr;
24960
+ var vr = L.x + Ne, Cr = vr + z, Yr = L.y + at, ii = Yr + me, xt = U.x, Ze = xt + ce, ht = U.y, wt = ht + de, Dt = Math.max(vr, xt), kt = Math.min(Cr, Ze), On = (Dt + kt) / 2, Mn = On - vr, Xn = Math.max(Yr, ht), ar = Math.min(ii, wt), $n = (Xn + ar) / 2, er = $n - Yr;
24961
24961
  a == null || a(e, Xe);
24962
24962
  var bn = tt.right - L.x - (Ne + L.width), Zi = tt.bottom - L.y - (at + L.height);
24963
24963
  it === 1 && (Ne = Math.round(Ne), bn = Math.round(bn)), qe === 1 && (at = Math.round(at), Zi = Math.round(Zi));
@@ -24967,7 +24967,7 @@ function hO(t, e, n, r, i, o, a) {
24967
24967
  offsetY: at / qe,
24968
24968
  offsetR: bn / it,
24969
24969
  offsetB: Zi / qe,
24970
- arrowX: On / it,
24970
+ arrowX: Mn / it,
24971
24971
  arrowY: er / qe,
24972
24972
  scaleX: it,
24973
24973
  scaleY: qe,
@@ -25114,10 +25114,10 @@ function CO() {
25114
25114
  forceAlign: Cr
25115
25115
  };
25116
25116
  });
25117
- var xt = c.useState(0), Ze = $(xt, 2), ht = Ze[0], wt = Ze[1], Dt = c.useState(0), kt = $(Dt, 2), Rn = kt[0], On = kt[1], Xn = function() {
25117
+ var xt = c.useState(0), Ze = $(xt, 2), ht = Ze[0], wt = Ze[1], Dt = c.useState(0), kt = $(Dt, 2), On = kt[0], Mn = kt[1], Xn = function() {
25118
25118
  if (q && ut) {
25119
25119
  var pt = ut.getBoundingClientRect();
25120
- wt(pt.width), On(pt.height);
25120
+ wt(pt.width), Mn(pt.height);
25121
25121
  }
25122
25122
  }, ar = function() {
25123
25123
  Xn(), Cr();
@@ -25226,7 +25226,7 @@ function CO() {
25226
25226
  onAlign: Cr,
25227
25227
  stretch: q,
25228
25228
  targetWidth: ht / zr,
25229
- targetHeight: Rn / Zn
25229
+ targetHeight: On / Zn
25230
25230
  })));
25231
25231
  });
25232
25232
  return process.env.NODE_ENV !== "production" && (e.displayName = "Trigger"), e;
@@ -26599,9 +26599,9 @@ var SM = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
26599
26599
  return {
26600
26600
  list: _e.current,
26601
26601
  focus: function(ht) {
26602
- var wt, Dt = Ee(), kt = Sd(Dt, ut), Rn = kt.elements, On = kt.key2element, Xn = kt.element2key, ar = bg(_e.current, Rn), $n = dn ?? (ar[0] ? Xn.get(ar[0]) : (wt = Oe.find(function(Zi) {
26602
+ var wt, Dt = Ee(), kt = Sd(Dt, ut), On = kt.elements, Mn = kt.key2element, Xn = kt.element2key, ar = bg(_e.current, On), $n = dn ?? (ar[0] ? Xn.get(ar[0]) : (wt = Oe.find(function(Zi) {
26603
26603
  return !Zi.props.disabled;
26604
- })) === null || wt === void 0 ? void 0 : wt.key), er = On.get($n);
26604
+ })) === null || wt === void 0 ? void 0 : wt.key), er = Mn.get($n);
26605
26605
  if ($n && er) {
26606
26606
  var bn;
26607
26607
  er == null || (bn = er.focus) === null || bn === void 0 || bn.call(er, ht);
@@ -26618,13 +26618,13 @@ var SM = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
26618
26618
  }), Br = $(Kn, 2), Vn = Br[0], ri = Br[1], Fr = function(ht) {
26619
26619
  if (N) {
26620
26620
  var wt = ht.key, Dt = Vn.includes(wt), kt;
26621
- F ? Dt ? kt = Vn.filter(function(On) {
26622
- return On !== wt;
26621
+ F ? Dt ? kt = Vn.filter(function(Mn) {
26622
+ return Mn !== wt;
26623
26623
  }) : kt = [].concat(Re(Vn), [wt]) : kt = [wt], ri(kt);
26624
- var Rn = j(j({}, ht), {}, {
26624
+ var On = j(j({}, ht), {}, {
26625
26625
  selectedKeys: kt
26626
26626
  });
26627
- Dt ? K == null || K(Rn) : q == null || q(Rn);
26627
+ Dt ? K == null || K(On) : q == null || q(On);
26628
26628
  }
26629
26629
  !F && At.length && vt !== "inline" && Ct(Vi);
26630
26630
  }, zn = xa(function(Ze) {
@@ -30412,8 +30412,8 @@ var S8 = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
30412
30412
  if (!(Ce && Rd(Ye) && (He == null ? void 0 : He.size) >= Ye)) {
30413
30413
  var Dt = !0, kt = Ze;
30414
30414
  b == null || b(null);
30415
- var Rn = E8(Ze, D, Rd(Ye) ? Ye - He.size : void 0), On = wt ? null : Rn;
30416
- return m !== "combobox" && On && (kt = "", N == null || N(On), ke(!1), Dt = !1), R && lt !== kt && R(kt, {
30415
+ var On = E8(Ze, D, Rd(Ye) ? Ye - He.size : void 0), Mn = wt ? null : On;
30416
+ return m !== "combobox" && Mn && (kt = "", N == null || N(Mn), ke(!1), Dt = !1), R && lt !== kt && R(kt, {
30417
30417
  source: ht ? "typing" : "effect"
30418
30418
  }), Dt;
30419
30419
  }
@@ -30430,16 +30430,16 @@ var S8 = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
30430
30430
  var Q = py(), re = $(Q, 2), X = re[0], ve = re[1], Pe = c.useRef(!1), et = function(Ze) {
30431
30431
  var ht = X(), wt = Ze.key, Dt = wt === "Enter";
30432
30432
  if (Dt && (m !== "combobox" && Ze.preventDefault(), Ne || ke(!0)), ve(!!lt), wt === "Backspace" && !ht && Ce && !lt && u.length) {
30433
- for (var kt = Re(u), Rn = null, On = kt.length - 1; On >= 0; On -= 1) {
30434
- var Xn = kt[On];
30433
+ for (var kt = Re(u), On = null, Mn = kt.length - 1; Mn >= 0; Mn -= 1) {
30434
+ var Xn = kt[Mn];
30435
30435
  if (!Xn.disabled) {
30436
- kt.splice(On, 1), Rn = Xn;
30436
+ kt.splice(Mn, 1), On = Xn;
30437
30437
  break;
30438
30438
  }
30439
30439
  }
30440
- Rn && d(kt, {
30440
+ On && d(kt, {
30441
30441
  type: "remove",
30442
- values: [Rn]
30442
+ values: [On]
30443
30443
  });
30444
30444
  }
30445
30445
  for (var ar = arguments.length, $n = new Array(ar > 1 ? ar - 1 : 0), er = 1; er < ar; er++)
@@ -30497,9 +30497,9 @@ var S8 = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
30497
30497
  });
30498
30498
  dt.push(kt);
30499
30499
  }
30500
- for (var Rn = arguments.length, On = new Array(Rn > 1 ? Rn - 1 : 0), Xn = 1; Xn < Rn; Xn++)
30501
- On[Xn - 1] = arguments[Xn];
30502
- Se == null || Se.apply(void 0, [Ze].concat(On));
30500
+ for (var On = arguments.length, Mn = new Array(On > 1 ? On - 1 : 0), Xn = 1; Xn < On; Xn++)
30501
+ Mn[Xn - 1] = arguments[Xn];
30502
+ Se == null || Se.apply(void 0, [Ze].concat(Mn));
30503
30503
  }, Un = c.useState({}), dn = $(Un, 2), _n = dn[1];
30504
30504
  function zr() {
30505
30505
  _n({});
@@ -32888,7 +32888,7 @@ const HN = {
32888
32888
  空闲: 1,
32889
32889
  离线: 0,
32890
32890
  未注册: 4
32891
- }, ZN = nv(() => import("./ConsultModel-BFBnP6A_.mjs")), KN = nv(() => import("./TransferModel-UVUT2oNK.mjs")), mc = An.div`
32891
+ }, ZN = nv(() => import("./ConsultModel-BXIQMgge.mjs")), KN = nv(() => import("./TransferModel-M9nr9UHx.mjs")), mc = An.div`
32892
32892
  width: 25px;
32893
32893
  height: 25px;
32894
32894
  background: ${({
@@ -33136,7 +33136,7 @@ const HN = {
33136
33136
  });
33137
33137
  return;
33138
33138
  case ie.CUSTOMER_INFO:
33139
- l(X, ve);
33139
+ l == null || l(X, ve);
33140
33140
  return;
33141
33141
  default:
33142
33142
  return null;