@cyberskill/shared 2.26.0 → 2.28.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.
Files changed (71) hide show
  1. package/README.md +1 -1
  2. package/dist/config/config.util.cjs +1 -1
  3. package/dist/config/config.util.js +14 -19
  4. package/dist/config/eslint/index.cjs +1 -1
  5. package/dist/config/eslint/index.d.ts +2 -0
  6. package/dist/config/eslint/index.js +1 -1
  7. package/dist/config/vitest/vitest.e2e.cjs +1 -1
  8. package/dist/config/vitest/vitest.e2e.js +1 -1
  9. package/dist/config/vitest/vitest.unit.cjs +1 -1
  10. package/dist/config/vitest/vitest.unit.js +1 -1
  11. package/dist/node/cli/index.cjs +2 -5
  12. package/dist/node/cli/index.js +108 -103
  13. package/dist/node/command/command.util.js +1 -1
  14. package/dist/node/fs/fs.util.cjs +4 -1
  15. package/dist/node/fs/fs.util.d.ts +8 -0
  16. package/dist/node/fs/fs.util.js +58 -50
  17. package/dist/node/fs/index.cjs +1 -1
  18. package/dist/node/fs/index.js +13 -12
  19. package/dist/node/mongo/mongo.type.js +3 -3
  20. package/dist/node/mongo/mongo.util.cjs +2 -5
  21. package/dist/node/mongo/mongo.util.js +206 -211
  22. package/dist/node/path/index.cjs +1 -1
  23. package/dist/node/path/index.js +53 -51
  24. package/dist/node/path/path.constant.cjs +1 -1
  25. package/dist/node/path/path.constant.d.ts +3 -0
  26. package/dist/node/path/path.constant.js +63 -60
  27. package/dist/node/storage/storage.util.cjs +1 -1
  28. package/dist/node/storage/storage.util.js +1 -1
  29. package/dist/node/upload/upload.util.js +3 -3
  30. package/dist/react/apollo-client/apollo-client.component.cjs +1 -1
  31. package/dist/react/apollo-client/apollo-client.component.d.ts +1 -1
  32. package/dist/react/apollo-client/apollo-client.component.js +4 -3
  33. package/dist/react/apollo-client/apollo-client.context.cjs +1 -1
  34. package/dist/react/apollo-client/apollo-client.context.d.ts +1 -1
  35. package/dist/react/apollo-client/apollo-client.context.js +9 -8
  36. package/dist/react/apollo-client/apollo-client.util.cjs +1 -1
  37. package/dist/react/apollo-client/apollo-client.util.js +3 -3
  38. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +1 -1
  39. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +1 -1
  40. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.js +9 -8
  41. package/dist/react/apollo-error/apollo-error.component.cjs +1 -1
  42. package/dist/react/apollo-error/apollo-error.component.d.ts +1 -1
  43. package/dist/react/apollo-error/apollo-error.component.js +2 -1
  44. package/dist/react/apollo-error/apollo-error.provider.cjs +1 -1
  45. package/dist/react/apollo-error/apollo-error.provider.d.ts +1 -1
  46. package/dist/react/apollo-error/apollo-error.provider.js +4 -3
  47. package/dist/react/loading/loading.component.cjs +2 -2
  48. package/dist/react/loading/loading.component.d.ts +1 -1
  49. package/dist/react/loading/loading.component.js +7 -6
  50. package/dist/react/loading/loading.provider.cjs +1 -1
  51. package/dist/react/loading/loading.provider.d.ts +1 -1
  52. package/dist/react/loading/loading.provider.js +8 -7
  53. package/dist/react/next-intl/next-intl.hoc.cjs +1 -1
  54. package/dist/react/next-intl/next-intl.hoc.d.ts +2 -1
  55. package/dist/react/next-intl/next-intl.hoc.js +12 -12
  56. package/dist/react/next-intl/next-intl.provider.cjs +1 -1
  57. package/dist/react/next-intl/next-intl.provider.d.ts +1 -1
  58. package/dist/react/next-intl/next-intl.provider.js +5 -4
  59. package/dist/util/common/common.util.cjs +1 -1
  60. package/dist/util/common/common.util.d.ts +9 -0
  61. package/dist/util/common/common.util.js +33 -29
  62. package/dist/util/common/index.cjs +1 -1
  63. package/dist/util/common/index.js +6 -5
  64. package/dist/util/index.cjs +1 -1
  65. package/dist/util/index.js +23 -22
  66. package/dist/util/object/object.util.cjs +1 -1
  67. package/dist/util/object/object.util.js +40 -36
  68. package/package.json +45 -44
  69. package/dist/node/mongo/mongo.util.d.ts +0 -1040
  70. /package/dist/node_modules/.pnpm/{vitest@4.0.16_@types_node@25.0.3_jiti@2.6.1_jsdom@27.4.0_sass@1.97.2_tsx@4.21.0_yaml@2.8.2 → vitest@4.0.18_@types_node@25.3.0_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2}/node_modules/vitest/dist/config.cjs +0 -0
  71. /package/dist/node_modules/.pnpm/{vitest@4.0.16_@types_node@25.0.3_jiti@2.6.1_jsdom@27.4.0_sass@1.97.2_tsx@4.21.0_yaml@2.8.2 → vitest@4.0.18_@types_node@25.3.0_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2}/node_modules/vitest/dist/config.js +0 -0
@@ -1,16 +1,17 @@
1
1
  import { ApolloNextAppProvider as l } from "@apollo/client-integration-nextjs";
2
- import e, { useMemo as n } from "react";
3
- import { getClient as p } from "./apollo-client-nextjs.util.js";
4
- import { ApolloErrorProvider as i } from "../apollo-error/apollo-error.provider.js";
2
+ import * as e from "react";
3
+ import { useMemo as p } from "react";
4
+ import { getClient as i } from "./apollo-client-nextjs.util.js";
5
+ import { ApolloErrorProvider as n } from "../apollo-error/apollo-error.provider.js";
5
6
  import { ApolloErrorComponent as a } from "../apollo-error/apollo-error.component.js";
6
7
  import { Toaster as c } from "react-hot-toast";
7
- function s({ options: r, children: t, onError: o }) {
8
- const m = n(
9
- () => () => p(r || {}),
8
+ function g({ options: r, children: t, onError: o }) {
9
+ const m = p(
10
+ () => () => i(r || {}),
10
11
  [r]
11
12
  );
12
- return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(i, { onError: o }, /* @__PURE__ */ e.createElement(l, { makeClient: m }, t), !o && /* @__PURE__ */ e.createElement(a, null)), /* @__PURE__ */ e.createElement(c, { position: "top-right" }));
13
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(n, { onError: o }, /* @__PURE__ */ e.createElement(l, { makeClient: m }, t), !o && /* @__PURE__ */ e.createElement(a, null)), /* @__PURE__ */ e.createElement(c, { position: "top-right" }));
13
14
  }
