v7.0.0-beta.2 release

This commit is contained in:
HeuJung committed 2026-04-20 20:37:49 +09:00
1 parent 6595fd0eb5
commit fa8eba7a0d
1165 files changed
+107118 -762127

No files matched your search

+47 -47
View File
@@ -1,4 +1,4 @@
var E_=Object.defineProperty;var __=(dn,Za,es)=>Za in dn?E_(dn,Za,{enumerable:!0,configurable:!0,writable:!0,value:es}):dn[Za]=es;var H=(dn,Za,es)=>__(dn,typeof Za!="symbol"?Za+"":Za,es);(function(dn){"use strict";function Za(r,e){for(var n=0;n<e.length;n++){const a=e[n];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in r)){const o=Object.getOwnPropertyDescriptor(a,i);o&&Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function es(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ru={exports:{}},Qe={};/**
var _1=Object.defineProperty;var A1=(ln,Za,es)=>Za in ln?_1(ln,Za,{enumerable:!0,configurable:!0,writable:!0,value:es}):ln[Za]=es;var H=(ln,Za,es)=>A1(ln,typeof Za!="symbol"?Za+"":Za,es);(function(ln){"use strict";function Za(r,e){for(var t=0;t<e.length;t++){const a=e[t];if(typeof a!="string"&&!Array.isArray(a)){for(const i in a)if(i!=="default"&&!(i in r)){const o=Object.getOwnPropertyDescriptor(a,i);o&&Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>a[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function es(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ru={exports:{}},Ze={};/**
* @license React
* react.production.js
*
@@ -6,7 +6,7 @@ var E_=Object.defineProperty;var __=(dn,Za,es)=>Za in dn?E_(dn,Za,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Tp;function pS(){if(Tp)return Qe;Tp=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),d=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),y=Symbol.iterator;function w(U){return U===null||typeof U!="object"?null:(U=y&&U[y]||U["@@iterator"],typeof U=="function"?U:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,k={};function A(U,q,ie){this.props=U,this.context=q,this.refs=k,this.updater=ie||v}A.prototype.isReactComponent={},A.prototype.setState=function(U,q){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,q,"setState")},A.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function R(){}R.prototype=A.prototype;function N(U,q,ie){this.props=U,this.context=q,this.refs=k,this.updater=ie||v}var D=N.prototype=new R;D.constructor=N,C(D,A.prototype),D.isPureReactComponent=!0;var M=Array.isArray;function L(){}var z={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function he(U,q,ie){var se=ie.ref;return{$$typeof:r,type:U,key:q,ref:se!==void 0?se:null,props:ie}}function be(U,q){return he(U.type,q,U.props)}function X(U){return typeof U=="object"&&U!==null&&U.$$typeof===r}function ge(U){var q={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(ie){return q[ie]})}var xe=/\/+/g;function le(U,q){return typeof U=="object"&&U!==null&&U.key!=null?ge(""+U.key):q.toString(36)}function je(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(L,L):(U.status="pending",U.then(function(q){U.status==="pending"&&(U.status="fulfilled",U.value=q)},function(q){U.status==="pending"&&(U.status="rejected",U.reason=q)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function J(U,q,ie,se,we){var Ee=typeof U;(Ee==="undefined"||Ee==="boolean")&&(U=null);var Oe=!1;if(U===null)Oe=!0;else switch(Ee){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(U.$$typeof){case r:case e:Oe=!0;break;case p:return Oe=U._init,J(Oe(U._payload),q,ie,se,we)}}if(Oe)return we=we(U),Oe=se===""?"."+le(U,0):se,M(we)?(ie="",Oe!=null&&(ie=Oe.replace(xe,"$&/")+"/"),J(we,q,ie,"",function(qe){return qe})):we!=null&&(X(we)&&(we=be(we,ie+(we.key==null||U&&U.key===we.key?"":(""+we.key).replace(xe,"$&/")+"/")+Oe)),q.push(we)),1;Oe=0;var tt=se===""?".":se+":";if(M(U))for(var Me=0;Me<U.length;Me++)se=U[Me],Ee=tt+le(se,Me),Oe+=J(se,q,ie,Ee,we);else if(Me=w(U),typeof Me=="function")for(U=Me.call(U),Me=0;!(se=U.next()).done;)se=se.value,Ee=tt+le(se,Me++),Oe+=J(se,q,ie,Ee,we);else if(Ee==="object"){if(typeof U.then=="function")return J(je(U),q,ie,se,we);throw q=String(U),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function F(U,q,ie){if(U==null)return U;var se=[],we=0;return J(U,se,"","",function(Ee){return q.call(ie,Ee,we++)}),se}function Q(U){if(U._status===-1){var q=U._result;q=q(),q.then(function(ie){(U._status===0||U._status===-1)&&(U._status=1,U._result=ie)},function(ie){(U._status===0||U._status===-1)&&(U._status=2,U._result=ie)}),U._status===-1&&(U._status=0,U._result=q)}if(U._status===1)return U._result.default;throw U._result}var pe=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},$={map:F,forEach:function(U,q,ie){F(U,function(){q.apply(this,arguments)},ie)},count:function(U){var q=0;return F(U,function(){q++}),q},toArray:function(U){return F(U,function(q){return q})||[]},only:function(U){if(!X(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return Qe.Activity=x,Qe.Children=$,Qe.Component=A,Qe.Fragment=n,Qe.Profiler=i,Qe.PureComponent=N,Qe.StrictMode=a,Qe.Suspense=h,Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Qe.__COMPILER_RUNTIME={__proto__:null,c:function(U){return z.H.useMemoCache(U)}},Qe.cache=function(U){return function(){return U.apply(null,arguments)}},Qe.cacheSignal=function(){return null},Qe.cloneEleLine truncated
*/var Ap;function yw(){if(Ap)return Ze;Ap=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),d=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function S(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function A(R,U,re){this.props=R,this.context=U,this.refs=k,this.updater=re||v}A.prototype.isReactComponent={},A.prototype.setState=function(R,U){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,U,"setState")},A.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function O(){}O.prototype=A.prototype;function N(R,U,re){this.props=R,this.context=U,this.refs=k,this.updater=re||v}var D=N.prototype=new O;D.constructor=N,w(D,A.prototype),D.isPureReactComponent=!0;var $=Array.isArray;function M(){}var z={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function pe(R,U,re){var ye=re.ref;return{$$typeof:r,type:R,key:U,ref:ye!==void 0?ye:null,props:re}}function we(R,U){return pe(R.type,U,R.props)}function J(R){return typeof R=="object"&&R!==null&&R.$$typeof===r}function be(R){var U={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(re){return U[re]})}var le=/\/+/g;function de(R,U){return typeof R=="object"&&R!==null&&R.key!=null?be(""+R.key):U.toString(36)}function je(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(M,M):(R.status="pending",R.then(function(U){R.status==="pending"&&(R.status="fulfilled",R.value=U)},function(U){R.status==="pending"&&(R.status="rejected",R.reason=U)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function W(R,U,re,ye,oe){var ke=typeof R;(ke==="undefined"||ke==="boolean")&&(R=null);var Oe=!1;if(R===null)Oe=!0;else switch(ke){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(R.$$typeof){case r:case e:Oe=!0;break;case p:return Oe=R._init,W(Oe(R._payload),U,re,ye,oe)}}if(Oe)return oe=oe(R),Oe=ye===""?"."+de(R,0):ye,$(oe)?(re="",Oe!=null&&(re=Oe.replace(le,"$&/")+"/"),W(oe,U,re,"",function(Ie){return Ie})):oe!=null&&(J(oe)&&(oe=we(oe,re+(oe.key==null||R&&R.key===oe.key?"":(""+oe.key).replace(le,"$&/")+"/")+Oe)),U.push(oe)),1;Oe=0;var Te=ye===""?".":ye+":";if($(R))for(var qe=0;qe<R.length;qe++)ye=R[qe],ke=Te+de(ye,qe),Oe+=W(ye,U,re,ke,oe);else if(qe=S(R),typeof qe=="function")for(R=qe.call(R),qe=0;!(ye=R.next()).done;)ye=ye.value,ke=Te+de(ye,qe++),Oe+=W(ye,U,re,ke,oe);else if(ke==="object"){if(typeof R.then=="function")return W(je(R),U,re,ye,oe);throw U=String(R),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function ge(R,U,re){if(R==null)return R;var ye=[],oe=0;return W(R,ye,"","",function(ke){return U.call(re,ke,oe++)}),ye}function ne(R){if(R._status===-1){var U=R._result;U=U(),U.then(function(re){(R._status===0||R._status===-1)&&(R._status=1,R._result=re)},function(re){(R._status===0||R._status===-1)&&(R._status=2,R._result=re)}),R._status===-1&&(R._status=0,R._result=U)}if(R._status===1)return R._result.default;throw R._result}var X=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},ae={map:ge,forEach:function(R,U,re){ge(R,function(){U.apply(this,arguments)},re)},count:function(R){var U=0;return ge(R,function(){U++}),U},toArray:function(R){return ge(R,function(U){return U})||[]},only:function(R){if(!J(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Ze.Activity=y,Ze.Children=ae,Ze.Component=A,Ze.Fragment=t,Ze.Profiler=i,Ze.PureComponent=N,Ze.StrictMode=a,Ze.Suspense=h,Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Ze.__COMPILER_RUNTIME={__proto__:null,c:function(R){return z.H.useMemoCache(R)}},Ze.cache=function(R){return function(){return R.apply(null,arguments)}},Ze.cacheSignal=function(){return null},Ze.cLine truncated
* @license React
* scheduler.production.js
*
@@ -14,7 +14,7 @@ var E_=Object.defineProperty;var __=(dn,Za,es)=>Za in dn?E_(dn,Za,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Dp;function mS(){return Dp||(Dp=1,(function(r){function e(J,F){var Q=J.length;J.push(F);e:for(;0<Q;){var pe=Q-1>>>1,$=J[pe];if(0<i($,F))J[pe]=F,J[Q]=$,Q=pe;else break e}}function n(J){return J.length===0?null:J[0]}function a(J){if(J.length===0)return null;var F=J[0],Q=J.pop();if(Q!==F){J[0]=Q;e:for(var pe=0,$=J.length,U=$>>>1;pe<U;){var q=2*(pe+1)-1,ie=J[q],se=q+1,we=J[se];if(0>i(ie,Q))se<$&&0>i(we,ie)?(J[pe]=we,J[se]=Q,pe=se):(J[pe]=ie,J[q]=Q,pe=q);else if(se<$&&0>i(we,Q))J[pe]=we,J[se]=Q,pe=se;else break e}}return F}function i(J,F){var Q=J.sortIndex-F.sortIndex;return Q!==0?Q:J.id-F.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var d=Date,g=d.now();r.unstable_now=function(){return d.now()-g}}var h=[],f=[],p=1,x=null,y=3,w=!1,v=!1,C=!1,k=!1,A=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function D(J){for(var F=n(f);F!==null;){if(F.callback===null)a(f);else if(F.startTime<=J)a(f),F.sortIndex=F.expirationTime,e(h,F);else break;F=n(f)}}function M(J){if(C=!1,D(J),!v)if(n(h)!==null)v=!0,L||(L=!0,ge());else{var F=n(f);F!==null&&je(M,F.startTime-J)}}var L=!1,z=-1,Y=5,he=-1;function be(){return k?!0:!(r.unstable_now()-he<Y)}function X(){if(k=!1,L){var J=r.unstable_now();he=J;var F=!0;try{e:{v=!1,C&&(C=!1,R(z),z=-1),w=!0;var Q=y;try{t:{for(D(J),x=n(h);x!==null&&!(x.expirationTime>J&&be());){var pe=x.callback;if(typeof pe=="function"){x.callback=null,y=x.priorityLevel;var $=pe(x.expirationTime<=J);if(J=r.unstable_now(),typeof $=="function"){x.callback=$,D(J),F=!0;break t}x===n(h)&&a(h),D(J)}else a(h);x=n(h)}if(x!==null)F=!0;else{var U=n(f);U!==null&&je(M,U.startTime-J),F=!1}}break e}finally{x=null,y=Q,w=!1}F=void 0}}finally{F?ge():L=!1}}}var ge;if(typeof N=="function")ge=function(){N(X)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,le=xe.port2;xe.port1.onmessage=X,ge=function(){le.postMessage(null)}}else ge=function(){A(X,0)};function je(J,F){z=A(function(){J(r.unstable_now())},F)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(J){J.callback=null},r.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<J?Math.floor(1e3/J):5},r.unstable_getCurrentPriorityLevel=function(){return y},r.unstable_next=function(J){switch(y){case 1:case 2:case 3:var F=3;break;default:F=y}var Q=y;y=F;try{return J()}finally{y=Q}},r.unstable_requestPaint=function(){k=!0},r.unstable_runWithPriority=function(J,F){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var Q=y;y=J;try{return F()}finally{y=Q}},r.unstable_scheduleCallback=function(J,F,Q){var pe=r.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?pe+Q:pe):Q=pe,J){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=Q+$,J={id:p++,callback:F,priorityLevel:J,startTime:Q,expirationTime:$,sortIndex:-1},Q>pe?(J.sortIndex=Q,e(f,J),n(h)===null&&J===n(f)&&(C?(R(z),z=-1):C=!0,je(M,Q-pe))):(J.sortIndex=$,e(h,J),v||w||(v=!0,L||(L=!0,ge()))),J},r.unstable_shouldYield=be,r.unstable_wrapCallback=function(J){var F=y;return function(){var Q=y;y=F;try{return J.apply(this,arguments)}finally{y=Q}}}})($u)),$u}var Rp;function yS(){return Rp||(Rp=1,Mu.exports=mS()),Mu.exports}var Iu={exports:{}},kn={};/**
*/var Dp;function xw(){return Dp||(Dp=1,(function(r){function e(W,ge){var ne=W.length;W.push(ge);e:for(;0<ne;){var X=ne-1>>>1,ae=W[X];if(0<i(ae,ge))W[X]=ge,W[ne]=ae,ne=X;else break e}}function t(W){return W.length===0?null:W[0]}function a(W){if(W.length===0)return null;var ge=W[0],ne=W.pop();if(ne!==ge){W[0]=ne;e:for(var X=0,ae=W.length,R=ae>>>1;X<R;){var U=2*(X+1)-1,re=W[U],ye=U+1,oe=W[ye];if(0>i(re,ne))ye<ae&&0>i(oe,re)?(W[X]=oe,W[ye]=ne,X=ye):(W[X]=re,W[U]=ne,X=U);else if(ye<ae&&0>i(oe,ne))W[X]=oe,W[ye]=ne,X=ye;else break e}}return ge}function i(W,ge){var ne=W.sortIndex-ge.sortIndex;return ne!==0?ne:W.id-ge.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;r.unstable_now=function(){return o.now()}}else{var d=Date,g=d.now();r.unstable_now=function(){return d.now()-g}}var h=[],f=[],p=1,y=null,x=3,S=!1,v=!1,w=!1,k=!1,A=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function D(W){for(var ge=t(f);ge!==null;){if(ge.callback===null)a(f);else if(ge.startTime<=W)a(f),ge.sortIndex=ge.expirationTime,e(h,ge);else break;ge=t(f)}}function $(W){if(w=!1,D(W),!v)if(t(h)!==null)v=!0,M||(M=!0,be());else{var ge=t(f);ge!==null&&je($,ge.startTime-W)}}var M=!1,z=-1,K=5,pe=-1;function we(){return k?!0:!(r.unstable_now()-pe<K)}function J(){if(k=!1,M){var W=r.unstable_now();pe=W;var ge=!0;try{e:{v=!1,w&&(w=!1,O(z),z=-1),S=!0;var ne=x;try{t:{for(D(W),y=t(h);y!==null&&!(y.expirationTime>W&&we());){var X=y.callback;if(typeof X=="function"){y.callback=null,x=y.priorityLevel;var ae=X(y.expirationTime<=W);if(W=r.unstable_now(),typeof ae=="function"){y.callback=ae,D(W),ge=!0;break t}y===t(h)&&a(h),D(W)}else a(h);y=t(h)}if(y!==null)ge=!0;else{var R=t(f);R!==null&&je($,R.startTime-W),ge=!1}}break e}finally{y=null,x=ne,S=!1}ge=void 0}}finally{ge?be():M=!1}}}var be;if(typeof N=="function")be=function(){N(J)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,de=le.port2;le.port1.onmessage=J,be=function(){de.postMessage(null)}}else be=function(){A(J,0)};function je(W,ge){z=A(function(){W(r.unstable_now())},ge)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(W){W.callback=null},r.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<W?Math.floor(1e3/W):5},r.unstable_getCurrentPriorityLevel=function(){return x},r.unstable_next=function(W){switch(x){case 1:case 2:case 3:var ge=3;break;default:ge=x}var ne=x;x=ge;try{return W()}finally{x=ne}},r.unstable_requestPaint=function(){k=!0},r.unstable_runWithPriority=function(W,ge){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var ne=x;x=W;try{return ge()}finally{x=ne}},r.unstable_scheduleCallback=function(W,ge,ne){var X=r.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?X+ne:X):ne=X,W){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=ne+ae,W={id:p++,callback:ge,priorityLevel:W,startTime:ne,expirationTime:ae,sortIndex:-1},ne>X?(W.sortIndex=ne,e(f,W),t(h)===null&&W===t(f)&&(w?(O(z),z=-1):w=!0,je($,ne-X))):(W.sortIndex=ae,e(h,W),v||S||(v=!0,M||(M=!0,be()))),W},r.unstable_shouldYield=we,r.unstable_wrapCallback=function(W){var ge=x;return function(){var ne=x;x=ge;try{return W.apply(this,arguments)}finally{x=ne}}}})($u)),$u}var Rp;function bw(){return Rp||(Rp=1,Mu.exports=xw()),Mu.exports}var Iu={exports:{}},kn={};/**
* @license React
* react-dom.production.js
*
@@ -22,7 +22,7 @@ var E_=Object.defineProperty;var __=(dn,Za,es)=>Za in dn?E_(dn,Za,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Op;function xS(){if(Op)return kn;Op=1;var r=Ou();function e(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(h,f,p){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:x==null?null:""+x,children:h,containerInfo:f,implementation:p}}var d=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return kn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,kn.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return o(h,f,null,p)},kn.flushSync=function(h){var f=d.T,p=a.p;try{if(d.T=null,a.p=2,h)return h()}finally{d.T=f,a.p=p,a.d.f()}},kn.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,a.d.C(h,f))},kn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},kn.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,x=g(p,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,w=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?a.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:x,integrity:y,fetchPriority:w}):p==="script"&&a.d.X(h,{crossOrigin:x,integrity:y,fetchPriority:w,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},kn.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=g(f.as,f.crossOrigin);a.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&a.d.M(h)},kn.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,x=g(p,f.crossOrigin);a.d.L(h,p,{crossOrigin:x,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},kn.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=g(f.as,f.crossOrigin);a.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else a.d.m(h)},kn.requestFormReset=function(h){a.d.r(h)},kn.unstable_batchedUpdates=function(h,f){return h(f)},kn.useFormState=function(h,f,p){return d.H.useFormState(h,f,p)},kn.useFormStatus=function(){return d.H.useHostTransitionStatus()},kn.version="19.2.0",kn}var Lp;function Mp(){if(Lp)return Iu.exports;Lp=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Iu.exports=xS(),Iu.exports}/**
*/var Op;function vw(){if(Op)return kn;Op=1;var r=Ou();function e(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var a={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(h,f,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:h,containerInfo:f,implementation:p}}var d=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return kn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,kn.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return o(h,f,null,p)},kn.flushSync=function(h){var f=d.T,p=a.p;try{if(d.T=null,a.p=2,h)return h()}finally{d.T=f,a.p=p,a.d.f()}},kn.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,a.d.C(h,f))},kn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},kn.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,y=g(p,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?a.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:S}):p==="script"&&a.d.X(h,{crossOrigin:y,integrity:x,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},kn.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=g(f.as,f.crossOrigin);a.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&a.d.M(h)},kn.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,y=g(p,f.crossOrigin);a.d.L(h,p,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},kn.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=g(f.as,f.crossOrigin);a.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else a.d.m(h)},kn.requestFormReset=function(h){a.d.r(h)},kn.unstable_batchedUpdates=function(h,f){return h(f)},kn.useFormState=function(h,f,p){return d.H.useFormState(h,f,p)},kn.useFormStatus=function(){return d.H.useHostTransitionStatus()},kn.version="19.2.0",kn}var Lp;function Mp(){if(Lp)return Iu.exports;Lp=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Iu.exports=vw(),Iu.exports}/**
* @license React
* react-dom-client.production.js
*
@@ -30,20 +30,20 @@ var E_=Object.defineProperty;var __=(dn,Za,es)=>Za in dn?E_(dn,Za,{enumerable:!0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var $p;function bS(){if($p)return so;$p=1;var r=yS(),e=Ou(),n=Mp();function a(t){var s="https://react.dev/errors/"+t;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+t+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var s=t,c=t;if(t.alternate)for(;s.return;)s=s.return;else{t=s;do s=t,(s.flags&4098)!==0&&(c=s.return),t=s.return;while(t)}return s.tag===3?c:null}function d(t){if(t.tag===13){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function g(t){if(t.tag===31){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function h(t){if(o(t)!==t)throw Error(a(188))}function f(t){var s=t.alternate;if(!s){if(s=o(t),s===null)throw Error(a(188));return s!==t?null:t}for(var c=t,u=s;;){var m=c.return;if(m===null)break;var b=m.alternate;if(b===null){if(u=m.return,u!==null){c=u;continue}break}if(m.child===b.child){for(b=m.child;b;){if(b===c)return h(m),t;if(b===u)return h(m),s;b=b.sibling}throw Error(a(188))}if(c.return!==u.return)c=m,u=b;else{for(var E=!1,O=m.child;O;){if(O===c){E=!0,c=m,u=b;break}if(O===u){E=!0,u=m,c=b;break}O=O.sibling}if(!E){for(O=b.child;O;){if(O===c){E=!0,c=b,u=m;break}if(O===u){E=!0,u=b,c=m;break}O=O.sibling}if(!E)throw Error(a(189))}}if(c.alternate!==u)throw Error(a(190))}if(c.tag!==3)throw Error(a(188));return c.stateNode.current===c?t:s}function p(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t;for(t=t.child;t!==null;){if(s=p(t),s!==null)return s;t=t.sibling}return null}var x=Object.assign,y=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),N=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),he=Symbol.for("react.activity"),be=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function ge(t){return t===null||typeof t!="object"?null:(t=X&&t[X]||t["@@iterator"],typeof t=="function"?t:null)}var xe=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===xe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case A:return"Profiler";case k:return"StrictMode";case M:return"Suspense";case L:return"SuspenseList";case he:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case v:return"Portal";case N:return t.displayName||"Context";case R:return(t._context.displayName||"Context")+".Consumer";case D:var s=t.render;return t=t.displayName,t||(t=s.displayName||s.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case z:return s=t.displayName||null,s!==null?s:le(t.type)||"Memo";case Y:s=t._payload,t=t._init;try{return le(t(s))}catch{}}return null}var je=Array.isArray,J=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},pe=[],$=-1;function U(t){return{current:t}}function q(t){0>$||(t.current=pe[$],pe[$]=null,$--)}function ie(t,s){$++,pe[$]=t.current,t.current=s}var se=U(null),we=U(null),Ee=U(null),Oe=U(null);function tt(t,s){switch(ie(Ee,s),ie(we,t),ie(se,null),s.nodeType){case 9:case 11:t=(t=s.documentElement)&&(t=t.namespaceURI)?$v(t):0;break;default:if(t=s.tagName,s=s.namespaceURI)s=$v(s),t=Iv(s,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}q(se),ie(se,t)}function Me(){q(se),q(we),q(Ee)}function qe(t){t.memoizedState!==null&&ie(Oe,t);var s=se.current,c=Iv(s,t.type);s!==c&&(ie(we,t),ie(se,c))}function zt(t){we.current===t&&(q(se),q(we)),Oe.current===t&&(q(Oe),Wl._currentValue=Q)}var Et,$t;function kt(t){if(Et===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);Et=s&&s[1]||"",$t=-1<c.stack.indexOf(`
*/var $p;function ww(){if($p)return ro;$p=1;var r=bw(),e=Ou(),t=Mp();function a(n){var s="https://react.dev/errors/"+n;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function o(n){var s=n,c=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(c=s.return),n=s.return;while(n)}return s.tag===3?c:null}function d(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function g(n){if(n.tag===31){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function h(n){if(o(n)!==n)throw Error(a(188))}function f(n){var s=n.alternate;if(!s){if(s=o(n),s===null)throw Error(a(188));return s!==n?null:n}for(var c=n,u=s;;){var m=c.return;if(m===null)break;var b=m.alternate;if(b===null){if(u=m.return,u!==null){c=u;continue}break}if(m.child===b.child){for(b=m.child;b;){if(b===c)return h(m),n;if(b===u)return h(m),s;b=b.sibling}throw Error(a(188))}if(c.return!==u.return)c=m,u=b;else{for(var E=!1,L=m.child;L;){if(L===c){E=!0,c=m,u=b;break}if(L===u){E=!0,u=m,c=b;break}L=L.sibling}if(!E){for(L=b.child;L;){if(L===c){E=!0,c=b,u=m;break}if(L===u){E=!0,u=b,c=m;break}L=L.sibling}if(!E)throw Error(a(189))}}if(c.alternate!==u)throw Error(a(190))}if(c.tag!==3)throw Error(a(188));return c.stateNode.current===c?n:s}function p(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n;for(n=n.child;n!==null;){if(s=p(n),s!==null)return s;n=n.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),N=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),pe=Symbol.for("react.activity"),we=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function be(n){return n===null||typeof n!="object"?null:(n=J&&n[J]||n["@@iterator"],typeof n=="function"?n:null)}var le=Symbol.for("react.client.reference");function de(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===le?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case A:return"Profiler";case k:return"StrictMode";case $:return"Suspense";case M:return"SuspenseList";case pe:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case v:return"Portal";case N:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case D:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case z:return s=n.displayName||null,s!==null?s:de(n.type)||"Memo";case K:s=n._payload,n=n._init;try{return de(n(s))}catch{}}return null}var je=Array.isArray,W=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},X=[],ae=-1;function R(n){return{current:n}}function U(n){0>ae||(n.current=X[ae],X[ae]=null,ae--)}function re(n,s){ae++,X[ae]=n.current,n.current=s}var ye=R(null),oe=R(null),ke=R(null),Oe=R(null);function Te(n,s){switch(re(ke,s),re(oe,n),re(ye,null),s.nodeType){case 9:case 11:n=(n=s.documentElement)&&(n=n.namespaceURI)?zv(n):0;break;default:if(n=s.tagName,s=s.namespaceURI)s=zv(s),n=Hv(s,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}U(ye),re(ye,n)}function qe(){U(ye),U(oe),U(ke)}function Ie(n){n.memoizedState!==null&&re(Oe,n);var s=ye.current,c=Hv(s,n.type);s!==c&&(re(oe,n),re(ye,c))}function Nt(n){oe.current===n&&(U(ye),U(oe)),Oe.current===n&&(U(Oe),Yl._currentValue=ne)}var Tt,Xt;function Ot(n){if(Tt===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);Tt=s&&s[1]||"",Xt=-1<c.stack.indexOf(`
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Et+t+$t}var tn=!1;function Vt(t,s){if(!t||tn)return"";tn=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(s){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(oe){var ae=oe}Reflect.construct(t,[],ye)}else{try{ye.call()}catch(oe){ae=oe}t.call(ye.prototype)}}else{try{throw Error()}catch(oe){ae=oe}(ye=t())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(oe){if(oe&&ae&&typeof oe.stack=="string")return[oe.stack,ae.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),E=b[0],O=b[1];if(E&&O){var B=E.split(`
`),te=O.split(`
`);for(m=u=0;u<B.length&&!B[u].includes("DetermineComponentFrameRoot");)u++;for(;m<te.length&&!te[m].includes("DetermineComponentFrameRoot");)m++;if(u===B.length||m===te.length)for(u=B.length-1,m=te.length-1;1<=u&&0<=m&&B[u]!==te[m];)m--;for(;1<=u&&0<=m;u--,m--)if(B[u]!==te[m]){if(u!==1||m!==1)do if(u--,m--,0>m||B[u]!==te[m]){var ce=`
`+B[u].replace(" at new "," at ");return t.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",t.displayName)),ce}while(1<=u&&0<=m);break}}}finally{tn=!1,Error.prepareStackTrace=c}return(c=t?t.displayName||t.name:"")?kt(c):""}function oa(t,s){switch(t.tag){case 26:case 27:case 5:return kt(t.type);case 16:return kt("Lazy");case 13:return t.child!==s&&s!==null?kt("Suspense Fallback"):kt("Suspense");case 19:return kt("SuspenseList");case 0:case 15:return Vt(t.type,!1);case 11:return Vt(t.type.render,!1);case 1:return Vt(t.type,!0);case 31:return kt("Activity");default:return""}}function Ce(t){try{var s="",c=null;do s+=oa(t,c),c=t,t=t.return;while(t);return s}catch(u){return`
`+Tt+n+Xt}var Qt=!1;function It(n,s){if(!n||Qt)return"";Qt=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(s){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ie){var ee=ie}Reflect.construct(n,[],xe)}else{try{xe.call()}catch(ie){ee=ie}n.call(xe.prototype)}}else{try{throw Error()}catch(ie){ee=ie}(xe=n())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(ie){if(ie&&ee&&typeof ie.stack=="string")return[ie.stack,ee.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=u.DetermineComponentFrameRoot(),E=b[0],L=b[1];if(E&&L){var B=E.split(`
`),Z=L.split(`
`);for(m=u=0;u<B.length&&!B[u].includes("DetermineComponentFrameRoot");)u++;for(;m<Z.length&&!Z[m].includes("DetermineComponentFrameRoot");)m++;if(u===B.length||m===Z.length)for(u=B.length-1,m=Z.length-1;1<=u&&0<=m&&B[u]!==Z[m];)m--;for(;1<=u&&0<=m;u--,m--)if(B[u]!==Z[m]){if(u!==1||m!==1)do if(u--,m--,0>m||B[u]!==Z[m]){var ce=`
`+B[u].replace(" at new "," at ");return n.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",n.displayName)),ce}while(1<=u&&0<=m);break}}}finally{Qt=!1,Error.prepareStackTrace=c}return(c=n?n.displayName||n.name:"")?Ot(c):""}function Tn(n,s){switch(n.tag){case 26:case 27:case 5:return Ot(n.type);case 16:return Ot("Lazy");case 13:return n.child!==s&&s!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return It(n.type,!1);case 11:return It(n.type.render,!1);case 1:return It(n.type,!0);case 31:return Ot("Activity");default:return""}}function Ce(n){try{var s="",c=null;do s+=Tn(n,c),c=n,n=n.return;while(n);return s}catch(u){return`
Error generating stack: `+u.message+`
`+u.stack}}var Ge=Object.prototype.hasOwnProperty,it=r.unstable_scheduleCallback,ft=r.unstable_cancelCallback,bt=r.unstable_shouldYield,Ct=r.unstable_requestPaint,ot=r.unstable_now,We=r.unstable_getCurrentPriorityLevel,nn=r.unstable_ImmediatePriority,Nt=r.unstable_UserBlockingPriority,It=r.unstable_NormalPriority,an=r.unstable_LowPriority,_a=r.unstable_IdlePriority,W=r.log,ve=r.unstable_setDisableYieldValue,me=null,ne=null;function _e(t){if(typeof W=="function"&&ve(t),ne&&typeof ne.setStrictMode=="function")try{ne.setStrictMode(me,t)}catch{}}var Ne=Math.clz32?Math.clz32:yt,$e=Math.log,Ve=Math.LN2;function yt(t){return t>>>=0,t===0?32:31-($e(t)/Ve|0)|0}var Ae=256,st=262144,He=4194304;function Pe(t){var s=t&42;if(s!==0)return s;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Ye(t,s,c){var u=t.pendingLanes;if(u===0)return 0;var m=0,b=t.suspendedLanes,E=t.pingedLanes;t=t.warmLanes;var O=u&134217727;return O!==0?(u=O&~b,u!==0?m=Pe(u):(E&=O,E!==0?m=Pe(E):c||(c=O&~t,c!==0&&(m=Pe(c))))):(O=u&~b,O!==0?m=Pe(O):E!==0?m=Pe(E):c||(c=u&~t,c!==0&&(m=Pe(c)))),m===0?0:s!==0&&s!==m&&(s&b)===0&&(b=m&-m,c=s&-s,b>=c||b===32&&(c&4194048)!==0)?s:m}function De(t,s){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&s)===0}function Le(t,s){switch(t){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ue(){var t=He;return He<<=1,(He&62914560)===0&&(He=4194304),t}function At(t){for(var s=[],c=0;31>c;c++)s.push(t);return s}function Kt(t,s){t.pendingLanes|=s,s!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ut(t,s,c,u,m,b){var E=t.pendingLanes;t.pendingLanes=c,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=c,t.entangledLanes&=c,t.errorRecoveryDisabledLanes&=c,t.shellSuspendCounter=0;var O=t.entanglements,B=t.expirationTimes,te=t.hiddenUpdates;for(c=E&~c;0<c;){var ce=31-Ne(c),ye=1<<ce;O[ce]=0,B[ce]=-1;var ae=te[ce];if(ae!==null)for(te[ce]=null,ce=0;ce<ae.length;ce++){var oe=ae[ce];oe!==null&&(oe.lane&=-536870913)}c&=~ye}u!==0&&qt(t,u,0),b!==0&&m===0&&t.tag!==0&&(t.suspendedLanes|=b&~(E&~s))}function qt(t,s,c){t.pendingLanes|=s,t.suspendedLanes&=~s;var u=31-Ne(s);t.entangledLanes|=s,t.entanglements[u]=t.entanglements[u]|1073741824|c&261930}function bn(t,s){var c=t.entangledLanes|=s;for(t=t.entanglements;c;){var u=31-Ne(c),m=1<<u;m&s|t[u]&s&&(t[u]|=s),c&=~m}}function Dn(t,s){var c=s&-s;return c=(c&42)!==0?1:Ta(c),(c&(t.suspendedLanes|s))!==0?0:c}function Ta(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Aa(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Jn(){var t=F.p;return t!==0?t:(t=window.event,t===void 0?32:iS(t.type))}function Ga(t,s){var c=F.p;try{return F.p=t,s()}finally{F.p=c}}var In=Math.random().toString(36).slice(2),gn="__reactFiber$"+In,vn="__reactProps$"+In,zn="__reactContainer$"+In,Ko="__reactEvents$"+In,mh="__reactListeners$"+In,yh="__reactHandles$"+In,bi="__reactResources$"+In,ds="__reactMarker$"+In;function Wo(t){delete t[gn],delete t[vn],delete t[Ko],delete t[mh],delete t[yh]}function Hs(t){var s=t[gn];if(s)return s;for(var c=t.parentNode;c;){if(s=c[zn]||c[gn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(t=Gv(t);t!==null;){if(c=t[gn])return c;t=Gv(t)}return s}t=c,c=t.parentNode}return null}function Ps(t){if(t=t[gn]||t[zn]){var s=t.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return t}return null}function Tr(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t.stateNode;throw Error(a(33))}function Fa(t){var s=t[bi];return s||(s=t[bi]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function sn(t){t[ds]=!0}var fd=new Set,pd={};function us(t,s){Us(t,s),Us(t+"Capture",s)}function Us(t,s){for(pd[t]=s,t=0;t<s.length;t++)fd.add(s[t])}var Da=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C- Line truncated
`).replace(Y1,"")}function Lv(t,s){return s=Ov(s),Ov(t)===s}function Rt(t,s,c,u,m,b){switch(c){case"children":typeof u=="string"?s==="body"||s==="textarea"&&u===""||qs(t,u):(typeof u=="number"||typeof u=="bigint")&&s!=="body"&&qs(t,""+u);break;case"className":Si(t,"class",u);break;case"tabIndex":Si(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Si(t,c,u);break;case"style":Ka(t,u,b);break;case"data":if(s!=="object"){Si(t,"data",u);break}case"src":case"href":if(u===""&&(s!=="a"||c!=="href")){t.removeAttribute(c);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(c);break}u=ji(""+u),t.setAttribute(c,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(c==="formAction"?(s!=="input"&&Rt(t,s,"name",m.name,m,null),Rt(t,s,"formEncType",m.formEncType,m,null),Rt(t,s,"formMethod",m.formMethod,m,null),Rt(t,s,"formTarget",m.formTarget,m,null)):(Rt(t,s,"encType",m.encType,m,null),Rt(t,s,"method",m.method,m,null),Rt(t,s,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(c);break}u=ji(""+u),t.setAttribute(c,u);break;case"onClick":u!=null&&(t.onclick=la);break;case"onScroll":u!=null&&ct("scroll",t);break;case"onScrollEnd":u!=null&&ct("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(c=u.__html,c!=null){if(m.children!=null)throw Error(a(60));t.innerHTML=c}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}c=ji(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(c,""+u):t.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(c,""):t.removeAttribute(c);break;case"capture":case"download":u===!0?t.setAttribute(c,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(c,u):t.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(c,u):t.removeAttribute(c);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(c):t.setAttribute(c,u);break;case"popover":ct("beforetoggle",t),ct("toggle",t),vi(t,"popover",u);break;case"xlinkActuate":Ra(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ra(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ra(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ra(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ra(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ra(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ra(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ra(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ra(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":vi(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=vh.get(c)||c,vi(t,c,u))}}function up(t,s,c,u,m,b){switch(c){case"style":Ka(t,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(c=u.__html,c!=null){if(m.children!=null)throw Error(a(60));t.innerHTML=c}}break;case"children":typeof u=="string"?qs(t,u):(typeof u=="number"||typeof u=="bigint")&&qs(t,""+u);break;case"onScroll":u!=null&&ct("scroll",t);break;case"onScrollEnd":u!=null&&ct("scrollend",t);break;case"onClick":u!=null&&(t.onclick=la);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
`).forEach(function(d){i=d.indexOf(":"),n=d.substring(0,i).trim().toLowerCase(),a=d.substring(i+1).trim(),!(!n||e[n]&&Ow[n])&&(n==="set-cookie"?e[n]?e[n].push(a):e[n]=[a]:e[n]=e[n]?e[n]+", "+a:a)}),e},bm=Symbol("internals");function xo(r){return r&&String(r).trim().toLowerCase()}function dc(r){return r===!1||r==null?r:re.isArray(r)?r.map(dc):String(r)}function Mw(r){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(r);)e[a[1]]=a[2];return e}const $w=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function eg(r,e,n,a,i){if(re.isFunction(a))return a.call(this,e,n);if(i&&(e=n),!!re.isString(e)){if(re.isString(a))return e.indexOf(a)!==-1;if(re.isRegExp(a))return a.test(e)}}function Iw(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,a)=>n.toUpperCase()+a)}function zw(r,e){const n=re.toCamelCase(" "+e);["get","set","has"].forEach(a=>{Object.defineProperty(r,a+n,{value:function(i,o,d){return this[a].call(this,e,i,o,d)},configurable:!0})})}let Ln=class{constructor(e){e&&this.set(e)}set(e,n,a){const i=this;function o(g,h,f){const p=xo(h);if(!p)throw new Error("header name must be a non-empty string");const x=re.findKey(i,p);(!x||i[x]===void 0||f===!0||f===void 0&&i[x]!==!1)&&(i[x||h]=dc(g))}const d=(g,h)=>re.forEach(g,(f,p)=>o(f,p,h));if(re.isPlainObject(e)||e instanceof this.constructor)d(e,n);else if(re.isString(e)&&(e=e.trim())&&!$w(e))d(Lw(e),n);else if(re.isObject(e)&&re.isIterable(e)){let g={},h,f;for(const p of e){if(!re.isArray(p))throw TypeError("Object iterator must return a key-value pair");g[f=p[0]]=(h=g[f])?re.isArray(h)?[...h,p[1]]:[h,p[1]]:p[1]}d(g,n)}else e!=null&&o(n,e,a);return this}get(e,n){if(e=xo(e),e){const a=re.findKey(this,e);if(a){const i=this[a];if(!n)return i;if(n===!0)return Mw(i);if(re.isFunction(n))return n.call(this,i,a);if(re.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=xo(e),e){const a=re.findKey(this,e);return!!(a&&this[a]!==void 0&&(!n||eg(this,this[a],a,n)))}return!1}delete(e,n){const a=this;let i=!1;function o(d){if(d=xo(d),d){const g=re.findKey(a,d);g&&(!n||eg(a,a[g],g,n))&&(delete a[g],i=!0)}}return re.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let a=n.length,i=!1;for(;a--;){const o=n[a];(!e||eg(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,a={};return re.forEach(this,(i,o)=>{const d=re.findKey(a,o);if(d){n[d]=dc(i),delete n[o];return}const g=e?Iw(o):String(o).trim();g!==o&&delete n[o],n[g]=dc(i),a[g]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return re.forEach(this,(a,i)=>{a!=null&&a!==!1&&(n[i]=e&&re.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const a=new this(e);return n.forEach(i=>a.set(i)),a}static accessor(e){const a=(this[bm]=this[bm]={accessors:{}}).accessors,i=this.prototype;function o(d){const g=xo(d);a[g]||(zw(i,d),a[g]=!0)}return re.isArray(e)?e.forEach(o):o(e),this}};Ln.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Ln.prototype,({value:r},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(a){this[n]=a}}}),re.freezeMethods(Ln);function tg(r,e){const n=this||yo,a=e||n,i=Ln.from(a.headers);let o=a.data;return re.forEach(r,function(g){o=g.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function vm(r){return!!(r&&r.__CANCEL__)}function si(r,e,n){et.call(this,r??"canceled",et.ERR_CANCELED,e,n),this.name="CanceledError"}re.inherits(si,et,{__CANCEL__:!0});function Sm(r,e,n){const a=n.config.validateStatus;!n.status||!a||a(n.status)?r(n):e(new et("Request failed with status code "+n.status,[et.ERR_BAD_REQUEST,et.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Hw(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function Pw(r,e){r=r||10;const n=new Array(r),a=new Array(r);let i=0,o=0,d;return e=e!==void 0?e:1e3,function(h){const f=Date.now(),p=a[o];d||(d=f),n[i]=h,a[i]=f;let x=o,y=0;for(;x!==i;)y+=n[x++],x=x%r;if(i=(i+1)%r,i===o&&(o=(o+1)%r),f-d<e)return;const w=p&&f-p;return w?Math.round(y*1e3/w):void 0}}function Uw(r,e){let n=0,a=1e3/e,i,o;const d=(f,p=Date.now())=>{n=p,i=null,o&&(clearTimeout(o),o=null),r(...f)};return[(...f)=>{const p=Date.now(),x=p-n;x>=a?d(f,p):(i=f,o||(o=setTimeout(()=>{o=null,d(i)},a-x)))},()=>i&&d(i)]}const uc=(r,e,n=3)=>{let a=0;const i=Pw(50,250);return Uw(o=>{const d=o.loaded,g=o.lengthComputable?o.total:void 0,h=d-a,f=i(h),p=d<=g;a=d;const x={loaded:d,total:g,progress:g?d/g:void 0,bytes:h,rate:f||void 0,estimated:f&&g&&p?(g-d)/f:void 0,event:o,lengthComputable:g!=null,[e?"download":"upload"]:!0};r(x)},n)},wm=(r,e)=>{const n=r!=null;return[a=>e[0]({lengthComputable:n,total:r,loaded:a}),e[1]]},Cm=r=>(...e)=>re.asap(()=>r(...e)),Bw=Nn.hasStandardBrowserEnv?((r,e)=>n=>(n=new URL(n,Nn.origin),r.protocol===n.protocol&&r.host===n.host&&(e||r.port===n.port)))(new URL(Nn.origin),Nn.navigator&&/(msie|trident)/i.test(Nn.navigator.userAgent)):()=>!0,qw=Nn.hasStandardBrowserEnv?{write(r,e,n,a,i,o){const d=[r+"="+encodeURIComponent(e)];re.isNumber(n)&&d.push("expires="+new Date(n).toGMTString()),re.isString(a)&&d.push("path="+a),re.isString(i)&&d.push("domain="+i),o===!0&&d.push("secure"),document.cookie=d.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Gw(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Fw(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function jm(r,e,n){let a=!Gw(e);return r&&(a||n==!1)?Fw(r,e):e}const km=r=>r instanceof Ln?{...r}:r;function br(r,e){e=e||{};const n={};function a(f,p,x,y){return re.isPlainObject(f)&&re.isPlainObject(p)?re.merge.call({caseless:y},f,p):re.isPlainObject(p)?re.merge({},p):re.isArray(p)?p.slice():p}function i(f,p,x,y){if(re.isUndefined(p)){if(!re.isUndefined(f))return a(void 0,f,x,y)}else return a(f,p,x,y)}function o(f,p){if(!re.isUndefined(p))return a(void 0,p)}function d(f,p){if(re.isUndefined(p)){if(!re.isUndefined(f))return a(void 0,f)}else return a(void 0,p)}function g(f,p,x){if(x in e)return a(f,p);if(x in r)return a(void 0,f)}const h={url:o,method:o,data:o,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:g,headers:(f,p,x)=>i(km(f),km(p),x,!0)};return re.forEach(Object.keys({...r,...e}),function(p){const x=h[p]||i,y=x(r[p],e[p],p);re.isUndefined(y)&&x!==g||(n[p]=y)}),n}const Nm=r=>{const e=br({},r);let{data:n,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:o,headers:d,auth:g}=e;if(e.headers=d=Ln.from(d),e.url=pm(jm(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),g&&d.set("Authorization","Basic "+btoa((g.username||"")+":"+(g.password?unescape(encodeURIComponent(g.password)):""))),re.isFormData(n)){if(Nn.hasStandardBrowserEnv||Nn.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(re.isFunction(n.getHeaders)){const h=n.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([p,x])=>{f.includes(p.toLowerCase())&&d.set(p,x)})}}if(Nn.hasStandardBrowserEnv&&(a&&re.isFunction(a)&&(a=a(e Line truncated
`+u.stack}}var Ge=Object.prototype.hasOwnProperty,at=r.unstable_scheduleCallback,ft=r.unstable_cancelCallback,bt=r.unstable_shouldYield,Et=r.unstable_requestPaint,pt=r.unstable_now,tt=r.unstable_getCurrentPriorityLevel,bn=r.unstable_ImmediatePriority,wt=r.unstable_UserBlockingPriority,At=r.unstable_NormalPriority,qt=r.unstable_LowPriority,Yn=r.unstable_IdlePriority,dn=r.log,Ta=r.unstable_setDisableYieldValue,ca=null,V=null;function ve(n){if(typeof dn=="function"&&Ta(n),V&&typeof V.setStrictMode=="function")try{V.setStrictMode(ca,n)}catch{}}var me=Math.clz32?Math.clz32:Ae,te=Math.log,_e=Math.LN2;function Ae(n){return n>>>=0,n===0?32:31-(te(n)/_e|0)|0}var Re=256,Pe=262144,Ue=4194304;function Le(n){var s=n&42;if(s!==0)return s;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Fe(n,s,c){var u=n.pendingLanes;if(u===0)return 0;var m=0,b=n.suspendedLanes,E=n.pingedLanes;n=n.warmLanes;var L=u&134217727;return L!==0?(u=L&~b,u!==0?m=Le(u):(E&=L,E!==0?m=Le(E):c||(c=L&~n,c!==0&&(m=Le(c))))):(L=u&~b,L!==0?m=Le(L):E!==0?m=Le(E):c||(c=u&~n,c!==0&&(m=Le(c)))),m===0?0:s!==0&&s!==m&&(s&b)===0&&(b=m&-m,c=s&-s,b>=c||b===32&&(c&4194048)!==0)?s:m}function We(n,s){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&s)===0}function Je(n,s){switch(n){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function st(){var n=Ue;return Ue<<=1,(Ue&62914560)===0&&(Ue=4194304),n}function Be(n){for(var s=[],c=0;31>c;c++)s.push(n);return s}function De(n,s){n.pendingLanes|=s,s!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function $e(n,s,c,u,m,b){var E=n.pendingLanes;n.pendingLanes=c,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=c,n.entangledLanes&=c,n.errorRecoveryDisabledLanes&=c,n.shellSuspendCounter=0;var L=n.entanglements,B=n.expirationTimes,Z=n.hiddenUpdates;for(c=E&~c;0<c;){var ce=31-me(c),xe=1<<ce;L[ce]=0,B[ce]=-1;var ee=Z[ce];if(ee!==null)for(Z[ce]=null,ce=0;ce<ee.length;ce++){var ie=ee[ce];ie!==null&&(ie.lane&=-536870913)}c&=~xe}u!==0&&mt(n,u,0),b!==0&&m===0&&n.tag!==0&&(n.suspendedLanes|=b&~(E&~s))}function mt(n,s,c){n.pendingLanes|=s,n.suspendedLanes&=~s;var u=31-me(s);n.entangledLanes|=s,n.entanglements[u]=n.entanglements[u]|1073741824|c&261930}function zt(n,s){var c=n.entangledLanes|=s;for(n=n.entanglements;c;){var u=31-me(c),m=1<<u;m&s|n[u]&s&&(n[u]|=s),c&=~m}}function tn(n,s){var c=s&-s;return c=(c&42)!==0?1:yn(c),(c&(n.suspendedLanes|s))!==0?0:c}function yn(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Jn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Xn(){var n=ge.p;return n!==0?n:(n=window.event,n===void 0?32:lw(n.type))}function Ga(n,s){var c=ge.p;try{return ge.p=n,s()}finally{ge.p=c}}var In=Math.random().toString(36).slice(2),un="__reactFiber$"+In,vn="__reactProps$"+In,zn="__reactContainer$"+In,Wo="__reactEvents$"+In,mh="__reactListeners$"+In,yh="__reactHandles$"+In,vi="__reactResources$"+In,ds="__reactMarker$"+In;function Yo(n){delete n[un],delete n[vn],delete n[Wo],delete n[mh],delete n[yh]}function Ps(n){var s=n[un];if(s)return s;for(var c=n.parentNode;c;){if(s=c[zn]||c[un]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(n=Vv(n);n!==null;){if(c=n[un])return c;n=Vv(n)}return s}n=c,c=n.parentNode}return null}function Bs(n){if(n=n[un]||n[zn]){var s=n.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return n}return null}function Ar(n){var s=n.tag;if(s===5||s===26||s===27||s===6)return n.stateNode;throw Error(a(33))}function Fa(n){var s=n[vi];return s||(s=n[vi]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function nn(n){n[ds]=!0}var fd=new Set,pd={};function us(n,s){Us(n,s),Us(n+"Capture",s)}function Us(n,s){for(pd[n]=s,n=0;n<s.length;n++)fd.add(s[n])}var Da=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\ Line truncated
`).replace(J_,"")}function $v(n,s){return s=Mv(s),Mv(n)===s}function Mt(n,s,c,u,m,b){switch(c){case"children":typeof u=="string"?s==="body"||s==="textarea"&&u===""||Gs(n,u):(typeof u=="number"||typeof u=="bigint")&&s!=="body"&&Gs(n,""+u);break;case"className":Si(n,"class",u);break;case"tabIndex":Si(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Si(n,c,u);break;case"style":Ka(n,u,b);break;case"data":if(s!=="object"){Si(n,"data",u);break}case"src":case"href":if(u===""&&(s!=="a"||c!=="href")){n.removeAttribute(c);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(c);break}u=ki(""+u),n.setAttribute(c,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(c==="formAction"?(s!=="input"&&Mt(n,s,"name",m.name,m,null),Mt(n,s,"formEncType",m.formEncType,m,null),Mt(n,s,"formMethod",m.formMethod,m,null),Mt(n,s,"formTarget",m.formTarget,m,null)):(Mt(n,s,"encType",m.encType,m,null),Mt(n,s,"method",m.method,m,null),Mt(n,s,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(c);break}u=ki(""+u),n.setAttribute(c,u);break;case"onClick":u!=null&&(n.onclick=da);break;case"onScroll":u!=null&&ct("scroll",n);break;case"onScrollEnd":u!=null&&ct("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(c=u.__html,c!=null){if(m.children!=null)throw Error(a(60));n.innerHTML=c}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}c=ki(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(c,""+u):n.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(c,""):n.removeAttribute(c);break;case"capture":case"download":u===!0?n.setAttribute(c,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(c,u):n.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(c,u):n.removeAttribute(c);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(c):n.setAttribute(c,u);break;case"popover":ct("beforetoggle",n),ct("toggle",n),wi(n,"popover",u);break;case"xlinkActuate":Ra(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ra(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ra(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ra(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ra(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ra(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ra(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ra(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ra(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":wi(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=vh.get(c)||c,wi(n,c,u))}}function up(n,s,c,u,m,b){switch(c){case"style":Ka(n,u,b);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(c=u.__html,c!=null){if(m.children!=null)throw Error(a(60));n.innerHTML=c}}break;case"children":typeof u=="string"?Gs(n,u):(typeof u=="number"||typeof u=="bigint")&&Gs(n,""+u);break;case"onScroll":u!=null&&ct("scroll",n);break;case"onScrollEnd":u!=null&&ct("scrollend",n);break;case"onClick":u!=null&&(n.onclick=da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne Line truncated
`).forEach(function(d){i=d.indexOf(":"),t=d.substring(0,i).trim().toLowerCase(),a=d.substring(i+1).trim(),!(!t||e[t]&&MS[t])&&(t==="set-cookie"?e[t]?e[t].push(a):e[t]=[a]:e[t]=e[t]?e[t]+", "+a:a)}),e},bm=Symbol("internals");function bo(r){return r&&String(r).trim().toLowerCase()}function dc(r){return r===!1||r==null?r:se.isArray(r)?r.map(dc):String(r)}function IS(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=t.exec(r);)e[a[1]]=a[2];return e}const zS=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function eg(r,e,t,a,i){if(se.isFunction(a))return a.call(this,e,t);if(i&&(e=t),!!se.isString(e)){if(se.isString(a))return e.indexOf(a)!==-1;if(se.isRegExp(a))return a.test(e)}}function HS(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,a)=>t.toUpperCase()+a)}function PS(r,e){const t=se.toCamelCase(" "+e);["get","set","has"].forEach(a=>{Object.defineProperty(r,a+t,{value:function(i,o,d){return this[a].call(this,e,i,o,d)},configurable:!0})})}let On=class{constructor(e){e&&this.set(e)}set(e,t,a){const i=this;function o(g,h,f){const p=bo(h);if(!p)throw new Error("header name must be a non-empty string");const y=se.findKey(i,p);(!y||i[y]===void 0||f===!0||f===void 0&&i[y]!==!1)&&(i[y||h]=dc(g))}const d=(g,h)=>se.forEach(g,(f,p)=>o(f,p,h));if(se.isPlainObject(e)||e instanceof this.constructor)d(e,t);else if(se.isString(e)&&(e=e.trim())&&!zS(e))d($S(e),t);else if(se.isObject(e)&&se.isIterable(e)){let g={},h,f;for(const p of e){if(!se.isArray(p))throw TypeError("Object iterator must return a key-value pair");g[f=p[0]]=(h=g[f])?se.isArray(h)?[...h,p[1]]:[h,p[1]]:p[1]}d(g,t)}else e!=null&&o(t,e,a);return this}get(e,t){if(e=bo(e),e){const a=se.findKey(this,e);if(a){const i=this[a];if(!t)return i;if(t===!0)return IS(i);if(se.isFunction(t))return t.call(this,i,a);if(se.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=bo(e),e){const a=se.findKey(this,e);return!!(a&&this[a]!==void 0&&(!t||eg(this,this[a],a,t)))}return!1}delete(e,t){const a=this;let i=!1;function o(d){if(d=bo(d),d){const g=se.findKey(a,d);g&&(!t||eg(a,a[g],g,t))&&(delete a[g],i=!0)}}return se.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let a=t.length,i=!1;for(;a--;){const o=t[a];(!e||eg(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const t=this,a={};return se.forEach(this,(i,o)=>{const d=se.findKey(a,o);if(d){t[d]=dc(i),delete t[o];return}const g=e?HS(o):String(o).trim();g!==o&&delete t[o],t[g]=dc(i),a[g]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return se.forEach(this,(a,i)=>{a!=null&&a!==!1&&(t[i]=e&&se.isArray(a)?a.join(", "):a)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const a=new this(e);return t.forEach(i=>a.set(i)),a}static accessor(e){const a=(this[bm]=this[bm]={accessors:{}}).accessors,i=this.prototype;function o(d){const g=bo(d);a[g]||(PS(i,d),a[g]=!0)}return se.isArray(e)?e.forEach(o):o(e),this}};On.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(On.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(a){this[t]=a}}}),se.freezeMethods(On);function tg(r,e){const t=this||xo,a=e||t,i=On.from(a.headers);let o=a.data;return se.forEach(r,function(g){o=g.call(t,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function vm(r){return!!(r&&r.__CANCEL__)}function ri(r,e,t){nt.call(this,r??"canceled",nt.ERR_CANCELED,e,t),this.name="CanceledError"}se.inherits(ri,nt,{__CANCEL__:!0});function wm(r,e,t){const a=t.config.validateStatus;!t.status||!a||a(t.status)?r(t):e(new nt("Request failed with status code "+t.status,[nt.ERR_BAD_REQUEST,nt.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function BS(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function US(r,e){r=r||10;const t=new Array(r),a=new Array(r);let i=0,o=0,d;return e=e!==void 0?e:1e3,function(h){const f=Date.now(),p=a[o];d||(d=f),t[i]=h,a[i]=f;let y=o,x=0;for(;y!==i;)x+=t[y++],y=y%r;if(i=(i+1)%r,i===o&&(o=(o+1)%r),f-d<e)return;const S=p&&f-p;return S?Math.round(x*1e3/S):void 0}}function qS(r,e){let t=0,a=1e3/e,i,o;const d=(f,p=Date.now())=>{t=p,i=null,o&&(clearTimeout(o),o=null),r(...f)};return[(...f)=>{const p=Date.now(),y=p-t;y>=a?d(f,p):(i=f,o||(o=setTimeout(()=>{o=null,d(i)},a-y)))},()=>i&&d(i)]}const uc=(r,e,t=3)=>{let a=0;const i=US(50,250);return qS(o=>{const d=o.loaded,g=o.lengthComputable?o.total:void 0,h=d-a,f=i(h),p=d<=g;a=d;const y={loaded:d,total:g,progress:g?d/g:void 0,bytes:h,rate:f||void 0,estimated:f&&g&&p?(g-d)/f:void 0,event:o,lengthComputable:g!=null,[e?"download":"upload"]:!0};r(y)},t)},Sm=(r,e)=>{const t=r!=null;return[a=>e[0]({lengthComputable:t,total:r,loaded:a}),e[1]]},Cm=r=>(...e)=>se.asap(()=>r(...e)),GS=Nn.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,Nn.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(Nn.origin),Nn.navigator&&/(msie|trident)/i.test(Nn.navigator.userAgent)):()=>!0,FS=Nn.hasStandardBrowserEnv?{write(r,e,t,a,i,o){const d=[r+"="+encodeURIComponent(e)];se.isNumber(t)&&d.push("expires="+new Date(t).toGMTString()),se.isString(a)&&d.push("path="+a),se.isString(i)&&d.push("domain="+i),o===!0&&d.push("secure"),document.cookie=d.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function VS(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function KS(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function jm(r,e,t){let a=!VS(e);return r&&(a||t==!1)?KS(r,e):e}const km=r=>r instanceof On?{...r}:r;function vr(r,e){e=e||{};const t={};function a(f,p,y,x){return se.isPlainObject(f)&&se.isPlainObject(p)?se.merge.call({caseless:x},f,p):se.isPlainObject(p)?se.merge({},p):se.isArray(p)?p.slice():p}function i(f,p,y,x){if(se.isUndefined(p)){if(!se.isUndefined(f))return a(void 0,f,y,x)}else return a(f,p,y,x)}function o(f,p){if(!se.isUndefined(p))return a(void 0,p)}function d(f,p){if(se.isUndefined(p)){if(!se.isUndefined(f))return a(void 0,f)}else return a(void 0,p)}function g(f,p,y){if(y in e)return a(f,p);if(y in r)return a(void 0,f)}const h={url:o,method:o,data:o,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:g,headers:(f,p,y)=>i(km(f),km(p),y,!0)};return se.forEach(Object.keys({...r,...e}),function(p){const y=h[p]||i,x=y(r[p],e[p],p);se.isUndefined(x)&&y!==g||(t[p]=x)}),t}const Nm=r=>{const e=vr({},r);let{data:t,withXSRFToken:a,xsrfHeaderName:i,xsrfCookieName:o,headers:d,auth:g}=e;if(e.headers=d=On.from(d),e.url=pm(jm(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),g&&d.set("Authorization","Basic "+btoa((g.username||"")+":"+(g.password?unescape(encodeURIComponent(g.password)):""))),se.isFormData(t)){if(Nn.hasStandardBrowserEnv||Nn.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(se.isFunction(t.getHeaders)){const h=t.getHeaders(),f=["content-type","content-length"];Object.entries(h).forEach(([p,y])=>{f.includes(p.toLowerCase())&&d.set(p,y)})}}if(Nn.hasStandardBrowserEnv&&(a&&se.isFunction(a)&&(a=a(e Line truncated
`+d.map(Om).join(`
`):" "+Om(d[0]):"as no adapter specified";throw new et("There is no suitable adapter to dispatch the request "+g,"ERR_NOT_SUPPORT")}return i},adapters:ng};function ag(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new si(null,r)}function Mm(r){return ag(r),r.headers=Ln.from(r.headers),r.data=tg.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Lm.getAdapter(r.adapter||yo.adapter,r)(r).then(function(a){return ag(r),a.data=tg.call(r,r.transformResponse,a),a.headers=Ln.from(a.headers),a},function(a){return vm(a)||(ag(r),a&&a.response&&(a.response.data=tg.call(r,r.transformResponse,a.response),a.response.headers=Ln.from(a.response.headers))),Promise.reject(a)})}const $m="1.12.2",hc={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{hc[r]=function(a){return typeof a===r||"a"+(e<1?"n ":" ")+r}});const Im={};hc.transitional=function(e,n,a){function i(o,d){return"[Axios v"+$m+"] Transitional option '"+o+"'"+d+(a?". "+a:"")}return(o,d,g)=>{if(e===!1)throw new et(i(d," has been removed"+(n?" in "+n:"")),et.ERR_DEPRECATED);return n&&!Im[d]&&(Im[d]=!0,console.warn(i(d," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,d,g):!0}},hc.spelling=function(e){return(n,a)=>(console.warn(`${a} is likely a misspelling of ${e}`),!0)};function t7(r,e,n){if(typeof r!="object")throw new et("options must be an object",et.ERR_BAD_OPTION_VALUE);const a=Object.keys(r);let i=a.length;for(;i-- >0;){const o=a[i],d=e[o];if(d){const g=r[o],h=g===void 0||d(g,o,r);if(h!==!0)throw new et("option "+o+" must be "+h,et.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new et("Unknown option "+o,et.ERR_BAD_OPTION)}}const fc={assertOptions:t7,validators:hc},Ha=fc.validators;let vr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new mm,response:new mm}}async request(e,n){try{return await this._request(e,n)}catch(a){if(a instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{a.stack?o&&!String(a.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(a.stack+=`
`+o):a.stack=o}catch{}}throw a}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=br(this.defaults,n);const{transitional:a,paramsSerializer:i,headers:o}=n;a!==void 0&&fc.assertOptions(a,{silentJSONParsing:Ha.transitional(Ha.boolean),forcedJSONParsing:Ha.transitional(Ha.boolean),clarifyTimeoutError:Ha.transitional(Ha.boolean)},!1),i!=null&&(re.isFunction(i)?n.paramsSerializer={serialize:i}:fc.assertOptions(i,{encode:Ha.function,serialize:Ha.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),fc.assertOptions(n,{baseUrl:Ha.spelling("baseURL"),withXsrfToken:Ha.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let d=o&&re.merge(o.common,o[n.method]);o&&re.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),n.headers=Ln.concat(d,o);const g=[];let h=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(h=h&&C.synchronous,g.unshift(C.fulfilled,C.rejected))});const f=[];this.interceptors.response.forEach(function(C){f.push(C.fulfilled,C.rejected)});let p,x=0,y;if(!h){const v=[Mm.bind(this),void 0];for(v.unshift(...g),v.push(...f),y=v.length,p=Promise.resolve(n);x<y;)p=p.then(v[x++],v[x++]);return p}y=g.length;let w=n;for(;x<y;){const v=g[x++],C=g[x++];try{w=v(w)}catch(k){C.call(this,k);break}}try{p=Mm.call(this,w)}catch(v){return Promise.reject(v)}for(x=0,y=f.length;x<y;)p=p.then(f[x++],f[x++]);return p}getUri(e){e=br(this.defaults,e);const n=jm(e.baseURL,e.url,e.allowAbsoluteUrls);return pm(n,e.params,e.paramsSerializer)}};re.forEach(["delete","get","head","options"],function(e){vr.prototype[e]=function(n,a){return this.request(br(a||{},{method:e,url:n,data:(a||{}).data}))}}),re.forEach(["post","put","patch"],function(e){function n(a){return function(o,d,g){return this.request(br(g||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:d}))}}vr.prototype[e]=n(),vr.prototype[e+"Form"]=n(!0)});let n7=class hS{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const a=this;this.promise.then(i=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](i);a._listeners=null}),this.promise.then=i=>{let o;const d=new Promise(g=>{a.subscribe(g),o=g}).then(i);return d.cancel=function(){a.unsubscribe(o)},d},e(function(o,d,g){a.reason||(a.reason=new si(o,d,g),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=a=>{e.abort(a)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new hS(function(i){e=i}),cancel:e}}};function a7(r){return function(n){return r.apply(null,n)}}function s7(r){return re.isObject(r)&&r.isAxiosError===!0}const sg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sg).forEach(([r,e])=>{sg[e]=r});function zm(r){const e=new vr(r),n=em(vr.prototype.request,e);return re.extend(n,vr.prototype,e,{allOwnKeys:!0}),re.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return zm(br(r,i))},n}const Xt=zm(yo);Xt.Axios=vr,Xt.CanceledError=si,Xt.CancelToken=n7,Xt.isCancel=vm,Xt.VERSION=$m,Xt.toFormData=cc,Xt.AxiosError=et,Xt.Cancel=Xt.CanceledError,Xt.all=function(e){return Promise.all(e)},Xt.spread=a7,Xt.isAxiosError=s7,Xt.mergeConfig=br,Xt.AxiosHeaders=Ln,Xt.formToJSON=r=>xm(re.isHTMLForm(r)?new FormData(r):r),Xt.getAdapter=Lm.getAdapter,Xt.HttpStatusCode=sg,Xt.default=Xt Line truncated
`):" "+Om(d[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+g,"ERR_NOT_SUPPORT")}return i},adapters:ng};function ag(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ri(null,r)}function Mm(r){return ag(r),r.headers=On.from(r.headers),r.data=tg.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Lm.getAdapter(r.adapter||xo.adapter,r)(r).then(function(a){return ag(r),a.data=tg.call(r,r.transformResponse,a),a.headers=On.from(a.headers),a},function(a){return vm(a)||(ag(r),a&&a.response&&(a.response.data=tg.call(r,r.transformResponse,a.response),a.response.headers=On.from(a.response.headers))),Promise.reject(a)})}const $m="1.12.2",hc={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{hc[r]=function(a){return typeof a===r||"a"+(e<1?"n ":" ")+r}});const Im={};hc.transitional=function(e,t,a){function i(o,d){return"[Axios v"+$m+"] Transitional option '"+o+"'"+d+(a?". "+a:"")}return(o,d,g)=>{if(e===!1)throw new nt(i(d," has been removed"+(t?" in "+t:"")),nt.ERR_DEPRECATED);return t&&!Im[d]&&(Im[d]=!0,console.warn(i(d," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(o,d,g):!0}},hc.spelling=function(e){return(t,a)=>(console.warn(`${a} is likely a misspelling of ${e}`),!0)};function a7(r,e,t){if(typeof r!="object")throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const a=Object.keys(r);let i=a.length;for(;i-- >0;){const o=a[i],d=e[o];if(d){const g=r[o],h=g===void 0||d(g,o,r);if(h!==!0)throw new nt("option "+o+" must be "+h,nt.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new nt("Unknown option "+o,nt.ERR_BAD_OPTION)}}const fc={assertOptions:a7,validators:hc},Ha=fc.validators;let wr=class{constructor(e){this.defaults=e||{},this.interceptors={request:new mm,response:new mm}}async request(e,t){try{return await this._request(e,t)}catch(a){if(a instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{a.stack?o&&!String(a.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(a.stack+=`
`+o):a.stack=o}catch{}}throw a}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=vr(this.defaults,t);const{transitional:a,paramsSerializer:i,headers:o}=t;a!==void 0&&fc.assertOptions(a,{silentJSONParsing:Ha.transitional(Ha.boolean),forcedJSONParsing:Ha.transitional(Ha.boolean),clarifyTimeoutError:Ha.transitional(Ha.boolean)},!1),i!=null&&(se.isFunction(i)?t.paramsSerializer={serialize:i}:fc.assertOptions(i,{encode:Ha.function,serialize:Ha.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),fc.assertOptions(t,{baseUrl:Ha.spelling("baseURL"),withXsrfToken:Ha.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let d=o&&se.merge(o.common,o[t.method]);o&&se.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),t.headers=On.concat(d,o);const g=[];let h=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(t)===!1||(h=h&&w.synchronous,g.unshift(w.fulfilled,w.rejected))});const f=[];this.interceptors.response.forEach(function(w){f.push(w.fulfilled,w.rejected)});let p,y=0,x;if(!h){const v=[Mm.bind(this),void 0];for(v.unshift(...g),v.push(...f),x=v.length,p=Promise.resolve(t);y<x;)p=p.then(v[y++],v[y++]);return p}x=g.length;let S=t;for(;y<x;){const v=g[y++],w=g[y++];try{S=v(S)}catch(k){w.call(this,k);break}}try{p=Mm.call(this,S)}catch(v){return Promise.reject(v)}for(y=0,x=f.length;y<x;)p=p.then(f[y++],f[y++]);return p}getUri(e){e=vr(this.defaults,e);const t=jm(e.baseURL,e.url,e.allowAbsoluteUrls);return pm(t,e.params,e.paramsSerializer)}};se.forEach(["delete","get","head","options"],function(e){wr.prototype[e]=function(t,a){return this.request(vr(a||{},{method:e,url:t,data:(a||{}).data}))}}),se.forEach(["post","put","patch"],function(e){function t(a){return function(o,d,g){return this.request(vr(g||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:o,data:d}))}}wr.prototype[e]=t(),wr.prototype[e+"Form"]=t(!0)});let s7=class pw{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(o){t=o});const a=this;this.promise.then(i=>{if(!a._listeners)return;let o=a._listeners.length;for(;o-- >0;)a._listeners[o](i);a._listeners=null}),this.promise.then=i=>{let o;const d=new Promise(g=>{a.subscribe(g),o=g}).then(i);return d.cancel=function(){a.unsubscribe(o)},d},e(function(o,d,g){a.reason||(a.reason=new ri(o,d,g),t(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=a=>{e.abort(a)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new pw(function(i){e=i}),cancel:e}}};function r7(r){return function(t){return r.apply(null,t)}}function i7(r){return se.isObject(r)&&r.isAxiosError===!0}const sg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(sg).forEach(([r,e])=>{sg[e]=r});function zm(r){const e=new wr(r),t=em(wr.prototype.request,e);return se.extend(t,wr.prototype,e,{allOwnKeys:!0}),se.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return zm(vr(r,i))},t}const Jt=zm(xo);Jt.Axios=wr,Jt.CanceledError=ri,Jt.CancelToken=s7,Jt.isCancel=vm,Jt.VERSION=$m,Jt.toFormData=cc,Jt.AxiosError=nt,Jt.Cancel=Jt.CanceledError,Jt.all=function(e){return Promise.all(e)},Jt.spread=r7,Jt.isAxiosError=i7,Jt.mergeConfig=vr,Jt.AxiosHeaders=On,Jt.formToJSON=r=>xm(se.isHTMLForm(r)?new FormData(r):r),Jt.getAdapter=Lm.getAdapter,Jt.HttpStatusCode=sg,Jt.default=Jt Line truncated
* @license React
* react-jsx-runtime.production.js
*
@@ -51,7 +51,7 @@ Error generating stack: `+u.message+`
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Pm;function o7(){if(Pm)return vo;Pm=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(a,i,o){var d=null;if(o!==void 0&&(d=""+o),i.key!==void 0&&(d=""+i.key),"key"in i){o={};for(var g in i)g!=="key"&&(o[g]=i[g])}else o=i;return i=o.ref,{$$typeof:r,type:a,key:d,ref:i!==void 0?i:null,props:o}}return vo.Fragment=e,vo.jsx=n,vo.jsxs=n,vo}var Um;function l7(){return Um||(Um=1,lg.exports=o7()),lg.exports}var l=l7();const c7=Za({__proto__:null,default:es(l)},[l]),cg=at("ParentContextProvider"),Bm=j.createContext(null);let mc=null;function dg(){mc?(cg.log("[triggerModalParentUpdate] 모달 부모 컨텍스트 업데이트 트리거"),mc()):cg.warn("[triggerModalParentUpdate] Provider가 아직 마운트되지 않음")}const qm=({children:r})=>{const[e,n]=j.useState(0),a=j.useRef(!0),i=j.useCallback(()=>{const d=window.__g7LayoutContextStack||[];return d[d.length-1]?.dataContext},[]);j.useEffect(()=>(a.current=!0,mc=()=>{a.current&&(n(d=>d+1),cg.log("[ParentContextProvider] 버전 업데이트됨"))},()=>{a.current=!1,mc=null}),[]);const o={version:e,getParentDataContext:i};return l.jsx(Bm.Provider,{value:o,children:r})};function d7(){return j.useContext(Bm)}const G=at("ActionDispatcher"),Gm=new Set(["navigate","navigateBack","navigateForward","replaceUrl","refresh","logout"]),u7=new Set(["redirect"]);function Vn(){try{return window.G7Core?.devTools}catch{return}}class Gt extends Error{constructor(e,n,a){super(e),this.action=n,this.originalError=a,this.name="ActionError"}}const xi=class xi{constructor(e={},n,a){H(this,"bindingEngine");H(this,"translationEngine");H(this,"translationContext");H(this,"customHandlers",new Map);H(this,"defaultContext");H(this,"globalStateUpdater");H(this,"errorHandlingSetup",!1);H(this,"debounceTimers",new Map);H(this,"pendingDebounceFlushers",new Map);H(this,"debounceAccumulatedValues",new Map);H(this,"globalHeaders",[]);H(this,"namedActions",{});H(this,"previewMode",!1);this.bindingEngine=new _n,this.translationEngine=n,this.translationContext=a,this.defaultContext=e,this.registerDefaultHandlers(),this.setupErrorHandling()}setGlobalHeaders(e){this.globalHeaders=e||[]}setNamedActions(e){this.namedActions=e||{};const n=Vn();n?.isEnabled?.()&&n.setNamedActionDefinitions?.(this.namedActions),G.log("[setNamedActions] registered:",Object.keys(this.namedActions))}getNamedActions(){return this.namedActions}setPreviewMode(e){this.previewMode=e,G.log("Preview mode:",e?"enabled":"disabled")}isPreviewMode(){return this.previewMode}static getPreviewSuppressedHandlers(){return Gm}static getPreviewSuppressedLayoutFeatures(){return u7}resolveActionRef(e){if(!e.actionRef)return e;const n=this.namedActions[e.actionRef];if(!n)return G.warn(`[resolveActionRef] named action not found: "${e.actionRef}"`),e;const a=Vn();a?.isEnabled?.()&&a.trackNamedActionRef?.({actionRefName:e.actionRef,resolvedHandler:n.handler,timestamp:Date.now()});const{actionRef:i,type:o,key:d,event:g,...h}=e,f={...n,...Object.fromEntries(Object.entries(h).filter(([,p])=>p!==void 0)),type:o??n.type};return d!==void 0&&(f.key=d),g!==void 0&&(f.event=g),f}matchesPattern(e,n){if(n==="*")return!0;const a=n.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${a}$`).test(e)}getMatchingGlobalHeaders(e,n){const a={};for(const i of this.globalHeaders)this.matchesPattern(e,i.pattern)&&Object.entries(i.headers).forEach(([o,d])=>{const g=sc(d,n,{skipCache:!0});g!=null&&g!==""&&(a[o]=String(g))});return a}setupErrorHandling(){if(this.errorHandlingSetup)return;va().setActionExecutor(async(n,a)=>{const i={type:"click",handler:n.handler,target:n.target,params:n.params,actions:n.actions},o={data:{...this.defaultContext.data,error:a.error}};return await this.dispatchAction(i,o)}),this.errorHandlingSetup=!0}registerDefaultHandlers(){this.registerHandler("refetchDataSource",async(n,a)=>{const i=n.params?.dataSourceId,o=n.params?.sync;if(!i){G.warn("refetchDataSource: dataSourceId is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.refetch){const d=window.G7Core?.state?.get?.()||{},g={...a.state?._global,...d},h=window.G7Core?.state?.getLocal?.()||{},f=a.data?._local||a.state||{},p={...h,...f},x=a.isolatedContext?.state;G.log("[refetchDataSource] localStateOverride:",p),await window.G7Core.dataSource.refetch(i,{...o?{sync:!0}:{},...g?{globalStateOverride:g}:{},...p?{localStateOverride:p}:{},...x?{isolatedStateOverride:x}:{}})}else G.warn("refetchDataSource: G7Core.dataSource.refetch is not available")}),this.registerHandler("appendDataSource",async(n,a)=>{const{dataSourceId:i,dataPath:o,newData:d}=n.params||{};if(!i){G.warn("appendDataSource: dataSourceId is required");return}if(d===void 0){G.warn("appendDataSource: newData is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.updateData){if(!Array.isArray(d)){G.warn("appendDataSource: newData must be an array, got:",typeof d,d);return}await window.G7Core.dataSource.updateData(i,o||null,d,"append")}elLine truncated
*/var Pm;function c7(){if(Pm)return wo;Pm=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(a,i,o){var d=null;if(o!==void 0&&(d=""+o),i.key!==void 0&&(d=""+i.key),"key"in i){o={};for(var g in i)g!=="key"&&(o[g]=i[g])}else o=i;return i=o.ref,{$$typeof:r,type:a,key:d,ref:i!==void 0?i:null,props:o}}return wo.Fragment=e,wo.jsx=t,wo.jsxs=t,wo}var Bm;function d7(){return Bm||(Bm=1,lg.exports=c7()),lg.exports}var l=d7();const u7=Za({__proto__:null,default:es(l)},[l]),cg=it("ParentContextProvider"),Um=j.createContext(null);let mc=null;function dg(){mc?(cg.log("[triggerModalParentUpdate] 모달 부모 컨텍스트 업데이트 트리거"),mc()):cg.warn("[triggerModalParentUpdate] Provider가 아직 마운트되지 않음")}const qm=({children:r})=>{const[e,t]=j.useState(0),a=j.useRef(!0),i=j.useCallback(()=>{const d=window.__g7LayoutContextStack||[];return d[d.length-1]?.dataContext},[]);j.useEffect(()=>(a.current=!0,mc=()=>{a.current&&(t(d=>d+1),cg.log("[ParentContextProvider] 버전 업데이트됨"))},()=>{a.current=!1,mc=null}),[]);const o={version:e,getParentDataContext:i};return l.jsx(Um.Provider,{value:o,children:r})};function g7(){return j.useContext(Um)}const q=it("ActionDispatcher"),Gm=new Set(["navigate","navigateBack","navigateForward","replaceUrl","refresh","logout"]),h7=new Set(["redirect"]);function Vn(){try{return window.G7Core?.devTools}catch{return}}class Gt extends Error{constructor(e,t,a){super(e),this.action=t,this.originalError=a,this.name="ActionError"}}const bi=class bi{constructor(e={},t,a){H(this,"bindingEngine");H(this,"translationEngine");H(this,"translationContext");H(this,"customHandlers",new Map);H(this,"defaultContext");H(this,"globalStateUpdater");H(this,"errorHandlingSetup",!1);H(this,"debounceTimers",new Map);H(this,"pendingDebounceFlushers",new Map);H(this,"debounceAccumulatedValues",new Map);H(this,"globalHeaders",[]);H(this,"namedActions",{});H(this,"previewMode",!1);this.bindingEngine=new _n,this.translationEngine=t,this.translationContext=a,this.defaultContext=e,this.registerDefaultHandlers(),this.setupErrorHandling()}setGlobalHeaders(e){this.globalHeaders=e||[]}setNamedActions(e){this.namedActions=e||{};const t=Vn();t?.isEnabled?.()&&t.setNamedActionDefinitions?.(this.namedActions),q.log("[setNamedActions] registered:",Object.keys(this.namedActions))}getNamedActions(){return this.namedActions}setPreviewMode(e){this.previewMode=e,q.log("Preview mode:",e?"enabled":"disabled")}isPreviewMode(){return this.previewMode}static getPreviewSuppressedHandlers(){return Gm}static getPreviewSuppressedLayoutFeatures(){return h7}resolveActionRef(e){if(!e.actionRef)return e;const t=this.namedActions[e.actionRef];if(!t)return q.warn(`[resolveActionRef] named action not found: "${e.actionRef}"`),e;const a=Vn();a?.isEnabled?.()&&a.trackNamedActionRef?.({actionRefName:e.actionRef,resolvedHandler:t.handler,timestamp:Date.now()});const{actionRef:i,type:o,key:d,event:g,...h}=e,f={...t,...Object.fromEntries(Object.entries(h).filter(([,p])=>p!==void 0)),type:o??t.type};return d!==void 0&&(f.key=d),g!==void 0&&(f.event=g),f}matchesPattern(e,t){if(t==="*")return!0;const a=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${a}$`).test(e)}getMatchingGlobalHeaders(e,t){const a={};for(const i of this.globalHeaders)this.matchesPattern(e,i.pattern)&&Object.entries(i.headers).forEach(([o,d])=>{const g=ni(d,t,{skipCache:!0});g!=null&&g!==""&&(a[o]=String(g))});return a}setupErrorHandling(){if(this.errorHandlingSetup)return;Sa().setActionExecutor(async(t,a)=>{const i={type:"click",handler:t.handler,target:t.target,params:t.params,actions:t.actions},o={data:{...this.defaultContext.data,error:a.error}};return await this.dispatchAction(i,o)}),this.errorHandlingSetup=!0}registerDefaultHandlers(){this.registerHandler("refetchDataSource",async(t,a)=>{const i=t.params?.dataSourceId,o=t.params?.sync;if(!i){q.warn("refetchDataSource: dataSourceId is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.refetch){const d=window.G7Core?.state?.get?.()||{},g={...a.state?._global,...d},h=window.G7Core?.state?.getLocal?.()||{},f=a.data?._local||a.state||{},p={...h,...f},y=a.isolatedContext?.state;q.log("[refetchDataSource] localStateOverride:",p),await window.G7Core.dataSource.refetch(i,{...o?{sync:!0}:{},...g?{globalStateOverride:g}:{},...p?{localStateOverride:p}:{},...y?{isolatedStateOverride:y}:{}})}else q.warn("refetchDataSource: G7Core.dataSource.refetch is not available")}),this.registerHandler("appendDataSource",async(t,a)=>{const{dataSourceId:i,dataPath:o,newData:d}=t.params||{};if(!i){q.warn("appendDataSource: dataSourceId is required");return}if(d===void 0){q.warn("appendDataSource: newData is required");return}if(typeof window<"u"&&window.G7Core?.dataSource?.updateData){if(!Array.isArray(d)){q.warn("appendDataSource: newData must be an array, got:",typeof d,d);return}await window.G7Core.dataSource.updateData(i,o||null,d,"append")}elLine truncated
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.5);
@@ -84,20 +84,20 @@ Error generating stack: `+u.message+`
justify-content: center;
color: #666;
transition: background-color 0.2s;
`,i.onmouseenter=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.2)"},i.onmouseleave=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.1)"};const o=()=>{n.parentNode&&n.parentNode.removeChild(n)};i.onclick=o;const d=g=>{g.key==="Escape"&&(o(),document.removeEventListener("keydown",d))};return document.addEventListener("keydown",d),n.onclick=g=>{g.target===n&&o()},a.appendChild(i),n.appendChild(a),document.body.appendChild(n),{overlay:n,layer:a,closeLayer:o}}getNestedProperty(e,n){return n.split(".").reduce((a,i)=>a&&a[i]!==void 0?a[i]:void 0,e)}async handleSaveToLocalStorage(e,n){const{key:a,value:i}=e;if(!a)return G.error("saveToLocalStorage: key parameter is required"),!1;try{const o=typeof i=="string"?i:JSON.stringify(i);return localStorage.setItem(a,o),G.log(`saveToLocalStorage: saved ${a}`,i),!0}catch(o){return G.error("saveToLocalStorage: failed to save",{key:a,error:o}),!1}}async handleLoadFromLocalStorage(e,n){const{key:a,target:i,stateKey:o,defaultValue:d}=e;if(!a)return G.error("loadFromLocalStorage: key parameter is required"),d;try{const g=localStorage.getItem(a);if(g===null)return G.log(`loadFromLocalStorage: no value found for ${a}, using default`),o&&n.setState&&n.setState({[o]:d}),d;let h;try{h=JSON.parse(g)}catch{h=g}return G.log(`loadFromLocalStorage: loaded ${a}`,h),o&&n.setState&&n.setState({[o]:h}),h}catch(g){return G.error("loadFromLocalStorage: failed to load",{key:a,error:g}),d}}async handleCustomAction(e,n){const a=this.customHandlers.get(e.handler);if(!a)throw new Gt(`Unknown action handler: ${e.handler}`,e);return await a(e,n)}resolveParams(e,n){if(!e)return{};const a={};for(const[i,o]of Object.entries(e))i.includes("{{")&&G.warn(`[resolveParams] setState params의 키에 표현식이 포함되어 있습니다: "${i}". 키는 해석되지 않습니다. 배열 항목 수정은 .map()/.filter() 패턴을 사용하세요.`),typeof o=="string"&&o.includes("{{")?a[i]=this.evaluateExpression(o,n):typeof o=="string"?a[i]=o:Array.isArray(o)?a[i]=o.map(d=>typeof d=="string"&&d.includes("{{")?this.evaluateExpression(d,n):d):typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null?a[i]=o:typeof o=="object"&&o!==null?a[i]=this.resolveParams(o,n):a[i]=o;return a}resolveValue(e,n){return n?this.bindingEngine.resolveBindings(e,n,{skipCache:!0}):e}evaluateExpressions(e,n){let a={};for(const[i,o]of Object.entries(e))if(i==="..."){let d=o;typeof o=="string"&&o.includes("{{")&&(d=this.evaluateExpression(o,n)),d&&typeof d=="object"&&!Array.isArray(d)&&(a={...a,...d})}else typeof o=="string"&&o.includes("{{")?a[i]=this.evaluateExpression(o,n):typeof o=="object"&&o!==null&&!Array.isArray(o)?a[i]=this.evaluateExpressions(o,n):a[i]=o;return a}evaluateExpressionsIfNeeded(e,n){const a={};for(const[i,o]of Object.entries(e))typeof o=="string"&&o.includes("{{")?a[i]=this.evaluateExpression(o,n):a[i]=o;return a}evaluateExpression(e,n){if(!n)return e;const a=e.match(/^\{\{(.+)\}\}$/);if(!(a&&!a[1].includes("}}")&&!a[1].includes("{{"))){let g=n;if(e.includes("_global")){const f=window.G7Core?.state?.get()?._global;f&&(g={...n,_global:f})}if(e.includes("_computed")||e.includes("$computed")){const f=window.__g7ActionContext?.computedRef?.current;f&&Object.keys(f).length>0&&(g={...g,_computed:f,$computed:f})}return this.bindingEngine.resolveBindings(e,g,{skipCache:!0})}let o=a[1].trim();o=o.replace(/\$args\.(\d+)/g,"$args[$1]");let d=n;if(o.includes("_global")){const h=window.G7Core?.state?.get()?._global;h&&(d={...n,_global:h})}if(o.includes("_computed")||o.includes("$computed")){const h=window.__g7ActionContext?.computedRef?.current;h&&Object.keys(h).length>0&&(d={...d,_computed:h,$computed:h})}o.includes("_global.modules")&&(G.log("[evaluateExpression] expression:",o),G.log("[evaluateExpression] dataContext._global:",d._global),G.log("[evaluateExpression] dataContext._global?.modules:",d._global?.modules));try{const g=this.bindingEngine.evaluateExpression(o,d);return o.includes("_global.modules")&&G.log("[evaluateExpression] result:",g),typeof g=="string"&&g.startsWith("$t:")&&this.translationEngine&&this.translationContext?this.translationEngine.resolveTranslations(g,this.translationContext,n):g}catch(g){return G.error("Expression evaluation failed:",e,g),e}}setDefaultContext(e){this.defaultContext={...this.defaultContext,...e}}setGlobalStateUpdater(e){this.globalStateUpdater=e}getGlobalStateUpdater(){return this.globalStateUpdater}async dispatchAction(e,n){const a={...this.defaultContext,...n,data:{...this.defaultContext.data,...n?.data}};if(e.confirm){let i=this.resolveValue(e.confirm,a.data);if(this.translationEngine&&this.translationContext&&i.startsWith("$t:")&&(i=this.translationEngine.resolveTranslations(i,this.translationContext,a.data)),!confirm(i))return{success:!1}}try{return await this.executeAction(e,a)}catch(i){if(G.error("dispatchAction failed:",i),e.onError){const o=i instanceof Gt&&i.originalError?{message:i.originalError.messa Line truncated
`,i.onmouseenter=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.2)"},i.onmouseleave=()=>{i.style.backgroundColor="rgba(0, 0, 0, 0.1)"};const o=()=>{t.parentNode&&t.parentNode.removeChild(t)};i.onclick=o;const d=g=>{g.key==="Escape"&&(o(),document.removeEventListener("keydown",d))};return document.addEventListener("keydown",d),t.onclick=g=>{g.target===t&&o()},a.appendChild(i),t.appendChild(a),document.body.appendChild(t),{overlay:t,layer:a,closeLayer:o}}getNestedProperty(e,t){return t.split(".").reduce((a,i)=>a&&a[i]!==void 0?a[i]:void 0,e)}async handleSaveToLocalStorage(e,t){const{key:a,value:i}=e;if(!a)return q.error("saveToLocalStorage: key parameter is required"),!1;try{const o=typeof i=="string"?i:JSON.stringify(i);return localStorage.setItem(a,o),q.log(`saveToLocalStorage: saved ${a}`,i),!0}catch(o){return q.error("saveToLocalStorage: failed to save",{key:a,error:o}),!1}}async handleLoadFromLocalStorage(e,t){const{key:a,target:i,stateKey:o,defaultValue:d}=e;if(!a)return q.error("loadFromLocalStorage: key parameter is required"),d;try{const g=localStorage.getItem(a);if(g===null)return q.log(`loadFromLocalStorage: no value found for ${a}, using default`),o&&t.setState&&t.setState({[o]:d}),d;let h;try{h=JSON.parse(g)}catch{h=g}return q.log(`loadFromLocalStorage: loaded ${a}`,h),o&&t.setState&&t.setState({[o]:h}),h}catch(g){return q.error("loadFromLocalStorage: failed to load",{key:a,error:g}),d}}async handleCustomAction(e,t){const a=this.customHandlers.get(e.handler);if(!a)throw new Gt(`Unknown action handler: ${e.handler}`,e);return await a(e,t)}resolveParams(e,t){if(!e)return{};const a={};for(const[i,o]of Object.entries(e))i.includes("{{")&&q.warn(`[resolveParams] setState params의 키에 표현식이 포함되어 있습니다: "${i}". 키는 해석되지 않습니다. 배열 항목 수정은 .map()/.filter() 패턴을 사용하세요.`),typeof o=="string"&&o.includes("{{")?a[i]=this.evaluateExpression(o,t):typeof o=="string"?a[i]=o:Array.isArray(o)?a[i]=o.map(d=>typeof d=="string"&&d.includes("{{")?this.evaluateExpression(d,t):d):typeof o=="object"&&o!==null&&!Array.isArray(o)&&Object.getPrototypeOf(o)!==Object.prototype&&Object.getPrototypeOf(o)!==null?a[i]=o:typeof o=="object"&&o!==null?a[i]=this.resolveParams(o,t):a[i]=o;return a}resolveValue(e,t){return t?this.bindingEngine.resolveBindings(e,t,{skipCache:!0}):e}evaluateExpressions(e,t){let a={};for(const[i,o]of Object.entries(e))if(i==="..."){let d=o;typeof o=="string"&&o.includes("{{")&&(d=this.evaluateExpression(o,t)),d&&typeof d=="object"&&!Array.isArray(d)&&(a={...a,...d})}else typeof o=="string"&&o.includes("{{")?a[i]=this.evaluateExpression(o,t):typeof o=="object"&&o!==null&&!Array.isArray(o)?a[i]=this.evaluateExpressions(o,t):a[i]=o;return a}evaluateExpressionsIfNeeded(e,t){const a={};for(const[i,o]of Object.entries(e))typeof o=="string"&&o.includes("{{")?a[i]=this.evaluateExpression(o,t):a[i]=o;return a}evaluateExpression(e,t){if(!t)return e;const a=e.match(/^\{\{(.+)\}\}$/);if(!(a&&!a[1].includes("}}")&&!a[1].includes("{{"))){let g=t;if(e.includes("_global")){const f=window.G7Core?.state?.get()?._global;f&&(g={...t,_global:f})}if(e.includes("_computed")||e.includes("$computed")){const f=window.__g7ActionContext?.computedRef?.current;f&&Object.keys(f).length>0&&(g={...g,_computed:f,$computed:f})}return this.bindingEngine.resolveBindings(e,g,{skipCache:!0})}let o=a[1].trim();o=o.replace(/\$args\.(\d+)/g,"$args[$1]");let d=t;if(o.includes("_global")){const h=window.G7Core?.state?.get()?._global;h&&(d={...t,_global:h})}if(o.includes("_computed")||o.includes("$computed")){const h=window.__g7ActionContext?.computedRef?.current;h&&Object.keys(h).length>0&&(d={...d,_computed:h,$computed:h})}o.includes("_global.modules")&&(q.log("[evaluateExpression] expression:",o),q.log("[evaluateExpression] dataContext._global:",d._global),q.log("[evaluateExpression] dataContext._global?.modules:",d._global?.modules));try{const g=this.bindingEngine.evaluateExpression(o,d);return o.includes("_global.modules")&&q.log("[evaluateExpression] result:",g),typeof g=="string"&&g.startsWith("$t:")&&this.translationEngine&&this.translationContext?this.translationEngine.resolveTranslations(g,this.translationContext,t):g}catch(g){return q.error("Expression evaluation failed:",e,g),e}}setDefaultContext(e){this.defaultContext={...this.defaultContext,...e}}setGlobalStateUpdater(e){this.globalStateUpdater=e}getGlobalStateUpdater(){return this.globalStateUpdater}async dispatchAction(e,t){const a={...this.defaultContext,...t,data:{...this.defaultContext.data,...t?.data}};if(e.confirm){let i=this.resolveValue(e.confirm,a.data);if(this.translationEngine&&this.translationContext&&i.startsWith("$t:")&&(i=this.translationEngine.resolveTranslations(i,this.translationContext,a.data)),!confirm(i))return{success:!1}}try{return await this.executeAction(e,a)}catch(i){if(q.error("dispatchAction failed:",i),e.onError){const o=i instanceof Gt&&i.originalError?{message:i.originalError.messa Line truncated
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},z7={onDragStart(r){let{active:e}=r;return"Picked up draggable item "+e.id+"."},onDragOver(r){let{active:e,over:n}=r;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(r){let{active:e,over:n}=r;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(r){let{active:e}=r;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function H7(r){let{announcements:e=z7,container:n,hiddenTextDescribedById:a,screenReaderInstructions:i=I7}=r;const{announce:o,announcement:d}=L7(),g=ko("DndLiveRegion"),[h,f]=j.useState(!1);if(j.useEffect(()=>{f(!0)},[]),M7(j.useMemo(()=>({onDragStart(x){let{active:y}=x;o(e.onDragStart({active:y}))},onDragMove(x){let{active:y,over:w}=x;e.onDragMove&&o(e.onDragMove({active:y,over:w}))},onDragOver(x){let{active:y,over:w}=x;o(e.onDragOver({active:y,over:w}))},onDragEnd(x){let{active:y,over:w}=x;o(e.onDragEnd({active:y,over:w}))},onDragCancel(x){let{active:y,over:w}=x;o(e.onDragCancel({active:y,over:w}))}}),[o,e])),!h)return null;const p=Fe.createElement(Fe.Fragment,null,Fe.createElement(R7,{id:a,value:i.draggable}),Fe.createElement(O7,{id:g,announcement:d}));return n?Os.createPortal(p,n):p}var un;(function(r){r.DragStart="dragStart",r.DragMove="dragMove",r.DragEnd="dragEnd",r.DragCancel="dragCancel",r.DragOver="dragOver",r.RegisterDroppable="registerDroppable",r.SetDroppableDisabled="setDroppableDisabled",r.UnregisterDroppable="unregisterDroppable"})(un||(un={}));function Sc(){}function ry(r,e){return j.useMemo(()=>({sensor:r,options:e??{}}),[r,e])}function P7(){for(var r=arguments.length,e=new Array(r),n=0;n<r;n++)e[n]=arguments[n];return j.useMemo(()=>[...e].filter(a=>a!=null),[...e])}const Sa=Object.freeze({x:0,y:0});function iy(r,e){return Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2))}function oy(r,e){let{data:{value:n}}=r,{data:{value:a}}=e;return n-a}function U7(r,e){let{data:{value:n}}=r,{data:{value:a}}=e;return a-n}function ly(r){let{left:e,top:n,height:a,width:i}=r;return[{x:e,y:n},{x:e+i,y:n},{x:e,y:n+a},{x:e+i,y:n+a}]}function cy(r,e){if(!r||r.length===0)return null;const[n]=r;return n[e]}function dy(r,e,n){return e===void 0&&(e=r.left),n===void 0&&(n=r.top),{x:e+r.width*.5,y:n+r.height*.5}}const B7=r=>{let{collisionRect:e,droppableRects:n,droppableContainers:a}=r;const i=dy(e,e.left,e.top),o=[];for(const d of a){const{id:g}=d,h=n.get(g);if(h){const f=iy(dy(h),i);o.push({id:g,data:{droppableContainer:d,value:f}})}}return o.sort(oy)},q7=r=>{let{collisionRect:e,droppableRects:n,droppableContainers:a}=r;const i=ly(e),o=[];for(const d of a){const{id:g}=d,h=n.get(g);if(h){const f=ly(h),p=i.reduce((y,w,v)=>y+iy(f[v],w),0),x=Number((p/4).toFixed(4));o.push({id:g,data:{droppableContainer:d,value:x}})}}return o.sort(oy)};function G7(r,e){const n=Math.max(e.top,r.top),a=Math.max(e.left,r.left),i=Math.min(e.left+e.width,r.left+r.width),o=Math.min(e.top+e.height,r.top+r.height),d=i-a,g=o-n;if(a<i&&n<o){const h=e.width*e.height,f=r.width*r.height,p=d*g,x=p/(h+f-p);return Number(x.toFixed(4))}return 0}const F7=r=>{let{collisionRect:e,droppableRects:n,droppableContainers:a}=r;const i=[];for(const o of a){const{id:d}=o,g=n.get(d);if(g){const h=G7(g,e);h>0&&i.push({id:d,data:{droppableContainer:o,value:h}})}}return i.sort(U7)};function V7(r,e,n){return{...r,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function uy(r,e){return r&&e?{x:r.left-e.left,y:r.top-e.top}:Sa}function K7(r){return function(n){for(var a=arguments.length,i=new Array(a>1?a-1:0),o=1;o<a;o++)i[o-1]=arguments[o];return i.reduce((d,g)=>({...d,top:d.top+r*g.y,bottom:d.bottom+r*g.y,left:d.left+r*g.x,right:d.right+r*g.x}),{...n})}}const W7=K7(1);function Y7(r){if(r.startsWith("matrix3d(")){const e=r.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(r.startsWith("matrix(")){const e=r.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function J7(r,e,n){const a=Y7(e);if(!a)return r;const{scaleX:i,scaleY:o,x:d,y:g}=a,h=r.left-d-(1-i)*parseFloat(n),f=r.top-g-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),p=i?r.width/i:r.width,x=o?r.height/o:r.height;return{width:p,height:x,top:f,right:h+p,bottom:f+x,left:h}}const X7={ignoreTransform:!1};function di(r,e){e===void 0&&(e=X7);let n=r.getBoundingClientRect();if(e.ignoreTransform){const{transform:f,transformOrigin:p}=Mn(r).getComputedStyle(r);f&&(n=J7(n,f,p))}const{top:a,left:i,width:o,height:d,bottom:g,right:h}=n;return{top:a,left:i,width:o,height:d,bottom:g,right:h}}function gy(r){return di(r,{ignoreTransform:!0})}function Q7(r){const e=r.innerWidth,n=r.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function Z7(r,e){return e===void 0&&(e=Mn(r).getComputedStyle(r)),e.position==="fixed"}function eC(r,e){e===void 0&&(e=Mn(r).getComputedStyle(r));const n=/(auto|scroll|overlay)/;return["overflow","overflowX Line truncated
`},U7={onDragStart(r){let{active:e}=r;return"Picked up draggable item "+e.id+"."},onDragOver(r){let{active:e,over:t}=r;return t?"Draggable item "+e.id+" was moved over droppable area "+t.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(r){let{active:e,over:t}=r;return t?"Draggable item "+e.id+" was dropped over droppable area "+t.id:"Draggable item "+e.id+" was dropped."},onDragCancel(r){let{active:e}=r;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function q7(r){let{announcements:e=U7,container:t,hiddenTextDescribedById:a,screenReaderInstructions:i=B7}=r;const{announce:o,announcement:d}=z7(),g=No("DndLiveRegion"),[h,f]=j.useState(!1);if(j.useEffect(()=>{f(!0)},[]),H7(j.useMemo(()=>({onDragStart(y){let{active:x}=y;o(e.onDragStart({active:x}))},onDragMove(y){let{active:x,over:S}=y;e.onDragMove&&o(e.onDragMove({active:x,over:S}))},onDragOver(y){let{active:x,over:S}=y;o(e.onDragOver({active:x,over:S}))},onDragEnd(y){let{active:x,over:S}=y;o(e.onDragEnd({active:x,over:S}))},onDragCancel(y){let{active:x,over:S}=y;o(e.onDragCancel({active:x,over:S}))}}),[o,e])),!h)return null;const p=Ke.createElement(Ke.Fragment,null,Ke.createElement($7,{id:a,value:i.draggable}),Ke.createElement(I7,{id:g,announcement:d}));return t?Os.createPortal(p,t):p}var cn;(function(r){r.DragStart="dragStart",r.DragMove="dragMove",r.DragEnd="dragEnd",r.DragCancel="dragCancel",r.DragOver="dragOver",r.RegisterDroppable="registerDroppable",r.SetDroppableDisabled="setDroppableDisabled",r.UnregisterDroppable="unregisterDroppable"})(cn||(cn={}));function wc(){}function iy(r,e){return j.useMemo(()=>({sensor:r,options:e??{}}),[r,e])}function G7(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return j.useMemo(()=>[...e].filter(a=>a!=null),[...e])}const Ca=Object.freeze({x:0,y:0});function oy(r,e){return Math.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2))}function ly(r,e){let{data:{value:t}}=r,{data:{value:a}}=e;return t-a}function F7(r,e){let{data:{value:t}}=r,{data:{value:a}}=e;return a-t}function cy(r){let{left:e,top:t,height:a,width:i}=r;return[{x:e,y:t},{x:e+i,y:t},{x:e,y:t+a},{x:e+i,y:t+a}]}function dy(r,e){if(!r||r.length===0)return null;const[t]=r;return t[e]}function uy(r,e,t){return e===void 0&&(e=r.left),t===void 0&&(t=r.top),{x:e+r.width*.5,y:t+r.height*.5}}const V7=r=>{let{collisionRect:e,droppableRects:t,droppableContainers:a}=r;const i=uy(e,e.left,e.top),o=[];for(const d of a){const{id:g}=d,h=t.get(g);if(h){const f=oy(uy(h),i);o.push({id:g,data:{droppableContainer:d,value:f}})}}return o.sort(ly)},K7=r=>{let{collisionRect:e,droppableRects:t,droppableContainers:a}=r;const i=cy(e),o=[];for(const d of a){const{id:g}=d,h=t.get(g);if(h){const f=cy(h),p=i.reduce((x,S,v)=>x+oy(f[v],S),0),y=Number((p/4).toFixed(4));o.push({id:g,data:{droppableContainer:d,value:y}})}}return o.sort(ly)};function W7(r,e){const t=Math.max(e.top,r.top),a=Math.max(e.left,r.left),i=Math.min(e.left+e.width,r.left+r.width),o=Math.min(e.top+e.height,r.top+r.height),d=i-a,g=o-t;if(a<i&&t<o){const h=e.width*e.height,f=r.width*r.height,p=d*g,y=p/(h+f-p);return Number(y.toFixed(4))}return 0}const Y7=r=>{let{collisionRect:e,droppableRects:t,droppableContainers:a}=r;const i=[];for(const o of a){const{id:d}=o,g=t.get(d);if(g){const h=W7(g,e);h>0&&i.push({id:d,data:{droppableContainer:o,value:h}})}}return i.sort(F7)};function J7(r,e,t){return{...r,scaleX:e&&t?e.width/t.width:1,scaleY:e&&t?e.height/t.height:1}}function gy(r,e){return r&&e?{x:r.left-e.left,y:r.top-e.top}:Ca}function X7(r){return function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),o=1;o<a;o++)i[o-1]=arguments[o];return i.reduce((d,g)=>({...d,top:d.top+r*g.y,bottom:d.bottom+r*g.y,left:d.left+r*g.x,right:d.right+r*g.x}),{...t})}}const Q7=X7(1);function Z7(r){if(r.startsWith("matrix3d(")){const e=r.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(r.startsWith("matrix(")){const e=r.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function eC(r,e,t){const a=Z7(e);if(!a)return r;const{scaleX:i,scaleY:o,x:d,y:g}=a,h=r.left-d-(1-i)*parseFloat(t),f=r.top-g-(1-o)*parseFloat(t.slice(t.indexOf(" ")+1)),p=i?r.width/i:r.width,y=o?r.height/o:r.height;return{width:p,height:y,top:f,right:h+p,bottom:f+y,left:h}}const tC={ignoreTransform:!1};function ui(r,e){e===void 0&&(e=tC);let t=r.getBoundingClientRect();if(e.ignoreTransform){const{transform:f,transformOrigin:p}=Ln(r).getComputedStyle(r);f&&(t=eC(t,f,p))}const{top:a,left:i,width:o,height:d,bottom:g,right:h}=t;return{top:a,left:i,width:o,height:d,bottom:g,right:h}}function hy(r){return ui(r,{ignoreTransform:!0})}function nC(r){const e=r.innerWidth,t=r.innerHeight;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}function aC(r,e){return e===void 0&&(e=Ln(r).getComputedStyle(r)),e.position==="fixed"}function sC(r,e){e===void 0&&(e=Ln(r).getComputedStyle(r));const t=/(auto|scroll|overlay)/;return["overflow","overflowX Line truncated
<div style="padding: 1rem; border: 2px dashed #ccc; background: #f9f9f9; text-align: center;">
<p style="margin: 0; color: #666;">Component not found: <strong>${e}</strong></p>
</div>
`,n}createErrorElement(e,n){const a=document.createElement("div");return a.className="component-error",a.setAttribute("data-component-type",e),a.innerHTML=`
`,t}createErrorElement(e,t){const a=document.createElement("div");return a.className="component-error",a.setAttribute("data-component-type",e),a.innerHTML=`
<div style="padding: 1rem; border: 2px solid #f44336; background: #ffebee; border-radius: 4px;">
<p style="margin: 0 0 0.5rem 0; color: #c62828; font-weight: bold;">Component Error: ${e}</p>
<p style="margin: 0; color: #666; font-size: 0.875rem;">${n?.message||"Unknown error"}</p>
<p style="margin: 0; color: #666; font-size: 0.875rem;">${t?.message||"Unknown error"}</p>
</div>
`,a}renderErrorState(e,n){const a=n instanceof Error?n.message:String(n),i=n instanceof Ms?n.code:"UNKNOWN_ERROR";e.innerHTML=`
`,a}renderErrorState(e,t){const a=t instanceof Error?t.message:String(t),i=t instanceof Ms?t.code:"UNKNOWN_ERROR";e.innerHTML=`
<div class="layout-error" data-error-code="${i}" style="
padding: 2rem;
text-align: center;
@@ -139,14 +139,14 @@ Error generating stack: `+u.message+`
"
>페이지 새로고침</button>
</div>
`,Kn.error("Error state rendered:",i,a)}getCurrentLayout(){return this.currentLayout}clear(){this.currentLayout=null,this.layoutCache.clear(),Kn.log("Layout data and cache cleared")}}const kj=at("TranslationContext"),Hy=j.createContext(null),Dc=({children:r,translationEngine:e,translationContext:n})=>{const a=j.useMemo(()=>(o,d)=>{if(d){const g="|"+Object.entries(d).map(([h,f])=>`${h}=${f}`).join("|");return e.translate(o,n,g)}return e.translate(o,n)},[e,n]),i=j.useMemo(()=>({translationEngine:e,translationContext:n,t:a}),[e,n,a]);return l.jsx(Hy.Provider,{value:i,children:r})},Nj=()=>{const r=j.useContext(Hy);return r||(kj.warn("TranslationProvider 외부에서 호출되었습니다. 키를 그대로 반환합니다."),{t:e=>e,translationEngine:null,translationContext:null})},$s=at("SlotContext"),Ej={registerToSlot:()=>{$s.warn("SlotContext not available: registerToSlot called outside SlotProvider")},unregisterFromSlot:()=>{$s.warn("SlotContext not available: unregisterFromSlot called outside SlotProvider")},getSlotComponents:()=>[],subscribeToSlot:()=>()=>{},clearAllSlots:()=>{},isEnabled:!1},_j=j.createContext(Ej),Og=({children:r})=>{const e=j.useRef(new Map),n=j.useRef(new Map),a=j.useCallback(p=>{const x=n.current.get(p);x&&x.forEach(y=>{try{y()}catch(w){$s.error(`Slot subscriber error (slotId: ${p}):`,w)}})},[]),i=j.useCallback((p,x,y)=>{if(!p||!x){$s.warn("registerToSlot: slotId and componentId are required");return}e.current.has(p)||e.current.set(p,new Map);const w=e.current.get(p),v=w.get(x);v&&v.registrationKey===y.registrationKey||(w.set(x,y),$s.log(`Component registered to slot: ${x} -> ${p} (order: ${y.order})`),a(p))},[a]),o=j.useCallback((p,x)=>{const y=e.current.get(p);y&&y.has(x)&&(y.delete(x),$s.log(`Component unregistered from slot: ${x} <- ${p}`),y.size===0&&e.current.delete(p),a(p))},[a]),d=j.useCallback(p=>{const x=e.current.get(p);return x?Array.from(x.values()).sort((y,w)=>y.order-w.order):[]},[]),g=j.useCallback((p,x)=>{n.current.has(p)||n.current.set(p,new Set);const y=n.current.get(p);return y.add(x),()=>{y.delete(x),y.size===0&&n.current.delete(p)}},[]),h=j.useCallback(()=>{e.current.forEach((p,x)=>{a(x)}),e.current.clear(),n.current.clear(),$s.log("All slots cleared")},[a]),f=j.useMemo(()=>({registerToSlot:i,unregisterFromSlot:o,getSlotComponents:d,subscribeToSlot:g,clearAllSlots:h,isEnabled:!0}),[i,o,d,g,h]);return j.useLayoutEffect(()=>{typeof window<"u"&&(window.__slotContextValue=f,$s.log("SlotContext exposed to window.__slotContextValue"))},[f]),l.jsx(_j.Provider,{value:f,children:r})};class Lg{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,n){return this.listen(".client-"+e,n)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,n){return this.stopListening(".client-"+e,n)}}class Py{constructor(e){this.namespace=e}format(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}setNamespace(e){this.namespace=e}}function Tj(r){try{new r}catch(e){if(e instanceof Error&&e.message.includes("is not a constructor"))return!1}return!0}class Mg extends Lg{constructor(e,n,a){super(),this.name=n,this.pusher=e,this.options=a,this.eventFormatter=new Py(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,n){return this.on(this.eventFormatter.format(e),n),this}listenToAll(e){return this.subscription.bind_global((n,a)=>{if(n.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),o=n.startsWith(i)?n.substring(i.length+1):"."+n;e(o,a)}),this}stopListening(e,n){return n?this.subscription.unbind(this.eventFormatter.format(e),n):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on("pusher:subscription_succeeded",()=>{e()}),this}error(e){return this.on("pusher:subscription_error",n=>{e(n)}),this}on(e,n){return this.subscription.bind(e,n),this}}class Uy extends Mg{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class Aj extends Mg{whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}}class Dj extends Uy{here(e){return this.on("pusher:subscription_succeeded",n=>{e(Object.keys(n.members).map(a=>n.members[a]))}),this}joining(e){return this.on("pusher:member_added",n=>{e(n.info)}),this}whisper(e,n){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,n),this}leaving(e){return this.on("pusher:member_removed",n=>{e(n.info)}),this}}class By extends Lg{constructor(e,n,a){super(),this.events={},this.listeners={},this.name=n,this.socket=e,this.opti Line truncated
`,Kn.error("Error state rendered:",i,a)}getCurrentLayout(){return this.currentLayout}clear(){this.currentLayout=null,this.layoutCache.clear(),Kn.log("Layout data and cache cleared")}}const Aj=it("TranslationContext"),Py=j.createContext(null),Dc=({children:r,translationEngine:e,translationContext:t})=>{const a=j.useMemo(()=>(o,d)=>{if(d){const g="|"+Object.entries(d).map(([h,f])=>`${h}=${f}`).join("|");return e.translate(o,t,g)}return e.translate(o,t)},[e,t]),i=j.useMemo(()=>({translationEngine:e,translationContext:t,t:a}),[e,t,a]);return l.jsx(Py.Provider,{value:i,children:r})},Tj=()=>{const r=j.useContext(Py);return r||(Aj.warn("TranslationProvider 외부에서 호출되었습니다. 키를 그대로 반환합니다."),{t:e=>e,translationEngine:null,translationContext:null})},$s=it("SlotContext"),Dj={registerToSlot:()=>{$s.warn("SlotContext not available: registerToSlot called outside SlotProvider")},unregisterFromSlot:()=>{$s.warn("SlotContext not available: unregisterFromSlot called outside SlotProvider")},getSlotComponents:()=>[],subscribeToSlot:()=>()=>{},clearAllSlots:()=>{},isEnabled:!1},Rj=j.createContext(Dj),Og=({children:r})=>{const e=j.useRef(new Map),t=j.useRef(new Map),a=j.useCallback(p=>{const y=t.current.get(p);y&&y.forEach(x=>{try{x()}catch(S){$s.error(`Slot subscriber error (slotId: ${p}):`,S)}})},[]),i=j.useCallback((p,y,x)=>{if(!p||!y){$s.warn("registerToSlot: slotId and componentId are required");return}e.current.has(p)||e.current.set(p,new Map);const S=e.current.get(p),v=S.get(y);v&&v.registrationKey===x.registrationKey||(S.set(y,x),$s.log(`Component registered to slot: ${y} -> ${p} (order: ${x.order})`),a(p))},[a]),o=j.useCallback((p,y)=>{const x=e.current.get(p);x&&x.has(y)&&(x.delete(y),$s.log(`Component unregistered from slot: ${y} <- ${p}`),x.size===0&&e.current.delete(p),a(p))},[a]),d=j.useCallback(p=>{const y=e.current.get(p);return y?Array.from(y.values()).sort((x,S)=>x.order-S.order):[]},[]),g=j.useCallback((p,y)=>{t.current.has(p)||t.current.set(p,new Set);const x=t.current.get(p);return x.add(y),()=>{x.delete(y),x.size===0&&t.current.delete(p)}},[]),h=j.useCallback(()=>{e.current.forEach((p,y)=>{a(y)}),e.current.clear(),t.current.clear(),$s.log("All slots cleared")},[a]),f=j.useMemo(()=>({registerToSlot:i,unregisterFromSlot:o,getSlotComponents:d,subscribeToSlot:g,clearAllSlots:h,isEnabled:!0}),[i,o,d,g,h]);return j.useLayoutEffect(()=>{typeof window<"u"&&(window.__slotContextValue=f,$s.log("SlotContext exposed to window.__slotContextValue"))},[f]),l.jsx(Rj.Provider,{value:f,children:r})};class Lg{constructor(){this.notificationCreatedEvent=".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated"}listenForWhisper(e,t){return this.listen(".client-"+e,t)}notification(e){return this.listen(this.notificationCreatedEvent,e)}stopListeningForNotification(e){return this.stopListening(this.notificationCreatedEvent,e)}stopListeningForWhisper(e,t){return this.stopListening(".client-"+e,t)}}class By{constructor(e){this.namespace=e}format(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}setNamespace(e){this.namespace=e}}function Oj(r){try{new r}catch(e){if(e instanceof Error&&e.message.includes("is not a constructor"))return!1}return!0}class Mg extends Lg{constructor(e,t,a){super(),this.name=t,this.pusher=e,this.options=a,this.eventFormatter=new By(this.options.namespace),this.subscribe()}subscribe(){this.subscription=this.pusher.subscribe(this.name)}unsubscribe(){this.pusher.unsubscribe(this.name)}listen(e,t){return this.on(this.eventFormatter.format(e),t),this}listenToAll(e){return this.subscription.bind_global((t,a)=>{if(t.startsWith("pusher:"))return;let i=String(this.options.namespace??"").replace(/\./g,"\\"),o=t.startsWith(i)?t.substring(i.length+1):"."+t;e(o,a)}),this}stopListening(e,t){return t?this.subscription.unbind(this.eventFormatter.format(e),t):this.subscription.unbind(this.eventFormatter.format(e)),this}stopListeningToAll(e){return e?this.subscription.unbind_global(e):this.subscription.unbind_global(),this}subscribed(e){return this.on("pusher:subscription_succeeded",()=>{e()}),this}error(e){return this.on("pusher:subscription_error",t=>{e(t)}),this}on(e,t){return this.subscription.bind(e,t),this}}class Uy extends Mg{whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}}class Lj extends Mg{whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}}class Mj extends Uy{here(e){return this.on("pusher:subscription_succeeded",t=>{e(Object.keys(t.members).map(a=>t.members[a]))}),this}joining(e){return this.on("pusher:member_added",t=>{e(t.info)}),this}whisper(e,t){return this.pusher.channels.channels[this.name].trigger(`client-${e}`,t),this}leaving(e){return this.on("pusher:member_removed",t=>{e(t.info)}),this}}class qy extends Lg{constructor(e,t,a){super(),this.events={},this.listeners={},this.name=t,this.socket=e,this.opti Line truncated
* Pusher JavaScript Library v8.4.0
* https://pusher.com/
*
* Copyright 2020, Pusher
* Released under the MIT licence.
*/var Ky;function Ij(){return Ky||(Ky=1,(function(r,e){(function(a,i){r.exports=i()})(window,function(){return(function(n){var a={};function i(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return n[o].call(d.exports,d,d.exports,i),d.l=!0,d.exports}return i.m=n,i.c=a,i.d=function(o,d,g){i.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:g})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,d){if(d&1&&(o=i(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var g=Object.create(null);if(i.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var h in o)i.d(g,h,function(f){return o[f]}.bind(null,h));return g},i.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(d,"a",d),d},i.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},i.p="",i(i.s=2)})([(function(n,a,i){var o=this&&this.__extends||(function(){var C=function(k,A){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,N){R.__proto__=N}||function(R,N){for(var D in N)N.hasOwnProperty(D)&&(R[D]=N[D])},C(k,A)};return function(k,A){C(k,A);function R(){this.constructor=k}k.prototype=A===null?Object.create(A):(R.prototype=A.prototype,new R)}})();Object.defineProperty(a,"__esModule",{value:!0});var d=256,g=(function(){function C(k){k===void 0&&(k="="),this._paddingCharacter=k}return C.prototype.encodedLength=function(k){return this._paddingCharacter?(k+2)/3*4|0:(k*8+5)/6|0},C.prototype.encode=function(k){for(var A="",R=0;R<k.length-2;R+=3){var N=k[R]<<16|k[R+1]<<8|k[R+2];A+=this._encodeByte(N>>>18&63),A+=this._encodeByte(N>>>12&63),A+=this._encodeByte(N>>>6&63),A+=this._encodeByte(N>>>0&63)}var D=k.length-R;if(D>0){var N=k[R]<<16|(D===2?k[R+1]<<8:0);A+=this._encodeByte(N>>>18&63),A+=this._encodeByte(N>>>12&63),D===2?A+=this._encodeByte(N>>>6&63):A+=this._paddingCharacter||"",A+=this._paddingCharacter||""}return A},C.prototype.maxDecodedLength=function(k){return this._paddingCharacter?k/4*3|0:(k*6+7)/8|0},C.prototype.decodedLength=function(k){return this.maxDecodedLength(k.length-this._getPaddingLength(k))},C.prototype.decode=function(k){if(k.length===0)return new Uint8Array(0);for(var A=this._getPaddingLength(k),R=k.length-A,N=new Uint8Array(this.maxDecodedLength(R)),D=0,M=0,L=0,z=0,Y=0,he=0,be=0;M<R-4;M+=4)z=this._decodeChar(k.charCodeAt(M+0)),Y=this._decodeChar(k.charCodeAt(M+1)),he=this._decodeChar(k.charCodeAt(M+2)),be=this._decodeChar(k.charCodeAt(M+3)),N[D++]=z<<2|Y>>>4,N[D++]=Y<<4|he>>>2,N[D++]=he<<6|be,L|=z&d,L|=Y&d,L|=he&d,L|=be&d;if(M<R-1&&(z=this._decodeChar(k.charCodeAt(M)),Y=this._decodeChar(k.charCodeAt(M+1)),N[D++]=z<<2|Y>>>4,L|=z&d,L|=Y&d),M<R-2&&(he=this._decodeChar(k.charCodeAt(M+2)),N[D++]=Y<<4|he>>>2,L|=he&d),M<R-3&&(be=this._decodeChar(k.charCodeAt(M+3)),N[D++]=he<<6|be,L|=be&d),L!==0)throw new Error("Base64Coder: incorrect characters for decoding");return N},C.prototype._encodeByte=function(k){var A=k;return A+=65,A+=25-k>>>8&6,A+=51-k>>>8&-75,A+=61-k>>>8&-15,A+=62-k>>>8&3,String.fromCharCode(A)},C.prototype._decodeChar=function(k){var A=d;return A+=(42-k&k-44)>>>8&-d+k-43+62,A+=(46-k&k-48)>>>8&-d+k-47+63,A+=(47-k&k-58)>>>8&-d+k-48+52,A+=(64-k&k-91)>>>8&-d+k-65+0,A+=(96-k&k-123)>>>8&-d+k-97+26,A},C.prototype._getPaddingLength=function(k){var A=0;if(this._paddingCharacter){for(var R=k.length-1;R>=0&&k[R]===this._paddingCharacter;R--)A++;if(k.length<4||A>2)throw new Error("Base64Coder: incorrect padding")}return A},C})();a.Coder=g;var h=new g;function f(C){return h.encode(C)}a.encode=f;function p(C){return h.decode(C)}a.decode=p;var x=(function(C){o(k,C);function k(){return C!==null&&C.apply(this,arguments)||this}return k.prototype._encodeByte=function(A){var R=A;return R+=65,R+=25-A>>>8&6,R+=51-A>>>8&-75,R+=61-A>>>8&-13,R+=62-A>>>8&49,String.fromCharCode(R)},k.prototype._decodeChar=function(A){var R=d;return R+=(44-A&A-46)>>>8&-d+A-45+62,R+=(94-A&A-96)>>>8&-d+A-95+63,R+=(47-A&A-58)>>>8&-d+A-48+52,R+=(64-A&A-91)>>>8&-d+A-65+0,R+=(96-A&A-123)>>>8&-d+A-97+26,R},k})(g);a.URLSafeCoder=x;var y=new x;function w(C){return y.encode(C)}a.encodeURLSafe=w;function v(C){return y.decode(C)}a.decodeURLSafe=v,a.encodedLength=function(C){return h.encodedLength(C)},a.maxDecodedLength=function(C){return h.maxDecodedLength(C)},a.decodedLength=function(C){return h.decodedLength(C)}}),(function(n,a,i){Object.defineProperty(a,"__esModule",{value:!0});var o="utf8: invalid string",d="utf8: invalid source encoding";function g(p){for(var x=new Uint8Array(h(p)),y=0,w=0;w<p.length;w++){var v=p.charCodeAt(w);v<128?x[y++]=v:v<2048?(x[y++]=192|v>>6,x[y++]=128|v&63):v<55296?(x[y++]=224|v>>12,x[y++]=128|v>>6&63,x[y++]=128|v&63):(w++,v=(v&1023)<<10,v|=p.charCodeAt(w)&1023,v+=65536,x[y++]=240|v>>18,x[y++]=128|v>>12&63,x[y++]=128|v>>6&63,x[y++]=128|v&63)}return x}a.encode=g;function h(p){for(var x=0,y=0Line truncated
`);return I!==-1?(this.position+=I+1,_.slice(0,I)):null}isBufferTooLong(S){return this.position===S.length&&S.length>qs}}var Ci;(function(T){T[T.CONNECTING=0]="CONNECTING",T[T.OPEN=1]="OPEN",T[T.CLOSED=3]="CLOSED"})(Ci||(Ci={}));var Ka=Ci,el=1;class vh{constructor(S,_){this.hooks=S,this.session=ki(1e3)+"/"+Gs(8),this.location=Sh(_),this.readyState=Ka.CONNECTING,this.openStream()}send(S){return this.sendRaw(JSON.stringify([S]))}ping(){this.hooks.sendHeartbeat(this)}close(S,_){this.onClose(S,_,!0)}sendRaw(S){if(this.readyState===Ka.OPEN)try{return Je.createSocketRequest("POST",la(ji(this.location,this.session))).start(S),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(S,_,I){this.closeStream(),this.readyState=Ka.CLOSED,this.onclose&&this.onclose({code:S,reason:_,wasClean:I})}onChunk(S){if(S.status===200){this.readyState===Ka.OPEN&&this.onActivity();var _,I=S.data.slice(0,1);switch(I){case"o":_=JSON.parse(S.data.slice(1)||"{}"),this.onOpen(_);break;case"a":_=JSON.parse(S.data.slice(1)||"[]");for(var P=0;P<_.length;P++)this.onEvent(_[P]);break;case"m":_=JSON.parse(S.data.slice(1)||"null"),this.onEvent(_);break;case"h":this.hooks.onHeartbeat(this);break;case"c":_=JSON.parse(S.data.slice(1)||"[]"),this.onClose(_[0],_[1],!0);break}}}onOpen(S){this.readyState===Ka.CONNECTING?(S&&S.hostname&&(this.location.base=tl(this.location.base,S.hostname)),this.readyState=Ka.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(S){this.readyState===Ka.OPEN&&this.onmessage&&this.onmessage({data:S})}onActivity(){this.onactivity&&this.onactivity()}onError(S){this.onerror&&this.onerror(S)}openStream(){this.stream=Je.createSocketRequest("POST",la(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",S=>{this.onChunk(S)}),this.stream.bind("finished",S=>{this.hooks.onFinished(this,S)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(S){we.defer(()=>{this.onError(S),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function Sh(T){var S=/([^\?]*)\/*(\??.*)/.exec(T);return{base:S[1],queryString:S[2]}}function ji(T,S){return T.base+"/"+S+"/xhr_send"}function la(T){var S=T.indexOf("?")===-1?"?":"&";return T+S+"t="+ +new Date+"&n="+el++}function tl(T,S){var _=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(T);return _[1]+S+_[3]}function ki(T){return Je.randomInt(T)}function Gs(T){for(var S=[],_=0;_<T;_++)S.push(ki(32).toString(32));return S.join("")}var Fs=vh,bd={getReceiveURL:function(T,S){return T.base+"/"+S+"/xhr_streaming"+T.queryString},onHeartbeat:function(T){T.sendRaw("[]")},sendHeartbeat:function(T){T.sendRaw("[]")},onFinished:function(T,S){T.onClose(1006,"Connection interrupted ("+S+")",!1)}},nl=bd,vd={getReceiveURL:function(T,S){return T.base+"/"+S+"/xhr"+T.queryString},onHeartbeat:function(){},sendHeartbeat:function(T){T.sendRaw("[]")},onFinished:function(T,S){S===200?T.reconnect():T.onClose(1006,"Connection interrupted ("+S+")",!1)}},Dr=vd,Oa={getRequest:function(T){var S=Je.getXHRAPI(),_=new S;return _.onreadystatechange=_.onprogress=function(){switch(_.readyState){case 3:_.responseText&&_.responseText.length>0&&T.onChunk(_.status,_.responseText);break;case 4:_.responseText&&_.responseText.length>0&&T.onChunk(_.status,_.responseText),T.emit("finished",_.status),T.close();break}},_},abortRequest:function(T){T.onreadystatechange=null,T.abort()}},al=Oa,Rr={createStreamingSocket(T){return this.createSocket(nl,T)},createPollingSocket(T){return this.createSocket(Dr,T)},createSocket(T,S){return new Fs(T,S)},createXHR(T,S){return this.createRequest(al,T,S)},createRequest(T,S,_){return new bh(T,S,_)}},La=Rr;La.createXDR=function(T,S){return this.createRequest(xd,T,S)};var sl=La,Ni={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:d,DependenciesReceivers:p,getDefaultStrategy:Zo,Transports:Jn,transportConnectionInitializer:Bs,HTTPFactory:sl,TimelineTransport:ve,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(T){window.Pusher=T;var S=()=>{this.onDocumentBody(T.ready)};window.JSON?S():x.load("json2",{},S)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:be,jsonp:Nt}},onDocumentBody(T){document.body?T():setTimeout(()=>{this.onDocumentBody(T)},0)},createJSONPRequest(T,S){return new an(T,S)},createScriptRequest(T){return new It(T)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var T=this.getXHRAPI();return new T},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return In},createWebSocket(T){var S=this.getWebSocketAPI();return new S(T)},createSocketRequest(T,S){if(this.isXHRSupported())return this.HTTPFactory.createXHR(T Line truncated
*/var Wy;function Bj(){return Wy||(Wy=1,(function(r,e){(function(a,i){r.exports=i()})(window,function(){return(function(t){var a={};function i(o){if(a[o])return a[o].exports;var d=a[o]={i:o,l:!1,exports:{}};return t[o].call(d.exports,d,d.exports,i),d.l=!0,d.exports}return i.m=t,i.c=a,i.d=function(o,d,g){i.o(o,d)||Object.defineProperty(o,d,{enumerable:!0,get:g})},i.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,d){if(d&1&&(o=i(o)),d&8||d&4&&typeof o=="object"&&o&&o.__esModule)return o;var g=Object.create(null);if(i.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:o}),d&2&&typeof o!="string")for(var h in o)i.d(g,h,function(f){return o[f]}.bind(null,h));return g},i.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(d,"a",d),d},i.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},i.p="",i(i.s=2)})([(function(t,a,i){var o=this&&this.__extends||(function(){var w=function(k,A){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,N){O.__proto__=N}||function(O,N){for(var D in N)N.hasOwnProperty(D)&&(O[D]=N[D])},w(k,A)};return function(k,A){w(k,A);function O(){this.constructor=k}k.prototype=A===null?Object.create(A):(O.prototype=A.prototype,new O)}})();Object.defineProperty(a,"__esModule",{value:!0});var d=256,g=(function(){function w(k){k===void 0&&(k="="),this._paddingCharacter=k}return w.prototype.encodedLength=function(k){return this._paddingCharacter?(k+2)/3*4|0:(k*8+5)/6|0},w.prototype.encode=function(k){for(var A="",O=0;O<k.length-2;O+=3){var N=k[O]<<16|k[O+1]<<8|k[O+2];A+=this._encodeByte(N>>>18&63),A+=this._encodeByte(N>>>12&63),A+=this._encodeByte(N>>>6&63),A+=this._encodeByte(N>>>0&63)}var D=k.length-O;if(D>0){var N=k[O]<<16|(D===2?k[O+1]<<8:0);A+=this._encodeByte(N>>>18&63),A+=this._encodeByte(N>>>12&63),D===2?A+=this._encodeByte(N>>>6&63):A+=this._paddingCharacter||"",A+=this._paddingCharacter||""}return A},w.prototype.maxDecodedLength=function(k){return this._paddingCharacter?k/4*3|0:(k*6+7)/8|0},w.prototype.decodedLength=function(k){return this.maxDecodedLength(k.length-this._getPaddingLength(k))},w.prototype.decode=function(k){if(k.length===0)return new Uint8Array(0);for(var A=this._getPaddingLength(k),O=k.length-A,N=new Uint8Array(this.maxDecodedLength(O)),D=0,$=0,M=0,z=0,K=0,pe=0,we=0;$<O-4;$+=4)z=this._decodeChar(k.charCodeAt($+0)),K=this._decodeChar(k.charCodeAt($+1)),pe=this._decodeChar(k.charCodeAt($+2)),we=this._decodeChar(k.charCodeAt($+3)),N[D++]=z<<2|K>>>4,N[D++]=K<<4|pe>>>2,N[D++]=pe<<6|we,M|=z&d,M|=K&d,M|=pe&d,M|=we&d;if($<O-1&&(z=this._decodeChar(k.charCodeAt($)),K=this._decodeChar(k.charCodeAt($+1)),N[D++]=z<<2|K>>>4,M|=z&d,M|=K&d),$<O-2&&(pe=this._decodeChar(k.charCodeAt($+2)),N[D++]=K<<4|pe>>>2,M|=pe&d),$<O-3&&(we=this._decodeChar(k.charCodeAt($+3)),N[D++]=pe<<6|we,M|=we&d),M!==0)throw new Error("Base64Coder: incorrect characters for decoding");return N},w.prototype._encodeByte=function(k){var A=k;return A+=65,A+=25-k>>>8&6,A+=51-k>>>8&-75,A+=61-k>>>8&-15,A+=62-k>>>8&3,String.fromCharCode(A)},w.prototype._decodeChar=function(k){var A=d;return A+=(42-k&k-44)>>>8&-d+k-43+62,A+=(46-k&k-48)>>>8&-d+k-47+63,A+=(47-k&k-58)>>>8&-d+k-48+52,A+=(64-k&k-91)>>>8&-d+k-65+0,A+=(96-k&k-123)>>>8&-d+k-97+26,A},w.prototype._getPaddingLength=function(k){var A=0;if(this._paddingCharacter){for(var O=k.length-1;O>=0&&k[O]===this._paddingCharacter;O--)A++;if(k.length<4||A>2)throw new Error("Base64Coder: incorrect padding")}return A},w})();a.Coder=g;var h=new g;function f(w){return h.encode(w)}a.encode=f;function p(w){return h.decode(w)}a.decode=p;var y=(function(w){o(k,w);function k(){return w!==null&&w.apply(this,arguments)||this}return k.prototype._encodeByte=function(A){var O=A;return O+=65,O+=25-A>>>8&6,O+=51-A>>>8&-75,O+=61-A>>>8&-13,O+=62-A>>>8&49,String.fromCharCode(O)},k.prototype._decodeChar=function(A){var O=d;return O+=(44-A&A-46)>>>8&-d+A-45+62,O+=(94-A&A-96)>>>8&-d+A-95+63,O+=(47-A&A-58)>>>8&-d+A-48+52,O+=(64-A&A-91)>>>8&-d+A-65+0,O+=(96-A&A-123)>>>8&-d+A-97+26,O},k})(g);a.URLSafeCoder=y;var x=new y;function S(w){return x.encode(w)}a.encodeURLSafe=S;function v(w){return x.decode(w)}a.decodeURLSafe=v,a.encodedLength=function(w){return h.encodedLength(w)},a.maxDecodedLength=function(w){return h.maxDecodedLength(w)},a.decodedLength=function(w){return h.decodedLength(w)}}),(function(t,a,i){Object.defineProperty(a,"__esModule",{value:!0});var o="utf8: invalid string",d="utf8: invalid source encoding";function g(p){for(var y=new Uint8Array(h(p)),x=0,S=0;S<p.length;S++){var v=p.charCodeAt(S);v<128?y[x++]=v:v<2048?(y[x++]=192|v>>6,y[x++]=128|v&63):v<55296?(y[x++]=224|v>>12,y[x++]=128|v>>6&63,y[x++]=128|v&63):(S++,v=(v&1023)<<10,v|=p.charCodeAt(S)&1023,v+=65536,y[x++]=240|v>>18,y[x++]=128|v>>12&63,y[x++]=128|v>>6&63,y[x++]=128|v&63)}return y}a.encode=g;function h(p){for(var y=0,x=0Line truncated
`);return I!==-1?(this.position+=I+1,_.slice(0,I)):null}isBufferTooLong(C){return this.position===C.length&&C.length>Gs}}var ji;(function(T){T[T.CONNECTING=0]="CONNECTING",T[T.OPEN=1]="OPEN",T[T.CLOSED=3]="CLOSED"})(ji||(ji={}));var Ka=ji,tl=1;class vh{constructor(C,_){this.hooks=C,this.session=Ni(1e3)+"/"+Fs(8),this.location=wh(_),this.readyState=Ka.CONNECTING,this.openStream()}send(C){return this.sendRaw(JSON.stringify([C]))}ping(){this.hooks.sendHeartbeat(this)}close(C,_){this.onClose(C,_,!0)}sendRaw(C){if(this.readyState===Ka.OPEN)try{return Xe.createSocketRequest("POST",da(ki(this.location,this.session))).start(C),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(C,_,I){this.closeStream(),this.readyState=Ka.CLOSED,this.onclose&&this.onclose({code:C,reason:_,wasClean:I})}onChunk(C){if(C.status===200){this.readyState===Ka.OPEN&&this.onActivity();var _,I=C.data.slice(0,1);switch(I){case"o":_=JSON.parse(C.data.slice(1)||"{}"),this.onOpen(_);break;case"a":_=JSON.parse(C.data.slice(1)||"[]");for(var P=0;P<_.length;P++)this.onEvent(_[P]);break;case"m":_=JSON.parse(C.data.slice(1)||"null"),this.onEvent(_);break;case"h":this.hooks.onHeartbeat(this);break;case"c":_=JSON.parse(C.data.slice(1)||"[]"),this.onClose(_[0],_[1],!0);break}}}onOpen(C){this.readyState===Ka.CONNECTING?(C&&C.hostname&&(this.location.base=nl(this.location.base,C.hostname)),this.readyState=Ka.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(C){this.readyState===Ka.OPEN&&this.onmessage&&this.onmessage({data:C})}onActivity(){this.onactivity&&this.onactivity()}onError(C){this.onerror&&this.onerror(C)}openStream(){this.stream=Xe.createSocketRequest("POST",da(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",C=>{this.onChunk(C)}),this.stream.bind("finished",C=>{this.hooks.onFinished(this,C)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(C){oe.defer(()=>{this.onError(C),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function wh(T){var C=/([^\?]*)\/*(\??.*)/.exec(T);return{base:C[1],queryString:C[2]}}function ki(T,C){return T.base+"/"+C+"/xhr_send"}function da(T){var C=T.indexOf("?")===-1?"?":"&";return T+C+"t="+ +new Date+"&n="+tl++}function nl(T,C){var _=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(T);return _[1]+C+_[3]}function Ni(T){return Xe.randomInt(T)}function Fs(T){for(var C=[],_=0;_<T;_++)C.push(Ni(32).toString(32));return C.join("")}var Vs=vh,bd={getReceiveURL:function(T,C){return T.base+"/"+C+"/xhr_streaming"+T.queryString},onHeartbeat:function(T){T.sendRaw("[]")},sendHeartbeat:function(T){T.sendRaw("[]")},onFinished:function(T,C){T.onClose(1006,"Connection interrupted ("+C+")",!1)}},al=bd,vd={getReceiveURL:function(T,C){return T.base+"/"+C+"/xhr"+T.queryString},onHeartbeat:function(){},sendHeartbeat:function(T){T.sendRaw("[]")},onFinished:function(T,C){C===200?T.reconnect():T.onClose(1006,"Connection interrupted ("+C+")",!1)}},Dr=vd,Oa={getRequest:function(T){var C=Xe.getXHRAPI(),_=new C;return _.onreadystatechange=_.onprogress=function(){switch(_.readyState){case 3:_.responseText&&_.responseText.length>0&&T.onChunk(_.status,_.responseText);break;case 4:_.responseText&&_.responseText.length>0&&T.onChunk(_.status,_.responseText),T.emit("finished",_.status),T.close();break}},_},abortRequest:function(T){T.onreadystatechange=null,T.abort()}},sl=Oa,Rr={createStreamingSocket(T){return this.createSocket(al,T)},createPollingSocket(T){return this.createSocket(Dr,T)},createSocket(T,C){return new Vs(T,C)},createXHR(T,C){return this.createRequest(sl,T,C)},createRequest(T,C,_){return new bh(T,C,_)}},La=Rr;La.createXDR=function(T,C){return this.createRequest(xd,T,C)};var rl=La,Ei={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:d,DependenciesReceivers:p,getDefaultStrategy:el,Transports:Xn,transportConnectionInitializer:qs,HTTPFactory:rl,TimelineTransport:Ta,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(T){window.Pusher=T;var C=()=>{this.onDocumentBody(T.ready)};window.JSON?C():y.load("json2",{},C)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:we,jsonp:wt}},onDocumentBody(T){document.body?T():setTimeout(()=>{this.onDocumentBody(T)},0)},createJSONPRequest(T,C){return new qt(T,C)},createScriptRequest(T){return new At(T)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var T=this.getXHRAPI();return new T},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return In},createWebSocket(T){var C=this.getWebSocketAPI();return new C(T)},createSocketRequest(T,C){if(this.isXHRSupported())return this.HTTPFactory.createXHR(T Line truncated
display: flex;
align-items: center;
justify-content: center;
@@ -221,23 +221,23 @@ Error generating stack: `+u.message+`
<div style="${d.card}">
<!-- 아이콘 -->
<div style="${d.iconContainer}">
<i class="fa-solid ${n.icon}" style="${d.icon}"></i>
<i class="fa-solid ${t.icon}" style="${d.icon}"></i>
</div>
<!-- 제목 -->
<h1 style="${d.title}">
${this.escapeHtml(n.title)}
${this.escapeHtml(t.title)}
</h1>
<!-- 사용자 메시지 -->
<p style="${d.message}">
${this.escapeHtml(n.message)}
${this.escapeHtml(t.message)}
</p>
<!-- 상세 메시지 (API 응답 등) -->
${n.detailMessage?`
${t.detailMessage?`
<p style="${d.detailMessage}">
${this.escapeHtml(n.detailMessage)}
${this.escapeHtml(t.detailMessage)}
</p>
`:`<div style="${d.spacer}"></div>`}
@@ -247,12 +247,12 @@ Error generating stack: `+u.message+`
<p style="${d.stackTitle}">
Stack Trace:
</p>
<pre style="${d.stackTrace}">${this.escapeHtml(n.stackTrace)}</pre>
<pre style="${d.stackTrace}">${this.escapeHtml(t.stackTrace)}</pre>
</div>
`:""}
<!-- 새로고침 버튼 (복구 가능할 때만) -->
${n.showReloadButton?`
${t.showReloadButton?`
<div style="${d.buttonContainer}">
<button
onclick="window.location.reload()"
@@ -267,7 +267,7 @@ Error generating stack: `+u.message+`
`:""}
</div>
</div>
`}static renderFromError(e,n,a,i=!1,o,d,g){let h,f;if(n.userMessageKey.startsWith("$t:"))if(d&&o)try{h=d.translate(n.userMessageKey,o)}catch{h=n.userMessageKey.replace("$t:","")}else h=n.userMessageKey.replace("$t:","");else h=n.userMessageKey;if(g){const p=g;p.details?.apiMessage?f=p.details.apiMessage:p.response?.data?.message&&(f=p.response.data.message)}this.render(e,{title:a,message:h,detailMessage:f,icon:n.icon,showStack:n.showStack,stackTrace:n.stack,showReloadButton:n.recoverable,debug:i})}static escapeHtml(e){if(!e)return"";const n=document.createElement("div");return n.textContent=e,n.innerHTML}}const Ft=at("ErrorPageHandler");class Vj{constructor(e){H(this,"templateId");H(this,"layoutLoader");H(this,"locale");H(this,"debug");H(this,"renderFunction");H(this,"dataSourceManager");H(this,"globalState");H(this,"errorConfig",null);H(this,"configLoaded",!1);this.templateId=e.templateId,this.layoutLoader=e.layoutLoader,this.locale=e.locale,this.debug=e.debug,this.renderFunction=e.renderFunction,this.dataSourceManager=e.dataSourceManager,this.globalState=e.globalState||{}}async loadConfig(){if(this.configLoaded)return this.errorConfig;try{const e=await fetch(`/api/templates/${this.templateId}/config.json`);if(!e.ok)return this.debug&&Ft.warn("Failed to load template config:",e.statusText),this.configLoaded=!0,null;const n=await e.json();if(!n.success||!n.data)return this.debug&&Ft.warn("Invalid template config response"),this.configLoaded=!0,null;const a=n.data;return!a.error_config||!a.error_config.layouts?(this.debug&&Ft.warn("No error_config found in template.json"),this.configLoaded=!0,null):(this.errorConfig=a.error_config,this.configLoaded=!0,this.debug&&Ft.log("Error config loaded:",this.errorConfig),this.errorConfig)}catch(e){return Ft.error("Failed to load error config:",e),this.configLoaded=!0,null}}async renderError(e,n="app"){try{const a=await this.loadConfig();if(!a)return this.debug&&Ft.warn("No error config available, cannot render error page"),!1;const i=a.layouts[e]||a.layouts[String(e)];if(!i)return this.debug&&Ft.warn(`No layout defined for error code: ${e}`),!1;this.debug&&Ft.log(`Loading error layout: ${i} for code: ${e}`);const o=await this.layoutLoader.loadLayout(this.templateId,i);if(!o)return this.debug&&Ft.error(`Failed to load error layout: ${i}`),!1;this.debug&&Ft.log("Error layout loaded:",o);let d={};const g=o.data_sources||[];if(g.length>0){this.debug&&Ft.log("Fetching data sources:",g.map(w=>w.id));const p=g.filter(w=>w.loading_strategy==="blocking"),x=g.filter(w=>!w.loading_strategy||w.loading_strategy==="progressive"),y=[...p,...x];if(y.length>0)try{d=await this.dataSourceManager.fetchDataSources(y,{},new URLSearchParams),this.debug&&Ft.log("Data sources fetched:",Object.keys(d))}catch(w){Ft.error("Failed to fetch data sources:",w)}}const h={};g.length>0&&(this.processInitOptions(g,d,h),this.debug&&Ft.log("initOptions processed:",{globalKeys:Object.keys(this.globalState),localKeys:Object.keys(h)}));const f={...d,errorCode:e,_global:{...this.globalState},_local:{...h}};return await this.renderFunction({containerId:n,layoutJson:o,dataContext:f,translationContext:{templateId:this.templateId,locale:this.locale}}),this.debug&&Ft.log(`Error page ${e} rendered successfully`),!0}catch(a){return Ft.error(`Failed to render error page ${e}:`,a),!1}}processInitOptions(e,n,a){for(const i of e){const o=n[i.id];if(!o)continue;const d=o?.data??o;if(i.initLocal){if(typeof i.initLocal=="string")a[i.initLocal]=d,Ft.log(`initLocal: ${i.id}.data -> _local.${i.initLocal}`);else if(typeof i.initLocal=="object"&&"key"in i.initLocal){const{key:g,path:h}=i.initLocal;a[g]=h?this.getValueByPath(d,h):d,Ft.log(`initLocal: ${i.id}.data${h?"."+h:""} -> _local.${g}`)}}if(i.initGlobal){const g=Array.isArray(i.initGlobal)?i.initGlobal:[i.initGlobal];for(const h of g)if(typeof h=="string")this.globalState[h]=d,Ft.log(`initGlobal: ${i.id}.data -> _global.${h}`);else if(typeof h=="object"&&h!==null&&"key"in h){const{key:f,path:p}=h;this.globalState[f]=p?this.getValueByPath(d,p):d,Ft.log(`initGlobal: ${i.id}.data${p?"."+p:""} -> _global.${f}`)}}}}getValueByPath(e,n){return n.split(".").reduce((a,i)=>a?.[i],e)}updateGlobalState(e){this.globalState={...this.globalState,...e}}updateLocale(e){this.locale=e,this.debug&&Ft.log("Locale updated:",e)}isConfigLoaded(){return this.configLoaded}async hasErrorLayout(e){const n=await this.loadConfig();return n?!!(n.layouts[e]||n.layouts[String(e)]):!1}clearConfigCache(){this.errorConfig=null,this.configLoaded=!1,this.debug&&Ft.log("Config cache cleared")}}const Tn=at("ModuleAssetLoader");class Kj{constructor(){H(this,"loadedAssets",new Map);H(this,"loadingPromises",new Map)}async loadActiveExtensionAssets(e){if(!e||e.length===0){Tn.log("No module assets to load");return}const n=[...e].sort((i,o)=>i.priority-o.priority);Tn.log("Loading module assets:",n.map(i=>i.identifier));const a=n.filter(i=>i.css).map(i=>this.loadCSS(i.identifier,i.css));await Promise.all(a),Tn. Line truncated
`}static renderFromError(e,t,a,i=!1,o,d,g){let h,f;if(t.userMessageKey.startsWith("$t:"))if(d&&o)try{h=d.translate(t.userMessageKey,o)}catch{h=t.userMessageKey.replace("$t:","")}else h=t.userMessageKey.replace("$t:","");else h=t.userMessageKey;if(g){const p=g;p.details?.apiMessage?f=p.details.apiMessage:p.response?.data?.message&&(f=p.response.data.message)}this.render(e,{title:a,message:h,detailMessage:f,icon:t.icon,showStack:t.showStack,stackTrace:t.stack,showReloadButton:t.recoverable,debug:i})}static escapeHtml(e){if(!e)return"";const t=document.createElement("div");return t.textContent=e,t.innerHTML}}const Vt=it("ErrorPageHandler");class Jj{constructor(e){H(this,"templateId");H(this,"layoutLoader");H(this,"locale");H(this,"debug");H(this,"renderFunction");H(this,"dataSourceManager");H(this,"globalState");H(this,"errorConfig",null);H(this,"configLoaded",!1);this.templateId=e.templateId,this.layoutLoader=e.layoutLoader,this.locale=e.locale,this.debug=e.debug,this.renderFunction=e.renderFunction,this.dataSourceManager=e.dataSourceManager,this.globalState=e.globalState||{}}async loadConfig(){if(this.configLoaded)return this.errorConfig;try{const e=await fetch(`/api/templates/${this.templateId}/config.json`);if(!e.ok)return this.debug&&Vt.warn("Failed to load template config:",e.statusText),this.configLoaded=!0,null;const t=await e.json();if(!t.success||!t.data)return this.debug&&Vt.warn("Invalid template config response"),this.configLoaded=!0,null;const a=t.data;return!a.error_config||!a.error_config.layouts?(this.debug&&Vt.warn("No error_config found in template.json"),this.configLoaded=!0,null):(this.errorConfig=a.error_config,this.configLoaded=!0,this.debug&&Vt.log("Error config loaded:",this.errorConfig),this.errorConfig)}catch(e){return Vt.error("Failed to load error config:",e),this.configLoaded=!0,null}}async renderError(e,t="app"){try{const a=await this.loadConfig();if(!a)return this.debug&&Vt.warn("No error config available, cannot render error page"),!1;const i=a.layouts[e]||a.layouts[String(e)];if(!i)return this.debug&&Vt.warn(`No layout defined for error code: ${e}`),!1;this.debug&&Vt.log(`Loading error layout: ${i} for code: ${e}`);const o=await this.layoutLoader.loadLayout(this.templateId,i);if(!o)return this.debug&&Vt.error(`Failed to load error layout: ${i}`),!1;this.debug&&Vt.log("Error layout loaded:",o);let d={};const g=o.data_sources||[];if(g.length>0){this.debug&&Vt.log("Fetching data sources:",g.map(S=>S.id));const p=g.filter(S=>S.loading_strategy==="blocking"),y=g.filter(S=>!S.loading_strategy||S.loading_strategy==="progressive"),x=[...p,...y];if(x.length>0)try{d=await this.dataSourceManager.fetchDataSources(x,{},new URLSearchParams),this.debug&&Vt.log("Data sources fetched:",Object.keys(d))}catch(S){Vt.error("Failed to fetch data sources:",S)}}const h={};g.length>0&&(this.processInitOptions(g,d,h),this.debug&&Vt.log("initOptions processed:",{globalKeys:Object.keys(this.globalState),localKeys:Object.keys(h)}));const f={...d,errorCode:e,_global:{...this.globalState},_local:{...h}};return await this.renderFunction({containerId:t,layoutJson:o,dataContext:f,translationContext:{templateId:this.templateId,locale:this.locale}}),this.debug&&Vt.log(`Error page ${e} rendered successfully`),!0}catch(a){return Vt.error(`Failed to render error page ${e}:`,a),!1}}processInitOptions(e,t,a){for(const i of e){const o=t[i.id];if(!o)continue;const d=o?.data??o;if(i.initLocal){if(typeof i.initLocal=="string")a[i.initLocal]=d,Vt.log(`initLocal: ${i.id}.data -> _local.${i.initLocal}`);else if(typeof i.initLocal=="object"&&"key"in i.initLocal){const{key:g,path:h}=i.initLocal;a[g]=h?this.getValueByPath(d,h):d,Vt.log(`initLocal: ${i.id}.data${h?"."+h:""} -> _local.${g}`)}}if(i.initGlobal){const g=Array.isArray(i.initGlobal)?i.initGlobal:[i.initGlobal];for(const h of g)if(typeof h=="string")this.globalState[h]=d,Vt.log(`initGlobal: ${i.id}.data -> _global.${h}`);else if(typeof h=="object"&&h!==null&&"key"in h){const{key:f,path:p}=h;this.globalState[f]=p?this.getValueByPath(d,p):d,Vt.log(`initGlobal: ${i.id}.data${p?"."+p:""} -> _global.${f}`)}}}}getValueByPath(e,t){return t.split(".").reduce((a,i)=>a?.[i],e)}updateGlobalState(e){this.globalState={...this.globalState,...e}}updateLocale(e){this.locale=e,this.debug&&Vt.log("Locale updated:",e)}isConfigLoaded(){return this.configLoaded}async hasErrorLayout(e){const t=await this.loadConfig();return t?!!(t.layouts[e]||t.layouts[String(e)]):!1}clearConfigCache(){this.errorConfig=null,this.configLoaded=!1,this.debug&&Vt.log("Config cache cleared")}}const Mn=it("ModuleAssetLoader");class Xj{constructor(){H(this,"loadedAssets",new Map);H(this,"loadingPromises",new Map)}async loadActiveExtensionAssets(e){if(!e||e.length===0){Mn.log("No module assets to load");return}const t=[...e].sort((o,d)=>o.priority-d.priority);Mn.log("Loading module assets:",t.map(o=>o.identifier));const a=t.filter(o=>o.css).map(o=>this.loadCSS(o.identifier,o.css)),i=t.filter(o=>o.js).map( Line truncated
with(ctx) {
try {
return Boolean(${a});
@@ -275,7 +275,7 @@ Error generating stack: `+u.message+`
return false;
}
}
`)(n)}return!!e}catch(a){return V.warn(`Failed to evaluate script condition: ${e}`,a),!1}}showInitError(e){const n=Xy(e);Qy.renderFromError("app",n,"초기화 실패",this.config.debug,{templateId:this.config.templateId,locale:this.config.locale},void 0,e)}showTransitionOverlay(e,n){const a=typeof e=="boolean"?{enabled:e,style:"opaque",target:void 0,skeleton:void 0,spinner:void 0}:{enabled:e.enabled,style:e.style||"opaque",target:e.target,skeleton:e.skeleton,spinner:e.spinner,fallback_target:e.fallback_target};if(!a.enabled)return;if(this.hideTransitionOverlay(),a.style==="skeleton"&&a.skeleton?.component&&a.target&&n){this.renderSkeletonOverlay(a.target,a.skeleton,n,a.fallback_target);return}if(a.style==="spinner"&&a.target){this.renderSpinnerOverlay(a.target,a.spinner,a.fallback_target);return}const i=document.documentElement.classList.contains("dark");let o,d="";switch(a.style){case"blur":o=i?"rgba(17,24,39,0.3)":"rgba(255,255,255,0.3)",d="backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);";break;case"fade":o=i?"rgba(17,24,39,0.8)":"rgba(255,255,255,0.8)";break;case"skeleton":o=i?"rgb(17,24,39)":"rgb(249,250,251)";break;case"opaque":default:o=i?"rgb(17,24,39)":"rgb(249,250,251)";break}if(a.target){const g=`#${CSS.escape(a.target)}`,h=document.createElement("style");h.id="g7-transition-overlay",h.textContent=`${g}{position:relative;z-index:0;}${g}::after{content:'';position:absolute;inset:0;background:${o};${d}z-index:2147483647;pointer-events:none;}`,document.head.appendChild(h),this.transitionOverlayEl=h}else{const g=document.createElement("div");g.id="g7-transition-overlay",g.setAttribute("aria-hidden","true"),g.style.cssText=`position:fixed;inset:0;z-index:9999;pointer-events:none;background:${o};${d}`,document.body.appendChild(g),this.transitionOverlayEl=g}}hideTransitionOverlay(){this.transitionOverlayEl&&(this.transitionOverlayEl.remove(),this.transitionOverlayEl=null),this.hideSkeletonOverlay()}renderSkeletonOverlay(e,n,a,i){const d=ya.getInstance().getComponent(n.component);if(!d){V.log(`Skeleton component "${n.component}" not found in registry, falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}let g=document.getElementById(e),h="target";if(!g&&i&&(g=document.getElementById(i),h="fallback"),g||(g=document.getElementById("app"),h="fullpage"),!g){V.log(`Skeleton overlay: no target found (target="#${e}", fallback="${i||"none"}"), falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}this.hideSkeletonOverlay();const p=document.documentElement.classList.contains("dark")?"rgb(17,24,39)":"rgb(249,250,251)",x=h==="fullpage"?"app":h==="fallback"?i:e,y=`#${CSS.escape(x)}`,w=document.createElement("style");w.id="g7-skeleton-overlay-style",w.textContent=`${y}{position:relative;z-index:0;}${y}::after{content:'';position:absolute;inset:0;background:${p};z-index:2147483646;pointer-events:none;}`,document.head.appendChild(w),this.transitionOverlayEl=w;const v=document.createElement("div");if(v.id="g7-skeleton-overlay",v.setAttribute("role","status"),v.setAttribute("aria-busy","true"),v.setAttribute("aria-label","Loading..."),h==="fullpage")v.style.cssText=["position:fixed","inset:0","z-index:20","overflow:hidden","pointer-events:none",`background:${p}`].join(";")+";";else{const N=g.getBoundingClientRect(),D=window.scrollX||document.documentElement.scrollLeft,M=window.scrollY||document.documentElement.scrollTop;v.style.cssText=["position:absolute",`top:${N.top+M}px`,`left:${N.left+D}px`,`width:${N.width}px`,`height:${N.height}px`,"z-index:20","overflow:hidden","pointer-events:none",`background:${p}`].join(";")+";"}document.body.appendChild(v),this.skeletonOverlayContainer=v;const C=a.components||[];let k;if(h==="fullpage")k=C;else{const N=h==="fallback"?i:e;k=this.findComponentChildrenById(C,N)}const A=zu.createRoot(v);this.skeletonOverlayRoot=A,Os.flushSync(()=>{A.render(Fe.createElement(d,{components:k,options:{animation:n.animation||"pulse",iteration_count:n.iteration_count||5}}))});const R=h==="fullpage"?"fullpage (#app)":h==="fallback"?`fallback (#${i})`:`target (#${e})`;V.log(`Skeleton overlay rendered [${R}] with "${n.component}" (${k.length} components)`)}findComponentChildrenById(e,n){const a=i=>{for(const o of i){if(o.id===n)return o.children||[];if(o.children&&Array.isArray(o.children)){const d=a(o.children);if(d!==null)return d}}return null};return a(e)||e}renderSpinnerOverlay(e,n,a){let i=document.getElementById(e),o="target";if(!i&&a&&(i=document.getElementById(a),o="fallback"),i||(i=document.getElementById("app"),o="fullpage"),!i){V.log(`Spinner overlay: no target found (target="#${e}", fallback="${a||"none"}"), falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}this.hideSkeletonOverlay();const d=o==="fullpage"?"app":o==="fallback"?a:e,g=`#${CSS.escape(d)}`,h=document.createElement("style");h.id="g7-skeleton-overla Line truncated
`)(t)}return!!e}catch(a){return G.warn(`Failed to evaluate script condition: ${e}`,a),!1}}showInitError(e){const t=Qy(e);Zy.renderFromError("app",t,"초기화 실패",this.config.debug,{templateId:this.config.templateId,locale:this.config.locale},void 0,e)}showTransitionOverlay(e,t){const a=typeof e=="boolean"?{enabled:e,style:"opaque",target:void 0,skeleton:void 0,spinner:void 0}:{enabled:e.enabled,style:e.style||"opaque",target:e.target,skeleton:e.skeleton,spinner:e.spinner,fallback_target:e.fallback_target};if(!a.enabled)return;if(this.hideTransitionOverlay(),a.style==="skeleton"&&a.skeleton?.component&&a.target&&t){this.renderSkeletonOverlay(a.target,a.skeleton,t,a.fallback_target);return}if(a.style==="spinner"&&a.target){this.renderSpinnerOverlay(a.target,a.spinner,a.fallback_target);return}const i=document.documentElement.classList.contains("dark");let o,d="";switch(a.style){case"blur":o=i?"rgba(17,24,39,0.3)":"rgba(255,255,255,0.3)",d="backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);";break;case"fade":o=i?"rgba(17,24,39,0.8)":"rgba(255,255,255,0.8)";break;case"skeleton":o=i?"rgb(17,24,39)":"rgb(249,250,251)";break;case"opaque":default:o=i?"rgb(17,24,39)":"rgb(249,250,251)";break}if(a.target){const g=`#${CSS.escape(a.target)}`,h=document.createElement("style");h.id="g7-transition-overlay",h.textContent=`${g}{position:relative;z-index:0;}${g}::after{content:'';position:absolute;inset:0;background:${o};${d}z-index:2147483647;pointer-events:none;}`,document.head.appendChild(h),this.transitionOverlayEl=h}else{const g=document.createElement("div");g.id="g7-transition-overlay",g.setAttribute("aria-hidden","true"),g.style.cssText=`position:fixed;inset:0;z-index:9999;pointer-events:none;background:${o};${d}`,document.body.appendChild(g),this.transitionOverlayEl=g}}hideTransitionOverlay(){this.transitionOverlayEl&&(this.transitionOverlayEl.remove(),this.transitionOverlayEl=null),this.hideSkeletonOverlay()}renderSkeletonOverlay(e,t,a,i){const d=ba.getInstance().getComponent(t.component);if(!d){G.log(`Skeleton component "${t.component}" not found in registry, falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}let g=document.getElementById(e),h="target";if(!g&&i&&(g=document.getElementById(i),h="fallback"),g||(g=document.getElementById("app"),h="fullpage"),!g){G.log(`Skeleton overlay: no target found (target="#${e}", fallback="${i||"none"}"), falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}this.hideSkeletonOverlay();const p=document.documentElement.classList.contains("dark")?"rgb(17,24,39)":"rgb(249,250,251)",y=h==="fullpage"?"app":h==="fallback"?i:e,x=`#${CSS.escape(y)}`,S=document.createElement("style");S.id="g7-skeleton-overlay-style",S.textContent=`${x}{position:relative;z-index:0;}${x}::after{content:'';position:absolute;inset:0;background:${p};z-index:2147483646;pointer-events:none;}`,document.head.appendChild(S),this.transitionOverlayEl=S;const v=document.createElement("div");if(v.id="g7-skeleton-overlay",v.setAttribute("role","status"),v.setAttribute("aria-busy","true"),v.setAttribute("aria-label","Loading..."),h==="fullpage")v.style.cssText=["position:fixed","inset:0","z-index:20","overflow:hidden","pointer-events:none",`background:${p}`].join(";")+";";else{const N=g.getBoundingClientRect(),D=window.scrollX||document.documentElement.scrollLeft,$=window.scrollY||document.documentElement.scrollTop;v.style.cssText=["position:absolute",`top:${N.top+$}px`,`left:${N.left+D}px`,`width:${N.width}px`,`height:${N.height}px`,"z-index:20","overflow:hidden","pointer-events:none",`background:${p}`].join(";")+";"}document.body.appendChild(v),this.skeletonOverlayContainer=v;const w=a.components||[];let k;if(h==="fullpage")k=w;else{const N=h==="fallback"?i:e;k=this.findComponentChildrenById(w,N)}const A=zu.createRoot(v);this.skeletonOverlayRoot=A,Os.flushSync(()=>{A.render(Ke.createElement(d,{components:k,options:{animation:t.animation||"pulse",iteration_count:t.iteration_count||5}}))});const O=h==="fullpage"?"fullpage (#app)":h==="fallback"?`fallback (#${i})`:`target (#${e})`;G.log(`Skeleton overlay rendered [${O}] with "${t.component}" (${k.length} components)`)}findComponentChildrenById(e,t){const a=i=>{for(const o of i){if(o.id===t)return o.children||[];if(o.children&&Array.isArray(o.children)){const d=a(o.children);if(d!==null)return d}}return null};return a(e)||e}renderSpinnerOverlay(e,t,a){let i=document.getElementById(e),o="target";if(!i&&a&&(i=document.getElementById(a),o="fallback"),i||(i=document.getElementById("app"),o="fullpage"),!i){G.log(`Spinner overlay: no target found (target="#${e}", fallback="${a||"none"}"), falling back to opaque overlay`),this.showTransitionOverlay({enabled:!0,style:"opaque",target:e});return}this.hideSkeletonOverlay();const d=o==="fullpage"?"app":o==="fallback"?a:e,g=`#${CSS.escape(d)}`,h=document.createElement("style");h.id="g7-skeleton-overla Line truncated
with(ctx) {
try {
return ${e};
@@ -283,13 +283,13 @@ Error generating stack: `+u.message+`
return undefined;
}
}
`)(n)}catch(a){V.warn(`Expression evaluation failed: ${e}`,a);return}}async executeInitActions(e,n={}){const{getActionDispatcher:a}=await Promise.resolve().then(()=>qa),i=a();if(!i){V.warn("ActionDispatcher not available for init_actions");return}V.log("Executing init_actions:",e.map(g=>g.handler)),V.log("Init actions dataContext:",n),V.log("Init actions dataContext._global:",n._global);const o=e.map(g=>g.handler).filter(g=>g.includes("."));o.length>0&&await this.waitForHandlers(i,o);let d={...n};for(const g of e)try{const h={type:"click",handler:g.handler,target:g.target,params:g.params,resultTo:g.resultTo,onSuccess:g.onSuccess,onError:g.onError,if:g.if,conditions:g.conditions,auth_mode:g.auth_mode,auth_required:g.auth_required},f=i.createHandler(h,d),p=new Event("init");await f(p),V.log(`Init action executed: ${g.handler}`);const x=this.globalState;d={...d,_global:{...x},_local:x._local||d._local||{}},V.log(`Data context refreshed after ${g.handler}:`,{cartKey:d._global?.cartKey})}catch(h){V.error(`Failed to execute init action: ${g.handler}`,h)}}async waitForHandlers(e,n,a=5e3){const i=Date.now(),o=50,d=()=>n.every(g=>e.customHandlers?.has(g));if(d()){V.log("All module handlers already registered");return}return V.log("Waiting for module handlers:",n),new Promise(g=>{const h=()=>{if(d()){V.log("All module handlers now registered"),g();return}if(Date.now()-i>=a){const f=n.filter(p=>!e.customHandlers?.has(p));V.warn("Timeout waiting for handlers:",f),g();return}setTimeout(h,o)};h()})}};H(Ea,"LOCALE_STORAGE_KEY","g7_locale"),H(Ea,"CACHE_VERSION_STORAGE_KEY","g7_cache_version");let Ro=Ea;function Pg(r){const e=new Ro(r);return r.websocket&&(Lc.configure(r.websocket),V.log("WebSocket 설정 완료")),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{e.init(),window.__templateApp=e}):(e.init(),window.__templateApp=e),e}typeof window<"u"&&(window.G7Core=window.G7Core||{},window.G7Core.initTemplateApp=Pg,window.G7Core.dataSource={refetch:async(r,e)=>{const n=window.__templateApp;if(!n){V.warn("TemplateApp not initialized (G7Core.dataSource.refetch)");return}return n.refetchDataSource(r,e)},get:r=>{const e=window.__templateApp;if(!e){V.warn("TemplateApp not initialized (G7Core.dataSource.get)");return}return e.getDataSource(r)}});const zc=[{id:"stale-closure",name:"Stale Closure",category:"state",symptoms:["이전 값이 전송됨","저장 시 오래된 데이터","API 호출 시 첫 값만 전송","클릭할 때마다 같은 값"],detector:r=>{const n=r.actionHistory.slice(-10).filter(a=>a.type==="apiCall");if(n.length<2)return!1;for(let a=1;a<n.length;a++){const i=JSON.stringify(n[a-1].params),o=JSON.stringify(n[a].params);if(i===o&&n[a].params)return!0}return!1},probability:.85,solution:"G7Core.state.get()._global 사용하여 최신 상태 참조",docLink:"troubleshooting-state.md#stale-closure",codeExample:`
`)(t)}catch(a){G.warn(`Expression evaluation failed: ${e}`,a);return}}async executeInitActions(e,t={}){const{getActionDispatcher:a}=await Promise.resolve().then(()=>qa),i=a();if(!i){G.warn("ActionDispatcher not available for init_actions");return}G.log("Executing init_actions:",e.map(g=>g.handler)),G.log("Init actions dataContext:",t),G.log("Init actions dataContext._global:",t._global);const o=e.map(g=>g.handler).filter(g=>g.includes("."));o.length>0&&await this.waitForHandlers(i,o);let d={...t};for(const g of e)try{const h={type:"click",handler:g.handler,target:g.target,params:g.params,resultTo:g.resultTo,onSuccess:g.onSuccess,onError:g.onError,if:g.if,conditions:g.conditions,auth_mode:g.auth_mode,auth_required:g.auth_required},f=i.createHandler(h,d),p=new Event("init");await f(p),G.log(`Init action executed: ${g.handler}`);const y=this.globalState;d={...d,_global:{...y},_local:y._local||d._local||{}},G.log(`Data context refreshed after ${g.handler}:`,{cartKey:d._global?.cartKey})}catch(h){G.error(`Failed to execute init action: ${g.handler}`,h)}}async waitForHandlers(e,t,a=5e3){const i=Date.now(),o=50,d=()=>t.every(g=>e.customHandlers?.has(g));if(d()){G.log("All module handlers already registered");return}return G.log("Waiting for module handlers:",t),new Promise(g=>{const h=()=>{if(d()){G.log("All module handlers now registered"),g();return}if(Date.now()-i>=a){const f=t.filter(p=>!e.customHandlers?.has(p));G.warn("Timeout waiting for handlers:",f),g();return}setTimeout(h,o)};h()})}};H(Aa,"LOCALE_STORAGE_KEY","g7_locale"),H(Aa,"CACHE_VERSION_STORAGE_KEY","g7_cache_version");let Oo=Aa;function Pg(r){const e=new Oo(r);return r.websocket&&(Lc.configure(r.websocket),G.log("WebSocket 설정 완료")),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{e.init(),window.__templateApp=e}):(e.init(),window.__templateApp=e),e}typeof window<"u"&&(window.G7Core=window.G7Core||{},window.G7Core.initTemplateApp=Pg,window.G7Core.dataSource={refetch:async(r,e)=>{const t=window.__templateApp;if(!t){G.warn("TemplateApp not initialized (G7Core.dataSource.refetch)");return}return t.refetchDataSource(r,e)},get:r=>{const e=window.__templateApp;if(!e){G.warn("TemplateApp not initialized (G7Core.dataSource.get)");return}return e.getDataSource(r)}});const zc=[{id:"stale-closure",name:"Stale Closure",category:"state",symptoms:["이전 값이 전송됨","저장 시 오래된 데이터","API 호출 시 첫 값만 전송","클릭할 때마다 같은 값"],detector:r=>{const t=r.actionHistory.slice(-10).filter(a=>a.type==="apiCall");if(t.length<2)return!1;for(let a=1;a<t.length;a++){const i=JSON.stringify(t[a-1].params),o=JSON.stringify(t[a].params);if(i===o&&t[a].params)return!0}return!1},probability:.85,solution:"G7Core.state.get()._global 사용하여 최신 상태 참조",docLink:"troubleshooting-state.md#stale-closure",codeExample:`
// ❌ 문제: 클로저가 이전 상태 캡처
"body": { "email": "{{_global.email}}" }
// ✅ 해결: 최신 상태 참조
"body": { "email": "{{G7Core.state.get()._global.email}}" }
`},{id:"sequence-merge",name:"Sequence setState 병합 충돌",category:"state",symptoms:["sequence 내 setState 일부 누락","여러 setState 중 마지막만 적용","상태 업데이트 순서 문제"],detector:r=>r.actionHistory.filter(n=>n.type==="sequence").some(n=>n.children?.filter(a=>a.type==="setState").length>1),probability:.75,solution:"currentState 추적 패턴 사용 또는 단일 setState로 병합",docLink:"troubleshooting-state.md#사례3",codeExample:`
`},{id:"sequence-merge",name:"Sequence setState 병합 충돌",category:"state",symptoms:["sequence 내 setState 일부 누락","여러 setState 중 마지막만 적용","상태 업데이트 순서 문제"],detector:r=>r.actionHistory.filter(t=>t.type==="sequence").some(t=>t.children?.filter(a=>a.type==="setState").length>1),probability:.75,solution:"currentState 추적 패턴 사용 또는 단일 setState로 병합",docLink:"troubleshooting-state.md#사례3",codeExample:`
// ❌ 문제: sequence 내 여러 setState
"actions": [
{ "handler": "setState", "params": { "a": 1 } },
@@ -300,7 +300,7 @@ Error generating stack: `+u.message+`
"actions": [
{ "handler": "setState", "params": { "a": 1, "b": 2 } }
]
`},{id:"init-actions-timing",name:"init_actions 타이밍 이슈",category:"timing",symptoms:["init_actions 값이 렌더링에 반영 안됨","초기 상태가 undefined","첫 클릭 시 초기값 손실"],detector:r=>{if(r.stateHistory.length===0)return!1;const e=r.stateHistory[0];return e?.source==="init_actions"&&Object.keys(e.next||{}).length===0},probability:.7,solution:"init_actions 후 _global 상태 병합 확인",docLink:"troubleshooting-state.md#init_actions-관련-이슈"},{id:"datakey-global-init",name:'dataKey="_global.xxx" 초기화 누락',category:"form",symptoms:["Form dataKey가 전역 상태에 바인딩 안됨","Input 값이 _global에 저장 안됨","Form 제출 시 빈 값 전송"],detector:r=>r.form.filter(n=>n.dataKey?.startsWith("_global.")).length===0?!1:!r.stateHistory.some(n=>n.source==="init_actions"),probability:.95,solution:"init_actions에서 _global 상태 초기화 필수",docLink:"troubleshooting-state.md#datakey-자동-바인딩-이슈",codeExample:`
`},{id:"init-actions-timing",name:"init_actions 타이밍 이슈",category:"timing",symptoms:["init_actions 값이 렌더링에 반영 안됨","초기 상태가 undefined","첫 클릭 시 초기값 손실"],detector:r=>{if(r.stateHistory.length===0)return!1;const e=r.stateHistory[0];return e?.source==="init_actions"&&Object.keys(e.next||{}).length===0},probability:.7,solution:"init_actions 후 _global 상태 병합 확인",docLink:"troubleshooting-state.md#init_actions-관련-이슈"},{id:"datakey-global-init",name:'dataKey="_global.xxx" 초기화 누락',category:"form",symptoms:["Form dataKey가 전역 상태에 바인딩 안됨","Input 값이 _global에 저장 안됨","Form 제출 시 빈 값 전송"],detector:r=>r.form.filter(t=>t.dataKey?.startsWith("_global.")).length===0?!1:!r.stateHistory.some(t=>t.source==="init_actions"),probability:.95,solution:"init_actions에서 _global 상태 초기화 필수",docLink:"troubleshooting-state.md#datakey-자동-바인딩-이슈",codeExample:`
// init_actions에서 초기화 필요
"init_actions": [
{
@@ -317,7 +317,7 @@ Error generating stack: `+u.message+`
// ✅ 해결: 렌더러에서 skipCache 옵션 사용
// 또는 ActionDispatcher에서 skipCache: true로 호출
`},{id:"cache-dynamic-query",name:"동적 쿼리 파라미터 캐싱",category:"cache",symptoms:["페이지네이션이 동작 안함","필터 변경해도 같은 결과","정렬이 적용 안됨"],detector:r=>{const e=r.network.requestHistory.slice(-5);if(e.length<2)return!1;const n=e.map(a=>a.url.split("?")[0]);return new Set(n).size<n.length},probability:.85,solution:"데이터소스 params에 skipCache: true 추가",docLink:"troubleshooting-cache.md#사례2"},{id:"orphaned-listener",name:"정리되지 않은 이벤트 리스너",category:"lifecycle",symptoms:["메모리 사용량 증가","이벤트가 여러 번 실행됨","페이지 이동 후에도 이벤트 발생"],detector:r=>r.lifecycle.orphanedListeners.length>0,probability:.8,solution:"useEffect cleanup 또는 removeEventListener 추가",docLink:"troubleshooting-components.md#lifecycle"},{id:"unmount-state-update",name:"언마운트 후 상태 업데이트",category:"lifecycle",symptoms:["Cannot update state on unmounted component","비동기 작업 완료 후 에러","모달 닫힘 후 에러"],detector:r=>r.actionHistory.some(e=>e.status==="error"&&e.error?.message?.includes("unmounted")),probability:.9,solution:"AbortController 또는 isMounted 플래그 사용",docLink:"troubleshooting-state.md#unmount-update"},{id:"excessive-rerenders",name:"과도한 리렌더링",category:"performance",symptoms:["UI가 느림","스크롤 버벅임","입력 지연"],detector:r=>{for(const e of r.performance.renderCounts.values())if(e>50)return!0;return!1},probability:.75,solution:"React.memo, useMemo, useCallback 사용",docLink:"troubleshooting-components.md#performance"},{id:"binding-eval-flood",name:"바인딩 평가 과다",category:"performance",symptoms:["페이지 로드 느림","CPU 사용량 높음"],detector:r=>r.performance.bindingEvalCount>1e3,probability:.85,solution:"불필요한 {{}} 바인딩 제거, 정적 값 사용",docLink:"troubleshooting-cache.md#binding-performance"},{id:"memory-leak",name:"잠재적 메모리 누수",category:"performance",symptoms:["시간이 지남에 따라 느려짐","브라우저 탭 메모리 증가","오래 사용 시 크래시"],detector:r=>r.performance.memoryWarnings.length>0,probability:.7,solution:"클린업 함수 확인, WeakMap 사용",docLink:"troubleshooting-state.md#memory-leak"},{id:"request-timeout",name:"API 요청 타임아웃",category:"network",symptoms:["데이터가 로딩 안됨","무한 로딩 스피너","타임아웃 에러"],detector:r=>r.network.requestHistory.some(e=>e.status==="timeout"||e.duration&&e.duration>3e4),probability:.9,solution:"서버 상태 확인, 타임아웃 설정 조정",docLink:"troubleshooting-backend.md#timeout"},{id:"duplicate-requests",name:"중복 API 요청",category:"network",symptoms:["같은 요청이 여러 번 실행","네트워크 탭에 동일 요청 반복","불필요한 서버 부하"],detector:r=>{const a=r.network.requestHistory.slice(-20).map(i=>`${i.method}:${i.url}`);return a.length!==new Set(a).size},probability:.85,solution:"debounce 추가, 데이터소스 의존성 확인",docLink:"troubleshooting-cache.md#duplicate-request"},{id:"datasource-not-loading",name:"데이터소스 미로딩",category:"network",symptoms:["데이터가 undefined","빈 테이블/목록","API 호출이 안됨"],detector:r=>r.network.pendingDataSources.length>0&&r.network.activeRequests.length===0,probability:.8,solution:"데이터소스 strategy 확인, 의존성 확인",docLink:"troubleshooting-backend.md#datasource"},{id:"permission-denied",name:"레이아웃 권한 거부 (403)",category:"network",symptoms:["403 Forbidden","권한이 없습니다","레이아웃 로드 실패","페이지 접근 불가","빈 화면"],detector:r=>r.network.requestHistory.some(e=>e.statusCode===403),probability:.9,solution:"사용자 권한 확인 또는 레이아웃 permissions 설정 확인",docLink:"frontend/layout-json.md#permissions",codeExample:`
`},{id:"cache-dynamic-query",name:"동적 쿼리 파라미터 캐싱",category:"cache",symptoms:["페이지네이션이 동작 안함","필터 변경해도 같은 결과","정렬이 적용 안됨"],detector:r=>{const e=r.network.requestHistory.slice(-5);if(e.length<2)return!1;const t=e.map(a=>a.url.split("?")[0]);return new Set(t).size<t.length},probability:.85,solution:"데이터소스 params에 skipCache: true 추가",docLink:"troubleshooting-cache.md#사례2"},{id:"orphaned-listener",name:"정리되지 않은 이벤트 리스너",category:"lifecycle",symptoms:["메모리 사용량 증가","이벤트가 여러 번 실행됨","페이지 이동 후에도 이벤트 발생"],detector:r=>r.lifecycle.orphanedListeners.length>0,probability:.8,solution:"useEffect cleanup 또는 removeEventListener 추가",docLink:"troubleshooting-components.md#lifecycle"},{id:"unmount-state-update",name:"언마운트 후 상태 업데이트",category:"lifecycle",symptoms:["Cannot update state on unmounted component","비동기 작업 완료 후 에러","모달 닫힘 후 에러"],detector:r=>r.actionHistory.some(e=>e.status==="error"&&e.error?.message?.includes("unmounted")),probability:.9,solution:"AbortController 또는 isMounted 플래그 사용",docLink:"troubleshooting-state.md#unmount-update"},{id:"excessive-rerenders",name:"과도한 리렌더링",category:"performance",symptoms:["UI가 느림","스크롤 버벅임","입력 지연"],detector:r=>{for(const e of r.performance.renderCounts.values())if(e>50)return!0;return!1},probability:.75,solution:"React.memo, useMemo, useCallback 사용",docLink:"troubleshooting-components.md#performance"},{id:"binding-eval-flood",name:"바인딩 평가 과다",category:"performance",symptoms:["페이지 로드 느림","CPU 사용량 높음"],detector:r=>r.performance.bindingEvalCount>1e3,probability:.85,solution:"불필요한 {{}} 바인딩 제거, 정적 값 사용",docLink:"troubleshooting-cache.md#binding-performance"},{id:"memory-leak",name:"잠재적 메모리 누수",category:"performance",symptoms:["시간이 지남에 따라 느려짐","브라우저 탭 메모리 증가","오래 사용 시 크래시"],detector:r=>r.performance.memoryWarnings.length>0,probability:.7,solution:"클린업 함수 확인, WeakMap 사용",docLink:"troubleshooting-state.md#memory-leak"},{id:"request-timeout",name:"API 요청 타임아웃",category:"network",symptoms:["데이터가 로딩 안됨","무한 로딩 스피너","타임아웃 에러"],detector:r=>r.network.requestHistory.some(e=>e.status==="timeout"||e.duration&&e.duration>3e4),probability:.9,solution:"서버 상태 확인, 타임아웃 설정 조정",docLink:"troubleshooting-backend.md#timeout"},{id:"duplicate-requests",name:"중복 API 요청",category:"network",symptoms:["같은 요청이 여러 번 실행","네트워크 탭에 동일 요청 반복","불필요한 서버 부하"],detector:r=>{const a=r.network.requestHistory.slice(-20).map(i=>`${i.method}:${i.url}`);return a.length!==new Set(a).size},probability:.85,solution:"debounce 추가, 데이터소스 의존성 확인",docLink:"troubleshooting-cache.md#duplicate-request"},{id:"datasource-not-loading",name:"데이터소스 미로딩",category:"network",symptoms:["데이터가 undefined","빈 테이블/목록","API 호출이 안됨"],detector:r=>r.network.pendingDataSources.length>0&&r.network.activeRequests.length===0,probability:.8,solution:"데이터소스 strategy 확인, 의존성 확인",docLink:"troubleshooting-backend.md#datasource"},{id:"permission-denied",name:"레이아웃 권한 거부 (403)",category:"network",symptoms:["403 Forbidden","권한이 없습니다","레이아웃 로드 실패","페이지 접근 불가","빈 화면"],detector:r=>r.network.requestHistory.some(e=>e.statusCode===403),probability:.9,solution:"사용자 권한 확인 또는 레이아웃 permissions 설정 확인",docLink:"frontend/layout-json.md#permissions",codeExample:`
// 레이아웃 JSON의 permissions 필드 확인
{
"permissions": ["core.products.read"] // 필요 권한
@@ -343,7 +343,7 @@ Error generating stack: `+u.message+`
},
{ "handler": "refetchDataSource", "params": { "id": "list" } }
]
`},{id:"scroll-event-not-configured",name:"스크롤 이벤트 미설정",category:"lifecycle",symptoms:["스크롤해도 데이터 로드 안됨","무한 스크롤 작동 안함","스크롤 이벤트 안잡힘"],detector:r=>{const e=r.actionHistory.some(a=>a.type==="scroll"),n=r.actionHistory.some(a=>a.type==="appendDataSource");return!e&&!n&&r.actionHistory.length>5},probability:.7,solution:"scroll 이벤트 핸들러 설정 및 컨테이너 overflow 속성 확인",docLink:"frontend/actions.md#scroll-event",codeExample:`
`},{id:"scroll-event-not-configured",name:"스크롤 이벤트 미설정",category:"lifecycle",symptoms:["스크롤해도 데이터 로드 안됨","무한 스크롤 작동 안함","스크롤 이벤트 안잡힘"],detector:r=>{const e=r.actionHistory.some(a=>a.type==="scroll"),t=r.actionHistory.some(a=>a.type==="appendDataSource");return!e&&!t&&r.actionHistory.length>5},probability:.7,solution:"scroll 이벤트 핸들러 설정 및 컨테이너 overflow 속성 확인",docLink:"frontend/actions.md#scroll-event",codeExample:`
// 무한 스크롤 컨테이너 설정 예시
{
"type": "Div",
@@ -363,7 +363,7 @@ Error generating stack: `+u.message+`
]
}
}
`},{id:"append-datasource-wrong-path",name:"appendDataSource 경로 오류",category:"state",symptoms:["무한 스크롤 시 데이터 덮어씀","기존 데이터가 사라짐","데이터가 병합 안됨"],detector:r=>{const e=r.actionHistory.filter(n=>n.type==="appendDataSource");return e.length>=2&&e.some(n=>n.status==="error")},probability:.75,solution:"dataPath와 sourcePath 설정 확인, 데이터소스 dataPath가 병합 대상인지 확인",docLink:"frontend/actions-handlers.md#appendDataSource"},{id:"websocket-disconnected",name:"WebSocket 연결 끊김",category:"websocket",symptoms:["실시간 업데이트 안됨","알림이 오지 않음"],detector:r=>r.websocket.connectionState==="disconnected",probability:.9,solution:"네트워크 상태 확인, 재연결 로직 확인",docLink:"troubleshooting-backend.md#websocket"},{id:"if-condition-always-false",name:"if 조건 항상 false",category:"conditional",symptoms:["컴포넌트가 표시 안됨","조건부 영역이 비어있음"],detector:r=>r.conditional.ifConditions.some(e=>e.evaluatedValue===!1&&e.evaluationCount>5),probability:.85,solution:"if 조건식 확인, 상태값 확인",docLink:"troubleshooting-state.md#if-condition"},{id:"iteration-empty",name:"iteration 소스 비어있음",category:"conditional",symptoms:["반복 영역이 비어있음","목록이 표시 안됨"],detector:r=>r.conditional.iterations.some(e=>e.sourceLength===0),probability:.8,solution:"iteration source 표현식 확인, 데이터 로딩 확인",docLink:"troubleshooting-guide.md#iteration"},{id:"iteration-item-var",name:"iteration 변수명 오류",category:"conditional",symptoms:["반복 항목 내 바인딩 빈값","올바른 개수는 표시되나 내용 없음"],detector:r=>r.conditional.iterations.some(e=>e.itemVar==="item"||e.indexVar==="index"),probability:.95,solution:"item_var, index_var 사용 (item, index 아님)",docLink:"troubleshooting-guide.md#iteration-바인딩-문제",codeExample:`
`},{id:"append-datasource-wrong-path",name:"appendDataSource 경로 오류",category:"state",symptoms:["무한 스크롤 시 데이터 덮어씀","기존 데이터가 사라짐","데이터가 병합 안됨"],detector:r=>{const e=r.actionHistory.filter(t=>t.type==="appendDataSource");return e.length>=2&&e.some(t=>t.status==="error")},probability:.75,solution:"dataPath와 sourcePath 설정 확인, 데이터소스 dataPath가 병합 대상인지 확인",docLink:"frontend/actions-handlers.md#appendDataSource"},{id:"websocket-disconnected",name:"WebSocket 연결 끊김",category:"websocket",symptoms:["실시간 업데이트 안됨","알림이 오지 않음"],detector:r=>r.websocket.connectionState==="disconnected",probability:.9,solution:"네트워크 상태 확인, 재연결 로직 확인",docLink:"troubleshooting-backend.md#websocket"},{id:"if-condition-always-false",name:"if 조건 항상 false",category:"conditional",symptoms:["컴포넌트가 표시 안됨","조건부 영역이 비어있음"],detector:r=>r.conditional.ifConditions.some(e=>e.evaluatedValue===!1&&e.evaluationCount>5),probability:.85,solution:"if 조건식 확인, 상태값 확인",docLink:"troubleshooting-state.md#if-condition"},{id:"iteration-empty",name:"iteration 소스 비어있음",category:"conditional",symptoms:["반복 영역이 비어있음","목록이 표시 안됨"],detector:r=>r.conditional.iterations.some(e=>e.sourceLength===0),probability:.8,solution:"iteration source 표현식 확인, 데이터 로딩 확인",docLink:"troubleshooting-guide.md#iteration"},{id:"iteration-item-var",name:"iteration 변수명 오류",category:"conditional",symptoms:["반복 항목 내 바인딩 빈값","올바른 개수는 표시되나 내용 없음"],detector:r=>r.conditional.iterations.some(e=>e.itemVar==="item"||e.indexVar==="index"),probability:.95,solution:"item_var, index_var 사용 (item, index 아님)",docLink:"troubleshooting-guide.md#iteration-바인딩-문제",codeExample:`
// ❌ 잘못된 속성명
"iteration": {
"source": "{{data}}",
@@ -377,7 +377,7 @@ Error generating stack: `+u.message+`
"item_var": "file",
"index_var": "fileIdx"
}
`},{id:"form-no-datakey",name:"Form dataKey 미설정",category:"form",symptoms:["Input 값이 저장 안됨","Form 제출 시 빈 값"],detector:r=>r.form.some(e=>!e.dataKey),probability:.9,solution:"Form에 dataKey prop 추가",docLink:"troubleshooting-components.md#form-datakey"},{id:"input-no-name",name:"Input name 미설정",category:"form",symptoms:["자동 바인딩 안됨","Input 값 변경이 상태에 반영 안됨"],detector:r=>r.form.some(e=>e.inputs.some(n=>!n.name)),probability:.95,solution:"Input에 name prop 추가",docLink:"troubleshooting-components.md#input-name"},{id:"i18n-key-missing",name:"번역 키 누락",category:"i18n",symptoms:["$t:key가 그대로 표시됨","번역되지 않은 텍스트"],detector:r=>typeof document<"u"?document.body.innerHTML.includes("$t:"):!1,probability:.95,solution:"번역 파일에 키 추가",docLink:"troubleshooting-components.md#i18n"}];class Zy{constructor(){H(this,"devTools");this.devTools=Ca.getInstance()}analyze(e){const n=this.buildContext(),a=[];for(const i of zc){const o=e.some(g=>i.symptoms.some(h=>h.toLowerCase().includes(g.toLowerCase())||g.toLowerCase().includes(h.toLowerCase())));let d=!1;try{d=i.detector(n)}catch{}(o||d)&&a.push({rule:i,confidence:this.calculateConfidence(i,e,o,d),evidence:this.collectEvidence(i,n)})}return a.sort((i,o)=>o.confidence-i.confidence)}suggestFix(e){return{title:e.rule.name,description:e.rule.solution,codeExample:e.rule.codeExample,docLink:e.rule.docLink}}getCommonIssues(){const e=this.buildContext(),n=[];for(const a of zc)try{a.detector(e)&&n.push({rule:a,count:1})}catch{}return n.sort((a,i)=>i.count-a.count).map(a=>({id:a.rule.id,name:a.rule.name,description:a.rule.solution,frequency:a.count}))}getRulesByCategory(e){return zc.filter(n=>n.category===e)}getAllRules(){return[...zc]}buildContext(){return{stateHistory:this.devTools.getStateHistory(),actionHistory:this.devTools.getActionHistory(),cacheStats:this.devTools.getCacheStats(),currentState:this.devTools.getState(),lifecycle:this.devTools.getLifecycleInfo(),performance:this.devTools.getPerformanceInfo(),network:this.devTools.getNetworkInfo(),conditional:this.devTools.getConditionalInfo(),form:this.devTools.getFormInfo(),websocket:this.devTools.getWebSocketInfo(),stateAtTime:e=>this.devTools.getStateAtTime(e),layoutHas:(e,n)=>this.checkLayoutHas(e,n)}}calculateConfidence(e,n,a,i){let o=e.probability;if(a){const d=n.filter(g=>e.symptoms.some(h=>h.toLowerCase().includes(g.toLowerCase())||g.toLowerCase().includes(h.toLowerCase()))).length;o+=d*.05}return i&&(o+=.1),Math.min(o,.99)}collectEvidence(e,n){const a=[];switch(e.category){case"state":n.stateHistory.length>0&&a.push(`상태 변경 이력: ${n.stateHistory.length}개`);break;case"cache":a.push(`캐시 히트율: ${((n.cacheStats.hitRate??0)*100).toFixed(1)}%`);break;case"lifecycle":n.lifecycle.orphanedListeners.length>0&&a.push(`정리되지 않은 리스너: ${n.lifecycle.orphanedListeners.length}개`);break;case"performance":a.push(`바인딩 평가 횟수: ${n.performance.bindingEvalCount}`);break;case"network":a.push(`진행 중인 요청: ${n.network.activeRequests.length}개`);break;case"form":a.push(`추적 중인 Form: ${n.form.length}개`);break}return a}checkLayoutHas(e,n){try{const i=window.G7Core?.getCurrentLayout?.();if(!i)return!1;const o=JSON.stringify(i);return o.includes(`"${e}":"${n}`)||o.includes(`"${e}": "${n}`)}catch{return!1}}}const Qj=Object.freeze(Object.defineProperty({__proto__:null,DiagnosticEngine:Zy},Symbol.toStringTag,{value:"Module"})),Zj={dumpEndpoint:"/_boost/g7-debug/dump-state",logEndpoint:"/_boost/g7-debug/log",timeout:1e4,autoCapture:!1,autoCaptureInterval:3e4};class ek{constructor(e){H(this,"config");H(this,"devTools");H(this,"connected",!1);H(this,"autoCaptureTimer",null);H(this,"CHUNK_SIZE",2*1024*1024);H(this,"BULK_THRESHOLD",4*1024*1024);this.config={...Zj,...e},this.devTools=Ca.getInstance(),this.config.autoCapture&&this.startAutoCapture()}async dumpState(e=!1){const n=`${Date.now()}_${Math.random().toString(36).substring(2,9)}`,a=Date.now(),i=this.devTools.getPerformanceInfo(),o={renderCounts:Object.fromEntries(i.renderCounts),bindingEvalCount:i.bindingEvalCount,memoryWarnings:i.memoryWarnings},d={state:()=>this.devTools.getState(),actions:()=>this.devTools.getActionHistory(),cache:()=>this.devTools.getCacheStats(),lifecycle:()=>this.devTools.getLifecycleInfo(),network:()=>this.devTools.getNetworkInfo(),expressions:()=>this.devTools.getExpressions(),forms:()=>this.devTools.getForms(),performance:()=>o,conditionals:()=>this.devTools.getConditionalInfo(),dataSources:()=>this.devTools.getDataSources(),handlers:()=>this.devTools.getHandlers(),componentEvents:()=>this.devTools.getComponentEventInfo(),stateRendering:()=>this.devTools.getStateRenderingInfo(),stateHierarchy:()=>this.devTools.getStateHierarchyInfo(),contextFlow:()=>this.devTools.getContextFlowInfo(),styleValidation:()=>this.devTools.getStyleValidationInfo(),authDebug:()=>this.devTools.getAuth Line truncated
`},{id:"form-no-datakey",name:"Form dataKey 미설정",category:"form",symptoms:["Input 값이 저장 안됨","Form 제출 시 빈 값"],detector:r=>r.form.some(e=>!e.dataKey),probability:.9,solution:"Form에 dataKey prop 추가",docLink:"troubleshooting-components.md#form-datakey"},{id:"input-no-name",name:"Input name 미설정",category:"form",symptoms:["자동 바인딩 안됨","Input 값 변경이 상태에 반영 안됨"],detector:r=>r.form.some(e=>e.inputs.some(t=>!t.name)),probability:.95,solution:"Input에 name prop 추가",docLink:"troubleshooting-components.md#input-name"},{id:"i18n-key-missing",name:"번역 키 누락",category:"i18n",symptoms:["$t:key가 그대로 표시됨","번역되지 않은 텍스트"],detector:r=>typeof document<"u"?document.body.innerHTML.includes("$t:"):!1,probability:.95,solution:"번역 파일에 키 추가",docLink:"troubleshooting-components.md#i18n"}];class ex{constructor(){H(this,"devTools");this.devTools=ka.getInstance()}analyze(e){const t=this.buildContext(),a=[];for(const i of zc){const o=e.some(g=>i.symptoms.some(h=>h.toLowerCase().includes(g.toLowerCase())||g.toLowerCase().includes(h.toLowerCase())));let d=!1;try{d=i.detector(t)}catch{}(o||d)&&a.push({rule:i,confidence:this.calculateConfidence(i,e,o,d),evidence:this.collectEvidence(i,t)})}return a.sort((i,o)=>o.confidence-i.confidence)}suggestFix(e){return{title:e.rule.name,description:e.rule.solution,codeExample:e.rule.codeExample,docLink:e.rule.docLink}}getCommonIssues(){const e=this.buildContext(),t=[];for(const a of zc)try{a.detector(e)&&t.push({rule:a,count:1})}catch{}return t.sort((a,i)=>i.count-a.count).map(a=>({id:a.rule.id,name:a.rule.name,description:a.rule.solution,frequency:a.count}))}getRulesByCategory(e){return zc.filter(t=>t.category===e)}getAllRules(){return[...zc]}buildContext(){return{stateHistory:this.devTools.getStateHistory(),actionHistory:this.devTools.getActionHistory(),cacheStats:this.devTools.getCacheStats(),currentState:this.devTools.getState(),lifecycle:this.devTools.getLifecycleInfo(),performance:this.devTools.getPerformanceInfo(),network:this.devTools.getNetworkInfo(),conditional:this.devTools.getConditionalInfo(),form:this.devTools.getFormInfo(),websocket:this.devTools.getWebSocketInfo(),stateAtTime:e=>this.devTools.getStateAtTime(e),layoutHas:(e,t)=>this.checkLayoutHas(e,t)}}calculateConfidence(e,t,a,i){let o=e.probability;if(a){const d=t.filter(g=>e.symptoms.some(h=>h.toLowerCase().includes(g.toLowerCase())||g.toLowerCase().includes(h.toLowerCase()))).length;o+=d*.05}return i&&(o+=.1),Math.min(o,.99)}collectEvidence(e,t){const a=[];switch(e.category){case"state":t.stateHistory.length>0&&a.push(`상태 변경 이력: ${t.stateHistory.length}개`);break;case"cache":a.push(`캐시 히트율: ${((t.cacheStats.hitRate??0)*100).toFixed(1)}%`);break;case"lifecycle":t.lifecycle.orphanedListeners.length>0&&a.push(`정리되지 않은 리스너: ${t.lifecycle.orphanedListeners.length}개`);break;case"performance":a.push(`바인딩 평가 횟수: ${t.performance.bindingEvalCount}`);break;case"network":a.push(`진행 중인 요청: ${t.network.activeRequests.length}개`);break;case"form":a.push(`추적 중인 Form: ${t.form.length}개`);break}return a}checkLayoutHas(e,t){try{const i=window.G7Core?.getCurrentLayout?.();if(!i)return!1;const o=JSON.stringify(i);return o.includes(`"${e}":"${t}`)||o.includes(`"${e}": "${t}`)}catch{return!1}}}const nk=Object.freeze(Object.defineProperty({__proto__:null,DiagnosticEngine:ex},Symbol.toStringTag,{value:"Module"})),ak={dumpEndpoint:"/_boost/g7-debug/dump-state",logEndpoint:"/_boost/g7-debug/log",timeout:1e4,autoCapture:!1,autoCaptureInterval:3e4};class sk{constructor(e){H(this,"config");H(this,"devTools");H(this,"connected",!1);H(this,"autoCaptureTimer",null);H(this,"CHUNK_SIZE",2*1024*1024);H(this,"BULK_THRESHOLD",4*1024*1024);this.config={...ak,...e},this.devTools=ka.getInstance(),this.config.autoCapture&&this.startAutoCapture()}async dumpState(e=!1){const t=`${Date.now()}_${Math.random().toString(36).substring(2,9)}`,a=Date.now(),i=this.devTools.getPerformanceInfo(),o={renderCounts:Object.fromEntries(i.renderCounts),bindingEvalCount:i.bindingEvalCount,memoryWarnings:i.memoryWarnings},d={state:()=>this.devTools.getState(),actions:()=>this.devTools.getActionHistory(),cache:()=>this.devTools.getCacheStats(),lifecycle:()=>this.devTools.getLifecycleInfo(),network:()=>this.devTools.getNetworkInfo(),expressions:()=>this.devTools.getExpressions(),forms:()=>this.devTools.getForms(),performance:()=>o,conditionals:()=>this.devTools.getConditionalInfo(),dataSources:()=>this.devTools.getDataSources(),handlers:()=>this.devTools.getHandlers(),componentEvents:()=>this.devTools.getComponentEventInfo(),stateRendering:()=>this.devTools.getStateRenderingInfo(),stateHierarchy:()=>this.devTools.getStateHierarchyInfo(),contextFlow:()=>this.devTools.getContextFlowInfo(),styleValidation:()=>this.devTools.getStyleValidationInfo(),authDebug:()=>this.devTools.getAuth Line truncated
#g7-devtools-root {
/* 기본 폰트 설정 */
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
@@ -1841,16 +1841,16 @@ details[open] > .g7dt-summary::before {
.g7dt-cursor-pointer {
cursor: pointer;
}
`,nk=()=>{const r="g7-devtools-styles";if(document.getElementById(r))return;const e=document.createElement("style");e.id=r,e.textContent=tk,document.head.appendChild(e)},tx={state:"상태",actions:"액션",cache:"캐시",diagnose:"진단",performance:"성능",lifecycle:"라이프사이클",network:"네트워크",form:"Form",conditional:"조건부",expression:"표현식",handlers:"핸들러",events:"이벤트",datasources:"데이터소스",renders:"렌더링",styles:"스타일",auth:"인증",logs:"로그",layout:"레이아웃",changedetection:"변경감지",staleclosure:"Stale Closure",nestedcontext:"Context",modalscope:"모달스코프",namedactions:"Named Actions"},ak=700,sk=500,nx=400,ax=300,sx="g7-devtools-panel",Bg=r=>r===null||r===void 0?"g7dt-text-gray":typeof r=="string"?"g7dt-text-yellow":typeof r=="number"?"g7dt-text-cyan":typeof r=="boolean"?"g7dt-text-pink":Array.isArray(r)?"g7dt-text-orange":typeof r=="object"?"g7dt-text-blue":"g7dt-text-white",rk=r=>r===null?"null":r===void 0?"undefined":Array.isArray(r)?`Array(${r.length})`:typeof r=="object"?`Object(${Object.keys(r).length})`:typeof r,ik=r=>r===null?"null":r===void 0?"undefined":typeof r=="string"?r.length>50?`"${r.substring(0,50)}..."`:`"${r}"`:typeof r=="boolean"?r?"true":"false":typeof r=="number"?String(r):"",rx=()=>{try{const r=localStorage.getItem(sx);if(r)return JSON.parse(r)}catch(r){console.warn("[G7DevTools] 설정 로드 실패:",r)}return{}},ix=r=>{try{const n={...rx(),...r};localStorage.setItem(sx,JSON.stringify(n))}catch(e){console.warn("[G7DevTools] 설정 저장 실패:",e)}},gi=({keyName:r,value:e,path:n,expandedPaths:a,onToggle:i,searchTerm:o,depth:d=0})=>{const g=e!==null&&typeof e=="object",h=a.has(n),f=Array.isArray(e),p=o&&(r.toLowerCase().includes(o.toLowerCase())||typeof e=="string"&&e.toLowerCase().includes(o.toLowerCase())||typeof e=="number"&&String(e).includes(o)),x=w=>{w.stopPropagation(),g&&i(n)},y=g?Object.entries(e):[];return l.jsxs("div",{style:{marginLeft:d>0?"16px":"0"},children:[l.jsxs("div",{className:`g7dt-tree-node g7dt-flex g7dt-items-center g7dt-gap-1 ${p?"g7dt-ring-highlight":""}`,onClick:x,children:[g?l.jsx("span",{className:"g7dt-text-gray g7dt-w-4 g7dt-text-xs g7dt-select-none",style:{textAlign:"center"},children:h?"▼":"▶"}):l.jsx("span",{className:"g7dt-w-4"}),l.jsx("span",{className:"g7dt-text-purple g7dt-text-xs",children:r}),l.jsx("span",{className:"g7dt-text-gray-dark g7dt-text-xs",children:":"}),g?l.jsxs("span",{className:`g7dt-text-xs ${Bg(e)}`,children:[f?"[":"{",!h&&l.jsx("span",{className:"g7dt-text-gray",style:{margin:"0 4px"},children:rk(e)}),!h&&(f?"]":"}")]}):l.jsx("span",{className:`g7dt-text-xs ${Bg(e)}`,children:ik(e)}),!g&&l.jsxs("span",{className:"g7dt-text-gray-dark g7dt-text-xs g7dt-ml-1",children:["(",typeof e,")"]})]}),g&&h&&l.jsxs("div",{className:"g7dt-border-l",style:{marginLeft:"8px"},children:[y.map(([w,v])=>l.jsx(gi,{keyName:f?`[${w}]`:w,value:v,path:`${n}.${w}`,expandedPaths:a,onToggle:i,searchTerm:o,depth:d+1},`${n}.${w}`)),l.jsx("div",{className:"g7dt-ml-4 g7dt-text-xs",children:l.jsx("span",{className:Bg(e),children:f?"]":"}"})})]})]})},ok=({state:r,devTools:e})=>{const[n,a]=j.useState(new Set(["_global","_local","_computed","_isolated","$parent"])),[i,o]=j.useState(""),[d,g]=j.useState(!1),[h,f]=j.useState(!1),[p,x]=j.useState(null),y=j.useCallback(()=>{e&&x(e.getComputedDependencyTrackingInfo())},[e]);j.useEffect(()=>{if(h&&e){y();const L=setInterval(y,2e3);return()=>clearInterval(L)}},[h,e,y]);const w=L=>{switch(L){case"state-change":return"📊";case"prop-change":return"📥";case"dependency-change":return"🔗";case"manual":return"👆";case"initial":return"🚀";default:return"❓"}},v=j.useCallback(L=>{a(z=>{const Y=new Set(z);return Y.has(L)?Y.delete(L):Y.add(L),Y})},[]),C=j.useCallback((L,z)=>{const Y=[z];if(L!==null&&typeof L=="object")for(const[he,be]of Object.entries(L))Y.push(...C(be,`${z}.${he}`));return Y},[]),k=j.useCallback(()=>{if(d)a(new Set(["_global","_local","_computed","_isolated","$parent"]));else{const L=new Set;C(r._global,"_global").forEach(z=>L.add(z)),C(r._local,"_local").forEach(z=>L.add(z)),C(r._computed,"_computed").forEach(z=>L.add(z)),C(r._isolated,"_isolated").forEach(z=>L.add(z)),r.$parent&&C(r.$parent,"$parent").forEach(z=>L.add(z)),a(L)}g(!d)},[d,r,C]),A=Object.keys(r._global||{}).length,R=Object.keys(r._local||{}).length,N=Object.keys(r._computed||{}).length,D=Object.keys(r._isolated||{}).length,M=Object.keys(r.$parent||{}).length;return l.jsxs("div",{className:"g7dt-space-y-4",children:[l.jsxs("div",{className:"g7dt-flex g7dt-gap-2 g7dt-items-center g7dt-flex-shrink-0",children:[l.jsx("input",{type:"text",placeholder:"키 또는 값 검색...",value:i,onChange:L=>o(L.target.value),className:"g7dt-input g7dt-flex-1"}),l.jsx("button",{onClick:k,className:"g7dt-btn g7dt-bg-gray-700",children:d?"모두 접기":"모두 펼치기"})]}),l.jsxs("div",{className:"g7dt-flex g7dt-gap-3 g7dt-text-xs g7dt-text-gray g7dt-flex-wrap g7dt Line truncated
... (truncated)`:h}catch{return"(직렬화 불가)"}};return l.jsxs("div",{className:"g7dt-space-y-4",children:[e.activeRequests.length>0&&l.jsxs("div",{children:[l.jsxs("h3",{className:"g7dt-text-sm g7dt-font-bold g7dt-text-yellow g7dt-mb-2",children:["진행 중 (",e.activeRequests.length,")"]}),l.jsx("div",{className:"g7dt-space-y-1",children:e.activeRequests.map(d=>l.jsxs("details",{className:"g7dt-details",children:[l.jsxs("summary",{className:"g7dt-summary g7dt-pending-request",children:[l.jsx("span",{className:"g7dt-font-bold",children:d.method}),l.jsx("span",{className:"g7dt-ml-2 g7dt-text-lightgray g7dt-truncate",children:d.fullUrl||d.url})]}),l.jsxs("div",{className:"g7dt-card g7dt-mt-1 g7dt-text-xs",children:[a(d)&&l.jsxs("div",{className:"g7dt-mb-2",children:[l.jsx("div",{className:"g7dt-text-blue g7dt-font-bold g7dt-mb-1",children:"쿼리 파라미터"}),l.jsx("div",{className:"g7dt-pl-2 g7dt-border-l-2 g7dt-border-blue",children:i(d.queryParams)})]}),d.requestBody&&l.jsxs("div",{children:[l.jsx("div",{className:"g7dt-text-orange g7dt-font-bold g7dt-mb-1",children:"요청 본문"}),l.jsx("pre",{className:"g7dt-pre g7dt-text-xs",children:o(d.requestBody,2e3)})]})]})]},d.id))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"g7dt-text-sm g7dt-font-bold g7dt-mb-2",children:"요청 이력"}),l.jsx("div",{className:"g7dt-space-y-1 g7dt-scroll-list-lg",children:e.requestHistory.length===0?l.jsx("div",{className:"g7dt-empty-message",children:"요청 이력 없음"}):e.requestHistory.slice(-20).reverse().map(d=>l.jsxs("details",{className:"g7dt-details",children:[l.jsxs("summary",{className:"g7dt-summary g7dt-card g7dt-text-xs",children:[l.jsxs("div",{className:"g7dt-flex g7dt-justify-between g7dt-items-center g7dt-w-full",children:[l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-font-bold",children:d.method}),l.jsx("span",{className:`g7dt-ml-2 ${n(d.status)}`,children:d.statusCode||d.status})]}),l.jsxs("span",{className:"g7dt-text-gray",children:[d.duration,"ms"]})]}),l.jsx("div",{className:"g7dt-text-gray g7dt-truncate g7dt-mt-1",children:d.fullUrl||d.url})]}),l.jsxs("div",{className:"g7dt-card g7dt-mt-1 g7dt-text-xs g7dt-ml-2 g7dt-border-l-2 g7dt-border-gray",children:[l.jsx("div",{className:"g7dt-mb-2",children:l.jsxs("div",{className:"g7dt-text-xs g7dt-space-y-1",children:[l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"URL:"})," ",l.jsx("span",{className:"g7dt-text-lightgray",children:d.fullUrl||d.url})]}),l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"상태:"})," ",l.jsx("span",{className:n(d.status),children:d.statusCode||d.status})]}),l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"소요시간:"})," ",l.jsxs("span",{className:"g7dt-text-lightgray",children:[d.duration,"ms"]})]}),d.dataSourceId&&l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"데이터소스:"})," ",l.jsx("span",{className:"g7dt-text-blue",children:d.dataSourceId})]}),d.error&&l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"에러:"})," ",l.jsx("span",{className:"g7dt-text-red",children:d.error})]})]})}),a(d)&&l.jsxs("div",{className:"g7dt-mb-2",children:[l.jsx("div",{className:"g7dt-text-blue g7dt-font-bold g7dt-mb-1",children:"쿼리 파라미터"}),l.jsx("div",{className:"g7dt-pl-2 g7dt-border-l-2 g7dt-border-blue",children:i(d.queryParams)})]}),d.requestBody&&l.jsxs("div",{className:"g7dt-mb-2",children:[l.jsx("div",{className:"g7dt-text-orange g7dt-font-bold g7dt-mb-1",children:"요청 본문"}),l.jsx("pre",{className:"g7dt-pre g7dt-text-xs g7dt-max-h-40 g7dt-overflow-auto",children:o(d.requestBody,2e3)})]}),d.response!==void 0&&l.jsxs("div",{children:[l.jsx("div",{className:"g7dt-text-green g7dt-font-bold g7dt-mb-1",children:"응답 내용"}),l.jsx("pre",{className:"g7dt-pre g7dt-text-xs g7dt-max-h-60 g7dt-overflow-auto",children:o(d.response,5e3)})]})]})]},d.id))})]}),e.pendingDataSources.length>0&&l.jsxs("div",{children:[l.jsxs("h3",{className:"g7dt-text-sm g7dt-font-bold g7dt-text-blue g7dt-mb-2",children:["대기 중인 데이터소스 (",e.pendingDataSources.length,")"]}),l.jsx("div",{className:"g7dt-flex g7dt-flex-wrap g7dt-gap-2",children:e.pendingDataSources.map(d=>l.jsx("span",{className:"g7dt-tag-blue",children:d},d))})]})]})},fk=({devTools:r})=>{const e=r.getFormInfo(),[n,a]=j.useState(!1),[i,o]=j.useState(null),d=j.useCallback(()=>{o(r.getFormBindingValidationTrackingInfo())},[r]);j.useEffect(()=>{if(n){d();const f=setInterval(d,2e3);return()=>clearInterval(f)}},[n,d]);const g=f=>{switch(f){case"missing-datakey":return"🔑";case"missing-input-name":return"📝";case"context-not-propagated":return"🔗";case"sortable-context-break":return"📊";case"modal-context-isolation":return"🪟";case"duplicate-input-name":return"👯";case"value-type-mismatch":return"⚠️";case"binding-path-invalid":return"❌";default:return"❓"}},h=f=>{switch(f){case"error":return"g7dt- Line truncated
`),i=a.findIndex(d=>d.includes("api.setState"));if(i<0)return;const o=((e=a[i+1])==null?void 0:e.trim())||"";return(n=/.+ (.+) .+/.exec(o))==null?void 0:n[1]},PN=(r,e={})=>(n,a,i)=>{const{enabled:o,anonymousActionType:d,store:g,...h}=e;let f;try{f=(o??(Rx?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!f)return r(n,a,i);const{connection:p,...x}=IN(g,f,h);let y=!0;i.setState=((C,k,A)=>{const R=n(C,k);if(!y)return R;const N=A===void 0?{type:d||HN(new Error().stack)||"anonymous"}:typeof A=="string"?{type:A}:A;return g===void 0?(p?.send(N,a()),R):(p?.send({...N,type:`${g}/${N.type}`},{...sd(h.name),[g]:i.getState()}),R)}),i.devtools={cleanup:()=>{p&&typeof p.unsubscribe=="function"&&p.unsubscribe(),zN(h.name,g)}};const w=(...C)=>{const k=y;y=!1,n(...C),y=k},v=r(i.setState,a,i);if(x.type==="untracked"?p?.init(v):(x.stores[x.store]=i,p?.init(Object.fromEntries(Object.entries(x.stores).map(([C,k])=>[C,C===x.store?v:k.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let C=!1;const k=i.dispatch;i.dispatch=(...A)=>{(Rx?"production":void 0)!=="production"&&A[0].type==="__setState"&&!C&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),C=!0),k(...A)}}return p.subscribe(C=>{var k;switch(C.type){case"ACTION":if(typeof C.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ah(C.payload,A=>{if(A.type==="__setState"){if(g===void 0){w(A.state);return}Object.keys(A.state).length!==1&&console.error(`
`,ik=()=>{const r="g7-devtools-styles";if(document.getElementById(r))return;const e=document.createElement("style");e.id=r,e.textContent=rk,document.head.appendChild(e)},nx={state:"상태",actions:"액션",cache:"캐시",diagnose:"진단",performance:"성능",lifecycle:"라이프사이클",network:"네트워크",form:"Form",conditional:"조건부",expression:"표현식",handlers:"핸들러",events:"이벤트",datasources:"데이터소스",renders:"렌더링",styles:"스타일",auth:"인증",logs:"로그",layout:"레이아웃",changedetection:"변경감지",staleclosure:"Stale Closure",nestedcontext:"Context",modalscope:"모달스코프",namedactions:"Named Actions"},ok=700,lk=500,ax=400,sx=300,rx="g7-devtools-panel",Ug=r=>r===null||r===void 0?"g7dt-text-gray":typeof r=="string"?"g7dt-text-yellow":typeof r=="number"?"g7dt-text-cyan":typeof r=="boolean"?"g7dt-text-pink":Array.isArray(r)?"g7dt-text-orange":typeof r=="object"?"g7dt-text-blue":"g7dt-text-white",ck=r=>r===null?"null":r===void 0?"undefined":Array.isArray(r)?`Array(${r.length})`:typeof r=="object"?`Object(${Object.keys(r).length})`:typeof r,dk=r=>r===null?"null":r===void 0?"undefined":typeof r=="string"?r.length>50?`"${r.substring(0,50)}..."`:`"${r}"`:typeof r=="boolean"?r?"true":"false":typeof r=="number"?String(r):"",ix=()=>{try{const r=localStorage.getItem(rx);if(r)return JSON.parse(r)}catch(r){console.warn("[G7DevTools] 설정 로드 실패:",r)}return{}},ox=r=>{try{const t={...ix(),...r};localStorage.setItem(rx,JSON.stringify(t))}catch(e){console.warn("[G7DevTools] 설정 저장 실패:",e)}},hi=({keyName:r,value:e,path:t,expandedPaths:a,onToggle:i,searchTerm:o,depth:d=0})=>{const g=e!==null&&typeof e=="object",h=a.has(t),f=Array.isArray(e),p=o&&(r.toLowerCase().includes(o.toLowerCase())||typeof e=="string"&&e.toLowerCase().includes(o.toLowerCase())||typeof e=="number"&&String(e).includes(o)),y=S=>{S.stopPropagation(),g&&i(t)},x=g?Object.entries(e):[];return l.jsxs("div",{style:{marginLeft:d>0?"16px":"0"},children:[l.jsxs("div",{className:`g7dt-tree-node g7dt-flex g7dt-items-center g7dt-gap-1 ${p?"g7dt-ring-highlight":""}`,onClick:y,children:[g?l.jsx("span",{className:"g7dt-text-gray g7dt-w-4 g7dt-text-xs g7dt-select-none",style:{textAlign:"center"},children:h?"▼":"▶"}):l.jsx("span",{className:"g7dt-w-4"}),l.jsx("span",{className:"g7dt-text-purple g7dt-text-xs",children:r}),l.jsx("span",{className:"g7dt-text-gray-dark g7dt-text-xs",children:":"}),g?l.jsxs("span",{className:`g7dt-text-xs ${Ug(e)}`,children:[f?"[":"{",!h&&l.jsx("span",{className:"g7dt-text-gray",style:{margin:"0 4px"},children:ck(e)}),!h&&(f?"]":"}")]}):l.jsx("span",{className:`g7dt-text-xs ${Ug(e)}`,children:dk(e)}),!g&&l.jsxs("span",{className:"g7dt-text-gray-dark g7dt-text-xs g7dt-ml-1",children:["(",typeof e,")"]})]}),g&&h&&l.jsxs("div",{className:"g7dt-border-l",style:{marginLeft:"8px"},children:[x.map(([S,v])=>l.jsx(hi,{keyName:f?`[${S}]`:S,value:v,path:`${t}.${S}`,expandedPaths:a,onToggle:i,searchTerm:o,depth:d+1},`${t}.${S}`)),l.jsx("div",{className:"g7dt-ml-4 g7dt-text-xs",children:l.jsx("span",{className:Ug(e),children:f?"]":"}"})})]})]})},uk=({state:r,devTools:e})=>{const[t,a]=j.useState(new Set(["_global","_local","_computed","_isolated","$parent"])),[i,o]=j.useState(""),[d,g]=j.useState(!1),[h,f]=j.useState(!1),[p,y]=j.useState(null),x=j.useCallback(()=>{e&&y(e.getComputedDependencyTrackingInfo())},[e]);j.useEffect(()=>{if(h&&e){x();const M=setInterval(x,2e3);return()=>clearInterval(M)}},[h,e,x]);const S=M=>{switch(M){case"state-change":return"📊";case"prop-change":return"📥";case"dependency-change":return"🔗";case"manual":return"👆";case"initial":return"🚀";default:return"❓"}},v=j.useCallback(M=>{a(z=>{const K=new Set(z);return K.has(M)?K.delete(M):K.add(M),K})},[]),w=j.useCallback((M,z)=>{const K=[z];if(M!==null&&typeof M=="object")for(const[pe,we]of Object.entries(M))K.push(...w(we,`${z}.${pe}`));return K},[]),k=j.useCallback(()=>{if(d)a(new Set(["_global","_local","_computed","_isolated","$parent"]));else{const M=new Set;w(r._global,"_global").forEach(z=>M.add(z)),w(r._local,"_local").forEach(z=>M.add(z)),w(r._computed,"_computed").forEach(z=>M.add(z)),w(r._isolated,"_isolated").forEach(z=>M.add(z)),r.$parent&&w(r.$parent,"$parent").forEach(z=>M.add(z)),a(M)}g(!d)},[d,r,w]),A=Object.keys(r._global||{}).length,O=Object.keys(r._local||{}).length,N=Object.keys(r._computed||{}).length,D=Object.keys(r._isolated||{}).length,$=Object.keys(r.$parent||{}).length;return l.jsxs("div",{className:"g7dt-space-y-4",children:[l.jsxs("div",{className:"g7dt-flex g7dt-gap-2 g7dt-items-center g7dt-flex-shrink-0",children:[l.jsx("input",{type:"text",placeholder:"키 또는 값 검색...",value:i,onChange:M=>o(M.target.value),className:"g7dt-input g7dt-flex-1"}),l.jsx("button",{onClick:k,className:"g7dt-btn g7dt-bg-gray-700",children:d?"모두 접기":"모두 펼치기"})]}),l.jsxs("div",{className:"g7dt-flex g7dt-gap-3 g7dt-text-xs g7dt-text-gray g7dt-flex-wrap g7dt Line truncated
... (truncated)`:h}catch{return"(직렬화 불가)"}};return l.jsxs("div",{className:"g7dt-space-y-4",children:[e.activeRequests.length>0&&l.jsxs("div",{children:[l.jsxs("h3",{className:"g7dt-text-sm g7dt-font-bold g7dt-text-yellow g7dt-mb-2",children:["진행 중 (",e.activeRequests.length,")"]}),l.jsx("div",{className:"g7dt-space-y-1",children:e.activeRequests.map(d=>l.jsxs("details",{className:"g7dt-details",children:[l.jsxs("summary",{className:"g7dt-summary g7dt-pending-request",children:[l.jsx("span",{className:"g7dt-font-bold",children:d.method}),l.jsx("span",{className:"g7dt-ml-2 g7dt-text-lightgray g7dt-truncate",children:d.fullUrl||d.url})]}),l.jsxs("div",{className:"g7dt-card g7dt-mt-1 g7dt-text-xs",children:[a(d)&&l.jsxs("div",{className:"g7dt-mb-2",children:[l.jsx("div",{className:"g7dt-text-blue g7dt-font-bold g7dt-mb-1",children:"쿼리 파라미터"}),l.jsx("div",{className:"g7dt-pl-2 g7dt-border-l-2 g7dt-border-blue",children:i(d.queryParams)})]}),d.requestBody&&l.jsxs("div",{children:[l.jsx("div",{className:"g7dt-text-orange g7dt-font-bold g7dt-mb-1",children:"요청 본문"}),l.jsx("pre",{className:"g7dt-pre g7dt-text-xs",children:o(d.requestBody,2e3)})]})]})]},d.id))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"g7dt-text-sm g7dt-font-bold g7dt-mb-2",children:"요청 이력"}),l.jsx("div",{className:"g7dt-space-y-1 g7dt-scroll-list-lg",children:e.requestHistory.length===0?l.jsx("div",{className:"g7dt-empty-message",children:"요청 이력 없음"}):e.requestHistory.slice(-20).reverse().map(d=>l.jsxs("details",{className:"g7dt-details",children:[l.jsxs("summary",{className:"g7dt-summary g7dt-card g7dt-text-xs",children:[l.jsxs("div",{className:"g7dt-flex g7dt-justify-between g7dt-items-center g7dt-w-full",children:[l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-font-bold",children:d.method}),l.jsx("span",{className:`g7dt-ml-2 ${t(d.status)}`,children:d.statusCode||d.status})]}),l.jsxs("span",{className:"g7dt-text-gray",children:[d.duration,"ms"]})]}),l.jsx("div",{className:"g7dt-text-gray g7dt-truncate g7dt-mt-1",children:d.fullUrl||d.url})]}),l.jsxs("div",{className:"g7dt-card g7dt-mt-1 g7dt-text-xs g7dt-ml-2 g7dt-border-l-2 g7dt-border-gray",children:[l.jsx("div",{className:"g7dt-mb-2",children:l.jsxs("div",{className:"g7dt-text-xs g7dt-space-y-1",children:[l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"URL:"})," ",l.jsx("span",{className:"g7dt-text-lightgray",children:d.fullUrl||d.url})]}),l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"상태:"})," ",l.jsx("span",{className:t(d.status),children:d.statusCode||d.status})]}),l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"소요시간:"})," ",l.jsxs("span",{className:"g7dt-text-lightgray",children:[d.duration,"ms"]})]}),d.dataSourceId&&l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"데이터소스:"})," ",l.jsx("span",{className:"g7dt-text-blue",children:d.dataSourceId})]}),d.error&&l.jsxs("div",{children:[l.jsx("span",{className:"g7dt-text-gray",children:"에러:"})," ",l.jsx("span",{className:"g7dt-text-red",children:d.error})]})]})}),a(d)&&l.jsxs("div",{className:"g7dt-mb-2",children:[l.jsx("div",{className:"g7dt-text-blue g7dt-font-bold g7dt-mb-1",children:"쿼리 파라미터"}),l.jsx("div",{className:"g7dt-pl-2 g7dt-border-l-2 g7dt-border-blue",children:i(d.queryParams)})]}),d.requestBody&&l.jsxs("div",{className:"g7dt-mb-2",children:[l.jsx("div",{className:"g7dt-text-orange g7dt-font-bold g7dt-mb-1",children:"요청 본문"}),l.jsx("pre",{className:"g7dt-pre g7dt-text-xs g7dt-max-h-40 g7dt-overflow-auto",children:o(d.requestBody,2e3)})]}),d.response!==void 0&&l.jsxs("div",{children:[l.jsx("div",{className:"g7dt-text-green g7dt-font-bold g7dt-mb-1",children:"응답 내용"}),l.jsx("pre",{className:"g7dt-pre g7dt-text-xs g7dt-max-h-60 g7dt-overflow-auto",children:o(d.response,5e3)})]})]})]},d.id))})]}),e.pendingDataSources.length>0&&l.jsxs("div",{children:[l.jsxs("h3",{className:"g7dt-text-sm g7dt-font-bold g7dt-text-blue g7dt-mb-2",children:["대기 중인 데이터소스 (",e.pendingDataSources.length,")"]}),l.jsx("div",{className:"g7dt-flex g7dt-flex-wrap g7dt-gap-2",children:e.pendingDataSources.map(d=>l.jsx("span",{className:"g7dt-tag-blue",children:d},d))})]})]})},xk=({devTools:r})=>{const e=r.getFormInfo(),[t,a]=j.useState(!1),[i,o]=j.useState(null),d=j.useCallback(()=>{o(r.getFormBindingValidationTrackingInfo())},[r]);j.useEffect(()=>{if(t){d();const f=setInterval(d,2e3);return()=>clearInterval(f)}},[t,d]);const g=f=>{switch(f){case"missing-datakey":return"🔑";case"missing-input-name":return"📝";case"context-not-propagated":return"🔗";case"sortable-context-break":return"📊";case"modal-context-isolation":return"🪟";case"duplicate-input-name":return"👯";case"value-type-mismatch":return"⚠️";case"binding-path-invalid":return"❌";default:return"❓"}},h=f=>{switch(f){case"error":return"g7dt- Line truncated
`),i=a.findIndex(d=>d.includes("api.setState"));if(i<0)return;const o=((e=a[i+1])==null?void 0:e.trim())||"";return(t=/.+ (.+) .+/.exec(o))==null?void 0:t[1]},BN=(r,e={})=>(t,a,i)=>{const{enabled:o,anonymousActionType:d,store:g,...h}=e;let f;try{f=(o??(Lx?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!f)return r(t,a,i);const{connection:p,...y}=zN(g,f,h);let x=!0;i.setState=((w,k,A)=>{const O=t(w,k);if(!x)return O;const N=A===void 0?{type:d||PN(new Error().stack)||"anonymous"}:typeof A=="string"?{type:A}:A;return g===void 0?(p?.send(N,a()),O):(p?.send({...N,type:`${g}/${N.type}`},{...sd(h.name),[g]:i.getState()}),O)}),i.devtools={cleanup:()=>{p&&typeof p.unsubscribe=="function"&&p.unsubscribe(),HN(h.name,g)}};const S=(...w)=>{const k=x;x=!1,t(...w),x=k},v=r(i.setState,a,i);if(y.type==="untracked"?p?.init(v):(y.stores[y.store]=i,p?.init(Object.fromEntries(Object.entries(y.stores).map(([w,k])=>[w,w===y.store?v:k.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let w=!1;const k=i.dispatch;i.dispatch=(...A)=>{(Lx?"production":void 0)!=="production"&&A[0].type==="__setState"&&!w&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),w=!0),k(...A)}}return p.subscribe(w=>{var k;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ah(w.payload,A=>{if(A.type==="__setState"){if(g===void 0){S(A.state);return}Object.keys(A.state).length!==1&&console.error(`
[zustand devtools middleware] Unsupported __setState action format.
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
`);const R=A.state[g];if(R==null)return;JSON.stringify(i.getState())!==JSON.stringify(R)&&w(R);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(A)});case"DISPATCH":switch(C.payload.type){case"RESET":return w(v),g===void 0?p?.init(i.getState()):p?.init(sd(h.name));case"COMMIT":if(g===void 0){p?.init(i.getState());return}return p?.init(sd(h.name));case"ROLLBACK":return ah(C.state,A=>{if(g===void 0){w(A),p?.init(i.getState());return}w(A[g]),p?.init(sd(h.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ah(C.state,A=>{if(g===void 0){w(A);return}JSON.stringify(i.getState())!==JSON.stringify(A[g])&&w(A[g])});case"IMPORT_STATE":{const{nextLiftedState:A}=C.payload,R=(k=A.computedStates.slice(-1)[0])==null?void 0:k.state;if(!R)return;w(g===void 0?R:R[g]),p?.send(null,A);return}case"PAUSE_RECORDING":return y=!y}return}}),v},ah=(r,e)=>{let n;try{n=JSON.parse(r)}catch(a){console.error("[zustand devtools middleware] Could not parse the received json",a)}n!==void 0&&e(n)},UN={maxHistorySize:50};function Bo(r="component"){const e=Date.now().toString(36),n=Math.random().toString(36).substring(2,8);return`${r.toLowerCase().replace(/[^a-z0-9]/g,"_")}_${e}_${n}`}function sh(r,e){for(const n of r)if(typeof n!="string"&&(n.id===e||n.children&&sh(n.children,e)))return!0;return!1}function jr(r,e,n=null,a=[]){for(let i=0;i<r.length;i++){const o=r[i];if(typeof o!="string"){if(o.id===e)return{component:o,parentId:n,index:i,path:[...a,o.id]};if(o.children){const d=jr(o.children,e,o.id,[...a,o.id]);if(d)return d}}}return null}function qo(r,e,n,a){return n?r.map(i=>{if(typeof i=="string")return i;if(i.id===n)switch(a){case"before":return i;case"after":return i;case"inside":case"last-child":return{...i,children:[...i.children||[],e]};case"first-child":return{...i,children:[e,...i.children||[]]};default:return i}if(i.children){const o=[];for(let h=0;h<i.children.length;h++){const f=i.children[h];typeof f!="string"&&f.id===n?a==="before"?(o.push(e),o.push(f)):a==="after"?(o.push(f),o.push(e)):o.push(f):o.push(f)}const d=qo(o,e,n,a);if(JSON.stringify(d)!==JSON.stringify(i.children))return{...i,children:d}}return i}):[...r,e]}function rd(r,e){return r.filter(n=>typeof n=="string"?!0:n.id!==e).map(n=>typeof n=="string"?n:n.children?{...n,children:rd(n.children,e)}:n)}function id(r,e,n){return r.map(a=>{if(typeof a=="string")return a;if(a.id===e){const i=n.props?{...a.props,...n.props}:a.props;return{...a,...n,props:i}}return a.children?{...a,children:id(a.children,e,n)}:a})}function od(r,e,n,a){const i=jr(r,e);if(!i||e===n||BN(r,e,n))return r;const o=i.component,d=rd(r,e);return qo(d,o,n,a)}function BN(r,e,n){const a=jr(r,e);if(!a)return!1;const i=a.component;return i.children?sh(i.children,n):!1}function rh(r){const e={...r,id:Bo(r.name),props:r.props?{...r.props}:void 0,data_binding:r.data_binding?{...r.data_binding}:void 0,style:r.style?{...r.style}:void 0,actions:r.actions?JSON.parse(JSON.stringify(r.actions)):void 0,iteration:r.iteration?{...r.iteration}:void 0,lifecycle:r.lifecycle?JSON.parse(JSON.stringify(r.lifecycle)):void 0,responsive:r.responsive?JSON.parse(JSON.stringify(r.responsive)):void 0};return r.children&&(e.children=r.children.map(n=>typeof n=="string"?n:rh(n))),e}function Ox(r,e){const n=jr(r,e);if(!n)return null;const a=rh(n.component);return{components:qo(r,a,e,"after"),newId:a.id}}function ih(r,e){if(!e)return null;const n=e.split(".");let a=r;for(let i=0;i<n.length;i++){const o=n[i];if(o==="children")if(typeof a=="object"&&!Array.isArray(a)&&a.children)a=a.children;else return null;else{const d=parseInt(o,10);if(isNaN(d))return null;if(Array.isArray(a)){const g=a[d];if(!g||typeof g=="string")return null;a=g}else return null}}return typeof a=="object"&&!Array.isArray(a)&&"name"in a?a:null}function Go(r,e){const n=ih(r,e);if(!n)return null;if(n.id)return{components:r,id:n.id};const a=Bo(n.name);return{components:Lx(r,e,{id:a}),id:a}}function Lx(r,e,n){if(!e)return r;const a=e.split(".");function i(o,d){const g=a[d],h=parseInt(g,10);if(isNaN(h)||h<0||h>=o.length)return o;const f=o[h];if(typeof f=="string")return o;if(d===a.length-1){const x={...f,...n,props:n.props?{...f.props,...n.props}:f.props};return[...o.slice(0,h),x,...o.slice(h+1)]}if(a[d+1]==="children"&&f.children){const x=i(f.children,d+2),y={...f,children:x};return[...o.slice(0,h),y,...o.slice(h+1)]}return o}return i(r,0)}const vt=at("EditorState"),qN={layoutData:null,originalLayoutData:null,templateId:null,templateType:null,layoutName:null,selectedComponentId:null,hoveredComponentId:null,multiSelectedIds:[],editMode:"visual",previewDevice:"desktop",customWidth:1024,previewDarkMode:!1,loadingState:"idle",error:null,history:[],historyIndex:-1,maxHistorySize:UN.maxHistorySize,componentCategories:null,handlers:[],mockDataContext:{},versions:[],currentVersionId:null,inheritanceInfo:null,overlays:[],extensionPoints:[],activePropertyTab:"props",expandedTreeNodes:[],clipboard:null,draggingComponent:null,dropTargetI Line truncated
${n?"opacity-50 cursor-not-allowed":"hover:bg-gray-100 dark:hover:bg-gray-700"}
`);const O=A.state[g];if(O==null)return;JSON.stringify(i.getState())!==JSON.stringify(O)&&S(O);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(A)});case"DISPATCH":switch(w.payload.type){case"RESET":return S(v),g===void 0?p?.init(i.getState()):p?.init(sd(h.name));case"COMMIT":if(g===void 0){p?.init(i.getState());return}return p?.init(sd(h.name));case"ROLLBACK":return ah(w.state,A=>{if(g===void 0){S(A),p?.init(i.getState());return}S(A[g]),p?.init(sd(h.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ah(w.state,A=>{if(g===void 0){S(A);return}JSON.stringify(i.getState())!==JSON.stringify(A[g])&&S(A[g])});case"IMPORT_STATE":{const{nextLiftedState:A}=w.payload,O=(k=A.computedStates.slice(-1)[0])==null?void 0:k.state;if(!O)return;S(g===void 0?O:O[g]),p?.send(null,A);return}case"PAUSE_RECORDING":return x=!x}return}}),v},ah=(r,e)=>{let t;try{t=JSON.parse(r)}catch(a){console.error("[zustand devtools middleware] Could not parse the received json",a)}t!==void 0&&e(t)},UN={maxHistorySize:50};function qo(r="component"){const e=Date.now().toString(36),t=Math.random().toString(36).substring(2,8);return`${r.toLowerCase().replace(/[^a-z0-9]/g,"_")}_${e}_${t}`}function sh(r,e){for(const t of r)if(typeof t!="string"&&(t.id===e||t.children&&sh(t.children,e)))return!0;return!1}function jr(r,e,t=null,a=[]){for(let i=0;i<r.length;i++){const o=r[i];if(typeof o!="string"){if(o.id===e)return{component:o,parentId:t,index:i,path:[...a,o.id]};if(o.children){const d=jr(o.children,e,o.id,[...a,o.id]);if(d)return d}}}return null}function Go(r,e,t,a){return t?r.map(i=>{if(typeof i=="string")return i;if(i.id===t)switch(a){case"before":return i;case"after":return i;case"inside":case"last-child":return{...i,children:[...i.children||[],e]};case"first-child":return{...i,children:[e,...i.children||[]]};default:return i}if(i.children){const o=[];for(let h=0;h<i.children.length;h++){const f=i.children[h];typeof f!="string"&&f.id===t?a==="before"?(o.push(e),o.push(f)):a==="after"?(o.push(f),o.push(e)):o.push(f):o.push(f)}const d=Go(o,e,t,a);if(JSON.stringify(d)!==JSON.stringify(i.children))return{...i,children:d}}return i}):[...r,e]}function rd(r,e){return r.filter(t=>typeof t=="string"?!0:t.id!==e).map(t=>typeof t=="string"?t:t.children?{...t,children:rd(t.children,e)}:t)}function id(r,e,t){return r.map(a=>{if(typeof a=="string")return a;if(a.id===e){const i=t.props?{...a.props,...t.props}:a.props;return{...a,...t,props:i}}return a.children?{...a,children:id(a.children,e,t)}:a})}function od(r,e,t,a){const i=jr(r,e);if(!i||e===t||qN(r,e,t))return r;const o=i.component,d=rd(r,e);return Go(d,o,t,a)}function qN(r,e,t){const a=jr(r,e);if(!a)return!1;const i=a.component;return i.children?sh(i.children,t):!1}function rh(r){const e={...r,id:qo(r.name),props:r.props?{...r.props}:void 0,data_binding:r.data_binding?{...r.data_binding}:void 0,style:r.style?{...r.style}:void 0,actions:r.actions?JSON.parse(JSON.stringify(r.actions)):void 0,iteration:r.iteration?{...r.iteration}:void 0,lifecycle:r.lifecycle?JSON.parse(JSON.stringify(r.lifecycle)):void 0,responsive:r.responsive?JSON.parse(JSON.stringify(r.responsive)):void 0};return r.children&&(e.children=r.children.map(t=>typeof t=="string"?t:rh(t))),e}function Mx(r,e){const t=jr(r,e);if(!t)return null;const a=rh(t.component);return{components:Go(r,a,e,"after"),newId:a.id}}function ih(r,e){if(!e)return null;const t=e.split(".");let a=r;for(let i=0;i<t.length;i++){const o=t[i];if(o==="children")if(typeof a=="object"&&!Array.isArray(a)&&a.children)a=a.children;else return null;else{const d=parseInt(o,10);if(isNaN(d))return null;if(Array.isArray(a)){const g=a[d];if(!g||typeof g=="string")return null;a=g}else return null}}return typeof a=="object"&&!Array.isArray(a)&&"name"in a?a:null}function Fo(r,e){const t=ih(r,e);if(!t)return null;if(t.id)return{components:r,id:t.id};const a=qo(t.name);return{components:$x(r,e,{id:a}),id:a}}function $x(r,e,t){if(!e)return r;const a=e.split(".");function i(o,d){const g=a[d],h=parseInt(g,10);if(isNaN(h)||h<0||h>=o.length)return o;const f=o[h];if(typeof f=="string")return o;if(d===a.length-1){const y={...f,...t,props:t.props?{...f.props,...t.props}:f.props};return[...o.slice(0,h),y,...o.slice(h+1)]}if(a[d+1]==="children"&&f.children){const y=i(f.children,d+2),x={...f,children:y};return[...o.slice(0,h),x,...o.slice(h+1)]}return o}return i(r,0)}const St=it("EditorState"),GN={layoutData:null,originalLayoutData:null,templateId:null,templateType:null,layoutName:null,selectedComponentId:null,hoveredComponentId:null,multiSelectedIds:[],editMode:"visual",previewDevice:"desktop",customWidth:1024,previewDarkMode:!1,loadingState:"idle",error:null,history:[],historyIndex:-1,maxHistorySize:UN.maxHistorySize,componentCategories:null,handlers:[],mockDataContext:{},versions:[],currentVersionId:null,inheritanceInfo:null,overlays:[],extensionPoints:[],activePropertyTab:"props",expandedTreeNodes:[],clipboard:null,draggingComponent:null,dropTargetI Line truncated
${t?"opacity-50 cursor-not-allowed":"hover:bg-gray-100 dark:hover:bg-gray-700"}
${z?"bg-blue-50 dark:bg-blue-900/30":""}
`,style:{paddingLeft:`${8+L*16}px`},children:[l.jsx("input",{type:"checkbox",checked:z,onChange:()=>v(M.identifier),disabled:n,className:"w-4 h-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),l.jsxs("span",{className:"flex-1 text-sm text-gray-900 dark:text-gray-100",children:[M.name,l.jsxs("span",{className:"ml-2 text-xs text-gray-500 dark:text-gray-400",children:["(",M.identifier,")"]})]})]}),Y&&M.children?.map(he=>N(he,L+1))]},M.identifier)};if(d)return l.jsxs("div",{className:"p-4 text-center text-sm text-gray-500 dark:text-gray-400",children:[l.jsx("span",{className:"inline-block animate-spin mr-2",children:"⏳"}),"권한 목록 로딩 중..."]});if(h)return l.jsx("div",{className:"p-4 text-center text-sm text-red-500 dark:text-red-400",children:h});const D=Object.entries(i);return l.jsxs("div",{className:"border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 overflow-hidden",children:[l.jsxs("div",{className:"p-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsxs("span",{className:"text-xs font-medium text-gray-700 dark:text-gray-300",children:["선택된 권한: ",l.jsxs("span",{className:"text-blue-600 dark:text-blue-400",children:[r.length,"개"]}),r.length===0&&l.jsx("span",{className:"text-gray-500 ml-1",children:"(공개 레이아웃)"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{type:"button",onClick:k,disabled:n,className:"text-xs text-blue-600 dark:text-blue-400 hover:underline disabled:opacity-50",children:"전체 선택"}),l.jsx("button",{type:"button",onClick:A,disabled:n||r.length===0,className:"text-xs text-red-600 dark:text-red-400 hover:underline disabled:opacity-50",children:"전체 해제"})]})]}),l.jsx("input",{type:"text",value:y,onChange:M=>w(M.target.value),placeholder:"권한 검색...",className:"w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),l.jsx("div",{className:"max-h-64 overflow-y-auto",children:D.length===0?l.jsx("div",{className:"p-4 text-center text-sm text-gray-500 dark:text-gray-400",children:"권한이 없습니다"}):D.map(([M,L])=>{const z=R(L.permissions||[]);if(y&&z.length===0)return null;const Y=p.has(M);return l.jsxs("div",{className:"border-b border-gray-100 dark:border-gray-800 last:border-b-0",children:[l.jsxs("button",{type:"button",onClick:()=>C(M),className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[l.jsx("span",{className:"text-gray-400",children:Y?"▼":"▶"}),l.jsx("span",{children:L.label}),l.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-auto",children:[z.length,"개"]})]}),Y&&l.jsx("div",{className:"pb-2",children:z.map(he=>N(he))})]},M)})}),r.length>0&&l.jsxs("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900",children:[l.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:"선택됨:"}),l.jsxs("div",{className:"flex flex-wrap gap-1",children:[r.slice(0,5).map(M=>l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs bg-blue-100 dark:bg-blue-900/50 text-blue-700 dark:text-blue-300 rounded",title:M,children:[M,l.jsx("button",{type:"button",onClick:()=>v(M),disabled:n,className:"hover:text-red-500",children:"×"})]},M)),r.length>5&&l.jsxs("span",{className:"text-xs text-gray-500",children:["+",r.length-5,"개 더..."]})]})]}),l.jsx("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 text-xs text-gray-500 dark:text-gray-400",children:"권한을 선택하지 않으면 공개 레이아웃이 됩니다. 선택된 권한은 AND 조건으로 적용됩니다."})]})},ZN=at("LayoutSettingsModal");function eE({isOpen:r,onClose:e}){const n=Se(y=>y.layoutData),a=Se(y=>y.updateLayoutMeta),i=Se(y=>y.pushHistory),[o,d]=j.useState([]),[g,h]=j.useState(!1);j.useEffect(()=>{n&&r&&(d(n.permissions||[]),h(!1))},[n,r]);const f=j.useCallback(y=>{d(y),h(!0)},[]),p=j.useCallback(()=>{n&&(ZN.log("Saving layout permissions:",o),i("레이아웃 권한 변경"),a({permissions:o}),h(!1),e())},[n,o,i,a,e]),x=j.useCallback(()=>{g&&!window.confirm("변경사항이 저장되지 않습니다. 정말 닫으시겠습니까?")||e()},[g,e]);return r?l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[l.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:x}),l.jsxs("div",{className:"relative w-full max-w-2xl mx-4 bg-white dark:bg-gray-800 rounded-lg shadow-xl max-h-[90vh] flex flex-col",children:[l.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold Line truncated
`,style:{paddingLeft:`${8+M*16}px`},children:[l.jsx("input",{type:"checkbox",checked:z,onChange:()=>v($.identifier),disabled:t,className:"w-4 h-4 rounded border-gray-300 dark:border-gray-600 text-blue-600 focus:ring-blue-500"}),l.jsxs("span",{className:"flex-1 text-sm text-gray-900 dark:text-gray-100",children:[$.name,l.jsxs("span",{className:"ml-2 text-xs text-gray-500 dark:text-gray-400",children:["(",$.identifier,")"]})]})]}),K&&$.children?.map(pe=>N(pe,M+1))]},$.identifier)};if(d)return l.jsxs("div",{className:"p-4 text-center text-sm text-gray-500 dark:text-gray-400",children:[l.jsx("span",{className:"inline-block animate-spin mr-2",children:"⏳"}),"권한 목록 로딩 중..."]});if(h)return l.jsx("div",{className:"p-4 text-center text-sm text-red-500 dark:text-red-400",children:h});const D=Object.entries(i);return l.jsxs("div",{className:"border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 overflow-hidden",children:[l.jsxs("div",{className:"p-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsxs("span",{className:"text-xs font-medium text-gray-700 dark:text-gray-300",children:["선택된 권한: ",l.jsxs("span",{className:"text-blue-600 dark:text-blue-400",children:[r.length,"개"]}),r.length===0&&l.jsx("span",{className:"text-gray-500 ml-1",children:"(공개 레이아웃)"})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{type:"button",onClick:k,disabled:t,className:"text-xs text-blue-600 dark:text-blue-400 hover:underline disabled:opacity-50",children:"전체 선택"}),l.jsx("button",{type:"button",onClick:A,disabled:t||r.length===0,className:"text-xs text-red-600 dark:text-red-400 hover:underline disabled:opacity-50",children:"전체 해제"})]})]}),l.jsx("input",{type:"text",value:x,onChange:$=>S($.target.value),placeholder:"권한 검색...",className:"w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white"})]}),l.jsx("div",{className:"max-h-64 overflow-y-auto",children:D.length===0?l.jsx("div",{className:"p-4 text-center text-sm text-gray-500 dark:text-gray-400",children:"권한이 없습니다"}):D.map(([$,M])=>{const z=O(M.permissions||[]);if(x&&z.length===0)return null;const K=p.has($);return l.jsxs("div",{className:"border-b border-gray-100 dark:border-gray-800 last:border-b-0",children:[l.jsxs("button",{type:"button",onClick:()=>w($),className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors",children:[l.jsx("span",{className:"text-gray-400",children:K?"▼":"▶"}),l.jsx("span",{children:M.label}),l.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-auto",children:[z.length,"개"]})]}),K&&l.jsx("div",{className:"pb-2",children:z.map(pe=>N(pe))})]},$)})}),r.length>0&&l.jsxs("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900",children:[l.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 mb-1",children:"선택됨:"}),l.jsxs("div",{className:"flex flex-wrap gap-1",children:[r.slice(0,5).map($=>l.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs bg-blue-100 dark:bg-blue-900/50 text-blue-700 dark:text-blue-300 rounded",title:$,children:[$,l.jsx("button",{type:"button",onClick:()=>v($),disabled:t,className:"hover:text-red-500",children:"×"})]},$)),r.length>5&&l.jsxs("span",{className:"text-xs text-gray-500",children:["+",r.length-5,"개 더..."]})]})]}),l.jsx("div",{className:"p-2 border-t border-gray-200 dark:border-gray-700 text-xs text-gray-500 dark:text-gray-400",children:"권한을 선택하지 않으면 공개 레이아웃이 됩니다. 선택된 권한은 AND 조건으로 적용됩니다."})]})},eE=it("LayoutSettingsModal");function tE({isOpen:r,onClose:e}){const t=Se(x=>x.layoutData),a=Se(x=>x.updateLayoutMeta),i=Se(x=>x.pushHistory),[o,d]=j.useState([]),[g,h]=j.useState(!1);j.useEffect(()=>{t&&r&&(d(t.permissions||[]),h(!1))},[t,r]);const f=j.useCallback(x=>{d(x),h(!0)},[]),p=j.useCallback(()=>{t&&(eE.log("Saving layout permissions:",o),i("레이아웃 권한 변경"),a({permissions:o}),h(!1),e())},[t,o,i,a,e]),y=j.useCallback(()=>{g&&!window.confirm("변경사항이 저장되지 않습니다. 정말 닫으시겠습니까?")||e()},[g,e]);return r?l.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[l.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:y}),l.jsxs("div",{className:"relative w-full max-w-2xl mx-4 bg-white dark:bg-gray-800 rounded-lg shadow-xl max-h-[90vh] flex flex-col",children:[l.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold Line truncated
"$switch": "{{status}}",
"$cases": {
"active": "text-green-500",
@@ -1867,5 +1867,5 @@ details[open] > .g7dt-summary::before {
// 사용
{{$computed.displayPrice}}
{{$computed.canEdit}}`})]})]})]}),l.jsxs("div",{children:[l.jsx(ud,{title:"Raw JSON",isExpanded:n.rawJson,onToggle:()=>i("rawJson")}),n.rawJson&&l.jsx("div",{className:"mt-3",children:l.jsx("pre",{className:"p-3 bg-gray-50 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 text-xs text-gray-600 dark:text-gray-400 overflow-auto max-h-96",children:JSON.stringify(r,null,2)})})]})]})}const qE=[{id:"props",label:"Props",icon:"⚙️",description:"기본 속성 편집"},{id:"bindings",label:"Bindings",icon:"🔗",description:"데이터 바인딩 설정"},{id:"actions",label:"Actions",icon:"⚡",description:"이벤트 핸들러 설정"},{id:"conditions",label:"Conditions",icon:"🔀",description:"조건부/반복 렌더링"},{id:"responsive",label:"Responsive",icon:"📱",description:"반응형 오버라이드"},{id:"advanced",label:"Advanced",icon:"🔧",description:"고급 설정"}];function GE({tab:r,isActive:e,onClick:n}){return l.jsxs("button",{className:`flex items-center gap-1 px-3 py-2 text-sm font-medium border-b-2 transition-colors ${e?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600"}`,onClick:n,title:r.description,children:[l.jsx("span",{children:r.icon}),l.jsx("span",{className:"hidden lg:inline",children:r.label})]})}function FE(){return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-gray-500 dark:text-gray-400",children:[l.jsx("div",{className:"text-4xl mb-4",children:"👆"}),l.jsx("h3",{className:"text-lg font-medium mb-2",children:"컴포넌트를 선택하세요"}),l.jsx("p",{className:"text-sm text-center",children:"편집할 컴포넌트를 미리보기 캔버스 또는 레이아웃 트리에서 클릭하세요."})]})}function VE({component:r}){const{getMetadata:e}=Fo(),n=e(r.name);return l.jsxs("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-lg",children:r.type==="basic"?"📦":r.type==="composite"?"🧩":r.type==="layout"?"📐":"🔌"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white truncate",children:r.name}),l.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:["ID: ",r.id]})]}),l.jsx("span",{className:`px-2 py-0.5 text-xs rounded ${r.type==="basic"?"bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300":r.type==="composite"?"bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300":r.type==="layout"?"bg-orange-100 dark:bg-orange-900 text-orange-700 dark:text-orange-300":"bg-purple-100 dark:bg-purple-900 text-purple-700 dark:text-purple-300"}`,children:r.type})]}),n?.description&&l.jsx("p",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:n.description})]})}function Wx({className:r=""}){const[e,n]=j.useState("props"),a=Se(p=>p.layoutData),i=Se(p=>p.selectedComponentId),o=Se(p=>p.updateComponentProps),d=Se(p=>p.updateComponent),g=j.useMemo(()=>{if(!a||!i)return null;const p=x=>{for(const y of x)if(typeof y!="string"){if(y.id===i)return y;if(y.children){const w=p(y.children);if(w)return w}}return null};return p(a.components)},[a,i]),h=j.useCallback(p=>{!i||!g||(Object.keys(p).length===1&&p.props?o(i,p.props):d(i,p))},[i,g,o,d]);if(!g)return l.jsx("div",{className:`h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-gray-700 ${r}`,children:l.jsx(FE,{})});const f=()=>{switch(e){case"props":return l.jsx(Gx,{component:g,onChange:h});case"bindings":return l.jsx(_E,{component:g,onChange:h});case"actions":return l.jsx(DE,{component:g,onChange:h});case"conditions":return l.jsx(ME,{component:g,onChange:h});case"responsive":return l.jsx(HE,{component:g,onChange:h});case"advanced":return l.jsx(BE,{component:g,onChange:h});default:return null}};return l.jsxs("div",{className:`flex flex-col h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-gray-700 ${r}`,children:[l.jsx(VE,{component:g}),l.jsx("div",{className:"flex border-b border-gray-200 dark:border-gray-700 overflow-x-auto",children:qE.map(p=>l.jsx(GE,{tab:p,isActive:e===p.id,onClick:()=>n(p.id)},p.id))}),l.jsx("div",{className:"flex-1 overflow-auto",children:f()})]})}const Vo=at("EditorOverlay");function KE({rect:r,componentId:e,onCopy:n,onDuplicate:a,onDelete:i,onMoveUp:o,onMoveDown:d}){const g=Math.max(0,r.top-36),h=window.innerWidth-r.right;return l.jsxs("div",{className:"fixed z-50 flex items-center gap-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg px-1 py-1",style:{top:g,right:Math.max(8,h)},onClick:f=>f.stopPropagation(),children:[l.jsx("button",{className:"p-1.5 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hov Line truncated
{{$computed.canEdit}}`})]})]})]}),l.jsxs("div",{children:[l.jsx(ud,{title:"Raw JSON",isExpanded:t.rawJson,onToggle:()=>i("rawJson")}),t.rawJson&&l.jsx("div",{className:"mt-3",children:l.jsx("pre",{className:"p-3 bg-gray-50 dark:bg-gray-800 rounded border border-gray-200 dark:border-gray-700 text-xs text-gray-600 dark:text-gray-400 overflow-auto max-h-96",children:JSON.stringify(r,null,2)})})]})]})}const GE=[{id:"props",label:"Props",icon:"⚙️",description:"기본 속성 편집"},{id:"bindings",label:"Bindings",icon:"🔗",description:"데이터 바인딩 설정"},{id:"actions",label:"Actions",icon:"⚡",description:"이벤트 핸들러 설정"},{id:"conditions",label:"Conditions",icon:"🔀",description:"조건부/반복 렌더링"},{id:"responsive",label:"Responsive",icon:"📱",description:"반응형 오버라이드"},{id:"advanced",label:"Advanced",icon:"🔧",description:"고급 설정"}];function FE({tab:r,isActive:e,onClick:t}){return l.jsxs("button",{className:`flex items-center gap-1 px-3 py-2 text-sm font-medium border-b-2 transition-colors ${e?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600"}`,onClick:t,title:r.description,children:[l.jsx("span",{children:r.icon}),l.jsx("span",{className:"hidden lg:inline",children:r.label})]})}function VE(){return l.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-gray-500 dark:text-gray-400",children:[l.jsx("div",{className:"text-4xl mb-4",children:"👆"}),l.jsx("h3",{className:"text-lg font-medium mb-2",children:"컴포넌트를 선택하세요"}),l.jsx("p",{className:"text-sm text-center",children:"편집할 컴포넌트를 미리보기 캔버스 또는 레이아웃 트리에서 클릭하세요."})]})}function KE({component:r}){const{getMetadata:e}=Vo(),t=e(r.name);return l.jsxs("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-lg",children:r.type==="basic"?"📦":r.type==="composite"?"🧩":r.type==="layout"?"📐":"🔌"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white truncate",children:r.name}),l.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate",children:["ID: ",r.id]})]}),l.jsx("span",{className:`px-2 py-0.5 text-xs rounded ${r.type==="basic"?"bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300":r.type==="composite"?"bg-green-100 dark:bg-green-900 text-green-700 dark:text-green-300":r.type==="layout"?"bg-orange-100 dark:bg-orange-900 text-orange-700 dark:text-orange-300":"bg-purple-100 dark:bg-purple-900 text-purple-700 dark:text-purple-300"}`,children:r.type})]}),t?.description&&l.jsx("p",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:t.description})]})}function Jx({className:r=""}){const[e,t]=j.useState("props"),a=Se(p=>p.layoutData),i=Se(p=>p.selectedComponentId),o=Se(p=>p.updateComponentProps),d=Se(p=>p.updateComponent),g=j.useMemo(()=>{if(!a||!i)return null;const p=y=>{for(const x of y)if(typeof x!="string"){if(x.id===i)return x;if(x.children){const S=p(x.children);if(S)return S}}return null};return p(a.components)},[a,i]),h=j.useCallback(p=>{!i||!g||(Object.keys(p).length===1&&p.props?o(i,p.props):d(i,p))},[i,g,o,d]);if(!g)return l.jsx("div",{className:`h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-gray-700 ${r}`,children:l.jsx(VE,{})});const f=()=>{switch(e){case"props":return l.jsx(Vx,{component:g,onChange:h});case"bindings":return l.jsx(AE,{component:g,onChange:h});case"actions":return l.jsx(RE,{component:g,onChange:h});case"conditions":return l.jsx($E,{component:g,onChange:h});case"responsive":return l.jsx(PE,{component:g,onChange:h});case"advanced":return l.jsx(qE,{component:g,onChange:h});default:return null}};return l.jsxs("div",{className:`flex flex-col h-full bg-white dark:bg-gray-900 border-l border-gray-200 dark:border-gray-700 ${r}`,children:[l.jsx(KE,{component:g}),l.jsx("div",{className:"flex border-b border-gray-200 dark:border-gray-700 overflow-x-auto",children:GE.map(p=>l.jsx(FE,{tab:p,isActive:e===p.id,onClick:()=>t(p.id)},p.id))}),l.jsx("div",{className:"flex-1 overflow-auto",children:f()})]})}const Ko=it("EditorOverlay");function WE({rect:r,componentId:e,onCopy:t,onDuplicate:a,onDelete:i,onMoveUp:o,onMoveDown:d}){const g=Math.max(0,r.top-36),h=window.innerWidth-r.right;return l.jsxs("div",{className:"fixed z-50 flex items-center gap-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg px-1 py-1",style:{top:g,right:Math.max(8,h)},onClick:f=>f.stopPropagation(),children:[l.jsx("button",{className:"p-1.5 text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 hover:bg-gray-100 dark:hov Line truncated
//# sourceMappingURL=template-engine.min.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"template-engine.min.js","sources":["../../../node_modules/react/cjs/react.production.js","../../../node_modules/react/index.js","../../../node_modules/scheduler/cjs/scheduler.production.js","../../../node_modules/scheduler/index.js","../../../node_modules/react-dom/cjs/react-dom.production.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/cjs/react-dom-client.production.js","../../../node_modules/react-dom/client.js","../../../resources/js/core/utils/Logger.ts","../../../resources/js/core/template-engine/ComponentRegistry.ts","../../../resources/js/core/template-engine/TranslationEngine.ts","../../../resources/js/core/template-engine/PipeRegistry.ts","../../../resources/js/core/template-engine/rawMarkers.ts","../../../resources/js/core/template-engine/DataBindingEngine.ts","../../../resources/js/core/template-engine/ResponsiveManager.ts","../../../resources/js/core/template-engine/helpers/ConditionEvaluator.ts","../../../resources/js/core/template-engine/helpers/RenderHelpers.ts","../../../node_modules/axios/lib/helpers/bind.js","../../../node_modules/axios/lib/utils.js","../../../node_modules/axios/lib/core/AxiosError.js","../../../node_modules/axios/lib/helpers/null.js","../../../node_modules/axios/lib/helpers/toFormData.js","../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../node_modules/axios/lib/helpers/buildURL.js","../../../node_modules/axios/lib/core/InterceptorManager.js","../../../node_modules/axios/lib/defaults/transitional.js","../../../node_modules/axios/lib/platform/browser/index.js","../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../../node_modules/axios/lib/platform/common/utils.js","../../../node_modules/axios/lib/platform/index.js","../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../node_modules/axios/lib/defaults/index.js","../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../node_modules/axios/lib/core/AxiosHeaders.js","../../../node_modules/axios/lib/core/transformData.js","../../../node_modules/axios/lib/cancel/isCancel.js","../../../node_modules/axios/lib/cancel/CanceledError.js","../../../node_modules/axios/lib/core/settle.js","../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../node_modules/axios/lib/helpers/speedometer.js","../../../node_modules/axios/lib/helpers/throttle.js","../../../node_modules/axios/lib/helpers/progressEventReducer.js","../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../node_modules/axios/lib/helpers/cookies.js","../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../node_modules/axios/lib/helpers/combineURLs.js","../../../node_modules/axios/lib/core/buildFullPath.js","../../../node_modules/axios/lib/core/mergeConfig.js","../../../node_modules/axios/lib/helpers/resolveConfig.js","../../../node_modules/axios/lib/adapters/xhr.js","../../../node_modules/axios/lib/helpers/composeSignals.js","../../../node_modules/axios/lib/helpers/trackStream.js","../../../node_modules/axios/lib/adapters/fetch.js","../../../node_modules/axios/lib/adapters/adapters.js","../../../node_modules/axios/lib/core/dispatchRequest.js","../../../node_modules/axios/lib/env/data.js","../../../node_modules/axios/lib/helpers/validator.js","../../../node_modules/axios/lib/core/Axios.js","../../../node_modules/axios/lib/cancel/CancelToken.js","../../../node_modules/axios/lib/helpers/spread.js","../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../../node_modules/axios/lib/axios.js","../../../node_modules/axios/index.js","../../../resources/js/core/api/ApiClient.ts","../../../resources/js/core/auth/AuthManager.ts","../../../resources/js/core/types/ErrorHandling.ts","../../../resources/js/core/error/ErrorHandlingResolver.ts","../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/jsx-runtime.js","../../../resources/js/core/template-engine/ParentContextProvider.tsx","../../../resources/js/core/template-engine/ActionDispatcher.ts","../../../resources/js/core/template-engine/TransitionManager.ts","../../../resources/js/core/template-engine/TransitionContext.tsx","../../../resources/js/core/template-engine/ResponsiveContext.tsx","../../../resources/js/core/template-engine/FormContext.tsx","../../../resources/js/core/template-engine/IsolatedStateContext.tsx","../../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../../node_modules/@dnd-kit/core/dist/core.esm.js","../../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../../resources/js/core/template-engine/sortable/SortableContainer.tsx","../../../resources/js/core/teLine truncated
{"version":3,"file":"template-engine.min.js","sources":["../../../node_modules/react/cjs/react.production.js","../../../node_modules/react/index.js","../../../node_modules/scheduler/cjs/scheduler.production.js","../../../node_modules/scheduler/index.js","../../../node_modules/react-dom/cjs/react-dom.production.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/cjs/react-dom-client.production.js","../../../node_modules/react-dom/client.js","../../../resources/js/core/utils/Logger.ts","../../../resources/js/core/template-engine/ComponentRegistry.ts","../../../resources/js/core/template-engine/TranslationEngine.ts","../../../resources/js/core/template-engine/PipeRegistry.ts","../../../resources/js/core/template-engine/rawMarkers.ts","../../../resources/js/core/template-engine/DataBindingEngine.ts","../../../resources/js/core/template-engine/ResponsiveManager.ts","../../../resources/js/core/template-engine/helpers/ConditionEvaluator.ts","../../../resources/js/core/template-engine/helpers/RenderHelpers.ts","../../../node_modules/axios/lib/helpers/bind.js","../../../node_modules/axios/lib/utils.js","../../../node_modules/axios/lib/core/AxiosError.js","../../../node_modules/axios/lib/helpers/null.js","../../../node_modules/axios/lib/helpers/toFormData.js","../../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../../node_modules/axios/lib/helpers/buildURL.js","../../../node_modules/axios/lib/core/InterceptorManager.js","../../../node_modules/axios/lib/defaults/transitional.js","../../../node_modules/axios/lib/platform/browser/index.js","../../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../../node_modules/axios/lib/platform/common/utils.js","../../../node_modules/axios/lib/platform/index.js","../../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../../node_modules/axios/lib/helpers/formDataToJSON.js","../../../node_modules/axios/lib/defaults/index.js","../../../node_modules/axios/lib/helpers/parseHeaders.js","../../../node_modules/axios/lib/core/AxiosHeaders.js","../../../node_modules/axios/lib/core/transformData.js","../../../node_modules/axios/lib/cancel/isCancel.js","../../../node_modules/axios/lib/cancel/CanceledError.js","../../../node_modules/axios/lib/core/settle.js","../../../node_modules/axios/lib/helpers/parseProtocol.js","../../../node_modules/axios/lib/helpers/speedometer.js","../../../node_modules/axios/lib/helpers/throttle.js","../../../node_modules/axios/lib/helpers/progressEventReducer.js","../../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../../node_modules/axios/lib/helpers/cookies.js","../../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../../node_modules/axios/lib/helpers/combineURLs.js","../../../node_modules/axios/lib/core/buildFullPath.js","../../../node_modules/axios/lib/core/mergeConfig.js","../../../node_modules/axios/lib/helpers/resolveConfig.js","../../../node_modules/axios/lib/adapters/xhr.js","../../../node_modules/axios/lib/helpers/composeSignals.js","../../../node_modules/axios/lib/helpers/trackStream.js","../../../node_modules/axios/lib/adapters/fetch.js","../../../node_modules/axios/lib/adapters/adapters.js","../../../node_modules/axios/lib/core/dispatchRequest.js","../../../node_modules/axios/lib/env/data.js","../../../node_modules/axios/lib/helpers/validator.js","../../../node_modules/axios/lib/core/Axios.js","../../../node_modules/axios/lib/cancel/CancelToken.js","../../../node_modules/axios/lib/helpers/spread.js","../../../node_modules/axios/lib/helpers/isAxiosError.js","../../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../../node_modules/axios/lib/axios.js","../../../node_modules/axios/index.js","../../../resources/js/core/api/ApiClient.ts","../../../resources/js/core/auth/AuthManager.ts","../../../resources/js/core/types/ErrorHandling.ts","../../../resources/js/core/error/ErrorHandlingResolver.ts","../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/jsx-runtime.js","../../../resources/js/core/template-engine/ParentContextProvider.tsx","../../../resources/js/core/template-engine/ActionDispatcher.ts","../../../resources/js/core/template-engine/TransitionManager.ts","../../../resources/js/core/template-engine/TransitionContext.tsx","../../../resources/js/core/template-engine/ResponsiveContext.tsx","../../../resources/js/core/hooks/useControllableState.ts","../../../resources/js/core/template-engine/FormContext.tsx","../../../resources/js/core/template-engine/IsolatedStateContext.tsx","../../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../../node_modules/@dnd-kit/core/dist/core.esm.js","../../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../../resources/js/core/template-engine/sorLine truncated
+44 -3
View File
@@ -162,6 +162,14 @@ class ValidationApi
$message = lang('success_db_write_connected');
}
// 기존 테이블 감지 (Write DB만 수행 — 이슈 #244 대응)
// 사용자가 입력한 db_prefix를 g7 시그니처에 적용하여 정확히 비교
$existingTables = null;
if (!$isReadDb) {
$tablePrefix = (string) ($input['db_prefix'] ?? 'g7_');
$existingTables = checkExistingTables($pdo, $database, $tablePrefix);
}
// 성공 응답
echo json_encode([
'success' => true,
@@ -172,6 +180,7 @@ class ValidationApi
'found' => $privileges['found'],
'required' => $privileges['required'],
],
'existing_tables' => $existingTables,
], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
} catch (PDOException $e) {
// 연결 실패 플래그
@@ -340,6 +349,7 @@ class ValidationApi
'relative_path' => './'.$dir,
'exists' => $result['exists'],
'writable' => $result['writable'],
'readable' => $result['readable'],
'permissions' => $result['permissions'],
'owner' => $result['owner'],
'group' => $result['group'],
@@ -381,6 +391,7 @@ class ValidationApi
'.env' => getEnvCopyCommand($basePath),
];
$webServerUser = getWebServerUser();
$files = [];
$allPassed = true;
$hasNotWritable = false;
@@ -395,12 +406,29 @@ class ValidationApi
$allPassed = false;
}
// 권한 비트/소유자 정보 수집 (ownership_mismatch 판별용)
$permissions = 'N/A';
$permsOctal = 0;
$owner = null;
if ($exists) {
$perms = fileperms($fullPath);
$permissions = substr(sprintf('%o', $perms), -3);
$permsOctal = octdec($permissions);
$owner = getFileOwnerName($fullPath);
}
// 에러 타입 결정
// ownership_mismatch: 파일이 존재하고 권한이 0644 이상인데도 쓰기 불가
// → 소유자와 웹서버 실행 사용자 불일치
$errorType = null;
if (! $exists) {
$errorType = 'not_exists';
} elseif (! $writable) {
$errorType = 'not_writable';
if ($permsOctal >= 0644 && $webServerUser && $owner && $owner !== $webServerUser) {
$errorType = 'ownership_mismatch';
} else {
$errorType = 'not_writable';
}
$hasNotWritable = true;
}
@@ -409,18 +437,31 @@ class ValidationApi
'writable' => $writable,
'passed' => $passed,
'error_type' => $errorType,
'permissions' => $permissions,
'owner' => $owner,
'web_server_user' => $webServerUser,
'command' => $createCommands[$name],
];
}
// base_path 소유자 정보 — .env 파일 생성 시 chgrp 포함 여부 판단용
// 프로젝트 루트 소유자가 웹서버 실행 사용자와 다른 경우, 생성 직후 ownership_mismatch가
// 재현되므로 복사 명령 자체에 chgrp + chmod 664를 미리 포함시키기 위함
$basePathOwner = function_exists('posix_getpwuid') && is_dir($basePath)
? (posix_getpwuid(fileowner($basePath))['name'] ?? null)
: null;
$basePathOwnerMatchesWebUser = $basePathOwner && $webServerUser && $basePathOwner === $webServerUser;
return [
'required' => true,
'files' => $files,
'all_passed' => $allPassed,
'has_not_writable' => $hasNotWritable,
'web_server_group' => getWebServerGroup() ?? getWebServerUser() ?? 'www-data',
'web_server_user' => getWebServerUser(),
'web_server_group' => getWebServerGroup() ?? $webServerUser ?? 'www-data',
'web_server_user' => $webServerUser,
'base_path' => $basePath,
'base_path_owner' => $basePathOwner,
'base_path_owner_matches_web_user' => $basePathOwnerMatchesWebUser,
'relative_base_path' => '.',
'message' => $allPassed
? lang('success_required_files')
+108 -5
View File
@@ -112,6 +112,42 @@ try {
exit;
}
/**
* 설치 모드 수신 (sse | polling, 기본 sse)
*
* POST 본문(JSON 또는 form)에서 installation_mode 필드로 전달됩니다.
* - sse: 기존 방식 (install-worker.php GET + EventSource)
* - polling: install-process.php 응답 완료 후 인라인으로 runInstallationTasks() 실행,
* 프론트엔드는 state-management.php를 1초 간격으로 폴링
*/
$requestBody = [];
$rawInput = file_get_contents('php://input');
if (!empty($rawInput)) {
$decoded = json_decode($rawInput, true);
if (is_array($decoded)) {
$requestBody = $decoded;
}
}
$installationMode = $requestBody['installation_mode']
?? $_POST['installation_mode']
?? 'sse';
if (!in_array($installationMode, ['sse', 'polling'], true)) {
$installationMode = 'sse';
}
/**
* 기존 DB 처리 액션 수신 (skip | drop_tables, 기본 skip)
*
* 이슈 #244: Step 3에서 기존 DB 감지 후 사용자가 "강제 진행" 선택 시 전달.
*/
$existingDbAction = $requestBody['existing_db_action']
?? $_POST['existing_db_action']
?? 'skip';
if (!in_array($existingDbAction, ['skip', 'drop_tables'], true)) {
$existingDbAction = 'skip';
}
/**
* 현재 상태 가져오기
*/
@@ -134,6 +170,8 @@ try {
$state['current_task'] = null;
$state['config'] = $config;
$state['error'] = null;
$state['installation_mode'] = $installationMode;
$state['existing_db_action'] = $existingDbAction;
/**
* 로그 파일 초기화 (재시도가 아닌 경우에만)
@@ -163,17 +201,82 @@ try {
addLog(lang('log_installation_config_saved'));
/**
* 클라이언트에 즉시 응답 전송
*
* JavaScript에서 이 응답을 받은 후 install-worker.php로 SSE 연결을 시작합니다.
* 응답 JSON 준비 (echo 이전에 미리 문자열화하여 Content-Length 계산용)
*/
http_response_code(200);
echo json_encode([
$responseJson = json_encode([
'success' => true,
'status' => 'started',
'message' => lang('success_installation_started'),
'installation_mode' => $installationMode,
], JSON_UNESCAPED_UNICODE);
/**
* 폴링 모드: 응답을 완전히 종료한 후 워커 인라인 실행
*
* 핵심 과제: 브라우저의 `await fetch(install-process.php)`가 응답 완료를
* 인식해야 JS가 폴링 시작 코드로 진행 가능하다. Apache mod_php에서는
* ob_end_flush() + flush() 만으로는 HTTP 연결이 끊기지 않아, 워커가
* 인라인으로 10분간 실행되는 동안 브라우저 fetch 가 대기하게 된다.
*
* 해결:
* - PHP-FPM: fastcgi_finish_request() — 응답 즉시 종료
* - mod_php 폴백: Content-Length + Connection: close 헤더 명시 →
* 브라우저가 지정된 바이트 수만 읽고 연결을 닫음
*/
if ($installationMode === 'polling') {
ignore_user_abort(true);
// CRITICAL: 세션 잠금 해제 — 워커가 인라인으로 10분간 실행되는 동안
// 세션 파일이 잠겨있으면 폴링용 state-management.php?action=get 요청이
// session_start()에서 대기하여 진행 상황을 전혀 확인할 수 없게 됨.
//
// task-runner의 완료 시점 $_SESSION['installer_current_step']=5 쓰기는
// 세션이 닫힌 후에는 효과 없으므로, 미리 여기서 저장한다.
if (session_status() === PHP_SESSION_ACTIVE) {
$_SESSION['installer_current_step'] = 5;
session_write_close();
}
// 기존 출력 버퍼 전부 비우기 (헤더 설정 전)
while (ob_get_level() > 0) {
@ob_end_clean();
}
// 응답 헤더 — 브라우저가 응답 완료를 인식하도록 Content-Length + Connection: close
http_response_code(200);
header('Content-Type: application/json; charset=UTF-8');
header('Content-Length: ' . strlen($responseJson));
header('Connection: close');
echo $responseJson;
// 출력 플러시 + PHP-FPM 지원 시 연결 종료
@flush();
if (function_exists('fastcgi_finish_request')) {
@fastcgi_finish_request();
}
// 워커 타임아웃 설정 (SSE 모드와 동일)
@set_time_limit(600);
@ini_set('display_errors', '0');
error_reporting(E_ALL);
addLog('=== Install Worker Polling Started ===');
addLog('Client IP: ' . ($_SERVER['REMOTE_ADDR'] ?? 'unknown'));
// 폴링 모드 — NullEmitter 등록 후 task runner 실행
require_once __DIR__ . '/../includes/progress-emitter.php';
require_once __DIR__ . '/../includes/task-runner.php';
setProgressEmitter(new NullEmitter());
runInstallationTasks();
exit;
}
// SSE 모드: 일반 JSON 응답
http_response_code(200);
echo $responseJson;
} catch (Exception $e) {
/**
* 에러 처리
File diff suppressed because it is too large. Load diff
+60 -3
View File
@@ -78,6 +78,7 @@ function scanTemplates(): array
// dependencies 처리: 객체 형태면 모듈/플러그인 키를 배열로 변환
$dependencies = extractDependenciesFromJson($data);
$dependenciesDetailed = extractDependenciesDetailedFromJson($data);
$templateInfo = [
'identifier' => $identifier,
@@ -86,6 +87,7 @@ function scanTemplates(): array
'description' => $description,
'type' => $type,
'dependencies' => $dependencies,
'dependencies_detailed' => $dependenciesDetailed,
'author' => $author,
'directory' => $dir,
];
@@ -155,6 +157,7 @@ function scanModules(): array
}
$dependencies = extractDependenciesFromJson($data);
$dependenciesDetailed = extractDependenciesDetailedFromJson($data);
$result[] = [
'identifier' => $data['identifier'] ?? $dir,
@@ -162,6 +165,7 @@ function scanModules(): array
'version' => $data['version'] ?? '1.0.0',
'description' => $data['description'] ?? ['ko' => '', 'en' => ''],
'dependencies' => $dependencies,
'dependencies_detailed' => $dependenciesDetailed,
'author' => $data['vendor'] ?? null,
'directory' => $dir,
];
@@ -225,6 +229,7 @@ function scanPlugins(): array
}
$dependencies = extractDependenciesFromJson($data);
$dependenciesDetailed = extractDependenciesDetailedFromJson($data);
$result[] = [
'identifier' => $data['identifier'] ?? $dir,
@@ -232,6 +237,7 @@ function scanPlugins(): array
'version' => $data['version'] ?? '1.0.0',
'description' => $data['description'] ?? ['ko' => '', 'en' => ''],
'dependencies' => $dependencies,
'dependencies_detailed' => $dependenciesDetailed,
'author' => $data['vendor'] ?? null,
'directory' => $dir,
];
@@ -241,7 +247,7 @@ function scanPlugins(): array
}
/**
* JSON 매니페스트에서 의존성 배열 추출
* JSON 매니페스트에서 의존성 identifier 배열 추출 (하위 호환 유지).
*
* dependencies 구조:
* - 객체 형태: { "modules": {"sirsoft-ecommerce": ">=1.0.0"}, "plugins": {...} }
@@ -257,14 +263,12 @@ function extractDependenciesFromJson(array $data): array
if (is_array($rawDeps)) {
if (isset($rawDeps['modules']) || isset($rawDeps['plugins'])) {
// 객체 형태: { modules: {...}, plugins: {...} }
foreach (['modules', 'plugins'] as $depType) {
if (! empty($rawDeps[$depType]) && is_array($rawDeps[$depType])) {
$dependencies = array_merge($dependencies, array_keys($rawDeps[$depType]));
}
}
} else {
// 배열 형태: ['module1', 'module2']
$dependencies = array_values($rawDeps);
}
}
@@ -272,6 +276,59 @@ function extractDependenciesFromJson(array $data): array
return $dependencies;
}
/**
* JSON 매니페스트에서 타입+버전이 보존된 의존성 상세 배열 추출.
*
* 반환: [['type' => 'modules'|'plugins', 'identifier' => '...', 'version' => '>=0.1.1'], ...]
* 프론트엔드 validateExtensionSelection()에서 의존성 그래프 검증에 사용합니다.
*
* @param array $data JSON 매니페스트 데이터
* @return array 의존성 상세 배열
*/
function extractDependenciesDetailedFromJson(array $data): array
{
$rawDeps = $data['dependencies'] ?? [];
$detailed = [];
if (!is_array($rawDeps)) {
return $detailed;
}
if (isset($rawDeps['modules']) || isset($rawDeps['plugins'])) {
foreach (['modules', 'plugins'] as $depType) {
if (! empty($rawDeps[$depType]) && is_array($rawDeps[$depType])) {
foreach ($rawDeps[$depType] as $identifier => $version) {
if (is_int($identifier)) {
// 배열 원소: 값이 identifier
$detailed[] = [
'type' => $depType,
'identifier' => (string) $version,
'version' => '*',
];
} else {
$detailed[] = [
'type' => $depType,
'identifier' => (string) $identifier,
'version' => is_string($version) ? $version : '*',
];
}
}
}
}
} else {
// 레거시 배열 형태 — 타입을 알 수 없으므로 'unknown'으로 표기
foreach ($rawDeps as $identifier) {
$detailed[] = [
'type' => 'unknown',
'identifier' => (string) $identifier,
'version' => '*',
];
}
}
return $detailed;
}
// ===== 메인 실행 =====
try {
+21 -5
View File
@@ -70,12 +70,22 @@ class StateManagementApi
exit;
}
// state.json 파일 실제 존재 여부 (getInstallationState는 부재 시 DEFAULT_INSTALLATION_STATE를 반환하므로
// isset($state['installation_status']) 로는 "기본 상태"와 "실제 파일 상태"를 구분할 수 없다)
$stateFileExists = file_exists(STATE_PATH);
$installedFlagPath = BASE_PATH . '/storage/app/g7_installed';
// 현재 설치 상태 조회
$state = getInstallationState();
// installation_status 값을 status로 매핑
$status = 'pending';
if (isset($state['installation_status'])) {
if (!$stateFileExists && file_exists($installedFlagPath)) {
// state.json 삭제 + g7_installed 플래그 존재 → 설치 완료 후 정리된 상태
// 폴링이 완료 시점을 놓치면 이후 주기에서 이 분기로 completed 전환
$status = 'completed';
} elseif ($stateFileExists && isset($state['installation_status'])) {
switch ($state['installation_status']) {
case 'not_started':
case 'ready': // ready도 pending으로 매핑 (설치 대기 상태)
@@ -98,27 +108,33 @@ class StateManagementApi
}
}
// 로그 파일에서 로그 읽기
$logs = getInstallationLogs();
// 폴링 모드 증분 조회 지원 (?log_offset=N)
$logOffset = isset($_GET['log_offset']) ? max(0, (int) $_GET['log_offset']) : 0;
// 로그 파일에서 로그 읽기 (offset 이후만)
$logs = getInstallationLogs($logOffset);
$logTotal = getInstallationLogCount();
// API 응답 형식으로 변환
$response = [
'status' => $status,
'current_step' => $state['current_step'] ?? 0,
'current_task' => $state['current_task'] ?? null,
// current_task_name은 제거 (프론트엔드에서 task ID로 번역)
'completed_tasks' => $state['completed_tasks'] ?? [],
'logs' => $logs,
'log_total' => $logTotal,
'error' => $state['error'] ?? null,
'last_updated' => $state['last_updated'] ?? null,
// 실패 정보 (새로고침 후에도 표시용)
'failed_task' => $state['failed_task'] ?? null,
// failed_task_name은 제거 (프론트엔드에서 task ID로 번역)
'error_message_key' => $state['error_message_key'] ?? null,
'error_detail' => $state['error_detail'] ?? null,
'rollback_failure' => $state['rollback_failure'] ?? null,
'manual_commands' => $state['manual_commands'] ?? null,
// SSE/폴링 듀얼 모드 지원
'installation_mode' => $state['installation_mode'] ?? 'sse',
];
// JSON 응답 반환
+526
View File
@@ -1689,6 +1689,75 @@ hr {
color: #991b1b;
}
/* 기존 DB 테이블 감지 인라인 카드 (#244)
.test-result .alert 가 display:flex 라 카드 자식이 가로로 정렬되므로
block 으로 오버라이드하고 카드 내부에 자체 spacing 적용 */
.test-result .db-existing-tables-card {
display: block;
align-items: initial;
gap: 0;
margin-top: var(--spacing-md);
padding: var(--spacing-lg);
background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
border: 1px solid #fde68a;
border-radius: var(--border-radius-lg);
color: #78350f;
box-shadow: var(--shadow-sm);
}
.test-result .db-existing-tables-card .db-existing-header {
font-size: var(--font-size-lg);
font-weight: var(--font-weight-semibold);
margin-bottom: var(--spacing-sm);
}
.test-result .db-existing-tables-card .db-existing-desc {
margin: 0 0 var(--spacing-md) 0;
line-height: var(--line-height-relaxed);
}
.test-result .db-existing-tables-card .db-existing-tables-label,
.test-result .db-existing-tables-card .db-existing-backup-label {
margin: var(--spacing-md) 0 var(--spacing-xs) 0;
font-weight: var(--font-weight-semibold);
}
.test-result .db-existing-tables-card .db-existing-tables-list {
background: rgba(255, 255, 255, 0.6);
border: 1px solid #fde68a;
border-radius: var(--border-radius);
padding: var(--spacing-sm) var(--spacing-md);
margin: 0 0 var(--spacing-sm) 0;
font-family: var(--font-family-mono, monospace);
font-size: var(--font-size-sm);
line-height: var(--line-height-relaxed);
white-space: pre-wrap;
word-break: break-all;
max-height: 8rem;
overflow-y: auto;
}
.test-result .db-existing-tables-card .code-box {
margin: 0 0 var(--spacing-md) 0;
}
.test-result .db-existing-tables-card .db-backup-confirm-checkbox {
display: flex;
align-items: center;
gap: var(--spacing-sm);
margin-top: var(--spacing-md);
padding: var(--spacing-sm) var(--spacing-md);
background: rgba(255, 255, 255, 0.5);
border: 1px solid #fde68a;
border-radius: var(--border-radius);
cursor: pointer;
font-weight: var(--font-weight-medium);
}
.test-result .db-existing-tables-card .db-backup-confirm-checkbox input[type="checkbox"] {
cursor: pointer;
}
/* 다크모드 테스트 결과 (Step 3: DB/PHP 연결 테스트) */
[data-theme="dark"] .test-result .alert-success {
background: linear-gradient(135deg, rgba(52, 211, 153, 0.1) 0%, rgba(52, 211, 153, 0.15) 100%);
@@ -3707,4 +3776,461 @@ body {
.selection-summary .summary-count {
font-size: var(--font-size-xl);
}
}
/* ============================================================
설치 진행 방식 선택 (SSE / 폴링)
============================================================ */
.installation-mode-card {
margin-bottom: var(--spacing-md);
}
.installation-mode-options {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
}
.installation-mode-option {
display: flex;
align-items: flex-start;
gap: var(--spacing-sm);
padding: var(--spacing-md);
border: 1px solid var(--border-color, #d1d5db);
border-radius: var(--radius-md, 8px);
cursor: pointer;
transition: border-color 0.15s ease, background-color 0.15s ease;
}
.installation-mode-option:hover {
border-color: var(--color-primary, #3b82f6);
background-color: var(--bg-hover, #f9fafb);
}
.installation-mode-option input[type="radio"] {
margin-top: 4px;
flex-shrink: 0;
}
.installation-mode-option input[type="radio"]:checked + .installation-mode-text strong {
color: var(--color-primary, #3b82f6);
}
.installation-mode-option:has(input[type="radio"]:checked) {
border-color: var(--color-primary, #3b82f6);
background-color: var(--bg-selected, #eff6ff);
}
.installation-mode-text {
display: flex;
flex-direction: column;
gap: 4px;
}
.installation-mode-text strong {
font-size: var(--font-size-base);
color: var(--text-primary);
}
.installation-mode-desc {
font-size: var(--font-size-sm);
color: var(--text-secondary, #6b7280);
line-height: 1.4;
}
@media (prefers-color-scheme: dark) {
.installation-mode-option {
border-color: var(--border-color-dark, #374151);
}
.installation-mode-option:has(input[type="radio"]:checked) {
background-color: var(--bg-selected-dark, #1e3a8a33);
}
}
/* ============================================================
Step 3: 기존 DB 테이블 감지 배지 + 모달
============================================================ */
.db-existing-tables-badge {
margin-top: var(--spacing-sm);
cursor: pointer;
user-select: none;
}
.db-existing-tables-badge:hover {
opacity: 0.9;
}
.modal-existing-tables {
display: none;
position: fixed;
inset: 0;
z-index: 10000;
}
.modal-existing-tables.modal-open {
display: block;
}
.modal-existing-tables .modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
}
.modal-existing-tables .modal-content {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--bg-card, #fff);
padding: var(--spacing-lg, 24px);
border-radius: var(--radius-md, 8px);
max-width: 600px;
width: 90%;
max-height: 85vh;
overflow-y: auto;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.modal-existing-tables .modal-title {
margin: 0 0 var(--spacing-md) 0;
font-size: var(--font-size-lg);
color: var(--color-warning, #d97706);
}
.modal-existing-tables .modal-body {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
}
.modal-existing-tables .modal-tables-label,
.modal-existing-tables .modal-backup-label {
margin: var(--spacing-sm) 0 4px 0;
font-weight: 600;
font-size: var(--font-size-sm);
}
.modal-existing-tables .modal-tables-list {
padding: var(--spacing-sm);
background: var(--bg-muted, #f3f4f6);
border-radius: var(--radius-sm, 4px);
font-size: var(--font-size-xs);
white-space: pre-wrap;
word-break: break-all;
max-height: 150px;
overflow-y: auto;
}
.modal-existing-tables .modal-confirm-checkbox {
display: flex;
gap: var(--spacing-sm);
align-items: flex-start;
margin-top: var(--spacing-sm);
cursor: pointer;
}
.modal-existing-tables .modal-actions {
display: flex;
justify-content: flex-end;
gap: var(--spacing-sm);
margin-top: var(--spacing-lg);
}
.btn-danger {
background-color: var(--color-danger, #dc2626);
color: #fff;
}
.btn-danger:hover:not(:disabled) {
background-color: var(--color-danger-hover, #b91c1c);
}
.btn-danger:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Step 4 의존성 경고 */
.dependency-warning-list {
margin: var(--spacing-sm) 0;
padding-left: var(--spacing-lg);
}
.dependency-warning-list li {
margin-bottom: 4px;
font-size: var(--font-size-sm);
}
/* Step 4 자동 선택된 확장 카드 */
.extension-card.dep-auto-selected.selected {
border-color: #d97706;
background-color: rgba(217, 119, 6, 0.08);
}
.extension-card.dep-auto-selected.selected .extension-card-icon {
background-color: #d97706;
color: white;
}
.extension-card.dep-auto-selected.selected .extension-card-select {
color: #d97706;
}
.extension-card.dep-auto-selected.selected .extension-card-footer {
border-top-color: rgba(217, 119, 6, 0.2);
}
/* 자동 선택 배지 */
.dep-auto-badge {
display: inline-flex;
align-items: center;
gap: 4px;
margin-top: 4px;
padding: 2px 8px;
font-size: 0.7rem;
font-weight: 600;
color: #92400e;
background-color: rgba(217, 119, 6, 0.12);
border: 1px solid rgba(217, 119, 6, 0.25);
border-radius: 4px;
line-height: 1.4;
}
.dep-auto-badge i {
font-size: 0.6rem;
}
.dep-auto-badge-owner {
font-weight: 400;
opacity: 0.8;
}
/* 버전 충돌 표시 */
.dep-version-conflict {
color: var(--color-danger, #dc2626);
font-weight: 600;
font-size: 0.8em;
}
/* 의존성 잠금 토스트 */
.dep-lock-toast {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%) translateY(20px);
padding: 12px 20px;
background-color: #1e293b;
color: #f8fafc;
border-radius: 8px;
font-size: var(--font-size-sm);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
z-index: 10000;
opacity: 0;
transition: opacity 0.3s ease, transform 0.3s ease;
max-width: 90vw;
text-align: center;
}
.dep-lock-toast i {
margin-right: 6px;
color: #fbbf24;
}
.dep-lock-toast.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
/* 다크 모드 */
[data-theme="dark"] .extension-card.dep-auto-selected.selected {
border-color: #f59e0b;
background-color: rgba(245, 158, 11, 0.12);
}
[data-theme="dark"] .extension-card.dep-auto-selected.selected .extension-card-icon {
background-color: #f59e0b;
}
[data-theme="dark"] .dep-auto-badge {
color: #fcd34d;
background-color: rgba(245, 158, 11, 0.15);
border-color: rgba(245, 158, 11, 0.3);
}
[data-theme="dark"] .dep-lock-toast {
background-color: #334155;
}
/* ========================================================================
Step 3 Vendor 설치 방식 카드
======================================================================== */
.vendor-mode-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: var(--spacing-md);
}
.vendor-mode-card {
position: relative;
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
padding: var(--spacing-md);
background-color: var(--bg-color);
border: 2px solid var(--border-color);
border-radius: var(--border-radius-lg);
cursor: pointer;
transition: all 0.2s ease;
user-select: none;
}
.vendor-mode-card:hover:not(.disabled) {
border-color: var(--primary-color);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.vendor-mode-card.selected {
border-color: var(--primary-color);
background-color: rgba(59, 130, 246, 0.08);
}
.vendor-mode-card.disabled {
cursor: not-allowed;
opacity: 0.55;
background-color: var(--bg-gray, rgba(0, 0, 0, 0.03));
}
.vendor-mode-card.disabled:hover {
border-color: var(--border-color);
box-shadow: none;
}
/* 네이티브 라디오 버튼 숨김 (카드 전체가 클릭 타겟) */
.vendor-mode-card-input {
position: absolute;
opacity: 0;
pointer-events: none;
width: 0;
height: 0;
}
/* 헤더 — 아이콘 + 제목 + 체크 아이콘 */
.vendor-mode-card-header {
display: flex;
align-items: flex-start;
gap: var(--spacing-sm);
}
.vendor-mode-card-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--bg-gray, rgba(0, 0, 0, 0.05));
border-radius: var(--border-radius);
flex-shrink: 0;
color: var(--text-muted);
font-size: 1.25rem;
transition: all 0.2s ease;
}
.vendor-mode-card.selected .vendor-mode-card-icon {
background-color: var(--primary-color);
color: white;
}
.vendor-mode-card-title-wrapper {
flex: 1;
min-width: 0;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 6px;
}
.vendor-mode-card-title {
margin: 0;
font-size: var(--font-size-base);
font-weight: var(--font-weight-semibold);
color: var(--text-color);
line-height: 1.3;
}
/* 우측 체크 아이콘 (선택 시 표시) */
.vendor-mode-card-check {
font-size: 1.25rem;
color: var(--border-color);
transition: all 0.2s ease;
margin-top: 2px;
flex-shrink: 0;
}
.vendor-mode-card.selected .vendor-mode-card-check {
color: var(--primary-color);
}
.vendor-mode-card:hover:not(.disabled) .vendor-mode-card-check {
color: var(--primary-color);
}
/* 배지 */
.vendor-mode-card-badge {
display: inline-flex;
align-items: center;
padding: 2px 8px;
border-radius: var(--border-radius);
font-size: var(--font-size-xs);
font-weight: var(--font-weight-semibold);
line-height: 1.4;
white-space: nowrap;
}
.vendor-mode-card-badge-recommended {
background-color: rgba(59, 130, 246, 0.15);
color: var(--primary-color);
}
.vendor-mode-card-badge-dev {
background-color: rgba(168, 85, 247, 0.15);
color: #9333ea;
}
.vendor-mode-card-badge-shared {
background-color: rgba(16, 185, 129, 0.15);
color: #059669;
}
/* 설명 */
.vendor-mode-card-description {
margin: 0;
font-size: var(--font-size-sm);
color: var(--text-muted);
line-height: 1.5;
}
/* 상태 메시지 */
.vendor-mode-card-status {
margin: 0;
padding-top: var(--spacing-xs);
border-top: 1px dashed var(--border-color);
font-size: var(--font-size-xs);
line-height: 1.4;
display: flex;
align-items: center;
gap: 4px;
}
.vendor-mode-card-status-ok {
color: var(--color-success, #10b981);
}
.vendor-mode-card-status-error {
color: var(--color-error, #ef4444);
}
/* 반응형 — 좁은 화면에서는 1열 */
@media (max-width: 640px) {
.vendor-mode-cards {
grid-template-columns: 1fr;
}
}
@@ -0,0 +1,292 @@
/**
* G7 인스톨러 - 설치 진행 모니터 (SSE/폴링 듀얼 모드)
*
* 두 모드 공통 콜백 인터페이스를 통해 UI 업데이트 로직을 공유합니다.
* - SseMonitor: EventSource 기반 실시간 스트리밍
* - PollingMonitor: setInterval 기반 state-management.php 폴링
*
* 콜백:
* onConnected() — 연결 성공 (SSE 전용, 폴링은 첫 poll 시 즉시 호출)
* onTaskStart(taskId, name, target) — 새 작업 시작
* onTaskComplete(taskId, message, target) — 작업 완료
* onLog(message) — 로그 라인 추가
* onComplete(data) — 전체 설치 성공
* onError(errorData) — 실패 (data: {message, message_key, error, task, target, manual_commands})
* onAbort(state) — 사용자 중단
* onRollbackFailed(data) — 롤백 실패
* onConnectionTimeout() — SSE 5초 내 연결 실패 (SSE 전용)
*/
(function (global) {
'use strict';
/**
* 기본 모니터 클래스 (공통 인터페이스)
*/
class InstallationMonitor {
constructor(callbacks, options = {}) {
this.callbacks = callbacks || {};
this.options = options;
this.stopped = false;
}
start() {
throw new Error('start() must be implemented by subclass');
}
stop() {
this.stopped = true;
}
_invoke(name, ...args) {
const cb = this.callbacks[name];
if (typeof cb === 'function') {
try {
cb(...args);
} catch (e) {
console.error(`[InstallationMonitor] callback ${name} failed:`, e);
}
}
}
}
/**
* SSE 기반 모니터 (EventSource)
*/
class SseMonitor extends InstallationMonitor {
constructor(callbacks, options = {}) {
super(callbacks, options);
this.workerUrl = options.workerUrl;
this.connectionTimeoutMs = options.connectionTimeoutMs || 5000;
this.eventSource = null;
this.connected = false;
this.connectionTimer = null;
}
start() {
this.eventSource = new EventSource(this.workerUrl);
this.connectionTimer = setTimeout(() => {
if (!this.connected && !this.stopped) {
this.stop();
this._invoke('onConnectionTimeout');
}
}, this.connectionTimeoutMs);
this.eventSource.addEventListener('connected', () => {
clearTimeout(this.connectionTimer);
this.connected = true;
this._invoke('onConnected');
});
this.eventSource.addEventListener('task_start', (e) => {
const data = JSON.parse(e.data);
this._invoke('onTaskStart', data.task, data.name, data.target || null);
});
this.eventSource.addEventListener('task_complete', (e) => {
const data = JSON.parse(e.data);
this._invoke('onTaskComplete', data.task, data.message, data.target || null);
});
this.eventSource.addEventListener('log', (e) => {
const data = JSON.parse(e.data);
this._invoke('onLog', data.message);
});
this.eventSource.addEventListener('completed', (e) => {
const data = JSON.parse(e.data);
this.stop();
this._invoke('onComplete', data);
});
this.eventSource.addEventListener('aborted', (e) => {
let data = {};
try {
data = JSON.parse(e.data);
} catch (_) {}
this.stop();
this._invoke('onAbort', data);
});
this.eventSource.addEventListener('rollback_failed', (e) => {
let data = {};
try {
data = JSON.parse(e.data);
} catch (_) {}
this._invoke('onRollbackFailed', data);
});
this.eventSource.addEventListener('error', (e) => {
// 서버에서 보낸 명시적 error 이벤트 (e.data 있음)
if (!e.data) {
return;
}
let data = {};
try {
data = JSON.parse(e.data);
} catch (_) {
data = { message: 'Unknown error' };
}
this.stop();
this._invoke('onError', data);
});
// 연결 오류 (네이티브 onerror) — e.data 없음
this.eventSource.onerror = () => {
clearTimeout(this.connectionTimer);
if (!this.connected && !this.stopped) {
this.stop();
this._invoke('onConnectionTimeout');
}
};
}
stop() {
super.stop();
if (this.connectionTimer) {
clearTimeout(this.connectionTimer);
this.connectionTimer = null;
}
if (this.eventSource) {
this.eventSource.close();
this.eventSource = null;
}
}
}
/**
* 폴링 기반 모니터 (state-management.php?action=get)
*
* 1초 간격으로 state를 조회하고 diff 발생 시 콜백을 호출합니다.
*/
class PollingMonitor extends InstallationMonitor {
constructor(callbacks, options = {}) {
super(callbacks, options);
this.stateUrl = options.stateUrl;
this.intervalMs = options.intervalMs || 1000;
this.timer = null;
this.lastLogOffset = 0;
this.lastCompletedTasks = [];
this.lastCurrentTask = null;
this.lastStatus = null;
this.terminated = false;
}
start() {
this._invoke('onConnected');
this._poll();
this.timer = setInterval(() => this._poll(), this.intervalMs);
}
stop() {
super.stop();
this.terminated = true;
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
}
async _poll() {
if (this.terminated) return;
try {
const url = `${this.stateUrl}${this.stateUrl.includes('?') ? '&' : '?'}log_offset=${this.lastLogOffset}`;
const res = await fetch(url, { cache: 'no-store' });
if (!res.ok) {
return; // 일시적인 네트워크 오류는 무시 (다음 tick에서 재시도)
}
const state = await res.json();
this._diffAndEmit(state);
} catch (e) {
console.warn('[PollingMonitor] poll failed:', e);
}
}
_diffAndEmit(state) {
// 1. 새 로그 송출
if (Array.isArray(state.logs) && state.logs.length > 0) {
for (const log of state.logs) {
const msg = (typeof log === 'object' && log.message) ? log.message : String(log);
this._invoke('onLog', msg);
}
}
if (typeof state.log_total === 'number') {
this.lastLogOffset = state.log_total;
}
// 2. current_task 변화 감지 → onTaskStart
const currentTask = state.current_task || null;
if (currentTask && currentTask !== this.lastCurrentTask) {
// target 분리: "taskId:target" 형식
let taskId = currentTask;
let target = null;
const colonIdx = currentTask.indexOf(':');
if (colonIdx !== -1) {
taskId = currentTask.substring(0, colonIdx);
target = currentTask.substring(colonIdx + 1);
}
this._invoke('onTaskStart', taskId, null, target);
this.lastCurrentTask = currentTask;
}
// 3. completed_tasks diff → onTaskComplete
const completedTasks = Array.isArray(state.completed_tasks) ? state.completed_tasks : [];
for (const key of completedTasks) {
if (!this.lastCompletedTasks.includes(key)) {
let taskId = key;
let target = null;
const colonIdx = key.indexOf(':');
if (colonIdx !== -1) {
taskId = key.substring(0, colonIdx);
target = key.substring(colonIdx + 1);
}
this._invoke('onTaskComplete', taskId, null, target);
}
}
this.lastCompletedTasks = completedTasks.slice();
// 4. rollback_failure 저장 (에러/중단 처리 시 UI에 표시)
if (state.rollback_failure && this.lastStatus !== state.status) {
this._invoke('onRollbackFailed', {
message: state.rollback_failure.message || null,
detail: state.rollback_failure.detail_key || null,
});
}
// 5. status 전환 감지
const status = state.status;
if (status && status !== this.lastStatus) {
switch (status) {
case 'completed':
this.stop();
this._invoke('onComplete', { message: state.error_detail || null, redirect: '/install/' });
break;
case 'failed':
this.stop();
this._invoke('onError', {
message: state.error_detail || null,
message_key: state.error_message_key || null,
error: state.error_detail || null,
task: state.failed_task || null,
target: null,
manual_commands: state.manual_commands || null,
});
break;
case 'aborted':
this.stop();
this._invoke('onAbort', state);
break;
}
}
this.lastStatus = status;
}
}
// 전역 노출
global.G7InstallationMonitor = {
InstallationMonitor,
SseMonitor,
PollingMonitor,
};
})(window);
File diff suppressed because it is too large. Load diff
+9 -3
View File
@@ -63,11 +63,11 @@ define('OPTIONAL_EXTENSIONS', [
define('MIN_DISK_SPACE_MB', 500);
// 디렉토리 권한 설정 (8진수)
// chown + chmod 모델: 소유자(www-data) rwx, 그룹(www-data) rwx, 기타 ---
define('REQUIRED_DIRECTORY_PERMISSIONS', 0770);
// 업계 표준 755 (WordPress/Drupal/Joomla/Laravel 공통) — 실제 통과 기준은 is_writable() && is_readable()
define('REQUIRED_DIRECTORY_PERMISSIONS', 0755);
// 권한 표시용 문자열 (사용자에게 보여줄 형식)
define('REQUIRED_DIRECTORY_PERMISSIONS_DISPLAY', '770');
define('REQUIRED_DIRECTORY_PERMISSIONS_DISPLAY', '755');
// 권한 검증이 필요한 디렉토리 목록
// 값이 true인 경우 하위 디렉토리까지 재귀적으로 체크
@@ -120,6 +120,12 @@ define('DEFAULT_INSTALL_CONFIG', [
// PHP CLI / Composer 경로 설정
'php_binary' => 'php', // PHP CLI 바이너리 경로 (예: /usr/local/php82/bin/php)
'composer_binary' => '', // Composer 바이너리 경로 (빈 값 = 시스템 PATH 사용)
// Vendor 설치 모드 (auto|composer|bundled)
// - auto: composer 사용 가능 시 composer, 불가 시 vendor-bundle.zip 추출
// - composer: 강제 composer 실행
// - bundled: 강제 vendor-bundle.zip 추출 (공유 호스팅 환경)
'vendor_mode' => 'auto',
]);
// 설치 단계별 파일 매핑
+105 -41
View File
@@ -756,29 +756,37 @@ function checkDirectoryPermissions(array $directories): array
$results = [];
$allPassed = true;
$requiredPerms = REQUIRED_DIRECTORY_PERMISSIONS;
$requiredPermsDisplay = REQUIRED_DIRECTORY_PERMISSIONS_DISPLAY;
// 웹서버 실행 사용자 (ownership_mismatch 판별용)
$webServerUser = getWebServerUser();
foreach ($directories as $path => $checkRecursive) {
$fullPath = BASE_PATH . '/' . $path;
// 디렉토리 존재 여부 확인 (생성하지 않음)
$exists = is_dir($fullPath);
// 쓰기 권한 확인
// 실제 동작 기준 검증: 비트 값이 아닌 is_writable/is_readable로 판정
// 업계 표준에 따라 어떤 권한 조합이든 실제 동작하면 통과 (0755/0775/0770/0777 등)
$writable = $exists && is_writable($fullPath);
$readable = $exists && is_readable($fullPath);
// 권한 코드 가져오기 (8진수 3자리)
// 권한 코드는 정보 표시용으로만 유지
$permissions = 'N/A';
$hasCorrectPermissions = false;
$permsOctal = 0;
if ($exists) {
$perms = fileperms($fullPath);
$permissions = substr(sprintf('%o', $perms), -3);
$permsOctal = octdec($permissions);
}
// 설정된 권한과 비교
$currentPermsOctal = octdec($permissions);
$hasCorrectPermissions = ($currentPermsOctal & $requiredPerms) === $requiredPerms;
// 소유자/소유그룹 정보 가져오기
$owner = null;
$group = null;
if ($exists) {
$owner = getFileOwnerName($fullPath);
$group = getFileGroupName($fullPath);
}
// 재귀 체크 여부 확인
@@ -791,49 +799,41 @@ function checkDirectoryPermissions(array $directories): array
$hasSubdirectoryIssues = count($failedSubdirectories) > 0;
}
// 상위 디렉토리 자체의 통과 여부
$parentPassed = $writable && $hasCorrectPermissions;
// 상위 디렉토리 자체의 통과 여부 — is_writable && is_readable만 충족하면 OK
$parentPassed = $writable && $readable;
// 최종 통과 여부: 상위 + 하위 모두 통과해야 함
$passed = $parentPassed && !$hasSubdirectoryIssues;
// 에러 타입 구분
// ownership_mismatch: 권한 비트는 0755 이상이지만 소유자가 웹서버 사용자와 달라
// 실제 쓰기 불가 (전통적 Apache: 파일 소유자 != www-data)
$errorType = null;
if (!$exists) {
$errorType = 'not_exists';
} elseif (!$parentPassed) {
// 상위 디렉토리 자체의 문제
if (!$hasCorrectPermissions && $writable) {
// 권한 코드는 낮지만 쓰기 가능 (소유자/그룹 권한)
$errorType = 'permission_low_but_writable';
} elseif (!$hasCorrectPermissions) {
// 권한 코드가 필요한 것보다 낮음
$errorType = 'permission_too_low';
} elseif (!$writable) {
// 권한 코드는 충분하지만 쓰기 권한 없음
} elseif (!$writable) {
// 권한 비트가 충분(0755+)한데도 쓰기 불가 → 소유권 불일치 가능성
if ($permsOctal >= 0755 && $webServerUser && $owner && $owner !== $webServerUser) {
$errorType = 'ownership_mismatch';
} else {
$errorType = 'not_writable';
}
} elseif (!$readable) {
$errorType = 'not_readable';
} elseif ($hasSubdirectoryIssues) {
// 상위는 OK, 하위 디렉토리만 문제
$errorType = 'subdirectory_issues';
}
// 소유자/소유그룹 정보 가져오기
$owner = null;
$group = null;
if ($exists) {
$owner = getFileOwnerName($fullPath);
$group = getFileGroupName($fullPath);
}
$results[$path] = [
'exists' => $exists,
'writable' => $writable,
'readable' => $readable,
'permissions' => $permissions,
'required_permissions' => $requiredPermsDisplay,
'has_correct_permissions' => $hasCorrectPermissions,
'owner' => $owner,
'group' => $group,
'web_server_user' => $webServerUser,
'passed' => $passed,
'error_type' => $errorType,
'has_subdirectory_issues' => $hasSubdirectoryIssues,
@@ -1075,14 +1075,17 @@ function getEnvCopyCommand(string $basePath = ''): string
}
/**
* OS에 맞는 디렉토리 권한 수정 명령어를 반환합니다.
* OS에 맞는 권한 수정 명령어를 반환합니다.
*
* 업계 표준(WordPress/Drupal/Joomla/Laravel)에 맞춰 디렉토리 755, 파일 644로 통일.
* chown/setgid 의존성을 제거하여 공유호스팅 호환성 확보.
* 실제 통과 기준은 is_writable() && is_readable()이므로 비트 값은 참고용.
*
* @param string $webGroup 웹 서버 그룹명
* @param string $pathList 대상 경로 (공백 구분)
* @param string $mode 'ownership' (chown+chmod) 또는 'file' (파일 권한)
* @param string $mode 'ownership' (디렉토리) 또는 'file' (파일)
* @return string 권한 수정 명령어
*/
function getPermissionFixCommand(string $webGroup, string $pathList, string $mode = 'ownership', bool $skipChown = false): string
function getPermissionFixCommand(string $pathList, string $mode = 'ownership'): string
{
if (isWindows()) {
$winPath = str_replace('/', '\\', $pathList);
@@ -1094,15 +1097,76 @@ function getPermissionFixCommand(string $webGroup, string $pathList, string $mod
}
if ($mode === 'file') {
if ($skipChown) {
return 'chmod 660 ' . $pathList;
}
return 'sudo chown ' . $webGroup . ':' . $webGroup . ' ' . $pathList . ' && sudo chmod 660 ' . $pathList;
return 'chmod 644 ' . $pathList;
}
if ($skipChown) {
return 'chmod -R 2770 ' . $pathList;
}
return 'sudo chown -R ' . $webGroup . ':' . $webGroup . ' ' . $pathList . ' && sudo chmod -R 2770 ' . $pathList;
return 'chmod -R 755 ' . $pathList;
}
/**
* 기존 DB 테이블 감지 (이슈 #244 대응).
*
* Write DB에 테이블이 존재하는지 확인하고, G7 시그니처 테이블과 비교하여
* 설치 진행 가능 여부를 판정합니다.
*
* severity:
* - 'empty' : 빈 DB (정상 진행)
* - 'g7_existing' : G7 시그니처 4개 모두 존재 (기존 설치 감지)
* - 'mixed' : G7 일부 + 기타 혼재
* - 'foreign_data' : G7 시그니처 없음 + 기타 테이블 존재
*
* @param PDO $pdo 연결된 PDO 인스턴스
* @param string $database 대상 데이터베이스명
* @return array
*/
function checkExistingTables(PDO $pdo, string $database, string $tablePrefix = ''): array
{
try {
$stmt = $pdo->query('SHOW TABLES');
$tables = $stmt ? $stmt->fetchAll(PDO::FETCH_COLUMN) : [];
} catch (PDOException $e) {
return [
'has_tables' => false,
'is_g7_install' => false,
'g7_tables_found' => [],
'other_tables_count' => 0,
'all_tables' => [],
'severity' => 'empty',
'error' => $e->getMessage(),
];
}
if (empty($tables)) {
return [
'has_tables' => false,
'is_g7_install' => false,
'g7_tables_found' => [],
'other_tables_count' => 0,
'all_tables' => [],
'severity' => 'empty',
];
}
// G7 핵심 시그니처 테이블 — PO 결정: 4개 모두 일치 시 "G7 설치됨"으로 판단
// 테이블 prefix를 적용하여 비교 (예: prefix='g7_'이면 'g7_users', 'g7_migrations' 등)
$coreSignatures = ['users', 'migrations', 'roles', 'permissions'];
$g7Signatures = array_map(fn ($t) => $tablePrefix . $t, $coreSignatures);
$g7TablesFound = array_values(array_intersect($g7Signatures, $tables));
$severity = 'foreign_data';
if (count($g7TablesFound) >= 4) {
$severity = 'g7_existing';
} elseif (count($g7TablesFound) > 0) {
$severity = 'mixed';
}
return [
'has_tables' => true,
'is_g7_install' => $severity === 'g7_existing',
'g7_tables_found' => $g7TablesFound,
'other_tables_count' => max(0, count($tables) - count($g7TablesFound)),
'all_tables' => $tables,
'severity' => $severity,
];
}
+65 -15
View File
@@ -30,6 +30,8 @@ function getInstallationState(): array
clearstatcache(true, STATE_PATH);
// state.json 파일이 없으면 기본 상태 반환
// (설치 완료 후 워커가 DELETE_INSTALLER_AFTER_COMPLETE로 정상 삭제하는 경우가 있으므로
// 부재 자체는 에러가 아님. 호출자가 g7_installed 플래그 등으로 완료 여부 판정)
if (!file_exists(STATE_PATH)) {
return $defaultState;
}
@@ -53,7 +55,9 @@ function getInstallationState(): array
// JSON 파싱 실패 시 기본 상태 반환 (재귀 호출 제거 - 무한 루프 방지)
if (json_last_error() !== JSON_ERROR_NONE) {
error_log("Failed to parse state file JSON: " . json_last_error_msg());
$contentLen = strlen($content);
$preview = substr($content, 0, 200);
error_log("Failed to parse state file JSON (length={$contentLen}): " . json_last_error_msg() . " / preview: " . $preview);
return $defaultState;
}
@@ -87,16 +91,30 @@ function saveInstallationState(array $state): bool
// JSON 형식으로 저장
$content = json_encode($state, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
// 파일 쓰기
$result = @file_put_contents(STATE_PATH, $content);
if ($result === false) {
error_log("Failed to write state file: " . STATE_PATH);
if ($content === false) {
error_log("Failed to encode state as JSON: " . json_last_error_msg());
return false;
}
// 파일 권한 설정
@chmod(STATE_PATH, 0664);
// 원자적 쓰기: tmp 파일에 쓰고 rename으로 교체
// 동시 쓰기 경쟁 상황에서 부분 쓰기(half-written file)로 인한 JSON 손상 방지.
// Linux에서 rename()은 atomic syscall이므로 다른 리더가 항상 완전한 파일만 읽는다.
$tmpPath = STATE_PATH . '.tmp.' . getmypid() . '.' . uniqid();
$result = @file_put_contents($tmpPath, $content, LOCK_EX);
if ($result === false || $result !== strlen($content)) {
error_log("Failed to write state tmp file: " . $tmpPath);
@unlink($tmpPath);
return false;
}
@chmod($tmpPath, 0664);
if (!@rename($tmpPath, STATE_PATH)) {
error_log("Failed to rename state tmp file: " . $tmpPath . ' → ' . STATE_PATH);
@unlink($tmpPath);
return false;
}
return true;
}
@@ -285,27 +303,24 @@ function addLog(string $message): bool
* 페이지 새로고침 시 최신 로그를 즉시 표시하기 위해
* clearstatcache()를 적용합니다.
*
* @param int $offset 건너뛸 로그 줄 수 (폴링 모드 증분 조회용, 기본 0)
* @return array 로그 배열 [{timestamp, message}, ...]
*/
function getInstallationLogs(): array
function getInstallationLogs(int $offset = 0): array
{
$logFile = BASE_PATH . '/storage/logs/installation.log';
// 파일 캐시 초기화 (최신 데이터 읽기 보장)
clearstatcache(true, $logFile);
// 로그 파일이 없으면 빈 배열 반환
if (!file_exists($logFile)) {
return [];
}
// 로그 파일 읽기
$content = @file_get_contents($logFile);
if ($content === false) {
return [];
}
// 각 라인을 파싱
$lines = explode("\n", trim($content));
$logs = [];
@@ -314,14 +329,12 @@ function getInstallationLogs(): array
continue;
}
// [timestamp] message 형식 파싱
if (preg_match('/^\[(.+?)\] (.+)$/', $line, $matches)) {
$logs[] = [
'timestamp' => $matches[1],
'message' => $matches[2],
];
} else {
// 형식이 맞지 않으면 전체를 메시지로
$logs[] = [
'timestamp' => date('Y-m-d H:i:s'),
'message' => $line,
@@ -329,9 +342,46 @@ function getInstallationLogs(): array
}
}
// 증분 조회 (offset > 0이면 이전 결과 이후만 반환)
if ($offset > 0 && $offset < count($logs)) {
return array_slice($logs, $offset);
} elseif ($offset >= count($logs)) {
return [];
}
return $logs;
}
/**
* 설치 로그 전체 줄 수 조회 (폴링 모드 offset 계산용).
*
* @return int 전체 로그 줄 수
*/
function getInstallationLogCount(): int
{
$logFile = BASE_PATH . '/storage/logs/installation.log';
clearstatcache(true, $logFile);
if (!file_exists($logFile)) {
return 0;
}
$content = @file_get_contents($logFile);
if ($content === false) {
return 0;
}
$lines = explode("\n", trim($content));
$count = 0;
foreach ($lines as $line) {
if (!empty($line)) {
$count++;
}
}
return $count;
}
/**
* 마지막 완료된 단계 조회
*
@@ -0,0 +1,110 @@
<?php
/**
* 그누보드7 웹 인스톨러 - Progress Emitter 추상화
*
* SSE/폴링 듀얼 모드 지원을 위한 진행 상황 보고 인터페이스.
* - SseEmitter: 실시간 SSE 스트리밍 + addLog
* - NullEmitter: addLog만 수행 (폴링 모드, state.json 기반 조회)
*
* @package G7\Installer
*/
if (!defined('BASE_PATH')) {
define('BASE_PATH', realpath(dirname(__DIR__, 3)) ?: dirname(__DIR__, 3));
}
interface ProgressEmitter
{
/**
* 임의 이벤트 송출 (SSE 이벤트 타입과 데이터 배열).
*
* @param string $event 이벤트 타입 (connected, task_start, task_complete, log, completed, error, aborted, rollback_failed)
* @param array $data 이벤트 데이터
*/
public function emit(string $event, array $data): void;
/**
* 브라우저 연결 끊김 여부.
*
* SSE 모드: connection_aborted() 기반.
* 폴링 모드: 항상 false (응답은 이미 종료됨, 중단 감지는 state.json 기반).
*/
public function isConnectionAborted(): bool;
}
/**
* SSE 기반 진행 상황 송출.
*
* 기존 sendSSEEvent() 동작을 그대로 재현합니다.
*/
class SseEmitter implements ProgressEmitter
{
public function emit(string $event, array $data): void
{
echo "event: {$event}\n";
echo "data: " . json_encode($data, JSON_UNESCAPED_UNICODE) . "\n\n";
if (ob_get_level()) {
@ob_flush();
}
flush();
// log 이벤트는 installation.log에도 기록
if ($event === 'log' && isset($data['message'])) {
addLog($data['message']);
}
}
public function isConnectionAborted(): bool
{
return (bool) connection_aborted();
}
}
/**
* No-op 진행 상황 송출 (폴링 모드 전용).
*
* SSE 이벤트는 브라우저로 보내지 않고, log 메시지만 installation.log에 기록합니다.
* 프론트엔드는 state-management.php?action=get 폴링으로 진행 상황을 조회합니다.
*/
class NullEmitter implements ProgressEmitter
{
public function emit(string $event, array $data): void
{
if ($event === 'log' && isset($data['message'])) {
addLog($data['message']);
}
// 그 외 이벤트는 state.json 업데이트(task-runner.php 내부)로 커버됨
}
public function isConnectionAborted(): bool
{
// 폴링 모드: fastcgi_finish_request() 이후 호출되므로 connection_aborted()는 의미 없음.
// 사용자 중단은 state.json의 installation_status === 'aborted'로 감지.
return false;
}
}
/**
* 현재 등록된 ProgressEmitter 조회.
*
* task-runner.php의 sendSSEEvent() 호환 래퍼가 이 함수를 통해 delegate 합니다.
* 등록되지 않은 경우 안전한 기본값으로 SseEmitter를 반환합니다.
*/
function getProgressEmitter(): ProgressEmitter
{
if (!isset($GLOBALS['g7_progress_emitter']) || !($GLOBALS['g7_progress_emitter'] instanceof ProgressEmitter)) {
$GLOBALS['g7_progress_emitter'] = new SseEmitter();
}
return $GLOBALS['g7_progress_emitter'];
}
/**
* ProgressEmitter 등록.
*
* 모드별 진입점(install-worker.php / install-process.php 인라인 실행)에서 호출합니다.
*/
function setProgressEmitter(ProgressEmitter $emitter): void
{
$GLOBALS['g7_progress_emitter'] = $emitter;
}
@@ -163,6 +163,13 @@ function handleStep3Post(string $currentLang, array &$formData, array &$errors):
$formData['php_binary'] = $phpBinary !== '' ? $phpBinary : 'php';
$formData['composer_binary'] = trim($formData['composer_binary'] ?? '');
// Vendor 설치 모드 처리 (auto|composer|bundled)
$vendorMode = trim($formData['vendor_mode'] ?? 'auto');
if (! in_array($vendorMode, ['auto', 'composer', 'bundled'], true)) {
$vendorMode = 'auto';
}
$formData['vendor_mode'] = $vendorMode;
// 코어 업데이트 _pending 경로 검증 (입력된 경우만)
$corePendingPath = trim($formData['core_update_pending_path'] ?? '');
if ($corePendingPath !== '') {
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,346 @@
<?php
/**
* Vendor 번들 설치 헬퍼 (웹 인스톨러 전용 shim).
*
* Laravel 부트 전 단계에서 실행되므로 App\Extension\Vendor\VendorBundleInstaller
* 클래스를 사용할 수 없다. 동일한 검증/추출 로직을 순수 PHP로 구현한다.
*
* Laravel 측 클래스와의 동등성은 VendorBundleInstallerShimTest 가 보장한다.
*/
const VENDOR_BUNDLE_SCHEMA_VERSION = '1.0';
const VENDOR_BUNDLE_ZIP_FILENAME = 'vendor-bundle.zip';
const VENDOR_BUNDLE_MANIFEST_FILENAME = 'vendor-bundle.json';
/**
* vendor-bundle.zip 의 무결성을 검증합니다.
*
* @param string $sourceDir vendor-bundle.zip 이 위치한 디렉토리
* @return array{valid: bool, errors: array<string>, meta: array<string, mixed>}
*/
function verifyVendorBundle(string $sourceDir): array
{
$zipPath = $sourceDir.DIRECTORY_SEPARATOR.VENDOR_BUNDLE_ZIP_FILENAME;
$manifestPath = $sourceDir.DIRECTORY_SEPARATOR.VENDOR_BUNDLE_MANIFEST_FILENAME;
if (! file_exists($zipPath)) {
return ['valid' => false, 'errors' => ['bundle_zip_missing'], 'meta' => []];
}
if (! file_exists($manifestPath)) {
return ['valid' => false, 'errors' => ['bundle_manifest_missing'], 'meta' => []];
}
$manifestJson = @file_get_contents($manifestPath);
if ($manifestJson === false) {
return ['valid' => false, 'errors' => ['bundle_manifest_invalid'], 'meta' => []];
}
$manifest = json_decode($manifestJson, true);
if (! is_array($manifest)) {
return ['valid' => false, 'errors' => ['bundle_manifest_invalid'], 'meta' => []];
}
$schemaVersion = $manifest['schema_version'] ?? null;
if ($schemaVersion !== VENDOR_BUNDLE_SCHEMA_VERSION) {
return ['valid' => false, 'errors' => ['bundle_schema_unsupported'], 'meta' => $manifest];
}
$errors = [];
$expectedZipHash = $manifest['zip_sha256'] ?? null;
if ($expectedZipHash === null) {
$errors[] = 'bundle_manifest_invalid';
} else {
$actualZipHash = hash_file('sha256', $zipPath);
if (! hash_equals((string) $expectedZipHash, (string) $actualZipHash)) {
$errors[] = 'zip_hash_mismatch';
}
}
$composerJsonPath = $sourceDir.DIRECTORY_SEPARATOR.'composer.json';
if (file_exists($composerJsonPath)) {
$expected = $manifest['composer_json_sha256'] ?? null;
if ($expected !== null) {
$actual = hash_file('sha256', $composerJsonPath);
if (! hash_equals((string) $expected, (string) $actual)) {
$errors[] = 'composer_json_sha_mismatch';
}
}
}
if (! empty($errors)) {
return ['valid' => false, 'errors' => $errors, 'meta' => $manifest];
}
return ['valid' => true, 'errors' => [], 'meta' => $manifest];
}
/**
* vendor-bundle.zip 을 대상 디렉토리에 추출합니다.
*
* 공유 호스팅 친화적 설계:
* - targetDir 자체(프로젝트 루트)의 쓰기 권한은 요구하지 않음
* - vendor/ 디렉토리 자체는 유지하고 내부 항목만 조작
* - 기존 내용은 vendor/.bundle_backup_{ts}/ 로 이동 (vendor/ 쓰기 권한만으로 가능)
* - 추출 실패 시 백업에서 복원, 성공 시 백업 삭제
*
* @param string $sourceDir vendor-bundle.zip 위치
* @param string $targetDir vendor/ 가 배치될 위치
* @return array{success: bool, error?: string, package_count?: int}
*/
function extractVendorBundle(string $sourceDir, string $targetDir): array
{
if (! class_exists('ZipArchive')) {
return ['success' => false, 'error' => 'zip_archive_not_available'];
}
$integrity = verifyVendorBundle($sourceDir);
if (! $integrity['valid']) {
return [
'success' => false,
'error' => 'bundle_integrity_failed: '.implode(', ', $integrity['errors']),
];
}
$zipPath = $sourceDir.DIRECTORY_SEPARATOR.VENDOR_BUNDLE_ZIP_FILENAME;
$vendorDir = $targetDir.DIRECTORY_SEPARATOR.'vendor';
$backupDirName = '.bundle_backup_'.date('Ymd_His');
$backupDir = $vendorDir.DIRECTORY_SEPARATOR.$backupDirName;
// 쓰기 권한 유연 검사 — vendor/ 가 있으면 vendor/ 권한만, 없으면 targetDir 권한 필요
if (is_dir($vendorDir)) {
if (! is_writable($vendorDir)) {
return ['success' => false, 'error' => 'target_not_writable: '.$vendorDir.buildVendorBundlePermissionHint($vendorDir)];
}
} else {
if (! is_dir($targetDir) || ! is_writable($targetDir)) {
return ['success' => false, 'error' => 'target_not_writable: '.$targetDir.buildVendorBundlePermissionHint($targetDir)];
}
}
// zip slip 사전 검증
$unsafePathError = checkVendorBundleZipSafety($zipPath);
if ($unsafePathError !== null) {
return ['success' => false, 'error' => 'bundle_contains_unsafe_path: '.$unsafePathError];
}
// 기존 vendor/ 내부 항목을 vendor/.bundle_backup_{ts}/ 로 이동
// (vendor/ 디렉토리 자체는 유지 — targetDir 쓰기 권한 불필요)
$hasBackup = false;
if (is_dir($vendorDir)) {
$hasBackup = moveVendorContentsToBackup($vendorDir, $backupDir, $backupDirName);
} else {
// vendor/ 없음 — 신규 생성 (targetDir 쓰기 권한 필요, 위에서 이미 검증)
if (! @mkdir($vendorDir, 0755, true) && ! is_dir($vendorDir)) {
return ['success' => false, 'error' => 'target_not_writable: '.$vendorDir];
}
}
$zip = new ZipArchive;
$openResult = $zip->open($zipPath);
if ($openResult !== true) {
if ($hasBackup && is_dir($backupDir)) {
restoreVendorFromBackup($vendorDir, $backupDir, $backupDirName);
}
return ['success' => false, 'error' => 'extraction_failed: ZipArchive::open failed (code '.$openResult.')'];
}
$extracted = $zip->extractTo($targetDir);
$zip->close();
if (! $extracted) {
if ($hasBackup && is_dir($backupDir)) {
restoreVendorFromBackup($vendorDir, $backupDir, $backupDirName);
}
return ['success' => false, 'error' => 'extraction_failed: ZipArchive::extractTo returned false'];
}
// 성공: 백업 디렉토리 삭제 (vendor/.bundle_backup_{ts}/)
if ($hasBackup && is_dir($backupDir)) {
deleteVendorBundleDirectory($backupDir);
}
return [
'success' => true,
'package_count' => (int) ($integrity['meta']['package_count'] ?? 0),
];
}
/**
* 기존 vendor/ 내부 항목을 vendor/.bundle_backup_{ts}/ 로 이동합니다.
*
* vendor/ 디렉토리 자체는 유지하므로 targetDir 쓰기 권한이 필요하지 않습니다.
*
* @return bool 백업 성공 여부 (false 시 in-place overwrite 로 추출 진행)
*/
function moveVendorContentsToBackup(string $vendorDir, string $backupDir, string $backupDirName): bool
{
if (! @mkdir($backupDir) && ! is_dir($backupDir)) {
return false;
}
$items = @scandir($vendorDir) ?: [];
foreach ($items as $item) {
if ($item === '.' || $item === '..' || $item === $backupDirName) {
continue;
}
$src = $vendorDir.DIRECTORY_SEPARATOR.$item;
$dst = $backupDir.DIRECTORY_SEPARATOR.$item;
@rename($src, $dst);
}
return true;
}
/**
* 백업 디렉토리에서 vendor/ 로 내용을 복원합니다.
*/
function restoreVendorFromBackup(string $vendorDir, string $backupDir, string $backupDirName): void
{
// 추출로 이미 생성된 파일/디렉토리 정리 (백업 폴더 제외)
$items = @scandir($vendorDir) ?: [];
foreach ($items as $item) {
if ($item === '.' || $item === '..' || $item === $backupDirName) {
continue;
}
$path = $vendorDir.DIRECTORY_SEPARATOR.$item;
if (is_dir($path) && ! is_link($path)) {
deleteVendorBundleDirectory($path);
} elseif (file_exists($path)) {
@unlink($path);
}
}
// 백업 항목을 원위치로 이동
$backupItems = @scandir($backupDir) ?: [];
foreach ($backupItems as $item) {
if ($item === '.' || $item === '..') {
continue;
}
$src = $backupDir.DIRECTORY_SEPARATOR.$item;
$dst = $vendorDir.DIRECTORY_SEPARATOR.$item;
@rename($src, $dst);
}
@rmdir($backupDir);
}
/**
* zip 내부 파일 경로의 안전성을 검증합니다 (zip slip 방지).
*/
function checkVendorBundleZipSafety(string $zipPath): ?string
{
$zip = new ZipArchive;
if ($zip->open($zipPath) !== true) {
return 'cannot open zip';
}
for ($i = 0; $i < $zip->numFiles; $i++) {
$name = $zip->getNameIndex($i);
if ($name === false) {
continue;
}
$normalized = str_replace('\\', '/', $name);
if (
str_contains($normalized, '../')
|| str_starts_with($normalized, '/')
|| preg_match('#^[A-Za-z]:/#', $normalized)
) {
$zip->close();
return $name;
}
}
$zip->close();
return null;
}
/**
* 디렉토리 재귀 삭제 (Laravel File 파사드 의존 제거).
*/
function deleteVendorBundleDirectory(string $dir): bool
{
if (! is_dir($dir)) {
return false;
}
$items = scandir($dir);
foreach ($items as $item) {
if ($item === '.' || $item === '..') {
continue;
}
$path = $dir.DIRECTORY_SEPARATOR.$item;
if (is_dir($path)) {
deleteVendorBundleDirectory($path);
} else {
@unlink($path);
}
}
return @rmdir($dir);
}
/**
* Composer 실행이 현재 환경에서 가능한지 검사합니다.
*
* proc_open() 사용 가능 여부 + composer 바이너리 발견 여부를 종합 판단.
*/
function canExecuteComposerForInstall(?string $composerBinary, ?string $phpBinary): bool
{
// proc_open 사용 가능 여부
if (! function_exists('proc_open')) {
return false;
}
$disabled = array_map('trim', explode(',', (string) ini_get('disable_functions')));
if (in_array('proc_open', $disabled, true)) {
return false;
}
// composer 바이너리 결정
$binary = $composerBinary;
if (! $binary) {
// PATH 검색 단계는 인스톨러 환경에서 비용이 크므로 단순화
$binary = 'composer';
}
return ! empty($binary);
}
/**
* 권한 거부 시 진단 힌트를 생성합니다.
*
* 인스톨러는 Laravel __() 사용 불가하므로 순수 PHP로 메시지를 구성합니다.
* (한국어 고정 — 인스톨러는 다국어 지원 범위가 제한적)
*/
function buildVendorBundlePermissionHint(string $path): string
{
if (! function_exists('posix_geteuid') || ! function_exists('posix_getpwuid')) {
return '';
}
$currentUid = posix_geteuid();
$currentUser = posix_getpwuid($currentUid)['name'] ?? (string) $currentUid;
if (! file_exists($path)) {
return " (실행 사용자: {$currentUser})";
}
$ownerUid = fileowner($path);
if ($currentUid === $ownerUid) {
return " (실행 사용자: {$currentUser}, 소유자 동일)";
}
$ownerUser = posix_getpwuid($ownerUid)['name'] ?? (string) $ownerUid;
return " — 실행 사용자({$currentUser})와 디렉토리 소유자({$ownerUser})가 다릅니다. ".
"FTP/SSH로 'chown -R {$currentUser} {$path}' 실행 후 재시도하세요.";
}
+1
View File
@@ -163,6 +163,7 @@ $stepFile = __DIR__ . '/views/' . $currentStep . '-' . (STEP_FILE_MAP[$currentSt
window.INSTALLER_LANG = <?= json_encode($translations ?? [], JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT) ?>;
window.INSTALLER_STATE_LOCALE = <?= json_encode($state['g7_locale'] ?? null) ?>;
</script>
<script src="<?= INSTALLER_BASE_URL ?>/assets/js/installation-monitor.js?v=<?= time() ?>"></script>
<script src="<?= INSTALLER_BASE_URL ?>/assets/js/installer.js?v=<?= time() ?>"></script>
</body>
</html>
+68 -9
View File
@@ -25,9 +25,11 @@ return [
'storage_not_exists_message' => 'The storage folder does not exist. Please create a storage folder in the project root.',
'storage_not_writable' => 'Storage Folder Not Writable',
'storage_not_writable_message' => 'The storage folder is not writable. Please check the folder owner or group permissions.',
'storage_permission_guide' => 'Please grant <strong>:permissions</strong> permission to the Storage folder.',
'storage_ownership_mismatch' => 'Storage Folder Ownership Mismatch',
'storage_ownership_mismatch_message' => 'The storage folder owner (:owner) does not match the web server user (:web_user). Current permissions (:permissions) allow only the owner to write, so the web server cannot write. Please apply one of the options below.',
'storage_permission_guide' => 'Please grant <strong>755</strong> permission to the Storage folder.',
'storage_permission_guide_detail' => 'Run the command below or change permissions via FTP:',
'storage_permission_command_linux' => 'chmod -R :permissions :path',
'storage_permission_command_linux' => 'chmod -R 755 :path',
'current_owner' => 'Owner',
'current_group' => 'Group',
'current_permissions' => 'Permissions',
@@ -71,6 +73,10 @@ return [
'error_disk_space' => 'Disk Space',
'error_directory_permissions' => 'Insufficient directory write permissions',
'error_required_files' => 'Required files missing',
'error_required_files_missing_label' => 'Required files missing',
'error_required_files_not_writable_label' => 'Required files not writable',
'error_required_files_ownership_mismatch_label' => 'Required files ownership mismatch',
'ownership_mismatch_option_666' => '[Alternative 2] Last resort — grant write permission to the file for everyone (reduced security, not recommended):',
'required_files' => 'Required Files',
'file_exists' => 'Exists',
'file_missing' => 'Missing',
@@ -129,7 +135,7 @@ return [
'show_progress' => 'Show Installation List',
'installation_completed' => 'Installation Complete!',
'recommendations' => 'Post-Installation Recommendations',
'recommendation_env_permission' => 'Set .env file permissions to 600 or 644',
'recommendation_env_permission' => 'Set .env file permissions to 644 (chmod 644 .env)',
'recommendation_https' => 'Use HTTPS in production environment',
// Step 5: Complete
@@ -191,7 +197,7 @@ return [
// Error Messages - System (Requirements) (detailed)
'error_php_version_insufficient_detail' => 'PHP version does not meet requirements (current: :current, required: :min+)',
'error_disk_space_insufficient_detail' => 'Insufficient disk space (current: :current MB, required: :min MB)',
'error_directory_not_writable_detail' => 'Some directories are not writable. Please set permissions to :permissions.',
'error_directory_not_writable_detail' => 'Some directories are not writable. Run the command below to grant the permissions.',
'error_required_files_missing' => 'Required files are missing.',
'error_step_file_not_found' => 'Step file not found. Installation files may be corrupted.',
@@ -240,6 +246,8 @@ return [
'task_env_create' => 'Creating Configuration File',
'task_env_update' => 'Updating Configuration File',
'task_key_generate' => 'Generating Security Key',
'task_dependency_precheck' => 'Extension Dependency Precheck',
'task_db_cleanup' => 'Cleaning Up Existing Database Tables',
'task_db_migrate' => 'Creating Database Tables',
'task_db_seed' => 'Initializing Default Data',
'task_template_install' => 'Installing Admin Template',
@@ -277,6 +285,8 @@ return [
// Log Messages - Worker (Composer)
'log_composer_check_success' => 'Composer check completed',
'log_composer_check_skipped_bundled' => 'Composer check skipped — bundled vendor mode',
'log_composer_check_auto_fallback' => 'Composer not installed — will auto-fallback to bundled vendor mode',
'log_composer_already_installed' => 'Composer dependencies are already installed',
'log_composer_install_success' => 'Composer dependency installation completed',
'log_composer_vendor_without_lock' => 'vendor directory exists but composer.lock is missing (incomplete state)',
@@ -544,7 +554,7 @@ location /install/api/ {
</Location>
[PHP Configuration]
// Add to the top of install-worker-sse.php
// Add to the top of install-worker.php
ini_set(\'output_buffering\', \'off\');
ini_set(\'zlib.output_compression\', \'off\');
@apache_setenv(\'no-gzip\', 1);
@@ -553,6 +563,47 @@ ini_set(\'zlib.output_compression\', \'off\');
Contact your hosting provider about SSE (Server-Sent Events) support.
Firewalls or proxies may be blocking long-lived HTTP connections.',
// Installation mode (SSE / polling)
'installation_mode_label' => 'Installation Mode',
'installation_mode_sse_title' => 'Real-time Streaming (SSE) — Recommended',
'installation_mode_sse_desc' => 'The server streams progress in real time. Fastest and most reliable in standard environments.',
'installation_mode_polling_title' => 'Compatibility Mode (Polling)',
'installation_mode_polling_desc' => 'Use this when SSE connection errors occur behind an Nginx proxy, shared hosting, etc. Status is polled every second.',
'sse_fallback_confirm' => 'SSE connection failed.\n\nWould you like to retry in compatibility mode (polling)?',
'start_installation_button' => 'Start Installation',
// Step 4 dependency warnings
'dependency_warning_title' => 'Missing Dependencies Detected',
'dependency_warning_description' => 'The following extensions are required. Click "Auto-select required items" to resolve them in one click.',
'dependency_auto_select' => 'Auto-select required items',
'dependency_missing_tooltip' => 'Please resolve dependencies first',
'dependency_precheck_failed' => 'Dependency precheck failed — return to Step 4 and select the missing modules/plugins',
// Step 3 existing database detection (issue #244)
'db_existing_g7_badge' => 'Existing G7 installation detected',
'db_existing_foreign_badge' => 'Foreign data detected',
'db_existing_mixed_badge' => 'Mixed G7 + foreign tables',
'db_existing_g7_title' => 'Existing G7 Installation Detected',
'db_existing_foreign_title' => 'Foreign Data Detected',
'db_existing_mixed_title' => 'Mixed Data Detected',
'db_existing_generic_title' => 'Existing Tables Detected',
'db_existing_g7_desc' => 'The selected database already contains a G7 installation. Forcing the install will delete all existing data. Back up first.',
'db_existing_foreign_desc' => 'The selected database contains unknown tables. Forcing the install will drop all of them. Consider using another database or back up first.',
'db_existing_mixed_desc' => 'The selected database contains a mix of G7 and other tables. Forcing the install will drop all of them.',
'db_existing_generic_desc' => 'The selected database contains existing tables. Forcing the install will drop all of them.',
'db_existing_tables_list' => 'Detected tables (up to 20):',
'db_backup_guide' => 'Backup command example (verify host/user/database before running):',
'db_backup_confirmed' => 'I have backed up and agree that all existing tables will be dropped',
'error_db_cleanup_consent_required' => 'You must consent to dropping existing tables before proceeding to the next step.',
'db_force_proceed_drop' => 'Drop all existing tables and install',
'db_force_proceed_confirmed' => 'Force install mode (existing tables will be dropped)',
'cancel' => 'Cancel',
'log_db_cleanup_skipped' => 'Skipping existing table cleanup (no action)',
'log_db_cleanup_empty' => 'No existing tables. Skipping cleanup.',
'log_db_cleanup_dropping' => 'Dropping {count} existing tables...',
'log_db_cleanup_done' => 'Dropped {count} existing tables.',
'error_db_cleanup_failed' => 'Failed to clean up existing database tables',
// Dark Mode
'toggle_theme' => 'Toggle Theme',
'dark_mode' => 'Dark Mode',
@@ -589,6 +640,10 @@ Firewalls or proxies may be blocking long-lived HTTP connections.',
'dependency_type_admin_template' => 'Admin Template',
'dependency_type_user_template' => 'User Template',
'dependency_type_other' => 'Other',
'dep_auto_badge_label' => 'Required dependency',
'dep_lock_message' => ':names requires this item. Please deselect that extension first.',
'dep_version_required' => 'Required',
'dep_version_available' => 'Available',
'author' => 'Author',
'retry' => 'Retry',
'select_all' => 'Select All',
@@ -682,10 +737,13 @@ Firewalls or proxies may be blocking long-lived HTTP connections.',
'copied' => 'Copied!',
// Step 2 permission guidance
'permission_fix_guide' => 'Run the following command in your terminal to fix permissions:',
'ownership_fix_guide' => 'Change the ownership to the web server user:',
'ownership_fix_hint' => '※ www-data is the web server user/group. Change it to nginx, apache, etc. depending on your environment.',
'ownership_detected_hint' => '※ Current web server user: :user (auto-detected)',
'permission_fix_guide' => 'Run the following command in your terminal or SSH to grant permissions:',
'ownership_mismatch_option_group' => '[Recommended] Group sharing — change group to the web server user and grant write permission:',
'ownership_mismatch_option_chown' => '[Alternative 1] Change owner — transfer ownership to the web server user:',
'ownership_mismatch_option_777' => '[Alternative 2] Last resort — grant write permission to everyone (reduced security, not recommended):',
'ownership_mismatch_hint' => '※ Current owner: :owner / Web server user: :web_user. Choose the option that matches your environment.',
'permission_fallback_title' => 'If the command above does not resolve the issue',
'permission_fallback_detail' => 'Some environments (e.g. dedicated servers) may require: chmod -R 775 :path',
'permission_windows_hint' => '※ On Windows, open Command Prompt (cmd) as Administrator and run the command. Alternatively, you can set permissions via folder Properties → Security tab.',
'directory_create_guide' => 'Run the following command to create the missing directories:',
@@ -761,6 +819,7 @@ Firewalls or proxies may be blocking long-lived HTTP connections.',
'cli_status_checking' => 'Checking...',
'cli_status_verified' => '✓ Verified',
'cli_status_not_verified' => '✗ Not verified',
'cli_status_optional_bundled' => '— Optional (bundled mode)',
// Environment Check Enhancements
'required_functions' => 'Required Functions',
+68 -9
View File
@@ -25,9 +25,11 @@ return [
'storage_not_exists_message' => 'Storage 폴더가 존재하지 않습니다. 프로젝트 루트에 storage 폴더를 생성해주세요.',
'storage_not_writable' => 'Storage 폴더 쓰기 권한 없음',
'storage_not_writable_message' => 'Storage 폴더에 쓰기 권한이 없습니다. 폴더 소유자 또는 그룹 권한을 확인해주세요.',
'storage_permission_guide' => 'Storage 폴더에 <strong>:permissions</strong> 권한을 부여해주세요.',
'storage_ownership_mismatch' => 'Storage 폴더 소유자 불일치',
'storage_ownership_mismatch_message' => 'Storage 폴더의 소유자(:owner)가 웹서버 실행 사용자(:web_user)와 다릅니다. 현재 권한(:permissions)은 소유자만 쓰기 가능하므로 웹서버가 쓸 수 없습니다. 아래 방법 중 하나를 적용해주세요.',
'storage_permission_guide' => 'Storage 폴더에 <strong>755</strong> 권한을 부여해주세요.',
'storage_permission_guide_detail' => '아래 명령어를 실행하거나 FTP를 통해 권한을 변경하세요:',
'storage_permission_command_linux' => 'chmod -R :permissions :path',
'storage_permission_command_linux' => 'chmod -R 755 :path',
'current_owner' => '현재 소유자',
'current_group' => '현재 소유그룹',
'current_permissions' => '현재 권한',
@@ -71,6 +73,10 @@ return [
'error_disk_space' => '디스크 공간',
'error_directory_permissions' => '디렉토리 쓰기 권한 부족',
'error_required_files' => '필수 파일 누락',
'error_required_files_missing_label' => '필수 파일 누락',
'error_required_files_not_writable_label' => '필수 파일 쓰기 권한 없음',
'error_required_files_ownership_mismatch_label' => '필수 파일 소유자 불일치',
'ownership_mismatch_option_666' => '[대안 2] 최후 수단 — 파일에 모든 사용자 쓰기 허용 (보안 약화, 비권장):',
'required_files' => '필수 파일',
'file_exists' => '존재',
'file_missing' => '누락',
@@ -129,7 +135,7 @@ return [
'show_progress' => '설치 목록 보기',
'installation_completed' => '설치가 완료되었습니다!',
'recommendations' => '설치 후 권장사항',
'recommendation_env_permission' => '.env 파일 권한을 600 또는 644로 설정하세요',
'recommendation_env_permission' => '.env 파일 권한을 644로 설정하세요 (chmod 644 .env)',
'recommendation_https' => '프로덕션 환경에서는 반드시 HTTPS를 사용하세요',
// Step 5: 완료
@@ -191,7 +197,7 @@ return [
// 에러 메시지 - 시스템 (요구사항) (상세)
'error_php_version_insufficient_detail' => 'PHP 버전이 요구사항을 충족하지 않습니다. (현재: :current, 요구: :min+)',
'error_disk_space_insufficient_detail' => '디스크 공간이 부족합니다. (현재: :current MB, 요구: :min MB)',
'error_directory_not_writable_detail' => '일부 디렉토리에 쓰기 권한이 없습니다. 권한을 :permissions로 설정해주세요.',
'error_directory_not_writable_detail' => '일부 디렉토리에 쓰기 권한이 없습니다. 아래 명령어를 실행하여 권한을 부여해주세요.',
'error_required_files_missing' => '필수 파일이 누락되었습니다.',
'error_step_file_not_found' => '단계 파일을 찾을 수 없습니다. 설치 파일이 손상되었을 수 있습니다.',
@@ -240,6 +246,8 @@ return [
'task_env_create' => '환경 설정 파일 생성',
'task_env_update' => '환경 설정 파일 업데이트',
'task_key_generate' => '보안 키 생성',
'task_dependency_precheck' => '확장 의존성 사전 검증',
'task_db_cleanup' => '기존 DB 테이블 정리',
'task_db_migrate' => '데이터베이스 테이블 생성',
'task_db_seed' => '기본 데이터 생성',
'task_template_install' => '관리자 템플릿 설치',
@@ -277,6 +285,8 @@ return [
// 로그 메시지 - Worker (Composer)
'log_composer_check_success' => 'Composer 확인 완료',
'log_composer_check_skipped_bundled' => 'Composer 확인 스킵 — 번들 vendor 모드',
'log_composer_check_auto_fallback' => 'Composer 미설치 — 번들 vendor 모드로 자동 폴백 예정',
'log_composer_already_installed' => 'Composer 의존성이 이미 설치되어 있습니다',
'log_composer_install_success' => 'Composer 의존성 설치 완료',
'log_composer_vendor_without_lock' => 'vendor 디렉토리는 있지만 composer.lock 파일이 없습니다 (불완전 상태)',
@@ -544,7 +554,7 @@ location /install/api/ {
</Location>
[PHP 설정]
// install-worker-sse.php 최상단에 추가
// install-worker.php 최상단에 추가
ini_set(\'output_buffering\', \'off\');
ini_set(\'zlib.output_compression\', \'off\');
@apache_setenv(\'no-gzip\', 1);
@@ -553,6 +563,47 @@ ini_set(\'zlib.output_compression\', \'off\');
호스팅 제공업체에 SSE(Server-Sent Events) 지원 여부를 문의해주세요.
방화벽이나 프록시에서 long-lived HTTP 연결을 차단하고 있을 수 있습니다.',
// 설치 진행 방식 (SSE / 폴링)
'installation_mode_label' => '설치 진행 방식',
'installation_mode_sse_title' => '실시간 스트리밍 (SSE) — 권장',
'installation_mode_sse_desc' => '서버가 진행 상황을 즉시 전송합니다. 일반 환경에서 가장 빠르고 안정적입니다.',
'installation_mode_polling_title' => '호환성 모드 (폴링)',
'installation_mode_polling_desc' => 'Nginx 프록시, 공유 호스팅 등 SSE 연결 오류가 발생하는 환경에서 사용하세요. 1초마다 상태를 확인합니다.',
'sse_fallback_confirm' => 'SSE 연결에 실패했습니다.\n\n호환성 모드(폴링)로 다시 시도하시겠습니까?',
'start_installation_button' => '설치 시작',
// Step 4 의존성 경고
'dependency_warning_title' => '의존성 누락 감지',
'dependency_warning_description' => '다음 확장이 필요합니다. "필요한 항목 자동 선택" 버튼을 눌러 한 번에 해결할 수 있습니다.',
'dependency_auto_select' => '필요한 항목 자동 선택',
'dependency_missing_tooltip' => '의존성을 먼저 해결해주세요',
'dependency_precheck_failed' => '의존성 사전 검증 실패 — Step 4로 돌아가 누락된 모듈/플러그인을 선택해주세요',
// Step 3 기존 DB 감지 (이슈 #244)
'db_existing_g7_badge' => '기존 그누보드7 설치 감지',
'db_existing_foreign_badge' => '다른 데이터 감지',
'db_existing_mixed_badge' => 'G7 일부 + 다른 테이블 혼재',
'db_existing_g7_title' => '그누보드7 기존 설치 감지',
'db_existing_foreign_title' => '다른 데이터 감지',
'db_existing_mixed_title' => '데이터 혼재 감지',
'db_existing_generic_title' => '기존 테이블 감지',
'db_existing_g7_desc' => '선택한 DB에 이미 그누보드7이 설치되어 있습니다. 강제 진행 시 기존 데이터가 모두 삭제됩니다. 반드시 백업 후 진행하세요.',
'db_existing_foreign_desc' => '선택한 DB에 알 수 없는 테이블이 존재합니다. 강제 진행 시 모든 테이블이 삭제됩니다. 다른 DB를 사용하거나 반드시 백업 후 진행하세요.',
'db_existing_mixed_desc' => '선택한 DB에 G7 일부 테이블과 다른 테이블이 혼재합니다. 강제 진행 시 모든 테이블이 삭제됩니다.',
'db_existing_generic_desc' => '선택한 DB에 기존 테이블이 존재합니다. 강제 진행 시 모든 테이블이 삭제됩니다.',
'db_existing_tables_list' => '감지된 테이블 (최대 20개):',
'db_backup_guide' => '백업 명령어 예시 (호스트/사용자/데이터베이스명 확인 후 실행하세요):',
'db_backup_confirmed' => '백업을 완료했으며, 기존 테이블이 모두 삭제되는 것에 동의합니다',
'error_db_cleanup_consent_required' => '기존 테이블 삭제에 동의하셔야 다음 단계로 진행할 수 있습니다.',
'db_force_proceed_drop' => '기존 테이블 모두 삭제 후 설치',
'db_force_proceed_confirmed' => '강제 진행 모드 (설치 시 기존 테이블 삭제)',
'cancel' => '취소',
'log_db_cleanup_skipped' => '기존 테이블 정리 건너뛰기 (액션 없음)',
'log_db_cleanup_empty' => '기존 테이블이 없습니다. 정리 건너뛰기',
'log_db_cleanup_dropping' => '기존 테이블 {count}개 삭제 시작...',
'log_db_cleanup_done' => '기존 테이블 {count}개 삭제 완료',
'error_db_cleanup_failed' => '기존 DB 테이블 정리 실패',
// 다크모드
'toggle_theme' => '테마 전환',
'dark_mode' => '다크 모드',
@@ -589,6 +640,10 @@ ini_set(\'zlib.output_compression\', \'off\');
'dependency_type_admin_template' => '관리자 템플릿',
'dependency_type_user_template' => '사용자 템플릿',
'dependency_type_other' => '기타',
'dep_auto_badge_label' => '필수 의존성',
'dep_lock_message' => ':names 이(가) 이 항목을 필요로 합니다. 먼저 해당 확장을 해제해주세요.',
'dep_version_required' => '필요 버전',
'dep_version_available' => '설치 가능 버전',
'author' => '제작자',
'retry' => '재시도',
'select_all' => '전체 선택',
@@ -682,10 +737,13 @@ ini_set(\'zlib.output_compression\', \'off\');
'copied' => '복사됨!',
// Step 2 권한 안내
'permission_fix_guide' => '아래 명령어를 터미널에서 실행하여 권한을 수정하세요:',
'ownership_fix_guide' => '소유자와 그룹을 웹 서버 사용자로 변경하세요:',
'ownership_fix_hint' => '※ www-data는 웹 서버 사용자/그룹입니다. 사용 환경에 따라 nginx, apache 등으로 변경하세요.',
'ownership_detected_hint' => '※ 현재 웹 서버 사용자: :user (자동 감지)',
'permission_fix_guide' => '아래 명령어를 터미널 또는 SSH에서 실행하여 권한을 부여하세요:',
'ownership_mismatch_option_group' => '[권장] 그룹 공유 방식 — 웹서버 그룹으로 변경하여 쓰기 권한 부여:',
'ownership_mismatch_option_chown' => '[대안 1] 소유자 변경 — 소유자를 웹서버 사용자로 변경:',
'ownership_mismatch_option_777' => '[대안 2] 최후 수단 — 모든 사용자에게 쓰기 허용 (보안 약화, 비권장):',
'ownership_mismatch_hint' => '※ 현재 소유자: :owner / 웹서버 실행 사용자: :web_user. 위 3가지 중 환경에 맞는 방법을 선택하세요.',
'permission_fallback_title' => '위 명령어로 해결되지 않는 경우',
'permission_fallback_detail' => '전용 서버 등 일부 환경에서는 다음 명령어가 필요할 수 있습니다: chmod -R 775 :path',
'permission_windows_hint' => '※ Windows 환경에서는 관리자 권한으로 명령 프롬프트(cmd)를 열고 실행하세요. 또는 폴더 속성 → 보안 탭에서 권한을 설정할 수 있습니다.',
'directory_create_guide' => '아래 명령어를 실행하여 누락된 디렉토리를 생성하세요:',
@@ -761,6 +819,7 @@ ini_set(\'zlib.output_compression\', \'off\');
'cli_status_checking' => '확인 중...',
'cli_status_verified' => '✓ 확인됨',
'cli_status_not_verified' => '✗ 미확인',
'cli_status_optional_bundled' => '— 선택사항 (번들 모드)',
// 환경 체크 강화
'required_functions' => '필수 함수',
+49 -39
View File
@@ -48,6 +48,8 @@ $storageResult = $storageCheck['results']['storage'] ?? null;
// 에러 타입에 따른 제목 표시
if ($storageResult['error_type'] === 'not_exists') {
echo lang('storage_not_exists');
} elseif ($storageResult['error_type'] === 'ownership_mismatch') {
echo lang('storage_ownership_mismatch');
} elseif ($storageResult['error_type'] === 'not_writable') {
echo lang('storage_not_writable');
} else {
@@ -61,6 +63,12 @@ $storageResult = $storageCheck['results']['storage'] ?? null;
// 에러 타입에 따른 메시지 표시
if ($storageResult['error_type'] === 'not_exists') {
echo lang('storage_not_exists_message');
} elseif ($storageResult['error_type'] === 'ownership_mismatch') {
echo lang('storage_ownership_mismatch_message', [
'owner' => $storageResult['owner'] ?? '?',
'web_user' => $storageResult['web_server_user'] ?? 'www-data',
'permissions' => $storageResult['permissions'] ?? '?',
]);
} elseif ($storageResult['error_type'] === 'not_writable') {
echo lang('storage_not_writable_message');
} else {
@@ -70,11 +78,9 @@ $storageResult = $storageCheck['results']['storage'] ?? null;
</p>
<div class="alert-details">
<?php
$detectedUser = getWebServerUser();
$webGroup = getWebServerGroup() ?? getWebServerUser() ?? 'www-data';
$storagePath = BASE_PATH . '/storage';
$relativeStorage = './storage';
?>
<?php $relativeStorage = './storage'; ?>
<?php if ($storageResult['error_type'] === 'not_exists'): ?>
<!-- 디렉토리 미존재: mkdir 명령어 안내 -->
<p class="fix-guide-label"><?= lang('directory_create_guide') ?></p>
@@ -95,7 +101,35 @@ $storageResult = $storageCheck['results']['storage'] ?? null;
<?php endif; ?>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<?php elseif (in_array($storageResult['error_type'], ['not_writable', 'permission_too_low', 'permission_low_but_writable', 'subdirectory_issues'])): ?>
<?php elseif ($storageResult['error_type'] === 'ownership_mismatch'): ?>
<?php
$webUser = $storageResult['web_server_user'] ?? 'www-data';
$owner = $storageResult['owner'] ?? 'unknown';
// 그룹 쓰기 비트(020) 이미 설정되어 있으면 chmod 생략 (예: 775 → chgrp만)
$storagePermsOctal = octdec($storageResult['permissions'] ?? '755');
$storageGroupWritable = ($storagePermsOctal & 0020) !== 0;
$groupCommand = $storageGroupWritable
? "sudo chgrp -R {$webUser} {$storagePath}"
: "sudo chgrp -R {$webUser} {$storagePath} && sudo chmod -R 775 {$storagePath}";
?>
<!-- 소유권 불일치: 3가지 해결 옵션 제시 (공유 그룹 권장 > 소유자 변경 > 777) -->
<p class="fix-guide-label"><?= lang('ownership_mismatch_option_group') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars($groupCommand) ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<p class="fix-guide-label" style="margin-top: 1rem;"><?= lang('ownership_mismatch_option_chown') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars("sudo chown -R {$webUser}:{$webUser} {$storagePath}") ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<p class="fix-guide-label" style="margin-top: 1rem;"><?= lang('ownership_mismatch_option_777') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars("chmod -R 777 {$storagePath}") ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<p class="fix-guide-hint" style="margin-top: 0.75rem;"><?= lang('ownership_mismatch_hint', ['owner' => htmlspecialchars($owner), 'web_user' => htmlspecialchars($webUser)]) ?></p>
<?php elseif (in_array($storageResult['error_type'], ['not_writable', 'not_readable', 'subdirectory_issues'])): ?>
<?php if (isWindows()): ?>
<!-- Windows: icacls 명령어 안내 -->
<p class="fix-guide-label"><?= lang('permission_fix_guide') ?></p>
@@ -110,36 +144,17 @@ $storageResult = $storageCheck['results']['storage'] ?? null;
</div>
<p class="fix-guide-hint"><?= lang('permission_windows_hint') ?></p>
<?php else: ?>
<!-- Linux/Mac: chmod (+ chown if owner ≠ web user) 명령어 안내 -->
<?php $ownerIsWebUser = $detectedUser && ($storageResult['owner'] ?? null) === $detectedUser; ?>
<?php if ($ownerIsWebUser): ?>
<p class="fix-guide-label"><?= lang('permission_fix_guide') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars('chmod -R 2770 ' . $storagePath) ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<p class="fix-guide-hint"><?= lang('or_relative_path') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars('chmod -R 2770 ' . $relativeStorage) ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<?php else: ?>
<p class="fix-guide-label"><?= lang('ownership_fix_guide') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars('sudo chown -R ' . $webGroup . ':' . $webGroup . ' ' . $storagePath . ' && sudo chmod -R 2770 ' . $storagePath) ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<p class="fix-guide-hint"><?= lang('or_relative_path') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars('sudo chown -R ' . $webGroup . ':' . $webGroup . ' ' . $relativeStorage . ' && sudo chmod -R 2770 ' . $relativeStorage) ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<?php if ($detectedUser): ?>
<p class="fix-guide-hint"><?= lang('ownership_detected_hint', ['user' => htmlspecialchars($detectedUser)]) ?></p>
<?php else: ?>
<p class="fix-guide-hint"><?= lang('ownership_fix_hint') ?></p>
<?php endif; ?>
<?php endif; ?>
<!-- Linux/Mac: chmod 755 단일 명령어 (chown 의존성 제거) -->
<p class="fix-guide-label"><?= lang('permission_fix_guide') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars('chmod -R 755 ' . $storagePath) ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<p class="fix-guide-hint"><?= lang('or_relative_path') ?></p>
<div class="code-box">
<pre class="fix-command"><?= htmlspecialchars('chmod -R 755 ' . $relativeStorage) ?></pre>
<button class="btn-copy" onclick="copyWelcomeCommand(this)"><?= lang('copy_command') ?></button>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="permission-details">
@@ -149,11 +164,6 @@ $storageResult = $storageCheck['results']['storage'] ?? null;
<span class="permission-badge badge-current"><?= htmlspecialchars($storageResult['group'] ?? lang('unknown')) ?></span>
<span class="permission-label"><?= lang('current_permissions') ?>:</span>
<span class="permission-badge badge-current"><?= $storageResult['permissions'] ?></span>
<?php if (in_array($storageResult['error_type'], ['permission_too_low', 'permission_low_but_writable'])): ?>
<span class="permission-arrow">→</span>
<span class="permission-label"><?= lang('required_permissions') ?>:</span>
<span class="permission-badge badge-required"><?= $storageResult['required_permissions'] ?></span>
<?php endif; ?>
</div>
</div>
</div>
+175 -6
View File
@@ -373,6 +373,125 @@ $dbReadHash = getDatabaseFieldHash($formData, 'db_read');
</div>
</div>
<!-- ========== Vendor 설치 방식 ========== -->
<?php
$bundleZipExists = file_exists(BASE_PATH . '/vendor-bundle.zip');
$zipArchiveAvailable = class_exists('ZipArchive');
$procOpenAvailable = function_exists('proc_open')
&& !in_array('proc_open', array_map('trim', explode(',', (string) ini_get('disable_functions'))), true);
$bundleAvailable = $bundleZipExists && $zipArchiveAvailable;
$composerAvailable = $procOpenAvailable;
$currentVendorMode = $formData['vendor_mode'] ?? 'auto';
?>
<div class="requirement-card">
<div class="requirement-card-header">
<h2 class="card-title">Vendor 설치 방식</h2>
<p class="card-description">
PHP 패키지 의존성(vendor/) 을 어떤 방식으로 설치할지 선택합니다.
</p>
</div>
<div class="requirement-card-body">
<div class="vendor-mode-cards">
<!-- 자동 (권장) -->
<label class="vendor-mode-card <?= $currentVendorMode === 'auto' ? 'selected' : '' ?>">
<input type="radio" name="vendor_mode" value="auto" class="vendor-mode-card-input"
<?= $currentVendorMode === 'auto' ? 'checked' : '' ?>>
<div class="vendor-mode-card-header">
<div class="vendor-mode-card-icon"><?= getSvgIcon('magic') ?: '✨' ?></div>
<div class="vendor-mode-card-title-wrapper">
<h3 class="vendor-mode-card-title">자동</h3>
<span class="vendor-mode-card-badge vendor-mode-card-badge-recommended">권장</span>
</div>
<div class="vendor-mode-card-check"><?= getSvgIcon('check-circle') ?: '◉' ?></div>
</div>
<p class="vendor-mode-card-description">
Composer 사용 가능 시 Composer, 불가 시 번들 vendor 사용
</p>
<p class="vendor-mode-card-status vendor-mode-card-status-ok">
<?= getSvgIcon('check') ?: '✓' ?> 환경 자동 감지
</p>
</label>
<!-- Composer 실행 -->
<label class="vendor-mode-card <?= $currentVendorMode === 'composer' ? 'selected' : '' ?> <?= $composerAvailable ? '' : 'disabled' ?>">
<input type="radio" name="vendor_mode" value="composer" class="vendor-mode-card-input"
<?= $currentVendorMode === 'composer' ? 'checked' : '' ?>
<?= $composerAvailable ? '' : 'disabled' ?>>
<div class="vendor-mode-card-header">
<div class="vendor-mode-card-icon"><?= getSvgIcon('terminal') ?: '⚙' ?></div>
<div class="vendor-mode-card-title-wrapper">
<h3 class="vendor-mode-card-title">Composer 실행</h3>
<span class="vendor-mode-card-badge vendor-mode-card-badge-dev">개발 환경</span>
</div>
<div class="vendor-mode-card-check"><?= getSvgIcon('check-circle') ?: '◉' ?></div>
</div>
<p class="vendor-mode-card-description">
composer install 명령으로 최신 버전 설치 (인터넷 + proc_open 필수)
</p>
<?php if (!$composerAvailable): ?>
<p class="vendor-mode-card-status vendor-mode-card-status-error">
<?= getSvgIcon('warning') ?: '⚠' ?> proc_open() 차단됨 — 사용 불가
</p>
<?php else: ?>
<p class="vendor-mode-card-status vendor-mode-card-status-ok">
<?= getSvgIcon('check') ?: '✓' ?> proc_open 사용 가능
</p>
<?php endif; ?>
</label>
<!-- 번들 Vendor 사용 -->
<label class="vendor-mode-card <?= $currentVendorMode === 'bundled' ? 'selected' : '' ?> <?= $bundleAvailable ? '' : 'disabled' ?>">
<input type="radio" name="vendor_mode" value="bundled" class="vendor-mode-card-input"
<?= $currentVendorMode === 'bundled' ? 'checked' : '' ?>
<?= $bundleAvailable ? '' : 'disabled' ?>>
<div class="vendor-mode-card-header">
<div class="vendor-mode-card-icon"><?= getSvgIcon('package') ?: '📦' ?></div>
<div class="vendor-mode-card-title-wrapper">
<h3 class="vendor-mode-card-title">번들 Vendor 사용</h3>
<span class="vendor-mode-card-badge vendor-mode-card-badge-shared">공유 호스팅</span>
</div>
<div class="vendor-mode-card-check"><?= getSvgIcon('check-circle') ?: '◉' ?></div>
</div>
<p class="vendor-mode-card-description">
vendor-bundle.zip 을 추출 (오프라인 설치, composer 불필요)
</p>
<?php if (!$zipArchiveAvailable): ?>
<p class="vendor-mode-card-status vendor-mode-card-status-error">
<?= getSvgIcon('warning') ?: '⚠' ?> ZipArchive 확장 미설치 — 사용 불가
</p>
<?php elseif (!$bundleZipExists): ?>
<p class="vendor-mode-card-status vendor-mode-card-status-error">
<?= getSvgIcon('warning') ?: '⚠' ?> vendor-bundle.zip 파일 없음 — 사용 불가
</p>
<?php else: ?>
<p class="vendor-mode-card-status vendor-mode-card-status-ok">
<?= getSvgIcon('check') ?: '✓' ?> vendor-bundle.zip 발견
</p>
<?php endif; ?>
</label>
</div>
<p class="form-help" style="margin-top: var(--spacing-md);">
이 설정은 추후 <code>php artisan core:update --vendor-mode=...</code> 옵션으로 변경할 수 있습니다.
</p>
<script>
// Vendor 모드 카드 — 라디오 변경 시 .selected 클래스 동기화
(function () {
const cards = document.querySelectorAll('.vendor-mode-card');
cards.forEach(function (card) {
const input = card.querySelector('.vendor-mode-card-input');
if (!input) return;
input.addEventListener('change', function () {
if (input.checked) {
cards.forEach(function (c) { c.classList.remove('selected'); });
card.classList.add('selected');
}
});
});
})();
</script>
</div>
</div>
<!-- 네비게이션 -->
<div class="btn-group btn-group-spread">
<button type="button" onclick="goToStep(2)" class="btn btn-secondary">
@@ -407,6 +526,22 @@ window.CliValidator = {
composerVerified: false,
cliRequired: false, // 기본 php 사용 불가 시 true
/**
* Composer 검증이 필수인지 여부 — vendor_mode='bundled' 에서는 선택사항.
*/
isComposerRequired() {
const mode = this.getSelectedVendorMode();
return mode !== 'bundled';
},
/**
* 현재 선택된 vendor_mode 값 (auto/composer/bundled).
*/
getSelectedVendorMode() {
const input = document.querySelector('input[name="vendor_mode"]:checked');
return input ? input.value : 'auto';
},
setPhpVerified(verified) {
this.phpVerified = verified;
this.updateStatusDisplay();
@@ -426,7 +561,13 @@ window.CliValidator = {
// 섹션이 닫혀 있고 필수가 아니면 검증 불필요
if (!this.cliRequired) return true;
}
return this.phpVerified && this.composerVerified;
if (!this.phpVerified) return false;
// Composer 는 vendor_mode='bundled' 에서는 검증 불필요
if (this.isComposerRequired() && !this.composerVerified) return false;
return true;
},
updateStatusDisplay() {
@@ -442,10 +583,16 @@ window.CliValidator = {
: '<?= lang("cli_status_not_verified") ?>';
phpStatus.style.color = this.phpVerified ? 'var(--success-color)' : 'var(--error-color)';
composerStatus.textContent = this.composerVerified
? '<?= lang("cli_status_verified") ?>'
: '<?= lang("cli_status_not_verified") ?>';
composerStatus.style.color = this.composerVerified ? 'var(--success-color)' : 'var(--error-color)';
const composerOptional = !this.isComposerRequired();
if (composerOptional) {
composerStatus.textContent = '<?= lang("cli_status_optional_bundled") ?>';
composerStatus.style.color = 'var(--text-muted-color, #888)';
} else {
composerStatus.textContent = this.composerVerified
? '<?= lang("cli_status_verified") ?>'
: '<?= lang("cli_status_not_verified") ?>';
composerStatus.style.color = this.composerVerified ? 'var(--success-color)' : 'var(--error-color)';
}
},
updateSubmitButton() {
@@ -453,6 +600,19 @@ window.CliValidator = {
}
};
// vendor_mode 라디오 변경 시 CLI 검증 상태 표시 갱신 (Composer 검증 필수/선택 전환)
document.addEventListener('change', function (e) {
if (e.target && e.target.name === 'vendor_mode') {
window.CliValidator.updateStatusDisplay();
// bundled 모드 전환 시 Composer 설치 안내 숨김
if (e.target.value === 'bundled') {
const guide = document.getElementById('composer-install-guide');
if (guide) guide.style.display = 'none';
}
}
});
// PHP CLI 설정 토글
document.getElementById('show-php-cli-settings')?.addEventListener('change', function() {
const section = document.getElementById('php-cli-section');
@@ -656,9 +816,18 @@ async function testComposer() {
}
/**
* Composer 설치 안내를 PHP 경로 반영하여 동적 생성
* Composer 설치 안내를 PHP 경로 반영하여 동적 생성.
*
* vendor_mode='bundled' 에서는 Composer 가 불필요하므로 안내를 띄우지 않는다.
*/
function showComposerInstallGuide() {
// 번들 모드에서는 Composer 가 불필요 → 안내 생략
if (window.CliValidator && !window.CliValidator.isComposerRequired()) {
const g = document.getElementById('composer-install-guide');
if (g) g.style.display = 'none';
return;
}
const guide = document.getElementById('composer-install-guide');
if (!guide) return;
+18 -1
View File
@@ -137,6 +137,19 @@
</div>
</div>
<!-- 의존성 경고 (누락 의존성 존재 시 표시) -->
<div id="dependency-warning" class="alert alert-warning hidden">
<h4 class="alert-title">
<i class="fas fa-exclamation-triangle"></i>
<?= htmlspecialchars(lang('dependency_warning_title')) ?>
</h4>
<p><?= htmlspecialchars(lang('dependency_warning_description')) ?></p>
<ul id="dependency-warning-list" class="dependency-warning-list"></ul>
<button type="button" onclick="autoSelectMissingDependencies()" class="btn btn-sm btn-primary">
<?= htmlspecialchars(lang('dependency_auto_select')) ?>
</button>
</div>
<!-- 네비게이션 -->
<div class="btn-group btn-group-spread">
<button type="button" onclick="goToStep(3)" class="btn btn-secondary">
@@ -161,6 +174,10 @@ window.EXTENSION_LABELS = {
saving: <?= json_encode(lang('saving')) ?>,
save_failed: <?= json_encode(lang('save_failed')) ?>,
next: <?= json_encode(lang('next')) ?>,
extension_load_failed: <?= json_encode(lang('extension_load_failed')) ?>
extension_load_failed: <?= json_encode(lang('extension_load_failed')) ?>,
dep_auto_badge_label: <?= json_encode(lang('dep_auto_badge_label')) ?>,
dep_lock_message: <?= json_encode(lang('dep_lock_message')) ?>,
dep_version_required: <?= json_encode(lang('dep_version_required')) ?>,
dep_version_available: <?= json_encode(lang('dep_version_available')) ?>
};
</script>
+34 -2
View File
@@ -77,12 +77,44 @@ $config = $state['config'] ?? $_SESSION['install_config'] ?? [];
echo renderInstallResultSection('failure', 'error', 'installation_failed', '', $failureButtons);
?>
<div class="alert alert-warning" id="install-warning">
<!-- 설치 진행 방식 선택 (SSE / 폴링) -->
<div class="requirement-card installation-mode-card" id="installation-mode-card">
<div class="requirement-card-header">
<h3 class="requirement-card-title"><?= htmlspecialchars(lang('installation_mode_label')) ?></h3>
</div>
<div class="requirement-card-body">
<div class="installation-mode-options">
<label class="installation-mode-option">
<input type="radio" name="installation_mode" value="sse" checked>
<div class="installation-mode-text">
<strong><?= htmlspecialchars(lang('installation_mode_sse_title')) ?></strong>
<span class="installation-mode-desc"><?= htmlspecialchars(lang('installation_mode_sse_desc')) ?></span>
</div>
</label>
<label class="installation-mode-option">
<input type="radio" name="installation_mode" value="polling">
<div class="installation-mode-text">
<strong><?= htmlspecialchars(lang('installation_mode_polling_title')) ?></strong>
<span class="installation-mode-desc"><?= htmlspecialchars(lang('installation_mode_polling_desc')) ?></span>
</div>
</label>
</div>
</div>
</div>
<!-- 설치 시작 버튼 (초기 상태, 설치 시작 후 숨김) -->
<div id="installation-start-section" class="installation-start-section" style="display: none;">
<button id="start-installation-btn" class="btn btn-primary btn-lg" type="button" onclick="onStartInstallationClick()">
<?= htmlspecialchars(lang('start_installation_button')) ?>
</button>
</div>
<div class="alert alert-warning" id="install-warning" style="display: none;">
⚠ <?= htmlspecialchars(lang('do_not_close_page')) ?>
</div>
<!-- 설치 진행 상황 카드 -->
<div class="requirement-card">
<div class="requirement-card" id="installation-progress-card" style="display: none;">
<div class="requirement-card-header" id="installation-card-header" onclick="toggleInstallationCard()">
<h3 class="requirement-card-title">
<?= htmlspecialchars(lang('progress_status')) ?>