@bwg-ui/core 1.2.31 → 1.2.32
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/{CMSearchIntfGwP01-CIf-fHXy.js → CMSearchIntfGwP01-C_y_G3xh.js} +108 -94
- package/dist/chunks/CMSearchIntfGwP01-uJxdFXUb.cjs +1 -0
- package/dist/chunks/{MenuReport-DQS5SAmi.cjs → MenuReport-DkWB3Yyc.cjs} +1 -1
- package/dist/chunks/{MenuReport-GeXRkcDD.js → MenuReport-XwdiwiFn.js} +1 -1
- package/dist/chunks/{common-components-DNos8aEG.js → common-components-Cxh8PLBH.js} +5 -5
- package/dist/chunks/{common-components-CyqUT5Vj.cjs → common-components-DcTm1Tn1.cjs} +1 -1
- package/dist/chunks/layout-components-B4ptqDmC.cjs +35 -0
- package/dist/chunks/{layout-components-C4ehuALr.js → layout-components-Bp6b-T1V.js} +495 -474
- package/dist/components/common/BwgPopup.d.ts.map +1 -1
- package/dist/components/common/index.cjs +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/core/BwgMaskedPicker.d.ts.map +1 -1
- package/dist/components/core/index.cjs +1 -1
- package/dist/components/core/index.js +683 -615
- package/dist/components/guide/index.cjs +1 -1
- package/dist/components/guide/index.js +1 -1
- package/dist/components/layout/custom/ConfigurableSidebar.d.ts.map +1 -1
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +1 -1
- package/dist/components/popup/CMSearchIntfGwP01.d.ts.map +1 -1
- package/dist/components/popup/index.cjs +1 -1
- package/dist/components/popup/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/stores/index.cjs +1 -1
- package/dist/stores/index.js +1 -1
- package/dist/styles/layout.css +1234 -1176
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/CMSearchIntfGwP01-C4Kg1iWo.cjs +0 -1
- package/dist/chunks/layout-components-USIA9TVn.cjs +0 -35
- package/dist/components/common/BwgDraggable.d.ts +0 -25
- package/dist/components/common/BwgDraggable.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const oe=require("../utils/index.cjs"),it=require("../stores/index.cjs"),o=require("react/jsx-runtime"),X=require("@ant-design/icons"),p=require("antd"),v=require("react"),F=require("../components/core/index.cjs"),bt=require("../provider/index.cjs"),rO=require("dompurify"),q1=require("quill"),nO=require("react-quill"),Yg=require("quill-image-resize-module-react"),mo=require("react-dom"),wt=require("realgrid"),Gg=require("realgrid-react"),iO=require("react-rnd"),oO=require("./layout-components-USIA9TVn.cjs"),Xg=require("react-router-dom"),wl=require("dayjs");function Y1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ti=Y1(X),C=Y1(v),Yf=({checkAuth:e=!1,buttons:t,gap:r=8})=>{const{user:n,getButtonAuth:i,setButtonAuth:a}=it.useUserStore(),s=bt.useServiceCodeValue("AUTH_BTNS"),[l,c]=v.useState({});v.useEffect(()=>{const u=e?e.menuId:void 0,f=e?e.grpId:void 0;if(!u||!f){c({});return}const h=i(u,f);if(h){c(h);return}oe.callService(s,{crprCd:n?.crprCd,userId:n?.userId,grpId:f.toUpperCase(),menuId:u}).then(m=>{const g=Array.isArray(m?.data)?m.data:Array.isArray(m)?m:[],x={};(g||[]).forEach(y=>{const w=String(y?.btnId||"").trim();if(!w)return;const b=y?.enblYn==null?!0:String(y.enblYn).toUpperCase()==="Y";x[w]=b}),a(u,f,x),c(x)}).catch(m=>{console.error(m),c({})})},[s,n?.crprCd,n?.userId,e?e.menuId:void 0,e?e.grpId:void 0,i,a]);const d=v.useMemo(()=>!t||t.length===0?null:t.filter(u=>u?.visible!==!1).map(u=>{const f=!!u.disabled;if(!e)return o.jsx(F.BwgButton,{type:u.type,disabled:f,loading:u.loading,className:u.className||"bwg-btn",style:u.style,icon:u.icon,onClick:u.onClick,children:u.label},u.id);const g=!(Object.prototype.hasOwnProperty.call(l,u.id)?!!l[u.id]:!1),x=f||g,y=o.jsx(F.BwgButton,{type:u.type,disabled:x,loading:u.loading,className:u.className||"bwg-btn",style:u.style,icon:u.icon,onClick:u.onClick,children:u.label},u.id);if(g){const w=o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[o.jsx(X.ExclamationCircleFilled,{style:{color:"#faad14",fontSize:16}}),o.jsx("span",{style:{fontWeight:600},children:`'${u.label}' 버튼에 대한 사용 권한이 없습니다.`})]}),b=o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,paddingLeft:24},children:o.jsx("span",{style:{fontSize:12},children:"관리자에게 문의하세요."})});return o.jsx(p.Popover,{title:w,content:b,placement:"bottom",styles:{body:{backgroundColor:"#fffbe6"}},children:o.jsx("span",{children:y})},u.id)}return y}),[t,l,e]);return o.jsx(p.Flex,{gap:r,children:d})};var aO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sO(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const Gf=({grpId:e,menuId:t,btnEvent:r,layout:n="horizontal",size:i="middle",style:a,className:s,onButtonClick:l})=>{const c=bt.useServiceCodeValue("AUTH_BTNS"),{user:d}=it.useUserStore(),[u,f]=v.useState([]),[h,m]=v.useState(!0),[g,x]=v.useState(null),[y,w]=v.useState({}),b=async()=>{try{m(!0),x(null),console.log("@@ 커스텀버튼그룹 영역 조회시작",e,t);const P=await oe.callService(c,{userId:d?.userId,crprCd:d?.crprCd,grpId:e.toUpperCase(),menuId:t});if(console.log("@@ 커스텀버튼그룹 영역 조회결과",P),P?.data&&Array.isArray(P.data)){const S=P.data.sort((O,k)=>O.btnSq-k.btnSq);f(S)}else f([])}catch(P){console.error("버튼 권한 조회 실패:",P),x("버튼 권한을 조회하는 중 오류가 발생했습니다."),f([])}finally{m(!1)}};v.useEffect(()=>{b()},[e,t]);const j=async(P,S)=>{w(O=>({...O,[P]:{loading:!0}}));try{const O=r?.[P];O?await O():console.warn(`버튼 이벤트 핸들러를 찾을 수 없습니다: ${P}`),l&&l(P,S,e)}catch(O){console.error("버튼 이벤트 실행 실패:",O),p.message.error("작업 중 오류가 발생했습니다.")}finally{w(O=>({...O,[P]:{loading:!1}}))}},E=P=>{const S=y[P.btnId]||{loading:!1};return o.jsxs(p.Button,{size:i,loading:S.loading,onClick:()=>j(P.btnId,P.btnNm),className:"bwg-btn",style:{...P.iconVal&&{display:"flex",alignItems:"center",gap:"4px"}},children:[P.iconVal&&o.jsxs(o.Fragment,{children:[P.iconType==="ANTD"&&Ti[P.iconVal]&&v.createElement(Ti[P.iconVal],{style:{fontSize:"14px"}}),P.iconType!=="ANTD"&&o.jsx("span",{className:P.iconVal,style:{fontSize:"14px"}})]}),P.btnNm]},P.btnId)};return h?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Space,{direction:n==="vertical"?"vertical":"horizontal",size:i,children:o.jsx(p.Button,{loading:!0,size:i,children:"권한 조회 중..."})})}):g?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"권한 오류",description:g,type:"error",showIcon:!0,style:{minHeight:"40px"}})}):u.length===0?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"부여된 권한이 없습니다",type:"warning",showIcon:!0,style:{height:"20px",display:"flex",alignItems:"center",margin:0,padding:"10px 10px"}})}):o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Flex,{gap:3,children:u.map(E)})})},lO=({content:e,layout:t="flex",gap:r=16,minWidth:n=120,maxWidth:i=300,style:a,className:s})=>{if(!(Array.isArray(e)&&e.length>0&&Array.isArray(e[0])))return o.jsx("div",{style:a,className:s,children:e});const c=e.filter(m=>m&&m.length>0),d=v.useMemo(()=>{const m=c[0];if(!m||m.length===0)return{totalCols:0,baseWidth:0};let g=0;const x=[];m.forEach(w=>{const b=w,j=b?.props?.["data-colspan"]?parseInt(String(b.props["data-colspan"])):1;g+=j,x.push(j)});const y=g>0?100/g:0;return{totalCols:g,baseWidth:y,componentWidths:x}},[c]),u=(m,g,x)=>{const y=m,w=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1;switch(t){case"equal":return 100/x;case"auto":return 100/x;case"grid":return 100/d.totalCols*w;case"flex":default:const b=d.baseWidth*w;return Math.max(n,Math.min(i,b))}},f=m=>{if(!m||typeof m!="object")return m;const g=m;if(!g.props)return m;const y={...g.props.style||{},width:"100%"};return v.cloneElement(g,{...g.props,style:y})},h=(m,g)=>{if(!m||m.length===0)return null;const x=m.length;return t==="grid"?o.jsx("div",{className:"erp-cmm-form",style:{display:"grid",gridTemplateColumns:`repeat(${d.totalCols}, 1fr)`,gap:`${r}px`,width:"100%"},children:m.map((y,w)=>{const b=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1,j=f(y);return o.jsx("div",{style:{gridColumn:`span ${b}`,minWidth:`${n}px`},className:"form-component-wrapper",children:j},`row-${g}-col-${w}`)})},`row-${g}`):o.jsx(p.Flex,{gap:r,className:"erp-cmm-form",wrap:t==="auto"?"wrap":"nowrap",style:{width:"100%"},children:m.map((y,w)=>{const b=u(y,w,x),j=f(y),E=t==="flex"?{width:`${b}px`,minWidth:`${n}px`,maxWidth:`${i}px`,flexShrink:0}:{width:`${b}%`,minWidth:`${n}px`};return o.jsx("div",{style:E,className:"form-component-wrapper",children:j},`row-${g}-col-${w}`)})},`row-${g}`)};return o.jsx(p.Flex,{gap:"small",vertical:!0,style:a,className:s,children:c.map((m,g)=>h(m,g+1))})},$e=({children:e,className:t,style:r,...n})=>o.jsx(p.Col,{...n,className:`bwg-col ${t}`,style:r,children:e});var ea={},Nu={exports:{}},Zg;function kc(){return Zg||(Zg=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Nu)),Nu.exports}var ta={},Qg;function cO(){if(Qg)return ta;Qg=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.default=void 0;var e={items_per_page:"/ 페이지",jump_to:"이동하기",jump_to_confirm:"확인하다",page:"페이지",prev_page:"이전 페이지",next_page:"다음 페이지",prev_5:"이전 5 페이지",next_5:"다음 5 페이지",prev_3:"이전 3 페이지",next_3:"다음 3 페이지",page_size:"페이지 크기"};return ta.default=e,ta}var ra={},na={},ia={},Du={exports:{}},_u={exports:{}},Bu={exports:{}},$u={exports:{}},Jg;function G1(){return Jg||(Jg=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})($u)),$u.exports}var Lu={exports:{}},ev;function uO(){return ev||(ev=1,(function(e){var t=G1().default;function r(n,i){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Lu)),Lu.exports}var tv;function dO(){return tv||(tv=1,(function(e){var t=G1().default,r=uO();function n(i){var a=r(i,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Bu)),Bu.exports}var rv;function fO(){return rv||(rv=1,(function(e){var t=dO();function r(n,i,a){return(i=t(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(_u)),_u.exports}var nv;function pO(){return nv||(nv=1,(function(e){var t=fO();function r(i,a){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);a&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),s.push.apply(s,l)}return s}function n(i){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?r(Object(s),!0).forEach(function(l){t(i,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(s,l))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Du)),Du.exports}var oa={},iv;function hO(){return iv||(iv=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.commonLocale=void 0,oa.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),oa}var ov;function mO(){if(ov)return ia;ov=1;var e=kc().default;Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=void 0;var t=e(pO()),r=hO(),n=(0,t.default)((0,t.default)({},r.commonLocale),{},{locale:"ko_KR",today:"오늘",now:"현재 시각",backToToday:"오늘로 돌아가기",ok:"확인",clear:"지우기",week:"주",month:"월",year:"년",timeSelect:"시간 선택",dateSelect:"날짜 선택",monthSelect:"달 선택",yearSelect:"연 선택",decadeSelect:"연대 선택",yearFormat:"YYYY년",dateFormat:"YYYY-MM-DD",dateTimeFormat:"YYYY-MM-DD HH:mm:ss",monthBeforeYear:!1,previousMonth:"이전 달 (PageUp)",nextMonth:"다음 달 (PageDown)",previousYear:"이전 해 (Control + left)",nextYear:"다음 해 (Control + right)",previousDecade:"이전 연대",nextDecade:"다음 연대",previousCentury:"이전 세기",nextCentury:"다음 세기"});return ia.default=n,ia}var aa={},av;function X1(){if(av)return aa;av=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.default=void 0;const e={placeholder:"시간 선택",rangePlaceholder:["시작 시간","종료 시간"]};return aa.default=e,aa}var sv;function Z1(){if(sv)return na;sv=1;var e=kc().default;Object.defineProperty(na,"__esModule",{value:!0}),na.default=void 0;var t=e(mO()),r=e(X1());const n={lang:Object.assign({placeholder:"날짜 선택",yearPlaceholder:"연도 선택",quarterPlaceholder:"분기 선택",monthPlaceholder:"월 선택",weekPlaceholder:"주 선택",rangePlaceholder:["시작일","종료일"],rangeYearPlaceholder:["시작 연도","종료 연도"],rangeMonthPlaceholder:["시작 월","종료 월"],rangeQuarterPlaceholder:["시작 분기","종료 분기"],rangeWeekPlaceholder:["시작 주","종료 주"],shortWeekDays:["일","월","화","수","목","금","토"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},t.default),timePickerLocale:Object.assign({},r.default)};return na.default=n,na}var lv;function gO(){if(lv)return ra;lv=1;var e=kc().default;Object.defineProperty(ra,"__esModule",{value:!0}),ra.default=void 0;var t=e(Z1());return ra.default=t.default,ra}var cv;function vO(){if(cv)return ea;cv=1;var e=kc().default;Object.defineProperty(ea,"__esModule",{value:!0}),ea.default=void 0;var t=e(cO()),r=e(gO()),n=e(Z1()),i=e(X1());const a="${label} 유효하지 않은 ${type}",s={locale:"ko",Pagination:t.default,DatePicker:n.default,TimePicker:i.default,Calendar:r.default,global:{placeholder:"선택하세요",close:"닫기"},Table:{filterTitle:"필터 메뉴",filterConfirm:"확인",filterReset:"초기화",filterEmptyText:"필터 없음",filterCheckAll:"전체 선택",filterSearchPlaceholder:"필터 검색",emptyText:"데이터 없음",selectAll:"전체 선택",selectInvert:"선택 반전",selectNone:"없음",selectionAll:"전체 선택",sortTitle:"정렬",expand:"펼치기",collapse:"접기",triggerDesc:"내림차순으로 정렬하기",triggerAsc:"오름차순으로 정렬하기",cancelSort:"정렬 취소하기"},Tour:{Next:"다음",Previous:"이전",Finish:"종료"},Modal:{okText:"확인",cancelText:"취소",justOkText:"확인"},Popconfirm:{okText:"확인",cancelText:"취소"},Transfer:{titles:["",""],searchPlaceholder:"여기에 검색하세요",itemUnit:"개",itemsUnit:"개",remove:"삭제",selectCurrent:"현재 페이지 선택",removeCurrent:"현재 페이지 삭제",selectAll:"전체 선택",removeAll:"전체 삭제",selectInvert:"선택 반전"},Upload:{uploading:"업로드 중...",removeFile:"파일 삭제",uploadError:"업로드 실패",previewFile:"파일 미리보기",downloadFile:"파일 다운로드"},Empty:{description:"데이터 없음"},Icon:{icon:"아이콘"},Text:{edit:"수정",copy:"복사",copied:"복사 됨",expand:"확장"},Form:{optional:"(선택사항)",defaultValidateMessages:{default:"필드 유효성 검사 오류 ${label}",required:"${label} 값을 입력해 주세요",enum:"${label} [${enum}] 중에 하나여야 합니다",whitespace:"${label} 비워둘 수 없습니다",date:{format:"${label} 유효하지 않은 날짜 형식입니다",parse:"${label} 날짜 형식으로 변환될 수 없습니다",invalid:"${label} 유효하지 않은 날짜입니다"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"${label} ${len}글자여야 합니다",min:"${label} 적어도 ${min}글자 이상이어야 합니다",max:"${label} ${max}글자 이하여야 합니다",range:"${label} ${min}-${max}글자 사이어야 합니다"},number:{len:"${label} 값은 ${len}이어야 합니다",min:"${label} 최솟값은 ${min}입니다",max:"${label} 최댓값은 ${max}입니다",range:"${label} 값은 ${min}-${max} 사이어야 합니다"},array:{len:"${len}이어야 합니다 ${label}",min:"최소 ${min}이어야 합니다 ${label}",max:"최대 ${max}이어야 합니다 ${label}",range:"${label} ${min}-${max} 사이어야 합니다"},pattern:{mismatch:"${label} ${pattern} 패턴과 일치하지 않습니다"}}},Image:{preview:"미리보기"},QRCode:{expired:"만료된 QR 코드",refresh:"새로고침"},ColorPicker:{presetEmpty:"미정",transparent:"투명",singleColor:"단색",gradientColor:"그라데이션"}};return ea.default=s,ea}var zu,uv;function yO(){return uv||(uv=1,zu=vO()),zu}var xO=yO();const Q1=wr(xO),J1=({children:e,customTheme:t,customComponentSize:r="middle",layout:n="comfortable",getPopupContainer:i})=>{const s=(()=>{const c={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'"Noto Sans KR", sans-serif',fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:p.theme.defaultAlgorithm};switch(n){case"compact":return{...c,token:{...c.token,padding:8,margin:8,borderRadius:4,fontSize:12,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}};case"spacious":return{...c,token:{...c.token,padding:24,margin:24,borderRadius:8,fontSize:16,fontSizeHeading1:44,fontSizeHeading2:36,fontSizeHeading3:28,fontSizeHeading4:24,fontSizeHeading5:20}};default:return{...c,token:{...c.token,padding:16,margin:16,borderRadius:6,fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}}}})(),l={...s,...t,token:{...s.token,...t?.token},components:{Checkbox:{colorPrimary:"var(--check-primary)",colorPrimaryBorder:"var(--check-primary)",colorPrimaryHover:"var(--check-primary-active)",colorText:"var(--text-primary)"},Radio:{colorPrimary:"var(--check-primary)",colorPrimaryActive:"var(--check-primary-active)",colorPrimaryHover:"var(--check-primary-active)",buttonSolidCheckedBg:"var(--button-solid)",buttonSolidCheckedHoverBg:"var(--button-solid-hover)",buttonSolidCheckedActiveBg:"var(--button-solid-hover)"},Tree:{nodeHoverBg:"var(--tree-selected-bg)",nodeHoverColor:"var(--primary-color)",nodeSelectedBg:"var(--tree-selected-bg)",nodeSelectedColor:"var(--primary-color)",colorText:"var(--text-primary)"},Switch:{colorPrimary:"var(--switch-primary)",colorPrimaryHover:"var(--switch-primary)"},Tabs:{inkBarColor:"var(--primary-color)",itemSelectedColor:"var(--primary-color)",itemHoverColor:"var(--button-solid-hover)",itemActiveColor:"var(--button-solid-hover)",itemColor:"var(--text-primary)",horizontalItemGutter:0,horizontalItemPadding:"11px 24px"},Button:{borderColorDisabled:"var(--border-color)",defaultShadow:"none",dangerShadow:"none",iconGap:4},...t?.components??{}}};return o.jsx(p.ConfigProvider,{locale:Q1,theme:l,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},getPopupContainer:i,children:e})},bO=({children:e})=>{const{activeDetailItem:t}=it.useMenuViewStore();return o.jsx("div",{className:"bwg-view main-view",style:{height:"100%",display:"flex",flexDirection:"column"},children:o.jsx("div",{className:"bwgview-content",children:o.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[o.jsx(p.Breadcrumb,{separator:">",items:[{title:t?.prntInfo?.menuNm},{title:t?.viewLabel}]}),e]})})})},wO=5,CO=0,Le=({title:e,icons:t,tooltip:r,iconVisible:n=!0,paddingBottom:i,marginBottom:a,children:s})=>{const l=Ti.AppstoreTwoTone,{componentSize:c}=it.useUserStore(),d=v.useMemo(()=>({0:5,1:4,2:3})[c],[c]);v.useMemo(()=>t?.type==="antd"&&t.icon&&Ti[t.icon]||l,[t?.type,t?.icon]);const u=(m,g)=>(m??g).toString().padStart(2,"0"),f=`pb${u(i,CO)}`,h=`mb${u(a,wO)}`;return o.jsx(p.Flex,{vertical:!0,style:{width:"100%"},children:o.jsxs("div",{className:`bwg-title-box ${f} ${h}`,style:{display:"flex",justifyContent:"space-between"},children:[o.jsx("div",{className:"bwg-title-box-left",children:o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx(p.Typography.Title,{level:d,children:o.jsx("span",{children:e})}),r&&o.jsx(p.Tooltip,{title:r.title,placement:r.placement,children:o.jsx(Ti.QuestionCircleTwoTone,{style:{marginLeft:5}})})]})}),o.jsx("div",{className:"bwg-title-box-right",children:o.jsx(p.Flex,{gap:6,children:s})})]})})},{Panel:dv}=p.Collapse,Ro=v.forwardRef(({reqRows:e,subRows:t,border:r=!1,labelDisplay:n,header:i},a)=>{const[s]=p.Form.useForm(),[l,c]=v.useState("1"),{componentSize:d}=it.useUserStore(),u=v.useMemo(()=>{const m={0:12,1:14,2:16},g={0:"small",1:"middle",2:"large"};return{fontSize:m[d],componentSize:g[d]}},[d]),f=()=>n?{flex:n.md||n.lg||n.sm||"100px"}:{flex:"100px"};v.useImperativeHandle(a,()=>({getFormData:()=>s.getFieldsValue(),setFormData:m=>{s.setFieldsValue(m)},resetForm:()=>{s.resetFields()},validateForm:async()=>{try{return{success:!0,data:await s.validateFields()}}catch(m){return{success:!1,error:m}}}}));const h=()=>{c(m=>m.includes("subRows")?m.filter(g=>g!=="subRows"):[...m,"subRows"])};return o.jsxs("div",{style:r?{border:"1px solid #ddd",padding:"10px 12px",borderRadius:"8px",marginBottom:"10px"}:{},children:[i&&o.jsx(Le,{title:i.title,children:i.buttons}),o.jsx(p.ConfigProvider,{componentSize:u.componentSize,theme:{token:{fontSize:u.fontSize},components:{Collapse:{}}},children:o.jsx(p.Form,{form:s,layout:"inline",style:{width:"100%",fontSize:`${u.fontSize}px`},labelCol:f(),labelAlign:"left",children:o.jsxs("div",{style:{position:"relative",width:"100%"},children:[t&&o.jsx("div",{style:{position:"absolute",top:"15px",left:"-9px",zIndex:10},children:l.includes("subRows")?o.jsx(p.Tooltip,{title:"접기",children:o.jsx("span",{className:"search-collapsed-arrow",onClick:h,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:o.jsx("path",{d:"M5.28321 0.986589C4.88285 0.482264 4.11715 0.482265 3.71679 0.986589L1.0243 4.37824C0.50404 5.0336 0.970753 6 1.80751 6L7.19249 6C8.02925 6 8.49596 5.0336 7.9757 4.37824L5.28321 0.986589Z",fill:"#AEB9C4"})})})}):o.jsx(p.Tooltip,{title:"펼치기",children:o.jsx("span",{className:"search-collapsed-arrow",onClick:h,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:o.jsx("path",{d:"M5.28321 5.01341C4.88285 5.51774 4.11715 5.51773 3.71679 5.01341L1.0243 1.62176C0.50404 0.966397 0.970753 1.64312e-07 1.80751 2.37464e-07L7.19249 7.08234e-07C8.02925 7.81386e-07 8.49596 0.966399 7.9757 1.62176L5.28321 5.01341Z",fill:"#AEB9C4"})})})})}),o.jsxs(p.Collapse,{activeKey:["reqRows",...l.includes("subRows")?["subRows"]:[]],onChange:c,className:"searchbox-collapse",bordered:!1,ghost:!0,children:[e&&o.jsx(dv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"disabled",children:e},"reqRows"),t&&o.jsx(dv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"icon",children:t},"subRows")]})]})})})]})}),dn=({children:e,showSearchBox:t,showCloseButton:r=!0,showEyesButton:n=!1,shotSettingButton:i=!0,styles:a,...s})=>{const[l,c]=v.useState(!0),[d,u]=v.useState(()=>{const w=s.placement;return w==="left"||w==="right"||w==="top"||w==="bottom"?w:"bottom"}),[f,h]=v.useState(!1),g=(w=>{const b={wrapper:{...s.width&&{width:s.width},...s.height&&{height:s.height},margin:"0 auto"},content:{},header:{backgroundColor:"var(--drawer-header-bg)",color:"var(--text-primary)"}};switch(w){case"bottom":return{...b,wrapper:{...b.wrapper,borderRadius:"30px 30px 0 0"},content:{borderRadius:"30px 30px 0 0"},header:{...b.header,borderRadius:"30px 30px 0 0"}};case"top":return{...b,wrapper:{...b.wrapper,borderRadius:"0 0 30px 30px"},content:{borderRadius:"0 0 30px 30px"},header:{...b.header}};case"left":return{...b,wrapper:{...b.wrapper,borderRadius:"0 30px 0px 0"},content:{borderRadius:"0 30px 0px 0"},header:{...b.header,borderRadius:"0 30px 0 0"}};case"right":return{...b,wrapper:{...b.wrapper,borderRadius:"30px 0 0 0"},content:{borderRadius:"30px 0 0 0"},header:{...b.header,borderRadius:"30px 0 0 0"}};default:return b}})(d),x={wrapper:{...g?.wrapper,...a?.wrapper},content:{...g?.content,...a?.content},header:{...g?.header,...a?.header}},y=()=>{const w=[];if(i){const b=[{key:"top",label:"상단",icon:o.jsx(X.CaretUpOutlined,{})},{key:"right",label:"우측",icon:o.jsx(X.CaretRightOutlined,{})},{key:"bottom",label:"하단",icon:o.jsx(X.CaretDownOutlined,{})},{key:"left",label:"좌측",icon:o.jsx(X.CaretLeftOutlined,{})}],j=o.jsx(p.Space.Compact,{children:b.map(E=>o.jsx(p.Button,{type:d===E.key?"primary":"default",size:"small",onClick:()=>{u(E.key),h(!1)},icon:E.icon},E.key))});w.push(o.jsx(p.Popover,{content:j,trigger:"click",placement:"left",open:f,onOpenChange:h,children:o.jsx(p.Tooltip,{placement:"bottom",title:"위치변경",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.SettingOutlined,{}),type:"text",size:"middle"})})},"shotSetting"))}return n&&w.push(o.jsx(p.Tooltip,{placement:"bottom",title:l?"배경 보기":"배경 숨기기",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.EyeOutlined,{}),type:"text",size:"middle",onClick:()=>c(!l)})},"eyes")),s.extra&&w.push(o.jsx("div",{style:{margin:"0 8px"},children:s.extra},"extra")),r&&w.push(o.jsx(p.Tooltip,{placement:"bottom",title:"닫기",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.CloseOutlined,{}),onClick:s.onClose,type:"text",size:"middle"})},"close")),w};return o.jsx(p.Drawer,{className:"main-drawer",footer:!0,...s,placement:d,styles:x,maskClosable:!1,closable:!1,mask:l,extra:o.jsx(p.Space,{size:"small",align:"center",children:y()}),afterOpenChange:w=>{w||(c(!0),u(s.placement)),s.afterOpenChange?.(w)},destroyOnHidden:!0,children:t?o.jsxs(ze,{type:"vertical",children:[o.jsxs(p.Flex,{justify:"space-between",align:"center",style:{width:"100%"},children:[o.jsx("div",{children:t.title}),o.jsx(p.Flex,{gap:2,children:t.extra})]}),o.jsx(Ro,{...t.searchBox}),o.jsx(p.Divider,{}),e]}):e})},Ie=({width:e="100%",height:t="100%",boxAlign:r,display:n="show",overflow:i,style:a,className:s,border:l=!0,children:c,ref:d})=>o.jsx("div",{style:{width:e,height:t,display:n==="show"?"":n,overflowX:i?.x,overflowY:i?.y,...a},className:`bwgview-content-box ${r?`content-box-${r}`:""} ${s||""} ${l?"":"none-box-st"}`,ref:d,children:c}),ew=Yg?.default??Yg;try{q1.register("modules/imageResize",ew)}catch(e){console.warn("quill-image-resize-module-react 로드 실패:",e)}const _l=e=>rO.sanitize(e??"",{ALLOWED_TAGS:["p","br","div","span","strong","b","em","i","u","s","blockquote","pre","code","ul","ol","li","h1","h2","h3","h4","h5","h6","a","img"],ALLOWED_ATTR:["style","class","href","target","rel","src","alt","width","height","data-*","align"],ALLOWED_URI_REGEXP:/^(?:(?:https?|data|mailto|tel):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,KEEP_CONTENT:!0,RETURN_TRUSTED_TYPE:!1}),Bl=v.forwardRef(({border:e=!0,editorProps:t,value:r,defaultValue:n,onChange:i,onBlur:a,disabled:s,placeholder:l},c)=>{const{isEditing:d=!0,title:u,containerHeight:f="100%"}=t||{},h=v.useRef(null),m=v.useMemo(()=>{const E={toolbar:d?[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{align:[]}],["link","image"],["clean"]]:!1};return ew?{...E,imageResize:{parchment:q1.import("parchment"),modules:["Resize","DisplaySize","Toolbar"],displayStyles:{backgroundColor:"black",border:"none",color:"white"}}}:E},[d]),g=v.useMemo(()=>["header","bold","italic","underline","strike","color","background","list","bullet","indent","align","link","image","width","height"],[]),x=r!==void 0,[y,w]=v.useState(n??""),b=x?r:y,j=v.useCallback((E,P,S,O)=>{const k=_l(E??"");x||w(k),i?.(k,P,S,O)},[x,i]);return v.useImperativeHandle(c,()=>({getHTML:()=>b??"",getText:()=>h.current?.getEditor()?.getText()??"",insertHTML:E=>{const P=h.current?.getEditor();if(!P)return;const S=P.getSelection(!0),O=_l(E??"");P.clipboard.dangerouslyPasteHTML(S?S.index:P.getLength(),O)},insertImage:(E,P)=>{const S=h.current?.getEditor();if(!S)return;const O=S.getSelection(!0),k=typeof E=="string"?E:"";S.insertEmbed(O?O.index:S.getLength(),"image",k,"user")},getQuill:()=>h.current?.getEditor?.()??null})),o.jsx(Ie,{border:e,style:{opacity:s?.6:1,pointerEvents:s?"none":"auto",height:typeof f=="number"?`${f}px`:f,minHeight:0},children:o.jsxs("div",{className:"bwg-editor-wrap",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[u&&o.jsx(Le,{...u,paddingBottom:10}),o.jsx(nO,{ref:h,theme:d?"snow":"bubble",readOnly:!d,value:b,onChange:j,onBlur:a,modules:m,formats:g,style:{width:"100%",display:"flex",flexDirection:"column",minHeight:0,flex:"1"},placeholder:l},d?"snow":"bubble")]})})}),SO=(e,t,r,n)=>_l(e??""),jO=({itemProps:e,...t})=>{const{rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s}=e;return o.jsx(p.Form.Item,{valuePropName:"value",trigger:"onChange",getValueFromEvent:SO,normalize:l=>l??"",rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s,children:o.jsx(Bl,{...t})})},PO=e=>{const{itemProps:t,onChange:r,editorProps:n,...i}=e,a=p.Form.useFormInstance();if(t?.name!=null){const s=t.name;return o.jsxs(o.Fragment,{children:[o.jsx(p.Form.Item,{hidden:!0,name:s,rules:t.rules,normalize:l=>l??"",children:o.jsx("input",{type:"hidden"})}),o.jsx(Bl,{...i,editorProps:n,value:a.getFieldValue(s)??"",onChange:(l,c,d,u)=>{const f=_l(l??"");a.setFieldValue(s,f),r?.(f,c,d,u)},onBlur:()=>{a.validateFields([s]).catch(()=>{})}})]})}return o.jsx(Bl,{...e})},kh=Object.assign(PO,{FormItem:jO,Core:Bl});var to={},fv;function EO(){if(fv)return to;fv=1;var e=mo;if(process.env.NODE_ENV==="production")to.createRoot=e.createRoot,to.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;to.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},to.hydrateRoot=function(r,n,i){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,i)}finally{t.usingClientEntryPoint=!1}}}return to}var OO=EO();const ts=v.forwardRef(({currentPage:e,totalPages:t,pageSize:r=10,totalData:n,onPageChange:i,pageSizeOptions:a=[10,20,50,100],gridRef:s,mode:l="client",onServerPageChange:c},d)=>{const[u,f]=v.useState(r),[h,m]=v.useState(1),[g,x]=v.useState(r),[y,w]=v.useState(0);v.useEffect(()=>{f(r)},[r]),v.useEffect(()=>{f(r)},[]),v.useImperativeHandle(d,()=>({currentPage:h,pageSize:g,totalData:y,totalPages:Math.ceil(y/g),setPage:_=>{m(_),c?.(_,g)},setPageSize:_=>{x(_),m(1),c?.(1,_)},setTotalData:_=>{w(_)},reset:()=>{m(1),x(r),w(0)}}),[h,g,y,c,r]);const b=l==="client",j=b?(e||0)+1:h,E=b?(t||0)>0:y>0,S=b?E?Math.ceil((n||0)/u):0:Math.ceil(y/g),O=b?E&&n||0:y,k=Math.min(j,S||1),A=`${u}-${S}-${k}`,D=_=>{b?i?.(_-1):(m(_),c?.(_,g))},B=_=>{if(b){f(_);try{s?.current?.gridView?(s.current.gridView.setPaging(!0,_),s.current.gridView.setPage(0)):i?.(0)}catch($){console.warn("페이지 사이즈 변경 중 오류:",$),i?.(0)}}else x(_),m(1),c?.(1,_)};return o.jsxs("div",{className:"bwg-pagination-container",style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center",borderTop:"1px solid #dddddd",position:"relative"},children:[o.jsxs("div",{style:{position:"absolute",left:10,display:"flex",alignItems:"center",gap:"8px"},children:[o.jsx("span",{style:{fontSize:"12px",color:"#333333"},children:"페이지당"}),o.jsx("select",{value:b?u:g,onChange:_=>B(Number(_.target.value)),disabled:!E,style:{padding:"4px 8px",border:"1px solid #d9d9d9",borderRadius:"6px",fontSize:"12px",color:"#333333",opacity:E?1:.5},children:a.map(_=>o.jsxs("option",{value:_,children:[_,"개"]},_))}),o.jsxs("span",{style:{fontSize:"12px",color:"#666",opacity:E?1:.5},children:["/ 총 ",O,"개"]})]}),o.jsx("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultBorderColor:"#e8e8e8",defaultHoverBorderColor:"var(--primary-color)",defaultHoverColor:"var(--text-primary)",contentFontSize:13,defaultColor:"var(--text-primary)",paddingInline:0}}},children:[o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>D(1),disabled:!E||k===1,style:{width:"26px",height:"26px",border:0,background:!E||k===1?"#f1f1f1":"white",cursor:!E||k===1?"not-allowed":"pointer",opacity:E?1:.5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[o.jsx("path",{d:"M12 17L7 12L12 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M17 17L12 12L17 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}),o.jsx(p.Button,{onClick:()=>D(k-1),disabled:!E||k===1,style:{width:"26px",height:"26px",border:0,background:!E||k===1?"#f1f1f1":"white",cursor:!E||k===1?"not-allowed":"pointer",opacity:E?1:.5},icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:o.jsx("path",{d:"M14 17L9 12L14 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),o.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},children:(()=>{if(!E||S===0)return o.jsx(p.Button,{disabled:!0,style:{width:"26px",height:"26px"},children:"1"});const _=5;let $=1,W=Math.min(_,S);k>3&&S>_&&($=Math.max(1,k-2),W=Math.min(S,$+_-1),W===S&&($=Math.max(1,W-_+1)));const T=[];for(let N=$;N<=W;N++)T.push(o.jsx(p.Button,{onClick:()=>D(N),style:{width:"26px",height:"26px",background:k===N?"var(--primary-color)":"#ffffff",color:k===N?"#ffffff":"#333333",cursor:"pointer"},children:N},N));return T})()},A),o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>D(k+1),disabled:!E||k>=S,style:{width:"26px",height:"26px",border:0,background:!E||k>=S?"#f1f1f1":"white",cursor:!E||k>=S?"not-allowed":"pointer",opacity:E?1:.5},icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:o.jsx("path",{d:"M10 17L15 12L10 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})}),o.jsx(p.Button,{onClick:()=>D(S),disabled:!E||k>=S,style:{width:"26px",height:"26px",border:0,background:!E||k>=S?"#f1f1f1":"white",cursor:!E||k>=S?"not-allowed":"pointer",opacity:E?1:.5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[o.jsx("path",{d:"M12 17L17 12L12 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M7 17L12 12L7 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})})]})]})})]})});ts.displayName="BwgPagination";const kO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZZDLDcJADETHUe7QQVJC6AAqACoAKkCcESh8JI60kBKgg3TA0kE6gAISzHgj0BJ8sWw/j2cXCCI7aD446g2diDp1aWyWaz9sxmHhNlJSyUCDnlQeQpEKm5UCDwgqvHBnTji4MvcEKGw3FsVFDeCmCCbMYwIpQY4wMnX5mj5pKrXfTFSxc1sp/o03yLlZaoSpRFhme53/QF4FmNl9txbH8wuC5893tEo1PZivBs6/sgVXBlv9BpvVRX62Og6eAAAAAElFTkSuQmCC",TO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZVDbDcIwDHSiqL90AzoCI5S/fvQBEwATIDYoE7BCRwjqAtmAsEE3gAlqzlFBKbXknJ2cL5cQRcF13SIf9Bd63mmHdcN5nsbbJm6UtY6bxlGaCunNZZmTUpniqhpQvIhZ8AlcI+9QXYHYIb3BgQ0ETAJ36BvUmQiDuBV19TNdFBkliUyK0lX1fbc0bkyL1WF6D7UzbBxnpKCi9YHG0UPeoz6BePt+h55UxMMA9NMrPa68BDLiAxmcQh0cAM62AAAAAElFTkSuQmCC",MO=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"}],RO=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(들여쓰기 표시)",tag:"showIndentExcel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"}],AO=({children:e})=>{const[t,r]=v.useState(!1),[n,i]=v.useState(null);return t?o.jsx("div",{style:{padding:"20px",border:"1px solid #ff4d4f",borderRadius:"6px",backgroundColor:"#fff2f0",margin:"10px"},children:o.jsx(p.Alert,{message:"리얼그리드 로드 실패",description:o.jsxs("div",{children:[o.jsx("p",{children:"리얼그리드 라이센스 또는 초기화 중 오류가 발생했습니다."}),o.jsxs("p",{style:{fontSize:"12px",color:"#666",marginTop:"8px"},children:["오류: ",n?.message||"알 수 없는 오류"]}),o.jsx(p.Button,{type:"primary",size:"small",style:{marginTop:"8px"},onClick:()=>{r(!1),i(null),window.location.reload()},children:"다시 시도"})]}),type:"error",showIcon:!0})}):o.jsx(IO,{onError:a=>{console.error("BwgGrid 에러:",a),i(a),r(!0)},children:e})};class IO extends v.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,r){this.props.onError(t)}render(){return this.state.hasError?null:this.props.children}}const Fe=v.forwardRef(({type:e="nrml",gridDivStyle:t,gridDivClassName:r,gridColumns:n,gridOptions:i,gridEvents:a,bindRef:s,gridContext:l,renderers:c,gridInitCallback:d},u)=>{const f=v.useRef(null),h=v.useRef(new Map),m=v.useRef(null),{gridSize:g}=it.useUserStore(),x=(V,M,K,L)=>{let Y=[],ee=[];const ae="treeNode";for(let le in V){let pe=V[le];Y[pe[K]]=V[le];let Pe=Y[pe[M]];if(Pe==null||Pe=="-"){ee.push(pe);continue}Pe[ae]==null&&(Pe[ae]=[]),Pe[ae].push(pe)}return ee},y=v.useCallback(V=>{const M=L=>{const Y=[];return L.forEach(ee=>{ee.children&&ee.children.length>0?Y.push(...M(ee.children)):Y.push(ee)}),Y};return M(V).map(L=>({fieldName:L.fieldName,dataType:L.dataType||"text"}))},[]),w=v.useCallback(V=>{const M=L=>{const Y=[];return L.forEach(ee=>{ee.children&&ee.children.length>0?Y.push(...M(ee.children)):Y.push(ee)}),Y};return M(V).map(L=>({...L,header:{...L.header,template:L.required?`<img src='${TO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:L.editable?`<img src='${kO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:"${headerText}",values:{headerText:L.header?.text??""},text:L.header?.text||""},styleName:L.dataType==="number"?"right":L.styleName||"center"}))},[]);v.useImperativeHandle(u,()=>({addAllData(V,M){const K=f.current?.gridView.getCurrent().dataRow;if(f.current?.dataProvider instanceof wt.LocalDataProvider){f.current.dataProvider.clearRows();try{f.current?.gridView.showLoading(),f.current.dataProvider.setRows(V)}catch(L){console.error("fillJsonData 오류:",L)}finally{f.current?.gridView.closeLoading()}}if(f.current?.dataProvider instanceof wt.LocalTreeDataProvider){if(f.current.dataProvider.clearRows(),M?.treeOption?.dataField==null||M?.treeOption?.parentField==null)return;const L={rows:"treeNode"};try{f.current?.gridView.showLoading();let Y=x(V,M.treeOption?.parentField,M.treeOption?.dataField);f.current.dataProvider.fillJsonData({treeNode:Y},L),M.treeOption.isExpand&&f.current.gridView?.expandAll()}catch(Y){console.error("fillJsonData 오류:",Y)}finally{f.current?.gridView.closeLoading()}}M?.isCurrent?f.current?.gridView.setCurrent({dataRow:K}):f.current?.gridView.setCurrent({dataRow:0})},getGridInstance:()=>f.current,getCurrentRow:()=>f.current?.gridView.getCurrent().dataRow??-1,getCurrentIndex:()=>f.current?.gridView.getCurrent().itemIndex??-1,gridExcelDown(V){f.current?.gridView.exportGrid({type:"excel",target:"local",allItems:!1,lookupDisplay:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!V?.indenting,header:"default",footer:"default",sheetName:"",fileName:V?.fileName||"sample.xlsx",...V})},getGridSaveData:()=>{const V=f.current?.dataProvider?.getAllStateRows();if(V===void 0)return[{}];let M=[];if(V.created!==void 0&&V.created.length>0)for(const K in V.created){let L=f.current?.dataProvider?.getJsonRow(V.created[K]);L={...L,iudFlag:"I"},M.push(L)}if(V.updated!==void 0&&V.updated.length>0)for(const K in V.updated){let L=f.current?.dataProvider?.getJsonRow(V.updated[K]);L={...L,iudFlag:"U"},M.push(L)}if(V.deleted!==void 0&&V.deleted.length>0)for(const K in V.deleted){let L=f.current?.dataProvider?.getJsonRow(V.deleted[K]);L={...L,iudFlag:"D"},M.push(L)}return M},deleteGridData:()=>{f?.current?.gridView?.getCheckedItems()?.map(M=>{let K=f?.current?.gridView?.getDataRow(M)??-1;const L=f?.current?.dataProvider?.getRowState(K);L==wt.RowState.DELETED?(f?.current?.dataProvider?.setRowState(K,h.current.get(M)??wt.RowState.NONE),h.current.delete(M)):L==wt.RowState.CREATED?f?.current?.dataProvider?.setRowState(K,wt.RowState.CREATE_AND_DELETED):L==wt.RowState.CREATE_AND_DELETED?f?.current?.dataProvider?.setRowState(K,wt.RowState.CREATED):(h.current.set(M,L??wt.RowState.NONE),f?.current?.dataProvider?.setRowState(K,wt.RowState.DELETED)),f?.current?.gridView?.checkItem(M,!1)})},_oriRowState:[{}],dp:f.current?.dataProvider??null,vw:f.current?.gridView??null}));const b=v.useCallback((V,M,K)=>{if(s!==void 0&&K>=0){let L=V.getDataSource().getJsonRow(K);s?.current?.setFieldsValue(L)}else s!==void 0&&K<0&&s?.current?.resetFields();V.setCurrent({dataRow:0}),a?.onCurrentRowChanged&&a?.onCurrentRowChanged(V,M,K)},[s,a]),j=v.useCallback((V,M,K)=>{const L=M.fieldName??"";s?.current?.getFieldInstance(L)&&s?.current.setFieldValue(L,K),a?.onEditChange&&a?.onEditChange(V,M,K)},[s,a]),E=v.useCallback((V,M,K)=>{const L=V.getOrgFieldName(K),Y=V.getValue(M,K);s?.current?.setFieldValue(L,Y)},[s]),P=v.useCallback((V,M,K,L)=>{const Y=V.getColumn(L).name??"",ee=V.getValue(M,L);s?.current?.getFieldInstance(Y)&&s?.current.setFieldValue(Y,ee),a?.onCellEdited&&a?.onCellEdited(V,M,K,L)},[s,a]),S=v.useCallback((V,M,K,L)=>{if(typeof M.dataRow=="number"&&M.dataRow!=-1){var Y=V.getDataSource().getRowState(M.dataRow);if(Y=="deleted"||Y=="createAndDeleted")return!1}return a?.onShowEditor!=null&&a?.onShowEditor(V,M,K,L),!0},[s,a]),O=v.useCallback(V=>{if(!f.current)return;const M=f.current.gridView,K=M.getDataSource();if(i?.container?.page){const L=M.getPage(),Y=M.getPageCount(),ee=K.getRowCount();G({currentPage:L,totalPages:Y,totalData:ee})}},[i?.container?.page]),k=v.useCallback(()=>{if(!f.current)return;const V=f.current.gridView,M=V.getDataSource(),K=["onKeyDown"],L=["onRowInserted"];Object.keys(a??{}).map(Y=>{K.includes(Y)?V[Y+"Add"]=a?.[Y]:V[Y]=a?.[Y],L.includes(Y)?M[Y+"Add"]=a?.[Y]:M[Y]=a?.[Y]}),M instanceof wt.LocalDataProvider&&(M.onRowInserted=(Y,ee)=>{ee<0||(setTimeout(function(){V?.setCurrent({dataRow:ee})},1),Y.onRowInsertedAdd!==void 0&&Y.onRowInsertedAdd(Y,ee))}),V.onKeyDown=function(Y,ee){if(ee.code=="Space"){let ae=Y.getSelectedItems(!0);for(const le in ae)Y.isCheckable(ae[le])&&(Y.isCheckedItem(ae[le])?Y.checkItem(ae[le],!1,!1):Y.checkItem(ae[le],!0,!1))}return Y.onKeyDownAdd!==void 0&&Y.onKeyDownAdd(Y,ee),!0},f.current.gridView.onCurrentRowChanged=b,f.current.gridView.onEditChange=j,f.current.gridView.getDataSource().onValueChanged=E,f.current.gridView.onCellEdited=P,f.current.gridView.onShowEditor=S,f.current.gridView.onDataLoadComplated=O},[b,j,E,P,S,O]),A=v.useCallback(V=>{if(V){try{V.gridView.setSortingOptions({enabled:!0}),V.gridView.sortMode=wt.SortMode.EXPLICIT,V.gridView.editorOptions.viewGridInside=!0,V.gridView instanceof wt.TreeView&&V.gridView.setTreeOptions({expandWhenSetData:wt.ExpandWhenSetData.REMAIN_AND_EXPAND,expanderIconStyle:wt.TreeExpanderIconStyle.SQUARE,iconVisible:!1,lineVisible:!0});const M=()=>({0:25,1:30,2:43})[g];V.gridView.setDisplayOptions({showEmptyMessage:!0,emptyMessage:"조회된 데이터가 존재하지 않습니다.",useFocusClass:!0,minRowHeight:i?.display?.minRowHeight||25,maxRowHeight:i?.display?.maxRowHeight||100,rowHeight:M(),rowChangeDelay:i?.display?.rowChangeDelay||0,selectionStyle:i?.display?.selectionStyle||wt.SelectionStyle.ROWS,fitStyle:i?.display?.fitStyle||wt.GridFitStyle.FILL,useAlternateRowStyle:i?.display?.useAlternateRowStyle||!1}),V.gridView.setEditOptions({commitWhenExitLast:!0,columnEditableFirst:!1,commitByCell:!0,commitWhenLeave:!0,crossWhenExitLast:!0,confirmWhenDelete:!1,deletable:!1,revertable:!1,showOnlyValidationMessage:!0,editable:i?.edit?.editable||!1,validateOnEdited:i?.edit?.validateOnEdited||!1}),V.gridView.setCopyOptions({singleMode:i?.copy?.singleMode||!1}),V.gridView.setPasteOptions({selectBlockPaste:!0,checkReadOnly:!0,throwValidationError:!1}),V.gridView.header.height=i?.header?.height||43,V.gridView.header.styleName=i?.header?.styleName||"bwgGridHeader",i?.container?.radio?V.gridView.setCheckBar({exclusive:i?.container?.radio||!1}):V.gridView.setCheckBar({visible:i?.container?.check||!1,showAll:i?.container?.checkAll||!1}),V.gridView.setStateBar({visible:i?.container?.state||!1}),V.gridView.rowIndicator.visible=i?.container?.indicator||!1,V.gridView instanceof wt.GridView&&(V.gridView.groupPanel.visible=i?.container?.panel||!1),V.gridView.setFooters({visible:i?.container?.footer||!1}),V.gridView.setHeader({visible:i?.container?.header||!0,showTooltip:i?.container?.headerShowTooltip||!1}),V.gridView.formatOptions.numberFormat="#,##0"}catch(M){console.log("그리드 옵션 설정 중 오류:",M)}try{V.gridView instanceof wt.TreeView?V.gridView.setContextMenu(RO):V.gridView.setContextMenu(MO),V.gridView.onContextMenuItemClicked=function(M,K,L){if(!(!L||!L.column)){if(K.tag=="excel")T(M,{isTitle:!1},l?.excel);else if(K.tag=="showIndentExcel")T(M,{isTitle:!1,treeBlank:!0},l?.excel);else if(K.tag=="withTitleExcel")T(M,{isTitle:!0,treeBlank:!1},l?.excel);else if(K.tag=="filter")N(M,K);else if(K.tag=="fixedCol"){const ee=M.getDataSource().getFieldIndex(L.column);M.setFixedOptions({colCount:ee})}else if(K.tag=="fixedRow")M.setFixedOptions({rowCount:(L.itemIndex||0)+1});else if(K.tag=="fixedCancel")M.setFixedOptions({colCount:0,rowCount:0});else if(K.tag=="hide")M.setColumnProperty(L.column,"visible",!1),M._hideCols[M._hideCols.length]=L.column;else if(K.tag=="hideClear")for(var Y=0;Y<M._hideCols.length;Y++)M.setColumnProperty(M._hideCols[Y],"visible",!0)}}}catch(M){console.log("컨텍스트 설정 중 오류:",M)}}},[i,g]),D=V=>{if(!(!c||c.length===0))try{c.forEach(M=>{const{name:K,renderer:L}=M;if(K&&L){const Y=typeof L=="function"?new L:L;V.gridView.registerCustomRenderer(K,Y)}})}catch(M){console.error("커스텀 렌더러 초기화 중 오류:",M)}},B=V=>{V.onPageChanged=(M,K)=>{G(L=>({...L,currentPage:K}))},V.onPageCountChanged=(M,K)=>{G(L=>({...L,totalPages:K}))}},_=V=>{f.current?.gridView&&f.current.gridView.setPage(V)},$=V=>{if(i?.layout?.colspan&&i.layout.colspan.length>0&&i?.layout?.colspan.forEach(M=>{const K=V.gridView.layoutByColumn(M.fieldName);if(K){const L=M.span;K.spanCallback=function(Y,ee,ae){return L}}}),n&&n.length>0&&n.some(K=>K.children&&K.children.length>0))try{(()=>{const L=JSON.parse(JSON.stringify(n)),Y=[],ee=ae=>{const le=[];return ae.children.map(pe=>{if(pe.children&&pe.children.length>0){const Pe=ee(pe),Re=pe.header?.text||pe.fieldName,Be=V.gridView.getColumnProperty(pe.fieldName,"header");delete pe.children,delete pe.header;let Ae={name:pe.fieldName,header:{text:Be?.text||Re,template:Be?.template,values:Be?.values,visible:Be?.visible??!0},items:Pe,...pe};le.push(Ae)}else le.push(pe.fieldName)}),le};L.map(ae=>{if(ae.children&&ae.children.length>0){const le=ee(ae),pe=ae.header?.text||ae.fieldName,Pe=ae.header?.visible??!0,Re=V.gridView.getColumnProperty(ae.fieldName,"header");delete ae.children,delete ae.header;const Be={name:ae.fieldName,header:{text:Re?.text||pe,template:Re?.template,values:Re?.values,visible:Re?.visible||Pe},items:le,...ae};Y.push(Be)}else Y.push(ae.fieldName)}),console.log("Final Layout!!",Y),V.gridView.setColumnLayout(Y)})()}catch(K){console.error("컬럼 레이아웃 설정 오류:",K)}},W=()=>{if(f.current){if(e==="nrml"){const V=f.current;if(A(V),D(V),n&&n.length>0){const M=y(n),K=w(n);V.gridView.getDataSource().setFields(M),V.gridView.setColumns(K)}if($(V),i?.container?.page){const M=i?.pagingOption?.pageSize||10;V.gridView.setPaging(!0,M),B(V.gridView)}}else{const V=f.current;if(A(V),D(V),n&&n.length>0){const M=y(n),K=w(n);V.gridView.getDataSource().setFields(M),V.gridView.setColumns(K)}$(f.current)}setTimeout(()=>{if(d){const V=typeof u=="object"&&u!==null?u.current:null;d(V)}},0)}},T=(V,M,K)=>{const L=V.getDataSource();let Y=K?.footer==null?"default":K.footer;L.getRowCount()<1&&(Y="hidden");let ee={type:"excel",target:"local",allItems:!1,lookupDisplay:!0,compatibility:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!M?.treeBlank,footer:Y,sheetName:"",documentTitle:{},documentSubtitle:{},documentTail:{},fileName:K?.fileName||"sample.xlsx"};L instanceof wt.LocalTreeDataProvider&&(ee.indenting=!!M?.treeBlank),K?.isCellMerge==!0&&(ee.separateRows=!1),oe.isEmpty(K?.sheetName)==!1&&(ee.sheetName=K?.sheetName),M?.isTitle&&(ee.documentTitle={message:oe.isSafeEmpty(K?.mainTitle,"No Title"),visible:!0,styleName:"documentStyle",spaceTop:1,spaceBottom:0,height:43},oe.isEmpty(K?.subTitle)==!1&&(ee.documentSubtitle={message:K?.subTitle,visible:!0,styleName:"center",height:20}),oe.isEmpty(K?.tailTitle)==!1&&(ee.documentTail={message:K?.tailTitle,visible:!0,styleName:"documentStyle"})),V.exportGrid(ee)},N=(V,M)=>{const K=V.getDataSource(),L=K.getOrgFieldNames();if(M.checked)for(var Y=0;Y<L.length;Y++){let ae=[],le=K.getDistinctValues(L[Y])??[];if(le.length==0)continue;let pe=V.columnByName(L[Y]);for(var ee=0;ee<le.length;ee++){if(le[ee]==null)continue;let Pe=pe.values!=null&&pe.values.indexOf(le[ee])!=-1?pe?.labels?.[pe.values.indexOf(le[ee])]:le[ee];oe.isEmpty(Pe)&&(oe.isEmpty(le[ee])?Pe=" ":Pe=le[ee]);let Re="";le[ee]==null?Re="value="+le[ee]:Re="value='"+le[ee]+"'",ae.push({name:Pe,criteria:Re})}V.setColumnFilters(L[Y],ae)}else for(var Y=0;Y<L.length;Y++)V.clearColumnFilters(L[Y]),V.activateAllColumnFilters(L[Y],!1),V.clearColumnFilters(L[Y])};v.useEffect(()=>{if(!f.current?.gridView)return;const V=()=>({0:25,1:30,2:43})[g],M=()=>({0:12,1:13,2:14})[g];f.current.gridView.setDisplayOptions({rowHeight:V()}),m.current&&m.current.style.setProperty("--bwg-grid-font-size",`${M()}px`)},[g,i?.display?.rowHeight]),v.useEffect(()=>{if(f.current&&f.current.gridView)if(e==="nrml"){const V=f.current;A(V)}else{const V=f.current;A(V)}},[e,i,A]),v.useEffect(()=>{!f.current||!n||n.length===0||W()},[n]),v.useEffect(()=>{f.current&&k()},[a,k]);const[I,R]=v.useState(!1),[z,q]=v.useState(""),U=v.useRef(null),[H,G]=v.useState({currentPage:0,totalPages:0,totalData:0});v.useEffect(()=>{G({currentPage:0,totalPages:0,totalData:0})},[]),v.useEffect(()=>{I&&setTimeout(()=>{U.current?.focus?.()},0)},[I]),v.useEffect(()=>()=>{if(f.current)try{const V=f.current;V.gridView&&(V.gridView.onDataLoadComplated=void 0,V.gridView.onCurrentRowChanged=void 0,V.gridView.onCellClicked=void 0,V.gridView.onCellDblClicked=void 0,V.gridView.onEditRowChanged=void 0,V.gridView.onItemChecked=void 0,V.gridView.onItemAllChecked=void 0,V.gridView.onColumnCheckedChanged=void 0,V.gridView.onCellButtonClicked=void 0,V.gridView.onEditChange=void 0,V.gridView.onCellEdited=void 0,V.gridView.onKeyUp=void 0,V.gridView.onKeyDown=void 0,V.gridView.onWheel=void 0,V.gridView.onValidateColumn=void 0,V.gridView.onValidateRow=void 0,V.gridView.onValidationFail=void 0,V.gridView.onRowInserting=void 0,V.gridView.onCellItemClicked=void 0,V.gridView.onShowEditor=void 0,V.gridView.getDataSource()&&(V.gridView.getDataSource().clearRows(),V.gridView.getDataSource().setFields([])),V.gridView.getDataSource().clearRows())}catch(V){console.warn("⚠️ BwgGrid cleanup error:",V)}},[]);const te=v.useCallback(V=>{ie(V)},[]),ie=v.useCallback(V=>{const M=f.current?.gridView;if(M?.isFiltered()){console.log("EE:: [그리드 Filtering 으로 인한 오류] 그리드 내 Filter를 해제 후 진행해 주십시오.");return}if(M?.commit(),oe.isEmpty(V))return;const K=M?.getCurrent().itemIndex??-1;if(K<0)return;const L={value:V,startIndex:K+1,wrap:!0,caseSensitive:!1,partialMatch:!0},Y=M?.searchCell(L);M?.setCurrent(Y)},[]),de=v.useCallback(V=>{V.key==="Escape"&&(V.preventDefault(),R(!1))},[]),Se=v.useCallback(V=>{V.ctrlKey&&V.code==="KeyF"&&(V.preventDefault(),q(""),R(!I))},[I]),we={searchRow:te,searchEnter:ie,handleCloseKeyword:de,handleSearch:Se},Z=v.useMemo(()=>({0:12,1:13,2:14})[g],[g]),fe=v.useMemo(()=>({...t,position:"relative",width:t?.width||"100%",height:t?.height||"100%","--bwg-grid-font-size":`${Z}px`}),[t,Z]);return o.jsxs(AO,{children:[o.jsxs("div",{ref:m,style:fe,className:r,onKeyDown:V=>we.handleSearch(V),children:[I&&o.jsx("div",{className:"grid-search-box",children:o.jsxs(p.Flex,{gap:3,children:[o.jsx(p.ConfigProvider,{theme:{components:{Button:{controlHeight:32},Input:{controlHeight:32}}},children:o.jsxs(p.Space.Compact,{children:[o.jsx(p.Button,{icon:o.jsx(X.SearchOutlined,{})}),o.jsx(p.Input,{ref:U,value:z,name:"srchField",autoComplete:"off",onKeyUp:V=>we.handleCloseKeyword(V),onChange:V=>q(V.target.value),onPressEnter:V=>we.searchEnter(V)})]})}),o.jsx(p.Button,{variant:"solid",icon:o.jsx(X.CloseOutlined,{}),onClick:()=>R(!1)})]})}),e==="nrml"?o.jsx(Gg.RealGridReact,{ref:f,autoGenerateField:!0,onInitialized:W}):o.jsx(Gg.RealTreeReact,{ref:f,autoGenerateField:!1,onInitialized:W})]}),i?.container?.page&&o.jsx(ts,{currentPage:H.currentPage,totalPages:H.totalPages,pageSize:i?.pagingOption?.pageSize,totalData:H.totalData,onPageChange:_,pageSizeOptions:i?.pagingOption?.pageSizeOptions,gridRef:f})]})}),Dr=e=>({initContent(t){this._root=OO.createRoot(t)},render(t,r,n,i){const a=this._root;a&&e(t,r,n,i,a)},clearContent(t){const r=this._root;r&&setTimeout(()=>{r&&(r.unmount(),this._root=null)},0)},canClick(t){return!0},click(){return{}}}),fn=v.memo(({title:e,border:t,children:r,titleChildren:n})=>{const i=v.useMemo(()=>({components:{Form:{labelColor:"#9A9A9A"},Select:{colorTextDisabled:"#000"}}}),[]);return o.jsxs(ze,{type:"vertical",children:[o.jsx(Le,{title:e,icons:{type:"antd",icon:"InfoCircleTwoTone"},children:n}),o.jsx(Ie,{border:!1,children:o.jsx(p.ConfigProvider,{theme:i,children:r})})]})}),ze=({type:e="horizontal",layoutAlign:t="left",verticalAlign:r,className:n,style:i,children:a})=>o.jsx("div",{style:i,className:`bwgview-content-layout ${e=="horizontal"?"hz-layout":"vt-layout"} layout-${t} ${r&&`vertical-${r}`} ${n||""}`,children:a}),pv=(e,t)=>{const r=window.innerWidth,n=window.innerHeight,i=Math.min(Math.max(e.x,0),Math.max(0,r-t.width)),a=Math.min(Math.max(e.y,0),Math.max(0,n-t.height));return{x:i,y:a}},NO=({buttons:e,onClose:t})=>{const r=(e||[]).filter(n=>n?.visible!==!1);return r.length===0?o.jsx(p.Button,{type:"default",className:"bwg-btn popup-btn",onClick:t,children:"닫기"}):o.jsxs("div",{style:{display:"flex",gap:6},children:[r.map(n=>o.jsx(p.Button,{type:n.type,disabled:!!n.disabled,loading:n.loading,className:n.className||"bwg-btn popup-btn",style:n.style,icon:n.icon,onClick:n.onClick,children:n.label},n.id)),o.jsx(p.Button,{type:"default",className:"bwg-btn popup-btn",onClick:t,children:"닫기"})]})},Wi=({popup:e,popupEvent:t,onClose:r,children:n,buttons:i})=>{const a=v.useRef(null),s=e?.popupTitle||"팝업",l=e?.width||800,c=e?.height||600,[d,u]=v.useState(l),[f,h]=v.useState(c),m=v.useMemo(()=>{const E=Math.max(0,(window.innerWidth-l)/2),P=Math.max(0,(window.innerHeight-c)/2);return{x:E,y:P}},[l,c]),[g,x]=v.useState(m),y=(E,P)=>{const S=pv({x:P.x,y:P.y},{width:d,height:f});x(S)},w=(E,P,S,O,k)=>{const A={width:parseInt(S.style.width,10),height:parseInt(S.style.height,10)},D=pv(k,A);u(A.width),h(A.height),x(D)},b=()=>a.current??document.body,j=typeof e?.zIndex=="number"?e.zIndex:3e3;return o.jsxs("div",{style:{position:"fixed",inset:0,zIndex:j},children:[o.jsx("div",{onClick:r,style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.3)",zIndex:0}}),o.jsxs(iO.Rnd,{className:"bwg-popup",size:{width:d,height:f},position:g,bounds:"window",minWidth:400,minHeight:300,onDragStop:y,onResizeStop:w,dragHandleClassName:"drag-handle",cancel:".rnd-cancel",enableUserSelectHack:!1,style:{backgroundColor:"white",borderRadius:20,boxShadow:"0 4px 15px rgba(0,0,0,0.25)",overflow:"visible",position:"absolute",zIndex:1},children:[o.jsx("div",{className:"bwg-popup-content",style:{overflow:"hidden",borderRadius:20,height:"100%"},children:o.jsx(J1,{getPopupContainer:b,children:o.jsx(ze,{type:"vertical",children:o.jsx(p.Card,{className:"popup-drag-container",title:o.jsx("div",{className:"drag-handle",style:{display:"flex",alignItems:"center",gap:8},children:s}),style:{width:"100%",height:"100%"},styles:{body:{height:"calc(100% - 77px)",padding:20,overflow:"auto"}},extra:o.jsx(NO,{buttons:i,onClose:()=>e?.close?.()||r?.()}),children:o.jsx("div",{className:"rnd-cancel",style:{height:"100%"},children:o.jsx(bt.SearchBoxProvider,{children:n})})})})})}),o.jsx("div",{ref:a,className:"bwg-popup-portal-root",style:{position:"relative"}})]})]})},Ct=({children:e,className:t,style:r,marginBottom:n=8,gutter:i=[16,8],...a})=>o.jsx(p.Row,{...a,gutter:i,className:`bwg-row ${t}`,style:{marginBottom:`${n}px`,...r},children:e}),Tc=({children:e})=>o.jsx("div",{style:{height:"100%",padding:"20px 30px 26px"},children:o.jsx("div",{style:{width:"100%",height:"100%",border:"1px solid #ddd",borderRadius:"15px",background:"#fff"},children:e})}),DO=({rowKey:e="id",columns:t,dataSource:r,loading:n=!1,rowSelection:i,size:a="middle",pagination:s=!1,...l})=>o.jsx(p.Table,{rowKey:e,columns:t,dataSource:r,loading:n,rowSelection:i,size:a,pagination:s,bordered:!0,scroll:{x:"max-content"},locale:{emptyText:"데이터가 없습니다."},...l}),ar=e=>{const{type:t="card",animated:r=!0,...n}=e;return o.jsx(p.Tabs,{type:t,animated:r,...n})};function Xf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _O(e){if(Array.isArray(e))return Xf(e)}function tw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Th(e,t){if(e){if(typeof e=="string")return Xf(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xf(e,t):void 0}}function BO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
"use strict";const oe=require("../utils/index.cjs"),it=require("../stores/index.cjs"),o=require("react/jsx-runtime"),X=require("@ant-design/icons"),p=require("antd"),v=require("react"),F=require("../components/core/index.cjs"),bt=require("../provider/index.cjs"),rO=require("dompurify"),q1=require("quill"),nO=require("react-quill"),Yg=require("quill-image-resize-module-react"),mo=require("react-dom"),wt=require("realgrid"),Gg=require("realgrid-react"),iO=require("react-rnd"),oO=require("./layout-components-B4ptqDmC.cjs"),Xg=require("react-router-dom"),wl=require("dayjs");function Y1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Ti=Y1(X),C=Y1(v),Yf=({checkAuth:e=!1,buttons:t,gap:r=8})=>{const{user:n,getButtonAuth:i,setButtonAuth:a}=it.useUserStore(),s=bt.useServiceCodeValue("AUTH_BTNS"),[l,c]=v.useState({});v.useEffect(()=>{const u=e?e.menuId:void 0,f=e?e.grpId:void 0;if(!u||!f){c({});return}const h=i(u,f);if(h){c(h);return}oe.callService(s,{crprCd:n?.crprCd,userId:n?.userId,grpId:f.toUpperCase(),menuId:u}).then(m=>{const g=Array.isArray(m?.data)?m.data:Array.isArray(m)?m:[],x={};(g||[]).forEach(y=>{const w=String(y?.btnId||"").trim();if(!w)return;const b=y?.enblYn==null?!0:String(y.enblYn).toUpperCase()==="Y";x[w]=b}),a(u,f,x),c(x)}).catch(m=>{console.error(m),c({})})},[s,n?.crprCd,n?.userId,e?e.menuId:void 0,e?e.grpId:void 0,i,a]);const d=v.useMemo(()=>!t||t.length===0?null:t.filter(u=>u?.visible!==!1).map(u=>{const f=!!u.disabled;if(!e)return o.jsx(F.BwgButton,{type:u.type,disabled:f,loading:u.loading,className:u.className||"bwg-btn",style:u.style,icon:u.icon,onClick:u.onClick,children:u.label},u.id);const g=!(Object.prototype.hasOwnProperty.call(l,u.id)?!!l[u.id]:!1),x=f||g,y=o.jsx(F.BwgButton,{type:u.type,disabled:x,loading:u.loading,className:u.className||"bwg-btn",style:u.style,icon:u.icon,onClick:u.onClick,children:u.label},u.id);if(g){const w=o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[o.jsx(X.ExclamationCircleFilled,{style:{color:"#faad14",fontSize:16}}),o.jsx("span",{style:{fontWeight:600},children:`'${u.label}' 버튼에 대한 사용 권한이 없습니다.`})]}),b=o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:4,paddingLeft:24},children:o.jsx("span",{style:{fontSize:12},children:"관리자에게 문의하세요."})});return o.jsx(p.Popover,{title:w,content:b,placement:"bottom",styles:{body:{backgroundColor:"#fffbe6"}},children:o.jsx("span",{children:y})},u.id)}return y}),[t,l,e]);return o.jsx(p.Flex,{gap:r,children:d})};var aO=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sO(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const Gf=({grpId:e,menuId:t,btnEvent:r,layout:n="horizontal",size:i="middle",style:a,className:s,onButtonClick:l})=>{const c=bt.useServiceCodeValue("AUTH_BTNS"),{user:d}=it.useUserStore(),[u,f]=v.useState([]),[h,m]=v.useState(!0),[g,x]=v.useState(null),[y,w]=v.useState({}),b=async()=>{try{m(!0),x(null),console.log("@@ 커스텀버튼그룹 영역 조회시작",e,t);const P=await oe.callService(c,{userId:d?.userId,crprCd:d?.crprCd,grpId:e.toUpperCase(),menuId:t});if(console.log("@@ 커스텀버튼그룹 영역 조회결과",P),P?.data&&Array.isArray(P.data)){const S=P.data.sort((O,k)=>O.btnSq-k.btnSq);f(S)}else f([])}catch(P){console.error("버튼 권한 조회 실패:",P),x("버튼 권한을 조회하는 중 오류가 발생했습니다."),f([])}finally{m(!1)}};v.useEffect(()=>{b()},[e,t]);const j=async(P,S)=>{w(O=>({...O,[P]:{loading:!0}}));try{const O=r?.[P];O?await O():console.warn(`버튼 이벤트 핸들러를 찾을 수 없습니다: ${P}`),l&&l(P,S,e)}catch(O){console.error("버튼 이벤트 실행 실패:",O),p.message.error("작업 중 오류가 발생했습니다.")}finally{w(O=>({...O,[P]:{loading:!1}}))}},E=P=>{const S=y[P.btnId]||{loading:!1};return o.jsxs(p.Button,{size:i,loading:S.loading,onClick:()=>j(P.btnId,P.btnNm),className:"bwg-btn",style:{...P.iconVal&&{display:"flex",alignItems:"center",gap:"4px"}},children:[P.iconVal&&o.jsxs(o.Fragment,{children:[P.iconType==="ANTD"&&Ti[P.iconVal]&&v.createElement(Ti[P.iconVal],{style:{fontSize:"14px"}}),P.iconType!=="ANTD"&&o.jsx("span",{className:P.iconVal,style:{fontSize:"14px"}})]}),P.btnNm]},P.btnId)};return h?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Space,{direction:n==="vertical"?"vertical":"horizontal",size:i,children:o.jsx(p.Button,{loading:!0,size:i,children:"권한 조회 중..."})})}):g?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"권한 오류",description:g,type:"error",showIcon:!0,style:{minHeight:"40px"}})}):u.length===0?o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Alert,{message:"부여된 권한이 없습니다",type:"warning",showIcon:!0,style:{height:"20px",display:"flex",alignItems:"center",margin:0,padding:"10px 10px"}})}):o.jsx("div",{className:`bwg-button-group bwg-button-group-${n} ${s||""}`,style:a,children:o.jsx(p.Flex,{gap:3,children:u.map(E)})})},lO=({content:e,layout:t="flex",gap:r=16,minWidth:n=120,maxWidth:i=300,style:a,className:s})=>{if(!(Array.isArray(e)&&e.length>0&&Array.isArray(e[0])))return o.jsx("div",{style:a,className:s,children:e});const c=e.filter(m=>m&&m.length>0),d=v.useMemo(()=>{const m=c[0];if(!m||m.length===0)return{totalCols:0,baseWidth:0};let g=0;const x=[];m.forEach(w=>{const b=w,j=b?.props?.["data-colspan"]?parseInt(String(b.props["data-colspan"])):1;g+=j,x.push(j)});const y=g>0?100/g:0;return{totalCols:g,baseWidth:y,componentWidths:x}},[c]),u=(m,g,x)=>{const y=m,w=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1;switch(t){case"equal":return 100/x;case"auto":return 100/x;case"grid":return 100/d.totalCols*w;case"flex":default:const b=d.baseWidth*w;return Math.max(n,Math.min(i,b))}},f=m=>{if(!m||typeof m!="object")return m;const g=m;if(!g.props)return m;const y={...g.props.style||{},width:"100%"};return v.cloneElement(g,{...g.props,style:y})},h=(m,g)=>{if(!m||m.length===0)return null;const x=m.length;return t==="grid"?o.jsx("div",{className:"erp-cmm-form",style:{display:"grid",gridTemplateColumns:`repeat(${d.totalCols}, 1fr)`,gap:`${r}px`,width:"100%"},children:m.map((y,w)=>{const b=y?.props?.["data-colspan"]?parseInt(String(y.props["data-colspan"])):1,j=f(y);return o.jsx("div",{style:{gridColumn:`span ${b}`,minWidth:`${n}px`},className:"form-component-wrapper",children:j},`row-${g}-col-${w}`)})},`row-${g}`):o.jsx(p.Flex,{gap:r,className:"erp-cmm-form",wrap:t==="auto"?"wrap":"nowrap",style:{width:"100%"},children:m.map((y,w)=>{const b=u(y,w,x),j=f(y),E=t==="flex"?{width:`${b}px`,minWidth:`${n}px`,maxWidth:`${i}px`,flexShrink:0}:{width:`${b}%`,minWidth:`${n}px`};return o.jsx("div",{style:E,className:"form-component-wrapper",children:j},`row-${g}-col-${w}`)})},`row-${g}`)};return o.jsx(p.Flex,{gap:"small",vertical:!0,style:a,className:s,children:c.map((m,g)=>h(m,g+1))})},$e=({children:e,className:t,style:r,...n})=>o.jsx(p.Col,{...n,className:`bwg-col ${t}`,style:r,children:e});var ea={},Nu={exports:{}},Zg;function kc(){return Zg||(Zg=1,(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Nu)),Nu.exports}var ta={},Qg;function cO(){if(Qg)return ta;Qg=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.default=void 0;var e={items_per_page:"/ 페이지",jump_to:"이동하기",jump_to_confirm:"확인하다",page:"페이지",prev_page:"이전 페이지",next_page:"다음 페이지",prev_5:"이전 5 페이지",next_5:"다음 5 페이지",prev_3:"이전 3 페이지",next_3:"다음 3 페이지",page_size:"페이지 크기"};return ta.default=e,ta}var ra={},na={},ia={},Du={exports:{}},_u={exports:{}},Bu={exports:{}},$u={exports:{}},Jg;function G1(){return Jg||(Jg=1,(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})($u)),$u.exports}var Lu={exports:{}},ev;function uO(){return ev||(ev=1,(function(e){var t=G1().default;function r(n,i){if(t(n)!="object"||!n)return n;var a=n[Symbol.toPrimitive];if(a!==void 0){var s=a.call(n,i||"default");if(t(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Lu)),Lu.exports}var tv;function dO(){return tv||(tv=1,(function(e){var t=G1().default,r=uO();function n(i){var a=r(i,"string");return t(a)=="symbol"?a:a+""}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Bu)),Bu.exports}var rv;function fO(){return rv||(rv=1,(function(e){var t=dO();function r(n,i,a){return(i=t(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a,n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(_u)),_u.exports}var nv;function pO(){return nv||(nv=1,(function(e){var t=fO();function r(i,a){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(i);a&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable})),s.push.apply(s,l)}return s}function n(i){for(var a=1;a<arguments.length;a++){var s=arguments[a]!=null?arguments[a]:{};a%2?r(Object(s),!0).forEach(function(l){t(i,l,s[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach(function(l){Object.defineProperty(i,l,Object.getOwnPropertyDescriptor(s,l))})}return i}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Du)),Du.exports}var oa={},iv;function hO(){return iv||(iv=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.commonLocale=void 0,oa.commonLocale={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0}),oa}var ov;function mO(){if(ov)return ia;ov=1;var e=kc().default;Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=void 0;var t=e(pO()),r=hO(),n=(0,t.default)((0,t.default)({},r.commonLocale),{},{locale:"ko_KR",today:"오늘",now:"현재 시각",backToToday:"오늘로 돌아가기",ok:"확인",clear:"지우기",week:"주",month:"월",year:"년",timeSelect:"시간 선택",dateSelect:"날짜 선택",monthSelect:"달 선택",yearSelect:"연 선택",decadeSelect:"연대 선택",yearFormat:"YYYY년",dateFormat:"YYYY-MM-DD",dateTimeFormat:"YYYY-MM-DD HH:mm:ss",monthBeforeYear:!1,previousMonth:"이전 달 (PageUp)",nextMonth:"다음 달 (PageDown)",previousYear:"이전 해 (Control + left)",nextYear:"다음 해 (Control + right)",previousDecade:"이전 연대",nextDecade:"다음 연대",previousCentury:"이전 세기",nextCentury:"다음 세기"});return ia.default=n,ia}var aa={},av;function X1(){if(av)return aa;av=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.default=void 0;const e={placeholder:"시간 선택",rangePlaceholder:["시작 시간","종료 시간"]};return aa.default=e,aa}var sv;function Z1(){if(sv)return na;sv=1;var e=kc().default;Object.defineProperty(na,"__esModule",{value:!0}),na.default=void 0;var t=e(mO()),r=e(X1());const n={lang:Object.assign({placeholder:"날짜 선택",yearPlaceholder:"연도 선택",quarterPlaceholder:"분기 선택",monthPlaceholder:"월 선택",weekPlaceholder:"주 선택",rangePlaceholder:["시작일","종료일"],rangeYearPlaceholder:["시작 연도","종료 연도"],rangeMonthPlaceholder:["시작 월","종료 월"],rangeQuarterPlaceholder:["시작 분기","종료 분기"],rangeWeekPlaceholder:["시작 주","종료 주"],shortWeekDays:["일","월","화","수","목","금","토"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},t.default),timePickerLocale:Object.assign({},r.default)};return na.default=n,na}var lv;function gO(){if(lv)return ra;lv=1;var e=kc().default;Object.defineProperty(ra,"__esModule",{value:!0}),ra.default=void 0;var t=e(Z1());return ra.default=t.default,ra}var cv;function vO(){if(cv)return ea;cv=1;var e=kc().default;Object.defineProperty(ea,"__esModule",{value:!0}),ea.default=void 0;var t=e(cO()),r=e(gO()),n=e(Z1()),i=e(X1());const a="${label} 유효하지 않은 ${type}",s={locale:"ko",Pagination:t.default,DatePicker:n.default,TimePicker:i.default,Calendar:r.default,global:{placeholder:"선택하세요",close:"닫기"},Table:{filterTitle:"필터 메뉴",filterConfirm:"확인",filterReset:"초기화",filterEmptyText:"필터 없음",filterCheckAll:"전체 선택",filterSearchPlaceholder:"필터 검색",emptyText:"데이터 없음",selectAll:"전체 선택",selectInvert:"선택 반전",selectNone:"없음",selectionAll:"전체 선택",sortTitle:"정렬",expand:"펼치기",collapse:"접기",triggerDesc:"내림차순으로 정렬하기",triggerAsc:"오름차순으로 정렬하기",cancelSort:"정렬 취소하기"},Tour:{Next:"다음",Previous:"이전",Finish:"종료"},Modal:{okText:"확인",cancelText:"취소",justOkText:"확인"},Popconfirm:{okText:"확인",cancelText:"취소"},Transfer:{titles:["",""],searchPlaceholder:"여기에 검색하세요",itemUnit:"개",itemsUnit:"개",remove:"삭제",selectCurrent:"현재 페이지 선택",removeCurrent:"현재 페이지 삭제",selectAll:"전체 선택",removeAll:"전체 삭제",selectInvert:"선택 반전"},Upload:{uploading:"업로드 중...",removeFile:"파일 삭제",uploadError:"업로드 실패",previewFile:"파일 미리보기",downloadFile:"파일 다운로드"},Empty:{description:"데이터 없음"},Icon:{icon:"아이콘"},Text:{edit:"수정",copy:"복사",copied:"복사 됨",expand:"확장"},Form:{optional:"(선택사항)",defaultValidateMessages:{default:"필드 유효성 검사 오류 ${label}",required:"${label} 값을 입력해 주세요",enum:"${label} [${enum}] 중에 하나여야 합니다",whitespace:"${label} 비워둘 수 없습니다",date:{format:"${label} 유효하지 않은 날짜 형식입니다",parse:"${label} 날짜 형식으로 변환될 수 없습니다",invalid:"${label} 유효하지 않은 날짜입니다"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"${label} ${len}글자여야 합니다",min:"${label} 적어도 ${min}글자 이상이어야 합니다",max:"${label} ${max}글자 이하여야 합니다",range:"${label} ${min}-${max}글자 사이어야 합니다"},number:{len:"${label} 값은 ${len}이어야 합니다",min:"${label} 최솟값은 ${min}입니다",max:"${label} 최댓값은 ${max}입니다",range:"${label} 값은 ${min}-${max} 사이어야 합니다"},array:{len:"${len}이어야 합니다 ${label}",min:"최소 ${min}이어야 합니다 ${label}",max:"최대 ${max}이어야 합니다 ${label}",range:"${label} ${min}-${max} 사이어야 합니다"},pattern:{mismatch:"${label} ${pattern} 패턴과 일치하지 않습니다"}}},Image:{preview:"미리보기"},QRCode:{expired:"만료된 QR 코드",refresh:"새로고침"},ColorPicker:{presetEmpty:"미정",transparent:"투명",singleColor:"단색",gradientColor:"그라데이션"}};return ea.default=s,ea}var zu,uv;function yO(){return uv||(uv=1,zu=vO()),zu}var xO=yO();const Q1=wr(xO),J1=({children:e,customTheme:t,customComponentSize:r="middle",layout:n="comfortable",getPopupContainer:i})=>{const s=(()=>{const c={token:{colorPrimary:"#1890ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1890ff",fontFamily:'"Noto Sans KR", sans-serif',fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",boxShadowSecondary:"0 2px 4px rgba(0, 0, 0, 0.12)"},algorithm:p.theme.defaultAlgorithm};switch(n){case"compact":return{...c,token:{...c.token,padding:8,margin:8,borderRadius:4,fontSize:12,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}};case"spacious":return{...c,token:{...c.token,padding:24,margin:24,borderRadius:8,fontSize:16,fontSizeHeading1:44,fontSizeHeading2:36,fontSizeHeading3:28,fontSizeHeading4:24,fontSizeHeading5:20}};default:return{...c,token:{...c.token,padding:16,margin:16,borderRadius:6,fontSize:14,fontSizeHeading1:30,fontSizeHeading2:20,fontSizeHeading3:18,fontSizeHeading4:16,fontSizeHeading5:14}}}})(),l={...s,...t,token:{...s.token,...t?.token},components:{Checkbox:{colorPrimary:"var(--check-primary)",colorPrimaryBorder:"var(--check-primary)",colorPrimaryHover:"var(--check-primary-active)",colorText:"var(--text-primary)"},Radio:{colorPrimary:"var(--check-primary)",colorPrimaryActive:"var(--check-primary-active)",colorPrimaryHover:"var(--check-primary-active)",buttonSolidCheckedBg:"var(--button-solid)",buttonSolidCheckedHoverBg:"var(--button-solid-hover)",buttonSolidCheckedActiveBg:"var(--button-solid-hover)"},Tree:{nodeHoverBg:"var(--tree-selected-bg)",nodeHoverColor:"var(--primary-color)",nodeSelectedBg:"var(--tree-selected-bg)",nodeSelectedColor:"var(--primary-color)",colorText:"var(--text-primary)"},Switch:{colorPrimary:"var(--switch-primary)",colorPrimaryHover:"var(--switch-primary)"},Tabs:{inkBarColor:"var(--primary-color)",itemSelectedColor:"var(--primary-color)",itemHoverColor:"var(--button-solid-hover)",itemActiveColor:"var(--button-solid-hover)",itemColor:"var(--text-primary)",horizontalItemGutter:0,horizontalItemPadding:"11px 24px"},Button:{borderColorDisabled:"var(--border-color)",defaultShadow:"none",dangerShadow:"none",iconGap:4},...t?.components??{}}};return o.jsx(p.ConfigProvider,{locale:Q1,theme:l,componentSize:r,space:{size:r},form:{validateMessages:{required:"${label}을(를) 입력해주세요.",types:{email:"${label}이(가) 유효한 이메일이 아닙니다.",number:"${label}이(가) 유효한 숫자가 아닙니다."},number:{range:"${label}은(는) ${min} ~ ${max} 사이의 값이어야 합니다."}}},pagination:{showSizeChanger:!0},getPopupContainer:i,children:e})},bO=({children:e})=>{const{activeDetailItem:t}=it.useMenuViewStore();return o.jsx("div",{className:"bwg-view main-view",style:{height:"100%",display:"flex",flexDirection:"column"},children:o.jsx("div",{className:"bwgview-content",children:o.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[o.jsx(p.Breadcrumb,{separator:">",items:[{title:t?.prntInfo?.menuNm},{title:t?.viewLabel}]}),e]})})})},wO=5,CO=0,Le=({title:e,icons:t,tooltip:r,iconVisible:n=!0,paddingBottom:i,marginBottom:a,children:s})=>{const l=Ti.AppstoreTwoTone,{componentSize:c}=it.useUserStore(),d=v.useMemo(()=>({0:5,1:4,2:3})[c],[c]);v.useMemo(()=>t?.type==="antd"&&t.icon&&Ti[t.icon]||l,[t?.type,t?.icon]);const u=(m,g)=>(m??g).toString().padStart(2,"0"),f=`pb${u(i,CO)}`,h=`mb${u(a,wO)}`;return o.jsx(p.Flex,{vertical:!0,style:{width:"100%"},children:o.jsxs("div",{className:`bwg-title-box ${f} ${h}`,style:{display:"flex",justifyContent:"space-between"},children:[o.jsx("div",{className:"bwg-title-box-left",children:o.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[o.jsx(p.Typography.Title,{level:d,children:o.jsx("span",{children:e})}),r&&o.jsx(p.Tooltip,{title:r.title,placement:r.placement,children:o.jsx(Ti.QuestionCircleTwoTone,{style:{marginLeft:5}})})]})}),o.jsx("div",{className:"bwg-title-box-right",children:o.jsx(p.Flex,{gap:6,children:s})})]})})},{Panel:dv}=p.Collapse,Ro=v.forwardRef(({reqRows:e,subRows:t,border:r=!1,labelDisplay:n,header:i},a)=>{const[s]=p.Form.useForm(),[l,c]=v.useState("1"),{componentSize:d}=it.useUserStore(),u=v.useMemo(()=>{const m={0:12,1:14,2:16},g={0:"small",1:"middle",2:"large"};return{fontSize:m[d],componentSize:g[d]}},[d]),f=()=>n?{flex:n.md||n.lg||n.sm||"100px"}:{flex:"100px"};v.useImperativeHandle(a,()=>({getFormData:()=>s.getFieldsValue(),setFormData:m=>{s.setFieldsValue(m)},resetForm:()=>{s.resetFields()},validateForm:async()=>{try{return{success:!0,data:await s.validateFields()}}catch(m){return{success:!1,error:m}}}}));const h=()=>{c(m=>m.includes("subRows")?m.filter(g=>g!=="subRows"):[...m,"subRows"])};return o.jsxs("div",{style:r?{border:"1px solid #ddd",padding:"10px 12px",borderRadius:"8px",marginBottom:"10px"}:{},children:[i&&o.jsx(Le,{title:i.title,children:i.buttons}),o.jsx(p.ConfigProvider,{componentSize:u.componentSize,theme:{token:{fontSize:u.fontSize},components:{Collapse:{}}},children:o.jsx(p.Form,{form:s,layout:"inline",style:{width:"100%",fontSize:`${u.fontSize}px`},labelCol:f(),labelAlign:"left",children:o.jsxs("div",{style:{position:"relative",width:"100%"},children:[t&&o.jsx("div",{style:{position:"absolute",top:"15px",left:"-9px",zIndex:10},children:l.includes("subRows")?o.jsx(p.Tooltip,{title:"접기",children:o.jsx("span",{className:"search-collapsed-arrow",onClick:h,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:o.jsx("path",{d:"M5.28321 0.986589C4.88285 0.482264 4.11715 0.482265 3.71679 0.986589L1.0243 4.37824C0.50404 5.0336 0.970753 6 1.80751 6L7.19249 6C8.02925 6 8.49596 5.0336 7.9757 4.37824L5.28321 0.986589Z",fill:"#AEB9C4"})})})}):o.jsx(p.Tooltip,{title:"펼치기",children:o.jsx("span",{className:"search-collapsed-arrow",onClick:h,children:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"6",viewBox:"0 0 9 6",fill:"none",children:o.jsx("path",{d:"M5.28321 5.01341C4.88285 5.51774 4.11715 5.51773 3.71679 5.01341L1.0243 1.62176C0.50404 0.966397 0.970753 1.64312e-07 1.80751 2.37464e-07L7.19249 7.08234e-07C8.02925 7.81386e-07 8.49596 0.966399 7.9757 1.62176L5.28321 5.01341Z",fill:"#AEB9C4"})})})})}),o.jsxs(p.Collapse,{activeKey:["reqRows",...l.includes("subRows")?["subRows"]:[]],onChange:c,className:"searchbox-collapse",bordered:!1,ghost:!0,children:[e&&o.jsx(dv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"disabled",children:e},"reqRows"),t&&o.jsx(dv,{style:{padding:0,margin:0},header:void 0,showArrow:!1,collapsible:"icon",children:t},"subRows")]})]})})})]})}),dn=({children:e,showSearchBox:t,showCloseButton:r=!0,showEyesButton:n=!1,shotSettingButton:i=!0,styles:a,...s})=>{const[l,c]=v.useState(!0),[d,u]=v.useState(()=>{const w=s.placement;return w==="left"||w==="right"||w==="top"||w==="bottom"?w:"bottom"}),[f,h]=v.useState(!1),g=(w=>{const b={wrapper:{...s.width&&{width:s.width},...s.height&&{height:s.height},margin:"0 auto"},content:{},header:{backgroundColor:"var(--drawer-header-bg)",color:"var(--text-primary)"}};switch(w){case"bottom":return{...b,wrapper:{...b.wrapper,borderRadius:"30px 30px 0 0"},content:{borderRadius:"30px 30px 0 0"},header:{...b.header,borderRadius:"30px 30px 0 0"}};case"top":return{...b,wrapper:{...b.wrapper,borderRadius:"0 0 30px 30px"},content:{borderRadius:"0 0 30px 30px"},header:{...b.header}};case"left":return{...b,wrapper:{...b.wrapper,borderRadius:"0 30px 0px 0"},content:{borderRadius:"0 30px 0px 0"},header:{...b.header,borderRadius:"0 30px 0 0"}};case"right":return{...b,wrapper:{...b.wrapper,borderRadius:"30px 0 0 0"},content:{borderRadius:"30px 0 0 0"},header:{...b.header,borderRadius:"30px 0 0 0"}};default:return b}})(d),x={wrapper:{...g?.wrapper,...a?.wrapper},content:{...g?.content,...a?.content},header:{...g?.header,...a?.header}},y=()=>{const w=[];if(i){const b=[{key:"top",label:"상단",icon:o.jsx(X.CaretUpOutlined,{})},{key:"right",label:"우측",icon:o.jsx(X.CaretRightOutlined,{})},{key:"bottom",label:"하단",icon:o.jsx(X.CaretDownOutlined,{})},{key:"left",label:"좌측",icon:o.jsx(X.CaretLeftOutlined,{})}],j=o.jsx(p.Space.Compact,{children:b.map(E=>o.jsx(p.Button,{type:d===E.key?"primary":"default",size:"small",onClick:()=>{u(E.key),h(!1)},icon:E.icon},E.key))});w.push(o.jsx(p.Popover,{content:j,trigger:"click",placement:"left",open:f,onOpenChange:h,children:o.jsx(p.Tooltip,{placement:"bottom",title:"위치변경",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.SettingOutlined,{}),type:"text",size:"middle"})})},"shotSetting"))}return n&&w.push(o.jsx(p.Tooltip,{placement:"bottom",title:l?"배경 보기":"배경 숨기기",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.EyeOutlined,{}),type:"text",size:"middle",onClick:()=>c(!l)})},"eyes")),s.extra&&w.push(o.jsx("div",{style:{margin:"0 8px"},children:s.extra},"extra")),r&&w.push(o.jsx(p.Tooltip,{placement:"bottom",title:"닫기",zIndex:2100,children:o.jsx(p.Button,{icon:o.jsx(X.CloseOutlined,{}),onClick:s.onClose,type:"text",size:"middle"})},"close")),w};return o.jsx(p.Drawer,{className:"main-drawer",footer:!0,...s,placement:d,styles:x,maskClosable:!1,closable:!1,mask:l,extra:o.jsx(p.Space,{size:"small",align:"center",children:y()}),afterOpenChange:w=>{w||(c(!0),u(s.placement)),s.afterOpenChange?.(w)},destroyOnHidden:!0,children:t?o.jsxs(ze,{type:"vertical",children:[o.jsxs(p.Flex,{justify:"space-between",align:"center",style:{width:"100%"},children:[o.jsx("div",{children:t.title}),o.jsx(p.Flex,{gap:2,children:t.extra})]}),o.jsx(Ro,{...t.searchBox}),o.jsx(p.Divider,{}),e]}):e})},Ie=({width:e="100%",height:t="100%",boxAlign:r,display:n="show",overflow:i,style:a,className:s,border:l=!0,children:c,ref:d})=>o.jsx("div",{style:{width:e,height:t,display:n==="show"?"":n,overflowX:i?.x,overflowY:i?.y,...a},className:`bwgview-content-box ${r?`content-box-${r}`:""} ${s||""} ${l?"":"none-box-st"}`,ref:d,children:c}),ew=Yg?.default??Yg;try{q1.register("modules/imageResize",ew)}catch(e){console.warn("quill-image-resize-module-react 로드 실패:",e)}const _l=e=>rO.sanitize(e??"",{ALLOWED_TAGS:["p","br","div","span","strong","b","em","i","u","s","blockquote","pre","code","ul","ol","li","h1","h2","h3","h4","h5","h6","a","img"],ALLOWED_ATTR:["style","class","href","target","rel","src","alt","width","height","data-*","align"],ALLOWED_URI_REGEXP:/^(?:(?:https?|data|mailto|tel):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,KEEP_CONTENT:!0,RETURN_TRUSTED_TYPE:!1}),Bl=v.forwardRef(({border:e=!0,editorProps:t,value:r,defaultValue:n,onChange:i,onBlur:a,disabled:s,placeholder:l},c)=>{const{isEditing:d=!0,title:u,containerHeight:f="100%"}=t||{},h=v.useRef(null),m=v.useMemo(()=>{const E={toolbar:d?[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{align:[]}],["link","image"],["clean"]]:!1};return ew?{...E,imageResize:{parchment:q1.import("parchment"),modules:["Resize","DisplaySize","Toolbar"],displayStyles:{backgroundColor:"black",border:"none",color:"white"}}}:E},[d]),g=v.useMemo(()=>["header","bold","italic","underline","strike","color","background","list","bullet","indent","align","link","image","width","height"],[]),x=r!==void 0,[y,w]=v.useState(n??""),b=x?r:y,j=v.useCallback((E,P,S,O)=>{const k=_l(E??"");x||w(k),i?.(k,P,S,O)},[x,i]);return v.useImperativeHandle(c,()=>({getHTML:()=>b??"",getText:()=>h.current?.getEditor()?.getText()??"",insertHTML:E=>{const P=h.current?.getEditor();if(!P)return;const S=P.getSelection(!0),O=_l(E??"");P.clipboard.dangerouslyPasteHTML(S?S.index:P.getLength(),O)},insertImage:(E,P)=>{const S=h.current?.getEditor();if(!S)return;const O=S.getSelection(!0),k=typeof E=="string"?E:"";S.insertEmbed(O?O.index:S.getLength(),"image",k,"user")},getQuill:()=>h.current?.getEditor?.()??null})),o.jsx(Ie,{border:e,style:{opacity:s?.6:1,pointerEvents:s?"none":"auto",height:typeof f=="number"?`${f}px`:f,minHeight:0},children:o.jsxs("div",{className:"bwg-editor-wrap",style:{width:"100%",height:"100%",display:"flex",flexDirection:"column"},children:[u&&o.jsx(Le,{...u,paddingBottom:10}),o.jsx(nO,{ref:h,theme:d?"snow":"bubble",readOnly:!d,value:b,onChange:j,onBlur:a,modules:m,formats:g,style:{width:"100%",display:"flex",flexDirection:"column",minHeight:0,flex:"1"},placeholder:l},d?"snow":"bubble")]})})}),SO=(e,t,r,n)=>_l(e??""),jO=({itemProps:e,...t})=>{const{rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s}=e;return o.jsx(p.Form.Item,{valuePropName:"value",trigger:"onChange",getValueFromEvent:SO,normalize:l=>l??"",rules:r,shouldUpdate:n,dependencies:i,noStyle:a,...s,children:o.jsx(Bl,{...t})})},PO=e=>{const{itemProps:t,onChange:r,editorProps:n,...i}=e,a=p.Form.useFormInstance();if(t?.name!=null){const s=t.name;return o.jsxs(o.Fragment,{children:[o.jsx(p.Form.Item,{hidden:!0,name:s,rules:t.rules,normalize:l=>l??"",children:o.jsx("input",{type:"hidden"})}),o.jsx(Bl,{...i,editorProps:n,value:a.getFieldValue(s)??"",onChange:(l,c,d,u)=>{const f=_l(l??"");a.setFieldValue(s,f),r?.(f,c,d,u)},onBlur:()=>{a.validateFields([s]).catch(()=>{})}})]})}return o.jsx(Bl,{...e})},kh=Object.assign(PO,{FormItem:jO,Core:Bl});var to={},fv;function EO(){if(fv)return to;fv=1;var e=mo;if(process.env.NODE_ENV==="production")to.createRoot=e.createRoot,to.hydrateRoot=e.hydrateRoot;else{var t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;to.createRoot=function(r,n){t.usingClientEntryPoint=!0;try{return e.createRoot(r,n)}finally{t.usingClientEntryPoint=!1}},to.hydrateRoot=function(r,n,i){t.usingClientEntryPoint=!0;try{return e.hydrateRoot(r,n,i)}finally{t.usingClientEntryPoint=!1}}}return to}var OO=EO();const ts=v.forwardRef(({currentPage:e,totalPages:t,pageSize:r=10,totalData:n,onPageChange:i,pageSizeOptions:a=[10,20,50,100],gridRef:s,mode:l="client",onServerPageChange:c},d)=>{const[u,f]=v.useState(r),[h,m]=v.useState(1),[g,x]=v.useState(r),[y,w]=v.useState(0);v.useEffect(()=>{f(r)},[r]),v.useEffect(()=>{f(r)},[]),v.useImperativeHandle(d,()=>({currentPage:h,pageSize:g,totalData:y,totalPages:Math.ceil(y/g),setPage:_=>{m(_),c?.(_,g)},setPageSize:_=>{x(_),m(1),c?.(1,_)},setTotalData:_=>{w(_)},reset:()=>{m(1),x(r),w(0)}}),[h,g,y,c,r]);const b=l==="client",j=b?(e||0)+1:h,E=b?(t||0)>0:y>0,S=b?E?Math.ceil((n||0)/u):0:Math.ceil(y/g),O=b?E&&n||0:y,k=Math.min(j,S||1),A=`${u}-${S}-${k}`,D=_=>{b?i?.(_-1):(m(_),c?.(_,g))},B=_=>{if(b){f(_);try{s?.current?.gridView?(s.current.gridView.setPaging(!0,_),s.current.gridView.setPage(0)):i?.(0)}catch($){console.warn("페이지 사이즈 변경 중 오류:",$),i?.(0)}}else x(_),m(1),c?.(1,_)};return o.jsxs("div",{className:"bwg-pagination-container",style:{padding:"10px",display:"flex",justifyContent:"center",alignItems:"center",borderTop:"1px solid #dddddd",position:"relative"},children:[o.jsxs("div",{style:{position:"absolute",left:10,display:"flex",alignItems:"center",gap:"8px"},children:[o.jsx("span",{style:{fontSize:"12px",color:"#333333"},children:"페이지당"}),o.jsx("select",{value:b?u:g,onChange:_=>B(Number(_.target.value)),disabled:!E,style:{padding:"4px 8px",border:"1px solid #d9d9d9",borderRadius:"6px",fontSize:"12px",color:"#333333",opacity:E?1:.5},children:a.map(_=>o.jsxs("option",{value:_,children:[_,"개"]},_))}),o.jsxs("span",{style:{fontSize:"12px",color:"#666",opacity:E?1:.5},children:["/ 총 ",O,"개"]})]}),o.jsx("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultBorderColor:"#e8e8e8",defaultHoverBorderColor:"var(--primary-color)",defaultHoverColor:"var(--text-primary)",contentFontSize:13,defaultColor:"var(--text-primary)",paddingInline:0}}},children:[o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>D(1),disabled:!E||k===1,style:{width:"26px",height:"26px",border:0,background:!E||k===1?"#f1f1f1":"white",cursor:!E||k===1?"not-allowed":"pointer",opacity:E?1:.5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[o.jsx("path",{d:"M12 17L7 12L12 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M17 17L12 12L17 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})}),o.jsx(p.Button,{onClick:()=>D(k-1),disabled:!E||k===1,style:{width:"26px",height:"26px",border:0,background:!E||k===1?"#f1f1f1":"white",cursor:!E||k===1?"not-allowed":"pointer",opacity:E?1:.5},icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:o.jsx("path",{d:"M14 17L9 12L14 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})})]}),o.jsx("div",{style:{display:"flex",alignItems:"center",gap:6},children:(()=>{if(!E||S===0)return o.jsx(p.Button,{disabled:!0,style:{width:"26px",height:"26px"},children:"1"});const _=5;let $=1,W=Math.min(_,S);k>3&&S>_&&($=Math.max(1,k-2),W=Math.min(S,$+_-1),W===S&&($=Math.max(1,W-_+1)));const T=[];for(let N=$;N<=W;N++)T.push(o.jsx(p.Button,{onClick:()=>D(N),style:{width:"26px",height:"26px",background:k===N?"var(--primary-color)":"#ffffff",color:k===N?"#ffffff":"#333333",cursor:"pointer"},children:N},N));return T})()},A),o.jsxs(p.ConfigProvider,{theme:{components:{Button:{defaultColor:"#999999",defaultHoverColor:"var(--text-primary)"}}},children:[o.jsx(p.Button,{onClick:()=>D(k+1),disabled:!E||k>=S,style:{width:"26px",height:"26px",border:0,background:!E||k>=S?"#f1f1f1":"white",cursor:!E||k>=S?"not-allowed":"pointer",opacity:E?1:.5},icon:o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:o.jsx("path",{d:"M10 17L15 12L10 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})})}),o.jsx(p.Button,{onClick:()=>D(S),disabled:!E||k>=S,style:{width:"26px",height:"26px",border:0,background:!E||k>=S?"#f1f1f1":"white",cursor:!E||k>=S?"not-allowed":"pointer",opacity:E?1:.5},icon:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:[o.jsx("path",{d:"M12 17L17 12L12 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o.jsx("path",{d:"M7 17L12 12L7 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]})})]})]})})]})});ts.displayName="BwgPagination";const kO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZZDLDcJADETHUe7QQVJC6AAqACoAKkCcESh8JI60kBKgg3TA0kE6gAISzHgj0BJ8sWw/j2cXCCI7aD446g2diDp1aWyWaz9sxmHhNlJSyUCDnlQeQpEKm5UCDwgqvHBnTji4MvcEKGw3FsVFDeCmCCbMYwIpQY4wMnX5mj5pKrXfTFSxc1sp/o03yLlZaoSpRFhme53/QF4FmNl9txbH8wuC5893tEo1PZivBs6/sgVXBlv9BpvVRX62Og6eAAAAAElFTkSuQmCC",TO="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC7SURBVHgBZVDbDcIwDHSiqL90AzoCI5S/fvQBEwATIDYoE7BCRwjqAtmAsEE3gAlqzlFBKbXknJ2cL5cQRcF13SIf9Bd63mmHdcN5nsbbJm6UtY6bxlGaCunNZZmTUpniqhpQvIhZ8AlcI+9QXYHYIb3BgQ0ETAJ36BvUmQiDuBV19TNdFBkliUyK0lX1fbc0bkyL1WF6D7UzbBxnpKCi9YHG0UPeoz6BePt+h55UxMMA9NMrPa68BDLiAxmcQh0cAM62AAAAAElFTkSuQmCC",MO=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"}],RO=[{label:"엑셀다운로드",tag:"excel"},{label:"엑셀(들여쓰기 표시)",tag:"showIndentExcel"},{label:"엑셀(제목포함)",tag:"withTitleExcel"},{label:"-"},{label:"필터",type:"check",checked:!1,tag:"filter"},{label:"열고정",tag:"fixedCol"},{label:"행고정",tag:"fixedRow"},{label:"고정해제",tag:"fixedCancel"},{label:"-"},{label:"숨기기",tag:"hide"},{label:"숨기기해제",tag:"hideClear"}],AO=({children:e})=>{const[t,r]=v.useState(!1),[n,i]=v.useState(null);return t?o.jsx("div",{style:{padding:"20px",border:"1px solid #ff4d4f",borderRadius:"6px",backgroundColor:"#fff2f0",margin:"10px"},children:o.jsx(p.Alert,{message:"리얼그리드 로드 실패",description:o.jsxs("div",{children:[o.jsx("p",{children:"리얼그리드 라이센스 또는 초기화 중 오류가 발생했습니다."}),o.jsxs("p",{style:{fontSize:"12px",color:"#666",marginTop:"8px"},children:["오류: ",n?.message||"알 수 없는 오류"]}),o.jsx(p.Button,{type:"primary",size:"small",style:{marginTop:"8px"},onClick:()=>{r(!1),i(null),window.location.reload()},children:"다시 시도"})]}),type:"error",showIcon:!0})}):o.jsx(IO,{onError:a=>{console.error("BwgGrid 에러:",a),i(a),r(!0)},children:e})};class IO extends v.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,r){this.props.onError(t)}render(){return this.state.hasError?null:this.props.children}}const Fe=v.forwardRef(({type:e="nrml",gridDivStyle:t,gridDivClassName:r,gridColumns:n,gridOptions:i,gridEvents:a,bindRef:s,gridContext:l,renderers:c,gridInitCallback:d},u)=>{const f=v.useRef(null),h=v.useRef(new Map),m=v.useRef(null),{gridSize:g}=it.useUserStore(),x=(V,M,K,L)=>{let Y=[],ee=[];const ae="treeNode";for(let le in V){let pe=V[le];Y[pe[K]]=V[le];let Pe=Y[pe[M]];if(Pe==null||Pe=="-"){ee.push(pe);continue}Pe[ae]==null&&(Pe[ae]=[]),Pe[ae].push(pe)}return ee},y=v.useCallback(V=>{const M=L=>{const Y=[];return L.forEach(ee=>{ee.children&&ee.children.length>0?Y.push(...M(ee.children)):Y.push(ee)}),Y};return M(V).map(L=>({fieldName:L.fieldName,dataType:L.dataType||"text"}))},[]),w=v.useCallback(V=>{const M=L=>{const Y=[];return L.forEach(ee=>{ee.children&&ee.children.length>0?Y.push(...M(ee.children)):Y.push(ee)}),Y};return M(V).map(L=>({...L,header:{...L.header,template:L.required?`<img src='${TO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:L.editable?`<img src='${kO}' style='margin-top:4px; margin-right: 2px;' alt='Required input' >\${headerText} `:"${headerText}",values:{headerText:L.header?.text??""},text:L.header?.text||""},styleName:L.dataType==="number"?"right":L.styleName||"center"}))},[]);v.useImperativeHandle(u,()=>({addAllData(V,M){const K=f.current?.gridView.getCurrent().dataRow;if(f.current?.dataProvider instanceof wt.LocalDataProvider){f.current.dataProvider.clearRows();try{f.current?.gridView.showLoading(),f.current.dataProvider.setRows(V)}catch(L){console.error("fillJsonData 오류:",L)}finally{f.current?.gridView.closeLoading()}}if(f.current?.dataProvider instanceof wt.LocalTreeDataProvider){if(f.current.dataProvider.clearRows(),M?.treeOption?.dataField==null||M?.treeOption?.parentField==null)return;const L={rows:"treeNode"};try{f.current?.gridView.showLoading();let Y=x(V,M.treeOption?.parentField,M.treeOption?.dataField);f.current.dataProvider.fillJsonData({treeNode:Y},L),M.treeOption.isExpand&&f.current.gridView?.expandAll()}catch(Y){console.error("fillJsonData 오류:",Y)}finally{f.current?.gridView.closeLoading()}}M?.isCurrent?f.current?.gridView.setCurrent({dataRow:K}):f.current?.gridView.setCurrent({dataRow:0})},getGridInstance:()=>f.current,getCurrentRow:()=>f.current?.gridView.getCurrent().dataRow??-1,getCurrentIndex:()=>f.current?.gridView.getCurrent().itemIndex??-1,gridExcelDown(V){f.current?.gridView.exportGrid({type:"excel",target:"local",allItems:!1,lookupDisplay:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!V?.indenting,header:"default",footer:"default",sheetName:"",fileName:V?.fileName||"sample.xlsx",...V})},getGridSaveData:()=>{const V=f.current?.dataProvider?.getAllStateRows();if(V===void 0)return[{}];let M=[];if(V.created!==void 0&&V.created.length>0)for(const K in V.created){let L=f.current?.dataProvider?.getJsonRow(V.created[K]);L={...L,iudFlag:"I"},M.push(L)}if(V.updated!==void 0&&V.updated.length>0)for(const K in V.updated){let L=f.current?.dataProvider?.getJsonRow(V.updated[K]);L={...L,iudFlag:"U"},M.push(L)}if(V.deleted!==void 0&&V.deleted.length>0)for(const K in V.deleted){let L=f.current?.dataProvider?.getJsonRow(V.deleted[K]);L={...L,iudFlag:"D"},M.push(L)}return M},deleteGridData:()=>{f?.current?.gridView?.getCheckedItems()?.map(M=>{let K=f?.current?.gridView?.getDataRow(M)??-1;const L=f?.current?.dataProvider?.getRowState(K);L==wt.RowState.DELETED?(f?.current?.dataProvider?.setRowState(K,h.current.get(M)??wt.RowState.NONE),h.current.delete(M)):L==wt.RowState.CREATED?f?.current?.dataProvider?.setRowState(K,wt.RowState.CREATE_AND_DELETED):L==wt.RowState.CREATE_AND_DELETED?f?.current?.dataProvider?.setRowState(K,wt.RowState.CREATED):(h.current.set(M,L??wt.RowState.NONE),f?.current?.dataProvider?.setRowState(K,wt.RowState.DELETED)),f?.current?.gridView?.checkItem(M,!1)})},_oriRowState:[{}],dp:f.current?.dataProvider??null,vw:f.current?.gridView??null}));const b=v.useCallback((V,M,K)=>{if(s!==void 0&&K>=0){let L=V.getDataSource().getJsonRow(K);s?.current?.setFieldsValue(L)}else s!==void 0&&K<0&&s?.current?.resetFields();V.setCurrent({dataRow:0}),a?.onCurrentRowChanged&&a?.onCurrentRowChanged(V,M,K)},[s,a]),j=v.useCallback((V,M,K)=>{const L=M.fieldName??"";s?.current?.getFieldInstance(L)&&s?.current.setFieldValue(L,K),a?.onEditChange&&a?.onEditChange(V,M,K)},[s,a]),E=v.useCallback((V,M,K)=>{const L=V.getOrgFieldName(K),Y=V.getValue(M,K);s?.current?.setFieldValue(L,Y)},[s]),P=v.useCallback((V,M,K,L)=>{const Y=V.getColumn(L).name??"",ee=V.getValue(M,L);s?.current?.getFieldInstance(Y)&&s?.current.setFieldValue(Y,ee),a?.onCellEdited&&a?.onCellEdited(V,M,K,L)},[s,a]),S=v.useCallback((V,M,K,L)=>{if(typeof M.dataRow=="number"&&M.dataRow!=-1){var Y=V.getDataSource().getRowState(M.dataRow);if(Y=="deleted"||Y=="createAndDeleted")return!1}return a?.onShowEditor!=null&&a?.onShowEditor(V,M,K,L),!0},[s,a]),O=v.useCallback(V=>{if(!f.current)return;const M=f.current.gridView,K=M.getDataSource();if(i?.container?.page){const L=M.getPage(),Y=M.getPageCount(),ee=K.getRowCount();G({currentPage:L,totalPages:Y,totalData:ee})}},[i?.container?.page]),k=v.useCallback(()=>{if(!f.current)return;const V=f.current.gridView,M=V.getDataSource(),K=["onKeyDown"],L=["onRowInserted"];Object.keys(a??{}).map(Y=>{K.includes(Y)?V[Y+"Add"]=a?.[Y]:V[Y]=a?.[Y],L.includes(Y)?M[Y+"Add"]=a?.[Y]:M[Y]=a?.[Y]}),M instanceof wt.LocalDataProvider&&(M.onRowInserted=(Y,ee)=>{ee<0||(setTimeout(function(){V?.setCurrent({dataRow:ee})},1),Y.onRowInsertedAdd!==void 0&&Y.onRowInsertedAdd(Y,ee))}),V.onKeyDown=function(Y,ee){if(ee.code=="Space"){let ae=Y.getSelectedItems(!0);for(const le in ae)Y.isCheckable(ae[le])&&(Y.isCheckedItem(ae[le])?Y.checkItem(ae[le],!1,!1):Y.checkItem(ae[le],!0,!1))}return Y.onKeyDownAdd!==void 0&&Y.onKeyDownAdd(Y,ee),!0},f.current.gridView.onCurrentRowChanged=b,f.current.gridView.onEditChange=j,f.current.gridView.getDataSource().onValueChanged=E,f.current.gridView.onCellEdited=P,f.current.gridView.onShowEditor=S,f.current.gridView.onDataLoadComplated=O},[b,j,E,P,S,O]),A=v.useCallback(V=>{if(V){try{V.gridView.setSortingOptions({enabled:!0}),V.gridView.sortMode=wt.SortMode.EXPLICIT,V.gridView.editorOptions.viewGridInside=!0,V.gridView instanceof wt.TreeView&&V.gridView.setTreeOptions({expandWhenSetData:wt.ExpandWhenSetData.REMAIN_AND_EXPAND,expanderIconStyle:wt.TreeExpanderIconStyle.SQUARE,iconVisible:!1,lineVisible:!0});const M=()=>({0:25,1:30,2:43})[g];V.gridView.setDisplayOptions({showEmptyMessage:!0,emptyMessage:"조회된 데이터가 존재하지 않습니다.",useFocusClass:!0,minRowHeight:i?.display?.minRowHeight||25,maxRowHeight:i?.display?.maxRowHeight||100,rowHeight:M(),rowChangeDelay:i?.display?.rowChangeDelay||0,selectionStyle:i?.display?.selectionStyle||wt.SelectionStyle.ROWS,fitStyle:i?.display?.fitStyle||wt.GridFitStyle.FILL,useAlternateRowStyle:i?.display?.useAlternateRowStyle||!1}),V.gridView.setEditOptions({commitWhenExitLast:!0,columnEditableFirst:!1,commitByCell:!0,commitWhenLeave:!0,crossWhenExitLast:!0,confirmWhenDelete:!1,deletable:!1,revertable:!1,showOnlyValidationMessage:!0,editable:i?.edit?.editable||!1,validateOnEdited:i?.edit?.validateOnEdited||!1}),V.gridView.setCopyOptions({singleMode:i?.copy?.singleMode||!1}),V.gridView.setPasteOptions({selectBlockPaste:!0,checkReadOnly:!0,throwValidationError:!1}),V.gridView.header.height=i?.header?.height||43,V.gridView.header.styleName=i?.header?.styleName||"bwgGridHeader",i?.container?.radio?V.gridView.setCheckBar({exclusive:i?.container?.radio||!1}):V.gridView.setCheckBar({visible:i?.container?.check||!1,showAll:i?.container?.checkAll||!1}),V.gridView.setStateBar({visible:i?.container?.state||!1}),V.gridView.rowIndicator.visible=i?.container?.indicator||!1,V.gridView instanceof wt.GridView&&(V.gridView.groupPanel.visible=i?.container?.panel||!1),V.gridView.setFooters({visible:i?.container?.footer||!1}),V.gridView.setHeader({visible:i?.container?.header||!0,showTooltip:i?.container?.headerShowTooltip||!1}),V.gridView.formatOptions.numberFormat="#,##0"}catch(M){console.log("그리드 옵션 설정 중 오류:",M)}try{V.gridView instanceof wt.TreeView?V.gridView.setContextMenu(RO):V.gridView.setContextMenu(MO),V.gridView.onContextMenuItemClicked=function(M,K,L){if(!(!L||!L.column)){if(K.tag=="excel")T(M,{isTitle:!1},l?.excel);else if(K.tag=="showIndentExcel")T(M,{isTitle:!1,treeBlank:!0},l?.excel);else if(K.tag=="withTitleExcel")T(M,{isTitle:!0,treeBlank:!1},l?.excel);else if(K.tag=="filter")N(M,K);else if(K.tag=="fixedCol"){const ee=M.getDataSource().getFieldIndex(L.column);M.setFixedOptions({colCount:ee})}else if(K.tag=="fixedRow")M.setFixedOptions({rowCount:(L.itemIndex||0)+1});else if(K.tag=="fixedCancel")M.setFixedOptions({colCount:0,rowCount:0});else if(K.tag=="hide")M.setColumnProperty(L.column,"visible",!1),M._hideCols[M._hideCols.length]=L.column;else if(K.tag=="hideClear")for(var Y=0;Y<M._hideCols.length;Y++)M.setColumnProperty(M._hideCols[Y],"visible",!0)}}}catch(M){console.log("컨텍스트 설정 중 오류:",M)}}},[i,g]),D=V=>{if(!(!c||c.length===0))try{c.forEach(M=>{const{name:K,renderer:L}=M;if(K&&L){const Y=typeof L=="function"?new L:L;V.gridView.registerCustomRenderer(K,Y)}})}catch(M){console.error("커스텀 렌더러 초기화 중 오류:",M)}},B=V=>{V.onPageChanged=(M,K)=>{G(L=>({...L,currentPage:K}))},V.onPageCountChanged=(M,K)=>{G(L=>({...L,totalPages:K}))}},_=V=>{f.current?.gridView&&f.current.gridView.setPage(V)},$=V=>{if(i?.layout?.colspan&&i.layout.colspan.length>0&&i?.layout?.colspan.forEach(M=>{const K=V.gridView.layoutByColumn(M.fieldName);if(K){const L=M.span;K.spanCallback=function(Y,ee,ae){return L}}}),n&&n.length>0&&n.some(K=>K.children&&K.children.length>0))try{(()=>{const L=JSON.parse(JSON.stringify(n)),Y=[],ee=ae=>{const le=[];return ae.children.map(pe=>{if(pe.children&&pe.children.length>0){const Pe=ee(pe),Re=pe.header?.text||pe.fieldName,Be=V.gridView.getColumnProperty(pe.fieldName,"header");delete pe.children,delete pe.header;let Ae={name:pe.fieldName,header:{text:Be?.text||Re,template:Be?.template,values:Be?.values,visible:Be?.visible??!0},items:Pe,...pe};le.push(Ae)}else le.push(pe.fieldName)}),le};L.map(ae=>{if(ae.children&&ae.children.length>0){const le=ee(ae),pe=ae.header?.text||ae.fieldName,Pe=ae.header?.visible??!0,Re=V.gridView.getColumnProperty(ae.fieldName,"header");delete ae.children,delete ae.header;const Be={name:ae.fieldName,header:{text:Re?.text||pe,template:Re?.template,values:Re?.values,visible:Re?.visible||Pe},items:le,...ae};Y.push(Be)}else Y.push(ae.fieldName)}),console.log("Final Layout!!",Y),V.gridView.setColumnLayout(Y)})()}catch(K){console.error("컬럼 레이아웃 설정 오류:",K)}},W=()=>{if(f.current){if(e==="nrml"){const V=f.current;if(A(V),D(V),n&&n.length>0){const M=y(n),K=w(n);V.gridView.getDataSource().setFields(M),V.gridView.setColumns(K)}if($(V),i?.container?.page){const M=i?.pagingOption?.pageSize||10;V.gridView.setPaging(!0,M),B(V.gridView)}}else{const V=f.current;if(A(V),D(V),n&&n.length>0){const M=y(n),K=w(n);V.gridView.getDataSource().setFields(M),V.gridView.setColumns(K)}$(f.current)}setTimeout(()=>{if(d){const V=typeof u=="object"&&u!==null?u.current:null;d(V)}},0)}},T=(V,M,K)=>{const L=V.getDataSource();let Y=K?.footer==null?"default":K.footer;L.getRowCount()<1&&(Y="hidden");let ee={type:"excel",target:"local",allItems:!1,lookupDisplay:!0,compatibility:!0,showProgress:!0,progressMessage:"엑셀 Export 중 입니다.",applyDynamicStyles:!1,separateRows:!0,indenting:!!M?.treeBlank,footer:Y,sheetName:"",documentTitle:{},documentSubtitle:{},documentTail:{},fileName:K?.fileName||"sample.xlsx"};L instanceof wt.LocalTreeDataProvider&&(ee.indenting=!!M?.treeBlank),K?.isCellMerge==!0&&(ee.separateRows=!1),oe.isEmpty(K?.sheetName)==!1&&(ee.sheetName=K?.sheetName),M?.isTitle&&(ee.documentTitle={message:oe.isSafeEmpty(K?.mainTitle,"No Title"),visible:!0,styleName:"documentStyle",spaceTop:1,spaceBottom:0,height:43},oe.isEmpty(K?.subTitle)==!1&&(ee.documentSubtitle={message:K?.subTitle,visible:!0,styleName:"center",height:20}),oe.isEmpty(K?.tailTitle)==!1&&(ee.documentTail={message:K?.tailTitle,visible:!0,styleName:"documentStyle"})),V.exportGrid(ee)},N=(V,M)=>{const K=V.getDataSource(),L=K.getOrgFieldNames();if(M.checked)for(var Y=0;Y<L.length;Y++){let ae=[],le=K.getDistinctValues(L[Y])??[];if(le.length==0)continue;let pe=V.columnByName(L[Y]);for(var ee=0;ee<le.length;ee++){if(le[ee]==null)continue;let Pe=pe.values!=null&&pe.values.indexOf(le[ee])!=-1?pe?.labels?.[pe.values.indexOf(le[ee])]:le[ee];oe.isEmpty(Pe)&&(oe.isEmpty(le[ee])?Pe=" ":Pe=le[ee]);let Re="";le[ee]==null?Re="value="+le[ee]:Re="value='"+le[ee]+"'",ae.push({name:Pe,criteria:Re})}V.setColumnFilters(L[Y],ae)}else for(var Y=0;Y<L.length;Y++)V.clearColumnFilters(L[Y]),V.activateAllColumnFilters(L[Y],!1),V.clearColumnFilters(L[Y])};v.useEffect(()=>{if(!f.current?.gridView)return;const V=()=>({0:25,1:30,2:43})[g],M=()=>({0:12,1:13,2:14})[g];f.current.gridView.setDisplayOptions({rowHeight:V()}),m.current&&m.current.style.setProperty("--bwg-grid-font-size",`${M()}px`)},[g,i?.display?.rowHeight]),v.useEffect(()=>{if(f.current&&f.current.gridView)if(e==="nrml"){const V=f.current;A(V)}else{const V=f.current;A(V)}},[e,i,A]),v.useEffect(()=>{!f.current||!n||n.length===0||W()},[n]),v.useEffect(()=>{f.current&&k()},[a,k]);const[I,R]=v.useState(!1),[z,q]=v.useState(""),U=v.useRef(null),[H,G]=v.useState({currentPage:0,totalPages:0,totalData:0});v.useEffect(()=>{G({currentPage:0,totalPages:0,totalData:0})},[]),v.useEffect(()=>{I&&setTimeout(()=>{U.current?.focus?.()},0)},[I]),v.useEffect(()=>()=>{if(f.current)try{const V=f.current;V.gridView&&(V.gridView.onDataLoadComplated=void 0,V.gridView.onCurrentRowChanged=void 0,V.gridView.onCellClicked=void 0,V.gridView.onCellDblClicked=void 0,V.gridView.onEditRowChanged=void 0,V.gridView.onItemChecked=void 0,V.gridView.onItemAllChecked=void 0,V.gridView.onColumnCheckedChanged=void 0,V.gridView.onCellButtonClicked=void 0,V.gridView.onEditChange=void 0,V.gridView.onCellEdited=void 0,V.gridView.onKeyUp=void 0,V.gridView.onKeyDown=void 0,V.gridView.onWheel=void 0,V.gridView.onValidateColumn=void 0,V.gridView.onValidateRow=void 0,V.gridView.onValidationFail=void 0,V.gridView.onRowInserting=void 0,V.gridView.onCellItemClicked=void 0,V.gridView.onShowEditor=void 0,V.gridView.getDataSource()&&(V.gridView.getDataSource().clearRows(),V.gridView.getDataSource().setFields([])),V.gridView.getDataSource().clearRows())}catch(V){console.warn("⚠️ BwgGrid cleanup error:",V)}},[]);const te=v.useCallback(V=>{ie(V)},[]),ie=v.useCallback(V=>{const M=f.current?.gridView;if(M?.isFiltered()){console.log("EE:: [그리드 Filtering 으로 인한 오류] 그리드 내 Filter를 해제 후 진행해 주십시오.");return}if(M?.commit(),oe.isEmpty(V))return;const K=M?.getCurrent().itemIndex??-1;if(K<0)return;const L={value:V,startIndex:K+1,wrap:!0,caseSensitive:!1,partialMatch:!0},Y=M?.searchCell(L);M?.setCurrent(Y)},[]),de=v.useCallback(V=>{V.key==="Escape"&&(V.preventDefault(),R(!1))},[]),Se=v.useCallback(V=>{V.ctrlKey&&V.code==="KeyF"&&(V.preventDefault(),q(""),R(!I))},[I]),we={searchRow:te,searchEnter:ie,handleCloseKeyword:de,handleSearch:Se},Z=v.useMemo(()=>({0:12,1:13,2:14})[g],[g]),fe=v.useMemo(()=>({...t,position:"relative",width:t?.width||"100%",height:t?.height||"100%","--bwg-grid-font-size":`${Z}px`}),[t,Z]);return o.jsxs(AO,{children:[o.jsxs("div",{ref:m,style:fe,className:r,onKeyDown:V=>we.handleSearch(V),children:[I&&o.jsx("div",{className:"grid-search-box",children:o.jsxs(p.Flex,{gap:3,children:[o.jsx(p.ConfigProvider,{theme:{components:{Button:{controlHeight:32},Input:{controlHeight:32}}},children:o.jsxs(p.Space.Compact,{children:[o.jsx(p.Button,{icon:o.jsx(X.SearchOutlined,{})}),o.jsx(p.Input,{ref:U,value:z,name:"srchField",autoComplete:"off",onKeyUp:V=>we.handleCloseKeyword(V),onChange:V=>q(V.target.value),onPressEnter:V=>we.searchEnter(V)})]})}),o.jsx(p.Button,{variant:"solid",icon:o.jsx(X.CloseOutlined,{}),onClick:()=>R(!1)})]})}),e==="nrml"?o.jsx(Gg.RealGridReact,{ref:f,autoGenerateField:!0,onInitialized:W}):o.jsx(Gg.RealTreeReact,{ref:f,autoGenerateField:!1,onInitialized:W})]}),i?.container?.page&&o.jsx(ts,{currentPage:H.currentPage,totalPages:H.totalPages,pageSize:i?.pagingOption?.pageSize,totalData:H.totalData,onPageChange:_,pageSizeOptions:i?.pagingOption?.pageSizeOptions,gridRef:f})]})}),Dr=e=>({initContent(t){this._root=OO.createRoot(t)},render(t,r,n,i){const a=this._root;a&&e(t,r,n,i,a)},clearContent(t){const r=this._root;r&&setTimeout(()=>{r&&(r.unmount(),this._root=null)},0)},canClick(t){return!0},click(){return{}}}),fn=v.memo(({title:e,border:t,children:r,titleChildren:n})=>{const i=v.useMemo(()=>({components:{Form:{labelColor:"#9A9A9A"},Select:{colorTextDisabled:"#000"}}}),[]);return o.jsxs(ze,{type:"vertical",children:[o.jsx(Le,{title:e,icons:{type:"antd",icon:"InfoCircleTwoTone"},children:n}),o.jsx(Ie,{border:!1,children:o.jsx(p.ConfigProvider,{theme:i,children:r})})]})}),ze=({type:e="horizontal",layoutAlign:t="left",verticalAlign:r,className:n,style:i,children:a})=>o.jsx("div",{style:i,className:`bwgview-content-layout ${e=="horizontal"?"hz-layout":"vt-layout"} layout-${t} ${r&&`vertical-${r}`} ${n||""}`,children:a}),pv=(e,t)=>{const r=window.innerWidth,n=window.innerHeight,i=Math.min(Math.max(e.x,0),Math.max(0,r-t.width)),a=Math.min(Math.max(e.y,0),Math.max(0,n-t.height));return{x:Math.round(i),y:Math.round(a)}},NO=({buttons:e,onClose:t})=>{const r=(e||[]).filter(n=>n?.visible!==!1);return r.length===0?o.jsx(p.Button,{type:"default",className:"bwg-btn popup-btn",onClick:t,children:"닫기"}):o.jsxs("div",{style:{display:"flex",gap:6},children:[r.map(n=>o.jsx(p.Button,{type:n.type,disabled:!!n.disabled,loading:n.loading,className:n.className||"bwg-btn popup-btn",style:n.style,icon:n.icon,onClick:n.onClick,children:n.label},n.id)),o.jsx(p.Button,{type:"default",className:"bwg-btn popup-btn",onClick:t,children:"닫기"})]})},Wi=({popup:e,popupEvent:t,onClose:r,children:n,buttons:i})=>{const a=v.useRef(null),s=e?.popupTitle||"팝업",l=e?.width||800,c=e?.height||600,[d,u]=v.useState(l),[f,h]=v.useState(c),m=v.useMemo(()=>{const E=Math.max(0,(window.innerWidth-l)/2),P=Math.max(0,(window.innerHeight-c)/2);return{x:Math.round(E),y:Math.round(P)}},[l,c]),[g,x]=v.useState(m),y=(E,P)=>{const S=pv({x:P.x,y:P.y},{width:d,height:f});x(S)},w=(E,P,S,O,k)=>{const A={width:Math.round(parseInt(S.style.width,10)),height:Math.round(parseInt(S.style.height,10))},D=pv(k,A);u(A.width),h(A.height),x(D)},b=()=>a.current??document.body,j=typeof e?.zIndex=="number"?e.zIndex:3e3;return o.jsxs("div",{style:{position:"fixed",inset:0,zIndex:j},children:[o.jsx("div",{onClick:r,style:{position:"absolute",inset:0,backgroundColor:"rgba(0,0,0,0.3)",zIndex:0}}),o.jsxs(iO.Rnd,{className:"bwg-popup",size:{width:d,height:f},position:g,bounds:"window",minWidth:400,minHeight:300,onDragStop:y,onResizeStop:w,dragHandleClassName:"drag-handle",cancel:".rnd-cancel",enableUserSelectHack:!1,style:{backgroundColor:"white",borderRadius:20,boxShadow:"0 4px 15px rgba(0,0,0,0.25)",overflow:"visible",position:"absolute",zIndex:1},children:[o.jsx("div",{className:"bwg-popup-content",style:{overflow:"hidden",borderRadius:20,height:"100%"},children:o.jsx(J1,{getPopupContainer:b,children:o.jsx(ze,{type:"vertical",children:o.jsx(p.Card,{className:"popup-drag-container",title:o.jsx("div",{className:"drag-handle",style:{display:"flex",alignItems:"center",gap:8},children:s}),style:{width:"100%",height:"100%"},styles:{body:{height:"calc(100% - 77px)",padding:20,overflow:"auto"}},extra:o.jsx(NO,{buttons:i,onClose:()=>e?.close?.()||r?.()}),children:o.jsx("div",{className:"rnd-cancel",style:{height:"100%"},children:o.jsx(bt.SearchBoxProvider,{children:n})})})})})}),o.jsx("div",{ref:a,className:"bwg-popup-portal-root",style:{position:"relative"}})]})]})},Ct=({children:e,className:t,style:r,marginBottom:n=8,gutter:i=[16,8],...a})=>o.jsx(p.Row,{...a,gutter:i,className:`bwg-row ${t}`,style:{marginBottom:`${n}px`,...r},children:e}),Tc=({children:e})=>o.jsx("div",{style:{height:"100%",padding:"20px 30px 26px"},children:o.jsx("div",{style:{width:"100%",height:"100%",border:"1px solid #ddd",borderRadius:"15px",background:"#fff"},children:e})}),DO=({rowKey:e="id",columns:t,dataSource:r,loading:n=!1,rowSelection:i,size:a="middle",pagination:s=!1,...l})=>o.jsx(p.Table,{rowKey:e,columns:t,dataSource:r,loading:n,rowSelection:i,size:a,pagination:s,bordered:!0,scroll:{x:"max-content"},locale:{emptyText:"데이터가 없습니다."},...l}),ar=e=>{const{type:t="card",animated:r=!0,...n}=e;return o.jsx(p.Tabs,{type:t,animated:r,...n})};function Xf(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _O(e){if(Array.isArray(e))return Xf(e)}function tw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Th(e,t){if(e){if(typeof e=="string")return Xf(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xf(e,t):void 0}}function BO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zt(e){return _O(e)||tw(e)||Th(e)||BO()}function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tt.apply(null,arguments)}var $O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};function rw(e){if(Array.isArray(e))return e}function LO(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,l=[],c=!0,d=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(u){d=!0,i=u}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(d)throw i}}return l}}function nw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ye(e,t){return rw(e)||LO(e,t)||Th(e,t)||nw()}function Ve(e){"@babel/helpers - typeof";return Ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ve(e)}function zO(e,t){if(Ve(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ve(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iw(e){var t=zO(e,"string");return Ve(t)=="symbol"?t:t+""}function ge(e,t,r){return(t=iw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FO(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function en(e,t){if(e==null)return{};var r,n,i=FO(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Fu={exports:{}};/*!
|
|
4
4
|
Copyright (c) 2018 Jed Watson.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),z=require("../provider/index.cjs"),V=require("react-router-dom"),Z=require("./common-components-DcTm1Tn1.cjs"),o=require("antd"),i=require("react"),I=require("../stores/index.cjs"),S=require("@ant-design/icons"),R=require("../utils/index.cjs"),$=require("@dnd-kit/core"),le=require("@dnd-kit/modifiers"),G=require("@dnd-kit/sortable");var q=typeof document<"u"?document.currentScript:null;function ce(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>r[n]})}}return t.default=r,Object.freeze(t)}const Y=ce(S),de=i.lazy(()=>Promise.resolve().then(()=>require("./MenuReport-DkWB3Yyc.cjs"))),ue=i.lazy(()=>Promise.resolve().then(()=>require("./common-components-DcTm1Tn1.cjs")).then(r=>r.SearchDepartmentP01$1)),me=i.lazy(()=>Promise.resolve().then(()=>require("./common-components-DcTm1Tn1.cjs")).then(r=>r.SearchDepartmentP02$1)),pe=i.lazy(()=>Promise.resolve().then(()=>require("./common-components-DcTm1Tn1.cjs")).then(r=>r.SearchOrganizationP01$1)),he=i.lazy(()=>Promise.resolve().then(()=>require("./common-components-DcTm1Tn1.cjs")).then(r=>r.SearchOrganizationP02$1)),ge=i.lazy(()=>Promise.resolve().then(()=>require("./common-components-DcTm1Tn1.cjs")).then(r=>r.CMPrgrMstrP02$1)),fe=i.lazy(()=>Promise.resolve().then(()=>require("./CMSearchIntfGwP01-uJxdFXUb.cjs"))),Q={CORE_REPORT:{component:de,defaultConfig:{title:"게시판/문의",width:1200,height:800}},CORE_DEPARTMENT_01:{component:ue,defaultConfig:{title:"부서 검색",width:620,height:700}},CORE_DEPARTMENT_02:{component:me,defaultConfig:{title:"부서 검색",width:620,height:700}},CORE_ORGANIZATION_01:{component:pe,defaultConfig:{title:"조직 검색",width:620,height:700}},CORE_ORGANIZATION_02:{component:he,defaultConfig:{title:"조직 검색",width:1e3,height:700}},CORE_PRGR_02:{component:ge,defaultConfig:{title:"프로그램 검색",width:700,height:800}},CORE_GW_DRAFTS:{component:fe,defaultConfig:{title:"기안 목록",width:1e3,height:700}}},X="bwg-dot-line-wave-v4";function xe(){if(typeof document>"u"||document.getElementById(X))return;const r=document.createElement("style");r.id=X,r.textContent=`
|
|
2
|
+
.bwg-dotline {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: var(--bwg-gap, 12px);
|
|
6
|
+
height: calc(var(--bwg-size, 12px) + 2 * var(--bwg-amp, 12px));
|
|
7
|
+
line-height: 0;
|
|
8
|
+
}
|
|
9
|
+
.bwg-dotline .dot {
|
|
10
|
+
width: var(--bwg-size, 12px);
|
|
11
|
+
height: var(--bwg-size, 12px);
|
|
12
|
+
border-radius: 50%;
|
|
13
|
+
background: currentColor;
|
|
14
|
+
will-change: transform, opacity;
|
|
15
|
+
filter: drop-shadow(0 1px 2px rgba(0,0,0,.12));
|
|
16
|
+
animation: bwg-dotline-sine var(--bwg-speed, 780ms) linear infinite;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* sin(θ) 근사: 0, 45, 90, 135, 180, 225, 270, 315, 360deg */
|
|
20
|
+
@keyframes bwg-dotline-sine {
|
|
21
|
+
0% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
|
|
22
|
+
12.5%{ transform: translate3d(0, calc(-0.7071 * var(--bwg-amp, 12px)), 0) scale(1.03); opacity: .92; }
|
|
23
|
+
25% { transform: translate3d(0, calc(-1 * var(--bwg-amp, 12px)), 0) scale(1.06); opacity: 1; }
|
|
24
|
+
37.5%{ transform: translate3d(0, calc(-0.7071 * var(--bwg-amp, 12px)), 0) scale(1.03); opacity: .92; }
|
|
25
|
+
50% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
|
|
26
|
+
62.5%{ transform: translate3d(0, calc( 0.7071 * var(--bwg-amp, 12px)), 0) scale(.97); opacity: .78; }
|
|
27
|
+
75% { transform: translate3d(0, calc( 1 * var(--bwg-amp, 12px)), 0) scale(.96); opacity: .76; }
|
|
28
|
+
87.5%{ transform: translate3d(0, calc( 0.7071 * var(--bwg-amp, 12px)), 0) scale(.97); opacity: .78; }
|
|
29
|
+
100% { transform: translate3d(0, 0, 0) scale(.98); opacity: .80; }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (prefers-reduced-motion: reduce) {
|
|
33
|
+
.bwg-dotline .dot { animation: none; }
|
|
34
|
+
}
|
|
35
|
+
`,document.head.appendChild(r)}const be=({colors:r=["#DAD3FF","#B3A6FF","#9380FF","#816BFA"],count:t,size:n=12,gap:a=10,amp:s=16,speedMs:d=900,direction:g="ltr",phase:h=.7})=>{i.useEffect(()=>{xe()},[]);const p=t??r.length,c=Array.from({length:p}),y={"--bwg-size":`${n}px`,"--bwg-gap":`${a}px`,"--bwg-amp":`${s}px`,"--bwg-speed":`${d}ms`},k=d/p*h;return e.jsx("span",{className:"bwg-dotline",role:"img","aria-label":"loading",style:y,children:c.map((f,C)=>e.jsx("span",{className:"dot",style:{backgroundColor:r[C%r.length],animationDelay:g==="ltr"?`${C*k}ms`:`${(p-1-C)*k}ms`}},C))})},ye=({spin:r=null,text:t="인증중...",dimStyle:n="dark"})=>{if(!(r??!0))return null;const d=n==="dark";return e.jsxs("div",{className:"loading-overlay",style:{position:"fixed",height:"100vh",left:0,right:0,top:0,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:8,padding:"8px 12px",background:d?"rgba(0, 0, 0, 0.6)":"rgba(255, 255, 255, 0.85)",color:d?"#fff":"#333",backdropFilter:"blur(4px)",zIndex:1e4},"aria-live":"polite","aria-busy":"true",role:"status",children:[e.jsx(o.Spin,{indicator:e.jsx(be,{colors:["#DAD3FF","#B3A6FF","#9380FF","#816BFA"],size:12,gap:10,amp:16,speedMs:900,phase:.75,direction:"ltr"})}),e.jsx("span",{className:"bwg-spin-txt",style:{marginTop:"15px"},children:t})]})},Ce=({routes:r,useCommonProvider:t=!0,useServiceProvider:n=!0})=>{let s=e.jsxs(V.Routes,{children:[e.jsx(V.Route,{path:"/",element:e.jsx(V.Navigate,{to:"/login"})}),e.jsx(V.Route,{path:"/login",element:r.login}),e.jsx(V.Route,{path:"/main",element:r.main})]});return n&&(s=e.jsx(z.ServiceCodeProvider,{children:s})),t&&(s=e.jsx(z.CommonCodeProvider,{children:s})),e.jsx(Z.GlobalConfigProvider,{children:s})},{Content:ve}=o.Layout,J=({config:r={},children:t})=>{const n={wrapper:{className:"content-wrapper",...r.wrapper},body:{className:"content-body",...r.body},...r};return e.jsx(ve,{className:n.wrapper.className,style:n.wrapper.style,children:e.jsx(Z.BwgConfigProvider,{children:e.jsx("div",{className:n.body.className,style:n.body.style,children:t})})})},je="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.9998%2019.9993V20.9993C11.9998%2021.3932%2012.0774%2021.7833%2012.2282%2022.1473C12.3789%2022.5112%2012.5999%2022.8419%2012.8785%2023.1205C13.157%2023.399%2013.4877%2023.62%2013.8517%2023.7708C14.2156%2023.9215%2014.6057%2023.9991%2014.9997%2023.9991C15.3936%2023.9991%2015.7837%2023.9215%2016.1477%2023.7708C16.5116%2023.62%2016.8423%2023.399%2017.1209%2023.1205C17.3994%2022.8419%2017.6204%2022.5112%2017.7712%2022.1473C17.9219%2021.7833%2017.9995%2021.3932%2017.9995%2020.9993V19.9993M20.9994%2011.9997C20.9994%2014.9996%2022.9993%2019.9993%2022.9993%2019.9993H7.00006C7.00006%2019.9993%208.99996%2015.9995%208.99996%2011.9997C8.99996%208.73187%2011.7318%206%2014.9997%206C18.2675%206%2020.9994%208.73187%2020.9994%2011.9997Z'%20stroke='%23485299'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",we="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_93_4488)'%3e%3cpath%20d='M18%207H21C22.1046%207%2023%207.89543%2023%209V21C23%2022.1046%2022.1046%2023%2021%2023H18M11%2011L7%2015M7%2015L11%2019M7%2015L19%2015'%20stroke='%23485299'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_93_4488'%3e%3crect%20width='30'%20height='30'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ke="data:image/svg+xml,%3csvg%20width='30'%20height='30'%20viewBox='0%200%2030%2030'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%206H16C16.5523%206%2017%206.44772%2017%207V7.56879C17%207.99659%2017.2871%208.36825%2017.6822%208.53228C18.0775%208.69638%2018.5377%208.63384%2018.8403%208.33123L19.2426%207.92891C19.6331%207.53838%2020.2663%207.53838%2020.6568%207.92891L22.071%209.34312C22.4616%209.73365%2022.4615%2010.3668%2022.071%2010.7573L21.6688%2011.1596C21.3661%2011.4622%2021.3036%2011.9225%2021.4677%2012.3177C21.6317%2012.7129%2022.0034%2013%2022.4313%2013L23%2013C23.5523%2013%2024%2013.4477%2024%2014V16C24%2016.5523%2023.5523%2017%2023%2017H22.4312C22.0034%2017%2021.6318%2017.2871%2021.4677%2017.6822C21.3036%2018.0775%2021.3661%2018.5377%2021.6688%2018.8403L22.071%2019.2426C22.4616%2019.6331%2022.4616%2020.2663%2022.071%2020.6568L20.6568%2022.071C20.2663%2022.4616%2019.6331%2022.4616%2019.2426%2022.071L18.8403%2021.6688C18.5377%2021.3661%2018.0775%2021.3036%2017.6822%2021.4677C17.2871%2021.6318%2017%2022.0034%2017%2022.4312V23C17%2023.5523%2016.5523%2024%2016%2024H14C13.4477%2024%2013%2023.5523%2013%2023V22.4313C13%2022.0034%2012.7129%2021.6317%2012.3177%2021.4677C11.9225%2021.3036%2011.4622%2021.3661%2011.1596%2021.6688L10.7573%2022.071C10.3668%2022.4616%209.73363%2022.4616%209.34311%2022.071L7.92889%2020.6568C7.53837%2020.2663%207.53837%2019.6331%207.92889%2019.2426L8.33123%2018.8403C8.63384%2018.5377%208.69638%2018.0775%208.53228%2017.6822C8.36825%2017.2871%207.99659%2017%207.56879%2017H7C6.44772%2017%206%2016.5523%206%2016V14C6%2013.4477%206.44772%2013%207%2013L7.56877%2013C7.99658%2013%208.36825%2012.7129%208.53229%2012.3178C8.6964%2011.9225%208.63386%2011.4623%208.33123%2011.1597L7.92891%2010.7573C7.53838%2010.3668%207.53838%209.73365%207.92891%209.34313L9.34312%207.92891C9.73365%207.53839%2010.3668%207.53839%2010.7573%207.92891L11.1597%208.33123C11.4623%208.63386%2011.9225%208.6964%2012.3178%208.53229C12.7129%208.36825%2013%207.99658%2013%207.56876V7C13%206.44772%2013.4477%206%2014%206Z'%20stroke='%23485299'%20stroke-width='1.5'/%3e%3cpath%20d='M17%2015C17%2016.1046%2016.1046%2017%2015%2017C13.8954%2017%2013%2016.1046%2013%2015C13%2013.8954%2013.8954%2013%2015%2013C16.1046%2013%2017%2013.8954%2017%2015Z'%20stroke='%23485299'%20stroke-width='1.5'/%3e%3c/svg%3e",{Header:Ne}=o.Layout,D={light:{headerBg:"#ffffff",headerText:"#000000",sidebarBg:"#ffffff",sidebarText:"#000000",buttonPrimary:"#1890ff",buttonPrimaryHover:"#40a9ff",buttonPrimaryActive:"#096dd9",buttonDefault:"#ffffff",buttonDefaultHover:"#f5f5f5",buttonDefaultBorder:"#d9d9d9",buttonPermissionBorder:"#bdb1ff"},dark:{headerBg:"#4a4a4a",headerText:"#ffffff",sidebarBg:"#4a4a4a",sidebarText:"#ffffff",buttonPrimary:"#177ddc",buttonPrimaryHover:"#1890ff",buttonPrimaryActive:"#0958b5",buttonDefault:"#434343",buttonDefaultHover:"#303030",buttonDefaultBorder:"#434343",buttonPermissionBorder:"#bdb1ff"},blue:{headerBg:"#4a90e2",headerText:"#ffffff",sidebarBg:"#4a90e2",sidebarText:"#ffffff",buttonPrimary:"#1890ff",buttonPrimaryHover:"#40a9ff",buttonPrimaryActive:"#096dd9",buttonDefault:"#ffffff",buttonDefaultHover:"#f0f8ff",buttonDefaultBorder:"#4a90e2",buttonPermissionBorder:"#bdb1ff"},modern:{headerBg:"#f3f4ff",headerText:"#333333",sidebarBg:"#ffffff",sidebarText:"#555555",buttonPrimary:"#6449FC",buttonPrimaryHover:"#6449FC",buttonPrimaryActive:"#6449FC",buttonDefault:"#ffffff",buttonDefaultHover:"#f5f5f5",buttonDefaultBorder:"#dddddd",buttonPermissionBorder:"#bdb1ff"}},U={0:"작게",1:"보통",2:"크게"},ee=({config:r={}})=>{const t={gap:14,minWidth:200,items:r.right?.items,alarm:{visible:!0,...r.right?.alarm||{}},theme:{visible:!0,...r.right?.theme||{}},logout:{visible:!0,...r.right?.logout||{}},avatar:{visible:!0,width:30,height:30,...r.right?.avatar||{}}},n={wrapper:{className:"header-wrapper",...r.wrapper},logo:{gap:10,...r.logo},right:t},a=V.useNavigate(),[s,d]=i.useState("modern"),g=i.useRef(null),h=I.useLogout(),{componentSize:p,setComponentSize:c,gridSize:y,setGridSize:k,spacingSize:f,setSpacingSize:C}=I.useUserStore(),j=(u,v)=>{try{if(!/^[a-zA-Z0-9-]+$/.test(u)||!/^[#a-zA-Z0-9()\s,.-]+$/.test(v))return;document.documentElement.style.setProperty(u,v)}catch(m){console.error("CSS variable setting failed:",m)}},T=u=>{if(!D[u])return;d(u);const v={...D[u]};j("--header-bg",v.headerBg),j("--header-text",v.headerText),j("--sidebar-bg",v.sidebarBg),j("--sidebar-text",v.sidebarText),j("--button-primary",v.buttonPrimary),j("--button-primary-hover",v.buttonPrimaryHover),j("--button-primary-active",v.buttonPrimaryActive),j("--button-default",v.buttonDefault),j("--button-default-hover",v.buttonDefaultHover),j("--button-default-border",v.buttonDefaultBorder),j("--button-permission-border",v.buttonPermissionBorder),g.current&&g.current.setAttribute("data-theme",u),document.documentElement.setAttribute("data-theme",u),R.setCookie(R.THEME_COOKIE_NAME,u,30)};i.useEffect(()=>{const u=R.getCookie(R.THEME_COOKIE_NAME);u&&D[u]?T(u):T("modern")},[]);const F=()=>({...D[s]}).headerBg,O=()=>{h(),a("/login")};R.getTodateString?R.getTodateString("HH:mm:ss"):new Date().toLocaleTimeString("ko-KR");const A=e.jsxs("div",{style:{padding:"8px 0"},children:[e.jsxs("div",{style:{marginBottom:"12px"},children:[e.jsx(o.ColorPicker,{value:F(),disabled:!0,size:"small"}),e.jsx("span",{style:{marginLeft:"8px",fontSize:"12px"},children:"현재 테마 색상"})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[e.jsx(o.Button,{type:s==="modern"?"primary":"default",size:"small",onClick:()=>T("modern"),style:{textAlign:"left",backgroundColor:s==="modern"?D.modern.headerBg:void 0,color:s==="modern"?D.modern.headerText:void 0},children:"모던"},"modern"),Object.entries(D).filter(([u])=>u!=="modern").map(([u,v])=>e.jsx(o.Button,{type:s===u?"primary":"default",size:"small",onClick:()=>T(u),style:{textAlign:"left",backgroundColor:s===u?v.headerBg:void 0,color:s===u?v.headerText:void 0},children:u},u))]}),e.jsx(o.Divider,{}),e.jsxs("div",{style:{marginTop:"8px"},children:[e.jsx("div",{style:{marginBottom:"8px",fontSize:"12px"},children:"컴포넌트 크기"}),e.jsx(o.Slider,{marks:U,value:p,min:0,max:2,step:1,onChange:u=>c(u)}),e.jsx("div",{style:{marginTop:"16px",marginBottom:"8px",fontSize:"12px"},children:"그리드 크기"}),e.jsx(o.Slider,{marks:U,value:y,min:0,max:2,step:1,onChange:u=>k(u)}),e.jsx("div",{style:{marginTop:"16px",marginBottom:"8px",fontSize:"12px"},children:"여백 조정"}),e.jsx(o.Slider,{marks:U,value:f,min:0,max:2,step:1,onChange:u=>C(u)})]})]});return e.jsxs(Ne,{className:n.wrapper.className,style:{...n.wrapper.style},children:[n.logo&&e.jsx("div",{className:"header-left",children:e.jsx("div",{className:"logo-container",style:{gap:n.logo?.gap},children:n.logo?.items})}),e.jsxs("div",{className:"header-right",style:{gap:n.right?.gap,minWidth:n.right?.minWidth},children:[n.right?.items?.map((u,v)=>e.jsx("div",{children:u},v)),n.right?.alarm?.visible&&e.jsx(o.Button,{type:"text",icon:e.jsx("img",{src:je,alt:"알림"}),className:"alarm-btn",onClick:n.right?.alarm?.onClick}),n.right?.theme?.visible&&e.jsx(o.Popover,{content:A,title:"테마 설정",trigger:"click",placement:"bottomRight",onOpenChange:u=>n.right?.theme?.onOpenChange?.(u),children:e.jsx(o.Button,{type:"text",icon:e.jsx("img",{src:ke,alt:"개인설정"}),className:"theme-btn",onClick:n.right?.theme?.onClick})}),n.right?.logout?.visible&&e.jsx(o.Button,{type:"text",icon:e.jsx("img",{src:we,alt:"로그아웃"}),onClick:n.right?.logout?.onClick||O,className:"logout-btn"}),n.right?.avatar?.visible&&e.jsx(o.Avatar,{icon:e.jsx(S.UserOutlined,{}),className:"avatar",style:{width:n.right?.avatar?.width,height:n.right?.avatar?.height},onClick:n.right?.avatar?.onClick})]})]})},K=Object.freeze({Translate:{toString(r){if(!r)return;const{x:t,y:n}=r;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(r){if(!r)return;const{scaleX:t,scaleY:n}=r;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(r){if(r)return[K.Translate.toString(r),K.Scale.toString(r)].join(" ")}},Transition:{toString(r){let{property:t,duration:n,easing:a}=r;return t+" "+n+"ms "+a}}}),Se=i.memo(({className:r,...t})=>{const n=i.useRef(null),{attributes:a,listeners:s,transform:d,transition:g,isDragging:h,setNodeRef:p}=G.useSortable({id:t["data-node-key"]}),[c,y]=i.useState();i.useEffect(()=>{const f=n.current;if(f)if(h){const C=Math.round(f.getBoundingClientRect().width);y(C)}else y(void 0)},[h]);const k={...t.style,transform:d?K.Transform.toString(d):void 0,transition:g??"transform 0.16s ease",cursor:"grab",userSelect:"none",willChange:"transform",width:c??void 0,minWidth:c??void 0,maxWidth:c??void 0,flex:c!==void 0?"0 0 auto":void 0};return i.cloneElement(t.children,{ref:f=>{n.current!==f&&(n.current=f),p(f)},style:k,...a,...s})}),Ie=i.memo(function({config:t,isFirst:n,isLast:a,canCloseAll:s,onFirst:d,onPrev:g,onNext:h,onLast:p,onCloseAll:c}){return e.jsxs("div",{className:t.wrapper?.className,style:t.wrapper?.style,children:[e.jsx(o.Tooltip,{title:"첫 번째 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(S.StepBackwardOutlined,{}),onClick:d,disabled:n})}),e.jsx(o.Tooltip,{title:"이전 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(S.LeftOutlined,{}),onClick:g,disabled:n})}),e.jsx(o.Tooltip,{title:"다음 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(S.RightOutlined,{}),onClick:h,disabled:a})}),e.jsx(o.Tooltip,{title:"마지막 탭",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(S.StepForwardOutlined,{}),onClick:p,disabled:a})}),e.jsx(o.Tooltip,{title:"모든 탭 닫기",className:t.tooltip?.className,style:t.tooltip?.style,children:e.jsx(o.Button,{className:t.buttons?.className,style:t.buttons?.style,size:"small",icon:e.jsx(S.CloseOutlined,{}),onClick:c,disabled:!s})})]})}),te=({config:r={}})=>{const t={wrapper:{className:"menu-tab-wrapper",...r?.wrapper},tabs:{className:"menu-tabs",...r?.tabs},nav:{wrapper:{className:"menu-nav-wrapper",...r?.nav?.wrapper},buttons:{className:"menu-nav-buttons",...r?.nav?.buttons},tooltip:{className:"menu-nav-tooltip",...r?.nav?.tooltip},...r?.nav},...r},n=I.useMenuViewStore(m=>m.tabs),a=I.useMenuViewStore(m=>m.activeMenuId),s=I.useMenuViewStore(m=>m.focusTab),d=I.useMenuViewStore(m=>m.closeTab),g=I.useMenuViewStore(m=>m.reorderTabs),h=$.useSensors($.useSensor($.PointerSensor,{activationConstraint:{distance:6}})),p=m=>{s(m)},c=(m,P)=>{P==="remove"&&typeof m=="string"&&d(m)},y=()=>{n.length>0&&s(n[0].key)},k=()=>{if(!a||n.length<=1)return;const m=n.findIndex(P=>P.key===a);m>0&&s(n[m-1].key)},f=()=>{if(!a||n.length<=1)return;const m=n.findIndex(P=>P.key===a);m<n.length-1&&s(n[m+1].key)},C=()=>{n.length>0&&s(n[n.length-1].key)},j=()=>{n.forEach(m=>{d(m.key)})},T=a?n.findIndex(m=>m.key===a):-1,F=T===0,O=T===n.length-1,A=i.useMemo(()=>n.map(m=>({key:m.key,label:m.label,closable:!0,children:null})),[n]),u=i.useCallback(({active:m,over:P})=>{if(!P||m.id===P.id)return;const L=n.findIndex(E=>E.key===m.id),_=n.findIndex(E=>E.key===P.id);if(L<0||_<0||L===_)return;const W=n.map(E=>E.key),H=G.arrayMove(W,L,_);g?.(H)},[n,g]),v=i.useCallback((m,P)=>e.jsx($.DndContext,{sensors:h,onDragEnd:u,collisionDetection:$.closestCenter,modifiers:[le.restrictToHorizontalAxis],children:e.jsx(G.SortableContext,{items:n.map(L=>L.key),strategy:G.horizontalListSortingStrategy,children:e.jsx(P,{...m,children:L=>i.createElement(Se,{...L.props,key:L.key},L)})})}),[h,u,n]);return e.jsx("div",{className:t.wrapper.className,style:{...t.wrapper.style,display:n.length===0?"none":"block"},children:e.jsx(o.Tabs,{type:"editable-card",activeKey:a||void 0,onChange:p,onEdit:c,className:t.tabs.className,style:t.tabs.style,hideAdd:!0,items:A,tabBarExtraContent:e.jsx(Ie,{config:t?.nav,isFirst:!!F,isLast:!!O,canCloseAll:n.length>0,onFirst:y,onPrev:k,onNext:f,onLast:C,onCloseAll:j}),renderTabBar:v})})},{Sider:Pe}=o.Layout,ne=({config:r={}})=>{const t={collapsed:!1,width:230,menuGubunCode:{mainMenu:"MAIN",subMenu:"SUB",program:"PRGM",...r?.menuGubunCode},className:{wrapper:"side-wrapper",search:"sider-search-ipt",segmented:{wrapper:"sider-segmented",item:"sider-segment-item",...r?.className?.segmented},sider:{content:"sider-content",loading:"sider-loading",loadingText:"sider-loading-text",error:"sider-error",errorIcon:"sider-error-icon",errorText:"sider-error-text",menu:"sider-menu",menuContainer:"sider-menu-container",...r?.className?.sider},...r?.className},style:{search:{placeholder:"메뉴명, 메뉴번호 검색...",height:30,...r?.style?.search},...r?.style},...r},[n,a]=i.useState(""),[s,d]=i.useState("category"),[g,h]=i.useState([]),{activeMenuId:p,sidebarCollapsed:c,openTabFromMenu:y,toggleSidebar:k}=I.useMenuViewStore(),{menuList:f,isLoading:C,error:j,findMenuById:T,flatMenuList:F}=I.useMenuModelStore(),{nodes:O,treeNodes:A,loadFavoritesIfNeeded:u}=I.useFavoriteStore(),v=i.useMemo(()=>{const b=[],x=(l,w=0)=>{if(l.menuGbCd===t.menuGubunCode.program&&l.scrnPath){const N=" ".repeat(w),B=l.menuNo||"";b.push({value:l.menuId,label:e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("span",{children:[N,l.menuNm]}),e.jsx("span",{style:{fontSize:"11px",color:"#999",backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"3px",marginLeft:"8px"},children:B})]}),menuItem:l})}l.children&&l.children.length>0&&l.children.forEach(N=>x(N,w+1))};return f.forEach(l=>x(l)),b},[f]),m=i.useMemo(()=>n.trim()?v.filter(b=>{const x=b.menuItem.menuNm.toLowerCase(),l=String(b.menuItem.menuNo||"미지정").toLowerCase(),w=n.toLowerCase();return x.includes(w)||l.includes(w)}):[],[v,n]),P=b=>{if(!b||typeof b!="string"){console.warn("Invalid menu selection value:",b);return}if(!/^[a-zA-Z0-9_-]+$/.test(b)){console.warn("Invalid menu ID format:",b);return}const x=v.find(l=>l.value===b);if(x){const{menuItem:l}=x;if(!l||!l.menuId||!l.menuNm){console.warn("Invalid menu item:",l);return}l.menuGbCd===t.menuGubunCode.program&&l.scrnPath?(console.log("✅ 검색으로 프로그램 메뉴 선택 - 탭 추가 및 setCurrentProgram 호출"),console.log("메뉴명:",l.menuNm,"경로:",l.scrnPath,"scrnId:",l.scrnId),y(l)):(l.menuGbCd===t.menuGubunCode.mainMenu||l.menuGbCd===t.menuGubunCode.subMenu)&&(console.log("❌ 검색으로 메인/서브 메뉴 선택 - 이벤트 무시"),console.log("메뉴명:",l.menuNm,"menuGbCd:",l.menuGbCd)),a("")}},L=i.useCallback(b=>{const x=T(b);x?.menuGbCd===t.menuGubunCode.program&&(console.log("메뉴명:",x.menuNm,"경로:",x.scrnPath,"scrnId:",x.scrnId),y(x))},[T,y]),_=i.useCallback(b=>b.map(x=>({key:x.menuId,label:e.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:e.jsx("span",{children:x.menuNm})}),icon:W(x.iconCd,x.menuGbCd),children:x.children&&x.children.length>0?_(x.children):void 0})),[]),W=(b,x)=>{if(b){const l=Y[b];if(l)return e.jsx(l,{})}if(x)switch(x){case t.menuGubunCode.mainMenu:return e.jsx(Y.HomeOutlined,{});case t.menuGubunCode.subMenu:return null;case t.menuGubunCode.program:return null;default:return null}return null},H=i.useCallback(b=>{if(f.length===0)return[];const x=w=>{if(w)return typeof w=="string"?O[w]:w},l=w=>{if(w.type==="M"){const N=w,B=T(N.menuId)||void 0,M=!!B,ie=M?`${B?.menuNm??N.menuNm??N.menuId}`:`${N.menuNm??N.menuId} (삭제됨)`;return{key:N.menuId,label:ie,icon:M?void 0:e.jsx(S.WarningOutlined,{style:{color:"#faad14"}})}}else{const N=w,B=(N.children??[]).map(x).filter(Boolean).map(l);return{key:N.bkmkId,label:N.bkmkNm??N.bkmkId,icon:N.prntBkmkId==="-"?e.jsx(S.StarOutlined,{}):e.jsx(S.FolderOpenOutlined,{}),children:B}}};return b.map(l)},[T,O,f]),E=i.useMemo(()=>H(A),[H,A,O]);return i.useEffect(()=>{R.getUserId()&&u(R.getUserId())},[u]),i.useEffect(()=>{s==="category"&&a("")},[s]),i.useEffect(()=>{if(!p||s!=="category")return;const x=(l=>{const w=[],N=new Map(F.map(M=>[M.menuId,M]));let B=l;for(;B;){const M=N.get(B);if(!M)break;if(M.menuPrntId&&M.menuPrntId!=="-"&&M.menuPrntId!=="")w.push(M.menuPrntId),B=M.menuPrntId;else break}return w})(p);x.length>0&&h(l=>{const w=new Set([...l,...x]);return Array.from(w)})},[p,s,F]),e.jsxs(Pe,{className:t.className.wrapper,collapsed:t.collapsed||c,trigger:null,width:t.width||230,children:[e.jsx("div",{style:{position:"absolute",top:"9px",right:"-25px",zIndex:"1000",width:"25px",height:"41px",backgroundColor:"#ffffff",border:"1px solid #dddddd",borderRadius:"0 10px 10px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"2px 2px 2px rgba(0, 0, 0, 0.05)",transition:"all 0.3s ease"},children:e.jsx(o.Button,{type:"text",icon:t.collapsed||c?e.jsx(S.MenuUnfoldOutlined,{}):e.jsx(S.MenuFoldOutlined,{}),style:{fontSize:"12px",color:"#787878",padding:0,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0 10px 10px 0"},onClick:k})}),!(t.collapsed||c)&&e.jsx("div",{style:{padding:10},children:e.jsx(o.AutoComplete,{value:n,options:m,onSelect:P,onSearch:a,style:{width:"100%"},allowClear:!0,children:e.jsx(o.Input,{className:t.className.search,placeholder:t.style.search.placeholder,prefix:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e.jsx("path",{d:"M16.4972 16.6667L13.0355 13.1694M14.8475 8.75C14.8475 5.29822 12.0777 2.5 8.66105 2.5C5.24437 2.5 2.47461 5.29822 2.47461 8.75C2.47461 12.2018 5.24437 15 8.66105 15C12.0777 15 14.8475 12.2018 14.8475 8.75Z",stroke:"#5F5F5F",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),size:"middle",style:{height:t.style.search.height||30}})})}),!(t.collapsed||c)&&e.jsx("div",{style:{width:"100%",padding:"0px 10px",marginBottom:"10px"},children:e.jsx(o.Segmented,{className:t.className.segmented.wrapper,options:[{label:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.className.segmented.item,style:{display:"flex",alignItems:"center"},children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e.jsx("path",{d:"M2.46979 6.90625H13.0298C13.7298 6.90625 14.2965 7.47292 14.2965 8.17292V13.5396H1.20312V8.17292C1.20312 7.47292 1.76979 6.90625 2.46979 6.90625Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M2.76318 4.70626C2.76318 4.00626 3.18318 3.75293 3.69652 3.75293H11.8032C12.3165 3.75293 12.7365 4.00626 12.7365 4.70626",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M4.71631 1.45996H10.783",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),"카테고리"]}),value:"category"},{label:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:t.className.segmented.item,style:{display:"flex",alignItems:"center"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e.jsx("path",{d:"M7.11329 1.33356C7.32084 0.888813 7.66676 0.888813 7.88296 1.33356L9.258 4.25619C9.46556 4.70094 10.0277 5.12753 10.4947 5.20014L13.5647 5.67212C14.0317 5.74473 14.1441 6.08964 13.7982 6.43455L11.5757 8.70367C11.2384 9.04858 11.0222 9.73839 11.1 10.2285L11.6276 13.4325C11.7054 13.9227 11.4287 14.1405 11.0049 13.9045L8.26348 12.3887C7.83972 12.1527 7.15653 12.1527 6.73277 12.3887L3.99134 13.9045C3.56759 14.1405 3.29085 13.9227 3.36868 13.4325L3.89621 10.2285C3.97405 9.73839 3.76649 9.04858 3.42057 8.70367L1.19802 6.43455C0.86075 6.08964 0.964526 5.74473 1.43152 5.67212L4.50158 5.20014C4.96857 5.12753 5.5307 4.70094 5.73825 4.25619L7.11329 1.33356Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"4"})})}),"즐겨찾기"]}),value:"favorite"}],value:s,onChange:b=>{d(b)},style:{width:"100%"},block:!0})}),e.jsxs("div",{className:t.className.sider.content,children:[C&&e.jsxs("div",{className:t.className.sider.loading,style:{padding:10,margin:"0 auto",textAlign:"center",color:"var(--text-primary)"},children:[e.jsx(o.ConfigProvider,{theme:{components:{Spin:{colorPrimary:"var(--primary-color)"}}},children:e.jsx(o.Spin,{size:"default"})}),e.jsx("div",{className:t.className.sider.loadingText,style:{marginTop:10},children:"메뉴 로딩 중..."})]}),j&&e.jsxs("div",{className:t.className.sider.error,children:[e.jsx(S.ExclamationCircleOutlined,{className:t.className.sider.errorIcon}),e.jsx("div",{className:t.className.sider.errorText,children:"메뉴 로드 실패"})]}),!C&&!j&&s==="category"&&f.length===0&&e.jsx("div",{style:{padding:"16px",textAlign:"center",color:"#666",fontSize:"12px"},children:"메뉴가 없습니다"}),!C&&!j&&s==="favorite"&&E.length===0&&e.jsx("div",{style:{padding:"16px",textAlign:"center",color:"#666",fontSize:"12px"},children:"즐겨찾기된 메뉴가 없습니다"}),!C&&!j&&s==="category"&&f.length>0&&e.jsx("div",{className:t.className.sider.menuContainer,children:e.jsx(o.Menu,{theme:"light",mode:"inline",items:_(f),className:t.className.sider.menu,selectedKeys:[p||""],openKeys:g,onOpenChange:h,onClick:b=>L(b.key)})}),!C&&!j&&s==="favorite"&&E.length>0&&e.jsx("div",{className:t.className.sider.menuContainer,children:e.jsx(o.Menu,{theme:"light",mode:"inline",items:E,className:t.className.sider.menu,selectedKeys:[p||""],onClick:b=>L(b.key)})})]})]})};class Te extends i.Component{constructor(t){super(t),this.resetError=()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})},this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBound caught an error:",t,n),this.setState({error:t,errorInfo:n})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{style:{padding:"40px 20px",textAlign:"center",backgroundColor:"#fafafa",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[e.jsx(o.Result,{status:"error",title:"컴포넌트 로딩 중 오류가 발생했습니다",subTitle:this.state.error?`오류 내용: ${this.state.error.message}`:"알 수 없는 오류가 발생했습니다",extra:[e.jsx(o.Button,{type:"primary",icon:e.jsx(S.ReloadOutlined,{}),onClick:this.resetError,style:{marginRight:8},children:"다시 시도"},"retry")]}),this.state.error&&e.jsxs("details",{style:{marginTop:"20px",textAlign:"left",maxWidth:"600px",backgroundColor:"#fff",padding:"16px",borderRadius:"6px",border:"1px solid #d9d9d9"},children:[e.jsx("summary",{style:{cursor:"pointer",fontWeight:"bold"},children:"오류 상세 정보"}),e.jsx("pre",{style:{marginTop:"8px",fontSize:"12px",color:"#666",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:this.state.error.stack})]})]}):this.props.children}}const Le=({isActive:r,instance:t,params:n})=>{const{activeMenuId:a,closeTab:s}=I.useMenuViewStore(),d=()=>{a&&s(a)};return t?e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:r?"auto":"none"},children:e.jsx(Te,{children:e.jsx(i.Suspense,{fallback:null,children:t&&i.createElement(t,{params:n})})})}):e.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:r?"auto":"none"},children:e.jsx("div",{style:{width:500,maxWidth:"90%",background:"#fff",borderRadius:16,boxShadow:"0 8px 30px rgba(0,0,0,0.05)",padding:24},children:e.jsx(o.Result,{icon:e.jsx(S.ExclamationCircleTwoTone,{twoToneColor:"#69b1ff"}),status:"warning",title:"등록된 메뉴 정보가 없거나 유효한 메뉴가 아닙니다.",subTitle:e.jsx(o.Typography.Text,{type:"secondary",children:"자세한 내용은 관리자에게 문의바랍니다."}),extra:e.jsx(o.Space,{children:e.jsx(o.Button,{icon:e.jsx(S.CloseOutlined,{}),onClick:d,children:"탭 닫기"})})})})})},re=i.memo(Le),se=()=>e.jsxs(e.Fragment,{children:[e.jsx("link",{rel:"preload",as:"image",href:"/src/styles/assets/images/backgrounds/LandingContainer_bg.png"}),e.jsx("div",{className:"LandingContainer-wrap",children:e.jsx("div",{className:"inner",children:e.jsx("div",{className:"content"})})})]}),Me=(r,t)=>{console.log("createPopupViewLoader 호출 - popupUrl:",r);const a=(s=>{if(s.startsWith("/src/pages/views/popup/")){const h=s+".tsx";return console.log(`팝업 URL 변환: ${s} -> ${h}`),h}const g=`/src/pages/views/popup/${s.startsWith("/")?s.substring(1):s}.tsx`;return console.log(`팝업 URL 변환: ${s} -> ${g}`),g})(r);return!a||!t?.glob||!t.glob[a]?(console.warn(`팝업 뷰를 찾을 수 없습니다: ${r} (${a})`),console.warn("사용 가능한 팝업 뷰들:",Object.keys(t?.glob||{})),null):t.glob[a]},Be=({popup:r,modules:t})=>{const[n,a]=i.useState(null),[s,d]=i.useState(!1),[g,h]=i.useState(null),p=()=>{console.log("PopupArea - handleClose:",r.popupId),I.usePopupStore.getState().closePopup(r.popupId)};return i.useEffect(()=>{(async()=>{console.log("팝업 뷰 로드 시작:",r.popupUrl),d(!0),h(null);try{const y=Me(r.popupUrl,t);if(!y){const C=`팝업 뷰를 찾을 수 없습니다: ${r.popupUrl}`;console.error(C),h(C),d(!1);return}console.log("팝업 뷰 모듈 로드 중...");const k=await y();console.log("팝업 뷰 모듈 로드 완료:",k);const f=k.default;if(console.log("팝업 뷰 컴포넌트:",f),!f)throw new Error("팝업 뷰 컴포넌트를 찾을 수 없습니다");a(()=>f),console.log("팝업 뷰 설정 완료")}catch(y){console.error("팝업 뷰 로드 실패:",y),h(y instanceof Error?y.message:"팝업 뷰 로드 실패")}finally{d(!1)}})()},[r.popupUrl]),s?e.jsxs("div",{className:"popup-loading",children:[e.jsx(o.Spin,{size:"large"}),e.jsx("p",{children:"팝업을 로드하는 중..."})]}):g?e.jsxs("div",{className:"popup-error",children:[e.jsx(o.Empty,{description:g,image:o.Empty.PRESENTED_IMAGE_SIMPLE}),e.jsx(o.Button,{icon:e.jsx(S.ReloadOutlined,{}),onClick:()=>window.location.reload(),children:"다시 시도"})]}):n?e.jsx(i.Suspense,{fallback:e.jsxs("div",{className:"popup-loading",children:[e.jsx(o.Spin,{size:"large"}),e.jsx("p",{children:"컴포넌트를 로드하는 중..."})]}),children:e.jsx(n,{popup:{...r,close:p},onClose:p})}):e.jsx("div",{className:"popup-empty",children:e.jsx(o.Empty,{description:"팝업 내용을 불러올 수 없습니다."})})},oe=({modules:r})=>{const{popups:t}=I.usePopupStore();return t.length===0?null:e.jsx(e.Fragment,{children:t.map(n=>{if(n.isLocal||n.popupCode.startsWith("CORE_"))return null;const a=n.config||{},s=a.width||n.width||800,d=a.height||n.height||600,g=a.title||n.popupTitle,h=n.buttonList?.map((p,c)=>({key:p.btnId||`btn_${c}`,text:p.btnNm,type:p.btnId==="CLOSE"?"default":"primary",disabled:p.enblYn!=="Y",danger:!1}))||[];return console.log("팝업 렌더링:",{popupId:n.popupId,popupCode:n.popupCode,title:g,width:s,height:d,buttons:h}),e.jsx(z.SearchBoxProvider,{children:e.jsx("div",{children:e.jsx(Be,{popup:n,modules:r})},n.popupId)},`sbp-${n.popupId}`)})})},Ee=()=>{const{popups:r,closePopup:t}=I.usePopupStore();return e.jsx(e.Fragment,{children:r.map(n=>{if(!(n.isLocal||n.popupCode.startsWith("CORE_")))return null;const a=Q[n.popupCode];if(!a)return null;const s=a.component;return e.jsx(z.SearchBoxProvider,{children:e.jsx(i.Suspense,{fallback:null,children:e.jsx(s,{popup:n,onClose:()=>t(n.popupId)})},n.popupId)},`sbp-${n.popupId}`)})})},Re=r=>({position:"absolute",inset:0,visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:r?"auto":"none"}),Oe=({once:r=!0})=>{const{lock:t}=z.useLock(),n=i.useRef(!1);return i.useEffect(()=>{r&&n.current||(n.current=!0,t())},[r,t]),null},ae=({isActive:r,flagged:t,tabKey:n,onUnlock:a,children:s})=>{const d=i.useRef(null),[g,h]=i.useState(!1),p=i.useCallback(y=>{d.current=y,h(!!y)},[]),c=Re(r);return e.jsx("div",{ref:p,style:c,children:g?e.jsxs(z.ScreenProtectProvider,{idleMs:Number.POSITIVE_INFINITY,persistLocked:!1,overlayScope:"scoped",overlayPosition:"absolute",eventTarget:d.current,overlayId:`tab-overlay-${n}`,onUnlock:async()=>(a(),!0),children:[r&&t?e.jsx(Oe,{once:!0}):null,s]}):s})},De=({config:r={},modules:t={view:{path:"/src/pages/views/content"},popup:{path:"/src/pages/views/popups"}}})=>{const n=i.useRef(new Map),{tabs:a,tabParams:s,activeMenuId:d,tabProtectFlag:g,clearProtectFlagForKey:h}=I.useMenuViewStore(),p=i.useCallback(c=>{const y=n.current.get(c.key);if(y)return y;const k=c.gubun==="M"?`${t.view.path}${c.menuItem?.scrnPath}.tsx`:`${t.view.path}${c.componentItem?.scrnPath}.tsx`;let f=t.view?.glob?.[k];if(!f&&typeof{url:typeof document>"u"?require("url").pathToFileURL(__filename).href:q&&q.tagName.toUpperCase()==="SCRIPT"&&q.src||new URL("chunks/layout-components-B4ptqDmC.cjs",document.baseURI).href}<"u",f){const C=i.lazy(f);return n.current.set(c.key,C),C}return null},[t.view?.glob]);return e.jsxs(o.Layout,{className:"main-layout",children:[e.jsx(ee,{config:r?.header}),e.jsxs(o.Layout,{children:[e.jsx(ne,{config:r?.sidebar}),e.jsxs("div",{className:"content-container",children:[e.jsx(te,{config:r?.menuTab}),e.jsxs(J,{config:r?.content,children:[e.jsx("div",{className:"view-container",children:e.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[a.map(c=>{const y=p(c),k=d===c.key,f=!!g?.[c.key],C=s[c.key]||{};return e.jsx(z.SearchBoxProvider,{children:e.jsx(ae,{isActive:k,flagged:f,tabKey:c.key,onUnlock:()=>h(c.key),children:e.jsx(re,{isActive:k,instance:y||void 0,params:C},c.key)},c.key)},`sbp-${c.key}`)}),(!d||a.length===0)&&e.jsx(se,{})]})}),e.jsx(Ee,{}),e.jsx(oe,{modules:t?.popup})]})]})]}),(r?.quickService?.visible??!0)&&e.jsx(Z.QuickServiceToggle,{})]})},ze=({config:r,children:t})=>e.jsx("div",{children:"BwgPortal02"});function Fe({config:r,ui:t,navigate:n}){const{loading:a,capsOn:s,prefills:d,onKeyDown:g,doLogin:h}=I.useLogin(r),p=c=>h(c,n);return i.useEffect(()=>{I.useSystemStore.getState().fetchSystemMap()},[]),e.jsx(e.Fragment,{children:t({onSubmit:p,loading:a,capsOn:s,onKeyDown:g,prefills:d})})}function Ae({onSubmit:r,loading:t,capsOn:n,onKeyDown:a,prefills:s,labels:d={id:"ID 혹은 사번",pw:"비밀번호",remember:"Remember me",login:"로그인"},header:g,footer:h}){const[p]=o.Form.useForm();return i.useEffect(()=>{s&&(s.id||s.pswr)&&p.setFieldsValue({id:s.id,pswr:s.pswr})},[s,p]),e.jsx("div",{className:"login-main",children:e.jsxs("div",{className:"login_wrap",children:[g||e.jsx("div",{className:"logo_box"}),e.jsx("div",{className:"login_title"}),e.jsx(o.Form,{form:p,onFinish:r,className:"login-form",children:e.jsxs(o.Flex,{vertical:!0,children:[e.jsx(o.Form.Item,{name:"id",rules:[{required:!0,message:"아이디를 입력해주세요."},{whitespace:!0,message:"아이디는 공백이 들어갈 수 없습니다."}],children:e.jsx(o.Input,{allowClear:!0,placeholder:d.id,onKeyDown:a})}),e.jsx(o.Form.Item,{name:"pswr",rules:[{required:!0,message:"비밀번호를 입력하세요."}],children:e.jsx(o.Input.Password,{allowClear:!0,placeholder:d.pw,onKeyDown:a})}),e.jsx(o.Form.Item,{name:"remember",valuePropName:"checked",children:e.jsx(o.Checkbox,{children:d.remember})}),e.jsx("div",{className:n?"caps-lock caps-lock-on":"caps-lock",children:n?"Caps Lock On":"Caps Lock Off"}),e.jsx(o.Form.Item,{children:e.jsx(o.Button,{type:"primary",htmlType:"submit",loading:t,block:!0,children:d.login})})]})}),h]})})}exports.AppWrapper=Ce;exports.BwgCoreLogin=Fe;exports.BwgPortal01=De;exports.BwgPortal02=ze;exports.ConfigurableContent=J;exports.ConfigurableHeader=ee;exports.ConfigurableMenuTab=te;exports.ConfigurableSidebar=ne;exports.ContentContainer=re;exports.DefaultLoginView=Ae;exports.LandingContainer=se;exports.LoadingContainer=ye;exports.PopupContainer=oe;exports.ProtectWrapper=ae;exports.localPopupRegistry=Q;
|