14
15
  export {
15
- s as ApolloProvider
16
+ g as ApolloProvider
16
17
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),a=require("../../util/validate/validate.util.cjs"),s=require("./apollo-error.context.cjs"),r=require("./apollo-error.module.scss.cjs");function i(){const l=t.use(s.ApolloErrorContext),e=l==null?void 0:l.error;if(!e)return null;const n="locations"in e||"path"in e||"extensions"in e,o="message"in e?e.message:"Unknown error occurred";return t.createElement("div",{className:r.default["modal-backdrop"]},t.createElement("div",{className:r.default["modal-content"]},t.createElement("button",{type:"button",className:r.default["btn-close"],onClick:l.hideError},"✕"),t.createElement("div",{className:r.default["error-title"]},t.createElement("button",{type:"button",className:r.default["btn-retry"],onClick:()=>window.location.reload()},"Reload")," ",!a.validate.isEmpty(e)&&o),t.createElement("div",{className:r.default["error-details"]},n&&"locations"in e&&e.locations&&t.createElement("pre",{className:"locations"},t.createElement("strong",null,"Locations:")," ",JSON.stringify(e.locations,null,4)),n&&"path"in e&&e.path&&t.createElement("pre",{className:"path"},t.createElement("strong",null,"Path:")," ",JSON.stringify(e.path,null,4)),n&&"extensions"in e&&e.extensions&&t.createElement("pre",{className:"extensions"},t.createElement("strong",null,"Extensions:")," ",JSON.stringify(e.extensions,null,4)),!n&&t.createElement("pre",{className:"error-details"},t.createElement("strong",null,"Error Details:")," ",a.validate.isEmpty(e)?o:JSON.stringify(e,null,4)))))}exports.ApolloErrorComponent=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),a=require("../../util/validate/validate.util.cjs"),i=require("./apollo-error.context.cjs"),o=require("./apollo-error.module.scss.cjs");function c(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,l.get?l:{enumerable:!0,get:()=>r[n]})}}return e.default=r,Object.freeze(e)}const t=c(s);function u(){const r=s.use(i.ApolloErrorContext),e=r==null?void 0:r.error;if(!e)return null;const n="locations"in e||"path"in e||"extensions"in e,l="message"in e?e.message:"Unknown error occurred";return t.createElement("div",{className:o.default["modal-backdrop"]},t.createElement("div",{className:o.default["modal-content"]},t.createElement("button",{type:"button",className:o.default["btn-close"],onClick:r.hideError},"✕"),t.createElement("div",{className:o.default["error-title"]},t.createElement("button",{type:"button",className:o.default["btn-retry"],onClick:()=>window.location.reload()},"Reload")," ",!a.validate.isEmpty(e)&&l),t.createElement("div",{className:o.default["error-details"]},n&&"locations"in e&&e.locations&&t.createElement("pre",{className:"locations"},t.createElement("strong",null,"Locations:")," ",JSON.stringify(e.locations,null,4)),n&&"path"in e&&e.path&&t.createElement("pre",{className:"path"},t.createElement("strong",null,"Path:")," ",JSON.stringify(e.path,null,4)),n&&"extensions"in e&&e.extensions&&t.createElement("pre",{className:"extensions"},t.createElement("strong",null,"Extensions:")," ",JSON.stringify(e.extensions,null,4)),!n&&t.createElement("pre",{className:"error-details"},t.createElement("strong",null,"Error Details:")," ",a.validate.isEmpty(e)?l:JSON.stringify(e,null,4)))))}exports.ApolloErrorComponent=u;
@@ -1,4 +1,4 @@
1
- import { default as React } from 'react';
1
+ import * as React from 'react';
2
2
  /**
3
3
  * Apollo Error Component that displays detailed error information in a modal.
4
4
  * This component provides a comprehensive error display interface that shows
@@ -1,4 +1,5 @@
1
- import t, { use as a } from "react";
1
+ import * as t from "react";
2
+ import { use as a } from "react";
2
3
  import { validate as s } from "../../util/validate/validate.util.js";
3
4
  import { ApolloErrorContext as i } from "./apollo-error.context.js";
4
5
  import n from "./apollo-error.module.scss.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),i=require("./apollo-error.context.cjs"),c=require("./apollo-error.util.cjs");function b({children:n,onError:e}){const[o,t]=l.useState(null),r=l.useCallback(u=>{if(e){e(u);return}t(u)},[e]);l.useEffect(()=>(c.setGlobalApolloErrorCallback(r,!!e),()=>{c.clearGlobalApolloErrorCallback()}),[r,e]);const a=l.useCallback(()=>t(null),[]),s=l.useMemo(()=>({error:e?null:o,showError:r,hideError:a}),[o,r,a,e]);return l.createElement(i.ApolloErrorContext,{value:s},n)}exports.ApolloErrorProvider=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),i=require("./apollo-error.context.cjs"),u=require("./apollo-error.util.cjs");function b(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,o.get?o:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const f=b(l);function p({children:r,onError:e}){const[t,o]=l.useState(null),a=l.useCallback(n=>{if(e){e(n);return}o(n)},[e]);l.useEffect(()=>(u.setGlobalApolloErrorCallback(a,!!e),()=>{u.clearGlobalApolloErrorCallback()}),[a,e]);const c=l.useCallback(()=>o(null),[]),s=l.useMemo(()=>({error:e?null:t,showError:a,hideError:c}),[t,a,c,e]);return f.createElement(i.ApolloErrorContext,{value:s},r)}exports.ApolloErrorProvider=p;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { I_ApolloErrorProviderProps } from './apollo-error.type.js';
2
+ import * as React from 'react';
3
3
  /**
4
4
  * Provider component that manages Apollo error state and provides error context.
5
5
  * This component sets up error handling for Apollo Client operations and provides
@@ -1,4 +1,5 @@
1
- import s, { useState as m, useCallback as c, useEffect as f, useMemo as i } from "react";
1
+ import * as n from "react";
2
+ import { useState as m, useCallback as c, useEffect as f, useMemo as i } from "react";
2
3
  import { ApolloErrorContext as p } from "./apollo-error.context.js";
3
4
  import { setGlobalApolloErrorCallback as b, clearGlobalApolloErrorCallback as A } from "./apollo-error.util.js";
4
5
  function k({ children: u, onError: l }) {
@@ -12,12 +13,12 @@ function k({ children: u, onError: l }) {
12
13
  f(() => (b(e, !!l), () => {
13
14
  A();
14
15
  }), [e, l]);
15
- const t = c(() => o(null), []), n = i(() => ({
16
+ const t = c(() => o(null), []), s = i(() => ({
16
17
  error: l ? null : r,
17
18
  showError: e,
18
19
  hideError: t
19
20
  }), [r, e, t, l]);
20
- return /* @__PURE__ */ s.createElement(p, { value: n }, u);
21
+ return /* @__PURE__ */ n.createElement(p, { value: s }, u);
21
22
  }
22
23
  export {
23
24
  k as ApolloErrorProvider
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("clsx"),n=require("react"),l=require("./loading.module.scss.cjs");var p=Object.defineProperty,i=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,u=(e,r,t)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,_=(e,r)=>{for(var t in r||(r={}))m.call(r,t)&&u(e,t,r[t]);if(i)for(var t of i(r))f.call(r,t)&&u(e,t,r[t]);return e},y=(e,r)=>{var t={};for(var a in e)m.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&i)for(var a of i(e))r.indexOf(a)<0&&f.call(e,a)&&(t[a]=e[a]);return t};function E(){if(document.getElementById("noscroll-style"))return;const e=document.createElement("style");e.id="noscroll-style",e.innerHTML=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("clsx"),c=require("react"),n=require("./loading.module.scss.cjs");function _(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const l=_(c);var y=Object.defineProperty,i=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,f=(e,r,t)=>r in e?y(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,b=(e,r)=>{for(var t in r||(r={}))m.call(r,t)&&f(e,t,r[t]);if(i)for(var t of i(r))v.call(r,t)&&f(e,t,r[t]);return e},E=(e,r)=>{var t={};for(var a in e)m.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(e!=null&&i)for(var a of i(e))r.indexOf(a)<0&&v.call(e,a)&&(t[a]=e[a]);return t};function O(){if(document.getElementById("noscroll-style"))return;const e=document.createElement("style");e.id="noscroll-style",e.innerHTML=`
2
2
  .noscroll {
3
3
  overflow: hidden !important;
4
4
  height: 100vh !important;
5
5
  }
6
- `,document.head.appendChild(e)}function h(e){var r=e,{full:t=!1,className:a="",message:o="Loading"}=r,v=y(r,["full","className","message"]);n.useEffect(()=>{if(t){document.body.classList.add("noscroll");const s=g=>g.preventDefault();return document.addEventListener("contextmenu",s),()=>{document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",s)}}},[t]),n.useEffect(()=>{E()},[]);function d(){return n.createElement("div",_({role:"status","aria-live":"polite","aria-label":o,className:l.default.container},v),n.createElement("div",{className:l.default.ring,"aria-hidden":"true"}),n.createElement("div",{className:l.default.ring,"aria-hidden":"true"}),n.createElement("div",{className:l.default.ring,"aria-hidden":"true"}),n.createElement("div",{className:l.default.ring,"aria-hidden":"true"}),o&&n.createElement("div",{className:l.default.message},o))}return t?n.createElement("div",{className:c(l.default.full,a)},d()):n.createElement("div",{className:c(l.default.block,a)},d())}exports.Loading=h;
6
+ `,document.head.appendChild(e)}function h(e){var r=e,{full:t=!1,className:a="",message:o="Loading"}=r,g=E(r,["full","className","message"]);c.useEffect(()=>{if(t){document.body.classList.add("noscroll");const d=p=>p.preventDefault();return document.addEventListener("contextmenu",d),()=>{document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",d)}}},[t]),c.useEffect(()=>{O()},[]);function s(){return l.createElement("div",b({role:"status","aria-live":"polite","aria-label":o,className:n.default.container},g),l.createElement("div",{className:n.default.ring,"aria-hidden":"true"}),l.createElement("div",{className:n.default.ring,"aria-hidden":"true"}),l.createElement("div",{className:n.default.ring,"aria-hidden":"true"}),l.createElement("div",{className:n.default.ring,"aria-hidden":"true"}),o&&l.createElement("div",{className:n.default.message},o))}return t?l.createElement("div",{className:u(n.default.full,a)},s()):l.createElement("div",{className:u(n.default.block,a)},s())}exports.Loading=h;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { I_LoadingProps } from './loading.type.js';
2
+ import * as React from 'react';
3
3
  /**
4
4
  * Loading component that displays animated loading indicators.
5
5
  * This component provides a customizable loading interface with animated rings
@@ -1,5 +1,6 @@
1
- import m from "clsx";
2
- import n, { useEffect as d } from "react";
1
+ import c from "clsx";
2
+ import * as n from "react";
3
+ import { useEffect as d } from "react";
3
4
  import l from "./loading.module.scss.js";
4
5
  var _ = Object.defineProperty, i = Object.getOwnPropertySymbols, u = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable, f = (e, r, t) => r in e ? _(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, y = (e, r) => {
5
6
  for (var t in r || (r = {}))
@@ -33,9 +34,9 @@ function L(e) {
33
34
  d(() => {
34
35
  if (t) {
35
36
  document.body.classList.add("noscroll");
36
- const c = (g) => g.preventDefault();
37
- return document.addEventListener("contextmenu", c), () => {
38
- document.body.classList.remove("noscroll"), document.removeEventListener("contextmenu", c);
37
+ const m = (g) => g.preventDefault();
38
+ return document.addEventListener("contextmenu", m), () => {
39
+ document.body.classList.remove("noscroll"), document.removeEventListener("contextmenu", m);
39
40
  };
40
41
  }
41
42
  }, [t]), d(() => {
@@ -57,7 +58,7 @@ function L(e) {
57
58
  o && /* @__PURE__ */ n.createElement("div", { className: l.message }, o)
58
59
  );
59
60
  }
60
- return t ? /* @__PURE__ */ n.createElement("div", { className: m(l.full, a) }, s()) : /* @__PURE__ */ n.createElement("div", { className: m(l.block, a) }, s());
61
+ return t ? /* @__PURE__ */ n.createElement("div", { className: c(l.full, a) }, s()) : /* @__PURE__ */ n.createElement("div", { className: c(l.block, a) }, s());
61
62
  }
62
63
  export {
63
64
  L as Loading
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),d=require("./loading.component.cjs"),u=require("./loading.context.cjs");function g({children:l}){const[o,a]=e.useState(!1),[t,n]=e.useState(!1),s=e.useCallback((c=!1)=>{a(!0),n(c)},[]),i=e.useCallback(()=>{a(!1),n(!1)},[]),r=e.useMemo(()=>({isLoading:o,isGlobalLoading:t,showLoading:s,hideLoading:i}),[o,t,s,i]);return e.createElement(u.LoadingContext,{value:r},o?e.createElement(d.Loading,{full:t}):l)}exports.LoadingProvider=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),d=require("./loading.component.cjs"),g=require("./loading.context.cjs");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const s=f(a);function b({children:e}){const[t,o]=a.useState(!1),[n,r]=a.useState(!1),l=a.useCallback((u=!1)=>{o(!0),r(u)},[]),i=a.useCallback(()=>{o(!1),r(!1)},[]),c=a.useMemo(()=>({isLoading:t,isGlobalLoading:n,showLoading:l,hideLoading:i}),[t,n,l,i]);return s.createElement(g.LoadingContext,{value:c},t?s.createElement(d.Loading,{full:n}):e)}exports.LoadingProvider=b;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { I_Children } from '../../typescript/index.js';
2
+ import * as React from 'react';
3
3
  /**
4
4
  * Provider component that manages loading state and provides loading context.
5
5
  * This component sets up loading state management for the application and provides
@@ -1,16 +1,17 @@
1
- import i, { useState as l, useCallback as r, useMemo as g } from "react";
2
- import { Loading as m } from "./loading.component.js";
1
+ import * as i from "react";
2
+ import { useState as l, useCallback as r, useMemo as m } from "react";
3
+ import { Loading as g } from "./loading.component.js";
3
4
  import { LoadingContext as u } from "./loading.context.js";
4
5
  function x({ children: c }) {
5
- const [e, t] = l(!1), [o, a] = l(!1), n = r((f = !1) => {
6
+ const [o, t] = l(!1), [e, a] = l(!1), n = r((f = !1) => {
6
7
  t(!0), a(f);
7
8
  }, []), s = r(() => {
8
9
  t(!1), a(!1);
9
- }, []), d = g(
10
- () => ({ isLoading: e, isGlobalLoading: o, showLoading: n, hideLoading: s }),
11
- [e, o, n, s]
10
+ }, []), d = m(
11
+ () => ({ isLoading: o, isGlobalLoading: e, showLoading: n, hideLoading: s }),
12
+ [o, e, n, s]
12
13
  );
13
- return /* @__PURE__ */ i.createElement(u, { value: d }, e ? /* @__PURE__ */ i.createElement(m, { full: o }) : c);
14
+ return /* @__PURE__ */ i.createElement(u, { value: d }, o ? /* @__PURE__ */ i.createElement(g, { full: e }) : c);
14
15
  }
15
16
  export {
16
17
  x as LoadingProvider
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("next-intl"),i=require("react"),m=require("./next-intl.constant.cjs"),p=require("./next-intl.hook.cjs"),I=require("../log/log.util.cjs");var N=Object.defineProperty,s=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,c=(r,e,t)=>e in r?N(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,w=(r,e)=>{for(var t in e||(e={}))y.call(e,t)&&c(r,t,e[t]);if(s)for(var t of s(e))P.call(e,t)&&c(r,t,e[t]);return r};function O(r){const e=t=>{var a,o;const{currentLanguage:n}=p.useNextIntl(),{messages:u,languages:g}=t,l="en",v=u[(n==null?void 0:n.value)||l],_=(o=(a=g.find(d=>d.value===(n==null?void 0:n.value)))==null?void 0:a.timezone)!=null?o:m.NEXT_INTL_DEFAULT_LANGUAGE.timezone;return u?i.createElement(f.NextIntlClientProvider,{locale:(n==null?void 0:n.value)||l,messages:v||null,timeZone:_},i.createElement(r,w({},t))):(I.log.warn(`Missing messages for language: ${(n==null?void 0:n.value)||l}`),null)};return e.displayName=`withNextIntl(${r.displayName||r.name||"Component"})`,e}exports.withNextIntl=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("next-intl"),v=require("react"),p=require("./next-intl.constant.cjs"),O=require("./next-intl.hook.cjs"),y=require("../log/log.util.cjs");function I(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,l.get?l:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const i=I(v);var N=Object.defineProperty,s=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,c=(n,e,t)=>e in n?N(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,w=(n,e)=>{for(var t in e||(e={}))P.call(e,t)&&c(n,t,e[t]);if(s)for(var t of s(e))b.call(e,t)&&c(n,t,e[t]);return n};function x(n){const e=t=>{var l,o;const{currentLanguage:r}=O.useNextIntl(),{messages:u,languages:f}=t,a="en",g=u[(r==null?void 0:r.value)||a],_=(o=(l=f.find(d=>d.value===(r==null?void 0:r.value)))==null?void 0:l.timezone)!=null?o:p.NEXT_INTL_DEFAULT_LANGUAGE.timezone;return u?i.createElement(m.NextIntlClientProvider,{locale:(r==null?void 0:r.value)||a,messages:g||null,timeZone:_},i.createElement(n,w({},t))):(y.log.warn(`Missing messages for language: ${(r==null?void 0:r.value)||a}`),null)};return e.displayName=`withNextIntl(${n.displayName||n.name||"Component"})`,e}exports.withNextIntl=x;
@@ -1,6 +1,7 @@
1
- import { ComponentType, default as React } from 'react';
1
+ import { ComponentType } from 'react';
2
2
  import { I_Children } from '../../typescript/index.js';
3
3
  import { I_NextIntlLanguage, T_NextIntlMessageList } from './next-intl.type.js';
4
+ import * as React from 'react';
4
5
  /**
5
6
  * Higher-Order Component (HOC) that wraps components with Next.js internationalization support.
6
7
  * This HOC provides internationalization capabilities to React components by wrapping them
@@ -1,32 +1,32 @@
1
1
  import { NextIntlClientProvider as g } from "next-intl";
2
- import u from "react";
2
+ import * as s from "react";
3
3
  import { NEXT_INTL_DEFAULT_LANGUAGE as _ } from "./next-intl.constant.js";
4
4
  import { useNextIntl as d } from "./next-intl.hook.js";
5
5
  import { log as N } from "../log/log.util.js";
6
- var P = Object.defineProperty, s = Object.getOwnPropertySymbols, w = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable, m = (t, e, r) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, I = (t, e) => {
6
+ var P = Object.defineProperty, u = Object.getOwnPropertySymbols, w = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable, m = (t, e, r) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, I = (t, e) => {
7
7
  for (var r in e || (e = {}))
8
8
  w.call(e, r) && m(t, r, e[r]);
9
- if (s)
10
- for (var r of s(e))
9
+ if (u)
10
+ for (var r of u(e))
11
11
  y.call(e, r) && m(t, r, e[r]);
12
12
  return t;
13
13
  };
14
- function b(t) {
14
+ function L(t) {
15
15
  const e = (r) => {
16
- var a, o;
17
- const { currentLanguage: n } = d(), { messages: i, languages: f } = r, l = "en", c = i[(n == null ? void 0 : n.value) || l], p = (o = (a = f.find((v) => v.value === (n == null ? void 0 : n.value))) == null ? void 0 : a.timezone) != null ? o : _.timezone;
18
- return i ? /* @__PURE__ */ u.createElement(
16
+ var l, o;
17
+ const { currentLanguage: n } = d(), { messages: i, languages: f } = r, a = "en", c = i[(n == null ? void 0 : n.value) || a], p = (o = (l = f.find((v) => v.value === (n == null ? void 0 : n.value))) == null ? void 0 : l.timezone) != null ? o : _.timezone;
18
+ return i ? /* @__PURE__ */ s.createElement(
19
19
  g,
20
20
  {
21
- locale: (n == null ? void 0 : n.value) || l,
21
+ locale: (n == null ? void 0 : n.value) || a,
22
22
  messages: c || null,
23
23
  timeZone: p
24
24
  },
25
- /* @__PURE__ */ u.createElement(t, I({}, r))
26
- ) : (N.warn(`Missing messages for language: ${(n == null ? void 0 : n.value) || l}`), null);
25
+ /* @__PURE__ */ s.createElement(t, I({}, r))
26
+ ) : (N.warn(`Missing messages for language: ${(n == null ? void 0 : n.value) || a}`), null);
27
27
  };
28
28
  return e.displayName = `withNextIntl(${t.displayName || t.name || "Component"})`, e;
29
29
  }
30
30
  export {
31
- b as withNextIntl
31
+ L as withNextIntl
32
32
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),l=require("./next-intl.constant.cjs"),c=require("./next-intl.context.cjs"),i=require("./next-intl.hoc.cjs"),s=require("../storage/storage.hook.cjs");function x({children:n}){return e.createElement(e.Fragment,null,n)}const g=i.withNextIntl(x);function I({children:n,languages:t,messages:u}){const{value:r,set:o}=s.useStorage("lang",t[0]),a=e.useMemo(()=>({languages:t,currentLanguage:r!=null?r:l.NEXT_INTL_DEFAULT_LANGUAGE,setCurrentLanguage:o}),[t,o,r]);return e.createElement(c.NextIntlContext,{value:a},e.createElement(g,{languages:t,messages:u},n))}exports.NextIntlProvider=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),l=require("./next-intl.constant.cjs"),i=require("./next-intl.context.cjs"),s=require("./next-intl.hoc.cjs"),g=require("../storage/storage.hook.cjs");function f(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=f(a);function p({children:e}){return o.createElement(o.Fragment,null,e)}const m=s.withNextIntl(p);function x({children:e,languages:t,messages:n}){const{value:r,set:u}=g.useStorage("lang",t[0]),c=a.useMemo(()=>({languages:t,currentLanguage:r!=null?r:l.NEXT_INTL_DEFAULT_LANGUAGE,setCurrentLanguage:u}),[t,u,r]);return o.createElement(i.NextIntlContext,{value:c},o.createElement(m,{languages:t,messages:n},e))}exports.NextIntlProvider=x;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { I_NextIntlProviderProps } from './next-intl.type.js';
2
+ import * as React from 'react';
3
3
  /**
4
4
  * Provider component that manages Next.js internationalization state and provides i18n context.
5
5
  * This component sets up a complete internationalization system for Next.js applications,
@@ -1,4 +1,5 @@
1
- import t, { useMemo as u } from "react";
1
+ import * as t from "react";
2
+ import { useMemo as u } from "react";
2
3
  import { NEXT_INTL_DEFAULT_LANGUAGE as c } from "./next-intl.constant.js";
3
4
  import { NextIntlContext as l } from "./next-intl.context.js";
4
5
  import { withNextIntl as p } from "./next-intl.hoc.js";
@@ -10,13 +11,13 @@ const L = p(f);
10
11
  function I({
11
12
  children: r,
12
13
  languages: e,
13
- messages: a
14
+ messages: m
14
15
  }) {
15
- const { value: n, set: o } = i("lang", e[0]), m = u(
16
+ const { value: n, set: o } = i("lang", e[0]), a = u(
16
17
  () => ({ languages: e, currentLanguage: n != null ? n : c, setCurrentLanguage: o }),
17
18
  [e, o, n]
18
19
  );
19
- return /* @__PURE__ */ t.createElement(l, { value: m }, /* @__PURE__ */ t.createElement(L, { languages: e, messages: a }, r));
20
+ return /* @__PURE__ */ t.createElement(l, { value: a }, /* @__PURE__ */ t.createElement(L, { languages: e, messages: m }, r));
20
21
  }
21
22
  export {
22
23
  I as NextIntlProvider
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../typescript/common.type.cjs");var _=Object.defineProperty,i=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,a=(n,e,r)=>e in n?_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,p=(n,e)=>{for(var r in e||(e={}))O.call(e,r)&&a(n,r,e[r]);if(i)for(var r of i(e))f.call(e,r)&&a(n,r,e[r]);return n};const s={a:["à","á","ạ","ả","ã","â","ầ","ấ","ậ","ẩ","ẫ","ă","ằ","ắ","ặ","ẳ","ẵ"],e:["è","é","ẹ","ẻ","ẽ","ê","ề","ế","ệ","ể","ễ"],i:["ì","í","ị","ỉ","ĩ"],o:["ò","ó","ọ","ỏ","õ","ô","ồ","ố","ộ","ổ","ỗ","ơ","ờ","ớ","ợ","ở","ỡ"],u:["ù","ú","ụ","ủ","ũ","ư","ừ","ứ","ự","ử","ữ"],y:["ỳ","ý","ỵ","ỷ","ỹ"],d:["đ"]},v=Object.entries(s).reduce((n,[e,r])=>(n[e.toUpperCase()]=r.map(o=>o.toUpperCase()),n),{}),l=p(p({},s),v),u=new Map,m=new Set;Object.entries(l).forEach(([n,e])=>{const r=`(${[n,...e].join("|")})`;[n,...e].forEach(o=>{u.set(o,r),m.add(o)})});const D=Array.from(m).join(""),N=new RegExp(`[${D}]`,"g");function P(n){return n=n.normalize("NFD"),n.replace(N,e=>u.get(e)||e)}function g(n){return n.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}function M(n,e){if(!e)return Array.from(new Set(n));const r=new Set,o=[];for(const c of n){const E=e(c);r.has(E)||(r.add(E),o.push(c))}return o}function d(n){const{NODE_ENV:e=t.E_Environment.DEVELOPMENT,NODE_ENV_MODE:r=t.E_Environment.DEVELOPMENT}=n,o=e===t.E_Environment.DEVELOPMENT&&r===t.E_Environment.DEVELOPMENT,c=e===t.E_Environment.PRODUCTION&&r===t.E_Environment.STAGING,E=e===t.E_Environment.PRODUCTION&&r===t.E_Environment.PRODUCTION;if(e===t.E_Environment.PRODUCTION&&r===t.E_Environment.DEVELOPMENT)throw new Error("NODE_ENV_MODE must be set to staging or production in production environment");return{IS_DEV:o,IS_STAG:c,IS_PROD:E}}exports.mapEnvironment=d;exports.regexSearchMapper=P;exports.removeAccent=g;exports.uniqueArray=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../typescript/common.type.cjs");var O=Object.defineProperty,a=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,i=(e,n,r)=>n in e?O(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,p=(e,n)=>{for(var r in n||(n={}))f.call(n,r)&&i(e,r,n[r]);if(a)for(var r of a(n))l.call(n,r)&&i(e,r,n[r]);return e};const s={a:["à","á","ạ","ả","ã","â","ầ","ấ","ậ","ẩ","ẫ","ă","ằ","ắ","ặ","ẳ","ẵ"],e:["è","é","ẹ","ẻ","ẽ","ê","ề","ế","ệ","ể","ễ"],i:["ì","í","ị","ỉ","ĩ"],o:["ò","ó","ọ","ỏ","õ","ô","ồ","ố","ộ","ổ","ỗ","ơ","ờ","ớ","ợ","ở","ỡ"],u:["ù","ú","ụ","ủ","ũ","ư","ừ","ứ","ự","ử","ữ"],y:["ỳ","ý","ỵ","ỷ","ỹ"],d:["đ"]},v=Object.entries(s).reduce((e,[n,r])=>(e[n.toUpperCase()]=r.map(o=>o.toUpperCase()),e),{}),g=p(p({},s),v),u=new Map,m=new Set;Object.entries(g).forEach(([e,n])=>{const r=`(${[e,...n].join("|")})`;[e,...n].forEach(o=>{u.set(o,r),m.add(o)})});const D=Array.from(m).join(""),N=new RegExp(`[${D}]`,"g");function _(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function P(e){return e=_(e),e=e.normalize("NFD"),e.replace(N,n=>u.get(n)||n)}function M(e){return e.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}function d(e,n){if(!n)return Array.from(new Set(e));const r=new Set,o=[];for(const c of e){const E=n(c);r.has(E)||(r.add(E),o.push(c))}return o}function S(e){const{NODE_ENV:n=t.E_Environment.DEVELOPMENT,NODE_ENV_MODE:r=t.E_Environment.DEVELOPMENT}=e,o=n===t.E_Environment.DEVELOPMENT&&r===t.E_Environment.DEVELOPMENT,c=n===t.E_Environment.PRODUCTION&&r===t.E_Environment.STAGING,E=n===t.E_Environment.PRODUCTION&&r===t.E_Environment.PRODUCTION;if(n===t.E_Environment.PRODUCTION&&r===t.E_Environment.DEVELOPMENT)throw new Error("NODE_ENV_MODE must be set to staging or production in production environment");return{IS_DEV:o,IS_STAG:c,IS_PROD:E}}exports.escapeRegExp=_;exports.mapEnvironment=S;exports.regexSearchMapper=P;exports.removeAccent=M;exports.uniqueArray=d;
@@ -1,4 +1,13 @@
1
1
  import { I_EnvFlags, I_NodeEnvInput } from './common.type.js';
2
+ /**
3
+ * Escapes special characters in a string for use in a regular expression.
4
+ * This function escapes characters that have special meaning in regex (e.g., ., *, +, ?, etc.)
5
+ * so they are treated as literal characters.
6
+ *
7
+ * @param str - The string to escape.
8
+ * @returns The escaped string safe for use in a RegExp.
9
+ */
10
+ export declare function escapeRegExp(str: string): string;
2
11
  /**
3
12
  * Convert a string to a regex pattern that matches the string and its accented variations.
4
13
  * This function normalizes the input string and creates a regex pattern that can match
@@ -1,13 +1,13 @@
1
1
  import { E_Environment as t } from "../../typescript/common.type.js";
2
- var f = Object.defineProperty, p = Object.getOwnPropertySymbols, m = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable, i = (r, e, n) => e in r ? f(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n, s = (r, e) => {
3
- for (var n in e || (e = {}))
4
- m.call(e, n) && i(r, n, e[n]);
2
+ var f = Object.defineProperty, p = Object.getOwnPropertySymbols, m = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable, i = (e, r, n) => r in e ? f(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n, E = (e, r) => {
3
+ for (var n in r || (r = {}))
4
+ m.call(r, n) && i(e, n, r[n]);
5
5
  if (p)
6
- for (var n of p(e))
7
- _.call(e, n) && i(r, n, e[n]);
8
- return r;
6
+ for (var n of p(r))
7
+ _.call(r, n) && i(e, n, r[n]);
8
+ return e;
9
9
  };
10
- const E = {
10
+ const s = {
11
11
  a: ["à", "á", "ạ", "ả", "ã", "â", "ầ", "ấ", "ậ", "ẩ", "ẫ", "ă", "ằ", "ắ", "ặ", "ẳ", "ẵ"],
12
12
  e: ["è", "é", "ẹ", "ẻ", "ẽ", "ê", "ề", "ế", "ệ", "ể", "ễ"],
13
13
  i: ["ì", "í", "ị", "ỉ", "ĩ"],
@@ -15,42 +15,46 @@ const E = {
15
15
  u: ["ù", "ú", "ụ", "ủ", "ũ", "ư", "ừ", "ứ", "ự", "ử", "ữ"],
16
16
  y: ["ỳ", "ý", "ỵ", "ỷ", "ỹ"],
17
17
  d: ["đ"]
18
- }, D = Object.entries(E).reduce(
19
- (r, [e, n]) => (r[e.toUpperCase()] = n.map((o) => o.toUpperCase()), r),
18
+ }, l = Object.entries(s).reduce(
19
+ (e, [r, n]) => (e[r.toUpperCase()] = n.map((o) => o.toUpperCase()), e),
20
20
  {}
21
- ), N = s(s({}, E), D), u = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Set();
22
- Object.entries(N).forEach(([r, e]) => {
23
- const n = `(${[r, ...e].join("|")})`;
24
- [r, ...e].forEach((o) => {
21
+ ), D = E(E({}, s), l), u = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Set();
22
+ Object.entries(D).forEach(([e, r]) => {
23
+ const n = `(${[e, ...r].join("|")})`;
24
+ [e, ...r].forEach((o) => {
25
25
  u.set(o, n), O.add(o);
26
26
  });
27
27
  });
28
- const l = Array.from(O).join(""), P = new RegExp(`[${l}]`, "g");
29
- function d(r) {
30
- return r = r.normalize("NFD"), r.replace(P, (e) => u.get(e) || e);
28
+ const N = Array.from(O).join(""), P = new RegExp(`[${N}]`, "g");
29
+ function g(e) {
30
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
31
31
  }
32
- function g(r) {
33
- return r.normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
32
+ function d(e) {
33
+ return e = g(e), e = e.normalize("NFD"), e.replace(P, (r) => u.get(r) || r);
34
34
  }
35
- function w(r, e) {
36
- if (!e)
37
- return Array.from(new Set(r));
35
+ function w(e) {
36
+ return e.normalize("NFD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
37
+ }
38
+ function S(e, r) {
39
+ if (!r)
40
+ return Array.from(new Set(e));
38
41
  const n = /* @__PURE__ */ new Set(), o = [];
39
- for (const c of r) {
40
- const a = e(c);
42
+ for (const c of e) {
43
+ const a = r(c);
41
44
  n.has(a) || (n.add(a), o.push(c));
42
45
  }
43
46
  return o;
44
47
  }
45
- function S(r) {
46
- const { NODE_ENV: e = t.DEVELOPMENT, NODE_ENV_MODE: n = t.DEVELOPMENT } = r, o = e === t.DEVELOPMENT && n === t.DEVELOPMENT, c = e === t.PRODUCTION && n === t.STAGING, a = e === t.PRODUCTION && n === t.PRODUCTION;
47
- if (e === t.PRODUCTION && n === t.DEVELOPMENT)
48
+ function T(e) {
49
+ const { NODE_ENV: r = t.DEVELOPMENT, NODE_ENV_MODE: n = t.DEVELOPMENT } = e, o = r === t.DEVELOPMENT && n === t.DEVELOPMENT, c = r === t.PRODUCTION && n === t.STAGING, a = r === t.PRODUCTION && n === t.PRODUCTION;
50
+ if (r === t.PRODUCTION && n === t.DEVELOPMENT)
48
51
  throw new Error("NODE_ENV_MODE must be set to staging or production in production environment");
49
52
  return { IS_DEV: o, IS_STAG: c, IS_PROD: a };
50
53
  }
51
54
  export {
52
- S as mapEnvironment,
55
+ g as escapeRegExp,
56
+ T as mapEnvironment,
53
57
  d as regexSearchMapper,
54
- g as removeAccent,
55
- w as uniqueArray
58
+ w as removeAccent,
59
+ S as uniqueArray
56
60
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common.util.cjs");exports.mapEnvironment=e.mapEnvironment;exports.regexSearchMapper=e.regexSearchMapper;exports.removeAccent=e.removeAccent;exports.uniqueArray=e.uniqueArray;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common.util.cjs");exports.escapeRegExp=e.escapeRegExp;exports.mapEnvironment=e.mapEnvironment;exports.regexSearchMapper=e.regexSearchMapper;exports.removeAccent=e.removeAccent;exports.uniqueArray=e.uniqueArray;
@@ -1,7 +1,8 @@
1
- import { mapEnvironment as n, regexSearchMapper as a, removeAccent as m, uniqueArray as o } from "./common.util.js";
1
+ import { escapeRegExp as p, mapEnvironment as a, regexSearchMapper as n, removeAccent as c, uniqueArray as m } from "./common.util.js";
2
2
  export {
3
- n as mapEnvironment,
4
- a as regexSearchMapper,
5
- m as removeAccent,
6
- o as uniqueArray
3
+ p as escapeRegExp,
4
+ a as mapEnvironment,
5
+ n as regexSearchMapper,
6
+ c as removeAccent,
7
+ m as uniqueArray
7
8
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./common/common.util.cjs"),e=require("./object/object.util.cjs"),a=require("./serializer/serializer.util.cjs"),r=require("./string/string.util.cjs"),i=require("./validate/validate.util.cjs");exports.mapEnvironment=t.mapEnvironment;exports.regexSearchMapper=t.regexSearchMapper;exports.removeAccent=t.removeAccent;exports.uniqueArray=t.uniqueArray;exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.getNestedValue=e.getNestedValue;exports.isJSON=e.isJSON;exports.normalizeMongoFilter=e.normalizeMongoFilter;exports.setNestedValue=e.setNestedValue;exports.serializer=a.serializer;exports.generateRandomPassword=r.generateRandomPassword;exports.generateShortId=r.generateShortId;exports.generateSlug=r.generateSlug;exports.getFileName=r.getFileName;exports.substringBetween=r.substringBetween;exports.validate=i.validate;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./object/object.util.cjs"),r=require("./common/common.util.cjs"),t=require("./string/string.util.cjs"),a=require("./serializer/serializer.util.cjs"),i=require("./validate/validate.util.cjs");exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.getNestedValue=e.getNestedValue;exports.isJSON=e.isJSON;exports.normalizeMongoFilter=e.normalizeMongoFilter;exports.setNestedValue=e.setNestedValue;exports.escapeRegExp=r.escapeRegExp;exports.mapEnvironment=r.mapEnvironment;exports.regexSearchMapper=r.regexSearchMapper;exports.removeAccent=r.removeAccent;exports.uniqueArray=r.uniqueArray;exports.generateRandomPassword=t.generateRandomPassword;exports.generateShortId=t.generateShortId;exports.generateSlug=t.generateSlug;exports.getFileName=t.getFileName;exports.substringBetween=t.substringBetween;exports.serializer=a.serializer;exports.validate=i.validate;
@@ -1,24 +1,25 @@
1
- import { mapEnvironment as t, regexSearchMapper as o, removeAccent as a, uniqueArray as n } from "./common/common.util.js";
2
- import { deepClone as g, deepMerge as i, getNestedValue as p, isJSON as l, normalizeMongoFilter as s, setNestedValue as d } from "./object/object.util.js";
3
- import { serializer as x } from "./serializer/serializer.util.js";
4
- import { generateRandomPassword as N, generateShortId as S, generateSlug as c, getFileName as v, substringBetween as M } from "./string/string.util.js";
5
- import { validate as w } from "./validate/validate.util.js";
1
+ import { deepClone as t, deepMerge as o, getNestedValue as a, isJSON as n, normalizeMongoFilter as p, setNestedValue as g } from "./object/object.util.js";
2
+ import { escapeRegExp as i, mapEnvironment as s, regexSearchMapper as l, removeAccent as d, uniqueArray as x } from "./common/common.util.js";
3
+ import { generateRandomPassword as f, generateShortId as c, generateSlug as N, getFileName as S, substringBetween as v } from "./string/string.util.js";
4
+ import { serializer as h } from "./serializer/serializer.util.js";
5
+ import { validate as z } from "./validate/validate.util.js";
6
6
  export {
7
- g as deepClone,
8
- i as deepMerge,
9
- N as generateRandomPassword,
10
- S as generateShortId,
11
- c as generateSlug,
12
- v as getFileName,
13
- p as getNestedValue,
14
- l as isJSON,
15
- t as mapEnvironment,
16
- s as normalizeMongoFilter,
17
- o as regexSearchMapper,
18
- a as removeAccent,
19
- x as serializer,
20
- d as setNestedValue,
21
- M as substringBetween,
22
- n as uniqueArray,
23
- w as validate
7
+ t as deepClone,
8
+ o as deepMerge,
9
+ i as escapeRegExp,
10
+ f as generateRandomPassword,
11
+ c as generateShortId,
12
+ N as generateSlug,
13
+ S as getFileName,
14
+ a as getNestedValue,
15
+ n as isJSON,
16
+ s as mapEnvironment,
17
+ p as normalizeMongoFilter,
18
+ l as regexSearchMapper,
19
+ d as removeAccent,
20
+ h as serializer,
21
+ g as setNestedValue,
22
+ v as substringBetween,
23
+ x as uniqueArray,
24
+ z as validate
24
25
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var m=Object.defineProperty,A=Object.defineProperties,v=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,y=(e,r,n)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,p=(e,r)=>{for(var n in r||(r={}))h.call(r,n)&&y(e,n,r[n]);if(u)for(var n of u(r))w.call(r,n)&&y(e,n,r[n]);return e},O=(e,r)=>A(e,v(r));function P(e){try{return JSON.parse(e),!0}catch(r){return!1}}function _(e,r){let n=e;const o=r.length;for(let t=0;t<o;t++){const s=r[t];if(s!==void 0&&n&&typeof n=="object"&&s in n)n=n[s];else return}return n}function d(e,r,n){if(r.length===0)return e;const[o,...t]=r;if(t.length===0)return O(p({},e),{[o]:n});const s=e[o];return O(p({},e),{[o]:d(typeof s=="object"&&s!==null?s:{},t,n)})}function f(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(o=>f(o));if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);const r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)return e;const n={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=f(e[o]));return n}function g(...e){if(e.length===0)return{};const r=e.filter(t=>t!=null);if(r.length===0)return{};if(r.length===1)return r[0];if(r.every(Array.isArray))return[].concat(...r);if(r.every(t=>typeof t=="object"&&t!==null&&!Array.isArray(t))){const t={};for(const s of r){const i=s;for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)){const l=i[a];if(Object.prototype.hasOwnProperty.call(t,a)){const c=t[a];typeof l=="object"&&l!==null&&typeof c=="object"&&c!==null?Array.isArray(l)&&Array.isArray(c)?t[a]=c.concat(l):!Array.isArray(l)&&!Array.isArray(c)?t[a]=g(c,l):t[a]=l:t[a]=l}else t[a]=l}}return t}if(r.every(t=>typeof t!="object"||t===null))throw new Error("deepMerge: Cannot merge primitive values. All arguments must be objects or arrays.");const n=r.some(Array.isArray),o=r.some(t=>typeof t=="object"&&t!==null&&!Array.isArray(t));throw n&&o?new Error("deepMerge: Cannot mix arrays and objects. All arguments must be either arrays or objects."):new Error("deepMerge: Invalid arguments provided. All arguments must be objects or arrays of the same type.")}function b(e){if(!e||typeof e!="object")return e;const r={};function n(o,t){for(const s in o){if(!Object.prototype.hasOwnProperty.call(o,s))continue;const i=o[s],a=t?`${t}.${s}`:s;if(i&&typeof i=="object"&&!Array.isArray(i)){let l=!1;for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)&&c.startsWith("$")){l=!0;break}l?r[a]=i:n(i,a)}else r[a]=i}}return n(e,""),r}exports.deepClone=f;exports.deepMerge=g;exports.getNestedValue=_;exports.isJSON=P;exports.normalizeMongoFilter=b;exports.setNestedValue=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var m=Object.defineProperty,A=Object.defineProperties,v=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,y=(e,r,n)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,p=(e,r)=>{for(var n in r||(r={}))w.call(r,n)&&y(e,n,r[n]);if(f)for(var n of f(r))h.call(r,n)&&y(e,n,r[n]);return e},O=(e,r)=>A(e,v(r));function P(e){try{return JSON.parse(e),!0}catch(r){return!1}}function _(e,r){let n=e;const o=r.length;for(let t=0;t<o;t++){const s=r[t];if(s!==void 0&&n&&typeof n=="object"&&s in n)n=n[s];else return}return n}function g(e,r,n,o){if(o>=r.length)return e;const t=r[o];if(o===r.length-1)return O(p({},e),{[t]:n});const s=e[t];return O(p({},e),{[t]:g(typeof s=="object"&&s!==null?s:{},r,n,o+1)})}function b(e,r,n){return r.length===0?e:g(e,r,n,0)}function u(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(o=>u(o));if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);const r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)return e;const n={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=u(e[o]));return n}function d(...e){if(e.length===0)return{};const r=e.filter(t=>t!=null);if(r.length===0)return{};if(r.length===1)return r[0];if(r.every(Array.isArray))return[].concat(...r);if(r.every(t=>typeof t=="object"&&t!==null&&!Array.isArray(t))){const t={};for(const s of r){const l=s;for(const a in l)if(Object.prototype.hasOwnProperty.call(l,a)){const i=l[a];if(Object.prototype.hasOwnProperty.call(t,a)){const c=t[a];typeof i=="object"&&i!==null&&typeof c=="object"&&c!==null?Array.isArray(i)&&Array.isArray(c)?t[a]=c.concat(i):!Array.isArray(i)&&!Array.isArray(c)?t[a]=d(c,i):t[a]=i:t[a]=i}else t[a]=i}}return t}if(r.every(t=>typeof t!="object"||t===null))throw new Error("deepMerge: Cannot merge primitive values. All arguments must be objects or arrays.");const n=r.some(Array.isArray),o=r.some(t=>typeof t=="object"&&t!==null&&!Array.isArray(t));throw n&&o?new Error("deepMerge: Cannot mix arrays and objects. All arguments must be either arrays or objects."):new Error("deepMerge: Invalid arguments provided. All arguments must be objects or arrays of the same type.")}function j(e){if(!e||typeof e!="object")return e;const r={};function n(o,t){for(const s in o){if(!Object.prototype.hasOwnProperty.call(o,s))continue;const l=o[s],a=t?`${t}.${s}`:s;if(l&&typeof l=="object"&&!Array.isArray(l)){let i=!1;for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c)&&c.startsWith("$")){i=!0;break}i?r[a]=l:n(l,a)}else r[a]=l}}return n(e,""),r}exports.deepClone=u;exports.deepMerge=d;exports.getNestedValue=_;exports.isJSON=P;exports.normalizeMongoFilter=j;exports.setNestedValue=b;