@epam/statgpt-shared-toolkit 0.4.0-rc.26 → 0.4.0-rc.28

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.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/index.mjs +68 -61
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("date-fns"),R={CHAT:"/api/chat"},f="CUSTOM_PERIOD",l={decimal:"0.0",decimalSymbol:",",digitGroupingSymbol:" "},A="application/json",T="Content-Type",a="Api-Key",N="X-CONVERSATION-ID",u="Ocp-Apim-Subscription-Key",S={BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,CONFLICT:409,TOO_MANY_REQUESTS:429,INTERNAL_SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},v="onboarding",y="share";class D extends Error{constructor(e){super(e.message),this.isHttpError=!0,this.name="HttpError",this.code=e.code,this.status=e.status,this.details=e.details,this.displayMessage=e.displayMessage}}function U(t){const e=t;return typeof t=="object"&&t!==null&&e.isHttpError===!0&&typeof e.status=="number"&&typeof e.message=="string"&&(e.code===void 0||typeof e.code=="string")}var g=(t=>(t.MONTH="month",t.DAY="day",t))(g||{}),C=(t=>(t.UK="uk",t.EN="en",t))(C||{}),_=(t=>(t.IN="in",t.BETWEEN="between",t))(_||{});function b(t,e){const n=t.split("/")[0],r=e.split("/").pop();return`${n}/${r}`}const O=t=>t.messages.flatMap(e=>{const n=e.custom_content?.attachments??[],r=e.custom_content?.stages?.flatMap(({attachments:s})=>s??[])??[];return[...n,...r]}),P=t=>t.endsWith("/"),H=t=>{const e=t.toLowerCase();return e.startsWith("http://")||e.startsWith("https://")},h=t=>!!t&&!H(t)&&!P(t),M=t=>[...new Set(O(t).map(e=>e.url).filter(e=>!!e).filter(e=>h(e)))],p=(t,e)=>t?.map(n=>({...n,url:n.url?e[n.url]??n.url:n.url})),F=(t,e)=>({...t,messages:t.messages.map(n=>({...n,custom_content:n.custom_content?{...n.custom_content,attachments:p(n.custom_content.attachments,e),stages:n.custom_content.stages?.map(r=>({...r,attachments:p(r.attachments,e)}))}:n.custom_content}))}),E=t=>t?.split(/-\d+$/)[0]??"",B=t=>t?.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").replace(/-/g," ")||"";function L(t,e){return`${t?.[0]}/${e}/${t?.[1]}`}const x=(t,e)=>(Math.round(t*10**e)/10**e).toString(),$=(t,e)=>{const n=e?.decimal||l.decimal,r=e?.decimalSymbol||l.decimalSymbol,s=e?.digitGroupingSymbol??l.digitGroupingSymbol,o=Number(t);if(o==null||Number.isNaN(o)||t===null||t==="")return"";const i=n.replace("0.",""),m=`${n==="0"?Math.trunc(o):x(o,i.length)} `.split(".");return m[0]=m[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${s}`),`${m.join(r)}`},w=t=>{if(!t.includes("T")){for(const n of G){const r=c.parse(t,n,new Date);if(c.isValid(r))return r}return null}const e=c.parseISO(t);return c.isValid(e)?e:null},G=["yyyy-MM-dd","MM-dd-yyyy"],V=(t,e,n)=>{const r={};return e?.contentType!==null&&(r[T]=e?.contentType||A),e?.jwt?r.Authorization=`Bearer ${e.jwt}`:t&&(r[a]=t),e?.chatReference&&(r[N]=e.chatReference),{...r,...n}},Y=t=>{const e={...t};return e[a]&&(e[a]=e[a].substring(0,8)+"...[REDACTED]"),e.Authorization&&(e.Authorization="Bearer [REDACTED]"),e[u]&&(e[u]=e[u].substring(0,8)+"...[REDACTED]"),e},W=t=>({"Content-Type":`multipart/form-data; boundary=${t}`}),j=t=>t?.toLowerCase()==="true",z=async(t,e,n)=>await fetch(t,{method:n.method||"GET",headers:e,body:n.body?JSON.stringify(n.body):void 0}),K=(t,e)=>t?.split("/")?.filter(n=>n!==e)?.join("/"),k=t=>t.replace(/^conversations\//,""),X=t=>t.split("/").slice(0,-1).join("/"),q=t=>E(decodeURIComponent(t.split("/").at(-1)??"")),J=t=>t.map(e=>({...e,name:E(e.name)})),Q=new Set([")","]","}",">",",",".","!","?",":",";"]);function I(t){let e=t.length;for(;e>0&&Q.has(t[e-1]);)e--;return e===t.length?{cleanUrl:t,trailing:""}:{cleanUrl:t.slice(0,e),trailing:t.slice(e)}}function Z(t){if(!t)return[{type:"text",value:""}];const e=[];let n=0;for(const r of t.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)){const s=r[0],o=r.index??0;o>n&&e.push({type:"text",value:t.slice(n,o)});const{cleanUrl:i,trailing:d}=I(s);i?e.push({type:"link",value:i}):e.push({type:"text",value:s}),d&&e.push({type:"text",value:d}),n=o+s.length}return n<t.length&&e.push({type:"text",value:t.slice(n)}),e.length?e:[{type:"text",value:t}]}exports.API_KEY_HEADER=a;exports.API_ROUTES=R;exports.APPLICATION_JSON=A;exports.CONTENT_TYPE_HEADER=T;exports.CUSTOM_PERIOD=f;exports.CalendarResolution=g;exports.HTTP_ERROR_CODES=S;exports.HttpError=D;exports.Locale=C;exports.OCP_APIM_SUBSCRIPTION_KEY_HEADER=u;exports.ONBOARDING_MODEL_POSTFIX=v;exports.QueryFilterType=_;exports.SHARE_CONVERSATION_ROUTE=y;exports.X_CONVERSATION_ID_HEADER=N;exports.cleanConversationNames=J;exports.defaultFormatNumbers=l;exports.deleteConversationNamePostfix=E;exports.formatNumberBySign=$;exports.getClearedConversationName=B;exports.getConversationAttachmentUrls=M;exports.getConversationAttachments=O;exports.getConversationFolderIdFromConversationId=X;exports.getConversationId=L;exports.getConversationIdFromResourceUrl=k;exports.getConversationNameFromConversationId=q;exports.getConversationNavPath=b;exports.getConversationUrlWithoutLocale=K;exports.getHeaders=V;exports.getMultipartHeaders=W;exports.getTimePeriod=w;exports.isDialFileAttachmentUrl=h;exports.isHttpError=U;exports.linkifyText=Z;exports.parseBoolean=j;exports.replaceConversationAttachmentUrls=F;exports.sanitizeHeaders=Y;exports.sendRequest=z;exports.splitTrailingPunctuation=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("date-fns"),f={CHAT:"/api/chat"},R="CUSTOM_PERIOD",l={decimal:"0.0",decimalSymbol:",",digitGroupingSymbol:" "},A="application/json",T="Content-Type",a="Api-Key",N="X-CONVERSATION-ID",u="Ocp-Apim-Subscription-Key",S={BAD_REQUEST:400,UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,CONFLICT:409,TOO_MANY_REQUESTS:429,INTERNAL_SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},y="onboarding",v="share";class D extends Error{constructor(e){super(e.message),this.isHttpError=!0,this.name="HttpError",this.code=e.code,this.status=e.status,this.details=e.details,this.displayMessage=e.displayMessage}}function U(t){const e=t;return typeof t=="object"&&t!==null&&e.isHttpError===!0&&typeof e.status=="number"&&typeof e.message=="string"&&(e.code===void 0||typeof e.code=="string")}var C=(t=>(t.MONTH="month",t.DAY="day",t))(C||{}),O=(t=>(t.UK="uk",t.EN="en",t))(O||{}),_=(t=>(t.IN="in",t.BETWEEN="between",t))(_||{});function b(t,e){const n=t.split("/")[0],r=e.split("/").pop();return`${n}/${r}`}const g=t=>t.messages.flatMap(e=>{const n=e.custom_content?.attachments??[],r=e.custom_content?.stages?.flatMap(({attachments:o})=>o??[])??[];return[...n,...r]}),P=t=>t.endsWith("/"),H=t=>{const e=t.toLowerCase();return e.startsWith("http://")||e.startsWith("https://")},h=t=>!!t&&!H(t)&&!P(t),M=t=>[...new Set(g(t).map(e=>e.url).filter(e=>!!e).filter(e=>h(e)))],p=(t,e)=>t?.map(n=>({...n,url:n.url?e[n.url]??n.url:n.url})),F=(t,e)=>({...t,messages:t.messages.map(n=>({...n,custom_content:n.custom_content?{...n.custom_content,attachments:p(n.custom_content.attachments,e),stages:n.custom_content.stages?.map(r=>({...r,attachments:p(r.attachments,e)}))}:n.custom_content}))}),m=t=>t?.split(/-\d+$/)[0]??"",B=t=>new RegExp("\\p{L}","u").test(t)||new RegExp("\\p{N}","u").test(t),L=t=>{if(!t)return"";const e=t.toLowerCase(),n=[];let r="";for(const o of e)B(o)?r+=o:r&&(n.push(r),r="");return r&&n.push(r),n.join(" ")};function w(t,e){return`${t?.[0]}/${e}/${t?.[1]}`}const x=(t,e)=>(Math.round(t*10**e)/10**e).toString(),$=(t,e)=>{const n=e?.decimal||l.decimal,r=e?.decimalSymbol||l.decimalSymbol,o=e?.digitGroupingSymbol??l.digitGroupingSymbol,s=Number(t);if(s==null||Number.isNaN(s)||t===null||t==="")return"";const i=n.replace("0.",""),E=`${n==="0"?Math.trunc(s):x(s,i.length)} `.split(".");return E[0]=E[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${o}`),`${E.join(r)}`},G=t=>{if(!t.includes("T")){for(const n of V){const r=c.parse(t,n,new Date);if(c.isValid(r))return r}return null}const e=c.parseISO(t);return c.isValid(e)?e:null},V=["yyyy-MM-dd","MM-dd-yyyy"],Y=(t,e,n)=>{const r={};return e?.contentType!==null&&(r[T]=e?.contentType||A),e?.jwt?r.Authorization=`Bearer ${e.jwt}`:t&&(r[a]=t),e?.chatReference&&(r[N]=e.chatReference),{...r,...n}},j=t=>{const e={...t};return e[a]&&(e[a]=e[a].substring(0,8)+"...[REDACTED]"),e.Authorization&&(e.Authorization="Bearer [REDACTED]"),e[u]&&(e[u]=e[u].substring(0,8)+"...[REDACTED]"),e},W=t=>({"Content-Type":`multipart/form-data; boundary=${t}`}),z=t=>t?.toLowerCase()==="true",K=async(t,e,n)=>await fetch(t,{method:n.method||"GET",headers:e,body:n.body?JSON.stringify(n.body):void 0}),k=(t,e)=>t?.split("/")?.filter(n=>n!==e)?.join("/"),X=t=>t.replace(/^conversations\//,""),q=t=>t.split("/").slice(0,-1).join("/"),J=t=>m(decodeURIComponent(t.split("/").at(-1)??"")),Q=t=>t.map(e=>({...e,name:m(e.name)})),Z=new Set([")","]","}",">",",",".","!","?",":",";"]);function I(t){let e=t.length;for(;e>0&&Z.has(t[e-1]);)e--;return e===t.length?{cleanUrl:t,trailing:""}:{cleanUrl:t.slice(0,e),trailing:t.slice(e)}}function tt(t){if(!t)return[{type:"text",value:""}];const e=[];let n=0;for(const r of t.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)){const o=r[0],s=r.index??0;s>n&&e.push({type:"text",value:t.slice(n,s)});const{cleanUrl:i,trailing:d}=I(o);i?e.push({type:"link",value:i}):e.push({type:"text",value:o}),d&&e.push({type:"text",value:d}),n=s+o.length}return n<t.length&&e.push({type:"text",value:t.slice(n)}),e.length?e:[{type:"text",value:t}]}exports.API_KEY_HEADER=a;exports.API_ROUTES=f;exports.APPLICATION_JSON=A;exports.CONTENT_TYPE_HEADER=T;exports.CUSTOM_PERIOD=R;exports.CalendarResolution=C;exports.HTTP_ERROR_CODES=S;exports.HttpError=D;exports.Locale=O;exports.OCP_APIM_SUBSCRIPTION_KEY_HEADER=u;exports.ONBOARDING_MODEL_POSTFIX=y;exports.QueryFilterType=_;exports.SHARE_CONVERSATION_ROUTE=v;exports.X_CONVERSATION_ID_HEADER=N;exports.cleanConversationNames=Q;exports.defaultFormatNumbers=l;exports.deleteConversationNamePostfix=m;exports.formatNumberBySign=$;exports.getClearedConversationName=L;exports.getConversationAttachmentUrls=M;exports.getConversationAttachments=g;exports.getConversationFolderIdFromConversationId=q;exports.getConversationId=w;exports.getConversationIdFromResourceUrl=X;exports.getConversationNameFromConversationId=J;exports.getConversationNavPath=b;exports.getConversationUrlWithoutLocale=k;exports.getHeaders=Y;exports.getMultipartHeaders=W;exports.getTimePeriod=G;exports.isDialFileAttachmentUrl=h;exports.isHttpError=U;exports.linkifyText=tt;exports.parseBoolean=z;exports.replaceConversationAttachmentUrls=F;exports.sanitizeHeaders=j;exports.sendRequest=K;exports.splitTrailingPunctuation=I;
package/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { parse as h, isValid as d, parseISO as A } from "date-fns";
2
- const M = {
1
+ import { parse as h, isValid as m, parseISO as f } from "date-fns";
2
+ const H = {
3
3
  CHAT: "/api/chat"
4
- }, H = "CUSTOM_PERIOD", u = {
4
+ }, w = "CUSTOM_PERIOD", u = {
5
5
  decimal: "0.0",
6
6
  decimalSymbol: ",",
7
7
  digitGroupingSymbol: " "
8
- }, T = "application/json", f = "Content-Type", a = "Api-Key", g = "X-CONVERSATION-ID", m = "Ocp-Apim-Subscription-Key", x = {
8
+ }, A = "application/json", T = "Content-Type", i = "Api-Key", N = "X-CONVERSATION-ID", d = "Ocp-Apim-Subscription-Key", x = {
9
9
  BAD_REQUEST: 400,
10
10
  UNAUTHORIZED: 401,
11
11
  FORBIDDEN: 403,
@@ -17,8 +17,8 @@ const M = {
17
17
  BAD_GATEWAY: 502,
18
18
  SERVICE_UNAVAILABLE: 503,
19
19
  GATEWAY_TIMEOUT: 504
20
- }, B = "onboarding", P = "share";
21
- class L extends Error {
20
+ }, B = "onboarding", L = "share";
21
+ class P extends Error {
22
22
  constructor(e) {
23
23
  super(e.message), this.isHttpError = !0, this.name = "HttpError", this.code = e.code, this.status = e.status, this.details = e.details, this.displayMessage = e.displayMessage;
24
24
  }
@@ -27,8 +27,8 @@ function $(t) {
27
27
  const e = t;
28
28
  return typeof t == "object" && t !== null && e.isHttpError === !0 && typeof e.status == "number" && typeof e.message == "string" && (e.code === void 0 || typeof e.code == "string");
29
29
  }
30
- var N = /* @__PURE__ */ ((t) => (t.MONTH = "month", t.DAY = "day", t))(N || {}), _ = /* @__PURE__ */ ((t) => (t.UK = "uk", t.EN = "en", t))(_ || {}), O = /* @__PURE__ */ ((t) => (t.IN = "in", t.BETWEEN = "between", t))(O || {});
31
- function w(t, e) {
30
+ var g = /* @__PURE__ */ ((t) => (t.MONTH = "month", t.DAY = "day", t))(g || {}), O = /* @__PURE__ */ ((t) => (t.UK = "uk", t.EN = "en", t))(O || {}), _ = /* @__PURE__ */ ((t) => (t.IN = "in", t.BETWEEN = "between", t))(_ || {});
31
+ function F(t, e) {
32
32
  const n = t.split("/")[0], r = e.split("/").pop();
33
33
  return `${n}/${r}`;
34
34
  }
@@ -40,14 +40,14 @@ const I = (t) => t.messages.flatMap((e) => {
40
40
  }), C = (t) => t.endsWith("/"), y = (t) => {
41
41
  const e = t.toLowerCase();
42
42
  return e.startsWith("http://") || e.startsWith("https://");
43
- }, R = (t) => !!t && !y(t) && !C(t), F = (t) => [
43
+ }, R = (t) => !!t && !y(t) && !C(t), G = (t) => [
44
44
  ...new Set(
45
45
  I(t).map((e) => e.url).filter((e) => !!e).filter((e) => R(e))
46
46
  )
47
47
  ], p = (t, e) => t?.map((n) => ({
48
48
  ...n,
49
49
  url: n.url ? e[n.url] ?? n.url : n.url
50
- })), G = (t, e) => ({
50
+ })), j = (t, e) => ({
51
51
  ...t,
52
52
  messages: t.messages.map((n) => ({
53
53
  ...n,
@@ -66,48 +66,55 @@ const I = (t) => t.messages.flatMap((e) => {
66
66
  }))
67
67
  } : n.custom_content
68
68
  }))
69
- }), E = (t) => t?.split(/-\d+$/)[0] ?? "", W = (t) => t?.toLowerCase().replace(/[^\p{L}\p{N}]+/gu, "-").replace(/^-+|-+$/g, "").replace(/-/g, " ") || "";
70
- function j(t, e) {
69
+ }), E = (t) => t?.split(/-\d+$/)[0] ?? "", S = (t) => new RegExp("\\p{L}", "u").test(t) || new RegExp("\\p{N}", "u").test(t), W = (t) => {
70
+ if (!t) return "";
71
+ const e = t.toLowerCase(), n = [];
72
+ let r = "";
73
+ for (const s of e)
74
+ S(s) ? r += s : r && (n.push(r), r = "");
75
+ return r && n.push(r), n.join(" ");
76
+ };
77
+ function V(t, e) {
71
78
  return `${t?.[0]}/${e}/${t?.[1]}`;
72
79
  }
