@talkjs/core 1.0.0 → 1.1.0

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.
@@ -128,9 +128,9 @@ let p = null;
128
128
  function f({ WebSocket: e2 }) {
129
129
  p = e2;
130
130
  }
131
- class m {
131
+ class g {
132
132
  constructor(e2, t2) {
133
- this.realtimeUrl = e2, this.handlers = t2, this.socket = null, this.throttler = new g(), this.stateMachine = new u("ReconnectingSocket", ["STOPPED", "WAITING_FOR_THROTTLER", "CONNECTING", "READY", "TERMINATED"], { queueAutoReconnect: { from: ["READY", "CONNECTING"], to: "WAITING_FOR_THROTTLER", afterTransition: ({ from: e3 }) => {
133
+ this.realtimeUrl = e2, this.handlers = t2, this.socket = null, this.throttler = new m(), this.stateMachine = new u("ReconnectingSocket", ["STOPPED", "WAITING_FOR_THROTTLER", "CONNECTING", "READY", "TERMINATED"], { queueAutoReconnect: { from: ["READY", "CONNECTING"], to: "WAITING_FOR_THROTTLER", afterTransition: ({ from: e3 }) => {
134
134
  "READY" === e3 && this.handlers.onClose(), this.throttler.request(() => {
135
135
  this.stateMachine.transition("connect");
136
136
  });
@@ -181,7 +181,7 @@ class m {
181
181
  this.stateMachine.transition("destroy");
182
182
  }
183
183
  }
184
- let g = class {
184
+ let m = class {
185
185
  constructor() {
186
186
  this.initialDelayMs = 200 + 200 * Math.random(), this.exponentialFactor = 1.2, this.maxDelayMs = 1e4, this.currentDelayMs = this.initialDelayMs;
187
187
  }
@@ -195,7 +195,7 @@ let g = class {
195
195
  };
196
196
  class v {
197
197
  constructor(e2, t2) {
198
- this.handlers = t2, this.socket = new m(e2, { onOpen: () => this.handlers.onOpen(), onClose: () => this.handlers.onClose(), onMessage: (e3) => this.onWebSocketMessage(e3) });
198
+ this.handlers = t2, this.socket = new g(e2, { onOpen: () => this.handlers.onOpen(), onClose: () => this.handlers.onClose(), onMessage: (e3) => this.onWebSocketMessage(e3) });
199
199
  }
200
200
  call(e2, t2, s2, n2) {
201
201
  const r2 = `/${s2.map((e3) => encodeURIComponent(e3)).join("/")}`, i2 = JSON.stringify([e2, t2, r2, n2]);
@@ -245,7 +245,7 @@ class b {
245
245
  void 0 !== this.timeout && (clearTimeout(this.timeout), this.timeout = void 0);
246
246
  }
247
247
  }
248
- class w {
248
+ class y {
249
249
  constructor() {
250
250
  this.i = -1;
251
251
  }
@@ -256,9 +256,9 @@ class w {
256
256
  this.i = -1;
257
257
  }
258
258
  }
259
- class y {
259
+ class w {
260
260
  constructor(e2, t2) {
261
- this.handlers = t2, this.seqCounter = new w(), this.responseHandlers = {}, this.heartbeats = new A(this), this.socket = new v(e2, { onUpstreamRestarting: () => {
261
+ this.handlers = t2, this.seqCounter = new y(), this.responseHandlers = {}, this.heartbeats = new A(this), this.socket = new v(e2, { onUpstreamRestarting: () => {
262
262
  this.heartbeats.serverActive(), this.handlers.onUpstreamRestarting();
263
263
  }, onOpen: () => {
264
264
  this.heartbeats.clientActive(), this.heartbeats.serverActive(), this.handlers.onReady();
@@ -343,7 +343,7 @@ class C {
343
343
  "READY" !== e3 && "RENEWING_SESSION" !== e3 || this.handlers.onNotReady(), this.authProvider.clearScheduledRefresh();
344
344
  } }, destroy: { from: "ANY", to: "TERMINATED", afterTransition: () => {
345
345
  this.authProvider.clearScheduledRefresh(), this.connection.destroy();
346
- } } }), this.connection = new y(e2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onReady: () => this.stateMachine.transition("logIn"), onNotReady: () => {
346
+ } } }), this.connection = new w(e2, { onUpstreamRestarting: () => this.handlers.onUpstreamRestarting(), onReady: () => this.stateMachine.transition("logIn"), onNotReady: () => {
347
347
  this.stateMachine.transition("wsDisconnected");
348
348
  }, onAuthExpired: () => {
349
349
  this.stateMachine.transition("authExpired");
@@ -706,10 +706,10 @@ class _ {
706
706
  return this.connection.isConnected();
707
707
  }
708
708
  }
709
- function P(e2, t2) {
709
+ function O(e2, t2) {
710
710
  return void 0 === t2 ? e2 : t2;
711
711
  }
712
- function O(e2, t2) {
712
+ function P(e2, t2) {
713
713
  if (void 0 === t2) return e2;
714
714
  if (null === t2) return {};
715
715
  const s2 = __spreadValues({}, e2);
@@ -881,7 +881,7 @@ class H extends W {
881
881
  this.mutate(e2, (s2) => {
882
882
  const n2 = s2.value.snapshot;
883
883
  if (null === n2) return console.warn("[TalkJS] Received a 'used edited' event for a user that we thought didn't exist."), s2;
884
- return c({ snapshot: { id: n2.id, name: P(n2.name, t2.diff.name), custom: O(n2.custom, t2.diff.custom), locale: P(n2.locale, t2.diff.locale), photoUrl: P(n2.photoUrl, t2.diff.photoUrl), role: P(n2.role, t2.diff.role), welcomeMessage: P(n2.welcomeMessage, t2.diff.welcomeMessage) }, lastChanged: e2 });
884
+ return c({ snapshot: { id: n2.id, name: O(n2.name, t2.diff.name), custom: P(n2.custom, t2.diff.custom), locale: O(n2.locale, t2.diff.locale), photoUrl: O(n2.photoUrl, t2.diff.photoUrl), role: O(n2.role, t2.diff.role), welcomeMessage: O(n2.welcomeMessage, t2.diff.welcomeMessage) }, lastChanged: e2 });
885
885
  });
886
886
  }
887
887
  getFromCache() {
@@ -893,54 +893,34 @@ class H extends W {
893
893
  teardownNested(e2) {
894
894
  }
895
895
  }
896
- const G = /\uFE0F/g, L = String.fromCharCode(8205);
897
- function z(e2) {
898
- if (":arslan:" === e2.text) return ":arslan:";
899
- const t2 = function({ text: e3, kind: t3 }) {
900
- var _a2;
901
- return "unicode" === t3 ? function(e4) {
902
- const t4 = [];
903
- let s3 = 0, n2 = 0, r2 = 0;
904
- for (; r2 < e4.length; ) s3 = e4.charCodeAt(r2++), n2 ? (t4.push((65536 + (n2 - 55296 << 10) + (s3 - 56320)).toString(16)), n2 = 0) : 55296 <= s3 && s3 <= 56319 ? n2 = s3 : t4.push(s3.toString(16));
905
- return t4.join("-");
906
- }((s2 = e3).indexOf(L) < 0 ? s2.replace(G, "") : s2) : (_a2 = Y[e3]) != null ? _a2 : function(e4) {
907
- if (/;-?\)/.test(e4)) return "1f609";
908
- if (e4 = e4.replace(/;/g, ":"), /:-o/i.test(e4)) return "1f631";
909
- return e4 = e4.replace(/-/g, "").toLowerCase(), J[e4];
910
- }(e3);
911
- var s2;
912
- }(e2);
913
- return t2 ? String.fromCodePoint(parseInt(t2, 16)) : e2.text;
914
- }
915
- const J = { ":)": "1f642", ":o": "1f62e", ":]": "1f60f", ":d": "1f600", xd: "1f61d", ":p": "1f61c", ":@": "1f621", ":[": "1f621", ":(": "1f626", ":'(": "1f62d", ":’(": "1f62d", ":*": "1f618", ":/": "1f614", ":s": "1f616", ":|": "1f633", ":$": "263a", ":x": "1f637", "<3": "2764", "</3": "1f494" }, Y = { ":thumbsup:": "1f44d", ":thumbsdown:": "1f44e", ":poop:": "1f4a9" };
916
- var Q, V = {};
917
- function Z(e2, t2) {
896
+ var G, L = {};
897
+ function z(e2, t2) {
918
898
  const s2 = t2.lastIndex;
919
899
  let n2;
920
900
  const r2 = [];
921
901
  for (; null !== (n2 = t2.exec(e2)); ) r2.push(n2);
922
902
  return t2.lastIndex = s2, r2;
923
903
  }
924
- function K(e2) {
904
+ function J(e2) {
925
905
  const t2 = e2.replace(/%2F/g, "/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/, "$1");
926
906
  return decodeURIComponent(t2);
927
907
  }
928
- function X(e2, t2) {
908
+ function Y(e2, t2) {
929
909
  if (!e2() && !t2) {
930
910
  t2 = e2.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/, "`$1`") + " was not true";
931
911
  }
932
912
  }
933
913
  !function() {
934
- if (Q) return V;
914
+ if (G) return L;
935
915
  function e2(e3) {
936
916
  return String.fromCharCode(parseInt(e3.slice(1), 16));
937
917
  }
938
918
  function t2(e3) {
939
919
  return `%${`00${e3.charCodeAt(0).toString(16)}`.slice(-2)}`;
940
920
  }
941
- Q = 1, Object.defineProperty(V, "__esModule", { value: true }), V.encode = function(t3) {
921
+ G = 1, Object.defineProperty(L, "__esModule", { value: true }), L.encode = function(t3) {
942
922
  return btoa(encodeURIComponent(t3).replace(/%[0-9A-F]{2}/g, e2));
943
- }, V.decode = function(e3) {
923
+ }, L.decode = function(e3) {
944
924
  return decodeURIComponent(Array.from(atob(e3), t2).join(""));
945
925
  };
946
926
  }(), ((e2) => {
@@ -974,51 +954,51 @@ function X(e2, t2) {
974
954
  }, e2.falsy = function(e3) {
975
955
  }, e2.never = function(e3) {
976
956
  };
977
- })(X || (X = {}));
978
- const ee = X, te = /^\/.*[^\\]\/[im]*$/;
979
- function se(e2) {
980
- if (!te.test(e2)) return false;
981
- return !ne(e2).test("");
957
+ })(Y || (Y = {}));
958
+ const Q = Y, V = /^\/.*[^\\]\/[im]*$/;
959
+ function Z(e2) {
960
+ if (!V.test(e2)) return false;
961
+ return !K(e2).test("");
982
962
  }
983
- function ne(e2) {
963
+ function K(e2) {
984
964
  const t2 = e2.match(/^\/(.*[^\\])\/(.*)$/);
985
965
  if (!t2) throw new Error(`Expected ${e2} to be a (non-empty) regex`);
986
966
  let s2 = t2[2] || "";
987
967
  return s2 = s2.replace(/[^im]/g, "") + "g", new RegExp(t2[1], s2);
988
968
  }
989
- class re {
969
+ class X {
990
970
  constructor({ mode: e2, allowedHostnames: t2, allowedPhoneNrs: s2, allowedMatches: n2, forbiddenMatches: r2, suppressLinks: i2, suppressEmailAddresses: a2, suppressPhoneNumbers: o2, replacement: u2 }) {
991
- ee.oneOf(e2, ["all", "otherOnly", "off"]), this.mode = e2, this.suppressLinks = false !== i2, this.suppressEmailAddresses = false !== a2, this.suppressPhoneNumbers = false !== o2, this.allowedHostnames = t2 || [], this.allowedPhoneNrs = (s2 || []).filter((e3) => e3).map((e3) => e3.replace(/[^0-9]/g, "")), this.allowedMatches = (n2 || []).filter(se).map((e3) => ne(e3)), this.forbiddenMatches = (r2 || []).filter(se).map((e3) => ne(e3)), ee(() => this.allowedMatches.every((e3) => e3.flags.includes("g")), "All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"), ee(() => this.forbiddenMatches.every((e3) => e3.flags.includes("g")), "All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"), u2 = u2 == null ? void 0 : u2.trim(), this.replacement = u2 && u2.length > 0 ? u2 : void 0;
971
+ Q.oneOf(e2, ["all", "otherOnly", "off"]), this.mode = e2, this.suppressLinks = false !== i2, this.suppressEmailAddresses = false !== a2, this.suppressPhoneNumbers = false !== o2, this.allowedHostnames = t2 || [], this.allowedPhoneNrs = (s2 || []).filter((e3) => e3).map((e3) => e3.replace(/[^0-9]/g, "")), this.allowedMatches = (n2 || []).filter(Z).map((e3) => K(e3)), this.forbiddenMatches = (r2 || []).filter(Z).map((e3) => K(e3)), Q(() => this.allowedMatches.every((e3) => e3.flags.includes("g")), "All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"), Q(() => this.forbiddenMatches.every((e3) => e3.flags.includes("g")), "All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"), u2 = u2 == null ? void 0 : u2.trim(), this.replacement = u2 && u2.length > 0 ? u2 : void 0;
992
972
  }
993
973
  shouldSuppress({ isContentBySender: e2 }) {
994
974
  return "all" === this.mode || "otherOnly" === this.mode && !e2;
995
975
  }
996
976
  }
997
- function ie(e2, t2) {
977
+ function ee(e2, t2) {
998
978
  const s2 = e2.map((e3) => function(e4, t3) {
999
979
  if ("text" === e4.type) return function(e5, t4) {
1000
980
  const s3 = function(e6) {
1001
981
  var _a2, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l;
1002
982
  let t5 = "";
1003
- return e6.t && (t5 = `(${e6.t("CONTACT_INFORMATION_HIDDEN")})`), { formattedLinks: (_a2 = e6.formattedLinks) != null ? _a2 : "plaintext", markup: (_b = e6.markup) != null ? _b : false, useFallbackMentions: (_c = e6.useFallbackMentions) != null ? _c : false, sameTabLinkRules: (_d = e6.sameTabLinkRules) != null ? _d : [], emojis: (_e2 = e6.emojis) != null ? _e2 : false, highlight: (_f = e6.highlight) != null ? _f : [], contactInfo: (_g = e6.contactInfo) != null ? _g : false, suppression: (_h = e6.suppression) != null ? _h : new re({ mode: "off" }), contactInfoHiddenText: (_k = (_j = e6.contactInfoHiddenText) != null ? _j : (_i = e6.suppression) == null ? void 0 : _i.replacement) != null ? _k : t5, customEmojiUrls: (_l = e6.customEmojiUrls) != null ? _l : {} };
983
+ return e6.t && (t5 = `(${e6.t("CONTACT_INFORMATION_HIDDEN")})`), { formattedLinks: (_a2 = e6.formattedLinks) != null ? _a2 : "plaintext", markup: (_b = e6.markup) != null ? _b : false, useFallbackMentions: (_c = e6.useFallbackMentions) != null ? _c : false, sameTabLinkRules: (_d = e6.sameTabLinkRules) != null ? _d : [], enableEmojiImageFallback: (_e2 = e6.enableEmojiImageFallback) != null ? _e2 : false, highlight: (_f = e6.highlight) != null ? _f : [], contactInfo: (_g = e6.contactInfo) != null ? _g : false, suppression: (_h = e6.suppression) != null ? _h : new X({ mode: "off" }), contactInfoHiddenText: (_k = (_j = e6.contactInfoHiddenText) != null ? _j : (_i = e6.suppression) == null ? void 0 : _i.replacement) != null ? _k : t5, customEmojiUrls: (_l = e6.customEmojiUrls) != null ? _l : {} };
1004
984
  }(t4);
1005
- return ae(e5, s3);
985
+ return te(e5, s3);
1006
986
  }(e4.children, t3);
1007
- if ("file" === e4.type && "video" === e4.subtype) return `🎥 ${K(e4.url)}`;
1008
- if ("file" === e4.type && "image" === e4.subtype) return `📷 ${K(e4.url)}`;
1009
- if ("file" === e4.type && "audio" === e4.subtype) return `🎧 ${K(e4.url)}`;
987
+ if ("file" === e4.type && "video" === e4.subtype) return `🎥 ${J(e4.url)}`;
988
+ if ("file" === e4.type && "image" === e4.subtype) return `📷 ${J(e4.url)}`;
989
+ if ("file" === e4.type && "audio" === e4.subtype) return `🎧 ${J(e4.url)}`;
1010
990
  if ("file" === e4.type && "voice" === e4.subtype) {
1011
991
  const t4 = e4.duration;
1012
992
  if (void 0 === t4) return "🎙️";
1013
993
  return `🎙️ (${Math.floor(t4 / 60)}:${Math.floor(t4 % 60).toString().padStart(2, "0")})`;
1014
994
  }
1015
- if ("file" === e4.type) return e4.subtype, `📎 ${K(e4.url)}`;
995
+ if ("file" === e4.type) return e4.subtype, `📎 ${J(e4.url)}`;
1016
996
  if ("location" === e4.type) return "📍";
1017
997
  return "";
1018
998
  }(e3, t2));
1019
999
  return s2.join("\n\n");
1020
1000
  }
1021
- function ae(e2, t2) {
1001
+ function te(e2, t2) {
1022
1002
  return e2.flatMap((e3) => {
1023
1003
  if ("string" == typeof e3) return e3;
1024
1004
  switch (e3.type) {
@@ -1031,19 +1011,20 @@ function ae(e2, t2) {
1031
1011
  case "actionLink":
1032
1012
  case "actionbutton":
1033
1013
  case "actionButton":
1034
- return ae(e3.children, t2);
1014
+ return te(e3.children, t2);
1035
1015
  case "bulletlist":
1036
1016
  case "bulletList":
1037
- return "\n" + ae(e3.children, t2);
1017
+ return "\n" + te(e3.children, t2);
1038
1018
  case "bulletpoint":
1039
1019
  case "bulletPoint":
1040
- return "- " + ae(e3.children, t2) + "\n";
1020
+ return "- " + te(e3.children, t2) + "\n";
1041
1021
  case "autolink":
1042
1022
  case "autoLink":
1043
1023
  case "codeblock":
1044
1024
  case "codeBlock":
1045
1025
  case "codespan":
1046
1026
  case "codeSpan":
1027
+ case "emoji":
1047
1028
  case "customemoji":
1048
1029
  case "customEmoji":
1049
1030
  return e3.text;
@@ -1051,12 +1032,10 @@ function ae(e2, t2) {
1051
1032
  return t2.contactInfoHiddenText;
1052
1033
  case "mention":
1053
1034
  return `@${e3.text}`;
1054
- case "emoji":
1055
- return "images" === t2.emojis ? "" : "unicode" === t2.emojis ? z(e3) : e3.text;
1056
1035
  }
1057
1036
  }).join("");
1058
1037
  }
1059
- class oe extends $ {
1038
+ class se extends $ {
1060
1039
  constructor(e2, t2, s2, n2) {
1061
1040
  super(e2), this.conversationId = t2, this.message = s2, this.realtimeClient = n2;
1062
1041
  }
@@ -1072,7 +1051,7 @@ class oe extends $ {
1072
1051
  if (!e3.ok) return e3;
1073
1052
  t2 = e3.value.data;
1074
1053
  }
1075
- return c({ lastChanged: e2, sender: null === t2.senderId ? null : this.realtimeClient.internalSubscribe(["users", t2.senderId]), data: { id: t2.id, type: t2.type, custom: t2.custom, createdAt: t2.createdAt, editedAt: t2.editedAt, referencedMessageId: t2.referencedMessageId, origin: t2.origin, plaintext: ie(t2.content, {}), content: t2.content } });
1054
+ return c({ lastChanged: e2, sender: null === t2.senderId ? null : this.realtimeClient.internalSubscribe(["users", t2.senderId]), data: { id: t2.id, type: t2.type, custom: t2.custom, createdAt: t2.createdAt, editedAt: t2.editedAt, referencedMessageId: t2.referencedMessageId, origin: t2.origin, plaintext: ee(t2.content, {}), content: t2.content } });
1076
1055
  });
1077
1056
  }
1078
1057
  refetch(e2) {
@@ -1092,13 +1071,13 @@ class oe extends $ {
1092
1071
  if (false === (s2 == null ? void 0 : s2.ok)) return s2;
1093
1072
  if (null === t2.data) return c({ lastChanged: t2.lastChanged, snapshot: null });
1094
1073
  const n2 = s2 == null ? void 0 : s2.value;
1095
- return c({ lastChanged: Math.max(t2.lastChanged, (_c = n2 == null ? void 0 : n2.lastChanged) != null ? _c : 0), snapshot: { sender: (_d = n2 == null ? void 0 : n2.snapshot) != null ? _d : null, id: t2.data.id, type: t2.data.type, custom: t2.data.custom, createdAt: t2.data.createdAt, editedAt: t2.data.editedAt, origin: t2.data.origin, plaintext: ie(t2.data.content, {}), content: t2.data.content, referencedMessageId: t2.data.referencedMessageId } });
1074
+ return c({ lastChanged: Math.max(t2.lastChanged, (_c = n2 == null ? void 0 : n2.lastChanged) != null ? _c : 0), snapshot: { sender: (_d = n2 == null ? void 0 : n2.snapshot) != null ? _d : null, id: t2.data.id, type: t2.data.type, custom: t2.data.custom, createdAt: t2.data.createdAt, editedAt: t2.data.editedAt, origin: t2.data.origin, plaintext: ee(t2.data.content, {}), content: t2.data.content, referencedMessageId: t2.data.referencedMessageId } });
1096
1075
  });
1097
1076
  }
1098
1077
  messageEdited(e2, t2) {
1099
1078
  this.mutate(e2, (s2) => {
1100
1079
  if (null === s2.value.data) return s2;
1101
- return c({ lastChanged: e2, sender: s2.value.sender, data: { id: s2.value.data.id, type: s2.value.data.type, createdAt: s2.value.data.createdAt, origin: s2.value.data.origin, referencedMessageId: s2.value.data.referencedMessageId, editedAt: P(s2.value.data.editedAt, t2.diff.editedAt), custom: O(s2.value.data.custom, t2.diff.custom), content: P(s2.value.data.content, t2.diff.content) } });
1080
+ return c({ lastChanged: e2, sender: s2.value.sender, data: { id: s2.value.data.id, type: s2.value.data.type, createdAt: s2.value.data.createdAt, origin: s2.value.data.origin, referencedMessageId: s2.value.data.referencedMessageId, editedAt: O(s2.value.data.editedAt, t2.diff.editedAt), custom: P(s2.value.data.custom, t2.diff.custom), content: O(s2.value.data.content, t2.diff.content) } });
1102
1081
  });
1103
1082
  }
1104
1083
  messageDeleted(e2, t2) {
@@ -1117,7 +1096,7 @@ class oe extends $ {
1117
1096
  });
1118
1097
  }
1119
1098
  }
1120
- class ue extends $ {
1099
+ class ne extends $ {
1121
1100
  constructor(e2, t2, s2, n2) {
1122
1101
  super(e2), this.createdAt = t2, this.dataStore = s2, this.referencedDataStore = n2;
1123
1102
  }
@@ -1151,7 +1130,7 @@ class ue extends $ {
1151
1130
  });
1152
1131
  }
1153
1132
  }
1154
- class ce extends W {
1133
+ class re extends W {
1155
1134
  constructor(e2, t2, s2, n2, r2) {
1156
1135
  super(e2, t2, r2), this.conversationId = s2, this.realtimeClient = n2, this.unsubscribeDebounceMs = 1e3, this.pendingLoadMore = void 0;
1157
1136
  }
@@ -1165,23 +1144,24 @@ class ce extends W {
1165
1144
  }
1166
1145
  fetchInitial(e2) {
1167
1146
  return __async(this, null, function* () {
1168
- const t2 = this.onlyUsedInternally ? 1 : 30, s2 = yield le({ realtimeClient: this.realtimeClient, conversationId: this.conversationId, count: t2 });
1169
- return s2.ok ? null === s2.value.messages ? c({ lastChanged: e2, stores: null, inWindow: null, windowEnd: null }) : he({ seq: e2, messages: s2.value.messages, cursor: s2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : s2;
1147
+ const t2 = this.onlyUsedInternally ? 1 : 30, s2 = yield ie({ realtimeClient: this.realtimeClient, conversationId: this.conversationId, count: t2 });
1148
+ return s2.ok ? null === s2.value.messages ? c({ lastChanged: e2, lastMessageChanged: e2, stores: null, inWindow: null, windowEnd: null }) : ae({ seq: e2, messages: s2.value.messages, cursor: s2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : s2;
1170
1149
  });
1171
1150
  }
1172
1151
  teardownNested(e2) {
1173
- de(e2);
1152
+ oe(e2);
1174
1153
  }
1175
1154
  equal(e2, t2) {
1176
1155
  return null === e2.stores && null === t2.stores || null !== e2.stores && null !== t2.stores && (!!U(Object.keys(e2.stores), Object.keys(t2.stores)) && (!!U(e2.inWindow.map((e3) => e3.messageId), t2.inWindow.map((e3) => e3.messageId)) && U(e2.windowEnd, t2.windowEnd)));
1177
1156
  }
1178
1157
  loadNested(e2, t2) {
1179
1158
  return __async(this, null, function* () {
1180
- if (null === t2.stores) return c({ snapshot: null, loadedAll: true, lastChanged: t2.lastChanged });
1159
+ var _a2, _b;
1160
+ if (null === t2.stores) return c({ snapshot: null, loadedAll: true, lastChanged: t2.lastChanged, lastMessageChanged: t2.lastMessageChanged });
1181
1161
  const s2 = yield Promise.all(t2.inWindow.map((t3) => t3.getDeep(e2))), n2 = s2.find((e3) => !e3.ok);
1182
1162
  if (n2) return n2;
1183
- const r2 = s2, i2 = r2.filter((e3) => null !== e3.value.snapshot).map((e3) => e3.value.snapshot), a2 = Math.max(t2.lastChanged, ...r2.map((e3) => e3.value.lastChanged));
1184
- return c({ snapshot: i2, loadedAll: null === t2.windowEnd, lastChanged: a2 });
1163
+ const r2 = s2, i2 = r2.filter((e3) => null !== e3.value.snapshot).map((e3) => e3.value.snapshot), a2 = Math.max(t2.lastChanged, ...r2.map((e3) => e3.value.lastChanged)), o2 = (_a2 = r2[0]) == null ? void 0 : _a2.value, u2 = Math.max(t2.lastMessageChanged, (_b = o2 == null ? void 0 : o2.lastChanged) != null ? _b : -1);
1164
+ return c({ snapshot: i2, loadedAll: null === t2.windowEnd, lastChanged: a2, lastMessageChanged: u2 });
1185
1165
  });
1186
1166
  }
1187
1167
  loadMore(e2) {
@@ -1196,8 +1176,8 @@ class ce extends W {
1196
1176
  const t2 = yield this.lastState.resultPromise;
1197
1177
  if (!t2.ok) return;
1198
1178
  if (null === t2.value.windowEnd) return;
1199
- const s2 = t2.value.windowEnd.cursor, n2 = yield le({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient }), r2 = this.lastState.seq + 1e-6;
1200
- this.mutate(r2, (e3) => null === e3.value.windowEnd || s2 !== e3.value.windowEnd.cursor ? e3 : n2.ok ? null === n2.value.messages ? (console.warn("[TalkJS] When loading more messages, the conversation no longer existed. We should have been told about this."), e3) : he({ seq: r2, prevState: e3.value, messages: n2.value.messages, cursor: n2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : n2), yield this.emitMutex.runExclusive(() => this.emit(r2));
1179
+ const s2 = t2.value.windowEnd.cursor, n2 = yield ie({ count: e2, cursor: s2, conversationId: this.conversationId, realtimeClient: this.realtimeClient }), r2 = this.lastState.seq + 1e-6;
1180
+ this.mutate(r2, (e3) => null === e3.value.windowEnd || s2 !== e3.value.windowEnd.cursor ? e3 : n2.ok ? null === n2.value.messages ? (console.warn("[TalkJS] When loading more messages, the conversation no longer existed. We should have been told about this."), e3) : ae({ seq: r2, prevState: e3.value, messages: n2.value.messages, cursor: n2.value.nextCursor, conversationId: this.conversationId, realtimeClient: this.realtimeClient }) : n2), yield this.emitMutex.runExclusive(() => this.emit(r2));
1201
1181
  });
1202
1182
  }
1203
1183
  messageCreated(e2, t2) {
@@ -1205,14 +1185,15 @@ class ce extends W {
1205
1185
  if (null === s2.value.stores) return console.warn("[TalkJS] Received a 'message.created' event for a nonexistent conversation."), s2;
1206
1186
  if (s2.value.windowEnd && t2.state.createdAt < s2.value.windowEnd.oldestMessageTs) return s2;
1207
1187
  if (Object.hasOwnProperty.call(s2.value.stores, t2.state.id)) return s2;
1208
- const n2 = __spreadValues({}, s2.value.stores), r2 = new oe(e2, this.conversationId, t2.state, this.realtimeClient);
1188
+ const n2 = __spreadValues({}, s2.value.stores), r2 = new se(e2, this.conversationId, t2.state, this.realtimeClient);
1209
1189
  n2[t2.state.id] = r2;
1210
1190
  const i2 = t2.state.referencedMessageId;
1211
1191
  let a2;
1212
- null === i2 ? a2 = null : i2 in n2 ? a2 = n2[i2] : (a2 = new oe(e2, this.conversationId, i2, this.realtimeClient), n2[i2] = a2);
1213
- const o2 = new ue(e2, t2.state.createdAt, r2, a2), u2 = [...s2.value.inWindow, o2];
1192
+ null === i2 ? a2 = null : i2 in n2 ? a2 = n2[i2] : (a2 = new se(e2, this.conversationId, i2, this.realtimeClient), n2[i2] = a2);
1193
+ const o2 = new ne(e2, t2.state.createdAt, r2, a2), u2 = [...s2.value.inWindow, o2];
1214
1194
  u2.sort((e3, t3) => t3.createdAt - e3.createdAt);
1215
- return c({ lastChanged: e2, stores: n2, inWindow: u2, windowEnd: s2.value.windowEnd });
1195
+ const l2 = u2[0].messageId === t2.messageId ? e2 : s2.value.lastMessageChanged;
1196
+ return c({ lastChanged: e2, lastMessageChanged: l2, stores: n2, inWindow: u2, windowEnd: s2.value.windowEnd });
1216
1197
  });
1217
1198
  }
1218
1199
  messageEdited(e2, t2) {
@@ -1229,28 +1210,32 @@ class ce extends W {
1229
1210
  delete n2[t2.messageId];
1230
1211
  const r2 = s2.value.inWindow.filter((e3) => e3.messageId !== t2.messageId);
1231
1212
  if (t2.newLastMessage && 0 === r2.length) {
1232
- const s3 = new oe(e2, this.conversationId, t2.newLastMessage, this.realtimeClient);
1213
+ const s3 = new se(e2, this.conversationId, t2.newLastMessage, this.realtimeClient);
1233
1214
  n2[s3.messageId] = s3;
1234
- const i2 = t2.newLastMessage.referencedMessageId;
1215
+ const i3 = t2.newLastMessage.referencedMessageId;
1235
1216
  let a2;
1236
- null === i2 ? a2 = null : i2 in n2 ? a2 = n2[i2] : (a2 = new oe(e2, this.conversationId, i2, this.realtimeClient), n2[i2] = a2);
1237
- const o2 = new ue(e2, t2.newLastMessage.createdAt, s3, a2);
1217
+ null === i3 ? a2 = null : i3 in n2 ? a2 = n2[i3] : (a2 = new se(e2, this.conversationId, i3, this.realtimeClient), n2[i3] = a2);
1218
+ const o2 = new ne(e2, t2.newLastMessage.createdAt, s3, a2);
1238
1219
  r2.push(o2);
1239
1220
  }
1240
- return c({ lastChanged: e2, stores: n2, inWindow: r2, windowEnd: s2.value.windowEnd });
1221
+ const i2 = void 0 !== t2.newLastMessage ? e2 : s2.value.lastMessageChanged;
1222
+ return c({ lastChanged: e2, lastMessageChanged: i2, stores: n2, inWindow: r2, windowEnd: s2.value.windowEnd });
1241
1223
  });
1242
1224
  }
1243
1225
  conversationCleared(e2, t2) {
1244
- this.mutate(e2, (t3) => (de(t3.value), c({ lastChanged: e2, stores: {}, inWindow: [], windowEnd: null })));
1226
+ this.mutate(e2, (t3) => {
1227
+ var _a2;
1228
+ return 0 === ((_a2 = t3.value.inWindow) == null ? void 0 : _a2.length) && null === t3.value.windowEnd ? t3 : (oe(t3.value), c({ lastChanged: e2, lastMessageChanged: e2, stores: {}, inWindow: [], windowEnd: null }));
1229
+ });
1245
1230
  }
1246
1231
  sideCreated(e2, t2) {
1247
1232
  const s2 = this.fetchInitial(e2);
1248
1233
  this.mutate(e2, (e3) => null !== e3.value.stores ? (s2.then((e4) => {
1249
- e4.ok && de(e4.value);
1234
+ e4.ok && oe(e4.value);
1250
1235
  }), e3) : s2);
1251
1236
  }
1252
1237
  sideDeleted(e2, t2) {
1253
- this.mutate(e2, (t3) => (de(t3.value), c({ lastChanged: e2, stores: null, inWindow: null, windowEnd: null })));
1238
+ this.mutate(e2, (t3) => null === t3.value.stores ? t3 : (oe(t3.value), c({ lastChanged: e2, lastMessageChanged: e2, stores: null, inWindow: null, windowEnd: null })));
1254
1239
  }
1255
1240
  getMessageFromCache(e2) {
1256
1241
  return __async(this, null, function* () {
@@ -1262,7 +1247,7 @@ class ce extends W {
1262
1247
  });
1263
1248
  }
1264
1249
  }
1265
- function le(_0) {
1250
+ function ie(_0) {
1266
1251
  return __async(this, arguments, function* ({ cursor: e2, realtimeClient: t2, conversationId: s2, count: n2 }) {
1267
1252
  const r2 = { limit: n2, cursor: e2 }, i2 = yield t2.call("GET", ["me", "conversations", s2, "messages"], r2, { bypassCache: true });
1268
1253
  if (i2.ok) {
@@ -1272,31 +1257,34 @@ function le(_0) {
1272
1257
  return (i2.ok || "server" !== i2.where || 404 !== i2.value.status) && (i2.ok || "server" !== i2.where || 403 !== i2.value.status || "NOT_A_PARTICIPANT" !== i2.value.errorCode) ? i2 : c({ messages: null, nextCursor: null });
1273
1258
  });
1274
1259
  }
1275
- function he({ seq: e2, prevState: t2, messages: s2, cursor: n2, conversationId: r2, realtimeClient: i2 }) {
1260
+ function ae({ seq: e2, prevState: t2, messages: s2, cursor: n2, conversationId: r2, realtimeClient: i2 }) {
1261
+ var _a2, _b, _c, _d;
1276
1262
  const a2 = t2 ? __spreadValues({}, t2.stores) : {};
1277
1263
  for (const t3 of s2) if (void 0 === a2[t3.id]) {
1278
- const s3 = new oe(e2, r2, t3, i2);
1264
+ const s3 = new se(e2, r2, t3, i2);
1279
1265
  a2[s3.messageId] = s3;
1280
1266
  }
1281
1267
  for (const t3 of s2) {
1282
1268
  const s3 = t3.referencedMessageId;
1283
1269
  if (s3 && void 0 === a2[s3]) {
1284
- const t4 = new oe(e2, r2, s3, i2);
1270
+ const t4 = new se(e2, r2, s3, i2);
1285
1271
  a2[t4.messageId] = t4;
1286
1272
  }
1287
1273
  }
1288
1274
  const o2 = t2 ? [...t2.inWindow] : [];
1289
- for (const t3 of s2) o2.push(new ue(e2, t3.createdAt, a2[t3.id], t3.referencedMessageId ? a2[t3.referencedMessageId] : null));
1290
- if (o2.sort((e3, t3) => t3.createdAt - e3.createdAt), null === n2) return c({ lastChanged: e2, stores: a2, inWindow: o2, windowEnd: null });
1291
- return c({ lastChanged: e2, stores: a2, inWindow: o2, windowEnd: { cursor: n2, oldestMessageTs: s2[s2.length - 1].createdAt } });
1275
+ for (const t3 of s2) o2.push(new ne(e2, t3.createdAt, a2[t3.id], t3.referencedMessageId ? a2[t3.referencedMessageId] : null));
1276
+ o2.sort((e3, t3) => t3.createdAt - e3.createdAt);
1277
+ const u2 = (_b = (_a2 = t2 == null ? void 0 : t2.inWindow) == null ? void 0 : _a2[0]) == null ? void 0 : _b.messageId, l2 = (_c = o2 == null ? void 0 : o2[0]) == null ? void 0 : _c.messageId, h2 = u2 === l2 ? (_d = t2 == null ? void 0 : t2.lastMessageChanged) != null ? _d : e2 : e2;
1278
+ if (null === n2) return c({ lastChanged: e2, lastMessageChanged: h2, stores: a2, inWindow: o2, windowEnd: null });
1279
+ return c({ lastChanged: e2, lastMessageChanged: h2, stores: a2, inWindow: o2, windowEnd: { cursor: n2, oldestMessageTs: s2[s2.length - 1].createdAt } });
1292
1280
  }
1293
- function de(e2) {
1281
+ function oe(e2) {
1294
1282
  if (e2.stores) {
1295
1283
  const t2 = l("TERMINATED");
1296
1284
  Object.values(e2.stores).forEach((e3) => e3.setError(t2)), e2.inWindow.forEach((e3) => e3.setError(t2));
1297
1285
  }
1298
1286
  }
1299
- class pe extends W {
1287
+ class ue extends W {
1300
1288
  constructor(e2, t2, s2, n2, r2) {
1301
1289
  super(e2, t2, r2), this.conversationId = s2, this.realtimeClient = n2, this.unsubscribeDebounceMs = 5e3;
1302
1290
  }
@@ -1327,17 +1315,17 @@ class pe extends W {
1327
1315
  const s2 = yield t2.messageWindowStore.store.getDeep(e2);
1328
1316
  if (!s2.ok) return s2;
1329
1317
  const n2 = s2.value.snapshot, r2 = (_a2 = n2 == null ? void 0 : n2[0]) != null ? _a2 : null;
1330
- return c({ lastChanged: Math.max(t2.lastChanged, s2.value.lastChanged), snapshot: __spreadProps(__spreadValues({}, t2.snapshot), { lastMessage: r2 }) });
1318
+ return c({ lastChanged: Math.max(t2.lastChanged, s2.value.lastMessageChanged), snapshot: __spreadProps(__spreadValues({}, t2.snapshot), { lastMessage: r2 }) });
1331
1319
  });
1332
1320
  }
1333
1321
  participantEdited(e2, t2) {
1334
- this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'participant.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: fe(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1322
+ this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'participant.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: ce(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1335
1323
  }
1336
1324
  conversationEdited(e2, t2) {
1337
- this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'conversation.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: fe(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1325
+ this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'conversation.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: ce(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1338
1326
  }
1339
1327
  sideEdited(e2, t2) {
1340
- this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'side.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: fe(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1328
+ this.mutate(e2, (s2) => null === s2.value.snapshot ? (console.warn("[TalkJS] Received a 'side.edited' event for a conversation that we thought didn't exist."), s2) : c({ lastChanged: e2, snapshot: ce(s2.value.snapshot, t2.diff), messageWindowStore: s2.value.messageWindowStore }));
1341
1329
  }
1342
1330
  sideCreated(e2, t2) {
1343
1331
  this.mutate(e2, (s2) => s2.value.snapshot ? s2 : c({ lastChanged: e2, snapshot: t2.state, messageWindowStore: s2.value.messageWindowStore }));
@@ -1352,13 +1340,83 @@ class pe extends W {
1352
1340
  });
1353
1341
  }
1354
1342
  }
1355
- function fe(e2, t2) {
1343
+ function ce(e2, t2) {
1356
1344
  const s2 = t2;
1357
- return { id: e2.id, createdAt: e2.createdAt, subject: P(e2.subject, s2.subject), photoUrl: P(e2.photoUrl, s2.photoUrl), welcomeMessages: P(e2.welcomeMessages, s2.welcomeMessages), custom: O(e2.custom, s2.custom), lastMessageAt: P(e2.lastMessageAt, s2.lastMessageAt), unreadMessageCount: P(e2.unreadMessageCount, s2.unreadMessageCount), isUnread: P(e2.isUnread, s2.isUnread), access: P(e2.access, s2.access), notify: P(e2.notify, s2.notify), readUntil: P(e2.readUntil, s2.readUntil), joinedAt: e2.joinedAt };
1345
+ return { id: e2.id, createdAt: e2.createdAt, subject: O(e2.subject, s2.subject), photoUrl: O(e2.photoUrl, s2.photoUrl), welcomeMessages: O(e2.welcomeMessages, s2.welcomeMessages), custom: P(e2.custom, s2.custom), lastMessageAt: O(e2.lastMessageAt, s2.lastMessageAt), unreadMessageCount: O(e2.unreadMessageCount, s2.unreadMessageCount), isUnread: O(e2.isUnread, s2.isUnread), access: O(e2.access, s2.access), notify: O(e2.notify, s2.notify), readUntil: O(e2.readUntil, s2.readUntil), joinedAt: e2.joinedAt };
1346
+ }
1347
+ function le(e2, t2) {
1348
+ for (let s2 in e2) Object.prototype.hasOwnProperty.call(e2, s2) && t2(e2[s2], s2);
1349
+ }
1350
+ function he(e2, t2) {
1351
+ return function(e3, t3) {
1352
+ let s2 = {}, n2 = 0;
1353
+ return le(e3, (e4, r2) => {
1354
+ const [i2, a2] = t3([r2, e4], n2++);
1355
+ s2[i2] = a2;
1356
+ }), s2;
1357
+ }(e2, ([e3, s2]) => [e3, t2(s2, e3)]);
1358
1358
  }
1359
- class me {
1359
+ class de extends W {
1360
+ constructor(e2, t2, s2, n2, r2) {
1361
+ super(e2, n2, r2), this.conversationId = t2, this.realtimeClient = s2, this.unsubscribeDebounceMs = 1e4;
1362
+ }
1363
+ fetchInitial(e2) {
1364
+ return __async(this, null, function* () {
1365
+ const t2 = yield this.realtimeClient.call("GET", ["me", "conversations", this.conversationId, "typing"], {}, { bypassCache: true });
1366
+ if (!t2.ok && "server" === t2.where && 404 === t2.value.status) return c({ data: null, lastChanged: e2 });
1367
+ if (!t2.ok && "server" === t2.where && 403 === t2.value.status && "NOT_A_PARTICIPANT" === t2.value.errorCode) return c({ data: null, lastChanged: e2 });
1368
+ if (!t2.ok) return t2;
1369
+ const s2 = t2.value.data;
1370
+ if (s2.many) return c({ data: { usersTyping: null, many: true }, userSubscriptions: {}, lastChanged: e2 });
1371
+ return c({ data: s2, userSubscriptions: he(s2.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 });
1372
+ });
1373
+ }
1374
+ equal(e2, t2) {
1375
+ return U(e2.data, t2.data);
1376
+ }
1377
+ loadNested(e2, t2) {
1378
+ return __async(this, null, function* () {
1379
+ if (null === t2.data) return c({ snapshot: null, lastChanged: t2.lastChanged });
1380
+ if (t2.data.many) return c({ snapshot: { many: true }, lastChanged: t2.lastChanged });
1381
+ const s2 = Object.entries(t2.data.usersTyping).sort(([e3, t3], [s3, n3]) => t3 - n3).map(([e3, t3]) => e3).map((s3) => t2.userSubscriptions[s3].store.getDeep(e2)), n2 = yield Promise.all(s2), r2 = n2.find((e3) => !e3.ok);
1382
+ if (r2) return r2;
1383
+ const i2 = n2.map((e3) => e3.value), a2 = i2.map((e3) => e3.snapshot), o2 = i2.map((e3) => e3.lastChanged);
1384
+ return c({ snapshot: { users: a2, many: false }, lastChanged: Math.max(t2.lastChanged, ...o2) });
1385
+ });
1386
+ }
1387
+ typingAvailable(e2, t2) {
1388
+ this.mutate(e2, () => c({ data: t2.state, userSubscriptions: t2.state.many ? {} : he(t2.state.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3])), lastChanged: e2 }));
1389
+ }
1390
+ typingChanged(e2, t2) {
1391
+ this.mutate(e2, (s2) => {
1392
+ if (null === s2.value.data) return s2;
1393
+ if (void 0 === t2.diff.many) {
1394
+ if (true === s2.value.data.many) return s2;
1395
+ const n2 = __spreadValues({}, s2.value.data.usersTyping), r2 = __spreadValues({}, s2.value.userSubscriptions);
1396
+ return le(t2.diff.usersTyping, (e3, t3) => {
1397
+ var _a2;
1398
+ "number" == typeof e3 ? (n2[t3] = e3, r2[t3] = this.realtimeClient.internalSubscribe(["users", t3])) : null === e3 && (delete n2[t3], (_a2 = r2[t3]) == null ? void 0 : _a2.unsubscribe(), delete r2[t3]);
1399
+ }), c({ data: { usersTyping: n2, many: false }, userSubscriptions: r2, lastChanged: e2 });
1400
+ }
1401
+ if (true === t2.diff.many) return s2.value.data.many ? s2 : c({ data: { usersTyping: null, many: true }, userSubscriptions: {}, lastChanged: e2 });
1402
+ if (false === t2.diff.many) {
1403
+ if (false === s2.value.data.many) return s2;
1404
+ const n2 = he(t2.diff.usersTyping, (e3, t3) => this.realtimeClient.internalSubscribe(["users", t3]));
1405
+ return c({ data: t2.diff, userSubscriptions: n2, lastChanged: e2 });
1406
+ }
1407
+ throw t2.diff, "Unreachable";
1408
+ });
1409
+ }
1410
+ sideDeleted(e2, t2) {
1411
+ this.mutate(e2, (t3) => null === t3.value.data ? t3 : c({ data: null, lastChanged: e2 }));
1412
+ }
1413
+ teardownNested(e2) {
1414
+ e2.data && le(e2.userSubscriptions, (e3) => e3.unsubscribe());
1415
+ }
1416
+ }
1417
+ class pe {
1360
1418
  constructor(e2, t2, s2) {
1361
- this.realtimeClient = s2, this.userStores = {}, this.messageWindowStores = {}, this.conversationStores = {}, this.emitMutex = new j(), this.seqOffset = 0, this.seqInThisConnection = 0, this.refetchOnNextNetworkLoss = true, this.connection = new _(e2, t2, { onUpstreamRestarting: () => {
1419
+ this.realtimeClient = s2, this.userStores = {}, this.messageWindowStores = {}, this.conversationStores = {}, this.typingStores = {}, this.emitMutex = new j(), this.seqOffset = 0, this.seqInThisConnection = 0, this.refetchOnNextNetworkLoss = true, this.connection = new _(e2, t2, { onUpstreamRestarting: () => {
1362
1420
  this.refetchOnNextNetworkLoss = false;
1363
1421
  }, onReady: () => {
1364
1422
  this.refetchOnNextNetworkLoss = true;
@@ -1385,10 +1443,11 @@ class me {
1385
1443
  for (const t2 of Object.values(this.userStores)) t2.refetch(e2);
1386
1444
  for (const t2 of Object.values(this.messageWindowStores)) t2.refetch(e2);
1387
1445
  for (const t2 of Object.values(this.conversationStores)) t2.refetch(e2);
1446
+ for (const t2 of Object.values(this.typingStores)) t2.refetch(e2);
1388
1447
  }
1389
1448
  emitAll(e2) {
1390
1449
  return this.emitMutex.runExclusive(() => __async(this, null, function* () {
1391
- yield Promise.all([...Object.values(this.userStores).map((t2) => t2.emit(e2)), ...Object.values(this.messageWindowStores).map((t2) => t2.emit(e2)), ...Object.values(this.conversationStores).map((t2) => t2.emit(e2))]);
1450
+ yield Promise.all([...Object.values(this.userStores).map((t2) => t2.emit(e2)), ...Object.values(this.messageWindowStores).map((t2) => t2.emit(e2)), ...Object.values(this.conversationStores).map((t2) => t2.emit(e2)), ...Object.values(this.typingStores).map((t2) => t2.emit(e2))]);
1392
1451
  }));
1393
1452
  }
1394
1453
  handlePublish(e2, t2) {
@@ -1413,11 +1472,22 @@ class me {
1413
1472
  return this.handleMessageEdited(e2, t2);
1414
1473
  case "message.deleted":
1415
1474
  return this.handleMessageDeleted(e2, t2);
1416
- case "messages.cleared":
1475
+ case "typing.available":
1476
+ return this.handleTypingAvailable(e2, t2);
1477
+ case "typing.changed":
1478
+ return this.handleTypingChanged(e2, t2);
1417
1479
  case "conversation.cleared":
1418
1480
  return this.handleConversationCleared(e2, t2);
1419
1481
  }
1420
1482
  }
1483
+ handleTypingAvailable(e2, t2) {
1484
+ const s2 = this.typingStores[t2.conversationId];
1485
+ s2 && s2.typingAvailable(e2, t2);
1486
+ }
1487
+ handleTypingChanged(e2, t2) {
1488
+ const s2 = this.typingStores[t2.conversationId];
1489
+ s2 && s2.typingChanged(e2, t2);
1490
+ }
1421
1491
  handleUserCreated(e2, t2) {
1422
1492
  const s2 = this.userStores[t2.userId];
1423
1493
  s2 && s2.userCreated(e2, t2);
@@ -1449,6 +1519,8 @@ class me {
1449
1519
  s2 && s2.sideDeleted(e2, t2);
1450
1520
  const n2 = this.conversationStores[t2.conversationId];
1451
1521
  n2 && n2.sideDeleted(e2, t2);
1522
+ const r2 = this.typingStores[t2.conversationId];
1523
+ r2 && r2.sideDeleted(e2, t2);
1452
1524
  }
1453
1525
  handleMessageCreated(e2, t2) {
1454
1526
  const s2 = this.messageWindowStores[t2.conversationId];
@@ -1542,7 +1614,7 @@ class me {
1542
1614
  this.connection.subscribe(["me", "conversations", t2]).then((t3) => {
1543
1615
  t3.ok || e3.setError(t3);
1544
1616
  });
1545
- const e3 = new pe(this.seq, this.emitMutex, t2, this.realtimeClient, () => {
1617
+ const e3 = new ue(this.seq, this.emitMutex, t2, this.realtimeClient, () => {
1546
1618
  delete this.conversationStores[t2], this.connection.unsubscribe(["me", "conversations", t2]);
1547
1619
  });
1548
1620
  return this.conversationStores[t2] = e3, e3;
@@ -1555,16 +1627,29 @@ class me {
1555
1627
  this.connection.subscribe(["me", "conversations", t2, "messages"]).then((t3) => {
1556
1628
  t3.ok || e3.setError(t3);
1557
1629
  });
1558
- const e3 = new ce(this.seq, this.emitMutex, t2, this.realtimeClient, () => {
1630
+ const e3 = new re(this.seq, this.emitMutex, t2, this.realtimeClient, () => {
1559
1631
  delete this.messageWindowStores[t2], this.connection.unsubscribe(["me", "conversations", t2, "messages"]);
1560
1632
  });
1561
1633
  return this.messageWindowStores[t2] = e3, e3;
1562
1634
  }
1563
1635
  }
1636
+ if (s(e2, ["me", "conversations", "*", "typing"])) {
1637
+ const t2 = e2[2];
1638
+ if (Object.hasOwnProperty.call(this.typingStores, t2)) return this.typingStores[t2];
1639
+ {
1640
+ this.connection.subscribe(["me", "conversations", t2, "typing"]).then((t3) => {
1641
+ t3.ok || e3.setError(t3);
1642
+ });
1643
+ const e3 = new de(this.seq, t2, this.realtimeClient, this.emitMutex, () => {
1644
+ delete this.typingStores[t2], this.connection.unsubscribe(["me", "conversations", t2, "typing"]);
1645
+ });
1646
+ return this.typingStores[t2] = e3, e3;
1647
+ }
1648
+ }
1564
1649
  throw new Error("Unrecognised subscribe path: " + e2);
1565
1650
  }
1566
1651
  getStoreIfExists(e2) {
1567
- var _a2, _b;
1652
+ var _a2, _b, _c;
1568
1653
  if (s(e2, ["users", "*"])) {
1569
1654
  const t2 = e2[1];
1570
1655
  return (_a2 = this.userStores[t2]) != null ? _a2 : null;
@@ -1573,6 +1658,10 @@ class me {
1573
1658
  const t2 = e2[2];
1574
1659
  return (_b = this.messageWindowStores[t2]) != null ? _b : null;
1575
1660
  }
1661
+ if (s(e2, ["me", "conversations", "*", "typing"])) {
1662
+ const t2 = e2[2];
1663
+ return (_c = this.typingStores[t2]) != null ? _c : null;
1664
+ }
1576
1665
  throw new Error("Unrecognised subscribe path: " + e2);
1577
1666
  }
1578
1667
  destroy() {
@@ -1582,9 +1671,9 @@ class me {
1582
1671
  return this.connection.isConnected();
1583
1672
  }
1584
1673
  }
1585
- class ge {
1674
+ class fe {
1586
1675
  constructor(e2, t2, s2) {
1587
- this.userId = t2, this.alive = true, this.connection = new me(e2, s2, this), s2.onTokenRefreshFailed(() => {
1676
+ this.userId = t2, this.alive = true, this.connection = new pe(e2, s2, this), s2.onTokenRefreshFailed(() => {
1588
1677
  this.destroy();
1589
1678
  });
1590
1679
  }
@@ -1609,7 +1698,7 @@ class ge {
1609
1698
  listMessages(e2, t2) {
1610
1699
  return __async(this, null, function* () {
1611
1700
  const s2 = yield this.call("GET", ["me", "conversations", e2, "messages"], t2);
1612
- if (!s2.ok) return ve(s2, "Listing messages in " + e2);
1701
+ if (!s2.ok) return ge(s2, "Listing messages in " + e2);
1613
1702
  const n2 = s2.value.data.data, r2 = yield Promise.all(n2.map((t3) => this.createMessageSnapshot(t3, e2))), i2 = r2.find((e3) => !e3.ok);
1614
1703
  if (void 0 !== i2 && !i2.ok) return i2;
1615
1704
  return c(r2.map(({ value: e3 }) => e3));
@@ -1638,7 +1727,7 @@ class ge {
1638
1727
  const s2 = yield this.call("GET", ["me", "conversations", e2, "messages", t2], {});
1639
1728
  if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return c(null);
1640
1729
  if (!s2.ok && "server" === s2.where && 403 === s2.value.status && "NOT_A_PARTICIPANT" === s2.value.errorCode) return c(null);
1641
- if (!s2.ok) return ve(s2, `Fetching referenced message ${t2} in conversation ${e2}`);
1730
+ if (!s2.ok) return ge(s2, `Fetching referenced message ${t2} in conversation ${e2}`);
1642
1731
  const n2 = s2.value.data, r2 = yield this.getUser(n2.senderId);
1643
1732
  if (!r2.ok) return r2;
1644
1733
  const i2 = r2.value;
@@ -1649,26 +1738,26 @@ class ge {
1649
1738
  return __async(this, null, function* () {
1650
1739
  const t2 = yield this.call("GET", ["users", e2], { includePrivateFields: false });
1651
1740
  if (!t2.ok && "server" === t2.where && 404 === t2.value.status) return c(null);
1652
- if (!t2.ok) return ve(t2, "Get user " + e2);
1741
+ if (!t2.ok) return ge(t2, "Get user " + e2);
1653
1742
  return c(this.createUserSnapshot(t2.value.data));
1654
1743
  });
1655
1744
  }
1656
1745
  createMessageSnapshotPreloaded(e2, t2, s2) {
1657
- return { id: e2.id, type: e2.type, sender: t2, referencedMessage: s2, custom: e2.custom, createdAt: e2.createdAt, editedAt: e2.editedAt, origin: e2.origin, content: e2.content, plaintext: ie(e2.content, {}) };
1746
+ return { id: e2.id, type: e2.type, sender: t2, referencedMessage: s2, custom: e2.custom, createdAt: e2.createdAt, editedAt: e2.editedAt, origin: e2.origin, content: e2.content, plaintext: ee(e2.content, {}) };
1658
1747
  }
1659
1748
  createReferencedMessageSnapshotPreloaded(e2, t2) {
1660
- return { id: e2.id, type: e2.type, sender: t2, referencedMessageId: e2.referencedMessageId, custom: e2.custom, createdAt: e2.createdAt, editedAt: e2.editedAt, origin: e2.origin, content: e2.content, plaintext: ie(e2.content, {}) };
1749
+ return { id: e2.id, type: e2.type, sender: t2, referencedMessageId: e2.referencedMessageId, custom: e2.custom, createdAt: e2.createdAt, editedAt: e2.editedAt, origin: e2.origin, content: e2.content, plaintext: ee(e2.content, {}) };
1661
1750
  }
1662
1751
  }
1663
- function ve(e2, t2) {
1752
+ function ge(e2, t2) {
1664
1753
  return "server" === e2.where ? h(__spreadProps(__spreadValues({}, e2.value), { operation: t2 })) : e2;
1665
1754
  }
1666
- function be(e2, s2) {
1755
+ function me(e2, s2) {
1667
1756
  var _a2;
1668
1757
  if (s2.ok) return s2.value;
1669
1758
  throw "SESSION_DESTROYED" === s2.value ? new Error(`${e2} failed because the session was destroyed`) : new Error(t((_a2 = s2.value.operation) != null ? _a2 : e2, s2.value));
1670
1759
  }
1671
- class we {
1760
+ class ve {
1672
1761
  constructor(e2, t2) {
1673
1762
  this.id = e2, this._realtimeClient = t2;
1674
1763
  }
@@ -1678,7 +1767,7 @@ class we {
1678
1767
  get() {
1679
1768
  return __async(this, null, function* () {
1680
1769
  const e2 = yield this._realtimeClient.getUser(this.brandedId);
1681
- return be("Get user " + this.id, e2);
1770
+ return me("Get user " + this.id, e2);
1682
1771
  });
1683
1772
  }
1684
1773
  set(t2) {
@@ -1699,7 +1788,7 @@ class we {
1699
1788
  return this._realtimeClient.subscribe(["users", this.brandedId], e2);
1700
1789
  }
1701
1790
  }
1702
- class ye {
1791
+ class be {
1703
1792
  constructor(e2, t2, s2) {
1704
1793
  this.userId = e2, this.conversationId = t2, this._realtimeClient = s2;
1705
1794
  }
@@ -1743,7 +1832,7 @@ class ye {
1743
1832
  });
1744
1833
  }
1745
1834
  }
1746
- function Ae(e2) {
1835
+ function ye(e2) {
1747
1836
  const t2 = "-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz";
1748
1837
  let s2 = 0;
1749
1838
  const n2 = [], r2 = e2 === s2;
@@ -1761,7 +1850,7 @@ function Ae(e2) {
1761
1850
  if (20 != a2.length) throw new Error("Length should be 20.");
1762
1851
  return a2;
1763
1852
  }
1764
- const Ce = (e2, t2, s2 = void 0) => function(e3, t3) {
1853
+ const we = (e2, t2, s2 = void 0) => function(e3, t3) {
1765
1854
  return e3.reduce((e4, s3, n2) => e4.concat(t3(s3, n2)), []);
1766
1855
  }(e2, (e3) => {
1767
1856
  if ("string" == typeof e3) return t2(e3, s2);
@@ -1774,14 +1863,14 @@ const Ce = (e2, t2, s2 = void 0) => function(e3, t3) {
1774
1863
  case "bulletList":
1775
1864
  case "bulletpoint":
1776
1865
  case "bulletPoint":
1777
- return [{ type: e3.type, children: Ce(e3.children, t2, e3.type) }];
1866
+ return [{ type: e3.type, children: we(e3.children, t2, e3.type) }];
1778
1867
  case "link":
1779
- return [{ type: e3.type, url: e3.url, children: Ce(e3.children, t2, e3.type) }];
1868
+ return [{ type: e3.type, url: e3.url, children: we(e3.children, t2, e3.type) }];
1780
1869
  case "actionlink":
1781
1870
  case "actionLink":
1782
1871
  case "actionbutton":
1783
1872
  case "actionButton":
1784
- return [{ type: e3.type, action: e3.action, params: e3.params, children: Ce(e3.children, t2, e3.type) }];
1873
+ return [{ type: e3.type, action: e3.action, params: e3.params, children: we(e3.children, t2, e3.type) }];
1785
1874
  case "mention":
1786
1875
  case "autolink":
1787
1876
  case "autoLink":
@@ -1796,12 +1885,12 @@ const Ce = (e2, t2, s2 = void 0) => function(e3, t3) {
1796
1885
  return [e3];
1797
1886
  }
1798
1887
  });
1799
- function Ee(e2, t2) {
1888
+ function Ae(e2, t2) {
1800
1889
  return (s2) => {
1801
1890
  const n2 = s2;
1802
1891
  let r2 = 0;
1803
1892
  const i2 = [];
1804
- for (const a2 of Z(s2, e2)) {
1893
+ for (const a2 of z(s2, e2)) {
1805
1894
  a2.index - r2 > 0 && i2.push(n2.substring(r2, a2.index));
1806
1895
  const e3 = t2(a2);
1807
1896
  Array.isArray(e3) ? i2.push(...e3) : i2.push(e3), r2 = a2.index + a2[0].length;
@@ -1809,29 +1898,29 @@ function Ee(e2, t2) {
1809
1898
  return r2 < s2.length && i2.push(s2.substring(r2)), i2;
1810
1899
  };
1811
1900
  }
1812
- const ke = "’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1813
- var xe = ((e2) => (e2[e2.italic = 1] = "italic", e2[e2.strikethrough = 2] = "strikethrough", e2[e2.bold = 4] = "bold", e2))(xe || {});
1814
- const Se = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
1901
+ const Ce = "’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1902
+ var Ee = ((e2) => (e2[e2.italic = 1] = "italic", e2[e2.strikethrough = 2] = "strikethrough", e2[e2.bold = 4] = "bold", e2))(Ee || {});
1903
+ const ke = [0, 1, 2, 3, 4, 5, 6].map((e2) => {
1815
1904
  const t2 = [];
1816
1905
  return 1 & e2 || t2.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/), 2 & e2 || t2.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/), 4 & e2 || t2.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/), new RegExp(t2.map((e3) => e3.source).join("|"), "g");
1817
- }), Te = { _: 1, "*": 4, "~": 2 };
1818
- function De(e2) {
1819
- return Ie(e2, 0);
1906
+ }), xe = { _: 1, "*": 4, "~": 2 };
1907
+ function Se(e2) {
1908
+ return Te(e2, 0);
1820
1909
  }
1821
- function Ie(e2, t2 = 0) {
1822
- const s2 = Se[t2], n2 = s2 ? function(e3) {
1823
- const t3 = Fe.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${ke}])(?:${e3.source})(?=[\\s${ke}]|$)`, "g")), s3 = Ee(t3, (e4) => {
1910
+ function Te(e2, t2 = 0) {
1911
+ const s2 = ke[t2], n2 = s2 ? function(e3) {
1912
+ const t3 = De.getOrCompute(e3, () => new RegExp(`(?:^|[\\s${Ce}])(?:${e3.source})(?=[\\s${Ce}]|$)`, "g")), s3 = Ae(t3, (e4) => {
1824
1913
  const t4 = e4[0][1], s4 = e4[1] || e4[2] || e4[3] || e4[4] || e4[5] || e4[6];
1825
- return [" ", { type: xe[Te[t4]], children: [s4] }];
1914
+ return [" ", { type: Ee[xe[t4]], children: [s4] }];
1826
1915
  });
1827
1916
  return (e4) => {
1828
1917
  const [t4, ...n3] = s3(" " + e4);
1829
1918
  return t4.length > 1 && n3.unshift(t4.substring(1)), n3;
1830
1919
  };
1831
1920
  }(s2) : () => [e2];
1832
- return Ce(n2(e2), (e3, s3) => "bold" === s3 || "italic" === s3 || "strikethrough" === s3 ? Ie(e3, t2 | xe[s3]) : [e3]);
1921
+ return we(n2(e2), (e3, s3) => "bold" === s3 || "italic" === s3 || "strikethrough" === s3 ? Te(e3, t2 | Ee[s3]) : [e3]);
1833
1922
  }
1834
- const Fe = function() {
1923
+ const De = function() {
1835
1924
  const e2 = function() {
1836
1925
  try {
1837
1926
  return /* @__PURE__ */ new WeakMap();
@@ -1847,18 +1936,18 @@ const Fe = function() {
1847
1936
  return e2.set(t2, n2), n2;
1848
1937
  } };
1849
1938
  }();
1850
- function Be(e2, t2) {
1939
+ function Ie(e2, t2) {
1851
1940
  if (Array.prototype.indexOf) return e2.indexOf(t2);
1852
1941
  for (var s2 = 0, n2 = e2.length; s2 < n2; s2++) if (e2[s2] === t2) return s2;
1853
1942
  return -1;
1854
1943
  }
1855
- function Me(e2, t2) {
1944
+ function Fe(e2, t2) {
1856
1945
  for (var s2 = e2.length - 1; s2 >= 0; s2--) true === t2(e2[s2]) && e2.splice(s2, 1);
1857
1946
  }
1858
- function Re(e2) {
1947
+ function Be(e2) {
1859
1948
  throw new Error("Unhandled case for value: '" + e2 + "'");
1860
1949
  }
1861
- var Ne = function() {
1950
+ var Me = function() {
1862
1951
  function e2(e3) {
1863
1952
  void 0 === e3 && (e3 = {}), this.tagName = "", this.attrs = {}, this.innerHTML = "", this.whitespaceRegex = /\s+/, this.tagName = e3.tagName || "", this.attrs = e3.attrs || {}, this.innerHTML = e3.innerHtml || e3.innerHTML || "";
1864
1953
  }
@@ -1877,11 +1966,11 @@ var Ne = function() {
1877
1966
  }, e2.prototype.setClass = function(e3) {
1878
1967
  return this.setAttr("class", e3);
1879
1968
  }, e2.prototype.addClass = function(e3) {
1880
- for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); t2 = i2.shift(); ) -1 === Be(r2, t2) && r2.push(t2);
1969
+ for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); t2 = i2.shift(); ) -1 === Ie(r2, t2) && r2.push(t2);
1881
1970
  return this.getAttrs().class = r2.join(" "), this;
1882
1971
  }, e2.prototype.removeClass = function(e3) {
1883
1972
  for (var t2, s2 = this.getClass(), n2 = this.whitespaceRegex, r2 = s2 ? s2.split(n2) : [], i2 = e3.split(n2); r2.length && (t2 = i2.shift()); ) {
1884
- var a2 = Be(r2, t2);
1973
+ var a2 = Ie(r2, t2);
1885
1974
  -1 !== a2 && r2.splice(a2, 1);
1886
1975
  }
1887
1976
  return this.getAttrs().class = r2.join(" "), this;
@@ -1907,12 +1996,12 @@ var Ne = function() {
1907
1996
  return t2.join(" ");
1908
1997
  }, e2;
1909
1998
  }();
1910
- var _e = function() {
1999
+ var Re = function() {
1911
2000
  function e2(e3) {
1912
2001
  void 0 === e3 && (e3 = {}), this.newWindow = false, this.truncate = {}, this.className = "", this.newWindow = e3.newWindow || false, this.truncate = e3.truncate || {}, this.className = e3.className || "";
1913
2002
  }
1914
2003
  return e2.prototype.build = function(e3) {
1915
- return new Ne({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
2004
+ return new Me({ tagName: "a", attrs: this.createAttrs(e3), innerHtml: this.processAnchorText(e3.getAnchorText()) });
1916
2005
  }, e2.prototype.createAttrs = function(e3) {
1917
2006
  var t2 = { href: e3.getAnchorHref() }, s2 = this.createCssClass(e3);
1918
2007
  return s2 && (t2.class = s2), this.newWindow && (t2.target = "_blank", t2.rel = "noopener noreferrer"), this.truncate && this.truncate.length && this.truncate.length < e3.getAnchorText().length && (t2.title = e3.getAnchorHref()), t2;
@@ -1982,7 +2071,7 @@ var _e = function() {
1982
2071
  }(e4, t3, s3);
1983
2072
  }(e3, s2);
1984
2073
  }, e2;
1985
- }(), Pe = function() {
2074
+ }(), Ne = function() {
1986
2075
  function e2(e3) {
1987
2076
  this.__jsduckDummyDocProp = null, this.matchedText = "", this.offset = 0, this.tagBuilder = e3.tagBuilder, this.matchedText = e3.matchedText, this.offset = e3.offset;
1988
2077
  }
@@ -1997,30 +2086,30 @@ var _e = function() {
1997
2086
  }, e2.prototype.buildTag = function() {
1998
2087
  return this.tagBuilder.build(this);
1999
2088
  }, e2;
2000
- }(), Oe = function(e2, t2) {
2001
- return Oe = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
2089
+ }(), _e = function(e2, t2) {
2090
+ return _e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e3, t3) {
2002
2091
  e3.__proto__ = t3;
2003
2092
  } || function(e3, t3) {
2004
2093
  for (var s2 in t3) t3.hasOwnProperty(s2) && (e3[s2] = t3[s2]);
2005
- }, Oe(e2, t2);
2094
+ }, _e(e2, t2);
2006
2095
  };
2007
- function Ue(e2, t2) {
2096
+ function Oe(e2, t2) {
2008
2097
  function s2() {
2009
2098
  this.constructor = e2;
2010
2099
  }
2011
- Oe(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
2100
+ _e(e2, t2), e2.prototype = null === t2 ? Object.create(t2) : (s2.prototype = t2.prototype, new s2());
2012
2101
  }
2013
- var je, $e = function() {
2014
- return $e = Object.assign || function(e2) {
2102
+ var Pe, Ue = function() {
2103
+ return Ue = Object.assign || function(e2) {
2015
2104
  for (var t2, s2 = 1, n2 = arguments.length; s2 < n2; s2++) for (var r2 in t2 = arguments[s2]) Object.prototype.hasOwnProperty.call(t2, r2) && (e2[r2] = t2[r2]);
2016
2105
  return e2;
2017
- }, $e.apply(this, arguments);
2018
- }, We = function(e2) {
2106
+ }, Ue.apply(this, arguments);
2107
+ }, je = function(e2) {
2019
2108
  function t2(t3) {
2020
2109
  var s2 = e2.call(this, t3) || this;
2021
2110
  return s2.email = "", s2.email = t3.email, s2;
2022
2111
  }
2023
- return Ue(t2, e2), t2.prototype.getType = function() {
2112
+ return Oe(t2, e2), t2.prototype.getType = function() {
2024
2113
  return "email";
2025
2114
  }, t2.prototype.getEmail = function() {
2026
2115
  return this.email;
@@ -2029,12 +2118,12 @@ var je, $e = function() {
2029
2118
  }, t2.prototype.getAnchorText = function() {
2030
2119
  return this.email;
2031
2120
  }, t2;
2032
- }(Pe), qe = function(e2) {
2121
+ }(Ne), $e = function(e2) {
2033
2122
  function t2(t3) {
2034
2123
  var s2 = e2.call(this, t3) || this;
2035
2124
  return s2.serviceName = "", s2.hashtag = "", s2.serviceName = t3.serviceName, s2.hashtag = t3.hashtag, s2;
2036
2125
  }
2037
- return Ue(t2, e2), t2.prototype.getType = function() {
2126
+ return Oe(t2, e2), t2.prototype.getType = function() {
2038
2127
  return "hashtag";
2039
2128
  }, t2.prototype.getServiceName = function() {
2040
2129
  return this.serviceName;
@@ -2055,12 +2144,12 @@ var je, $e = function() {
2055
2144
  }, t2.prototype.getAnchorText = function() {
2056
2145
  return "#" + this.hashtag;
2057
2146
  }, t2;
2058
- }(Pe), He = function(e2) {
2147
+ }(Ne), We = function(e2) {
2059
2148
  function t2(t3) {
2060
2149
  var s2 = e2.call(this, t3) || this;
2061
2150
  return s2.serviceName = "twitter", s2.mention = "", s2.mention = t3.mention, s2.serviceName = t3.serviceName, s2;
2062
2151
  }
2063
- return Ue(t2, e2), t2.prototype.getType = function() {
2152
+ return Oe(t2, e2), t2.prototype.getType = function() {
2064
2153
  return "mention";
2065
2154
  }, t2.prototype.getMention = function() {
2066
2155
  return this.mention;
@@ -2083,12 +2172,12 @@ var je, $e = function() {
2083
2172
  var t3 = e2.prototype.getCssClassSuffixes.call(this), s2 = this.getServiceName();
2084
2173
  return s2 && t3.push(s2), t3;
2085
2174
  }, t2;
2086
- }(Pe), Ge = function(e2) {
2175
+ }(Ne), qe = function(e2) {
2087
2176
  function t2(t3) {
2088
2177
  var s2 = e2.call(this, t3) || this;
2089
2178
  return s2.number = "", s2.plusSign = false, s2.number = t3.number, s2.plusSign = t3.plusSign, s2;
2090
2179
  }
2091
- return Ue(t2, e2), t2.prototype.getType = function() {
2180
+ return Oe(t2, e2), t2.prototype.getType = function() {
2092
2181
  return "phone";
2093
2182
  }, t2.prototype.getPhoneNumber = function() {
2094
2183
  return this.number;
@@ -2099,12 +2188,12 @@ var je, $e = function() {
2099
2188
  }, t2.prototype.getAnchorText = function() {
2100
2189
  return this.matchedText;
2101
2190
  }, t2;
2102
- }(Pe), Le = function(e2) {
2191
+ }(Ne), He = function(e2) {
2103
2192
  function t2(t3) {
2104
2193
  var s2 = e2.call(this, t3) || this;
2105
2194
  return s2.url = "", s2.urlMatchType = "scheme", s2.protocolUrlMatch = false, s2.protocolRelativeMatch = false, s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.schemePrefixRegex = /^(https?:\/\/)?/i, s2.wwwPrefixRegex = /^(https?:\/\/)?(www\.)?/i, s2.protocolRelativeRegex = /^\/\//, s2.protocolPrepended = false, s2.urlMatchType = t3.urlMatchType, s2.url = t3.url, s2.protocolUrlMatch = t3.protocolUrlMatch, s2.protocolRelativeMatch = t3.protocolRelativeMatch, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
2106
2195
  }
2107
- return Ue(t2, e2), t2.prototype.getType = function() {
2196
+ return Oe(t2, e2), t2.prototype.getType = function() {
2108
2197
  return "url";
2109
2198
  }, t2.prototype.getUrlMatchType = function() {
2110
2199
  return this.urlMatchType;
@@ -2132,19 +2221,19 @@ var je, $e = function() {
2132
2221
  return t3;
2133
2222
  }
2134
2223
  }, t2;
2135
- }(Pe), ze = function(e2) {
2224
+ }(Ne), Ge = function(e2) {
2136
2225
  this.__jsduckDummyDocProp = null, this.tagBuilder = e2.tagBuilder;
2137
- }, Je = /[A-Za-z]/, Ye = /[\d]/, Qe = /[\D]/, Ve = /\s/, Ze = /['"]/, Ke = /[\x00-\x1F\x7F]/, Xe = /A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source, et = Xe + /\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source + /\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source, tt = /0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source, st = et + tt, nt = et + tt, rt = "(?:[" + tt + "]{1,3}\\.){3}[" + tt + "]{1,3}", it = "[" + nt + "](?:[" + nt + "\\-]{0,61}[" + nt + "])?", at = function(e2) {
2138
- return "(?=(" + it + "))\\" + e2;
2139
- }, ot = function(e2) {
2140
- return "(?:" + at(e2) + "(?:\\." + at(e2 + 1) + "){0,126}|" + rt + ")";
2141
- }, ut = new RegExp("[" + nt + "]"), ct = /(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/, lt = new RegExp("[" + nt + "!#$%&'*+/=?^_`{|}~-]"), ht = new RegExp("^" + ct.source + "$"), dt = function(e2) {
2226
+ }, Le = /[A-Za-z]/, ze = /[\d]/, Je = /[\D]/, Ye = /\s/, Qe = /['"]/, Ve = /[\x00-\x1F\x7F]/, Ze = /A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source, Ke = Ze + /\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source + /\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source, Xe = /0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source, et = Ke + Xe, tt = Ke + Xe, st = "(?:[" + Xe + "]{1,3}\\.){3}[" + Xe + "]{1,3}", nt = "[" + tt + "](?:[" + tt + "\\-]{0,61}[" + tt + "])?", rt = function(e2) {
2227
+ return "(?=(" + nt + "))\\" + e2;
2228
+ }, it = function(e2) {
2229
+ return "(?:" + rt(e2) + "(?:\\." + rt(e2 + 1) + "){0,126}|" + st + ")";
2230
+ }, at = new RegExp("[" + tt + "]"), ot = /(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--3oq18vl8pn36a|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|afamilycompany|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbb9fbpob|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|spreadbetting|travelchannel|wolterskluwer|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|rightathome|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--estv75g|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--kpu716f|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pbt977c|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nationwide|newholland|nextdirect|onyourside|properties|protection|prudential|realestate|republican|restaurant|schaeffler|swiftcover|tatamotors|technology|telefonica|university|vistaprint|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|fujixerox|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|honeywell|institute|insurance|kuokgroup|ladbrokes|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|scjohnson|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--tckwe|xn--vhquv|yodobashi|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|budapest|builders|business|capetown|catering|catholic|chrysler|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|esurance|etisalat|everbank|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|movistar|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|symantec|training|uconnect|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|cartier|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|iselect|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lancome|lanxess|lasalle|latrobe|leclerc|liaison|limited|lincoln|markets|metlife|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|shriram|singles|staples|starhub|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|الجزائر|العليان|پاکستان|كاثوليك|موبايلي|இந்தியா|abarth|abbott|abbvie|active|africa|agency|airbus|airtel|alipay|alsace|alstom|anquan|aramco|author|bayern|beauty|berlin|bharti|blanco|bostik|boston|broker|camera|career|caseih|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|mobily|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|piaget|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|warman|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|dodge|drive|dubai|earth|edeka|email|epost|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glade|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|intel|irish|iveco|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|lixil|loans|locus|lotte|lotto|lupin|macys|mango|media|miami|money|mopar|movie|nadex|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|zippo|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|aigo|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|doha|duck|duns|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|raid|read|reit|rent|rest|rich|rmit|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scor|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|グーグル|クラウド|ポイント|大众汽车|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bnl|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceb|ceo|cfa|cfd|com|crs|csc|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jcp|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|off|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|qvc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|srl|srt|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ストア|セール|みんな|中文网|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|工行|广东|微博|慈善|手机|手表|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|珠宝|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/, ut = new RegExp("[" + tt + "!#$%&'*+/=?^_`{|}~-]"), ct = new RegExp("^" + ot.source + "$"), lt = function(e2) {
2142
2231
  function t2() {
2143
2232
  var t3 = null !== e2 && e2.apply(this, arguments) || this;
2144
- return t3.localPartCharRegex = lt, t3.strictTldRegex = ht, t3;
2233
+ return t3.localPartCharRegex = ut, t3.strictTldRegex = ct, t3;
2145
2234
  }
2146
- return Ue(t2, e2), t2.prototype.parseMatches = function(e3) {
2147
- for (var t3 = this.tagBuilder, s2 = this.localPartCharRegex, n2 = this.strictTldRegex, r2 = [], i2 = e3.length, a2 = new pt(), o2 = { m: "a", a: "i", i: "l", l: "t", t: "o", o: ":" }, u2 = 0, c2 = 0, l2 = a2; u2 < i2; ) {
2235
+ return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2236
+ for (var t3 = this.tagBuilder, s2 = this.localPartCharRegex, n2 = this.strictTldRegex, r2 = [], i2 = e3.length, a2 = new ht(), o2 = { m: "a", a: "i", i: "l", l: "t", t: "o", o: ":" }, u2 = 0, c2 = 0, l2 = a2; u2 < i2; ) {
2148
2237
  var h2 = e3.charAt(u2);
2149
2238
  switch (c2) {
2150
2239
  case 0:
@@ -2157,10 +2246,10 @@ var je, $e = function() {
2157
2246
  f2(h2);
2158
2247
  break;
2159
2248
  case 3:
2160
- m2(h2);
2249
+ g2(h2);
2161
2250
  break;
2162
2251
  case 4:
2163
- g2(h2);
2252
+ m2(h2);
2164
2253
  break;
2165
2254
  case 5:
2166
2255
  v2(h2);
@@ -2169,40 +2258,40 @@ var je, $e = function() {
2169
2258
  b2(h2);
2170
2259
  break;
2171
2260
  case 7:
2172
- w2(h2);
2261
+ y2(h2);
2173
2262
  break;
2174
2263
  default:
2175
- Re(c2);
2264
+ Be(c2);
2176
2265
  }
2177
2266
  u2++;
2178
2267
  }
2179
2268
  return C2(), r2;
2180
2269
  function d2(e4) {
2181
- "m" === e4 ? y2(1) : s2.test(e4) && y2();
2270
+ "m" === e4 ? w2(1) : s2.test(e4) && w2();
2182
2271
  }
2183
2272
  function p2(e4, t4) {
2184
- ":" === e4 ? s2.test(t4) ? (c2 = 2, l2 = new pt($e($e({}, l2), { hasMailtoPrefix: true }))) : A2() : o2[e4] === t4 || (s2.test(t4) ? c2 = 2 : "." === t4 ? c2 = 3 : "@" === t4 ? c2 = 4 : A2());
2273
+ ":" === e4 ? s2.test(t4) ? (c2 = 2, l2 = new ht(Ue(Ue({}, l2), { hasMailtoPrefix: true }))) : A2() : o2[e4] === t4 || (s2.test(t4) ? c2 = 2 : "." === t4 ? c2 = 3 : "@" === t4 ? c2 = 4 : A2());
2185
2274
  }
2186
2275
  function f2(e4) {
2187
2276
  "." === e4 ? c2 = 3 : "@" === e4 ? c2 = 4 : s2.test(e4) || A2();
2188
2277
  }
2189
- function m2(e4) {
2278
+ function g2(e4) {
2190
2279
  "." === e4 || "@" === e4 ? A2() : s2.test(e4) ? c2 = 2 : A2();
2191
2280
  }
2192
- function g2(e4) {
2193
- ut.test(e4) ? c2 = 5 : A2();
2281
+ function m2(e4) {
2282
+ at.test(e4) ? c2 = 5 : A2();
2194
2283
  }
2195
2284
  function v2(e4) {
2196
- "." === e4 ? c2 = 7 : "-" === e4 ? c2 = 6 : ut.test(e4) || C2();
2285
+ "." === e4 ? c2 = 7 : "-" === e4 ? c2 = 6 : at.test(e4) || C2();
2197
2286
  }
2198
2287
  function b2(e4) {
2199
- "-" === e4 || "." === e4 ? C2() : ut.test(e4) ? c2 = 5 : C2();
2200
- }
2201
- function w2(e4) {
2202
- "." === e4 || "-" === e4 ? C2() : ut.test(e4) ? (c2 = 5, l2 = new pt($e($e({}, l2), { hasDomainDot: true }))) : C2();
2288
+ "-" === e4 || "." === e4 ? C2() : at.test(e4) ? c2 = 5 : C2();
2203
2289
  }
2204
2290
  function y2(e4) {
2205
- void 0 === e4 && (e4 = 2), c2 = e4, l2 = new pt({ idx: u2 });
2291
+ "." === e4 || "-" === e4 ? C2() : at.test(e4) ? (c2 = 5, l2 = new ht(Ue(Ue({}, l2), { hasDomainDot: true }))) : C2();
2292
+ }
2293
+ function w2(e4) {
2294
+ void 0 === e4 && (e4 = 2), c2 = e4, l2 = new ht({ idx: u2 });
2206
2295
  }
2207
2296
  function A2() {
2208
2297
  c2 = 0, l2 = a2;
@@ -2215,14 +2304,14 @@ var je, $e = function() {
2215
2304
  (function(e4) {
2216
2305
  var t4 = e4.split(".").pop() || "", s4 = t4.toLowerCase();
2217
2306
  return n2.test(s4);
2218
- })(i3) && r2.push(new We({ tagBuilder: t3, matchedText: s3, offset: l2.idx, email: i3 }));
2307
+ })(i3) && r2.push(new je({ tagBuilder: t3, matchedText: s3, offset: l2.idx, email: i3 }));
2219
2308
  }
2220
2309
  A2();
2221
2310
  }
2222
2311
  }, t2;
2223
- }(ze), pt = function(e2) {
2312
+ }(Ge), ht = function(e2) {
2224
2313
  void 0 === e2 && (e2 = {}), this.idx = void 0 !== e2.idx ? e2.idx : -1, this.hasMailtoPrefix = !!e2.hasMailtoPrefix, this.hasDomainDot = !!e2.hasDomainDot;
2225
- }, ft = function() {
2314
+ }, dt = function() {
2226
2315
  function e2() {
2227
2316
  }
2228
2317
  return e2.isValid = function(e3, t2) {
@@ -2240,22 +2329,22 @@ var je, $e = function() {
2240
2329
  return !(!e3 || t2 && this.hasFullProtocolRegex.test(t2) || -1 !== e3.indexOf("."));
2241
2330
  }, e2.urlMatchDoesNotHaveAtLeastOneWordChar = function(e3, t2) {
2242
2331
  return !(!e3 || !t2) && (!this.hasFullProtocolRegex.test(t2) && !this.hasWordCharAfterProtocolRegex.test(e3));
2243
- }, e2.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//, e2.uriSchemeRegex = /^[A-Za-z][-.+A-Za-z0-9]*:/, e2.hasWordCharAfterProtocolRegex = new RegExp(":[^\\s]*?[" + Xe + "]"), e2.ipRegex = /[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/, e2;
2244
- }(), mt = (je = new RegExp("[/?#](?:[" + nt + "\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*[" + nt + "\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"), new RegExp(["(?:", "(", /(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source, ot(2), ")", "|", "(", "(//)?", /(?:www\.)/.source, ot(6), ")", "|", "(", "(//)?", ot(10) + "\\.", ct.source, "(?![-" + st + "])", ")", ")", "(?::[0-9]+)?", "(?:" + je.source + ")?"].join(""), "gi")), gt = new RegExp("[" + nt + "]"), vt = function(e2) {
2332
+ }, e2.hasFullProtocolRegex = /^[A-Za-z][-.+A-Za-z0-9]*:\/\//, e2.uriSchemeRegex = /^[A-Za-z][-.+A-Za-z0-9]*:/, e2.hasWordCharAfterProtocolRegex = new RegExp(":[^\\s]*?[" + Ze + "]"), e2.ipRegex = /[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/, e2;
2333
+ }(), pt = (Pe = new RegExp("[/?#](?:[" + tt + "\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*[" + tt + "\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"), new RegExp(["(?:", "(", /(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source, it(2), ")", "|", "(", "(//)?", /(?:www\.)/.source, it(6), ")", "|", "(", "(//)?", it(10) + "\\.", ot.source, "(?![-" + et + "])", ")", ")", "(?::[0-9]+)?", "(?:" + Pe.source + ")?"].join(""), "gi")), ft = new RegExp("[" + tt + "]"), gt = function(e2) {
2245
2334
  function t2(t3) {
2246
2335
  var s2 = e2.call(this, t3) || this;
2247
- return s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.matcherRegex = mt, s2.wordCharRegExp = gt, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
2336
+ return s2.stripPrefix = { scheme: true, www: true }, s2.stripTrailingSlash = true, s2.decodePercentEncoding = true, s2.matcherRegex = pt, s2.wordCharRegExp = ft, s2.stripPrefix = t3.stripPrefix, s2.stripTrailingSlash = t3.stripTrailingSlash, s2.decodePercentEncoding = t3.decodePercentEncoding, s2;
2248
2337
  }
2249
- return Ue(t2, e2), t2.prototype.parseMatches = function(e3) {
2338
+ return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2250
2339
  for (var t3, s2 = this.matcherRegex, n2 = this.stripPrefix, r2 = this.stripTrailingSlash, i2 = this.decodePercentEncoding, a2 = this.tagBuilder, o2 = [], u2 = function() {
2251
- var s3 = t3[0], u3 = t3[1], l2 = t3[4], h2 = t3[5], d2 = t3[9], p2 = t3.index, f2 = h2 || d2, m2 = e3.charAt(p2 - 1);
2252
- if (!ft.isValid(s3, u3)) return "continue";
2253
- if (p2 > 0 && "@" === m2) return "continue";
2254
- if (p2 > 0 && f2 && c2.wordCharRegExp.test(m2)) return "continue";
2340
+ var s3 = t3[0], u3 = t3[1], l2 = t3[4], h2 = t3[5], d2 = t3[9], p2 = t3.index, f2 = h2 || d2, g2 = e3.charAt(p2 - 1);
2341
+ if (!dt.isValid(s3, u3)) return "continue";
2342
+ if (p2 > 0 && "@" === g2) return "continue";
2343
+ if (p2 > 0 && f2 && c2.wordCharRegExp.test(g2)) return "continue";
2255
2344
  if (/\?$/.test(s3) && (s3 = s3.substr(0, s3.length - 1)), c2.matchHasUnbalancedClosingParen(s3)) s3 = s3.substr(0, s3.length - 1);
2256
2345
  else {
2257
- var g2 = c2.matchHasInvalidCharAfterTld(s3, u3);
2258
- g2 > -1 && (s3 = s3.substr(0, g2));
2346
+ var m2 = c2.matchHasInvalidCharAfterTld(s3, u3);
2347
+ m2 > -1 && (s3 = s3.substr(0, m2));
2259
2348
  }
2260
2349
  var v2 = ["http://", "https://"].find(function(e4) {
2261
2350
  return !!u3 && -1 !== u3.indexOf(e4);
@@ -2264,8 +2353,8 @@ var je, $e = function() {
2264
2353
  var b2 = s3.indexOf(v2);
2265
2354
  s3 = s3.substr(b2), u3 = u3.substr(b2), p2 += b2;
2266
2355
  }
2267
- var w2 = u3 ? "scheme" : l2 ? "www" : "tld", y2 = !!u3;
2268
- o2.push(new Le({ tagBuilder: a2, matchedText: s3, offset: p2, urlMatchType: w2, url: s3, protocolUrlMatch: y2, protocolRelativeMatch: !!f2, stripPrefix: n2, stripTrailingSlash: r2, decodePercentEncoding: i2 }));
2356
+ var y2 = u3 ? "scheme" : l2 ? "www" : "tld", w2 = !!u3;
2357
+ o2.push(new He({ tagBuilder: a2, matchedText: s3, offset: p2, urlMatchType: y2, url: s3, protocolUrlMatch: w2, protocolRelativeMatch: !!f2, stripPrefix: n2, stripTrailingSlash: r2, decodePercentEncoding: i2 }));
2269
2358
  }, c2 = this; null !== (t3 = s2.exec(e3)); ) u2();
2270
2359
  return o2;
2271
2360
  }, t2.prototype.matchHasUnbalancedClosingParen = function(e3) {
@@ -2285,65 +2374,65 @@ var je, $e = function() {
2285
2374
  if (!e3) return -1;
2286
2375
  var s2 = 0;
2287
2376
  t3 && (s2 = e3.indexOf(":"), e3 = e3.slice(s2));
2288
- var n2 = new RegExp("^((.?//)?[-." + nt + "]*[-" + nt + "]\\.[-" + nt + "]+)").exec(e3);
2377
+ var n2 = new RegExp("^((.?//)?[-." + tt + "]*[-" + tt + "]\\.[-" + tt + "]+)").exec(e3);
2289
2378
  return null === n2 ? -1 : (s2 += n2[1].length, e3 = e3.slice(n2[1].length), /^[^-.A-Za-z0-9:\/?#]/.test(e3) ? s2 : -1);
2290
2379
  }, t2;
2291
- }(ze), bt = new RegExp("#[_" + nt + "]{1,139}(?![_" + nt + "])", "g"), wt = new RegExp("[^" + nt + "]"), yt = function(e2) {
2380
+ }(Ge), mt = new RegExp("#[_" + tt + "]{1,139}(?![_" + tt + "])", "g"), vt = new RegExp("[^" + tt + "]"), bt = function(e2) {
2292
2381
  function t2(t3) {
2293
2382
  var s2 = e2.call(this, t3) || this;
2294
- return s2.serviceName = "twitter", s2.matcherRegex = bt, s2.nonWordCharRegex = wt, s2.serviceName = t3.serviceName, s2;
2383
+ return s2.serviceName = "twitter", s2.matcherRegex = mt, s2.nonWordCharRegex = vt, s2.serviceName = t3.serviceName, s2;
2295
2384
  }
2296
- return Ue(t2, e2), t2.prototype.parseMatches = function(e3) {
2385
+ return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2297
2386
  for (var t3, s2 = this.matcherRegex, n2 = this.nonWordCharRegex, r2 = this.serviceName, i2 = this.tagBuilder, a2 = []; null !== (t3 = s2.exec(e3)); ) {
2298
2387
  var o2 = t3.index, u2 = e3.charAt(o2 - 1);
2299
2388
  if (0 === o2 || n2.test(u2)) {
2300
2389
  var c2 = t3[0], l2 = t3[0].slice(1);
2301
- a2.push(new qe({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: r2, hashtag: l2 }));
2390
+ a2.push(new $e({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: r2, hashtag: l2 }));
2302
2391
  }
2303
2392
  }
2304
2393
  return a2;
2305
2394
  }, t2;
2306
- }(ze), At = new RegExp(/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/.source + "|" + /(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source, "g"), Ct = function(e2) {
2395
+ }(Ge), yt = new RegExp(/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/.source + "|" + /(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source, "g"), wt = function(e2) {
2307
2396
  function t2() {
2308
2397
  var t3 = null !== e2 && e2.apply(this, arguments) || this;
2309
- return t3.matcherRegex = At, t3;
2398
+ return t3.matcherRegex = yt, t3;
2310
2399
  }
2311
- return Ue(t2, e2), t2.prototype.parseMatches = function(e3) {
2400
+ return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2312
2401
  for (var t3, s2 = this.matcherRegex, n2 = this.tagBuilder, r2 = []; null !== (t3 = s2.exec(e3)); ) {
2313
2402
  var i2 = t3[0], a2 = i2.replace(/[^0-9,;#]/g, ""), o2 = !(!t3[1] && !t3[2]), u2 = 0 == t3.index ? "" : e3.substr(t3.index - 1, 1), c2 = e3.substr(t3.index + i2.length, 1), l2 = !u2.match(/\d/) && !c2.match(/\d/);
2314
- this.testMatch(t3[3]) && this.testMatch(i2) && l2 && r2.push(new Ge({ tagBuilder: n2, matchedText: i2, offset: t3.index, number: a2, plusSign: o2 }));
2403
+ this.testMatch(t3[3]) && this.testMatch(i2) && l2 && r2.push(new qe({ tagBuilder: n2, matchedText: i2, offset: t3.index, number: a2, plusSign: o2 }));
2315
2404
  }
2316
2405
  return r2;
2317
2406
  }, t2.prototype.testMatch = function(e3) {
2318
- return Qe.test(e3);
2407
+ return Je.test(e3);
2319
2408
  }, t2;
2320
- }(ze), Et = new RegExp("@[_" + nt + "]{1,50}(?![_" + nt + "])", "g"), kt = new RegExp("@[_." + nt + "]{1,30}(?![_" + nt + "])", "g"), xt = new RegExp("@[-_." + nt + "]{1,50}(?![-_" + nt + "])", "g"), St = new RegExp("[^" + nt + "]"), Tt = function(e2) {
2409
+ }(Ge), At = new RegExp("@[_" + tt + "]{1,50}(?![_" + tt + "])", "g"), Ct = new RegExp("@[_." + tt + "]{1,30}(?![_" + tt + "])", "g"), Et = new RegExp("@[-_." + tt + "]{1,50}(?![-_" + tt + "])", "g"), kt = new RegExp("[^" + tt + "]"), xt = function(e2) {
2321
2410
  function t2(t3) {
2322
2411
  var s2 = e2.call(this, t3) || this;
2323
- return s2.serviceName = "twitter", s2.matcherRegexes = { twitter: Et, instagram: kt, soundcloud: xt }, s2.nonWordCharRegex = St, s2.serviceName = t3.serviceName, s2;
2412
+ return s2.serviceName = "twitter", s2.matcherRegexes = { twitter: At, instagram: Ct, soundcloud: Et }, s2.nonWordCharRegex = kt, s2.serviceName = t3.serviceName, s2;
2324
2413
  }
2325
- return Ue(t2, e2), t2.prototype.parseMatches = function(e3) {
2414
+ return Oe(t2, e2), t2.prototype.parseMatches = function(e3) {
2326
2415
  var t3, s2 = this.serviceName, n2 = this.matcherRegexes[this.serviceName], r2 = this.nonWordCharRegex, i2 = this.tagBuilder, a2 = [];
2327
2416
  if (!n2) return a2;
2328
2417
  for (; null !== (t3 = n2.exec(e3)); ) {
2329
2418
  var o2 = t3.index, u2 = e3.charAt(o2 - 1);
2330
2419
  if (0 === o2 || r2.test(u2)) {
2331
2420
  var c2 = t3[0].replace(/\.+$/g, ""), l2 = c2.slice(1);
2332
- a2.push(new He({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: s2, mention: l2 }));
2421
+ a2.push(new We({ tagBuilder: i2, matchedText: c2, offset: o2, serviceName: s2, mention: l2 }));
2333
2422
  }
2334
2423
  }
2335
2424
  return a2;
2336
2425
  }, t2;
2337
- }(ze);
2338
- function Dt(e2, t2) {
2339
- for (var s2, n2 = t2.onOpenTag, r2 = t2.onCloseTag, i2 = t2.onText, a2 = t2.onComment, o2 = t2.onDoctype, u2 = new It(), c2 = 0, l2 = e2.length, h2 = 0, d2 = 0, p2 = u2; c2 < l2; ) {
2426
+ }(Ge);
2427
+ function St(e2, t2) {
2428
+ for (var s2, n2 = t2.onOpenTag, r2 = t2.onCloseTag, i2 = t2.onText, a2 = t2.onComment, o2 = t2.onDoctype, u2 = new Tt(), c2 = 0, l2 = e2.length, h2 = 0, d2 = 0, p2 = u2; c2 < l2; ) {
2340
2429
  var f2 = e2.charAt(c2);
2341
2430
  switch (h2) {
2342
2431
  case 0:
2343
- m2(f2);
2432
+ g2(f2);
2344
2433
  break;
2345
2434
  case 1:
2346
- g2(f2);
2435
+ m2(f2);
2347
2436
  break;
2348
2437
  case 2:
2349
2438
  b2(f2);
@@ -2352,10 +2441,10 @@ function Dt(e2, t2) {
2352
2441
  v2(f2);
2353
2442
  break;
2354
2443
  case 4:
2355
- w2(f2);
2444
+ y2(f2);
2356
2445
  break;
2357
2446
  case 5:
2358
- y2(f2);
2447
+ w2(f2);
2359
2448
  break;
2360
2449
  case 6:
2361
2450
  A2(f2);
@@ -2403,33 +2492,33 @@ function Dt(e2, t2) {
2403
2492
  _2(f2);
2404
2493
  break;
2405
2494
  default:
2406
- Re(h2);
2495
+ Be(h2);
2407
2496
  }
2408
2497
  c2++;
2409
2498
  }
2410
- function m2(e3) {
2411
- "<" === e3 && O2();
2412
- }
2413
2499
  function g2(e3) {
2414
- "!" === e3 ? h2 = 13 : "/" === e3 ? (h2 = 2, p2 = new It($e($e({}, p2), { isClosing: true }))) : "<" === e3 ? O2() : Je.test(e3) ? (h2 = 3, p2 = new It($e($e({}, p2), { isOpening: true }))) : (h2 = 0, p2 = u2);
2500
+ "<" === e3 && P2();
2501
+ }
2502
+ function m2(e3) {
2503
+ "!" === e3 ? h2 = 13 : "/" === e3 ? (h2 = 2, p2 = new Tt(Ue(Ue({}, p2), { isClosing: true }))) : "<" === e3 ? P2() : Le.test(e3) ? (h2 = 3, p2 = new Tt(Ue(Ue({}, p2), { isOpening: true }))) : (h2 = 0, p2 = u2);
2415
2504
  }
2416
2505
  function v2(e3) {
2417
- Ve.test(e3) ? (p2 = new It($e($e({}, p2), { name: j2() })), h2 = 4) : "<" === e3 ? O2() : "/" === e3 ? (p2 = new It($e($e({}, p2), { name: j2() })), h2 = 12) : ">" === e3 ? (p2 = new It($e($e({}, p2), { name: j2() })), U2()) : Je.test(e3) || Ye.test(e3) || ":" === e3 || P2();
2506
+ Ye.test(e3) ? (p2 = new Tt(Ue(Ue({}, p2), { name: j2() })), h2 = 4) : "<" === e3 ? P2() : "/" === e3 ? (p2 = new Tt(Ue(Ue({}, p2), { name: j2() })), h2 = 12) : ">" === e3 ? (p2 = new Tt(Ue(Ue({}, p2), { name: j2() })), U2()) : Le.test(e3) || ze.test(e3) || ":" === e3 || O2();
2418
2507
  }
2419
2508
  function b2(e3) {
2420
- ">" === e3 ? P2() : Je.test(e3) ? h2 = 3 : P2();
2421
- }
2422
- function w2(e3) {
2423
- Ve.test(e3) || ("/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : "=" === e3 || Ze.test(e3) || Ke.test(e3) ? P2() : h2 = 5);
2509
+ ">" === e3 ? O2() : Le.test(e3) ? h2 = 3 : O2();
2424
2510
  }
2425
2511
  function y2(e3) {
2426
- Ve.test(e3) ? h2 = 6 : "/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : Ze.test(e3) && P2();
2512
+ Ye.test(e3) || ("/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? P2() : "=" === e3 || Qe.test(e3) || Ve.test(e3) ? O2() : h2 = 5);
2513
+ }
2514
+ function w2(e3) {
2515
+ Ye.test(e3) ? h2 = 6 : "/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? P2() : Qe.test(e3) && O2();
2427
2516
  }
2428
2517
  function A2(e3) {
2429
- Ve.test(e3) || ("/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? O2() : Ze.test(e3) ? P2() : h2 = 5);
2518
+ Ye.test(e3) || ("/" === e3 ? h2 = 12 : "=" === e3 ? h2 = 7 : ">" === e3 ? U2() : "<" === e3 ? P2() : Qe.test(e3) ? O2() : h2 = 5);
2430
2519
  }
2431
2520
  function C2(e3) {
2432
- Ve.test(e3) || ('"' === e3 ? h2 = 8 : "'" === e3 ? h2 = 9 : /[>=`]/.test(e3) ? P2() : "<" === e3 ? O2() : h2 = 10);
2521
+ Ye.test(e3) || ('"' === e3 ? h2 = 8 : "'" === e3 ? h2 = 9 : /[>=`]/.test(e3) ? O2() : "<" === e3 ? P2() : h2 = 10);
2433
2522
  }
2434
2523
  function E2(e3) {
2435
2524
  '"' === e3 && (h2 = 11);
@@ -2438,22 +2527,22 @@ function Dt(e2, t2) {
2438
2527
  "'" === e3 && (h2 = 11);
2439
2528
  }
2440
2529
  function x2(e3) {
2441
- Ve.test(e3) ? h2 = 4 : ">" === e3 ? U2() : "<" === e3 && O2();
2530
+ Ye.test(e3) ? h2 = 4 : ">" === e3 ? U2() : "<" === e3 && P2();
2442
2531
  }
2443
2532
  function S2(e3) {
2444
- Ve.test(e3) ? h2 = 4 : "/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? O2() : (h2 = 4, c2--);
2533
+ Ye.test(e3) ? h2 = 4 : "/" === e3 ? h2 = 12 : ">" === e3 ? U2() : "<" === e3 ? P2() : (h2 = 4, c2--);
2445
2534
  }
2446
2535
  function T2(e3) {
2447
- ">" === e3 ? (p2 = new It($e($e({}, p2), { isClosing: true })), U2()) : h2 = 4;
2536
+ ">" === e3 ? (p2 = new Tt(Ue(Ue({}, p2), { isClosing: true })), U2()) : h2 = 4;
2448
2537
  }
2449
2538
  function D2(t3) {
2450
- "--" === e2.substr(c2, 2) ? (c2 += 2, p2 = new It($e($e({}, p2), { type: "comment" })), h2 = 14) : "DOCTYPE" === e2.substr(c2, 7).toUpperCase() ? (c2 += 7, p2 = new It($e($e({}, p2), { type: "doctype" })), h2 = 20) : P2();
2539
+ "--" === e2.substr(c2, 2) ? (c2 += 2, p2 = new Tt(Ue(Ue({}, p2), { type: "comment" })), h2 = 14) : "DOCTYPE" === e2.substr(c2, 7).toUpperCase() ? (c2 += 7, p2 = new Tt(Ue(Ue({}, p2), { type: "doctype" })), h2 = 20) : O2();
2451
2540
  }
2452
2541
  function I2(e3) {
2453
- "-" === e3 ? h2 = 15 : ">" === e3 ? P2() : h2 = 16;
2542
+ "-" === e3 ? h2 = 15 : ">" === e3 ? O2() : h2 = 16;
2454
2543
  }
2455
2544
  function F2(e3) {
2456
- "-" === e3 ? h2 = 18 : ">" === e3 ? P2() : h2 = 16;
2545
+ "-" === e3 ? h2 = 18 : ">" === e3 ? O2() : h2 = 16;
2457
2546
  }
2458
2547
  function B2(e3) {
2459
2548
  "-" === e3 && (h2 = 17);
@@ -2468,17 +2557,17 @@ function Dt(e2, t2) {
2468
2557
  "-" === e3 ? h2 = 17 : ">" === e3 ? U2() : h2 = 16;
2469
2558
  }
2470
2559
  function _2(e3) {
2471
- ">" === e3 ? U2() : "<" === e3 && O2();
2560
+ ">" === e3 ? U2() : "<" === e3 && P2();
2472
2561
  }
2473
- function P2() {
2562
+ function O2() {
2474
2563
  h2 = 0, p2 = u2;
2475
2564
  }
2476
- function O2() {
2477
- h2 = 1, p2 = new It({ idx: c2 });
2565
+ function P2() {
2566
+ h2 = 1, p2 = new Tt({ idx: c2 });
2478
2567
  }
2479
2568
  function U2() {
2480
2569
  var t3 = e2.slice(d2, p2.idx);
2481
- t3 && i2(t3, d2), "comment" === p2.type ? a2(p2.idx) : "doctype" === p2.type ? o2(p2.idx) : (p2.isOpening && n2(p2.name, p2.idx), p2.isClosing && r2(p2.name, p2.idx)), P2(), d2 = c2 + 1;
2570
+ t3 && i2(t3, d2), "comment" === p2.type ? a2(p2.idx) : "doctype" === p2.type ? o2(p2.idx) : (p2.isOpening && n2(p2.name, p2.idx), p2.isClosing && r2(p2.name, p2.idx)), O2(), d2 = c2 + 1;
2482
2571
  }
2483
2572
  function j2() {
2484
2573
  var t3 = p2.idx + (p2.isClosing ? 2 : 1);
@@ -2486,9 +2575,9 @@ function Dt(e2, t2) {
2486
2575
  }
2487
2576
  d2 < c2 && (s2 = e2.slice(d2, c2), i2(s2, d2), d2 = c2 + 1);
2488
2577
  }
2489
- var It = function(e2) {
2578
+ var Tt = function(e2) {
2490
2579
  void 0 === e2 && (e2 = {}), this.idx = void 0 !== e2.idx ? e2.idx : -1, this.type = e2.type || "tag", this.name = e2.name || "", this.isOpening = !!e2.isOpening, this.isClosing = !!e2.isClosing;
2491
- }, Ft = function() {
2580
+ }, Dt = function() {
2492
2581
  function e2(t2) {
2493
2582
  void 0 === t2 && (t2 = {}), this.version = e2.version, this.urls = {}, this.email = true, this.phone = true, this.hashtag = false, this.mention = false, this.newWindow = true, this.stripPrefix = { scheme: true, www: true }, this.stripTrailingSlash = true, this.decodePercentEncoding = true, this.truncate = { length: 0, location: "end" }, this.className = "", this.replaceFn = null, this.context = void 0, this.sanitizeHtml = false, this.matchers = null, this.tagBuilder = null, this.urls = this.normalizeUrlsCfg(t2.urls), this.email = "boolean" == typeof t2.email ? t2.email : this.email, this.phone = "boolean" == typeof t2.phone ? t2.phone : this.phone, this.hashtag = t2.hashtag || this.hashtag, this.mention = t2.mention || this.mention, this.newWindow = "boolean" == typeof t2.newWindow ? t2.newWindow : this.newWindow, this.stripPrefix = this.normalizeStripPrefixCfg(t2.stripPrefix), this.stripTrailingSlash = "boolean" == typeof t2.stripTrailingSlash ? t2.stripTrailingSlash : this.stripTrailingSlash, this.decodePercentEncoding = "boolean" == typeof t2.decodePercentEncoding ? t2.decodePercentEncoding : this.decodePercentEncoding, this.sanitizeHtml = t2.sanitizeHtml || false;
2494
2583
  var s2 = this.mention;
@@ -2512,7 +2601,7 @@ var It = function(e2) {
2512
2601
  }(e3 || {}, { length: Number.POSITIVE_INFINITY, location: "end" });
2513
2602
  }, e2.prototype.parse = function(e3) {
2514
2603
  var t2 = this, s2 = ["a", "style", "script"], n2 = 0, r2 = [];
2515
- return Dt(e3, { onOpenTag: function(e4) {
2604
+ return St(e3, { onOpenTag: function(e4) {
2516
2605
  s2.indexOf(e4) >= 0 && n2++;
2517
2606
  }, onText: function(e4, s3) {
2518
2607
  if (0 === n2) {
@@ -2551,19 +2640,19 @@ var It = function(e2) {
2551
2640
  }
2552
2641
  return e3;
2553
2642
  }, e2.prototype.removeUnwantedMatches = function(e3) {
2554
- return this.hashtag || Me(e3, function(e4) {
2643
+ return this.hashtag || Fe(e3, function(e4) {
2555
2644
  return "hashtag" === e4.getType();
2556
- }), this.email || Me(e3, function(e4) {
2645
+ }), this.email || Fe(e3, function(e4) {
2557
2646
  return "email" === e4.getType();
2558
- }), this.phone || Me(e3, function(e4) {
2647
+ }), this.phone || Fe(e3, function(e4) {
2559
2648
  return "phone" === e4.getType();
2560
- }), this.mention || Me(e3, function(e4) {
2649
+ }), this.mention || Fe(e3, function(e4) {
2561
2650
  return "mention" === e4.getType();
2562
- }), this.urls.schemeMatches || Me(e3, function(e4) {
2651
+ }), this.urls.schemeMatches || Fe(e3, function(e4) {
2563
2652
  return "url" === e4.getType() && "scheme" === e4.getUrlMatchType();
2564
- }), this.urls.wwwMatches || Me(e3, function(e4) {
2653
+ }), this.urls.wwwMatches || Fe(e3, function(e4) {
2565
2654
  return "url" === e4.getType() && "www" === e4.getUrlMatchType();
2566
- }), this.urls.tldMatches || Me(e3, function(e4) {
2655
+ }), this.urls.tldMatches || Fe(e3, function(e4) {
2567
2656
  return "url" === e4.getType() && "tld" === e4.getUrlMatchType();
2568
2657
  }), e3;
2569
2658
  }, e2.prototype.parseText = function(e3, t2) {
@@ -2583,102 +2672,99 @@ var It = function(e2) {
2583
2672
  return s2.push(e3.substring(n2)), s2.join("");
2584
2673
  }, e2.prototype.createMatchReturnVal = function(e3) {
2585
2674
  var t2;
2586
- return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof Ne ? t2.toAnchorString() : e3.buildTag().toAnchorString();
2675
+ return this.replaceFn && (t2 = this.replaceFn.call(this.context, e3)), "string" == typeof t2 ? t2 : false === t2 ? e3.getMatchedText() : t2 instanceof Me ? t2.toAnchorString() : e3.buildTag().toAnchorString();
2587
2676
  }, e2.prototype.getMatchers = function() {
2588
2677
  if (this.matchers) return this.matchers;
2589
- var e3 = this.getTagBuilder(), t2 = [new yt({ tagBuilder: e3, serviceName: this.hashtag }), new dt({ tagBuilder: e3 }), new Ct({ tagBuilder: e3 }), new Tt({ tagBuilder: e3, serviceName: this.mention }), new vt({ tagBuilder: e3, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })];
2678
+ var e3 = this.getTagBuilder(), t2 = [new bt({ tagBuilder: e3, serviceName: this.hashtag }), new lt({ tagBuilder: e3 }), new wt({ tagBuilder: e3 }), new xt({ tagBuilder: e3, serviceName: this.mention }), new gt({ tagBuilder: e3, stripPrefix: this.stripPrefix, stripTrailingSlash: this.stripTrailingSlash, decodePercentEncoding: this.decodePercentEncoding })];
2590
2679
  return this.matchers = t2;
2591
2680
  }, e2.prototype.getTagBuilder = function() {
2592
2681
  var e3 = this.tagBuilder;
2593
- return e3 || (e3 = this.tagBuilder = new _e({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
2594
- }, e2.version = "3.14.3", e2.AnchorTagBuilder = _e, e2.HtmlTag = Ne, e2.matcher = { Email: dt, Hashtag: yt, Matcher: ze, Mention: Tt, Phone: Ct, Url: vt }, e2.match = { Email: We, Hashtag: qe, Match: Pe, Mention: He, Phone: Ge, Url: Le }, e2;
2682
+ return e3 || (e3 = this.tagBuilder = new Re({ newWindow: this.newWindow, truncate: this.truncate, className: this.className })), e3;
2683
+ }, e2.version = "3.14.3", e2.AnchorTagBuilder = Re, e2.HtmlTag = Me, e2.matcher = { Email: lt, Hashtag: bt, Matcher: Ge, Mention: xt, Phone: wt, Url: gt }, e2.match = { Email: je, Hashtag: $e, Match: Ne, Mention: We, Phone: qe, Url: He }, e2;
2595
2684
  }();
2596
- function Bt(e2, t2 = e2) {
2685
+ function It(e2, t2 = e2) {
2597
2686
  return { type: "autolink", url: e2, text: t2 };
2598
2687
  }
2599
- Object.assign(function(e2, t2) {
2600
- return { type: "emoji", kind: e2, text: t2 };
2601
- }, { emoticon: (e2) => ({ type: "emoji", kind: "emoticon", text: e2 }), unicode: (e2) => ({ type: "emoji", kind: "unicode", text: e2 }) });
2602
- const Mt = Ee(/<!!mention:([^>\s]*?)\|(.*?)>/gm, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3) {
2688
+ const Ft = Ae(/<!!mention:([^>\s]*?)\|(.*?)>/gm, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3) {
2603
2689
  return { type: "mention", id: e3, text: t3 };
2604
- }(decodeURIComponent(t2), s2)), Rt = Ee(/<!!customemoji:(.*?)>/gm, ([e2, t2]) => /* @__PURE__ */ function(e3) {
2690
+ }(decodeURIComponent(t2), s2)), Bt = Ae(/<!!customemoji:(.*?)>/gm, ([e2, t2]) => /* @__PURE__ */ function(e3) {
2605
2691
  return { type: "customemoji", text: e3 };
2606
- }(t2)), Nt = Ee(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3 = []) {
2692
+ }(t2)), Mt = Ae(/<((?:https?|mailto):.*?)\|(.*?)>/gi, ([e2, t2, s2]) => /* @__PURE__ */ function(e3, t3 = []) {
2607
2693
  return { type: "link", url: e3, children: t3 };
2608
- }(t2, [s2])), _t = Ee(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2609
- const { action: n2, params: r2 } = Ot(t2);
2694
+ }(t2, [s2])), Rt = Ae(/<actionlink:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2695
+ const { action: n2, params: r2 } = _t(t2);
2610
2696
  return /* @__PURE__ */ function(e3, t3, s3 = []) {
2611
2697
  return { type: "actionlink", action: e3, params: t3, children: s3 };
2612
2698
  }(n2, r2, [s2]);
2613
- }), Pt = Ee(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2614
- const { action: n2, params: r2 } = Ot(t2);
2699
+ }), Nt = Ae(/<actionbutton:([^|]+)[|]([^>]*)>/gi, ([e2, t2, s2]) => {
2700
+ const { action: n2, params: r2 } = _t(t2);
2615
2701
  return /* @__PURE__ */ function(e3, t3, s3 = []) {
2616
2702
  return { type: "actionbutton", action: e3, params: t3, children: s3 };
2617
2703
  }(n2, r2, [s2]);
2618
2704
  });
2619
- function Ot(e2) {
2705
+ function _t(e2) {
2620
2706
  const t2 = e2.indexOf("?");
2621
2707
  if (-1 === t2) return { action: e2, params: {} };
2622
2708
  return { action: e2.slice(0, t2), params: Object.fromEntries(new URLSearchParams(e2.slice(t2))) };
2623
2709
  }
2624
- const Ut = Ee(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g, ([e2]) => /* @__PURE__ */ function(e3 = []) {
2710
+ const Ot = Ae(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g, ([e2]) => /* @__PURE__ */ function(e3 = []) {
2625
2711
  return { type: "bulletlist", children: e3 };
2626
- }([e2.startsWith("\n") ? e2.slice(1) : e2])), jt = Ee(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm, ([e2, t2]) => ({ type: "bulletpoint", children: [t2] })), $t = (e2) => {
2712
+ }([e2.startsWith("\n") ? e2.slice(1) : e2])), Pt = Ae(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm, ([e2, t2]) => ({ type: "bulletpoint", children: [t2] })), Ut = (e2) => {
2627
2713
  const t2 = /(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g;
2628
2714
  let s2 = 0;
2629
2715
  const n2 = [];
2630
- for (const r2 of Z(e2, t2)) {
2716
+ for (const r2 of z(e2, t2)) {
2631
2717
  const t3 = r2[0], i2 = r2[1], a2 = t3.startsWith(i2) ? r2.index : r2.index + 1;
2632
2718
  a2 - s2 > 0 && n2.push(e2.substring(s2, a2));
2633
- const o2 = Bt("tel:" + i2.replace(/[^0-9+]/g, ""), i2);
2719
+ const o2 = It("tel:" + i2.replace(/[^0-9+]/g, ""), i2);
2634
2720
  n2.push(o2), s2 = a2 + i2.length;
2635
2721
  }
2636
2722
  return s2 < e2.length && n2.push(e2.substring(s2)), n2;
2637
- }, Wt = (e2) => Nt(e2).flatMap((e3) => "string" == typeof e3 ? qt(e3) : ["<", ...qt(e3.url), ...qt("|" + e3.children[0] + ">")]), qt = (e2) => {
2638
- const t2 = Ft.parse(e2, { urls: true, email: true, phone: false, hashtag: false, mention: false }), s2 = [];
2723
+ }, jt = (e2) => Mt(e2).flatMap((e3) => "string" == typeof e3 ? $t(e3) : ["<", ...$t(e3.url), ...$t("|" + e3.children[0] + ">")]), $t = (e2) => {
2724
+ const t2 = Dt.parse(e2, { urls: true, email: true, phone: false, hashtag: false, mention: false }), s2 = [];
2639
2725
  let n2 = 0;
2640
2726
  for (const r2 of t2) {
2641
2727
  const t3 = r2.getOffset(), i2 = r2.getMatchedText(), a2 = i2.length;
2642
2728
  let o2 = i2;
2643
- r2 instanceof We ? o2 = "mailto:" + r2.getEmail() : r2 instanceof Le && (o2 = r2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(Bt(o2, i2)), n2 = t3 + a2;
2729
+ r2 instanceof je ? o2 = "mailto:" + r2.getEmail() : r2 instanceof He && (o2 = r2.getUrl()), t3 > n2 && s2.push(e2.substring(n2, t3)), s2.push(It(o2, i2)), n2 = t3 + a2;
2644
2730
  }
2645
2731
  return n2 < e2.length && s2.push(e2.substring(n2)), s2;
2646
- }, Ht = ["Codeblock", "Codespan", "FormattedLink", "Wikitext", "Autolink", "Actions", "Mention", "Mention", "BulletPoint", "CustomEmoji"];
2647
- function Gt(e2 = { except: [] }) {
2732
+ }, Wt = ["Codeblock", "Codespan", "FormattedLink", "Wikitext", "Autolink", "Actions", "Mention", "Mention", "BulletPoint", "CustomEmoji"];
2733
+ function qt(e2 = { except: [] }) {
2648
2734
  var _a2;
2649
- const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 : Ht.filter((t3) => !e2.only.includes(t3));
2650
- return s2.includes("BulletPoint") || t2.multilineSteps.push(Ut, jt), s2.includes("Mention") || t2.singlelineSteps.push(Mt), s2.includes("CustomEmoji") || t2.singlelineSteps.push(Rt), s2.includes("Codespan") || t2.multilineSteps.push(Ee(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3 }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(Nt), s2.includes("Actions") || (t2.singlelineSteps.push(_t), t2.singlelineSteps.push(Pt)), s2.includes("Wikitext") || t2.singlelineSteps.push(De), s2.includes("Autolink") || t2.singlelineSteps.push(Wt, $t), t2;
2735
+ const t2 = { multilineSteps: [], singlelineSteps: [] }, s2 = (_a2 = e2.except) != null ? _a2 : Wt.filter((t3) => !e2.only.includes(t3));
2736
+ return s2.includes("BulletPoint") || t2.multilineSteps.push(Ot, Pt), s2.includes("Mention") || t2.singlelineSteps.push(Ft), s2.includes("CustomEmoji") || t2.singlelineSteps.push(Bt), s2.includes("Codespan") || t2.multilineSteps.push(Ae(/```([^]+?)```/g, ([e3, t3]) => ({ type: "codespan", text: t3 }))), s2.includes("FormattedLink") || t2.singlelineSteps.push(Mt), s2.includes("Actions") || (t2.singlelineSteps.push(Rt), t2.singlelineSteps.push(Nt)), s2.includes("Wikitext") || t2.singlelineSteps.push(Se), s2.includes("Autolink") || t2.singlelineSteps.push(jt, Ut), t2;
2651
2737
  }
2652
- const Lt = function(e2) {
2738
+ const Ht = function(e2) {
2653
2739
  const t2 = RegExp(`[^${e2}]+${e2}?|${e2}`, "g");
2654
2740
  return (e3) => Array.from(e3.match(t2) || []);
2655
2741
  }("\n");
2656
- function zt(e2, t2 = { except: [] }) {
2742
+ function Gt(e2, t2 = { except: [] }) {
2657
2743
  let s2 = function(e3, t3) {
2658
2744
  let s3 = [e3];
2659
- return s3 = Jt(s3, t3.multilineSteps), s3 = Jt(s3, [Lt]), s3 = Jt(s3, t3.singlelineSteps), s3 = Yt(s3), s3;
2660
- }(e2, Gt(t2));
2661
- return s2 = Qt(s2, false), s2;
2745
+ return s3 = Lt(s3, t3.multilineSteps), s3 = Lt(s3, [Ht]), s3 = Lt(s3, t3.singlelineSteps), s3 = zt(s3), s3;
2746
+ }(e2, qt(t2));
2747
+ return s2 = Jt(s2, false), s2;
2662
2748
  }
2663
- function Jt(e2, t2) {
2664
- return t2.reduce((e3, t3) => Ce(e3, t3), e2);
2749
+ function Lt(e2, t2) {
2750
+ return t2.reduce((e3, t3) => we(e3, t3), e2);
2665
2751
  }
2666
- function Yt(e2) {
2752
+ function zt(e2) {
2667
2753
  const t2 = [];
2668
2754
  let s2 = -1;
2669
- for (const n2 of e2) "string" == typeof n2 ? "string" == typeof t2[s2] ? t2[s2] += n2 : t2[++s2] = n2 : t2[++s2] = "children" in n2 ? __spreadProps(__spreadValues({}, n2), { children: Yt(n2.children) }) : n2;
2755
+ for (const n2 of e2) "string" == typeof n2 ? "string" == typeof t2[s2] ? t2[s2] += n2 : t2[++s2] = n2 : t2[++s2] = "children" in n2 ? __spreadProps(__spreadValues({}, n2), { children: zt(n2.children) }) : n2;
2670
2756
  return t2;
2671
2757
  }
2672
- function Qt(e2, t2) {
2758
+ function Jt(e2, t2) {
2673
2759
  const s2 = [];
2674
2760
  let n2 = [];
2675
2761
  for (let r2 = 0; r2 < e2.length; r2++) {
2676
2762
  const i2 = e2[r2];
2677
- "string" == typeof i2 ? n2.push(i2) : "children" in i2 ? (n2.length > 0 && (s2.push(n2.join("")), n2 = []), i2.children = Qt(i2.children, t2 || "link" === i2.type || "actionbutton" === i2.type || "actionlink" === i2.type), s2.push(i2)) : "autolink" === i2.type && t2 ? n2.push(i2.text) : (n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2.push(i2));
2763
+ "string" == typeof i2 ? n2.push(i2) : "children" in i2 ? (n2.length > 0 && (s2.push(n2.join("")), n2 = []), i2.children = Jt(i2.children, t2 || "link" === i2.type || "actionbutton" === i2.type || "actionlink" === i2.type), s2.push(i2)) : "autolink" === i2.type && t2 ? n2.push(i2.text) : (n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2.push(i2));
2678
2764
  }
2679
2765
  return n2.length > 0 && (s2.push(n2.join("")), n2 = []), s2;
2680
2766
  }
2681
- class Vt {
2767
+ class Yt {
2682
2768
  constructor(e2, t2, s2) {
2683
2769
  this.id = e2, this.conversationId = t2, this._realtimeClient = s2;
2684
2770
  }
@@ -2694,12 +2780,12 @@ class Vt {
2694
2780
  if (!t2.ok && "server" === t2.where && 404 === t2.value.status) return null;
2695
2781
  if (!t2.ok && "server" === t2.where && 403 === t2.value.status && "NOT_A_PARTICIPANT" === t2.value.errorCode) return null;
2696
2782
  const s2 = e("Get message " + this.id, t2), n2 = yield this._realtimeClient.createMessageSnapshot(s2, this.brandedConversationId);
2697
- return be("Get message " + this.id, n2);
2783
+ return me("Get message " + this.id, n2);
2698
2784
  });
2699
2785
  }
2700
2786
  edit(t2) {
2701
2787
  return __async(this, null, function* () {
2702
- const s2 = { content: Zt(t2), custom: "string" == typeof t2 ? void 0 : t2.custom }, n2 = yield this._realtimeClient.call("PATCH", ["conversations", this.brandedConversationId, "messages", this.brandedId], s2);
2788
+ const s2 = { content: Qt(t2), custom: "string" == typeof t2 ? void 0 : t2.custom }, n2 = yield this._realtimeClient.call("PATCH", ["conversations", this.brandedConversationId, "messages", this.brandedId], s2);
2703
2789
  e(`Edit message ${this.id} in conversation ${this.conversationId}`, n2);
2704
2790
  });
2705
2791
  }
@@ -2710,18 +2796,18 @@ class Vt {
2710
2796
  });
2711
2797
  }
2712
2798
  }
2713
- function Zt(e2) {
2799
+ function Qt(e2) {
2714
2800
  if ("string" == typeof e2) {
2715
- return [{ type: "text", children: zt(e2) }];
2801
+ return [{ type: "text", children: Gt(e2) }];
2716
2802
  }
2717
2803
  if ("text" in e2 && e2.text) {
2718
- return [{ type: "text", children: zt(e2.text) }];
2804
+ return [{ type: "text", children: Gt(e2.text) }];
2719
2805
  }
2720
2806
  if ("content" in e2 && e2.content) return e2.content;
2721
2807
  }
2722
- class Kt {
2808
+ class Vt {
2723
2809
  constructor(e2, t2) {
2724
- this.id = e2, this._realtimeClient = t2;
2810
+ this.id = e2, this._realtimeClient = t2, this.uselessObjForTypeCheck = { subject: null, photoUrl: null, welcomeMessages: null, custom: null, access: null, notify: null };
2725
2811
  }
2726
2812
  get brandedId() {
2727
2813
  return this.id;
@@ -2730,16 +2816,16 @@ class Kt {
2730
2816
  return this._realtimeClient.userId;
2731
2817
  }
2732
2818
  participant(e2) {
2733
- return new ye("string" == typeof e2 ? e2 : e2.id, this.id, this._realtimeClient);
2819
+ return new be("string" == typeof e2 ? e2 : e2.id, this.id, this._realtimeClient);
2734
2820
  }
2735
2821
  message(e2) {
2736
- return new Vt(e2, this.brandedId, this._realtimeClient);
2822
+ return new Yt(e2, this.brandedId, this._realtimeClient);
2737
2823
  }
2738
2824
  get() {
2739
2825
  return __async(this, null, function* () {
2740
2826
  const t2 = this._realtimeClient.listMessages(this.brandedId, { limit: 1 }), s2 = yield this._realtimeClient.call("GET", ["me", "conversations", this.brandedId], {});
2741
2827
  if (!s2.ok && "server" === s2.where && 404 === s2.value.status) return null;
2742
- const n2 = e("Get conversation " + this.id, s2), r2 = be("Get last message in conversation " + this.id, yield t2), i2 = 0 === r2.length ? null : r2[0];
2828
+ const n2 = e("Get conversation " + this.id, s2), r2 = me("Get last message in conversation " + this.id, yield t2), i2 = 0 === r2.length ? null : r2[0];
2743
2829
  return this._realtimeClient.createConversationSnapshotPreloaded(n2, i2);
2744
2830
  });
2745
2831
  }
@@ -2782,8 +2868,8 @@ class Kt {
2782
2868
  }
2783
2869
  send(t2) {
2784
2870
  return __async(this, null, function* () {
2785
- const s2 = { content: Xt(t2), referencedMessageId: es(t2), custom: "string" == typeof t2 ? void 0 : t2.custom, idempotencyKey: Ae((/* @__PURE__ */ new Date()).getTime()) }, n2 = yield this._realtimeClient.call("POST", ["conversations", this.brandedId, "messages"], s2), r2 = e("Send message to conversation " + this.id, n2);
2786
- return new Vt("string" == typeof r2 ? r2 : r2.id, this.brandedId, this._realtimeClient);
2871
+ const s2 = { content: Zt(t2), referencedMessageId: Kt(t2), custom: "string" == typeof t2 ? void 0 : t2.custom, idempotencyKey: ye((/* @__PURE__ */ new Date()).getTime()) }, n2 = yield this._realtimeClient.call("POST", ["conversations", this.brandedId, "messages"], s2), r2 = e("Send message to conversation " + this.id, n2);
2872
+ return new Yt(r2.id, this.brandedId, this._realtimeClient);
2787
2873
  });
2788
2874
  }
2789
2875
  subscribeMessages(e2) {
@@ -2792,22 +2878,31 @@ class Kt {
2792
2878
  subscribe(e2) {
2793
2879
  return this._realtimeClient.subscribe(["me", "conversations", this.brandedId], e2);
2794
2880
  }
2881
+ subscribeTyping(e2) {
2882
+ return this._realtimeClient.subscribe(["me", "conversations", this.brandedId, "typing"], e2);
2883
+ }
2884
+ markAsTyping() {
2885
+ return __async(this, null, function* () {
2886
+ const t2 = yield this._realtimeClient.call("POST", ["me", "conversations", this.brandedId, "typing"], {});
2887
+ e(`Set user as typing in ${this.id}`, t2);
2888
+ });
2889
+ }
2795
2890
  }
2796
- function Xt(e2) {
2891
+ function Zt(e2) {
2797
2892
  if ("string" == typeof e2) {
2798
- return [{ type: "text", children: zt(e2) }];
2893
+ return [{ type: "text", children: Gt(e2) }];
2799
2894
  }
2800
2895
  if ("text" in e2) {
2801
- return [{ type: "text", children: zt(e2.text) }];
2896
+ return [{ type: "text", children: Gt(e2.text) }];
2802
2897
  }
2803
2898
  return e2.content;
2804
2899
  }
2805
- function es(e2) {
2900
+ function Kt(e2) {
2806
2901
  if ("string" == typeof e2) return;
2807
2902
  const t2 = e2.referencedMessage;
2808
2903
  return void 0 !== t2 ? "string" == typeof t2 ? t2 : t2.id : void 0;
2809
2904
  }
2810
- class ts {
2905
+ class Xt {
2811
2906
  constructor(e2, t2, s2) {
2812
2907
  this.realtimeWsApiUrl = e2, this.internalHttpApiUrl = t2, this.restApiHttpUrl = s2;
2813
2908
  }
@@ -2819,10 +2914,10 @@ class ts {
2819
2914
  return this.realtimeWsApiUrl + `/${e2}/realtime/${r2}?talkjs-client-build=${n2 != null ? n2 : "standalone"}&talkjs-core=${s2}`;
2820
2915
  }
2821
2916
  }
2822
- function ss({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRetry: i2, authProvider: o2 }) {
2917
+ function es({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRetry: i2, authProvider: o2 }) {
2823
2918
  var _a2;
2824
2919
  (!r2 || r2 <= 0) && (r2 = 1);
2825
- const u2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2025-04-29T08:55:37.472Z" };
2920
+ const u2 = { "x-talkjs-client-build": "jssdk-dev", "x-talkjs-client-date": "2025-05-20T11:06:18.378Z" };
2826
2921
  s2 instanceof FormData || (u2["Content-Type"] = (_a2 = n2 == null ? void 0 : n2.contentType) != null ? _a2 : "application/json");
2827
2922
  return a(r2, () => __async(this, null, function* () {
2828
2923
  if (o2) {
@@ -2834,19 +2929,19 @@ function ss({ method: e2, url: t2, data: s2, options: n2, attempts: r2, shouldRe
2834
2929
  throw e3;
2835
2930
  });
2836
2931
  }), { initialDelay: 0.2, log: void 0, shouldRetry: (s3) => __async(this, null, function* () {
2837
- return o2 && 401 === s3.status ? (ls.log(`401 error from ${e2} ${t2}, ${yield o2.getToken()}`), o2.refreshToken(), true) : i2 ? i2(s3) : !("status" in s3 && s3.status >= 400 && s3.status < 500);
2932
+ return o2 && 401 === s3.status ? (us.log(`401 error from ${e2} ${t2}, ${yield o2.getToken()}`), o2.refreshToken(), true) : i2 ? i2(s3) : !("status" in s3 && s3.status >= 400 && s3.status < 500);
2838
2933
  }) }).catch((s3) => {
2839
- if (!t2.toString().startsWith("https://capture.trackjs.com")) {
2934
+ if (Math.random() < 0.1 && !t2.toString().startsWith("https://capture.trackjs.com")) {
2840
2935
  const n3 = `Network Error for ${e2} ${t2}`;
2841
2936
  if ("undefined" != typeof window) if (s3 instanceof Response) {
2842
- s3.clone().text().then((e3) => ls.log(`${n3} ${s3.status} ${e3}`));
2843
- } else ls.log(`${n3} ${s3}`);
2937
+ s3.clone().text().then((e3) => us.log(`${n3} ${s3.status} ${e3} (10% logged)`));
2938
+ } else us.log(`${n3} ${s3} (10% logged)`);
2844
2939
  console.error("[TalkJS]", n3);
2845
2940
  }
2846
2941
  throw s3;
2847
2942
  });
2848
2943
  }
2849
- const { cdnHost: ns, appHost: rs, restHost: is, realtimeHost: as, appProtocol: os, appWsProtocol: us } = function() {
2944
+ const { cdnHost: ts, appHost: ss, restHost: ns, realtimeHost: rs, appProtocol: is, appWsProtocol: as } = function() {
2850
2945
  if ("undefined" == typeof window) return { cdnHost: "test-hostname", appHost: "test-hostname", appProtocol: "http:", appWsProtocol: "ws:" };
2851
2946
  const e2 = function() {
2852
2947
  if (document.currentScript) return document.currentScript.src;
@@ -2871,11 +2966,11 @@ const { cdnHost: ns, appHost: rs, restHost: is, realtimeHost: as, appProtocol: o
2871
2966
  }(n2), a2 = t2.protocol;
2872
2967
  return { cdnHost: s2, appHost: n2, restHost: r2, realtimeHost: i2, appProtocol: a2, appWsProtocol: "https:" === a2 ? "wss:" : "ws:" };
2873
2968
  }();
2874
- const cs = rs.startsWith("app.talkjs.com");
2875
- const ls = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setData: (e2) => {
2969
+ const os = ss.startsWith("app.talkjs.com");
2970
+ const us = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setData: (e2) => {
2876
2971
  } } : new class {
2877
2972
  constructor(e2) {
2878
- this._timeCreated = Date.now(), this._enabled = cs, this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2025-04-29T08:55:37.472Z" }, entry: "direct", environment: { age: Date.now() - this._timeCreated, dependencies: {}, originalUrl: window.location.href, referrer: document.referrer, userAgent: window.navigator.userAgent }, metadata: [], nav: [], network: [], url: window.location.href, stack: "", timestamp: (/* @__PURE__ */ new Date()).toISOString(), version: "dev-2025-04-29T08:55:37.472Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
2973
+ this._timeCreated = Date.now(), this._enabled = os, this._trackJSData = { customer: { application: "", correlationId: "", sessionId: "", token: "", userId: "", version: "dev-2025-05-20T11:06:18.378Z" }, entry: "direct", environment: { age: Date.now() - this._timeCreated, dependencies: {}, originalUrl: window.location.href, referrer: document.referrer, userAgent: window.navigator.userAgent }, metadata: [], nav: [], network: [], url: window.location.href, stack: "", timestamp: (/* @__PURE__ */ new Date()).toISOString(), version: "dev-2025-05-20T11:06:18.378Z", throttled: 0 }, this._url = `https://capture.trackjs.com/capture?token=${e2}`, this._trackJSData.customer.token = e2;
2879
2974
  }
2880
2975
  setData({ appId: e2, meId: t2, sessionId: s2 }) {
2881
2976
  this._trackJSData.customer.userId = e2, this._trackJSData.customer.sessionId = `${e2}/${t2}`, this._trackJSData.customer.correlationId = s2;
@@ -2885,14 +2980,14 @@ const ls = "undefined" == typeof window ? { log: (e2) => Promise.resolve(), setD
2885
2980
  try {
2886
2981
  if (!this._enabled) return Promise.resolve();
2887
2982
  const t2 = __spreadProps(__spreadValues({}, this._trackJSData), { message: e2 });
2888
- yield ss({ method: "POST", url: this._url, data: JSON.stringify(t2), options: { contentType: "text/plain" } });
2983
+ yield es({ method: "POST", url: this._url, data: JSON.stringify(t2), options: { contentType: "text/plain" } });
2889
2984
  } catch (e3) {
2890
2985
  console.error("[TalkJS] Failed when sending an error report. Error: ", e3);
2891
2986
  }
2892
2987
  });
2893
2988
  }
2894
2989
  }("970cd0be0fb74630b75c8451051299dc");
2895
- class hs {
2990
+ class cs {
2896
2991
  constructor(e2, t2 = {}) {
2897
2992
  this._onSubscription = t2, this._handlers = {};
2898
2993
  for (const t3 in e2) Object.hasOwnProperty.call(e2, t3) && (this._handlers[t3] = []);
@@ -2937,9 +3032,9 @@ class hs {
2937
3032
  return this.on(e2, t2), { unsubscribe: () => this.off(e2, t2) };
2938
3033
  }
2939
3034
  }
2940
- class ds {
3035
+ class ls {
2941
3036
  constructor(e2, t2, s2, n2, r2, i2) {
2942
- if (this.appId = t2, this.userId = s2, this.tokenFetcher = r2, this.usingBokens = false, this.requestInProgress = false, this.eventEmitter = new hs({ tokenChanged(e3) {
3037
+ if (this.appId = t2, this.userId = s2, this.tokenFetcher = r2, this.usingBokens = false, this.requestInProgress = false, this.eventEmitter = new cs({ tokenChanged(e3) {
2943
3038
  }, tokenRefreshFailed(e3) {
2944
3039
  }, tokenAccepted(e3) {
2945
3040
  } }), this.sessionExpiryWarningTimeoutId = void 0, i2 && (n2 || r2)) throw new Error("[TalkJS] If providing a signature for authentication, you must not provide a token or tokenFetcher.");
@@ -3020,13 +3115,18 @@ class ds {
3020
3115
  });
3021
3116
  }
3022
3117
  checkJwt(e2) {
3118
+ !function(e3) {
3119
+ if ("string" == typeof e3 || e3 instanceof String) return;
3120
+ if (void 0 === e3) throw "Token was undefined";
3121
+ throw "Token must be a string, got: " + e3;
3122
+ }(e2);
3023
3123
  const t2 = [];
3024
3124
  let s2, n2, r2;
3025
3125
  if ("string" == typeof e2 ? s2 = e2 : t2.push(`Token type is ${typeof e2} instead of a string.`), s2) try {
3026
3126
  const e3 = function(e4) {
3027
3127
  const t3 = e4.split(".");
3028
3128
  if (3 !== t3.length) throw "Token does not contain exactly two `.`. Check that you generated your JWT correctly. It should be `<header>.<payload>.<signature>`.";
3029
- return { header: ps(t3[0]), payload: ps(t3[1]) };
3129
+ return { header: hs(t3[0]), payload: hs(t3[1]) };
3030
3130
  }(s2);
3031
3131
  n2 = e3.header, r2 = e3.payload;
3032
3132
  } catch (e3) {
@@ -3040,7 +3140,7 @@ class ds {
3040
3140
  const e3 = this.checkJwtPayload(r2);
3041
3141
  t2.push(...e3);
3042
3142
  }
3043
- if (t2.length) if (this.usingBokens) ls.log(`JWT Errors detected by AuthProvider when using bokens: ${t2.join("\n")}`);
3143
+ if (t2.length) if (this.usingBokens) us.log(`JWT Errors detected by AuthProvider when using bokens: ${t2.join("\n")}`);
3044
3144
  else {
3045
3145
  console.warn("[TalkJS] Authentication token appears to be generated incorrectly. Will still attempt to authenticate, but TalkJS may not work as expected. See below for a description of any problems and how to fix them.");
3046
3146
  const s3 = t2.length > 1;
@@ -3069,7 +3169,7 @@ class ds {
3069
3169
  sendBokenRequest(e2, t2) {
3070
3170
  return __async(this, null, function* () {
3071
3171
  let s2 = 0;
3072
- const n2 = e2.getBokensUrl(this.appId, this.userId, t2), r2 = yield ss({ method: "GET", url: n2, attempts: 1e4, shouldRetry: (e3) => {
3172
+ const n2 = e2.getBokensUrl(this.appId, this.userId, t2), r2 = yield es({ method: "GET", url: n2, attempts: 1e4, shouldRetry: (e3) => {
3073
3173
  if (e3 instanceof Error) return true;
3074
3174
  if (401 === e3.status) throw "Check that you provided a valid signature.";
3075
3175
  if (404 === e3.status) throw "Check that you specified the correct App ID.";
@@ -3082,7 +3182,7 @@ class ds {
3082
3182
  });
3083
3183
  }
3084
3184
  }
3085
- function ps(e2) {
3185
+ function hs(e2) {
3086
3186
  try {
3087
3187
  const t2 = e2.replace(/-/g, "+").replace(/_/g, "/"), s2 = decodeURIComponent(atob(t2).split("").map((e3) => "%" + ("00" + e3.charCodeAt(0).toString(16)).slice(-2)).join(""));
3088
3188
  return JSON.parse(s2);
@@ -3090,8 +3190,8 @@ function ps(e2) {
3090
3190
  throw `Could not base64-decode and JSON-parse token section: ${e2}. Check that you base-64 encoded the section correctly.`;
3091
3191
  }
3092
3192
  }
3093
- const fs = new ts("wss://realtime.talkjs.com/v1", "https://app.talkjs.com/api/v0", "https://api.talkjs.com/v1");
3094
- class ms {
3193
+ const ds = new Xt("wss://realtime.talkjs.com/v1", "https://app.talkjs.com/api/v0", "https://api.talkjs.com/v1");
3194
+ class ps {
3095
3195
  constructor(e2) {
3096
3196
  this.target = e2;
3097
3197
  }
@@ -3099,7 +3199,7 @@ class ms {
3099
3199
  return this.target;
3100
3200
  }
3101
3201
  }
3102
- const gs = new class {
3202
+ const fs = new class {
3103
3203
  constructor() {
3104
3204
  this.registry = {};
3105
3205
  }
@@ -3107,7 +3207,7 @@ const gs = new class {
3107
3207
  var _a2;
3108
3208
  const t2 = this.key(e2), s2 = (_a2 = this.registry[t2]) == null ? void 0 : _a2.deref();
3109
3209
  if (s2) return s2;
3110
- const n2 = new bs(e2), r2 = globalThis.WeakRef ? new WeakRef(n2) : new ms(n2);
3210
+ const n2 = new ms(e2), r2 = globalThis.WeakRef ? new WeakRef(n2) : new ps(n2);
3111
3211
  return this.registry[t2] = r2, n2;
3112
3212
  }
3113
3213
  deregister(e2, t2) {
@@ -3118,10 +3218,10 @@ const gs = new class {
3118
3218
  return `${e2}:${t2}`;
3119
3219
  }
3120
3220
  }();
3121
- function vs(e2) {
3122
- return e2.forceCreateNew ? new bs(e2) : gs.getOrCreate(e2);
3221
+ function gs(e2) {
3222
+ return e2.forceCreateNew ? new ms(e2) : fs.getOrCreate(e2);
3123
3223
  }
3124
- class bs {
3224
+ class ms {
3125
3225
  constructor(e2) {
3126
3226
  !function(e3) {
3127
3227
  function t3(e4, t4) {
@@ -3131,11 +3231,11 @@ class bs {
3131
3231
  void 0 !== e3.tokenFetcher && t3("function" == typeof e3.tokenFetcher, "The `tokenFetcher` property of TalkSession#constructor must be a function.");
3132
3232
  }(e2);
3133
3233
  const { appId: t2, userId: s2, token: n2, tokenFetcher: r2, signature: i2 } = e2;
3134
- this._appId = t2, this._apiUrls = e2.apiUrls ? new ts(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : fs, this._authProvider = new ds(this._apiUrls, t2, s2, n2, r2, i2), this._realtimeClient = new ge(this._apiUrls.getRealtimeWsUrl(t2, s2, "1.0.0", e2.clientBuild), s2, this._authProvider), this.currentUser = new we(this._realtimeClient.userId, this._realtimeClient), this._terminationReason = o(), this._terminationReason.promise.then((e3) => {
3234
+ this._appId = t2, this._apiUrls = e2.apiUrls ? new Xt(e2.apiUrls.realtimeWsApiUrl, e2.apiUrls.internalHttpApiUrl, e2.apiUrls.restApiHttpUrl) : ds, this._authProvider = new ls(this._apiUrls, t2, s2, n2, r2, i2), this._realtimeClient = new fe(this._apiUrls.getRealtimeWsUrl(t2, s2, "1.0.1", e2.clientBuild), s2, this._authProvider), this.currentUser = new ve(this._realtimeClient.userId, this._realtimeClient), this._terminationReason = o(), this._terminationReason.promise.then((e3) => {
3135
3235
  console.error(`[TalkSession] ${e3}`);
3136
3236
  }), function(e3, t3, s3) {
3137
3237
  return __async(this, null, function* () {
3138
- return ss({ method: "GET", url: `${t3}/${e3}/app`, authProvider: s3 }).then((e4) => 200 === e4.status || 404 !== e4.status && (console.warn(`[TalkJS] Received unexpected ${e4.status} status code when validating app ID. Assuming that the app ID is valid.`), true)).catch((e4) => {
3238
+ return es({ method: "GET", url: `${t3}/${e3}/app`, authProvider: s3 }).then((e4) => 200 === e4.status || 404 !== e4.status && (console.warn(`[TalkJS] Received unexpected ${e4.status} status code when validating app ID. Assuming that the app ID is valid.`), true)).catch((e4) => {
3139
3239
  if ("string" != typeof e4 && "status" in e4) {
3140
3240
  const t4 = e4;
3141
3241
  return 200 === t4.status || 404 !== t4.status && (console.warn(`[TalkJS] Received unexpected ${t4.status} status code when validating app ID. Assuming that the app ID is valid.`), true);
@@ -3156,37 +3256,37 @@ class bs {
3156
3256
  }), { unsubscribe: () => t2.resolve("UNSUBSCRIBED") };
3157
3257
  }
3158
3258
  user(e2) {
3159
- return new we(e2, this._realtimeClient);
3259
+ return new ve(e2, this._realtimeClient);
3160
3260
  }
3161
3261
  conversation(e2) {
3162
- return new Kt(e2, this._realtimeClient);
3262
+ return new Vt(e2, this._realtimeClient);
3163
3263
  }
3164
3264
  terminate(e2) {
3165
- gs.deregister(this._appId, this.currentUser.id), this._terminationReason.resolve(e2), this._realtimeClient.destroy();
3265
+ fs.deregister(this._appId, this.currentUser.id), this._terminationReason.resolve(e2), this._realtimeClient.destroy();
3166
3266
  }
3167
3267
  _isConnected() {
3168
3268
  return this._realtimeClient.isConnected();
3169
3269
  }
3170
3270
  uploadFile(e2, t2) {
3171
- return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, t2);
3271
+ return vs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, t2);
3172
3272
  }
3173
3273
  uploadImage(e2, t2) {
3174
- return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "image" }, t2));
3274
+ return vs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "image" }, t2));
3175
3275
  }
3176
3276
  uploadVideo(e2, t2) {
3177
- return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "video" }, t2));
3277
+ return vs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "video" }, t2));
3178
3278
  }
3179
3279
  uploadAudio(e2, t2) {
3180
- return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "audio" }, t2));
3280
+ return vs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "audio" }, t2));
3181
3281
  }
3182
3282
  uploadVoice(e2, t2) {
3183
- return ws(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "voice" }, t2));
3283
+ return vs(`${this._apiUrls.restApiHttpUrl}/${this._appId}/files`, this._authProvider, e2, __spreadValues({ subtype: "voice" }, t2));
3184
3284
  }
3185
3285
  }
3186
- function ws(_0, _1, _2, _3) {
3286
+ function vs(_0, _1, _2, _3) {
3187
3287
  return __async(this, arguments, function* (e2, t2, s2, { subtype: n2, filename: r2, width: i2, height: a2, duration: o2 }) {
3188
3288
  const u2 = new FormData();
3189
- return u2.set("file", s2, r2), void 0 !== n2 && u2.set("subtype", n2), void 0 !== i2 && u2.set("width", i2.toString()), void 0 !== a2 && u2.set("height", a2.toString()), void 0 !== o2 && u2.set("duration", o2.toString()), ss({ method: "POST", url: e2, data: u2, authProvider: t2 }).then((e3) => e3.json()).then((e3) => e3.attachmentToken).catch((e3) => __async(this, null, function* () {
3289
+ return u2.set("file", s2, r2), void 0 !== n2 && u2.set("subtype", n2), void 0 !== i2 && u2.set("width", i2.toString()), void 0 !== a2 && u2.set("height", a2.toString()), void 0 !== o2 && u2.set("duration", o2.toString()), es({ method: "POST", url: e2, data: u2, authProvider: t2 }).then((e3) => e3.json()).then((e3) => e3.attachmentToken).catch((e3) => __async(this, null, function* () {
3190
3290
  if (e3 instanceof Response) {
3191
3291
  const t3 = yield e3.json(), s3 = `Unexpected response when uploading file, status code ${e3.status} ${t3.errorCode}, ${t3.reasons}`;
3192
3292
  throw new Error(s3);
@@ -3196,7 +3296,7 @@ function ws(_0, _1, _2, _3) {
3196
3296
  });
3197
3297
  }
3198
3298
  export {
3199
- vs as getTalkSession,
3299
+ gs as getTalkSession,
3200
3300
  f as registerPolyfills
3201
3301
  };
3202
3302
  //# sourceMappingURL=talkSession.js.map