@bwg-ui/core 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{common-components-CnAjT_Gi.js → common-components-BiUtYMIt.js} +7287 -5555
- package/dist/chunks/common-components-DyOLtUJx.cjs +183 -0
- package/dist/chunks/{core-MOICJvq5.cjs → core-CF_HWm44.cjs} +1 -1
- package/dist/chunks/{core-C5T-8H8j.js → core-Cb5dF0QU.js} +13 -13
- package/dist/chunks/{enc-base64-8MLFBYmR.cjs → enc-base64-CAxIzedh.cjs} +1 -1
- package/dist/chunks/{enc-base64-Ciw6cw8D.js → enc-base64-Dy-3zKzn.js} +2 -2
- package/dist/chunks/{sha256-CsieizMm.js → sha256-DKma8qua.js} +2 -2
- package/dist/chunks/{sha256-CpH38gS4.cjs → sha256-DbQnwvPn.cjs} +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +8 -8
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.js +5 -1739
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +129 -125
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunks/common-components-Bhr_MU0K.cjs +0 -183
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/index.cjs"),t=require("./stores/index.cjs"),o=require("./chunks/common-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/index.cjs"),t=require("./stores/index.cjs"),o=require("./chunks/common-components-DyOLtUJx.cjs"),r=require("./components/core/index.cjs"),s=require("./components/layout/index.cjs"),i=require("./provider/index.cjs");exports.ApiError=e.ApiError;exports.THEME_COOKIE_NAME=e.THEME_COOKIE_NAME;exports.apiDelete=e.apiDelete;exports.apiGet=e.apiGet;exports.apiPatch=e.apiPatch;exports.apiPost=e.apiPost;exports.apiPut=e.apiPut;exports.apiUtils=e.apiUtils;exports.arrAverage=e.arrAverage;exports.arrCount=e.arrCount;exports.arrMax=e.arrMax;exports.arrMin=e.arrMin;exports.arrReverse=e.arrReverse;exports.arrSum=e.arrSum;exports.arrUnique=e.arrUnique;exports.bwgUtils=e.bwgUtils;exports.callService=e.callService;exports.callService_SYSCD=e.callService_SYSCD;exports.clamp=e.clamp;exports.clearSessionStorage=e.clearSessionStorage;exports.closeAllMessages=e.closeAllMessages;exports.closeMessage=e.closeMessage;exports.closeNotification=e.closeNotification;exports.commonUtils=e.commonUtils;exports.configureEnvUtils=e.configureEnvUtils;exports.copyToClipboard=e.copyToClipboard;exports.debounce=e.debounce;exports.deleteCookie=e.deleteCookie;exports.destroyNotifications=e.destroyNotifications;exports.downloadByFileKey=e.downloadByFileKey;exports.downloadFile=e.downloadFile;exports.duplicates=e.duplicates;exports.encryptSha256=e.encryptSha256;exports.envUtils=e.envUtils;exports.fileUtils=e.fileUtils;exports.generateRandomColor=e.generateRandomColor;exports.generateRandomString=e.generateRandomString;exports.generateUID=e.generateUID;exports.getAllServiceCodes=e.getAllServiceCodes;exports.getClientIp=e.getClientIp;exports.getCookie=e.getCookie;exports.getCrprCd=e.getCrprCd;exports.getCurrentDate=e.getCurrentDate;exports.getCurrentDateString=e.getCurrentDateString;exports.getDepartmentInfo=e.getDepartmentInfo;exports.getDeviceType=e.getDeviceType;exports.getDisplayName=e.getDisplayName;exports.getDprtCd=e.getDprtCd;exports.getDprtNm=e.getDprtNm;exports.getEmplNo=e.getEmplNo;exports.getEnvCode=e.getEnvCode;exports.getPermissionService=e.getPermissionService;exports.getRoleList=e.getRoleList;exports.getServiceCode=e.getServiceCode;exports.getSessionStorage=e.getSessionStorage;exports.getUserDvsn=e.getUserDvsn;exports.getUserId=e.getUserId;exports.getUserInfo=e.getUserInfo;exports.getUserNm=e.getUserNm;exports.hasAllRoles=e.hasAllRoles;exports.hasAnyRole=e.hasAnyRole;exports.hasRole=e.hasRole;exports.hasUserInfo=e.hasUserInfo;exports.isArray=e.isArray;exports.isBoolean=e.isBoolean;exports.isDesktop=e.isDesktop;exports.isDev=e.isDev;exports.isEmpty=e.isEmpty;exports.isEmptyArray=e.isEmptyArray;exports.isFunction=e.isFunction;exports.isLocal=e.isLocal;exports.isLoggedIn=e.isLoggedIn;exports.isMobile=e.isMobile;exports.isNull=e.isNull;exports.isNullOrUndefined=e.isNullOrUndefined;exports.isNumber=e.isNumber;exports.isObject=e.isObject;exports.isProd=e.isProd;exports.isSafeEmpty=e.isSafeEmpty;exports.isString=e.isString;exports.isTablet=e.isTablet;exports.isUndefined=e.isUndefined;exports.isValidEmail=e.isValidEmail;exports.isValidUrl=e.isValidUrl;exports.logServiceCodeConfig=e.logServiceCodeConfig;exports.messageUtils=e.messageUtils;exports.notiBwgError=e.notiBwgError;exports.notiError=e.notiError;exports.notiInfo=e.notiInfo;exports.notiSuccess=e.notiSuccess;exports.notiWarning=e.notiWarning;exports.notificationService=e.notificationService;exports.notificationUtils=e.notificationUtils;exports.padLeft=e.padLeft;exports.padRight=e.padRight;exports.random=e.random;exports.realFormat=e.realFormat;exports.removeSessionStorage=e.removeSessionStorage;exports.round=e.round;exports.serviceUtils=e.serviceUtils;exports.setClientIp=e.setClientIp;exports.setCookie=e.setCookie;exports.setServiceCodeOverrides=e.setServiceCodeOverrides;exports.setSessionStorage=e.setSessionStorage;exports.showApiError=e.showApiError;exports.showDuplicateError=e.showDuplicateError;exports.showError=e.showError;exports.showInfo=e.showInfo;exports.showLoading=e.showLoading;exports.showRequiredError=e.showRequiredError;exports.showSaveError=e.showSaveError;exports.showSaveSuccess=e.showSaveSuccess;exports.showSuccess=e.showSuccess;exports.showWarning=e.showWarning;exports.throttle=e.throttle;exports.toCamelCase=e.toCamelCase;exports.userUtils=e.userUtils;exports.verifyClientIp=e.verifyClientIp;exports.useCode=t.useCode;exports.useCodeStore=t.useCodeStore;exports.useColorStore=t.useColorStore;exports.useFavorite=t.useFavorite;exports.useFavoriteStore=t.useFavoriteStore;exports.useLoadingStore=t.useLoadingStore;exports.useMenuModel=t.useMenuModel;exports.useMenuModelStore=t.useMenuModelStore;exports.useMenuView=t.useMenuView;exports.useMenuViewStore=t.useMenuViewStore;exports.useOptionStore=t.useOptionStore;exports.usePopupLoadingStore=t.usePopupLoadingStore;exports.usePopupState=t.usePopupState;exports.usePopupStore=t.usePopupStore;exports.useUser=t.useUser;exports.useUserStore=t.useUserStore;exports.BwgButtonGroup=o.BwgButtonGroup;exports.BwgCmptArea=o.BwgCmptArea;exports.BwgCol=o.BwgCol;exports.BwgConfigProvider=o.BwgConfigProvider;exports.BwgDetail=o.BwgDetail;exports.BwgDrawer=o.BwgDrawer;exports.BwgEditor=o.BwgEditor;exports.BwgGrid=o.BwgGrid;exports.BwgInfoArea=o.BwgInfoArea;exports.BwgPagination=o.BwgPagination;exports.BwgPopup=o.BwgPopup;exports.BwgRow=o.BwgRow;exports.BwgSpace=o.BwgSpace;exports.BwgTable=o.BwgTable;exports.BwgTabs=o.BwgTabs;exports.BwgTitleBox=o.BwgTitleBox;exports.BwgView=o.BwgView;exports.ContentBox=o.ContentBox;exports.ContentLayOut=o.ContentLayOut;exports.GlobalConfigProvider=o.GlobalConfigProvider;exports.QuickServiceToggle=o.QuickServiceToggle;exports.SSOHandler=o.SSOHandler;exports.SearchBox=o.SearchBox;exports.SearchDepartmentP01=o.SearchDepartmentP01;exports.SearchDepartmentP02=o.SearchDepartmentP02;exports.SearchOrganizationP01=o.SearchOrganizationP01;exports.SearchOrganizationP02=o.SearchOrganizationP02;exports.createBwgGridRenderer=o.createBwgGridRenderer;exports.BwgButton=r.BwgButton;exports.BwgCheck=r.BwgCheck;exports.BwgCheckList=r.BwgCheckList;exports.BwgDatePicker=r.BwgDatePicker;exports.BwgDownload=r.BwgDownload;exports.BwgForm=r.BwgForm;exports.BwgFormItem=r.BwgFormItem;exports.BwgInput=r.BwgInput;exports.BwgLargeUploader=r.BwgLargeUploader;exports.BwgMaskedInput=r.BwgMaskedInput;exports.BwgMaskedPicker=r.BwgMaskedPicker;exports.BwgMultiSelect=r.BwgMultiSelect;exports.BwgNumber=r.BwgNumber;exports.BwgRadio=r.BwgRadio;exports.BwgRangePicker=r.BwgRangePicker;exports.BwgSearch=r.BwgSearch;exports.BwgSelect=r.BwgSelect;exports.BwgSwitch=r.BwgSwitch;exports.BwgTextArea=r.BwgTextArea;exports.BwgUploader=r.BwgUploader;exports.AppWrapper=s.AppWrapper;exports.BwgPortal01=s.BwgPortal01;exports.BwgPortal02=s.BwgPortal02;exports.ConfigurableContent=s.ConfigurableContent;exports.ConfigurableHeader=s.ConfigurableHeader;exports.ConfigurableMenuTab=s.ConfigurableMenuTab;exports.ConfigurableSidebar=s.ConfigurableSidebar;exports.ContentContainer=s.ContentContainer;exports.LandingContainer=s.LandingContainer;exports.LoadingContainer=s.LoadingContainer;exports.PopupContainer=s.PopupContainer;exports.ProtectWrapper=s.ProtectWrapper;exports.AuthProvider=i.AuthProvider;exports.CommonCodeProvider=i.CommonCodeProvider;exports.ScreenProtectProvider=i.ScreenProtectProvider;exports.SearchBoxProvider=i.SearchBoxProvider;exports.ServiceCodeProvider=i.ServiceCodeProvider;exports.useAllServiceCodes=i.useAllServiceCodes;exports.useAuth=i.useAuth;exports.useCodeColor=i.useCodeColor;exports.useCodeList=i.useCodeList;exports.useCodeListByOption=i.useCodeListByOption;exports.useCodeName=i.useCodeName;exports.useCommonCode=i.useCommonCode;exports.useGridLookup=i.useGridLookup;exports.useLock=i.useLock;exports.useLogServiceCodeConfig=i.useLogServiceCodeConfig;exports.usePopup=i.usePopup;exports.useSearchBox=i.useSearchBox;exports.useServiceCode=i.useServiceCode;exports.useServiceCodeValue=i.useServiceCodeValue;
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC;AAGpC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,SAAS,CAAC;AAGxB,cAAc,UAAU,CAAC;AAGzB,cAAc,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,73 +1,77 @@
|
|
|
1
|
-
import { ApiError as r, THEME_COOKIE_NAME as
|
|
2
|
-
import { useCode as
|
|
3
|
-
import {
|
|
4
|
-
import { BwgButton as
|
|
5
|
-
import { AppWrapper as
|
|
6
|
-
import { AuthProvider as
|
|
1
|
+
import { ApiError as r, THEME_COOKIE_NAME as t, apiDelete as i, apiGet as s, apiPatch as a, apiPost as n, apiPut as g, apiUtils as l, arrAverage as u, arrCount as d, arrMax as c, arrMin as p, arrReverse as S, arrSum as w, arrUnique as C, bwgUtils as B, callService as m, callService_SYSCD as v, clamp as f, clearSessionStorage as h, closeAllMessages as P, closeMessage as U, closeNotification as D, commonUtils as E, configureEnvUtils as b, copyToClipboard as y, debounce as A, deleteCookie as L, destroyNotifications as M, downloadByFileKey as I, downloadFile as k, duplicates as x, encryptSha256 as R, envUtils as N, fileUtils as O, generateRandomColor as T, generateRandomString as F, generateUID as G, getAllServiceCodes as V, getClientIp as W, getCookie as q, getCrprCd as z, getCurrentDate as H, getCurrentDateString as _, getDepartmentInfo as j, getDeviceType as K, getDisplayName as Q, getDprtCd as Y, getDprtNm as J, getEmplNo as X, getEnvCode as Z, getPermissionService as $, getRoleList as ee, getServiceCode as oe, getSessionStorage as re, getUserDvsn as te, getUserId as ie, getUserInfo as se, getUserNm as ae, hasAllRoles as ne, hasAnyRole as ge, hasRole as le, hasUserInfo as ue, isArray as de, isBoolean as ce, isDesktop as pe, isDev as Se, isEmpty as we, isEmptyArray as Ce, isFunction as Be, isLocal as me, isLoggedIn as ve, isMobile as fe, isNull as he, isNullOrUndefined as Pe, isNumber as Ue, isObject as De, isProd as Ee, isSafeEmpty as be, isString as ye, isTablet as Ae, isUndefined as Le, isValidEmail as Me, isValidUrl as Ie, logServiceCodeConfig as ke, messageUtils as xe, notiBwgError as Re, notiError as Ne, notiInfo as Oe, notiSuccess as Te, notiWarning as Fe, notificationService as Ge, notificationUtils as Ve, padLeft as We, padRight as qe, random as ze, realFormat as He, removeSessionStorage as _e, round as je, serviceUtils as Ke, setClientIp as Qe, setCookie as Ye, setServiceCodeOverrides as Je, setSessionStorage as Xe, showApiError as Ze, showDuplicateError as $e, showError as eo, showInfo as oo, showLoading as ro, showRequiredError as to, showSaveError as io, showSaveSuccess as so, showSuccess as ao, showWarning as no, throttle as go, toCamelCase as lo, userUtils as uo, verifyClientIp as co } from "./utils/index.js";
|
|
2
|
+
import { useCode as So, useCodeStore as wo, useColorStore as Co, useFavorite as Bo, useFavoriteStore as mo, useLoadingStore as vo, useMenuModel as fo, useMenuModelStore as ho, useMenuView as Po, useMenuViewStore as Uo, useOptionStore as Do, usePopupLoadingStore as Eo, usePopupState as bo, usePopupStore as yo, useUser as Ao, useUserStore as Lo } from "./stores/index.js";
|
|
3
|
+
import { d as Io, e as ko, f as xo, B as Ro, h as No, i as Oo, j as To, k as Fo, l as Go, m as Vo, n as Wo, o as qo, a as zo, p as Ho, q as _o, r as jo, s as Ko, C as Qo, t as Yo, G as Jo, Q as Xo, u as Zo, S as $o, w as er, x as or, y as rr, z as tr, v as ir } from "./chunks/common-components-BiUtYMIt.js";
|
|
4
|
+
import { BwgButton as ar, BwgCheck as nr, BwgCheckList as gr, BwgDatePicker as lr, BwgDownload as ur, BwgForm as dr, BwgFormItem as cr, BwgInput as pr, BwgLargeUploader as Sr, BwgMaskedInput as wr, BwgMaskedPicker as Cr, BwgMultiSelect as Br, BwgNumber as mr, BwgRadio as vr, BwgRangePicker as fr, BwgSearch as hr, BwgSelect as Pr, BwgSwitch as Ur, BwgTextArea as Dr, BwgUploader as Er } from "./components/core/index.js";
|
|
5
|
+
import { AppWrapper as yr, BwgPortal01 as Ar, BwgPortal02 as Lr, ConfigurableContent as Mr, ConfigurableHeader as Ir, ConfigurableMenuTab as kr, ConfigurableSidebar as xr, ContentContainer as Rr, LandingContainer as Nr, LoadingContainer as Or, PopupContainer as Tr, ProtectWrapper as Fr } from "./components/layout/index.js";
|
|
6
|
+
import { AuthProvider as Vr, CommonCodeProvider as Wr, ScreenProtectProvider as qr, SearchBoxProvider as zr, ServiceCodeProvider as Hr, useAllServiceCodes as _r, useAuth as jr, useCodeColor as Kr, useCodeList as Qr, useCodeListByOption as Yr, useCodeName as Jr, useCommonCode as Xr, useGridLookup as Zr, useLock as $r, useLogServiceCodeConfig as et, usePopup as ot, useSearchBox as rt, useServiceCode as tt, useServiceCodeValue as it } from "./provider/index.js";
|
|
7
7
|
export {
|
|
8
8
|
r as ApiError,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
yr as AppWrapper,
|
|
10
|
+
Vr as AuthProvider,
|
|
11
|
+
ar as BwgButton,
|
|
12
12
|
Io as BwgButtonGroup,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
nr as BwgCheck,
|
|
14
|
+
gr as BwgCheckList,
|
|
15
15
|
ko as BwgCmptArea,
|
|
16
16
|
xo as BwgCol,
|
|
17
17
|
Ro as BwgConfigProvider,
|
|
18
|
-
|
|
18
|
+
lr as BwgDatePicker,
|
|
19
19
|
No as BwgDetail,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
ur as BwgDownload,
|
|
21
|
+
Oo as BwgDrawer,
|
|
22
|
+
To as BwgEditor,
|
|
23
|
+
dr as BwgForm,
|
|
24
|
+
cr as BwgFormItem,
|
|
25
25
|
Fo as BwgGrid,
|
|
26
26
|
Go as BwgInfoArea,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
pr as BwgInput,
|
|
28
|
+
Sr as BwgLargeUploader,
|
|
29
|
+
wr as BwgMaskedInput,
|
|
30
|
+
Cr as BwgMaskedPicker,
|
|
31
|
+
Br as BwgMultiSelect,
|
|
32
|
+
mr as BwgNumber,
|
|
33
33
|
Vo as BwgPagination,
|
|
34
34
|
Wo as BwgPopup,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
Ar as BwgPortal01,
|
|
36
|
+
Lr as BwgPortal02,
|
|
37
|
+
vr as BwgRadio,
|
|
38
|
+
fr as BwgRangePicker,
|
|
39
39
|
qo as BwgRow,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
40
|
+
hr as BwgSearch,
|
|
41
|
+
Pr as BwgSelect,
|
|
42
|
+
zo as BwgSpace,
|
|
43
|
+
Ur as BwgSwitch,
|
|
44
|
+
Ho as BwgTable,
|
|
45
|
+
_o as BwgTabs,
|
|
46
|
+
Dr as BwgTextArea,
|
|
47
|
+
jo as BwgTitleBox,
|
|
48
|
+
Er as BwgUploader,
|
|
49
|
+
Ko as BwgView,
|
|
50
|
+
Wr as CommonCodeProvider,
|
|
51
|
+
Mr as ConfigurableContent,
|
|
52
|
+
Ir as ConfigurableHeader,
|
|
53
|
+
kr as ConfigurableMenuTab,
|
|
54
|
+
xr as ConfigurableSidebar,
|
|
55
|
+
Qo as ContentBox,
|
|
56
|
+
Rr as ContentContainer,
|
|
57
|
+
Yo as ContentLayOut,
|
|
58
58
|
Jo as GlobalConfigProvider,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
Nr as LandingContainer,
|
|
60
|
+
Or as LoadingContainer,
|
|
61
|
+
Tr as PopupContainer,
|
|
62
|
+
Fr as ProtectWrapper,
|
|
63
63
|
Xo as QuickServiceToggle,
|
|
64
64
|
Zo as SSOHandler,
|
|
65
|
-
|
|
65
|
+
qr as ScreenProtectProvider,
|
|
66
66
|
$o as SearchBox,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
zr as SearchBoxProvider,
|
|
68
|
+
er as SearchDepartmentP01,
|
|
69
|
+
or as SearchDepartmentP02,
|
|
70
|
+
rr as SearchOrganizationP01,
|
|
71
|
+
tr as SearchOrganizationP02,
|
|
72
|
+
Hr as ServiceCodeProvider,
|
|
73
|
+
t as THEME_COOKIE_NAME,
|
|
74
|
+
i as apiDelete,
|
|
71
75
|
s as apiGet,
|
|
72
76
|
a as apiPatch,
|
|
73
77
|
n as apiPost,
|
|
@@ -75,11 +79,11 @@ export {
|
|
|
75
79
|
l as apiUtils,
|
|
76
80
|
u as arrAverage,
|
|
77
81
|
d as arrCount,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
c as arrMax,
|
|
83
|
+
p as arrMin,
|
|
84
|
+
S as arrReverse,
|
|
85
|
+
w as arrSum,
|
|
86
|
+
C as arrUnique,
|
|
83
87
|
B as bwgUtils,
|
|
84
88
|
m as callService,
|
|
85
89
|
v as callService_SYSCD,
|
|
@@ -87,33 +91,33 @@ export {
|
|
|
87
91
|
h as clearSessionStorage,
|
|
88
92
|
P as closeAllMessages,
|
|
89
93
|
U as closeMessage,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
D as closeNotification,
|
|
95
|
+
E as commonUtils,
|
|
96
|
+
b as configureEnvUtils,
|
|
97
|
+
y as copyToClipboard,
|
|
98
|
+
ir as createBwgGridRenderer,
|
|
99
|
+
A as debounce,
|
|
100
|
+
L as deleteCookie,
|
|
101
|
+
M as destroyNotifications,
|
|
98
102
|
I as downloadByFileKey,
|
|
99
103
|
k as downloadFile,
|
|
100
104
|
x as duplicates,
|
|
101
105
|
R as encryptSha256,
|
|
102
106
|
N as envUtils,
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
O as fileUtils,
|
|
108
|
+
T as generateRandomColor,
|
|
105
109
|
F as generateRandomString,
|
|
106
110
|
G as generateUID,
|
|
107
111
|
V as getAllServiceCodes,
|
|
108
112
|
W as getClientIp,
|
|
109
113
|
q as getCookie,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
z as getCrprCd,
|
|
115
|
+
H as getCurrentDate,
|
|
116
|
+
_ as getCurrentDateString,
|
|
117
|
+
j as getDepartmentInfo,
|
|
118
|
+
K as getDeviceType,
|
|
119
|
+
Q as getDisplayName,
|
|
120
|
+
Y as getDprtCd,
|
|
117
121
|
J as getDprtNm,
|
|
118
122
|
X as getEmplNo,
|
|
119
123
|
Z as getEnvCode,
|
|
@@ -121,8 +125,8 @@ export {
|
|
|
121
125
|
ee as getRoleList,
|
|
122
126
|
oe as getServiceCode,
|
|
123
127
|
re as getSessionStorage,
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
te as getUserDvsn,
|
|
129
|
+
ie as getUserId,
|
|
126
130
|
se as getUserInfo,
|
|
127
131
|
ae as getUserNm,
|
|
128
132
|
ne as hasAllRoles,
|
|
@@ -130,11 +134,11 @@ export {
|
|
|
130
134
|
le as hasRole,
|
|
131
135
|
ue as hasUserInfo,
|
|
132
136
|
de as isArray,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
ce as isBoolean,
|
|
138
|
+
pe as isDesktop,
|
|
139
|
+
Se as isDev,
|
|
140
|
+
we as isEmpty,
|
|
141
|
+
Ce as isEmptyArray,
|
|
138
142
|
Be as isFunction,
|
|
139
143
|
me as isLocal,
|
|
140
144
|
ve as isLoggedIn,
|
|
@@ -142,32 +146,32 @@ export {
|
|
|
142
146
|
he as isNull,
|
|
143
147
|
Pe as isNullOrUndefined,
|
|
144
148
|
Ue as isNumber,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
De as isObject,
|
|
150
|
+
Ee as isProd,
|
|
151
|
+
be as isSafeEmpty,
|
|
152
|
+
ye as isString,
|
|
153
|
+
Ae as isTablet,
|
|
154
|
+
Le as isUndefined,
|
|
155
|
+
Me as isValidEmail,
|
|
152
156
|
Ie as isValidUrl,
|
|
153
157
|
ke as logServiceCodeConfig,
|
|
154
158
|
xe as messageUtils,
|
|
155
159
|
Re as notiBwgError,
|
|
156
160
|
Ne as notiError,
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
Oe as notiInfo,
|
|
162
|
+
Te as notiSuccess,
|
|
159
163
|
Fe as notiWarning,
|
|
160
164
|
Ge as notificationService,
|
|
161
165
|
Ve as notificationUtils,
|
|
162
166
|
We as padLeft,
|
|
163
167
|
qe as padRight,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
ze as random,
|
|
169
|
+
He as realFormat,
|
|
170
|
+
_e as removeSessionStorage,
|
|
171
|
+
je as round,
|
|
172
|
+
Ke as serviceUtils,
|
|
173
|
+
Qe as setClientIp,
|
|
174
|
+
Ye as setCookie,
|
|
171
175
|
Je as setServiceCodeOverrides,
|
|
172
176
|
Xe as setSessionStorage,
|
|
173
177
|
Ze as showApiError,
|
|
@@ -175,43 +179,43 @@ export {
|
|
|
175
179
|
eo as showError,
|
|
176
180
|
oo as showInfo,
|
|
177
181
|
ro as showLoading,
|
|
178
|
-
|
|
179
|
-
|
|
182
|
+
to as showRequiredError,
|
|
183
|
+
io as showSaveError,
|
|
180
184
|
so as showSaveSuccess,
|
|
181
185
|
ao as showSuccess,
|
|
182
186
|
no as showWarning,
|
|
183
187
|
go as throttle,
|
|
184
188
|
lo as toCamelCase,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
_r as useAllServiceCodes,
|
|
190
|
+
jr as useAuth,
|
|
191
|
+
So as useCode,
|
|
192
|
+
Kr as useCodeColor,
|
|
193
|
+
Qr as useCodeList,
|
|
194
|
+
Yr as useCodeListByOption,
|
|
195
|
+
Jr as useCodeName,
|
|
196
|
+
wo as useCodeStore,
|
|
197
|
+
Co as useColorStore,
|
|
198
|
+
Xr as useCommonCode,
|
|
195
199
|
Bo as useFavorite,
|
|
196
200
|
mo as useFavoriteStore,
|
|
197
|
-
|
|
201
|
+
Zr as useGridLookup,
|
|
198
202
|
vo as useLoadingStore,
|
|
199
|
-
|
|
200
|
-
|
|
203
|
+
$r as useLock,
|
|
204
|
+
et as useLogServiceCodeConfig,
|
|
201
205
|
fo as useMenuModel,
|
|
202
206
|
ho as useMenuModelStore,
|
|
203
207
|
Po as useMenuView,
|
|
204
208
|
Uo as useMenuViewStore,
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
209
|
+
Do as useOptionStore,
|
|
210
|
+
ot as usePopup,
|
|
211
|
+
Eo as usePopupLoadingStore,
|
|
212
|
+
bo as usePopupState,
|
|
213
|
+
yo as usePopupStore,
|
|
214
|
+
rt as useSearchBox,
|
|
215
|
+
tt as useServiceCode,
|
|
216
|
+
it as useServiceCodeValue,
|
|
217
|
+
Ao as useUser,
|
|
218
|
+
Lo as useUserStore,
|
|
215
219
|
uo as userUtils,
|
|
216
|
-
|
|
220
|
+
co as verifyClientIp
|
|
217
221
|
};
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Q=require("axios"),A=require("dayjs"),ee=require("../chunks/common-components-Bhr_MU0K.cjs"),T=require("antd"),C=require("../stores/index.cjs"),pe={AUTH_BTNS:"SCMSIGN00202",AUTH_MENU:"SCMSIGN00201",SRCH_CODE:"SCMSIGN00301",SRCH_POPU:"SCMPOPU00101",AUTH_BMRK:"SCMBMRK00101"};let F={};function ye(e){F=e,console.log("🔧 Provider 서비스코드 오버라이드 설정:",e)}function te(e){return F[e]&&F[e].trim()!==""?F[e]:pe[e]}function re(){const e={};for(const t of Object.keys(pe))e[t]=te(t);return e}function Se(){console.log("🔧 bwg-core 서비스코드 설정:"),console.log("📋 Provider 설정 > 기본값 순서로 확인");const e=re();for(const[t,r]of Object.entries(e)){const o=F[t]?"Provider 설정":"기본값";console.log(` ${t}: ${r} (${o})`)}}const ve=Object.freeze(Object.defineProperty({__proto__:null,getAllServiceCodes:re,getServiceCode:te,logServiceCodeConfig:Se,setServiceCodeOverrides:ye},Symbol.toStringTag,{value:"Module"})),we=()=>C.useUserStore.getState().user?.crprCd||null,oe=()=>C.useUserStore.getState().user?.userId||null,se=()=>C.useUserStore.getState().user?.userNm||null,Ce=()=>C.useUserStore.getState().user?.userDvsn||null,xe=()=>C.useUserStore.getState().user?.emplNo||null,ne=()=>C.useUserStore.getState().user?.dprtCd||null,ae=()=>C.useUserStore.getState().user?.dprtNm||null,j=()=>C.useUserStore.getState().user?.roleList||null,Me=e=>{const t=j();return t?t.includes(e):!1},$e=e=>{const t=j();return t?e.some(r=>t.includes(r)):!1},be=e=>{const t=j();return t?e.every(r=>t.includes(r)):!1},Te=()=>C.useUserStore.getState().isLoggedIn,_=()=>C.useUserStore.getState().user,Ue=()=>_()!==null,ke=()=>{const e=se(),t=oe();return e||t||null},De=()=>{const e=ae(),t=ne();return e||(t?String(t):null)},Ee=Object.freeze(Object.defineProperty({__proto__:null,getCrprCd:we,getDepartmentInfo:De,getDisplayName:ke,getDprtCd:ne,getDprtNm:ae,getEmplNo:xe,getRoleList:j,getUserDvsn:Ce,getUserId:oe,getUserInfo:_,getUserNm:se,hasAllRoles:be,hasAnyRole:$e,hasRole:Me,hasUserInfo:Ue,isLoggedIn:Te},Symbol.toStringTag,{value:"Module"}));var V={exports:{}},ir=V.exports,fe;function cr(){return fe||(fe=1,(function(e,t){(function(r,o){e.exports=o()})(ir,(function(){return function(r,o,a){r=r||{};var m=o.prototype,p={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function x(y,d,l,i){return m.fromToBase(y,d,l,i)}a.en.relativeTime=p,m.fromToBase=function(y,d,l,i,c){for(var n,s,u,f=l.$locale().relativeTime||p,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],S=h.length,w=0;w<S;w+=1){var v=h[w];v.d&&(n=i?a(y).diff(l,v.d,!0):l.diff(y,v.d,!0));var $=(r.rounding||Math.round)(Math.abs(n));if(u=n>0,$<=v.r||!v.r){$<=1&&w>0&&(v=h[w-1]);var b=f[v.l];c&&($=c(""+$)),s=typeof b=="string"?b.replace("%d",$):b($,d,v.l,u);break}}if(d)return s;var U=u?f.future:f.past;return typeof U=="function"?U(s):U.replace("%s",s)},m.to=function(y,d){return x(y,d,this,!0)},m.from=function(y,d){return x(y,d,this)};var g=function(y){return y.$u?a.utc():a()};m.toNow=function(y){return this.to(g(this),y)},m.fromNow=function(y){return this.from(g(this),y)}}}))})(V)),V.exports}var ur=cr();const lr=ee.getDefaultExportFromCjs(ur);var B={exports:{}},dr=B.exports,ge;function mr(){return ge||(ge=1,(function(e,t){(function(r,o){e.exports=o()})(dr,(function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},o={};return function(a,m,p){var x,g=function(i,c,n){n===void 0&&(n={});var s=new Date(i),u=(function(f,h){h===void 0&&(h={});var S=h.timeZoneName||"short",w=f+"|"+S,v=o[w];return v||(v=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:f,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:S}),o[w]=v),v})(c,n);return u.formatToParts(s)},y=function(i,c){for(var n=g(i,c),s=[],u=0;u<n.length;u+=1){var f=n[u],h=f.type,S=f.value,w=r[h];w>=0&&(s[w]=parseInt(S,10))}var v=s[3],$=v===24?0:v,b=s[0]+"-"+s[1]+"-"+s[2]+" "+$+":"+s[4]+":"+s[5]+":000",U=+i;return(p.utc(b).valueOf()-(U-=U%1e3))/6e4},d=m.prototype;d.tz=function(i,c){i===void 0&&(i=x);var n,s=this.utcOffset(),u=this.toDate(),f=u.toLocaleString("en-US",{timeZone:i}),h=Math.round((u-new Date(f))/1e3/60),S=15*-Math.round(u.getTimezoneOffset()/15)-h;if(!Number(S))n=this.utcOffset(0,c);else if(n=p(f,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(S,!0),c){var w=n.utcOffset();n=n.add(s-w,"minute")}return n.$x.$timezone=i,n},d.offsetName=function(i){var c=this.$x.$timezone||p.tz.guess(),n=g(this.valueOf(),c,{timeZoneName:i}).find((function(s){return s.type.toLowerCase()==="timezonename"}));return n&&n.value};var l=d.startOf;d.startOf=function(i,c){if(!this.$x||!this.$x.$timezone)return l.call(this,i,c);var n=p(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,i,c).tz(this.$x.$timezone,!0)},p.tz=function(i,c,n){var s=n&&c,u=n||c||x,f=y(+p(),u);if(typeof i!="string")return p(i).tz(u);var h=(function($,b,U){var N=$-60*b*1e3,I=y(N,U);if(b===I)return[N,b];var X=y(N-=60*(I-b)*1e3,U);return I===X?[N,I]:[$-60*Math.min(I,X)*1e3,Math.max(I,X)]})(p.utc(i,s).valueOf(),f,u),S=h[0],w=h[1],v=p(S).utcOffset(w);return v.$x.$timezone=u,v},p.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},p.tz.setDefault=function(i){x=i}}}))})(B)),B.exports}var fr=mr();const gr=ee.getDefaultExportFromCjs(fr);var q={exports:{}},hr=q.exports,he;function pr(){return he||(he=1,(function(e,t){(function(r,o){e.exports=o()})(hr,(function(){var r="minute",o=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(m,p,x){var g=p.prototype;x.utc=function(s){var u={date:s,utc:!0,args:arguments};return new p(u)},g.utc=function(s){var u=x(this.toDate(),{locale:this.$L,utc:!0});return s?u.add(this.utcOffset(),r):u},g.local=function(){return x(this.toDate(),{locale:this.$L,utc:!1})};var y=g.parse;g.parse=function(s){s.utc&&(this.$u=!0),this.$utils().u(s.$offset)||(this.$offset=s.$offset),y.call(this,s)};var d=g.init;g.init=function(){if(this.$u){var s=this.$d;this.$y=s.getUTCFullYear(),this.$M=s.getUTCMonth(),this.$D=s.getUTCDate(),this.$W=s.getUTCDay(),this.$H=s.getUTCHours(),this.$m=s.getUTCMinutes(),this.$s=s.getUTCSeconds(),this.$ms=s.getUTCMilliseconds()}else d.call(this)};var l=g.utcOffset;g.utcOffset=function(s,u){var f=this.$utils().u;if(f(s))return this.$u?0:f(this.$offset)?l.call(this):this.$offset;if(typeof s=="string"&&(s=(function(v){v===void 0&&(v="");var $=v.match(o);if(!$)return null;var b=(""+$[0]).match(a)||["-",0,0],U=b[0],N=60*+b[1]+ +b[2];return N===0?0:U==="+"?N:-N})(s),s===null))return this;var h=Math.abs(s)<=16?60*s:s;if(h===0)return this.utc(u);var S=this.clone();if(u)return S.$offset=h,S.$u=!1,S;var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(S=this.local().add(h+w,r)).$offset=h,S.$x.$localOffset=w,S};var i=g.format;g.format=function(s){var u=s||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return i.call(this,u)},g.valueOf=function(){var s=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*s},g.isUTC=function(){return!!this.$u},g.toISOString=function(){return this.toDate().toISOString()},g.toString=function(){return this.toDate().toUTCString()};var c=g.toDate;g.toDate=function(s){return s==="s"&&this.$offset?x(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var n=g.diff;g.diff=function(s,u,f){if(s&&this.$u===s.$u)return n.call(this,s,u,f);var h=this.local(),S=x(s).local();return n.call(h,S,u,f)}}}))})(q)),q.exports}var yr=pr();const Sr=ee.getDefaultExportFromCjs(yr),Ne="ui_theme",Oe=e=>typeof e=="string",_e=e=>typeof e=="number"&&!isNaN(e),Ie=e=>typeof e=="boolean",Pe=e=>typeof e=="function",Le=e=>e!==null&&typeof e=="object",Ae=e=>Array.isArray(e),Re=e=>e===null,Fe=e=>e===void 0,Ye=e=>e==null,je=(e,t)=>{let r=0;return(...o)=>{const a=Date.now();a-r>=t&&(r=a,e(...o))}},He=(e,t)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>e(...o),t)}},ze=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Error copying to clipboard:",t),!1}},H=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},Ve=()=>H()==="mobile",Be=()=>H()==="tablet",qe=()=>H()==="desktop",We=()=>"#"+Math.floor(Math.random()*16777215).toString(16),z=e=>!e||e.length===0,Ke=e=>[...new Set(e)],Ge=e=>{if(!z(e))return Math.max(...e)},Ze=e=>{if(!z(e))return Math.min(...e)},Je=e=>{if(!z(e))return e.reduce((t,r)=>t+r,0)/e.length},Xe=e=>e.reduce((t,r)=>t+r,0),Qe=(e,t)=>e.filter(t).length,et=e=>[...e].reverse(),tt=e=>{const t=new Set,r=new Set;return e.forEach(o=>{t.has(o)?r.add(o):t.add(o)}),Array.from(r)},rt=(e,t)=>Math.random()*(t-e)+e,ot=(e,t,r)=>Math.min(Math.max(e,t),r),st=(e,t=0)=>Math.round(e*Math.pow(10,t))/Math.pow(10,t),nt=(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(r){console.error("Error saving to sessionStorage:",r)}},at=(e,t)=>{try{const r=sessionStorage.getItem(e);return r?JSON.parse(r):t||null}catch(r){return console.error("Error reading from sessionStorage:",r),t||null}},it=e=>{try{sessionStorage.removeItem(e)}catch(t){console.error("Error removing from sessionStorage:",t)}},ct=()=>{try{sessionStorage.clear()}catch(e){console.error("Error clearing sessionStorage:",e)}},ut=(e,t,r=30)=>{const o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3),document.cookie=`${e}=${t};expires=${o.toUTCString()};path=/`},lt=e=>{const t=e+"=",r=document.cookie.split(";");for(let o=0;o<r.length;o++){let a=r[o];for(;a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}return null},dt=e=>{document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`},ie=e=>typeof e!="string"?!e:e.trim().length===0,mt=(e,t)=>ie(e)?t:e||"",ft=e=>e.replace(/-([a-z])/g,t=>t[1].toUpperCase()),gt=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),ht=e=>{try{return new URL(e),!0}catch{return!1}},pt=(e,t,r=" ")=>e.padStart(t,r),yt=(e,t,r=" ")=>e.padEnd(t,r),ce=(e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")=>{let r="";for(let o=0;o<e;o++)r+=t.charAt(Math.floor(Math.random()*t.length));return r},vr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),ue=(e=32)=>{const r=vr().replace(/-/g,"");return e>=32?r+ce(e-32,"0123456789abcdef"):r.substring(0,e)};async function St(e){const[{default:t},{default:r}]=await Promise.all([Promise.resolve().then(()=>require("../chunks/sha256-CpH38gS4.cjs")).then(o=>o.sha256),Promise.resolve().then(()=>require("../chunks/enc-base64-8MLFBYmR.cjs")).then(o=>o.encBase64)]);return t(e).toString(r)}A.extend(lr);A.extend(Sr);A.extend(gr);A.locale("ko");const vt=()=>A(),wt=(e="YYYY-MM-DD")=>A().format(e),Ct=Object.freeze(Object.defineProperty({__proto__:null,THEME_COOKIE_NAME:Ne,arrAverage:Je,arrCount:Qe,arrMax:Ge,arrMin:Ze,arrReverse:et,arrSum:Xe,arrUnique:Ke,clamp:ot,clearSessionStorage:ct,copyToClipboard:ze,debounce:He,deleteCookie:dt,duplicates:tt,encryptSha256:St,generateRandomColor:We,generateRandomString:ce,generateUID:ue,getCookie:lt,getCurrentDate:vt,getCurrentDateString:wt,getDeviceType:H,getSessionStorage:at,isArray:Ae,isBoolean:Ie,isDesktop:qe,isEmpty:ie,isEmptyArray:z,isFunction:Pe,isMobile:Ve,isNull:Re,isNullOrUndefined:Ye,isNumber:_e,isObject:Le,isSafeEmpty:mt,isString:Oe,isTablet:Be,isUndefined:Fe,isValidEmail:gt,isValidUrl:ht,padLeft:pt,padRight:yt,random:rt,removeSessionStorage:it,round:st,setCookie:ut,setSessionStorage:nt,throttle:je,toCamelCase:ft},Symbol.toStringTag,{value:"Module"})),L=(()=>{try{if((void 0).DEV)return!0}catch{}return!1})();let xt=[],Mt=[];function $t(e){e.devHosts&&(xt=e.devHosts),e.prodHosts&&(Mt=e.prodHosts)}function bt(){if(typeof window<"u"&&window.location)return window.location.hostname}const le=(()=>{const e=bt();return!!(e&&xt.includes(e))})(),de=(()=>{const e=bt();return!!(e&&Mt.includes(e))})();function Tt(){return L?"X":le?"D":de?"P":"X"}const Ut=Object.freeze(Object.defineProperty({__proto__:null,configureEnvUtils:$t,getEnvCode:Tt,isDev:le,isLocal:L,isProd:de},Symbol.toStringTag,{value:"Module"})),k={duration:4.5,placement:"topRight"};class P{constructor(){}static getInstance(){return P.instance||(P.instance=new P),P.instance}showBwgError(t){const{message:r,description:o,duration:a=k.duration,placement:m=k.placement}=t;T.notification.error({message:`${r}`,description:o||"오류가 발생했습니다. 다시 시도해주세요.",duration:a,placement:m,style:{borderLeft:"4px solid #ff4d4f",backgroundColor:"#fff2f0"}})}showSuccess(t,r,o){T.notification.success({message:`${t}`,description:r,duration:o||k.duration,placement:k.placement})}showInfo(t,r,o){T.notification.info({message:`${t}`,description:r,duration:o||k.duration,placement:k.placement})}showWarning(t,r,o){T.notification.warning({message:`${t}`,description:r,duration:o||k.duration,placement:k.placement})}showError(t,r,o){T.notification.error({message:`${t}`,description:r,duration:o||k.duration,placement:k.placement})}destroy(){T.notification.destroy()}close(t){T.notification.destroy()}}const E=P.getInstance(),K=e=>{E.showBwgError(e)},kt=(e,t,r)=>{E.showSuccess(e,t,r)},G=(e,t,r)=>{E.showInfo(e,t,r)},Z=(e,t,r)=>{E.showWarning(e,t,r)},Dt=(e,t,r)=>{E.showError(e,t,r)},Et=()=>{E.destroy()},Nt=e=>{E.close(e)},Ot=Object.freeze(Object.defineProperty({__proto__:null,closeNotification:Nt,destroyNotifications:Et,notiBwgError:K,notiError:Dt,notiInfo:G,notiSuccess:kt,notiWarning:Z,notificationService:E},Symbol.toStringTag,{value:"Module"}));let D=null;const J=async e=>{if(D===null)if(e===void 0)try{let r=(await Q.get("/api/ip")).data.trim();r=r.replace(/\s+/g,""),D=r}catch(t){console.warn("IP 가져오기 실패:",t),D="unknown"}else D=e},_t=()=>D,It=async()=>(console.log("IP 검증 비활성화됨 (성능 최적화)"),D||"unknown");class M extends Error{constructor(t,r,o,a,m){super(t),this.name="ApiError",this.detailMsg=r,this.response=o,this.msgCd=a,this.errorType=m,Error.captureStackTrace&&Error.captureStackTrace(this,M)}}const W={method:"POST",timeout:3e4,withCredentials:!0,showLoading:!0,isPopup:!1,showError:!0,retryCount:0,retryDelay:1e3},Y=Q.create({timeout:W.timeout,withCredentials:W.withCredentials,headers:{"Content-Type":"application/json; charset=utf-8",Accept:"application/json; charset=utf-8","Apm-Guid":ue()}});Y.interceptors.request.use(e=>{e.showLoading&&!e.isPopup&&C.useLoadingStore.getState().showLoading(),e.showLoading&&e.isPopup&&C.usePopupLoadingStore.getState().showLoading();let t="UNKNOWN";new Date().getTime();try{e.data&&e.data.header?t=e.data.header.trxCd||"UNKNOWN":e.params&&e.params.header&&(t=e.params.header.trxCd||"UNKNOWN")}catch(o){console.warn("trxCd/guid 추출 실패:",o)}e.trxCd=t,e.requestStartTime=Date.now(),console.log(`🚀 API 요청 시작 [거래코드: ${t} / 서비스요청자: ${_()?.userId}]`);const r=localStorage.getItem("accessToken");return r&&(e.headers.Authorization=`Bearer ${r}`),e.headers["Content-Type"]="application/json; charset=UTF-8",e.headers.Accept="application/json; charset=UTF-8",e},e=>(console.error("❌ 요청 인터셉터 에러:",e),Promise.reject(e)));Y.interceptors.response.use(e=>{e.config.showLoading&&!e.config.isPopup&&C.useLoadingStore.getState().hideLoading(),e.config.isPopup&&C.usePopupLoadingStore.getState().hideLoading();let t="UNKNOWN",r="UNKNOWN";const o=new Date().getTime();try{e.config.trxCd&&(t=e.config.trxCd),e.config.guid?r=e.config.guid:e.data&&e.data.header&&e.data.header.trxCd?(t=e.data.header.trxCd,r=e.data.header.guid||"UNKNOWN"):e.config.data&&e.config.data.header?(t=e.config.data.header.trxCd||"UNKNOWN",r=e.config.data.header.guid||"UNKNOWN"):e.config.params&&e.config.params.header&&(t=e.config.params.header.trxCd||"UNKNOWN",r=e.config.params.header.guid||"UNKNOWN")}catch(m){console.warn("trxCd/guid 추출 실패:",m)}let a=0;return e.config.requestStartTime&&(a=o-e.config.requestStartTime),console.log(`✅ API 응답 성공 [거래코드: ${t} / GUID : ${r}] - (소요시간: ${a}ms)`),e},async e=>{if(e.config&&e.config.showLoading&&!e.config.isPopup&&C.useLoadingStore.getState().hideLoading(),e.config&&e.config.isPopup&&C.usePopupLoadingStore.getState().hideLoading(),console.error("❌ API 응답 에러:",e),L&&console.error("🚨 Error Details:",{message:e.message,status:e.response?.status,statusText:e.response?.statusText,data:e.response?.data,config:{url:e.config?.url,method:e.config?.method,baseURL:e.config?.baseURL}}),e.response?.status===401){const t=localStorage.getItem("refreshToken");if(t)try{const r=await Q.post("/auth/refresh",{refreshToken:t});if(r.data.accessToken){localStorage.setItem("accessToken",r.data.accessToken);const o=e.config;if(o)return o.headers.Authorization=`Bearer ${r.data.accessToken}`,Y(o)}}catch{localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/login"}}return Promise.reject(e)});const O=async(e,t,r)=>{try{const o={...W,...r},{activeMenuId:a}=C.useMenuViewStore.getState();if(D===null){const l=Date.now();await J();const i=Date.now();console.log(`[INFO] IP 조회 소요시간: ${i-l}ms`)}const m={method:o.method,url:"/api/service",timeout:o.timeout,withCredentials:o.withCredentials,showLoading:o.showLoading,isPopup:o.isPopup};o.headers&&(m.headers=o.headers);const p=D||"unknown",x=__APP_CD__,g=__SYS_CD__,y={header:{trxCd:e,userInfo:_(),clientIp:p,domainId:"DEFAULT",appCd:x,sysCd:g,screenId:a},data:t};o.method==="GET"?m.params=y||o.params:(m.data=y||o.data,o.params&&(m.params=o.params));let d;for(let l=0;l<=(o.retryCount||0);l++)try{const i=await Y(m);if(i.data.header?.resCd==0){for(const c in i.data)if(c!=="header")return i.data[c];return{}}else{const c=i.data.header,n=c?.msgs?.basicMsg||"요청 처리 중 오류가 발생했습니다.",s=c?.msgs?.detailMsgs||n,u=c?.msgCd,f=c?.msgs?.type;throw new M(n,s,i,u,f)}}catch(i){if(i.isAxiosError&&i.response){const c=i,n=c.response,s=n.data,u=s?.header?.msgs?.basicMsg||c.message||"서버에서 오류가 발생했습니다.",f=s?.header?.msgs?.detailMsgs||(typeof n.data=="string"?n.data:JSON.stringify(n.data))||u,h=s?.header?.msgCd,S=s?.header?.msgs?.type;d=new M(u,f,n,h,S)}else d=i;if(i.isAxiosError&&Lt(i)&&l<(o.retryCount||0)){await At(o.retryDelay||1e3);continue}break}if(d){if(o.showError){const l=d instanceof M?d.message:"요청 처리 중 오류가 발생했습니다.",i=d instanceof M?d.msgCd:"요청 처리 중 오류가 발생했습니다.",c=d instanceof M?d.detailMsg:d.message,n=d instanceof M?d.errorType:"";i?.startsWith("BXM")?K({message:l,description:c,duration:5}):n=="I"?G(l,c,5):Z(l,c,5)}throw d}throw new Error("알 수 없는 API 오류가 발생했습니다.")}catch(o){throw console.error("callService 최종 에러:",o),o}},Pt=async(e,t,r,o)=>{try{const a={...W,...o},{activeMenuId:m}=C.useMenuViewStore.getState();if(D===null){const i=Date.now();await J();const c=Date.now();console.log(`[INFO] IP 조회 소요시간: ${c-i}ms`)}const p={method:a.method,url:"/api/"+e+"/service",timeout:a.timeout,withCredentials:a.withCredentials,showLoading:a.showLoading,isPopup:a.isPopup};a.headers&&(p.headers=a.headers);const x=D||"unknown",g=__APP_CD__,y=__SYS_CD__,d={header:{trxCd:t,userInfo:_(),clientIp:x,domainId:"DEFAULT",appCd:g,sysCd:y,screenId:m},data:r};L&&console.log("__BWG_LOCAL__ 테스트 입니다. ",L),a.method==="GET"?p.params=d||a.params:(p.data=d||a.data,a.params&&(p.params=a.params));let l;for(let i=0;i<=(a.retryCount||0);i++)try{const c=await Y(p);if(c.data.header?.resCd==0){for(const n in c.data)if(n!=="header")return c.data[n];return{}}else{const n=c.data.header,s=n?.msgs?.basicMsg||"요청 처리 중 오류가 발생했습니다.",u=n?.msgs?.detailMsgs||s,f=n?.msgCd,h=n?.msgs?.type;throw new M(s,u,c,f,h)}}catch(c){if(c.isAxiosError&&c.response){const n=c,s=n.response,u=s.data,f=u?.header?.msgs?.basicMsg||n.message||"서버에서 오류가 발생했습니다.",h=u?.header?.msgs?.detailMsgs||(typeof s.data=="string"?s.data:JSON.stringify(s.data))||f,S=u?.header?.msgCd,w=u?.header?.msgs?.type;l=new M(f,h,s,S,w)}else l=c;if(c.isAxiosError&&Lt(c)&&i<(a.retryCount||0)){await At(a.retryDelay||1e3);continue}break}if(l){if(a.showError){const i=l instanceof M?l.message:"요청 처리 중 오류가 발생했습니다.",c=l instanceof M?l.msgCd:"요청 처리 중 오류가 발생했습니다.",n=l instanceof M?l.detailMsg:l.message,s=l instanceof M?l.errorType:"";c?.startsWith("BXM")?K({message:i,description:n,duration:5}):s=="I"?G(i,n,5):Z(i,n,5)}throw l}throw new Error("알 수 없는 API 오류가 발생했습니다.")}catch(a){throw console.error("callService 최종 에러:",a),a}},Lt=e=>!e.response||e.response.status>=500&&e.response.status<600,At=e=>new Promise(t=>setTimeout(t,e)),Rt=(e,t,r)=>O(e,t,{...r,method:"GET"}),Ft=(e,t,r)=>O(e,t,{...r,method:"POST"}),Yt=(e,t,r)=>O(e,t,{...r,method:"PUT"}),jt=(e,t,r)=>O(e,t,{...r,method:"DELETE"}),Ht=(e,t,r)=>O(e,t,{...r,method:"PATCH"}),zt=async(e,t,r)=>{try{const o=await fetch("/api/permissions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e,menuId:t,popupId:r})});if(!o.ok)throw new Error(`권한 확인 실패: ${o.status}`);return await o.json()}catch(o){throw console.error("권한 확인 서비스 오류:",o),o}},Vt=Object.freeze(Object.defineProperty({__proto__:null,ApiError:M,apiDelete:jt,apiGet:Rt,apiPatch:Ht,apiPost:Ft,apiPut:Yt,callService:O,callService_SYSCD:Pt,getClientIp:_t,getPermissionService:zt,setClientIp:J,verifyClientIp:It},Symbol.toStringTag,{value:"Module"})),Bt=(e,t,r="text/plain")=>{const o=new Blob([e],{type:r}),a=URL.createObjectURL(o),m=document.createElement("a");m.href=a,m.download=t,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(a)};async function qt(e){try{return await O("SCMFILE00101",{crprCd:_()?.crprCd,sysCd:__SYS_CD__,fileKey:e}).then(r=>{let o;if(r.sub&&(o=r.sub[0]),console.log(r),console.log(o),!o.lgclFileNm)throw console.error("논리파일명이 없습니다."),new Error("논리 파일명 누락");if(!o.filePath)throw console.error("파일 경로가 없습니다."),new Error("파일 경로 누락");const a=`api/download?filePath=${encodeURIComponent(o.filePath)}&logicalName=${encodeURIComponent(o.lgclFileNm)}`;return window.open(a,"_blank"),{success:!0,message:"파일 다운로드 요청 성공"}})}catch(t){throw console.error("downloadByFileKey 함수 실행 중 오류 발생:",t),t}}const Wt=Object.freeze(Object.defineProperty({__proto__:null,downloadByFileKey:qt,downloadFile:Bt},Symbol.toStringTag,{value:"Module"})),me=(e,t=3)=>{T.message.success({content:e,duration:t})},R=(e,t=5)=>{T.message.error({content:e,duration:t})},Kt=(e,t=4)=>{T.message.warning({content:e,duration:t})},Gt=(e,t=3)=>{T.message.info({content:e,duration:t})},Zt=(e="처리중...")=>T.message.loading({content:e,duration:0}),Jt=e=>{T.message.destroy(e)},Xt=()=>{T.message.destroy()},Qt=(e,t="처리 중 오류가 발생했습니다.")=>{const r=e?.response?.data?.message||e?.message||t;R(r)},er=(e="저장")=>{me(`${e}이 완료되었습니다.`)},tr=(e="저장")=>{R(`${e} 중 오류가 발생했습니다.`)},rr=e=>{R(`이미 사용중인 ${e}입니다.`)},or=e=>{R(`${e}을(를) 입력해주세요.`)},sr=Object.freeze(Object.defineProperty({__proto__:null,closeAllMessages:Xt,closeMessage:Jt,showApiError:Qt,showDuplicateError:rr,showError:R,showInfo:Gt,showLoading:Zt,showRequiredError:or,showSaveError:tr,showSaveSuccess:er,showSuccess:me,showWarning:Kt},Symbol.toStringTag,{value:"Module"})),nr={left:"left",near:"left",right:"right",far:"right",center:"center",number:"#,##0",number2:"#,##0.00",number3:"#,##0.##",number4:"#,##0.000",number5:"#,##0.#####",editNumber:{type:"number",editFormat:"#,##0"},editNumber2:{type:"number",editFormat:"#,##0.00"},editNumber3:{type:"number",editFormat:"#,##0.##"},editNumber4:{type:"number",editFormat:"#,##0.000"},editNumber5:{type:"number",editFormat:"#,##0.###"},editYmd:{type:"date",datetimeFormat:"yyyyMMdd",autoclose:!0,maxDate:"99991231",minDate:"19000101",showButtons:!1,mask:{editMask:"9999-99-99"}},editYm:{type:"btdate",datetimeFormat:"yyyyMM",btOptions:{startView:1,minViewMode:1,todayBtn:"linked",language:"ko",todayHighlight:!0,autoclose:!0,mask:{editMask:"9999-99"}}},editYy:{type:"btdate",datetimeFormat:"yyyy",btOptions:{startView:2,minViewMode:2,todayBtn:"linked",language:"ko",todayHighlight:!0,autoclose:!0}},formatYmd:"([0-9]{4})([0-9]{2})([0-9]{2});$1-$2-$3",formatYm:"([0-9]{4})([0-9]{2});$1-$2",formatYy:"([0-9]{4});$1",lookup:{type:"dropdown",domainOnly:!0},lookupReadOnly:{type:"dropdown",readOnly:!0},maskCard:{type:"text",mask:"0000-0000-0000-0000"},formatMaskCard:"([0-9]{4})([0-9]{4})([0-9]{4})([0-9]{4});$1-$2-$3-$4",maskBsnsNo:{type:"text",mask:"000-00-00000"},formatMaskBsnsNo:"([0-9]{3})([0-9]{2})([0-9]{5});$1-$2-$3",maskRsdn:{type:"text",mask:"000000-0000000"},formatMaskRsdn:"([0-9]{6})([0-9]{7});$1-$2",formatMaskRsdn2:"([0-9]{6})([0-9])([0-9]{6});$1-$2******",maskRsdn2:{type:"text",mask:"999999-9999999"},maskYmd:{type:"text",mask:"0000-00-00"},formatMaskYmd:"([0-9]{4})([0-9]{2})([0-9]{2});$1-$2-$3",maskYm:{type:"text",mask:"0000-00"},formatMaskYm:"([0-9]{4})([0-9]{2});$1-$2",maskYmdHms:{type:"text",mask:"0000-00-00 00:00:00"},formatYmdHms:"([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2});$1-$2-$3 $4:$5:$6",maskHm:{type:"text",mask:"00:00"},formatHm:"([0-9]{2})([0-9]{2});$1:$2",maskHms:{type:"text",mask:"00:00:00"},formatHms:"([0-9]{2})([0-9]{2})([0-9]{2});$1:$2:$3",checkY:{type:"check",trueValues:"Y",falseValues:"N"},checkN:{type:"check",trueValues:"N",falseValues:"Y"},check1:{type:"check",trueValues:"1",falseValues:"0"},checkTrue:{type:"check",trueValues:"true",falseValues:"false"},checkT:{type:"check",trueValues:"T",falseValues:"F"},checkYdisabled:{type:"check",editable:!1,trueValues:"Y",falseValues:"N"},checkNdisabled:{type:"check",editable:!1,trueValues:"N",falseValues:"Y"},check1disabled:{type:"check",editable:!1,trueValues:"1",falseValues:"0"},count:{suffix:" 건",expression:"count"},count2:{prefix:"총 ",suffix:" 건",expression:"count"},datacount:{suffix:" 건",expression:"datacount"},sum:{numberFormat:"#,##0",expression:"sum"},sum2:{numberFormat:"#,##0.##",expression:"sum"},sum3:{numberFormat:"#,##0.00",expression:"sum"},avg:{numberFormat:"#,##0",expression:"avg"},avg2:{numberFormat:"#,##0.##",expression:"avg"},avg4:{numberFormat:"#,##0.####",expression:"avg"},min:{expression:"min"},max:{expression:"max"},date:{type:"date",mask:{editMask:"9999-99-99",placeHolder:"____-__-__",includedFormat:!0},datetimeFormat:"yyyy-MM-dd",textAlignment:"center",yearNavigation:!0},dateStyle:{datetimeFormat:"yyyy-MM-dd",textAlignment:"center"},maskDateFull:{type:"text",mask:"0000-00-00 00:00:00",textAlignment:"center"},bg_gray01:{background:"#cdcdcd"}},wr=Vt,Cr=Ct,xr=Ut,Mr=Wt,$r=sr,br=Ot,Tr=ve,Ur=Ee,ar={...Vt,...Ct,...Ut,...Wt,...sr,...Ot,...ve,...Ee,realFormat:nr};exports.ApiError=M;exports.THEME_COOKIE_NAME=Ne;exports.apiDelete=jt;exports.apiGet=Rt;exports.apiPatch=Ht;exports.apiPost=Ft;exports.apiPut=Yt;exports.apiUtils=wr;exports.arrAverage=Je;exports.arrCount=Qe;exports.arrMax=Ge;exports.arrMin=Ze;exports.arrReverse=et;exports.arrSum=Xe;exports.arrUnique=Ke;exports.bwgUtils=ar;exports.callService=O;exports.callService_SYSCD=Pt;exports.clamp=ot;exports.clearSessionStorage=ct;exports.closeAllMessages=Xt;exports.closeMessage=Jt;exports.closeNotification=Nt;exports.commonUtils=Cr;exports.configureEnvUtils=$t;exports.copyToClipboard=ze;exports.debounce=He;exports.default=ar;exports.deleteCookie=dt;exports.destroyNotifications=Et;exports.downloadByFileKey=qt;exports.downloadFile=Bt;exports.duplicates=tt;exports.encryptSha256=St;exports.envUtils=xr;exports.fileUtils=Mr;exports.generateRandomColor=We;exports.generateRandomString=ce;exports.generateUID=ue;exports.getAllServiceCodes=re;exports.getClientIp=_t;exports.getCookie=lt;exports.getCrprCd=we;exports.getCurrentDate=vt;exports.getCurrentDateString=wt;exports.getDepartmentInfo=De;exports.getDeviceType=H;exports.getDisplayName=ke;exports.getDprtCd=ne;exports.getDprtNm=ae;exports.getEmplNo=xe;exports.getEnvCode=Tt;exports.getPermissionService=zt;exports.getRoleList=j;exports.getServiceCode=te;exports.getSessionStorage=at;exports.getUserDvsn=Ce;exports.getUserId=oe;exports.getUserInfo=_;exports.getUserNm=se;exports.hasAllRoles=be;exports.hasAnyRole=$e;exports.hasRole=Me;exports.hasUserInfo=Ue;exports.isArray=Ae;exports.isBoolean=Ie;exports.isDesktop=qe;exports.isDev=le;exports.isEmpty=ie;exports.isEmptyArray=z;exports.isFunction=Pe;exports.isLocal=L;exports.isLoggedIn=Te;exports.isMobile=Ve;exports.isNull=Re;exports.isNullOrUndefined=Ye;exports.isNumber=_e;exports.isObject=Le;exports.isProd=de;exports.isSafeEmpty=mt;exports.isString=Oe;exports.isTablet=Be;exports.isUndefined=Fe;exports.isValidEmail=gt;exports.isValidUrl=ht;exports.logServiceCodeConfig=Se;exports.messageUtils=$r;exports.notiBwgError=K;exports.notiError=Dt;exports.notiInfo=G;exports.notiSuccess=kt;exports.notiWarning=Z;exports.notificationService=E;exports.notificationUtils=br;exports.padLeft=pt;exports.padRight=yt;exports.random=rt;exports.realFormat=nr;exports.removeSessionStorage=it;exports.round=st;exports.serviceUtils=Tr;exports.setClientIp=J;exports.setCookie=ut;exports.setServiceCodeOverrides=ye;exports.setSessionStorage=nt;exports.showApiError=Qt;exports.showDuplicateError=rr;exports.showError=R;exports.showInfo=Gt;exports.showLoading=Zt;exports.showRequiredError=or;exports.showSaveError=tr;exports.showSaveSuccess=er;exports.showSuccess=me;exports.showWarning=Kt;exports.throttle=je;exports.toCamelCase=ft;exports.userUtils=Ur;exports.verifyClientIp=It;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Q=require("axios"),A=require("dayjs"),ee=require("../chunks/common-components-DyOLtUJx.cjs"),T=require("antd"),C=require("../stores/index.cjs"),pe={AUTH_BTNS:"SCMSIGN00202",AUTH_MENU:"SCMSIGN00201",SRCH_CODE:"SCMSIGN00301",SRCH_POPU:"SCMPOPU00101",AUTH_BMRK:"SCMBMRK00101"};let F={};function ye(e){F=e,console.log("🔧 Provider 서비스코드 오버라이드 설정:",e)}function te(e){return F[e]&&F[e].trim()!==""?F[e]:pe[e]}function re(){const e={};for(const t of Object.keys(pe))e[t]=te(t);return e}function Se(){console.log("🔧 bwg-core 서비스코드 설정:"),console.log("📋 Provider 설정 > 기본값 순서로 확인");const e=re();for(const[t,r]of Object.entries(e)){const o=F[t]?"Provider 설정":"기본값";console.log(` ${t}: ${r} (${o})`)}}const ve=Object.freeze(Object.defineProperty({__proto__:null,getAllServiceCodes:re,getServiceCode:te,logServiceCodeConfig:Se,setServiceCodeOverrides:ye},Symbol.toStringTag,{value:"Module"})),we=()=>C.useUserStore.getState().user?.crprCd||null,oe=()=>C.useUserStore.getState().user?.userId||null,se=()=>C.useUserStore.getState().user?.userNm||null,Ce=()=>C.useUserStore.getState().user?.userDvsn||null,xe=()=>C.useUserStore.getState().user?.emplNo||null,ne=()=>C.useUserStore.getState().user?.dprtCd||null,ae=()=>C.useUserStore.getState().user?.dprtNm||null,j=()=>C.useUserStore.getState().user?.roleList||null,Me=e=>{const t=j();return t?t.includes(e):!1},$e=e=>{const t=j();return t?e.some(r=>t.includes(r)):!1},be=e=>{const t=j();return t?e.every(r=>t.includes(r)):!1},Te=()=>C.useUserStore.getState().isLoggedIn,_=()=>C.useUserStore.getState().user,Ue=()=>_()!==null,ke=()=>{const e=se(),t=oe();return e||t||null},De=()=>{const e=ae(),t=ne();return e||(t?String(t):null)},Ee=Object.freeze(Object.defineProperty({__proto__:null,getCrprCd:we,getDepartmentInfo:De,getDisplayName:ke,getDprtCd:ne,getDprtNm:ae,getEmplNo:xe,getRoleList:j,getUserDvsn:Ce,getUserId:oe,getUserInfo:_,getUserNm:se,hasAllRoles:be,hasAnyRole:$e,hasRole:Me,hasUserInfo:Ue,isLoggedIn:Te},Symbol.toStringTag,{value:"Module"}));var V={exports:{}},ir=V.exports,fe;function cr(){return fe||(fe=1,(function(e,t){(function(r,o){e.exports=o()})(ir,(function(){return function(r,o,a){r=r||{};var m=o.prototype,p={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function x(y,d,l,i){return m.fromToBase(y,d,l,i)}a.en.relativeTime=p,m.fromToBase=function(y,d,l,i,c){for(var n,s,u,f=l.$locale().relativeTime||p,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],S=h.length,w=0;w<S;w+=1){var v=h[w];v.d&&(n=i?a(y).diff(l,v.d,!0):l.diff(y,v.d,!0));var $=(r.rounding||Math.round)(Math.abs(n));if(u=n>0,$<=v.r||!v.r){$<=1&&w>0&&(v=h[w-1]);var b=f[v.l];c&&($=c(""+$)),s=typeof b=="string"?b.replace("%d",$):b($,d,v.l,u);break}}if(d)return s;var U=u?f.future:f.past;return typeof U=="function"?U(s):U.replace("%s",s)},m.to=function(y,d){return x(y,d,this,!0)},m.from=function(y,d){return x(y,d,this)};var g=function(y){return y.$u?a.utc():a()};m.toNow=function(y){return this.to(g(this),y)},m.fromNow=function(y){return this.from(g(this),y)}}}))})(V)),V.exports}var ur=cr();const lr=ee.getDefaultExportFromCjs(ur);var B={exports:{}},dr=B.exports,ge;function mr(){return ge||(ge=1,(function(e,t){(function(r,o){e.exports=o()})(dr,(function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},o={};return function(a,m,p){var x,g=function(i,c,n){n===void 0&&(n={});var s=new Date(i),u=(function(f,h){h===void 0&&(h={});var S=h.timeZoneName||"short",w=f+"|"+S,v=o[w];return v||(v=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:f,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:S}),o[w]=v),v})(c,n);return u.formatToParts(s)},y=function(i,c){for(var n=g(i,c),s=[],u=0;u<n.length;u+=1){var f=n[u],h=f.type,S=f.value,w=r[h];w>=0&&(s[w]=parseInt(S,10))}var v=s[3],$=v===24?0:v,b=s[0]+"-"+s[1]+"-"+s[2]+" "+$+":"+s[4]+":"+s[5]+":000",U=+i;return(p.utc(b).valueOf()-(U-=U%1e3))/6e4},d=m.prototype;d.tz=function(i,c){i===void 0&&(i=x);var n,s=this.utcOffset(),u=this.toDate(),f=u.toLocaleString("en-US",{timeZone:i}),h=Math.round((u-new Date(f))/1e3/60),S=15*-Math.round(u.getTimezoneOffset()/15)-h;if(!Number(S))n=this.utcOffset(0,c);else if(n=p(f,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(S,!0),c){var w=n.utcOffset();n=n.add(s-w,"minute")}return n.$x.$timezone=i,n},d.offsetName=function(i){var c=this.$x.$timezone||p.tz.guess(),n=g(this.valueOf(),c,{timeZoneName:i}).find((function(s){return s.type.toLowerCase()==="timezonename"}));return n&&n.value};var l=d.startOf;d.startOf=function(i,c){if(!this.$x||!this.$x.$timezone)return l.call(this,i,c);var n=p(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(n,i,c).tz(this.$x.$timezone,!0)},p.tz=function(i,c,n){var s=n&&c,u=n||c||x,f=y(+p(),u);if(typeof i!="string")return p(i).tz(u);var h=(function($,b,U){var N=$-60*b*1e3,I=y(N,U);if(b===I)return[N,b];var X=y(N-=60*(I-b)*1e3,U);return I===X?[N,I]:[$-60*Math.min(I,X)*1e3,Math.max(I,X)]})(p.utc(i,s).valueOf(),f,u),S=h[0],w=h[1],v=p(S).utcOffset(w);return v.$x.$timezone=u,v},p.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},p.tz.setDefault=function(i){x=i}}}))})(B)),B.exports}var fr=mr();const gr=ee.getDefaultExportFromCjs(fr);var q={exports:{}},hr=q.exports,he;function pr(){return he||(he=1,(function(e,t){(function(r,o){e.exports=o()})(hr,(function(){var r="minute",o=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(m,p,x){var g=p.prototype;x.utc=function(s){var u={date:s,utc:!0,args:arguments};return new p(u)},g.utc=function(s){var u=x(this.toDate(),{locale:this.$L,utc:!0});return s?u.add(this.utcOffset(),r):u},g.local=function(){return x(this.toDate(),{locale:this.$L,utc:!1})};var y=g.parse;g.parse=function(s){s.utc&&(this.$u=!0),this.$utils().u(s.$offset)||(this.$offset=s.$offset),y.call(this,s)};var d=g.init;g.init=function(){if(this.$u){var s=this.$d;this.$y=s.getUTCFullYear(),this.$M=s.getUTCMonth(),this.$D=s.getUTCDate(),this.$W=s.getUTCDay(),this.$H=s.getUTCHours(),this.$m=s.getUTCMinutes(),this.$s=s.getUTCSeconds(),this.$ms=s.getUTCMilliseconds()}else d.call(this)};var l=g.utcOffset;g.utcOffset=function(s,u){var f=this.$utils().u;if(f(s))return this.$u?0:f(this.$offset)?l.call(this):this.$offset;if(typeof s=="string"&&(s=(function(v){v===void 0&&(v="");var $=v.match(o);if(!$)return null;var b=(""+$[0]).match(a)||["-",0,0],U=b[0],N=60*+b[1]+ +b[2];return N===0?0:U==="+"?N:-N})(s),s===null))return this;var h=Math.abs(s)<=16?60*s:s;if(h===0)return this.utc(u);var S=this.clone();if(u)return S.$offset=h,S.$u=!1,S;var w=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(S=this.local().add(h+w,r)).$offset=h,S.$x.$localOffset=w,S};var i=g.format;g.format=function(s){var u=s||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return i.call(this,u)},g.valueOf=function(){var s=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*s},g.isUTC=function(){return!!this.$u},g.toISOString=function(){return this.toDate().toISOString()},g.toString=function(){return this.toDate().toUTCString()};var c=g.toDate;g.toDate=function(s){return s==="s"&&this.$offset?x(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var n=g.diff;g.diff=function(s,u,f){if(s&&this.$u===s.$u)return n.call(this,s,u,f);var h=this.local(),S=x(s).local();return n.call(h,S,u,f)}}}))})(q)),q.exports}var yr=pr();const Sr=ee.getDefaultExportFromCjs(yr),Ne="ui_theme",Oe=e=>typeof e=="string",_e=e=>typeof e=="number"&&!isNaN(e),Ie=e=>typeof e=="boolean",Pe=e=>typeof e=="function",Le=e=>e!==null&&typeof e=="object",Ae=e=>Array.isArray(e),Re=e=>e===null,Fe=e=>e===void 0,Ye=e=>e==null,je=(e,t)=>{let r=0;return(...o)=>{const a=Date.now();a-r>=t&&(r=a,e(...o))}},He=(e,t)=>{let r;return(...o)=>{clearTimeout(r),r=setTimeout(()=>e(...o),t)}},ze=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch(t){return console.error("Error copying to clipboard:",t),!1}},H=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},Ve=()=>H()==="mobile",Be=()=>H()==="tablet",qe=()=>H()==="desktop",We=()=>"#"+Math.floor(Math.random()*16777215).toString(16),z=e=>!e||e.length===0,Ke=e=>[...new Set(e)],Ge=e=>{if(!z(e))return Math.max(...e)},Ze=e=>{if(!z(e))return Math.min(...e)},Je=e=>{if(!z(e))return e.reduce((t,r)=>t+r,0)/e.length},Xe=e=>e.reduce((t,r)=>t+r,0),Qe=(e,t)=>e.filter(t).length,et=e=>[...e].reverse(),tt=e=>{const t=new Set,r=new Set;return e.forEach(o=>{t.has(o)?r.add(o):t.add(o)}),Array.from(r)},rt=(e,t)=>Math.random()*(t-e)+e,ot=(e,t,r)=>Math.min(Math.max(e,t),r),st=(e,t=0)=>Math.round(e*Math.pow(10,t))/Math.pow(10,t),nt=(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(r){console.error("Error saving to sessionStorage:",r)}},at=(e,t)=>{try{const r=sessionStorage.getItem(e);return r?JSON.parse(r):t||null}catch(r){return console.error("Error reading from sessionStorage:",r),t||null}},it=e=>{try{sessionStorage.removeItem(e)}catch(t){console.error("Error removing from sessionStorage:",t)}},ct=()=>{try{sessionStorage.clear()}catch(e){console.error("Error clearing sessionStorage:",e)}},ut=(e,t,r=30)=>{const o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3),document.cookie=`${e}=${t};expires=${o.toUTCString()};path=/`},lt=e=>{const t=e+"=",r=document.cookie.split(";");for(let o=0;o<r.length;o++){let a=r[o];for(;a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}return null},dt=e=>{document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/`},ie=e=>typeof e!="string"?!e:e.trim().length===0,mt=(e,t)=>ie(e)?t:e||"",ft=e=>e.replace(/-([a-z])/g,t=>t[1].toUpperCase()),gt=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),ht=e=>{try{return new URL(e),!0}catch{return!1}},pt=(e,t,r=" ")=>e.padStart(t,r),yt=(e,t,r=" ")=>e.padEnd(t,r),ce=(e,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")=>{let r="";for(let o=0;o<e;o++)r+=t.charAt(Math.floor(Math.random()*t.length));return r},vr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)}),ue=(e=32)=>{const r=vr().replace(/-/g,"");return e>=32?r+ce(e-32,"0123456789abcdef"):r.substring(0,e)};async function St(e){const[{default:t},{default:r}]=await Promise.all([Promise.resolve().then(()=>require("../chunks/sha256-DbQnwvPn.cjs")).then(o=>o.sha256),Promise.resolve().then(()=>require("../chunks/enc-base64-CAxIzedh.cjs")).then(o=>o.encBase64)]);return t(e).toString(r)}A.extend(lr);A.extend(Sr);A.extend(gr);A.locale("ko");const vt=()=>A(),wt=(e="YYYY-MM-DD")=>A().format(e),Ct=Object.freeze(Object.defineProperty({__proto__:null,THEME_COOKIE_NAME:Ne,arrAverage:Je,arrCount:Qe,arrMax:Ge,arrMin:Ze,arrReverse:et,arrSum:Xe,arrUnique:Ke,clamp:ot,clearSessionStorage:ct,copyToClipboard:ze,debounce:He,deleteCookie:dt,duplicates:tt,encryptSha256:St,generateRandomColor:We,generateRandomString:ce,generateUID:ue,getCookie:lt,getCurrentDate:vt,getCurrentDateString:wt,getDeviceType:H,getSessionStorage:at,isArray:Ae,isBoolean:Ie,isDesktop:qe,isEmpty:ie,isEmptyArray:z,isFunction:Pe,isMobile:Ve,isNull:Re,isNullOrUndefined:Ye,isNumber:_e,isObject:Le,isSafeEmpty:mt,isString:Oe,isTablet:Be,isUndefined:Fe,isValidEmail:gt,isValidUrl:ht,padLeft:pt,padRight:yt,random:rt,removeSessionStorage:it,round:st,setCookie:ut,setSessionStorage:nt,throttle:je,toCamelCase:ft},Symbol.toStringTag,{value:"Module"})),L=(()=>{try{if((void 0).DEV)return!0}catch{}return!1})();let xt=[],Mt=[];function $t(e){e.devHosts&&(xt=e.devHosts),e.prodHosts&&(Mt=e.prodHosts)}function bt(){if(typeof window<"u"&&window.location)return window.location.hostname}const le=(()=>{const e=bt();return!!(e&&xt.includes(e))})(),de=(()=>{const e=bt();return!!(e&&Mt.includes(e))})();function Tt(){return L?"X":le?"D":de?"P":"X"}const Ut=Object.freeze(Object.defineProperty({__proto__:null,configureEnvUtils:$t,getEnvCode:Tt,isDev:le,isLocal:L,isProd:de},Symbol.toStringTag,{value:"Module"})),k={duration:4.5,placement:"topRight"};class P{constructor(){}static getInstance(){return P.instance||(P.instance=new P),P.instance}showBwgError(t){const{message:r,description:o,duration:a=k.duration,placement:m=k.placement}=t;T.notification.error({message:`${r}`,description:o||"오류가 발생했습니다. 다시 시도해주세요.",duration:a,placement:m,style:{borderLeft:"4px solid #ff4d4f",backgroundColor:"#fff2f0"}})}showSuccess(t,r,o){T.notification.success({message:`${t}`,description:r,duration:o||k.duration,placement:k.placement})}showInfo(t,r,o){T.notification.info({message:`${t}`,description:r,duration:o||k.duration,placement:k.placement})}showWarning(t,r,o){T.notification.warning({message:`${t}`,description:r,duration:o||k.duration,placement:k.placement})}showError(t,r,o){T.notification.error({message:`${t}`,description:r,duration:o||k.duration,placement:k.placement})}destroy(){T.notification.destroy()}close(t){T.notification.destroy()}}const E=P.getInstance(),K=e=>{E.showBwgError(e)},kt=(e,t,r)=>{E.showSuccess(e,t,r)},G=(e,t,r)=>{E.showInfo(e,t,r)},Z=(e,t,r)=>{E.showWarning(e,t,r)},Dt=(e,t,r)=>{E.showError(e,t,r)},Et=()=>{E.destroy()},Nt=e=>{E.close(e)},Ot=Object.freeze(Object.defineProperty({__proto__:null,closeNotification:Nt,destroyNotifications:Et,notiBwgError:K,notiError:Dt,notiInfo:G,notiSuccess:kt,notiWarning:Z,notificationService:E},Symbol.toStringTag,{value:"Module"}));let D=null;const J=async e=>{if(D===null)if(e===void 0)try{let r=(await Q.get("/api/ip")).data.trim();r=r.replace(/\s+/g,""),D=r}catch(t){console.warn("IP 가져오기 실패:",t),D="unknown"}else D=e},_t=()=>D,It=async()=>(console.log("IP 검증 비활성화됨 (성능 최적화)"),D||"unknown");class M extends Error{constructor(t,r,o,a,m){super(t),this.name="ApiError",this.detailMsg=r,this.response=o,this.msgCd=a,this.errorType=m,Error.captureStackTrace&&Error.captureStackTrace(this,M)}}const W={method:"POST",timeout:3e4,withCredentials:!0,showLoading:!0,isPopup:!1,showError:!0,retryCount:0,retryDelay:1e3},Y=Q.create({timeout:W.timeout,withCredentials:W.withCredentials,headers:{"Content-Type":"application/json; charset=utf-8",Accept:"application/json; charset=utf-8","Apm-Guid":ue()}});Y.interceptors.request.use(e=>{e.showLoading&&!e.isPopup&&C.useLoadingStore.getState().showLoading(),e.showLoading&&e.isPopup&&C.usePopupLoadingStore.getState().showLoading();let t="UNKNOWN";new Date().getTime();try{e.data&&e.data.header?t=e.data.header.trxCd||"UNKNOWN":e.params&&e.params.header&&(t=e.params.header.trxCd||"UNKNOWN")}catch(o){console.warn("trxCd/guid 추출 실패:",o)}e.trxCd=t,e.requestStartTime=Date.now(),console.log(`🚀 API 요청 시작 [거래코드: ${t} / 서비스요청자: ${_()?.userId}]`);const r=localStorage.getItem("accessToken");return r&&(e.headers.Authorization=`Bearer ${r}`),e.headers["Content-Type"]="application/json; charset=UTF-8",e.headers.Accept="application/json; charset=UTF-8",e},e=>(console.error("❌ 요청 인터셉터 에러:",e),Promise.reject(e)));Y.interceptors.response.use(e=>{e.config.showLoading&&!e.config.isPopup&&C.useLoadingStore.getState().hideLoading(),e.config.isPopup&&C.usePopupLoadingStore.getState().hideLoading();let t="UNKNOWN",r="UNKNOWN";const o=new Date().getTime();try{e.config.trxCd&&(t=e.config.trxCd),e.config.guid?r=e.config.guid:e.data&&e.data.header&&e.data.header.trxCd?(t=e.data.header.trxCd,r=e.data.header.guid||"UNKNOWN"):e.config.data&&e.config.data.header?(t=e.config.data.header.trxCd||"UNKNOWN",r=e.config.data.header.guid||"UNKNOWN"):e.config.params&&e.config.params.header&&(t=e.config.params.header.trxCd||"UNKNOWN",r=e.config.params.header.guid||"UNKNOWN")}catch(m){console.warn("trxCd/guid 추출 실패:",m)}let a=0;return e.config.requestStartTime&&(a=o-e.config.requestStartTime),console.log(`✅ API 응답 성공 [거래코드: ${t} / GUID : ${r}] - (소요시간: ${a}ms)`),e},async e=>{if(e.config&&e.config.showLoading&&!e.config.isPopup&&C.useLoadingStore.getState().hideLoading(),e.config&&e.config.isPopup&&C.usePopupLoadingStore.getState().hideLoading(),console.error("❌ API 응답 에러:",e),L&&console.error("🚨 Error Details:",{message:e.message,status:e.response?.status,statusText:e.response?.statusText,data:e.response?.data,config:{url:e.config?.url,method:e.config?.method,baseURL:e.config?.baseURL}}),e.response?.status===401){const t=localStorage.getItem("refreshToken");if(t)try{const r=await Q.post("/auth/refresh",{refreshToken:t});if(r.data.accessToken){localStorage.setItem("accessToken",r.data.accessToken);const o=e.config;if(o)return o.headers.Authorization=`Bearer ${r.data.accessToken}`,Y(o)}}catch{localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/login"}}return Promise.reject(e)});const O=async(e,t,r)=>{try{const o={...W,...r},{activeMenuId:a}=C.useMenuViewStore.getState();if(D===null){const l=Date.now();await J();const i=Date.now();console.log(`[INFO] IP 조회 소요시간: ${i-l}ms`)}const m={method:o.method,url:"/api/service",timeout:o.timeout,withCredentials:o.withCredentials,showLoading:o.showLoading,isPopup:o.isPopup};o.headers&&(m.headers=o.headers);const p=D||"unknown",x=__APP_CD__,g=__SYS_CD__,y={header:{trxCd:e,userInfo:_(),clientIp:p,domainId:"DEFAULT",appCd:x,sysCd:g,screenId:a},data:t};o.method==="GET"?m.params=y||o.params:(m.data=y||o.data,o.params&&(m.params=o.params));let d;for(let l=0;l<=(o.retryCount||0);l++)try{const i=await Y(m);if(i.data.header?.resCd==0){for(const c in i.data)if(c!=="header")return i.data[c];return{}}else{const c=i.data.header,n=c?.msgs?.basicMsg||"요청 처리 중 오류가 발생했습니다.",s=c?.msgs?.detailMsgs||n,u=c?.msgCd,f=c?.msgs?.type;throw new M(n,s,i,u,f)}}catch(i){if(i.isAxiosError&&i.response){const c=i,n=c.response,s=n.data,u=s?.header?.msgs?.basicMsg||c.message||"서버에서 오류가 발생했습니다.",f=s?.header?.msgs?.detailMsgs||(typeof n.data=="string"?n.data:JSON.stringify(n.data))||u,h=s?.header?.msgCd,S=s?.header?.msgs?.type;d=new M(u,f,n,h,S)}else d=i;if(i.isAxiosError&&Lt(i)&&l<(o.retryCount||0)){await At(o.retryDelay||1e3);continue}break}if(d){if(o.showError){const l=d instanceof M?d.message:"요청 처리 중 오류가 발생했습니다.",i=d instanceof M?d.msgCd:"요청 처리 중 오류가 발생했습니다.",c=d instanceof M?d.detailMsg:d.message,n=d instanceof M?d.errorType:"";i?.startsWith("BXM")?K({message:l,description:c,duration:5}):n=="I"?G(l,c,5):Z(l,c,5)}throw d}throw new Error("알 수 없는 API 오류가 발생했습니다.")}catch(o){throw console.error("callService 최종 에러:",o),o}},Pt=async(e,t,r,o)=>{try{const a={...W,...o},{activeMenuId:m}=C.useMenuViewStore.getState();if(D===null){const i=Date.now();await J();const c=Date.now();console.log(`[INFO] IP 조회 소요시간: ${c-i}ms`)}const p={method:a.method,url:"/api/"+e+"/service",timeout:a.timeout,withCredentials:a.withCredentials,showLoading:a.showLoading,isPopup:a.isPopup};a.headers&&(p.headers=a.headers);const x=D||"unknown",g=__APP_CD__,y=__SYS_CD__,d={header:{trxCd:t,userInfo:_(),clientIp:x,domainId:"DEFAULT",appCd:g,sysCd:y,screenId:m},data:r};L&&console.log("__BWG_LOCAL__ 테스트 입니다. ",L),a.method==="GET"?p.params=d||a.params:(p.data=d||a.data,a.params&&(p.params=a.params));let l;for(let i=0;i<=(a.retryCount||0);i++)try{const c=await Y(p);if(c.data.header?.resCd==0){for(const n in c.data)if(n!=="header")return c.data[n];return{}}else{const n=c.data.header,s=n?.msgs?.basicMsg||"요청 처리 중 오류가 발생했습니다.",u=n?.msgs?.detailMsgs||s,f=n?.msgCd,h=n?.msgs?.type;throw new M(s,u,c,f,h)}}catch(c){if(c.isAxiosError&&c.response){const n=c,s=n.response,u=s.data,f=u?.header?.msgs?.basicMsg||n.message||"서버에서 오류가 발생했습니다.",h=u?.header?.msgs?.detailMsgs||(typeof s.data=="string"?s.data:JSON.stringify(s.data))||f,S=u?.header?.msgCd,w=u?.header?.msgs?.type;l=new M(f,h,s,S,w)}else l=c;if(c.isAxiosError&&Lt(c)&&i<(a.retryCount||0)){await At(a.retryDelay||1e3);continue}break}if(l){if(a.showError){const i=l instanceof M?l.message:"요청 처리 중 오류가 발생했습니다.",c=l instanceof M?l.msgCd:"요청 처리 중 오류가 발생했습니다.",n=l instanceof M?l.detailMsg:l.message,s=l instanceof M?l.errorType:"";c?.startsWith("BXM")?K({message:i,description:n,duration:5}):s=="I"?G(i,n,5):Z(i,n,5)}throw l}throw new Error("알 수 없는 API 오류가 발생했습니다.")}catch(a){throw console.error("callService 최종 에러:",a),a}},Lt=e=>!e.response||e.response.status>=500&&e.response.status<600,At=e=>new Promise(t=>setTimeout(t,e)),Rt=(e,t,r)=>O(e,t,{...r,method:"GET"}),Ft=(e,t,r)=>O(e,t,{...r,method:"POST"}),Yt=(e,t,r)=>O(e,t,{...r,method:"PUT"}),jt=(e,t,r)=>O(e,t,{...r,method:"DELETE"}),Ht=(e,t,r)=>O(e,t,{...r,method:"PATCH"}),zt=async(e,t,r)=>{try{const o=await fetch("/api/permissions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e,menuId:t,popupId:r})});if(!o.ok)throw new Error(`권한 확인 실패: ${o.status}`);return await o.json()}catch(o){throw console.error("권한 확인 서비스 오류:",o),o}},Vt=Object.freeze(Object.defineProperty({__proto__:null,ApiError:M,apiDelete:jt,apiGet:Rt,apiPatch:Ht,apiPost:Ft,apiPut:Yt,callService:O,callService_SYSCD:Pt,getClientIp:_t,getPermissionService:zt,setClientIp:J,verifyClientIp:It},Symbol.toStringTag,{value:"Module"})),Bt=(e,t,r="text/plain")=>{const o=new Blob([e],{type:r}),a=URL.createObjectURL(o),m=document.createElement("a");m.href=a,m.download=t,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(a)};async function qt(e){try{return await O("SCMFILE00101",{crprCd:_()?.crprCd,sysCd:__SYS_CD__,fileKey:e}).then(r=>{let o;if(r.sub&&(o=r.sub[0]),console.log(r),console.log(o),!o.lgclFileNm)throw console.error("논리파일명이 없습니다."),new Error("논리 파일명 누락");if(!o.filePath)throw console.error("파일 경로가 없습니다."),new Error("파일 경로 누락");const a=`api/download?filePath=${encodeURIComponent(o.filePath)}&logicalName=${encodeURIComponent(o.lgclFileNm)}`;return window.open(a,"_blank"),{success:!0,message:"파일 다운로드 요청 성공"}})}catch(t){throw console.error("downloadByFileKey 함수 실행 중 오류 발생:",t),t}}const Wt=Object.freeze(Object.defineProperty({__proto__:null,downloadByFileKey:qt,downloadFile:Bt},Symbol.toStringTag,{value:"Module"})),me=(e,t=3)=>{T.message.success({content:e,duration:t})},R=(e,t=5)=>{T.message.error({content:e,duration:t})},Kt=(e,t=4)=>{T.message.warning({content:e,duration:t})},Gt=(e,t=3)=>{T.message.info({content:e,duration:t})},Zt=(e="처리중...")=>T.message.loading({content:e,duration:0}),Jt=e=>{T.message.destroy(e)},Xt=()=>{T.message.destroy()},Qt=(e,t="처리 중 오류가 발생했습니다.")=>{const r=e?.response?.data?.message||e?.message||t;R(r)},er=(e="저장")=>{me(`${e}이 완료되었습니다.`)},tr=(e="저장")=>{R(`${e} 중 오류가 발생했습니다.`)},rr=e=>{R(`이미 사용중인 ${e}입니다.`)},or=e=>{R(`${e}을(를) 입력해주세요.`)},sr=Object.freeze(Object.defineProperty({__proto__:null,closeAllMessages:Xt,closeMessage:Jt,showApiError:Qt,showDuplicateError:rr,showError:R,showInfo:Gt,showLoading:Zt,showRequiredError:or,showSaveError:tr,showSaveSuccess:er,showSuccess:me,showWarning:Kt},Symbol.toStringTag,{value:"Module"})),nr={left:"left",near:"left",right:"right",far:"right",center:"center",number:"#,##0",number2:"#,##0.00",number3:"#,##0.##",number4:"#,##0.000",number5:"#,##0.#####",editNumber:{type:"number",editFormat:"#,##0"},editNumber2:{type:"number",editFormat:"#,##0.00"},editNumber3:{type:"number",editFormat:"#,##0.##"},editNumber4:{type:"number",editFormat:"#,##0.000"},editNumber5:{type:"number",editFormat:"#,##0.###"},editYmd:{type:"date",datetimeFormat:"yyyyMMdd",autoclose:!0,maxDate:"99991231",minDate:"19000101",showButtons:!1,mask:{editMask:"9999-99-99"}},editYm:{type:"btdate",datetimeFormat:"yyyyMM",btOptions:{startView:1,minViewMode:1,todayBtn:"linked",language:"ko",todayHighlight:!0,autoclose:!0,mask:{editMask:"9999-99"}}},editYy:{type:"btdate",datetimeFormat:"yyyy",btOptions:{startView:2,minViewMode:2,todayBtn:"linked",language:"ko",todayHighlight:!0,autoclose:!0}},formatYmd:"([0-9]{4})([0-9]{2})([0-9]{2});$1-$2-$3",formatYm:"([0-9]{4})([0-9]{2});$1-$2",formatYy:"([0-9]{4});$1",lookup:{type:"dropdown",domainOnly:!0},lookupReadOnly:{type:"dropdown",readOnly:!0},maskCard:{type:"text",mask:"0000-0000-0000-0000"},formatMaskCard:"([0-9]{4})([0-9]{4})([0-9]{4})([0-9]{4});$1-$2-$3-$4",maskBsnsNo:{type:"text",mask:"000-00-00000"},formatMaskBsnsNo:"([0-9]{3})([0-9]{2})([0-9]{5});$1-$2-$3",maskRsdn:{type:"text",mask:"000000-0000000"},formatMaskRsdn:"([0-9]{6})([0-9]{7});$1-$2",formatMaskRsdn2:"([0-9]{6})([0-9])([0-9]{6});$1-$2******",maskRsdn2:{type:"text",mask:"999999-9999999"},maskYmd:{type:"text",mask:"0000-00-00"},formatMaskYmd:"([0-9]{4})([0-9]{2})([0-9]{2});$1-$2-$3",maskYm:{type:"text",mask:"0000-00"},formatMaskYm:"([0-9]{4})([0-9]{2});$1-$2",maskYmdHms:{type:"text",mask:"0000-00-00 00:00:00"},formatYmdHms:"([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2});$1-$2-$3 $4:$5:$6",maskHm:{type:"text",mask:"00:00"},formatHm:"([0-9]{2})([0-9]{2});$1:$2",maskHms:{type:"text",mask:"00:00:00"},formatHms:"([0-9]{2})([0-9]{2})([0-9]{2});$1:$2:$3",checkY:{type:"check",trueValues:"Y",falseValues:"N"},checkN:{type:"check",trueValues:"N",falseValues:"Y"},check1:{type:"check",trueValues:"1",falseValues:"0"},checkTrue:{type:"check",trueValues:"true",falseValues:"false"},checkT:{type:"check",trueValues:"T",falseValues:"F"},checkYdisabled:{type:"check",editable:!1,trueValues:"Y",falseValues:"N"},checkNdisabled:{type:"check",editable:!1,trueValues:"N",falseValues:"Y"},check1disabled:{type:"check",editable:!1,trueValues:"1",falseValues:"0"},count:{suffix:" 건",expression:"count"},count2:{prefix:"총 ",suffix:" 건",expression:"count"},datacount:{suffix:" 건",expression:"datacount"},sum:{numberFormat:"#,##0",expression:"sum"},sum2:{numberFormat:"#,##0.##",expression:"sum"},sum3:{numberFormat:"#,##0.00",expression:"sum"},avg:{numberFormat:"#,##0",expression:"avg"},avg2:{numberFormat:"#,##0.##",expression:"avg"},avg4:{numberFormat:"#,##0.####",expression:"avg"},min:{expression:"min"},max:{expression:"max"},date:{type:"date",mask:{editMask:"9999-99-99",placeHolder:"____-__-__",includedFormat:!0},datetimeFormat:"yyyy-MM-dd",textAlignment:"center",yearNavigation:!0},dateStyle:{datetimeFormat:"yyyy-MM-dd",textAlignment:"center"},maskDateFull:{type:"text",mask:"0000-00-00 00:00:00",textAlignment:"center"},bg_gray01:{background:"#cdcdcd"}},wr=Vt,Cr=Ct,xr=Ut,Mr=Wt,$r=sr,br=Ot,Tr=ve,Ur=Ee,ar={...Vt,...Ct,...Ut,...Wt,...sr,...Ot,...ve,...Ee,realFormat:nr};exports.ApiError=M;exports.THEME_COOKIE_NAME=Ne;exports.apiDelete=jt;exports.apiGet=Rt;exports.apiPatch=Ht;exports.apiPost=Ft;exports.apiPut=Yt;exports.apiUtils=wr;exports.arrAverage=Je;exports.arrCount=Qe;exports.arrMax=Ge;exports.arrMin=Ze;exports.arrReverse=et;exports.arrSum=Xe;exports.arrUnique=Ke;exports.bwgUtils=ar;exports.callService=O;exports.callService_SYSCD=Pt;exports.clamp=ot;exports.clearSessionStorage=ct;exports.closeAllMessages=Xt;exports.closeMessage=Jt;exports.closeNotification=Nt;exports.commonUtils=Cr;exports.configureEnvUtils=$t;exports.copyToClipboard=ze;exports.debounce=He;exports.default=ar;exports.deleteCookie=dt;exports.destroyNotifications=Et;exports.downloadByFileKey=qt;exports.downloadFile=Bt;exports.duplicates=tt;exports.encryptSha256=St;exports.envUtils=xr;exports.fileUtils=Mr;exports.generateRandomColor=We;exports.generateRandomString=ce;exports.generateUID=ue;exports.getAllServiceCodes=re;exports.getClientIp=_t;exports.getCookie=lt;exports.getCrprCd=we;exports.getCurrentDate=vt;exports.getCurrentDateString=wt;exports.getDepartmentInfo=De;exports.getDeviceType=H;exports.getDisplayName=ke;exports.getDprtCd=ne;exports.getDprtNm=ae;exports.getEmplNo=xe;exports.getEnvCode=Tt;exports.getPermissionService=zt;exports.getRoleList=j;exports.getServiceCode=te;exports.getSessionStorage=at;exports.getUserDvsn=Ce;exports.getUserId=oe;exports.getUserInfo=_;exports.getUserNm=se;exports.hasAllRoles=be;exports.hasAnyRole=$e;exports.hasRole=Me;exports.hasUserInfo=Ue;exports.isArray=Ae;exports.isBoolean=Ie;exports.isDesktop=qe;exports.isDev=le;exports.isEmpty=ie;exports.isEmptyArray=z;exports.isFunction=Pe;exports.isLocal=L;exports.isLoggedIn=Te;exports.isMobile=Ve;exports.isNull=Re;exports.isNullOrUndefined=Ye;exports.isNumber=_e;exports.isObject=Le;exports.isProd=de;exports.isSafeEmpty=mt;exports.isString=Oe;exports.isTablet=Be;exports.isUndefined=Fe;exports.isValidEmail=gt;exports.isValidUrl=ht;exports.logServiceCodeConfig=Se;exports.messageUtils=$r;exports.notiBwgError=K;exports.notiError=Dt;exports.notiInfo=G;exports.notiSuccess=kt;exports.notiWarning=Z;exports.notificationService=E;exports.notificationUtils=br;exports.padLeft=pt;exports.padRight=yt;exports.random=rt;exports.realFormat=nr;exports.removeSessionStorage=it;exports.round=st;exports.serviceUtils=Tr;exports.setClientIp=J;exports.setCookie=ut;exports.setServiceCodeOverrides=ye;exports.setSessionStorage=nt;exports.showApiError=Qt;exports.showDuplicateError=rr;exports.showError=R;exports.showInfo=Gt;exports.showLoading=Zt;exports.showRequiredError=or;exports.showSaveError=tr;exports.showSaveSuccess=er;exports.showSuccess=me;exports.showWarning=Kt;exports.throttle=je;exports.toCamelCase=ft;exports.userUtils=Ur;exports.verifyClientIp=It;
|
package/dist/utils/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import X from "axios";
|
|
2
2
|
import L from "dayjs";
|
|
3
|
-
import { g as Q } from "../chunks/common-components-
|
|
3
|
+
import { g as Q } from "../chunks/common-components-BiUtYMIt.js";
|
|
4
4
|
import { notification as U, message as _ } from "antd";
|
|
5
5
|
import { useUserStore as O, useMenuViewStore as ie, useLoadingStore as Z, usePopupLoadingStore as J } from "../stores/index.js";
|
|
6
6
|
const ce = {
|
|
@@ -358,8 +358,8 @@ const ot = /* @__PURE__ */ Q(rt), st = "ui_theme", nt = (e) => typeof e == "stri
|
|
|
358
358
|
};
|
|
359
359
|
async function Wt(e) {
|
|
360
360
|
const [{ default: t }, { default: r }] = await Promise.all([
|
|
361
|
-
import("../chunks/sha256-
|
|
362
|
-
import("../chunks/enc-base64-
|
|
361
|
+
import("../chunks/sha256-DKma8qua.js").then((o) => o.s),
|
|
362
|
+
import("../chunks/enc-base64-Dy-3zKzn.js").then((o) => o.e)
|
|
363
363
|
]);
|
|
364
364
|
return t(e).toString(r);
|
|
365
365
|
}
|