73
- const S = (t, e) => (Math.round(t * 10 ** e) / 10 ** e).toString(), V = (t, e) => {
80
+ const D = (t, e) => (Math.round(t * 10 ** e) / 10 ** e).toString(), Y = (t, e) => {
74
81
  const n = e?.decimal || u.decimal, r = e?.decimalSymbol || u.decimalSymbol, s = e?.digitGroupingSymbol ?? u.digitGroupingSymbol, o = Number(t);
75
82
  if (o == null || Number.isNaN(o) || t === null || t === "")
76
83
  return "";
77
- const c = n.replace("0.", ""), l = `${n === "0" ? Math.trunc(o) : S(o, c.length)} `.split(".");
84
+ const c = n.replace("0.", ""), l = `${n === "0" ? Math.trunc(o) : D(o, c.length)} `.split(".");
78
85
  return l[0] = l[0].replace(
79
86
  /(\d)(?=(\d\d\d)+(?!\d))/g,
80
87
  `$1${s}`
81
88
  ), `${l.join(r)}`;
82
- }, Y = (t) => {
89
+ }, z = (t) => {
83
90
  if (!t.includes("T")) {
84
- for (const n of D) {
91
+ for (const n of b) {
85
92
  const r = h(t, n, /* @__PURE__ */ new Date());
86
- if (d(r))
93
+ if (m(r))
87
94
  return r;
88
95
  }
89
96
  return null;
90
97
  }
91
- const e = A(t);
92
- return d(e) ? e : null;
93
- }, D = ["yyyy-MM-dd", "MM-dd-yyyy"], z = (t, e, n) => {
98
+ const e = f(t);
99
+ return m(e) ? e : null;
100
+ }, b = ["yyyy-MM-dd", "MM-dd-yyyy"], k = (t, e, n) => {
94
101
  const r = {};
95
- return e?.contentType !== null && (r[f] = e?.contentType || T), e?.jwt ? r.Authorization = `Bearer ${e.jwt}` : t && (r[a] = t), e?.chatReference && (r[g] = e.chatReference), { ...r, ...n };
96
- }, k = (t) => {
102
+ return e?.contentType !== null && (r[T] = e?.contentType || A), e?.jwt ? r.Authorization = `Bearer ${e.jwt}` : t && (r[i] = t), e?.chatReference && (r[N] = e.chatReference), { ...r, ...n };
103
+ }, K = (t) => {
97
104
  const e = { ...t };
98
- return e[a] && (e[a] = e[a].substring(0, 8) + "...[REDACTED]"), e.Authorization && (e.Authorization = "Bearer [REDACTED]"), e[m] && (e[m] = e[m].substring(0, 8) + "...[REDACTED]"), e;
99
- }, K = (t) => ({
105
+ return e[i] && (e[i] = e[i].substring(0, 8) + "...[REDACTED]"), e.Authorization && (e.Authorization = "Bearer [REDACTED]"), e[d] && (e[d] = e[d].substring(0, 8) + "...[REDACTED]"), e;
106
+ }, X = (t) => ({
100
107
  "Content-Type": `multipart/form-data; boundary=${t}`
101
- }), X = (t) => t?.toLowerCase() === "true", J = async (t, e, n) => await fetch(t, {
108
+ }), J = (t) => t?.toLowerCase() === "true", q = async (t, e, n) => await fetch(t, {
102
109
  method: n.method || "GET",
103
110
  headers: e,
104
111
  body: n.body ? JSON.stringify(n.body) : void 0
105
- }), q = (t, e) => t?.split("/")?.filter((n) => n !== e)?.join("/"), Q = (t) => t.replace(/^conversations\//, ""), Z = (t) => t.split("/").slice(0, -1).join("/"), tt = (t) => E(
112
+ }), Q = (t, e) => t?.split("/")?.filter((n) => n !== e)?.join("/"), Z = (t) => t.replace(/^conversations\//, ""), tt = (t) => t.split("/").slice(0, -1).join("/"), et = (t) => E(
106
113
  decodeURIComponent(t.split("/").at(-1) ?? "")
107
- ), et = (t) => t.map((e) => ({
114
+ ), nt = (t) => t.map((e) => ({
108
115
  ...e,
109
116
  name: E(e.name)
110
- })), b = /* @__PURE__ */ new Set([
117
+ })), U = /* @__PURE__ */ new Set([
111
118
  ")",
112
119
  "]",
113
120
  "}",
@@ -121,62 +128,62 @@ const S = (t, e) => (Math.round(t * 10 ** e) / 10 ** e).toString(), V = (t, e) =
121
128
  ]);
122
129
  function v(t) {
123
130
  let e = t.length;
124
- for (; e > 0 && b.has(t[e - 1]); )
131
+ for (; e > 0 && U.has(t[e - 1]); )
125
132
  e--;
126
133
  return e === t.length ? { cleanUrl: t, trailing: "" } : {
127
134
  cleanUrl: t.slice(0, e),
128
135
  trailing: t.slice(e)
129
136
  };
130
137
  }
131
- function nt(t) {
138
+ function rt(t) {
132
139
  if (!t) return [{ type: "text", value: "" }];
133
140
  const e = [];
134
141
  let n = 0;
135
142
  for (const r of t.matchAll(/\bhttps?:\/\/[^\s<>"']+/gi)) {
136
143
  const s = r[0], o = r.index ?? 0;
137
144
  o > n && e.push({ type: "text", value: t.slice(n, o) });
138
- const { cleanUrl: c, trailing: i } = v(s);
139
- c ? e.push({ type: "link", value: c }) : e.push({ type: "text", value: s }), i && e.push({ type: "text", value: i }), n = o + s.length;
145
+ const { cleanUrl: c, trailing: a } = v(s);
146
+ c ? e.push({ type: "link", value: c }) : e.push({ type: "text", value: s }), a && e.push({ type: "text", value: a }), n = o + s.length;
140
147
  }
141
148
  return n < t.length && e.push({ type: "text", value: t.slice(n) }), e.length ? e : [{ type: "text", value: t }];
142
149
  }
143
150
  export {
144
- a as API_KEY_HEADER,
145
- M as API_ROUTES,
146
- T as APPLICATION_JSON,
147
- f as CONTENT_TYPE_HEADER,
148
- H as CUSTOM_PERIOD,
149
- N as CalendarResolution,
151
+ i as API_KEY_HEADER,
152
+ H as API_ROUTES,
153
+ A as APPLICATION_JSON,
154
+ T as CONTENT_TYPE_HEADER,
155
+ w as CUSTOM_PERIOD,
156
+ g as CalendarResolution,
150
157
  x as HTTP_ERROR_CODES,
151
- L as HttpError,
152
- _ as Locale,
153
- m as OCP_APIM_SUBSCRIPTION_KEY_HEADER,
158
+ P as HttpError,
159
+ O as Locale,
160
+ d as OCP_APIM_SUBSCRIPTION_KEY_HEADER,
154
161
  B as ONBOARDING_MODEL_POSTFIX,
155
- O as QueryFilterType,
156
- P as SHARE_CONVERSATION_ROUTE,
157
- g as X_CONVERSATION_ID_HEADER,
158
- et as cleanConversationNames,
162
+ _ as QueryFilterType,
163
+ L as SHARE_CONVERSATION_ROUTE,
164
+ N as X_CONVERSATION_ID_HEADER,
165
+ nt as cleanConversationNames,
159
166
  u as defaultFormatNumbers,
160
167
  E as deleteConversationNamePostfix,
161
- V as formatNumberBySign,
168
+ Y as formatNumberBySign,
162
169
  W as getClearedConversationName,
163
- F as getConversationAttachmentUrls,
170
+ G as getConversationAttachmentUrls,
164
171
  I as getConversationAttachments,
165
- Z as getConversationFolderIdFromConversationId,
166
- j as getConversationId,
167
- Q as getConversationIdFromResourceUrl,
168
- tt as getConversationNameFromConversationId,
169
- w as getConversationNavPath,
170
- q as getConversationUrlWithoutLocale,
171
- z as getHeaders,
172
- K as getMultipartHeaders,
173
- Y as getTimePeriod,
172
+ tt as getConversationFolderIdFromConversationId,
173
+ V as getConversationId,
174
+ Z as getConversationIdFromResourceUrl,
175
+ et as getConversationNameFromConversationId,
176
+ F as getConversationNavPath,
177
+ Q as getConversationUrlWithoutLocale,
178
+ k as getHeaders,
179
+ X as getMultipartHeaders,
180
+ z as getTimePeriod,
174
181
  R as isDialFileAttachmentUrl,
175
182
  $ as isHttpError,
176
- nt as linkifyText,
177
- X as parseBoolean,
178
- G as replaceConversationAttachmentUrls,
179
- k as sanitizeHeaders,
180
- J as sendRequest,
183
+ rt as linkifyText,
184
+ J as parseBoolean,
185
+ j as replaceConversationAttachmentUrls,
186
+ K as sanitizeHeaders,
187
+ q as sendRequest,
181
188
  v as splitTrailingPunctuation
182
189
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/statgpt-shared-toolkit",
3
- "version": "0.4.0-rc.26",
3
+ "version": "0.4.0-rc.28",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {