var Vd=Object.defineProperty;var Bd=(e,t,s)=>t in e?Vd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var _l=(e,t,s)=>Bd(e,typeof t!="symbol"?t+"":t,s);function Zd(e,t){for(var s=0;sr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function s(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(l){if(l.ep)return;l.ep=!0;const a=s(l);fetch(l.href,a)}})();function r0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l0={exports:{}},tl={},a0={exports:{}},te={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ts=Symbol.for("react.element"),Ud=Symbol.for("react.portal"),qd=Symbol.for("react.fragment"),Wd=Symbol.for("react.strict_mode"),Qd=Symbol.for("react.profiler"),Kd=Symbol.for("react.provider"),Gd=Symbol.for("react.context"),Yd=Symbol.for("react.forward_ref"),Jd=Symbol.for("react.suspense"),Xd=Symbol.for("react.memo"),e4=Symbol.for("react.lazy"),qo=Symbol.iterator;function t4(e){return e===null||typeof e!="object"?null:(e=qo&&e[qo]||e["@@iterator"],typeof e=="function"?e:null)}var i0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},o0=Object.assign,c0={};function _1(e,t,s){this.props=e,this.context=t,this.refs=c0,this.updater=s||i0}_1.prototype.isReactComponent={};_1.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_1.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function u0(){}u0.prototype=_1.prototype;function Si(e,t,s){this.props=e,this.context=t,this.refs=c0,this.updater=s||i0}var Li=Si.prototype=new u0;Li.constructor=Si;o0(Li,_1.prototype);Li.isPureReactComponent=!0;var Wo=Array.isArray,d0=Object.prototype.hasOwnProperty,Ei={current:null},x0={key:!0,ref:!0,__self:!0,__source:!0};function p0(e,t,s){var r,l={},a=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)d0.call(t,r)&&!x0.hasOwnProperty(r)&&(l[r]=t[r]);var o=arguments.length-2;if(o===1)l.children=s;else if(1>>1,Q=T[K];if(0>>1;Kl(J,z))sel(_,J)?(T[K]=_,T[se]=z,K=se):(T[K]=J,T[ae]=z,K=ae);else if(sel(_,z))T[K]=_,T[se]=z,K=se;else break e}}return k}function l(T,k){var z=T.sortIndex-k.sortIndex;return z!==0?z:T.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var c=[],d=[],f=1,p=null,h=3,y=!1,v=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(T){for(var k=s(d);k!==null;){if(k.callback===null)r(d);else if(k.startTime<=T)r(d),k.sortIndex=k.expirationTime,t(c,k);else break;k=s(d)}}function j(T){if(C=!1,m(T),!v)if(s(c)!==null)v=!0,H(b);else{var k=s(d);k!==null&&Z(j,k.startTime-T)}}function b(T,k){v=!1,C&&(C=!1,g(L),L=-1),y=!0;var z=h;try{for(m(k),p=s(c);p!==null&&(!(p.expirationTime>k)||T&&!M());){var K=p.callback;if(typeof K=="function"){p.callback=null,h=p.priorityLevel;var Q=K(p.expirationTime<=k);k=e.unstable_now(),typeof Q=="function"?p.callback=Q:p===s(c)&&r(c),m(k)}else r(c);p=s(c)}if(p!==null)var oe=!0;else{var ae=s(d);ae!==null&&Z(j,ae.startTime-k),oe=!1}return oe}finally{p=null,h=z,y=!1}}var N=!1,E=null,L=-1,I=5,D=-1;function M(){return!(e.unstable_now()-DT||125K?(T.sortIndex=z,t(d,T),s(c)===null&&T===s(d)&&(C?(g(L),L=-1):C=!0,Z(j,z-K))):(T.sortIndex=Q,t(c,T),v||y||(v=!0,H(b))),T},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(T){var k=h;return function(){var z=h;h=k;try{return T.apply(this,arguments)}finally{h=z}}}})(y0);C0.exports=y0;var p4=C0.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var f4=u,ct=p4;function R(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wa=Object.prototype.hasOwnProperty,m4=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ko={},Go={};function h4(e){return wa.call(Go,e)?!0:wa.call(Ko,e)?!1:m4.test(e)?Go[e]=!0:(Ko[e]=!0,!1)}function g4(e,t,s,r){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function C4(e,t,s,r){if(t===null||typeof t>"u"||g4(e,t,s,r))return!0;if(r)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Je(e,t,s,r,l,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new Je(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new Je(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new Je(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new Je(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oe[e]=new Je(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new Je(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new Je(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new Je(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new Je(e,5,!1,e.toLowerCase(),null,!1,!1)});var Mi=/[\-:]([a-z])/g;function _i(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Mi,_i);Oe[t]=new Je(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Mi,_i);Oe[t]=new Je(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Mi,_i);Oe[t]=new Je(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new Je(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new Je("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new Je(e,1,!1,e.toLowerCase(),null,!0,!0)});function zi(e,t,s,r){var l=Oe.hasOwnProperty(t)?Oe[t]:null;(l!==null?l.type!==0:r||!(2o||l[i]!==a[o]){var c=` `+l[i].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=i&&0<=o);break}}}finally{Rl=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?K1(e):""}function y4(e){switch(e.tag){case 5:return K1(e.type);case 16:return K1("Lazy");case 13:return K1("Suspense");case 19:return K1("SuspenseList");case 0:case 2:case 15:return e=Il(e.type,!1),e;case 11:return e=Il(e.type.render,!1),e;case 1:return e=Il(e.type,!0),e;default:return""}}function Sa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case n1:return"Fragment";case t1:return"Portal";case Na:return"Profiler";case Pi:return"StrictMode";case ba:return"Suspense";case ka:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w0:return(e.displayName||"Context")+".Consumer";case j0:return(e._context.displayName||"Context")+".Provider";case Ri:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ii:return t=e.displayName||null,t!==null?t:Sa(e.type)||"Memo";case en:t=e._payload,e=e._init;try{return Sa(e(t))}catch{}}return null}function v4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sa(t);case 8:return t===Pi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function vn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function b0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j4(e){var t=b0(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var l=s.get,a=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Us(e){e._valueTracker||(e._valueTracker=j4(e))}function k0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),r="";return e&&(r=b0(e)?e.checked?"true":"false":e.value),e=r,e!==s?(t.setValue(e),!0):!1}function Sr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function La(e,t){var s=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function Jo(e,t){var s=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;s=vn(t.value!=null?t.value:s),e._wrapperState={initialChecked:r,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function S0(e,t){t=t.checked,t!=null&&zi(e,"checked",t,!1)}function Ea(e,t){S0(e,t);var s=vn(t.value),r=t.type;if(s!=null)r==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ta(e,t.type,s):t.hasOwnProperty("defaultValue")&&Ta(e,t.type,vn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xo(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Ta(e,t,s){(t!=="number"||Sr(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var G1=Array.isArray;function f1(e,t,s,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=qs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ds(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var es={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},w4=["Webkit","ms","Moz","O"];Object.keys(es).forEach(function(e){w4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),es[t]=es[e]})});function M0(e,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||es.hasOwnProperty(e)&&es[e]?(""+t).trim():t+"px"}function _0(e,t){e=e.style;for(var s in t)if(t.hasOwnProperty(s)){var r=s.indexOf("--")===0,l=M0(s,t[s],r);s==="float"&&(s="cssFloat"),r?e.setProperty(s,l):e[s]=l}}var N4=ve({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function za(e,t){if(t){if(N4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(R(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(R(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(R(61))}if(t.style!=null&&typeof t.style!="object")throw Error(R(62))}}function Pa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ra=null;function Di(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ia=null,m1=null,h1=null;function nc(e){if(e=zs(e)){if(typeof Ia!="function")throw Error(R(280));var t=e.stateNode;t&&(t=al(t),Ia(e.stateNode,e.type,t))}}function z0(e){m1?h1?h1.push(e):h1=[e]:m1=e}function P0(){if(m1){var e=m1,t=h1;if(h1=m1=null,nc(e),t)for(e=0;e>>=0,e===0?32:31-(R4(e)/I4|0)|0}var Ws=64,Qs=4194304;function Y1(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mr(e,t){var s=e.pendingLanes;if(s===0)return 0;var r=0,l=e.suspendedLanes,a=e.pingedLanes,i=s&268435455;if(i!==0){var o=i&~l;o!==0?r=Y1(o):(a&=i,a!==0&&(r=Y1(a)))}else i=s&~l,i!==0?r=Y1(i):a!==0&&(r=Y1(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,a=t&-t,l>=a||l===16&&(a&4194240)!==0))return t;if(r&4&&(r|=s&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0s;s++)t.push(e);return t}function Ms(e,t,s){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Lt(t),e[t]=s}function O4(e,t){var s=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ns),dc=" ",xc=!1;function X0(e,t){switch(e){case"keyup":return p6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function e9(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var s1=!1;function m6(e,t){switch(e){case"compositionend":return e9(t);case"keypress":return t.which!==32?null:(xc=!0,dc);case"textInput":return e=t.data,e===dc&&xc?null:e;default:return null}}function h6(e,t){if(s1)return e==="compositionend"||!Zi&&X0(e,t)?(e=Y0(),mr=$i=ln=null,s1=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:s,offset:t-e};e=r}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=hc(s)}}function r9(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?r9(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function l9(){for(var e=window,t=Sr();t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=Sr(e.document)}return t}function Ui(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function k6(e){var t=l9(),s=e.focusedElem,r=e.selectionRange;if(t!==s&&s&&s.ownerDocument&&r9(s.ownerDocument.documentElement,s)){if(r!==null&&Ui(s)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(e,s.value.length);else if(e=(t=s.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=s.textContent.length,a=Math.min(r.start,l);r=r.end===void 0?a:Math.min(r.end,l),!e.extend&&a>r&&(l=r,r=a,a=l),l=gc(s,a);var i=gc(s,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=s;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s=document.documentMode,r1=null,$a=null,rs=null,Va=!1;function Cc(e,t,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Va||r1==null||r1!==Sr(r)||(r=r1,"selectionStart"in r&&Ui(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rs&&gs(rs,r)||(rs=r,r=Pr($a,"onSelect"),0i1||(e.current=Qa[i1],Qa[i1]=null,i1--)}function ce(e,t){i1++,Qa[i1]=e.current,e.current=t}var jn={},Ze=bn(jn),nt=bn(!1),Hn=jn;function w1(e,t){var s=e.type.contextTypes;if(!s)return jn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},a;for(a in s)l[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function st(e){return e=e.childContextTypes,e!=null}function Ir(){pe(nt),pe(Ze)}function kc(e,t,s){if(Ze.current!==jn)throw Error(R(168));ce(Ze,t),ce(nt,s)}function f9(e,t,s){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return s;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(R(108,v4(e)||"Unknown",l));return ve({},s,r)}function Dr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jn,Hn=Ze.current,ce(Ze,e),ce(nt,nt.current),!0}function Sc(e,t,s){var r=e.stateNode;if(!r)throw Error(R(169));s?(e=f9(e,t,Hn),r.__reactInternalMemoizedMergedChildContext=e,pe(nt),pe(Ze),ce(Ze,e)):pe(nt),ce(nt,s)}var $t=null,il=!1,Kl=!1;function m9(e){$t===null?$t=[e]:$t.push(e)}function A6(e){il=!0,m9(e)}function kn(){if(!Kl&&$t!==null){Kl=!0;var e=0,t=ie;try{var s=$t;for(ie=1;e>=i,l-=i,Vt=1<<32-Lt(t)+l|s<L?(I=E,E=null):I=E.sibling;var D=h(g,E,m[L],j);if(D===null){E===null&&(E=I);break}e&&E&&D.alternate===null&&t(g,E),x=a(D,x,L),N===null?b=D:N.sibling=D,N=D,E=I}if(L===m.length)return s(g,E),fe&&_n(g,L),b;if(E===null){for(;LL?(I=E,E=null):I=E.sibling;var M=h(g,E,D.value,j);if(M===null){E===null&&(E=I);break}e&&E&&M.alternate===null&&t(g,E),x=a(M,x,L),N===null?b=M:N.sibling=M,N=M,E=I}if(D.done)return s(g,E),fe&&_n(g,L),b;if(E===null){for(;!D.done;L++,D=m.next())D=p(g,D.value,j),D!==null&&(x=a(D,x,L),N===null?b=D:N.sibling=D,N=D);return fe&&_n(g,L),b}for(E=r(g,E);!D.done;L++,D=m.next())D=y(E,g,L,D.value,j),D!==null&&(e&&D.alternate!==null&&E.delete(D.key===null?L:D.key),x=a(D,x,L),N===null?b=D:N.sibling=D,N=D);return e&&E.forEach(function(P){return t(g,P)}),fe&&_n(g,L),b}function w(g,x,m,j){if(typeof m=="object"&&m!==null&&m.type===n1&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Zs:e:{for(var b=m.key,N=x;N!==null;){if(N.key===b){if(b=m.type,b===n1){if(N.tag===7){s(g,N.sibling),x=l(N,m.props.children),x.return=g,g=x;break e}}else if(N.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===en&&Tc(b)===N.type){s(g,N.sibling),x=l(N,m.props),x.ref=B1(g,N,m),x.return=g,g=x;break e}s(g,N);break}else t(g,N);N=N.sibling}m.type===n1?(x=Fn(m.props.children,g.mode,j,m.key),x.return=g,g=x):(j=Nr(m.type,m.key,m.props,null,g.mode,j),j.ref=B1(g,x,m),j.return=g,g=j)}return i(g);case t1:e:{for(N=m.key;x!==null;){if(x.key===N)if(x.tag===4&&x.stateNode.containerInfo===m.containerInfo&&x.stateNode.implementation===m.implementation){s(g,x.sibling),x=l(x,m.children||[]),x.return=g,g=x;break e}else{s(g,x);break}else t(g,x);x=x.sibling}x=sa(m,g.mode,j),x.return=g,g=x}return i(g);case en:return N=m._init,w(g,x,N(m._payload),j)}if(G1(m))return v(g,x,m,j);if(F1(m))return C(g,x,m,j);tr(g,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,x!==null&&x.tag===6?(s(g,x.sibling),x=l(x,m),x.return=g,g=x):(s(g,x),x=na(m,g.mode,j),x.return=g,g=x),i(g)):s(g,x)}return w}var b1=y9(!0),v9=y9(!1),Or=bn(null),Hr=null,u1=null,Ki=null;function Gi(){Ki=u1=Hr=null}function Yi(e){var t=Or.current;pe(Or),e._currentValue=t}function Ya(e,t,s){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===s)break;e=e.return}}function C1(e,t){Hr=e,Ki=u1=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(tt=!0),e.firstContext=null)}function gt(e){var t=e._currentValue;if(Ki!==e)if(e={context:e,memoizedValue:t,next:null},u1===null){if(Hr===null)throw Error(R(308));u1=e,Hr.dependencies={lanes:0,firstContext:e}}else u1=u1.next=e;return t}var In=null;function Ji(e){In===null?In=[e]:In.push(e)}function j9(e,t,s,r){var l=t.interleaved;return l===null?(s.next=s,Ji(t)):(s.next=l.next,l.next=s),t.interleaved=s,Wt(e,r)}function Wt(e,t){e.lanes|=t;var s=e.alternate;for(s!==null&&(s.lanes|=t),s=e,e=e.return;e!==null;)e.childLanes|=t,s=e.alternate,s!==null&&(s.childLanes|=t),s=e,e=e.return;return s.tag===3?s.stateNode:null}var tn=!1;function Xi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function w9(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Zt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mn(e,t,s){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Wt(e,s)}return l=r.interleaved,l===null?(t.next=t,Ji(r)):(t.next=l.next,l.next=t),r.interleaved=t,Wt(e,s)}function gr(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,s|=r,t.lanes=s,Fi(e,s)}}function Mc(e,t){var s=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,s===r)){var l=null,a=null;if(s=s.firstBaseUpdate,s!==null){do{var i={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};a===null?l=a=i:a=a.next=i,s=s.next}while(s!==null);a===null?l=a=t:a=a.next=t}else l=a=t;s={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}function $r(e,t,s,r){var l=e.updateQueue;tn=!1;var a=l.firstBaseUpdate,i=l.lastBaseUpdate,o=l.shared.pending;if(o!==null){l.shared.pending=null;var c=o,d=c.next;c.next=null,i===null?a=d:i.next=d,i=c;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==i&&(o===null?f.firstBaseUpdate=d:o.next=d,f.lastBaseUpdate=c))}if(a!==null){var p=l.baseState;i=0,f=d=c=null,o=a;do{var h=o.lane,y=o.eventTime;if((r&h)===h){f!==null&&(f=f.next={eventTime:y,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var v=e,C=o;switch(h=t,y=s,C.tag){case 1:if(v=C.payload,typeof v=="function"){p=v.call(y,p,h);break e}p=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=C.payload,h=typeof v=="function"?v.call(y,p,h):v,h==null)break e;p=ve({},p,h);break e;case 2:tn=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=l.effects,h===null?l.effects=[o]:h.push(o))}else y={eventTime:y,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(d=f=y,c=p):f=f.next=y,i|=h;if(o=o.next,o===null){if(o=l.shared.pending,o===null)break;h=o,o=h.next,h.next=null,l.lastBaseUpdate=h,l.shared.pending=null}}while(!0);if(f===null&&(c=p),l.baseState=c,l.firstBaseUpdate=d,l.lastBaseUpdate=f,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else a===null&&(l.shared.lanes=0);Bn|=i,e.lanes=i,e.memoizedState=p}}function _c(e,t,s){if(e=t.effects,t.effects=null,e!==null)for(t=0;ts?s:4,e(!0);var r=Yl.transition;Yl.transition={};try{e(!1),t()}finally{ie=s,Yl.transition=r}}function O9(){return Ct().memoizedState}function $6(e,t,s){var r=gn(e);if(s={lane:r,action:s,hasEagerState:!1,eagerState:null,next:null},H9(e))$9(t,s);else if(s=j9(e,t,s,r),s!==null){var l=Ge();Et(s,e,r,l),V9(s,t,r)}}function V6(e,t,s){var r=gn(e),l={lane:r,action:s,hasEagerState:!1,eagerState:null,next:null};if(H9(e))$9(t,l);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,o=a(i,s);if(l.hasEagerState=!0,l.eagerState=o,Tt(o,i)){var c=t.interleaved;c===null?(l.next=l,Ji(t)):(l.next=c.next,c.next=l),t.interleaved=l;return}}catch{}finally{}s=j9(e,t,l,r),s!==null&&(l=Ge(),Et(s,e,r,l),V9(s,t,r))}}function H9(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function $9(e,t){ls=Br=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function V9(e,t,s){if(s&4194240){var r=t.lanes;r&=e.pendingLanes,s|=r,t.lanes=s,Fi(e,s)}}var Zr={readContext:gt,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useInsertionEffect:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useMutableSource:$e,useSyncExternalStore:$e,useId:$e,unstable_isNewReconciler:!1},B6={readContext:gt,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Pc,useImperativeHandle:function(e,t,s){return s=s!=null?s.concat([e]):null,yr(4194308,4,R9.bind(null,t,e),s)},useLayoutEffect:function(e,t){return yr(4194308,4,e,t)},useInsertionEffect:function(e,t){return yr(4,2,e,t)},useMemo:function(e,t){var s=zt();return t=t===void 0?null:t,e=e(),s.memoizedState=[e,t],e},useReducer:function(e,t,s){var r=zt();return t=s!==void 0?s(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$6.bind(null,Ce,e),[r.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:zc,useDebugValue:io,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=zc(!1),t=e[0];return e=H6.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,s){var r=Ce,l=zt();if(fe){if(s===void 0)throw Error(R(407));s=s()}else{if(s=t(),_e===null)throw Error(R(349));Vn&30||S9(r,t,s)}l.memoizedState=s;var a={value:s,getSnapshot:t};return l.queue=a,Pc(E9.bind(null,r,a,e),[e]),r.flags|=2048,ks(9,L9.bind(null,r,a,s,t),void 0,null),s},useId:function(){var e=zt(),t=_e.identifierPrefix;if(fe){var s=Bt,r=Vt;s=(r&~(1<<32-Lt(r)-1)).toString(32)+s,t=":"+t+"R"+s,s=Ns++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(s,{is:r.is}):(e=i.createElement(s),s==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,s),e[Pt]=t,e[vs]=r,J9(e,t,!1,!1),t.stateNode=e;e:{switch(i=Pa(s,r),s){case"dialog":xe("cancel",e),xe("close",e),l=r;break;case"iframe":case"object":case"embed":xe("load",e),l=r;break;case"video":case"audio":for(l=0;lL1&&(t.flags|=128,r=!0,Z1(a,!1),t.lanes=4194304)}else{if(!r)if(e=Vr(i),e!==null){if(t.flags|=128,r=!0,s=e.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),Z1(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!fe)return Ve(t),null}else 2*ke()-a.renderingStartTime>L1&&s!==1073741824&&(t.flags|=128,r=!0,Z1(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(s=a.last,s!==null?s.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ke(),t.sibling=null,s=he.current,ce(he,r?s&1|2:s&1),t):(Ve(t),null);case 22:case 23:return fo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?at&1073741824&&(Ve(t),t.subtreeFlags&6&&(t.flags|=8192)):Ve(t),null;case 24:return null;case 25:return null}throw Error(R(156,t.tag))}function Y6(e,t){switch(Wi(t),t.tag){case 1:return st(t.type)&&Ir(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return k1(),pe(nt),pe(Ze),no(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return to(t),null;case 13:if(pe(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(R(340));N1()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(he),null;case 4:return k1(),null;case 10:return Yi(t.type._context),null;case 22:case 23:return fo(),null;case 24:return null;default:return null}}var sr=!1,Be=!1,J6=typeof WeakSet=="function"?WeakSet:Set,B=null;function d1(e,t){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(r){we(e,t,r)}else s.current=null}function ai(e,t,s){try{s()}catch(r){we(e,t,r)}}var Zc=!1;function X6(e,t){if(Ba=_r,e=l9(),Ui(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var l=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{s.nodeType,a.nodeType}catch{s=null;break e}var i=0,o=-1,c=-1,d=0,f=0,p=e,h=null;t:for(;;){for(var y;p!==s||l!==0&&p.nodeType!==3||(o=i+l),p!==a||r!==0&&p.nodeType!==3||(c=i+r),p.nodeType===3&&(i+=p.nodeValue.length),(y=p.firstChild)!==null;)h=p,p=y;for(;;){if(p===e)break t;if(h===s&&++d===l&&(o=i),h===a&&++f===r&&(c=i),(y=p.nextSibling)!==null)break;p=h,h=p.parentNode}p=y}s=o===-1||c===-1?null:{start:o,end:c}}else s=null}s=s||{start:0,end:0}}else s=null;for(Za={focusedElem:e,selectionRange:s},_r=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var C=v.memoizedProps,w=v.memoizedState,g=t.stateNode,x=g.getSnapshotBeforeUpdate(t.elementType===t.type?C:bt(t.type,C),w);g.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(R(163))}}catch(j){we(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return v=Zc,Zc=!1,v}function as(e,t,s){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var a=l.destroy;l.destroy=void 0,a!==void 0&&ai(t,s,a)}l=l.next}while(l!==r)}}function ul(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&e)===e){var r=s.create;s.destroy=r()}s=s.next}while(s!==t)}}function ii(e){var t=e.ref;if(t!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof t=="function"?t(e):t.current=e}}function tu(e){var t=e.alternate;t!==null&&(e.alternate=null,tu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pt],delete t[vs],delete t[Wa],delete t[I6],delete t[D6])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nu(e){return e.tag===5||e.tag===3||e.tag===4}function Uc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function oi(e,t,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(e,t):s.insertBefore(e,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(e,s)):(t=s,t.appendChild(e)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=Rr));else if(r!==4&&(e=e.child,e!==null))for(oi(e,t,s),e=e.sibling;e!==null;)oi(e,t,s),e=e.sibling}function ci(e,t,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ci(e,t,s),e=e.sibling;e!==null;)ci(e,t,s),e=e.sibling}var De=null,kt=!1;function Xt(e,t,s){for(s=s.child;s!==null;)su(e,t,s),s=s.sibling}function su(e,t,s){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(nl,s)}catch{}switch(s.tag){case 5:Be||d1(s,t);case 6:var r=De,l=kt;De=null,Xt(e,t,s),De=r,kt=l,De!==null&&(kt?(e=De,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):De.removeChild(s.stateNode));break;case 18:De!==null&&(kt?(e=De,s=s.stateNode,e.nodeType===8?Ql(e.parentNode,s):e.nodeType===1&&Ql(e,s),ms(e)):Ql(De,s.stateNode));break;case 4:r=De,l=kt,De=s.stateNode.containerInfo,kt=!0,Xt(e,t,s),De=r,kt=l;break;case 0:case 11:case 14:case 15:if(!Be&&(r=s.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var a=l,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&ai(s,t,i),l=l.next}while(l!==r)}Xt(e,t,s);break;case 1:if(!Be&&(d1(s,t),r=s.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=s.memoizedProps,r.state=s.memoizedState,r.componentWillUnmount()}catch(o){we(s,t,o)}Xt(e,t,s);break;case 21:Xt(e,t,s);break;case 22:s.mode&1?(Be=(r=Be)||s.memoizedState!==null,Xt(e,t,s),Be=r):Xt(e,t,s);break;default:Xt(e,t,s)}}function qc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new J6),t.forEach(function(r){var l=o3.bind(null,e,r);s.has(r)||(s.add(r),r.then(l,l))})}}function wt(e,t){var s=t.deletions;if(s!==null)for(var r=0;rl&&(l=i),r&=~a}if(r=l,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*t3(r/1960))-r,10e?16:e,an===null)var r=!1;else{if(e=an,an=null,Wr=0,le&6)throw Error(R(331));var l=le;for(le|=4,B=e.current;B!==null;){var a=B,i=a.child;if(B.flags&16){var o=a.deletions;if(o!==null){for(var c=0;cke()-xo?An(e,0):uo|=s),rt(e,t)}function du(e,t){t===0&&(e.mode&1?(t=Qs,Qs<<=1,!(Qs&130023424)&&(Qs=4194304)):t=1);var s=Ge();e=Wt(e,t),e!==null&&(Ms(e,t,s),rt(e,s))}function i3(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),du(e,s)}function o3(e,t){var s=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(s=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(R(314))}r!==null&&r.delete(t),du(e,s)}var xu;xu=function(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps||nt.current)tt=!0;else{if(!(e.lanes&s)&&!(t.flags&128))return tt=!1,K6(e,t,s);tt=!!(e.flags&131072)}else tt=!1,fe&&t.flags&1048576&&h9(t,Fr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vr(e,t),e=t.pendingProps;var l=w1(t,Ze.current);C1(t,s),l=ro(null,t,r,e,l,s);var a=lo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,st(r)?(a=!0,Dr(t)):a=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Xi(t),l.updater=cl,t.stateNode=l,l._reactInternals=t,Xa(t,r,e,s),t=ni(null,t,r,!0,a,s)):(t.tag=0,fe&&a&&qi(t),Qe(null,t,l,s),t=t.child),t;case 16:r=t.elementType;e:{switch(vr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=u3(r),e=bt(r,e),l){case 0:t=ti(null,t,r,e,s);break e;case 1:t=$c(null,t,r,e,s);break e;case 11:t=Oc(null,t,r,e,s);break e;case 14:t=Hc(null,t,r,bt(r.type,e),s);break e}throw Error(R(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:bt(r,l),ti(e,t,r,l,s);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:bt(r,l),$c(e,t,r,l,s);case 3:e:{if(K9(t),e===null)throw Error(R(387));r=t.pendingProps,a=t.memoizedState,l=a.element,w9(e,t),$r(t,r,null,s);var i=t.memoizedState;if(r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){l=S1(Error(R(423)),t),t=Vc(e,t,r,s,l);break e}else if(r!==l){l=S1(Error(R(424)),t),t=Vc(e,t,r,s,l);break e}else for(it=fn(t.stateNode.containerInfo.firstChild),ot=t,fe=!0,St=null,s=v9(t,null,r,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(N1(),r===l){t=Qt(e,t,s);break e}Qe(e,t,r,s)}t=t.child}return t;case 5:return N9(t),e===null&&Ga(t),r=t.type,l=t.pendingProps,a=e!==null?e.memoizedProps:null,i=l.children,Ua(r,l)?i=null:a!==null&&Ua(r,a)&&(t.flags|=32),Q9(e,t),Qe(e,t,i,s),t.child;case 6:return e===null&&Ga(t),null;case 13:return G9(e,t,s);case 4:return eo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=b1(t,null,r,s):Qe(e,t,r,s),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:bt(r,l),Oc(e,t,r,l,s);case 7:return Qe(e,t,t.pendingProps,s),t.child;case 8:return Qe(e,t,t.pendingProps.children,s),t.child;case 12:return Qe(e,t,t.pendingProps.children,s),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,a=t.memoizedProps,i=l.value,ce(Or,r._currentValue),r._currentValue=i,a!==null)if(Tt(a.value,i)){if(a.children===l.children&&!nt.current){t=Qt(e,t,s);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){i=a.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=Zt(-1,s&-s),c.tag=2;var d=a.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?c.next=c:(c.next=f.next,f.next=c),d.pending=c}}a.lanes|=s,c=a.alternate,c!==null&&(c.lanes|=s),Ya(a.return,s,t),o.lanes|=s;break}c=c.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(R(341));i.lanes|=s,o=i.alternate,o!==null&&(o.lanes|=s),Ya(i,s,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Qe(e,t,l.children,s),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,C1(t,s),l=gt(l),r=r(l),t.flags|=1,Qe(e,t,r,s),t.child;case 14:return r=t.type,l=bt(r,t.pendingProps),l=bt(r.type,l),Hc(e,t,r,l,s);case 15:return q9(e,t,t.type,t.pendingProps,s);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:bt(r,l),vr(e,t),t.tag=1,st(r)?(e=!0,Dr(t)):e=!1,C1(t,s),B9(t,r,l),Xa(t,r,l,s),ni(null,t,r,!0,e,s);case 19:return Y9(e,t,s);case 22:return W9(e,t,s)}throw Error(R(156,t.tag))};function pu(e,t){return H0(e,t)}function c3(e,t,s,r){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,s,r){return new c3(e,t,s,r)}function ho(e){return e=e.prototype,!(!e||!e.isReactComponent)}function u3(e){if(typeof e=="function")return ho(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ri)return 11;if(e===Ii)return 14}return 2}function Cn(e,t){var s=e.alternate;return s===null?(s=ft(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function Nr(e,t,s,r,l,a){var i=2;if(r=e,typeof e=="function")ho(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case n1:return Fn(s.children,l,a,t);case Pi:i=8,l|=8;break;case Na:return e=ft(12,s,t,l|2),e.elementType=Na,e.lanes=a,e;case ba:return e=ft(13,s,t,l),e.elementType=ba,e.lanes=a,e;case ka:return e=ft(19,s,t,l),e.elementType=ka,e.lanes=a,e;case N0:return xl(s,l,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j0:i=10;break e;case w0:i=9;break e;case Ri:i=11;break e;case Ii:i=14;break e;case en:i=16,r=null;break e}throw Error(R(130,e==null?e:typeof e,""))}return t=ft(i,s,t,l),t.elementType=e,t.type=r,t.lanes=a,t}function Fn(e,t,s,r){return e=ft(7,e,r,t),e.lanes=s,e}function xl(e,t,s,r){return e=ft(22,e,r,t),e.elementType=N0,e.lanes=s,e.stateNode={isHidden:!1},e}function na(e,t,s){return e=ft(6,e,null,t),e.lanes=s,e}function sa(e,t,s){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function d3(e,t,s,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Al(0),this.expirationTimes=Al(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Al(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function go(e,t,s,r,l,a,i,o,c){return e=new d3(e,t,s,o,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ft(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xi(a),e}function x3(e,t,s){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gu)}catch(e){console.error(e)}}gu(),g0.exports=ut;var g3=g0.exports,Cu,e2=g3;Cu=e2.createRoot,e2.hydrateRoot;/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function jo(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function y3(){return Math.random().toString(36).substr(2,8)}function n2(e,t){return{usr:e.state,key:e.key,idx:t}}function fi(e,t,s,r){return s===void 0&&(s=null),Ls({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?R1(t):t,{state:s,key:t&&t.key||r||y3()})}function Gr(e){let{pathname:t="/",search:s="",hash:r=""}=e;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function R1(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substr(s),e=e.substr(0,s));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function v3(e,t,s,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:a=!1}=r,i=l.history,o=on.Pop,c=null,d=f();d==null&&(d=0,i.replaceState(Ls({},i.state,{idx:d}),""));function f(){return(i.state||{idx:null}).idx}function p(){o=on.Pop;let w=f(),g=w==null?null:w-d;d=w,c&&c({action:o,location:C.location,delta:g})}function h(w,g){o=on.Push;let x=fi(C.location,w,g);d=f()+1;let m=n2(x,d),j=C.createHref(x);try{i.pushState(m,"",j)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;l.location.assign(j)}a&&c&&c({action:o,location:C.location,delta:1})}function y(w,g){o=on.Replace;let x=fi(C.location,w,g);d=f();let m=n2(x,d),j=C.createHref(x);i.replaceState(m,"",j),a&&c&&c({action:o,location:C.location,delta:0})}function v(w){let g=l.location.origin!=="null"?l.location.origin:l.location.href,x=typeof w=="string"?w:Gr(w);return x=x.replace(/ $/,"%20"),ye(g,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,g)}let C={get action(){return o},get location(){return e(l,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return l.addEventListener(t2,p),c=w,()=>{l.removeEventListener(t2,p),c=null}},createHref(w){return t(l,w)},createURL:v,encodeLocation(w){let g=v(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:y,go(w){return i.go(w)}};return C}var s2;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(s2||(s2={}));function j3(e,t,s){return s===void 0&&(s="/"),w3(e,t,s)}function w3(e,t,s,r){let l=typeof t=="string"?R1(t):t,a=E1(l.pathname||"/",s);if(a==null)return null;let i=yu(e);N3(i);let o=null,c=R3(a);for(let d=0;o==null&&d{let c={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};c.relativePath.startsWith("/")&&(ye(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let d=yn([r,c.relativePath]),f=s.concat(c);a.children&&a.children.length>0&&(ye(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),yu(a.children,t,f,d)),!(a.path==null&&!a.index)&&t.push({path:d,score:M3(d,a.index),routesMeta:f})};return e.forEach((a,i)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))l(a,i);else for(let c of vu(a.path))l(a,i,c)}),t}function vu(e){let t=e.split("/");if(t.length===0)return[];let[s,...r]=t,l=s.endsWith("?"),a=s.replace(/\?$/,"");if(r.length===0)return l?[a,""]:[a];let i=vu(r.join("/")),o=[];return o.push(...i.map(c=>c===""?a:[a,c].join("/"))),l&&o.push(...i),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function N3(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:_3(t.routesMeta.map(r=>r.childrenIndex),s.routesMeta.map(r=>r.childrenIndex)))}const b3=/^:[\w-]+$/,k3=3,S3=2,L3=1,E3=10,T3=-2,r2=e=>e==="*";function M3(e,t){let s=e.split("/"),r=s.length;return s.some(r2)&&(r+=T3),t&&(r+=S3),s.filter(l=>!r2(l)).reduce((l,a)=>l+(b3.test(a)?k3:a===""?L3:E3),r)}function _3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function z3(e,t,s){let{routesMeta:r}=e,l={},a="/",i=[];for(let o=0;o{let{paramName:h,isOptional:y}=f;if(h==="*"){let C=o[p]||"";i=a.slice(0,a.length-C.length).replace(/(.)\/+$/,"$1")}const v=o[p];return y&&!v?d[h]=void 0:d[h]=(v||"").replace(/%2F/g,"/"),d},{}),pathname:a,pathnameBase:i,pattern:e}}function P3(e,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),jo(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function R3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jo(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function E1(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,r=e.charAt(s);return r&&r!=="/"?null:e.slice(s)||"/"}const I3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,D3=e=>I3.test(e);function A3(e,t){t===void 0&&(t="/");let{pathname:s,search:r="",hash:l=""}=typeof e=="string"?R1(e):e,a;if(s)if(D3(s))a=s;else{if(s.includes("//")){let i=s;s=ju(s),jo(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+s))}s.startsWith("/")?a=l2(s.substring(1),"/"):a=l2(s,t)}else a=t;return{pathname:a,search:H3(r),hash:$3(l)}}function l2(e,t){let s=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?s.length>1&&s.pop():l!=="."&&s.push(l)}),s.length>1?s.join("/"):"/"}function ra(e,t,s,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function F3(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function wo(e,t){let s=F3(e);return t?s.map((r,l)=>l===s.length-1?r.pathname:r.pathnameBase):s.map(r=>r.pathnameBase)}function No(e,t,s,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=R1(e):(l=Ls({},e),ye(!l.pathname||!l.pathname.includes("?"),ra("?","pathname","search",l)),ye(!l.pathname||!l.pathname.includes("#"),ra("#","pathname","hash",l)),ye(!l.search||!l.search.includes("#"),ra("#","search","hash",l)));let a=e===""||l.pathname==="",i=a?"/":l.pathname,o;if(i==null)o=s;else{let p=t.length-1;if(!r&&i.startsWith("..")){let h=i.split("/");for(;h[0]==="..";)h.shift(),p-=1;l.pathname=h.join("/")}o=p>=0?t[p]:"/"}let c=A3(l,o),d=i&&i!=="/"&&i.endsWith("/"),f=(a||i===".")&&s.endsWith("/");return!c.pathname.endsWith("/")&&(d||f)&&(c.pathname+="/"),c}const ju=e=>e.replace(/\/\/+/g,"/"),yn=e=>ju(e.join("/")),O3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),H3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$3=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function V3(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const wu=["post","put","patch","delete"];new Set(wu);const B3=["get",...wu];new Set(B3);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Es(){return Es=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.current=!0}),u.useCallback(function(d,f){if(f===void 0&&(f={}),!o.current)return;if(typeof d=="number"){r.go(d);return}let p=No(d,JSON.parse(i),a,f.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:yn([t,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[t,r,i,a,e])}const q3=u.createContext(null);function W3(e){let t=u.useContext(At).outlet;return t&&u.createElement(q3.Provider,{value:e},t)}function bo(){let{matches:e}=u.useContext(At),t=e[e.length-1];return t?t.params:{}}function yl(e,t){let{relative:s}=t===void 0?{}:t,{future:r}=u.useContext(Gt),{matches:l}=u.useContext(At),{pathname:a}=Ue(),i=JSON.stringify(wo(l,r.v7_relativeSplatPath));return u.useMemo(()=>No(e,JSON.parse(i),a,s==="path"),[e,i,a,s])}function Q3(e,t){return K3(e,t)}function K3(e,t,s,r){I1()||ye(!1);let{navigator:l}=u.useContext(Gt),{matches:a}=u.useContext(At),i=a[a.length-1],o=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let d=Ue(),f;if(t){var p;let w=typeof t=="string"?R1(t):t;c==="/"||(p=w.pathname)!=null&&p.startsWith(c)||ye(!1),f=w}else f=d;let h=f.pathname||"/",y=h;if(c!=="/"){let w=c.replace(/^\//,"").split("/");y="/"+h.replace(/^\//,"").split("/").slice(w.length).join("/")}let v=j3(e,{pathname:y}),C=e5(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:yn([c,l.encodeLocation?l.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:yn([c,l.encodeLocation?l.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),a,s,r);return t&&C?u.createElement(Cl.Provider,{value:{location:Es({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:on.Pop}},C):C}function G3(){let e=r5(),t=V3(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return u.createElement(u.Fragment,null,u.createElement("h2",null,"Unexpected Application Error!"),u.createElement("h3",{style:{fontStyle:"italic"}},t),s?u.createElement("pre",{style:l},s):null,null)}const Y3=u.createElement(G3,null);class J3 extends u.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?u.createElement(At.Provider,{value:this.props.routeContext},u.createElement(bu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function X3(e){let{routeContext:t,match:s,children:r}=e,l=u.useContext(gl);return l&&l.static&&l.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=s.route.id),u.createElement(At.Provider,{value:t},r)}function e5(e,t,s,r){var l;if(t===void 0&&(t=[]),s===void 0&&(s=null),r===void 0&&(r=null),e==null){var a;if(!s)return null;if(s.errors)e=s.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let i=e,o=(l=s)==null?void 0:l.errors;if(o!=null){let f=i.findIndex(p=>p.route.id&&(o==null?void 0:o[p.route.id])!==void 0);f>=0||ye(!1),i=i.slice(0,Math.min(i.length,f+1))}let c=!1,d=-1;if(s&&r&&r.v7_partialHydration)for(let f=0;f=0?i=i.slice(0,d+1):i=[i[0]];break}}}return i.reduceRight((f,p,h)=>{let y,v=!1,C=null,w=null;s&&(y=o&&p.route.id?o[p.route.id]:void 0,C=p.route.errorElement||Y3,c&&(d<0&&h===0?(a5("route-fallback"),v=!0,w=null):d===h&&(v=!0,w=p.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,h+1)),x=()=>{let m;return y?m=C:v?m=w:p.route.Component?m=u.createElement(p.route.Component,null):p.route.element?m=p.route.element:m=f,u.createElement(X3,{match:p,routeContext:{outlet:f,matches:g,isDataRoute:s!=null},children:m})};return s&&(p.route.ErrorBoundary||p.route.errorElement||h===0)?u.createElement(J3,{location:s.location,revalidation:s.revalidation,component:C,error:y,children:x(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):x()},null)}var Su=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Su||{}),Lu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Lu||{});function t5(e){let t=u.useContext(gl);return t||ye(!1),t}function n5(e){let t=u.useContext(Nu);return t||ye(!1),t}function s5(e){let t=u.useContext(At);return t||ye(!1),t}function Eu(e){let t=s5(),s=t.matches[t.matches.length-1];return s.route.id||ye(!1),s.route.id}function r5(){var e;let t=u.useContext(bu),s=n5(),r=Eu();return t!==void 0?t:(e=s.errors)==null?void 0:e[r]}function l5(){let{router:e}=t5(Su.UseNavigateStable),t=Eu(Lu.UseNavigateStable),s=u.useRef(!1);return ku(()=>{s.current=!0}),u.useCallback(function(l,a){a===void 0&&(a={}),s.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Es({fromRouteId:t},a)))},[e,t])}const a2={};function a5(e,t,s){a2[e]||(a2[e]=!0)}function i5(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Rs(e){let{to:t,replace:s,state:r,relative:l}=e;I1()||ye(!1);let{future:a,static:i}=u.useContext(Gt),{matches:o}=u.useContext(At),{pathname:c}=Ue(),d=ne(),f=No(t,wo(o,a.v7_relativeSplatPath),c,l==="path"),p=JSON.stringify(f);return u.useEffect(()=>d(JSON.parse(p),{replace:s,state:r,relative:l}),[d,p,l,s,r]),null}function o5(e){return W3(e.context)}function re(e){ye(!1)}function c5(e){let{basename:t="/",children:s=null,location:r,navigationType:l=on.Pop,navigator:a,static:i=!1,future:o}=e;I1()&&ye(!1);let c=t.replace(/^\/*/,"/"),d=u.useMemo(()=>({basename:c,navigator:a,static:i,future:Es({v7_relativeSplatPath:!1},o)}),[c,o,a,i]);typeof r=="string"&&(r=R1(r));let{pathname:f="/",search:p="",hash:h="",state:y=null,key:v="default"}=r,C=u.useMemo(()=>{let w=E1(f,c);return w==null?null:{location:{pathname:w,search:p,hash:h,state:y,key:v},navigationType:l}},[c,f,p,h,y,v,l]);return C==null?null:u.createElement(Gt.Provider,{value:d},u.createElement(Cl.Provider,{children:s,value:C}))}function u5(e){let{children:t,location:s}=e;return Q3(hi(t),s)}new Promise(()=>{});function hi(e,t){t===void 0&&(t=[]);let s=[];return u.Children.forEach(e,(r,l)=>{if(!u.isValidElement(r))return;let a=[...t,l];if(r.type===u.Fragment){s.push.apply(s,hi(r.props.children,a));return}r.type!==re&&ye(!1),!r.props.index||!r.props.children||ye(!1);let i={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=hi(r.props.children,a)),s.push(i)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[s];return t.concat(Array.isArray(r)?r.map(l=>[s,l]):[[s,r]])},[]))}function p5(e,t){let s=gi(e);return t&&t.forEach((r,l)=>{s.has(l)||t.getAll(l).forEach(a=>{s.append(l,a)})}),s}const f5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],m5=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],h5="6";try{window.__reactRouterVersion=h5}catch{}const g5=u.createContext({isTransitioning:!1}),C5="startTransition",i2=a4[C5];function y5(e){let{basename:t,children:s,future:r,window:l}=e,a=u.useRef();a.current==null&&(a.current=C3({window:l,v5Compat:!0}));let i=a.current,[o,c]=u.useState({action:i.action,location:i.location}),{v7_startTransition:d}=r||{},f=u.useCallback(p=>{d&&i2?i2(()=>c(p)):c(p)},[c,d]);return u.useLayoutEffect(()=>i.listen(f),[i,f]),u.useEffect(()=>i5(r),[r]),u.createElement(c5,{basename:t,children:s,location:o.location,navigationType:o.action,navigator:i,future:r})}const v5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",j5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,On=u.forwardRef(function(t,s){let{onClick:r,relative:l,reloadDocument:a,replace:i,state:o,target:c,to:d,preventScrollReset:f,viewTransition:p}=t,h=Tu(t,f5),{basename:y}=u.useContext(Gt),v,C=!1;if(typeof d=="string"&&j5.test(d)&&(v=d,v5))try{let m=new URL(window.location.href),j=d.startsWith("//")?new URL(m.protocol+d):new URL(d),b=E1(j.pathname,y);j.origin===m.origin&&b!=null?d=b+j.search+j.hash:C=!0}catch{}let w=Z3(d,{relative:l}),g=b5(d,{replace:i,state:o,target:c,preventScrollReset:f,relative:l,viewTransition:p});function x(m){r&&r(m),m.defaultPrevented||g(m)}return u.createElement("a",Yr({},h,{href:v||w,onClick:C||a?r:x,ref:s,target:c}))}),w5=u.forwardRef(function(t,s){let{"aria-current":r="page",caseSensitive:l=!1,className:a="",end:i=!1,style:o,to:c,viewTransition:d,children:f}=t,p=Tu(t,m5),h=yl(c,{relative:p.relative}),y=Ue(),v=u.useContext(Nu),{navigator:C,basename:w}=u.useContext(Gt),g=v!=null&&k5(h)&&d===!0,x=C.encodeLocation?C.encodeLocation(h).pathname:h.pathname,m=y.pathname,j=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;l||(m=m.toLowerCase(),j=j?j.toLowerCase():null,x=x.toLowerCase()),j&&w&&(j=E1(j,w)||j);const b=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let N=m===x||!i&&m.startsWith(x)&&m.charAt(b)==="/",E=j!=null&&(j===x||!i&&j.startsWith(x)&&j.charAt(x.length)==="/"),L={isActive:N,isPending:E,isTransitioning:g},I=N?r:void 0,D;typeof a=="function"?D=a(L):D=[a,N?"active":null,E?"pending":null,g?"transitioning":null].filter(Boolean).join(" ");let M=typeof o=="function"?o(L):o;return u.createElement(On,Yr({},p,{"aria-current":I,className:D,ref:s,style:M,to:c,viewTransition:d}),typeof f=="function"?f(L):f)});var Ci;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ci||(Ci={}));var o2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(o2||(o2={}));function N5(e){let t=u.useContext(gl);return t||ye(!1),t}function b5(e,t){let{target:s,replace:r,state:l,preventScrollReset:a,relative:i,viewTransition:o}=t===void 0?{}:t,c=ne(),d=Ue(),f=yl(e,{relative:i});return u.useCallback(p=>{if(x5(p,s)){p.preventDefault();let h=r!==void 0?r:Gr(d)===Gr(f);c(e,{replace:h,state:l,preventScrollReset:a,relative:i,viewTransition:o})}},[d,c,f,r,l,s,e,a,i,o])}function Mu(e){let t=u.useRef(gi(e)),s=u.useRef(!1),r=Ue(),l=u.useMemo(()=>p5(r.search,s.current?null:t.current),[r.search]),a=ne(),i=u.useCallback((o,c)=>{const d=gi(typeof o=="function"?o(l):o);s.current=!0,a("?"+d,c)},[a,l]);return[l,i]}function k5(e,t){t===void 0&&(t={});let s=u.useContext(g5);s==null&&ye(!1);let{basename:r}=N5(Ci.useViewTransitionState),l=yl(e,{relative:t.relative});if(!s.isTransitioning)return!1;let a=E1(s.currentLocation.pathname,r)||s.currentLocation.pathname,i=E1(s.nextLocation.pathname,r)||s.nextLocation.pathname;return mi(l.pathname,i)!=null||mi(l.pathname,a)!=null}const S5={"channel-talk":'',"alert-triangle-filled":'',archive:'',"arrow-bar-to-up":'',"arrow-down":'',"arrow-left":'',"arrow-right":'',"arrow-up":'',badge:'',book:'',"book-open":'',"bookmak-filled":'',bookmark:'',bookmarks:'',camera:'',"camera-filled":'',cancel:'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"circle-alert":'',"circle-alert-filled":' ',"circle-cancel":' ',"circle-cancel-filled":' ',"circle-check-filled":' ',clock:'',"clock-filled":'',"dots-vertical":'',download:'',edit:'',empty:' ',"external-link":'',eyeoff:'',eyeon:'',folder:'',heart:'',"heart-filled":'',"heart-plus":'',lock:'',"lock-off":'',menu:'',message:'',notice:'',"notice-filled":' ',"notice-ring":'',"noticet-ring-filled":' ',pencil:'',photo:'',pin:'',"pin-filled":' ',"pinned-off":'',"pinned-off-filled":' ',plus:'',reset:'',search:'',send:'',settings:'',share:'',"sort-descending":'',"square-rounded":'',star:'',"star-filled":' ',"trash-filled":' ',upload:''};function S({name:e,size:t=24,className:s}){return n.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:s,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:S5[e]}})}const L5={interview:{viewBox:"0 0 24 24",body:' '},"chat-feedback":{viewBox:"0 0 24 24",body:' '},"chat-feedback-primary":{viewBox:"0 0 24 24",body:' '},chart:{viewBox:"0 0 24 24",body:' '},"clipboard-check":{viewBox:"0 0 24 24",body:' '},file:{viewBox:"0 0 24 24",body:' '},"file-search":{viewBox:"0 0 24 24",body:' '},"file-search-white":{viewBox:"0 0 24 24",body:' '},"file-upload":{viewBox:"0 0 24 24",body:' '},keyboard:{viewBox:"0 0 24 24",body:' '},microphone:{viewBox:"0 0 24 24",body:' '},idea:{viewBox:"0 0 24 24",body:' '},layer:{viewBox:"0 0 24 24",body:' '},link:{viewBox:"0 0 24 24",body:''},lock:{viewBox:"0 0 24 24",body:' '},major:{viewBox:"0 0 24 24",body:' '},puzzle:{viewBox:"0 0 24 24",body:''},school:{viewBox:"0 0 24 24",body:' '},search:{viewBox:"0 0 24 24",body:' '},target:{viewBox:"0 0 24 24",body:' '},"thumb-up":{viewBox:"0 0 24 24",body:' '},user:{viewBox:"0 0 24 24",body:' '},"user-white":{viewBox:"0 0 24 24",body:' '},bag:{viewBox:"0 0 24 24",body:' '},users:{viewBox:"0 0 24 24",body:' '},kakao:{viewBox:"0 0 24 24",body:' '},naver:{viewBox:"0 0 24 24",body:''},google:{viewBox:"0 0 24 24",body:' '}};function V({name:e,size:t=24,className:s}){const r=L5[e];return n.jsx("svg",{width:t,height:t,viewBox:r.viewBox,fill:"none",className:s,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:r.body}})}const E5={},c2=e=>{let t;const s=new Set,r=(f,p)=>{const h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){const y=t;t=p??(typeof h!="object"||h===null)?h:Object.assign({},t,h),s.forEach(v=>v(t,y))}},l=()=>t,c={setState:r,getState:l,getInitialState:()=>d,subscribe:f=>(s.add(f),()=>s.delete(f)),destroy:()=>{(E5?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),s.clear()}},d=t=e(r,l,c);return c},T5=e=>e?c2(e):c2;var _u={exports:{}},zu={},Pu={exports:{}},Ru={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var T1=u;function M5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _5=typeof Object.is=="function"?Object.is:M5,z5=T1.useState,P5=T1.useEffect,R5=T1.useLayoutEffect,I5=T1.useDebugValue;function D5(e,t){var s=t(),r=z5({inst:{value:s,getSnapshot:t}}),l=r[0].inst,a=r[1];return R5(function(){l.value=s,l.getSnapshot=t,la(l)&&a({inst:l})},[e,s,t]),P5(function(){return la(l)&&a({inst:l}),e(function(){la(l)&&a({inst:l})})},[e]),I5(s),s}function la(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!_5(e,s)}catch{return!0}}function A5(e,t){return t()}var F5=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?A5:D5;Ru.useSyncExternalStore=T1.useSyncExternalStore!==void 0?T1.useSyncExternalStore:F5;Pu.exports=Ru;var O5=Pu.exports;/** * @license React * use-sync-external-store-shim/with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vl=u,H5=O5;function $5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var V5=typeof Object.is=="function"?Object.is:$5,B5=H5.useSyncExternalStore,Z5=vl.useRef,U5=vl.useEffect,q5=vl.useMemo,W5=vl.useDebugValue;zu.useSyncExternalStoreWithSelector=function(e,t,s,r,l){var a=Z5(null);if(a.current===null){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=q5(function(){function c(y){if(!d){if(d=!0,f=y,y=r(y),l!==void 0&&i.hasValue){var v=i.value;if(l(v,y))return p=v}return p=y}if(v=p,V5(f,y))return v;var C=r(y);return l!==void 0&&l(v,C)?(f=y,v):(f=y,p=C)}var d=!1,f,p,h=s===void 0?null:s;return[function(){return c(t())},h===null?void 0:function(){return c(h())}]},[t,s,r,l]);var o=B5(e,a[0],a[1]);return U5(function(){i.hasValue=!0,i.value=o},[o]),W5(o),o};_u.exports=zu;var Q5=_u.exports;const K5=r0(Q5),Iu={},{useDebugValue:G5}=m0,{useSyncExternalStoreWithSelector:Y5}=K5;let u2=!1;const J5=e=>e;function X5(e,t=J5,s){(Iu?"production":void 0)!=="production"&&s&&!u2&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),u2=!0);const r=Y5(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,s);return G5(r),r}const d2=e=>{(Iu?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?T5(e):e,s=(r,l)=>X5(t,r,l);return Object.assign(s,t),s},e8=e=>e?d2(e):d2,Jn="accessToken",Xn="refreshToken",e1="keepLogin",ar="user",x2=e=>e?localStorage:sessionStorage,ge={setTokens(e,t,s,r){const l=x2(s);l.setItem(Jn,e),l.setItem(Xn,t),r&&l.setItem(ar,JSON.stringify(r)),localStorage.setItem(e1,String(s))},updateTokens(e,t){const s=localStorage.getItem(e1)==="true",r=x2(s);r.setItem(Jn,e),r.setItem(Xn,t)},getAccessToken(){return localStorage.getItem(e1)==="true"?localStorage.getItem(Jn):sessionStorage.getItem(Jn)},getRefreshToken(){return localStorage.getItem(e1)==="true"?localStorage.getItem(Xn):sessionStorage.getItem(Xn)},getUser(){const t=(localStorage.getItem(e1)==="true"?localStorage:sessionStorage).getItem(ar);if(!t)return null;try{return JSON.parse(t)}catch{return null}},clear(){localStorage.removeItem(Jn),localStorage.removeItem(Xn),localStorage.removeItem(e1),localStorage.removeItem(ar),sessionStorage.removeItem(Jn),sessionStorage.removeItem(Xn),sessionStorage.removeItem(ar)}},yt=e8(e=>({isAuthenticated:!!ge.getAccessToken(),user:ge.getUser(),setAuth:(t,s)=>{ge.setTokens(t.accessToken,t.refreshToken,s,t.user),e({isAuthenticated:!0,user:t.user})},clearAuth:()=>{ge.clear(),e({isAuthenticated:!1,user:null})}}));let br=null;function p2(e){br=e}function f2(){br==null||br()}const Du="",t8="";function ze(e){return e.startsWith("/ai/")||e==="/ai"?t8:Du}const yi=Du;class Ke extends Error{constructor(s,r,l){super(r);_l(this,"code");_l(this,"status");this.name="ApiErrorException",this.code=s,this.status=l}}function ee(e){if(e instanceof Ke)return{code:e.code,message:e.message};if(e instanceof Error){try{const t=JSON.parse(e.message);if(t.code&&t.message)return t}catch{}return{code:"UNKNOWN_ERROR",message:e.message}}return{code:"UNKNOWN_ERROR",message:"알 수 없는 오류가 발생했습니다."}}async function Au(e){const t=await e.json().catch(()=>({}));if(!e.ok){const s=t.code??"UNKNOWN_ERROR",r=t.message??"요청 처리 중 오류가 발생했습니다.";throw new Ke(s,r,e.status)}return t}async function n8(e,t){const s=ge.getRefreshToken();if(!s)throw f2(),new Ke("UNAUTHORIZED","다시 로그인해 주세요.",401);const r=await fetch(`${yi}/api/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:s})});if(!r.ok){ge.clear(),f2();const o=await r.json().catch(()=>({}));throw new Ke(o.code??"UNAUTHORIZED",o.message??"다시 로그인해 주세요.",401)}const l=await r.json();ge.updateTokens(l.accessToken,l.refreshToken);const a=new Headers(t.headers);a.set("Authorization",`Bearer ${l.accessToken}`);const i=await fetch(`${yi}${e}`,{...t,headers:a});return Au(i)}async function Pe(e,t={}){const{accessToken:s,...r}=t,l=s??ge.getAccessToken(),a={"Content-Type":"application/json",...r.headers||{}};r.body instanceof FormData&&delete a["Content-Type"],l&&(a.Authorization=`Bearer ${l}`);const i=await fetch(`${yi}${e}`,{...r,headers:a});return i.status===401&&e!=="/api/auth/refresh"&&e!=="/api/auth/login"&&e!=="/api/auth/signup"&&e!=="/api/auth/logout"?n8(e,r):Au(i)}function s8(e){return Pe("/api/auth/email/verify",{method:"POST",body:JSON.stringify(e)})}function Jr(e){return Pe("/api/auth/password/email/verify",{method:"POST",body:JSON.stringify(e)})}function ko(e){return Pe("/api/auth/email/confirm",{method:"POST",body:JSON.stringify(e)})}function r8(e){return Pe("/api/auth/signup",{method:"POST",body:JSON.stringify(e)})}function m2(e){return Pe("/api/auth/login",{method:"POST",body:JSON.stringify(e)})}function Fu(e){return Pe("/api/auth/password/reset",{method:"POST",body:JSON.stringify(e)})}function Ou(e,t){return Pe("/api/auth/logout",{method:"POST",body:JSON.stringify(e),accessToken:t})}function jl({className:e}){return n.jsxs("svg",{viewBox:"0 0 259 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,role:"img","aria-label":"카리면접",children:[n.jsx("path",{className:"fill-primary-60",d:"M25.8802 14.9787C26.0725 11.2713 26.7174 8.92045 28.4395 6.55652C29.93 4.51096 32.3457 2.52 35.047 2.19625C40.6676 1.52106 42.0577 7.95074 41.3603 12.2018C40.7 16.2245 39.1895 19.1652 38.5392 20.2902C38.3755 20.5732 38.4504 20.9331 38.7161 21.1269C40.1834 22.1966 44.3428 25.7002 41.9295 29.5552C39.3632 33.6556 33.5535 31.66 30.798 28.8624C28.5801 26.6115 27.1738 23.78 26.4849 20.7524C26.0764 18.9568 25.7783 16.942 25.8802 14.9787Z"}),n.jsx("path",{className:"fill-primary-60",d:"M9.90134 20.4656C9.99555 20.3511 9.92373 20.1826 9.77623 20.1657C4.92562 19.6167 0.580845 15.5824 0.048753 10.7438C-0.44627 6.24208 2.8822 0.885941 7.58685 0.125392C12.6931 -0.699753 18.1437 2.66619 20.8335 6.79115C23.5403 10.9423 24.2223 16.1961 23.3774 21.0732C22.7179 24.8805 21.1324 28.5887 18.4766 31.4048C15.82 34.2209 12.0359 36.0696 8.15679 35.9981C7.07716 35.9781 5.96123 35.7989 5.06231 35.2021C3.34402 34.0602 2.8822 31.6432 3.43206 29.6599C3.98191 27.6766 5.11869 25.7779 6.42922 24.1869L9.90211 20.4649L9.90134 20.4656Z"}),n.jsx("path",{className:"fill-primary-60",d:"M71.1907 15.526H67.2504C67.1784 15.0163 67.0315 14.5634 66.8096 14.1676C66.5877 13.7658 66.3028 13.4239 65.9549 13.142C65.6071 12.8602 65.2053 12.6443 64.7494 12.4943C64.2996 12.3444 63.8108 12.2694 63.2831 12.2694C62.3295 12.2694 61.4988 12.5063 60.7911 12.9801C60.0834 13.4479 59.5346 14.1316 59.1448 15.0312C58.755 15.9249 58.5601 17.0104 58.5601 18.2879C58.5601 19.6013 58.755 20.7049 59.1448 21.5985C59.5406 22.4921 60.0924 23.1668 60.8001 23.6226C61.5078 24.0784 62.3265 24.3063 63.2561 24.3063C63.7779 24.3063 64.2607 24.2374 64.7045 24.0994C65.1543 23.9615 65.5531 23.7606 65.901 23.4967C66.2488 23.2268 66.5367 22.8999 66.7646 22.5161C66.9985 22.1323 67.1604 21.6944 67.2504 21.2027L71.1907 21.2206C71.0888 22.0663 70.8339 22.8819 70.4261 23.6676C70.0242 24.4473 69.4815 25.146 68.7977 25.7637C68.12 26.3755 67.3104 26.8613 66.3688 27.2211C65.4332 27.575 64.3746 27.7519 63.1931 27.7519C61.5498 27.7519 60.0804 27.3801 58.785 26.6364C57.4955 25.8927 56.4759 24.8161 55.7262 23.4067C54.9826 21.9973 54.6107 20.291 54.6107 18.2879C54.6107 16.2787 54.9886 14.5694 55.7442 13.16C56.4999 11.7506 57.5255 10.6771 58.8209 9.93939C60.1164 9.19571 61.5738 8.82386 63.1931 8.82386C64.2607 8.82386 65.2502 8.9738 66.1619 9.27367C67.0795 9.57355 67.8921 10.0114 68.5998 10.5871C69.3075 11.1569 69.8833 11.8556 70.3271 12.6832C70.7769 13.5109 71.0648 14.4585 71.1907 15.526ZM76.8134 27.5H72.6391L78.9994 9.07576H84.0193L90.3707 27.5H86.1964L81.5814 13.286H81.4374L76.8134 27.5ZM76.5525 20.258H86.4123V23.2988H76.5525V20.258ZM92.5882 27.5V9.07576H99.8572C101.249 9.07576 102.436 9.32465 103.42 9.82244C104.409 10.3142 105.162 11.0129 105.678 11.9186C106.199 12.8182 106.46 13.8767 106.46 15.0942C106.46 16.3177 106.196 17.3703 105.669 18.2519C105.141 19.1275 104.376 19.7992 103.375 20.267C102.379 20.7348 101.174 20.9687 99.7582 20.9687H94.8913V17.8381H99.1285C99.8722 17.8381 100.49 17.7361 100.982 17.5322C101.473 17.3283 101.839 17.0224 102.079 16.6146C102.325 16.2068 102.448 15.7 102.448 15.0942C102.448 14.4825 102.325 13.9667 102.079 13.5469C101.839 13.1271 101.47 12.8092 100.973 12.5933C100.481 12.3714 99.8602 12.2604 99.1105 12.2604H96.4836V27.5H92.5882ZM102.538 19.1155L107.117 27.5H102.817L98.3368 19.1155H102.538ZM113.109 9.07576V27.5H109.213V9.07576H113.109Z"}),n.jsx("path",{className:"fill-black",d:"M126.299 9.07576V27.5H124.068V9.07576H126.299ZM145.382 9.07576V27.5H143.223L133.184 13.0341H133.004V27.5H130.773V9.07576H132.932L143.007 23.5777H143.187V9.07576H145.382ZM148.839 11.0549V9.07576H162.657V11.0549H156.864V27.5H154.633V11.0549H148.839ZM166.101 27.5V9.07576H177.22V11.0549H168.332V17.2803H176.644V19.2595H168.332V25.5208H177.364V27.5H166.101ZM181.241 27.5V9.07576H187.467C188.906 9.07576 190.088 9.32165 191.011 9.81345C191.935 10.2992 192.619 10.968 193.062 11.8196C193.506 12.6712 193.728 13.6398 193.728 14.7254C193.728 15.8109 193.506 16.7735 193.062 17.6132C192.619 18.4528 191.938 19.1125 191.02 19.5923C190.103 20.0661 188.93 20.303 187.503 20.303H182.465V18.2879H187.431C188.414 18.2879 189.206 18.1439 189.806 17.8561C190.412 17.5682 190.849 17.1604 191.119 16.6326C191.395 16.0988 191.533 15.4631 191.533 14.7254C191.533 13.9877 191.395 13.343 191.119 12.7912C190.843 12.2394 190.403 11.8136 189.797 11.5137C189.191 11.2079 188.39 11.0549 187.395 11.0549H183.472V27.5H181.241ZM189.914 19.2235L194.448 27.5H191.857L187.395 19.2235H189.914ZM197.781 9.07576L203.251 24.5852H203.467L208.936 9.07576H211.275L204.51 27.5H202.207L195.442 9.07576H197.781ZM216.376 9.07576V27.5H214.145V9.07576H216.376ZM220.849 27.5V9.07576H231.969V11.0549H223.081V17.2803H231.393V19.2595H223.081V25.5208H232.113V27.5H220.849ZM239.337 27.5L234.299 9.07576H236.566L240.416 24.0814H240.596L244.519 9.07576H247.037L250.96 24.0814H251.14L254.99 9.07576H257.257L252.219 27.5H249.916L245.85 12.8182H245.706L241.64 27.5H239.337Z"})]})}function h2({text:e,showChevron:t=!1,active:s=!1,className:r=""}){return n.jsxs("span",{className:`flex items-center gap-[2px] text-body-2-semibold transition-colors ${s?"text-primary-60":"text-neutral-100 hover:text-primary-60"} ${r}`,children:[e,t&&n.jsx(S,{name:"chevron-down",size:20,className:"shrink-0"})]})}function So({children:e,className:t=""}){return n.jsx("div",{role:"menu",className:`flex flex-col gap-[6px] rounded-xl bg-white p-[8px] shadow-[0_0_12px_rgba(0,0,0,0.1)] ${t}`,children:e})}function Xr({danger:e=!1,showChevron:t=!1,children:s,className:r="",...l}){return n.jsxs("button",{type:"button",role:"menuitem",className:`flex h-[36px] items-center gap-[4px] rounded-lg px-[10px] text-body-2-medium transition-colors hover:bg-neutral-5 ${e?"text-danger-50":"text-neutral-60"} ${r}`,...l,children:[n.jsx("span",{className:"whitespace-nowrap",children:s}),t&&n.jsx(S,{name:"chevron-right",size:16,className:"shrink-0"})]})}const l8=[{label:"면접 질문",to:"/questions"},{label:"면접 연습",to:"/practice"}],a8=[{label:"카리면접 이용안내",to:"/guide"},{label:"생기부 다운로드 안내",to:"/guide/recordbook"},{label:"공지사항",to:"/notice"},{label:"자주 묻는 질문",to:"/faq"}];function Un({variant:e="default",title:t,subtitle:s,onBack:r}={}){const{isAuthenticated:l,user:a,clearAuth:i}=yt(),[o,c]=u.useState(!1),[d,f]=u.useState(!1),p=u.useRef(null),h=ne(),y=Ue(),v=["/guide","/notice","/faq"].some(w=>y.pathname.startsWith(w));if(u.useEffect(()=>{if(!o)return;const w=x=>{var m;(m=p.current)!=null&&m.contains(x.target)||c(!1)},g=x=>{x.key==="Escape"&&c(!1)};return document.addEventListener("pointerdown",w),document.addEventListener("keydown",g),()=>{document.removeEventListener("pointerdown",w),document.removeEventListener("keydown",g)}},[o]),e==="practice")return n.jsx("nav",{className:"sticky top-0 z-50 w-full border-b border-primary-10 bg-primary-5",children:n.jsxs("div",{className:"relative mx-auto flex h-[84px] max-w-[1440px] items-center px-[120px]",children:[n.jsx("button",{type:"button",onClick:r??(()=>h(-1)),"aria-label":"뒤로 가기",className:"flex size-[28px] items-center justify-center text-neutral-90 hover:text-neutral-100",children:n.jsx(S,{name:"arrow-left",size:28})}),n.jsxs("div",{className:"pointer-events-none absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 flex-col items-center",children:[t&&n.jsx("p",{className:"text-body-2-semibold text-neutral-100",children:t}),s&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:s})]})]})});const C=async()=>{const w=ge.getRefreshToken(),g=ge.getAccessToken();try{w&&g&&await Ou({refreshToken:w},g)}catch{}finally{i()}};return n.jsx("nav",{className:"sticky top-0 z-50 w-full border-b border-neutral-10 bg-white",children:n.jsxs("div",{className:"mx-auto flex h-[68px] max-w-[1440px] items-center justify-between px-[120px]",children:[n.jsxs("div",{className:"flex items-center gap-[73px]",children:[n.jsx(On,{to:"/",className:"flex items-center",children:n.jsx(jl,{className:"h-[26px] w-auto"})}),n.jsxs("ul",{className:"flex items-center gap-[40px]",children:[l8.map(w=>n.jsx("li",{children:n.jsx(w5,{to:w.to,children:({isActive:g})=>n.jsx(h2,{text:w.label,active:g})})},w.to)),n.jsxs("li",{className:"relative",onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[n.jsx("button",{type:"button","aria-haspopup":"menu","aria-expanded":d,className:"flex items-center",children:n.jsx(h2,{text:"이용안내",showChevron:!0,active:v})}),d&&n.jsx("div",{className:"absolute left-1/2 top-full z-50 -translate-x-1/2 pt-[12px]",children:n.jsx(So,{className:"w-[200px] rounded-[24px]",children:a8.map(w=>n.jsx(Xr,{className:"justify-center",onClick:()=>{f(!1),h(w.to)},children:w.label},w.to))})})]})]})]}),n.jsx("div",{className:"flex items-center gap-[8px]",children:l?n.jsxs("div",{className:"relative",ref:p,children:[n.jsxs("button",{onClick:()=>c(w=>!w),className:"flex items-center gap-[8px] rounded-full py-[4px] pl-[4px] pr-[8px] hover:bg-neutral-5",children:[n.jsx(V,{name:"user",size:36}),n.jsx("span",{className:"text-body-2-semibold text-neutral-100",children:"마이페이지"})]}),o&&n.jsxs("div",{className:"absolute right-0 top-[52px] w-[192px] rounded-xl border border-neutral-10 bg-white py-[8px] shadow-frame",children:[n.jsx("div",{className:"px-[16px] py-[8px] text-body-3-semibold text-neutral-90",children:a==null?void 0:a.name}),n.jsx("div",{className:"px-[16px] pb-[8px] text-caption-medium text-neutral-50",children:a==null?void 0:a.email}),n.jsx("hr",{className:"my-[4px] border-neutral-10"}),n.jsx("button",{onClick:()=>{c(!1),h("/mypage")},className:"block w-full px-[16px] py-[8px] text-left text-body-3-medium text-neutral-80 hover:bg-neutral-5",children:"마이페이지"}),n.jsx("button",{onClick:()=>{C(),c(!1),h("/")},className:"block w-full px-[16px] py-[8px] text-left text-body-3-medium text-neutral-80 hover:bg-neutral-5",children:"로그아웃"})]})]}):n.jsxs(n.Fragment,{children:[n.jsx(On,{to:"/login",className:"flex h-[36px] items-center rounded-xl bg-neutral-10 px-[10px] text-body-3-semibold text-neutral-80 hover:bg-neutral-20",children:"로그인"}),n.jsxs(On,{to:"/start",className:"flex h-[36px] items-center gap-[4px] rounded-xl bg-primary-60 px-[10px] text-body-3-semibold text-white hover:bg-primary-70",children:["면접 질문 받아보기",n.jsx(S,{name:"arrow-right",size:20})]})]})})]})})}const i8=[{label:"네이버 블로그",href:"#",svg:n.jsxs("svg",{width:"22",height:"18",viewBox:"0 0 22 18",fill:"none","aria-hidden":!0,children:[n.jsx("path",{d:"M12.273 7.26905C12.1596 7.26675 12.047 7.28765 11.9421 7.33046C11.8373 7.37326 11.7425 7.43703 11.6638 7.51778C11.5851 7.59852 11.5241 7.69449 11.4847 7.79966C11.4452 7.90483 11.4282 8.01692 11.4347 8.1289C11.4347 8.3535 11.5249 8.56889 11.6855 8.7277C11.8461 8.88651 12.0639 8.97573 12.291 8.97573C12.5181 8.97573 12.7359 8.88651 12.8965 8.7277C13.057 8.56889 13.1473 8.3535 13.1473 8.1289C13.1532 8.01404 13.1345 7.89924 13.0926 7.79195C13.0507 7.68467 12.9864 7.58732 12.904 7.50622C12.8215 7.42512 12.7227 7.36209 12.614 7.32123C12.5053 7.28036 12.3891 7.26259 12.273 7.26905Z",fill:"currentColor"}),n.jsx("path",{d:"M20.7353 1.25071C20.3345 0.853116 19.8581 0.537908 19.3336 0.323252C18.809 0.108596 18.2467 -0.00126158 17.679 1.09294e-05H4.32096C3.75339 -0.000456364 3.1913 0.109755 2.66684 0.324338C2.14238 0.538921 1.66586 0.853665 1.26453 1.25056C0.863194 1.64746 0.544933 2.11872 0.327952 2.63738C0.110971 3.15604 -0.000471019 3.71192 1.49631e-06 4.27322V10.6309C-0.000471019 11.1922 0.110971 11.7481 0.327952 12.2668C0.544933 12.7854 0.863194 13.2567 1.26453 13.6536C1.66586 14.0505 2.14238 14.3652 2.66684 14.5798C3.1913 14.7944 3.75339 14.9046 4.32096 14.9041H9.2479L10.6707 17.7656C10.6938 17.8339 10.738 17.8932 10.7971 17.9353C10.8562 17.9774 10.9272 18 11 18C11.0728 18 11.1438 17.9774 11.2029 17.9353C11.262 17.8932 11.3062 17.8339 11.3293 17.7656L12.7521 14.8994H17.679C18.2462 14.8999 18.8079 14.7898 19.332 14.5755C19.8562 14.3612 20.3325 14.0469 20.7338 13.6505C21.135 13.2541 21.4534 12.7834 21.6707 12.2653C21.8879 11.7472 21.9998 11.1918 22 10.6309V4.27322C22.0013 3.71181 21.8902 3.1557 21.6731 2.63695C21.4561 2.1182 21.1374 1.64707 20.7353 1.25071V1.25071ZM4.8479 10.1856C4.62783 10.1949 4.40887 10.15 4.2107 10.0549C4.01253 9.95981 3.84136 9.81751 3.71257 9.64079H3.68862V10.0577H2.34491V4.45561H3.71257V6.58748C3.85858 6.42754 4.03768 6.30055 4.23771 6.21513C4.43774 6.12971 4.65402 6.08785 4.87185 6.09241C5.13139 6.10063 5.38662 6.16032 5.62239 6.26794C5.85816 6.37556 6.06966 6.52892 6.24436 6.71891C6.41906 6.90891 6.55338 7.13168 6.63937 7.37399C6.72535 7.61631 6.76124 7.87323 6.74491 8.12953C6.76007 8.38844 6.72271 8.64774 6.63503 8.89216C6.54736 9.13658 6.41113 9.36119 6.23437 9.55277C6.05761 9.74435 5.84389 9.89903 5.60579 10.0077C5.36768 10.1164 5.11 10.1769 4.8479 10.1856V10.1856ZM9.14251 10.0553H7.82515V6.82672C7.82515 6.22743 7.71976 5.70631 7.19281 5.62814V4.32533C8.35209 4.32533 9.14251 5.15439 9.14251 6.56616V10.0553ZM12.3042 10.1595C12.0169 10.1851 11.7274 10.1513 11.4541 10.0601C11.1808 9.96898 10.9297 9.82252 10.7168 9.63009C10.5039 9.43766 10.3339 9.20349 10.2175 8.94248C10.1012 8.68148 10.0411 8.39937 10.0411 8.11413C10.0411 7.82889 10.1012 7.54679 10.2175 7.28578C10.3339 7.02478 10.5039 6.7906 10.7168 6.59817C10.9297 6.40574 11.1808 6.25929 11.4541 6.16813C11.7274 6.07697 12.0169 6.04312 12.3042 6.06872C12.5916 6.0482 12.8802 6.086 13.1523 6.17981C13.4244 6.27362 13.6742 6.42146 13.8864 6.61424C14.0986 6.80702 14.2687 7.04067 14.3863 7.30084C14.5039 7.56102 14.5664 7.84221 14.5701 8.12716C14.5684 8.4117 14.507 8.6928 14.3898 8.95266C14.2726 9.21252 14.1021 9.44547 13.8891 9.63675C13.6761 9.82803 13.4252 9.97348 13.1524 10.0639C12.8796 10.1543 12.5907 10.1877 12.3042 10.1619V10.1595ZM19.576 9.71659C19.576 11.3321 18.7593 12.1398 17.3365 12.1398H17.073V10.9175H17.3365C18.0479 10.9175 18.2587 10.4746 18.2587 9.82318V9.64079C18.1106 9.80685 17.928 9.93938 17.7234 10.0293C17.5188 10.1192 17.2969 10.1645 17.073 10.1619C16.8203 10.1595 16.5707 10.1062 16.3393 10.0055C16.108 9.90473 15.8998 9.75855 15.7273 9.5758C15.5548 9.39304 15.4217 9.17754 15.336 8.94236C15.2503 8.70719 15.2138 8.45724 15.2287 8.2077C15.2112 7.94473 15.2476 7.68097 15.3357 7.43225C15.4238 7.18353 15.5618 6.95498 15.7415 6.76031C15.9211 6.56563 16.1386 6.40885 16.381 6.29937C16.6234 6.1899 16.8857 6.12997 17.1521 6.12321C17.3665 6.10681 17.5815 6.1463 17.7757 6.23774C17.9699 6.32918 18.1364 6.46937 18.2587 6.64433H18.285V6.22743L19.576 6.25349V9.71659Z",fill:"currentColor"}),n.jsx("path",{d:"M17.4683 7.24339C17.3526 7.23761 17.2369 7.2559 17.1288 7.29707C17.0206 7.33824 16.9224 7.40137 16.8405 7.4824C16.7586 7.56343 16.6947 7.66054 16.6531 7.76748C16.6115 7.87442 16.593 7.9888 16.5988 8.10324C16.5909 8.21819 16.6079 8.3335 16.6488 8.4414C16.6896 8.54929 16.7534 8.64728 16.8358 8.72875C16.9182 8.81023 17.0173 8.8733 17.1264 8.91372C17.2355 8.95414 17.3521 8.97098 17.4683 8.9631C17.5828 8.96976 17.6975 8.95184 17.8044 8.91054C17.9112 8.86925 18.0078 8.80558 18.0875 8.72389C18.1671 8.6422 18.2279 8.54443 18.2658 8.4373C18.3036 8.33017 18.3175 8.2162 18.3066 8.10324C18.3153 7.99075 18.2999 7.87771 18.2612 7.77155C18.2226 7.66539 18.1617 7.56852 18.0825 7.4873C18.0034 7.40609 17.9077 7.34236 17.8018 7.30033C17.6959 7.25829 17.5823 7.23888 17.4683 7.24339Z",fill:"currentColor"}),n.jsx("path",{d:"M4.53181 8.98938C5.012 8.98938 5.40127 8.60441 5.40127 8.12953C5.40127 7.65464 5.012 7.26967 4.53181 7.26967C4.05162 7.26967 3.66235 7.65464 3.66235 8.12953C3.66235 8.60441 4.05162 8.98938 4.53181 8.98938Z",fill:"currentColor"})]})},{label:"유튜브",href:"#",svg:n.jsx("svg",{width:"22",height:"15.47",viewBox:"0 0 22 15.473",fill:"none","aria-hidden":!0,children:n.jsx("path",{d:"M21.7809 3.33867C21.7809 3.33867 21.566 1.82187 20.9043 1.15586C20.0664 0.279297 19.1297 0.275 18.7 0.223437C15.6234 -1.22935e-07 11.0043 0 11.0043 0H10.9957C10.9957 0 6.37656 -1.22935e-07 3.3 0.223437C2.87031 0.275 1.93359 0.279297 1.0957 1.15586C0.433984 1.82187 0.223437 3.33867 0.223437 3.33867C0.223437 3.33867 0 5.12187 0 6.90078V8.56797C0 10.3469 0.219141 12.1301 0.219141 12.1301C0.219141 12.1301 0.433984 13.6469 1.09141 14.3129C1.9293 15.1895 3.0293 15.1594 3.51914 15.2539C5.28086 15.4215 11 15.473 11 15.473C11 15.473 15.6234 15.4645 18.7 15.2453C19.1297 15.1937 20.0664 15.1895 20.9043 14.3129C21.566 13.6469 21.7809 12.1301 21.7809 12.1301C21.7809 12.1301 22 10.3512 22 8.56797V6.90078C22 5.12187 21.7809 3.33867 21.7809 3.33867ZM8.72695 10.5918V4.40859L14.6695 7.51094L8.72695 10.5918Z",fill:"currentColor"})})},{label:"인스타그램",href:"#",svg:n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:[n.jsx("path",{d:"M10 0C7.28417 0 6.94362 0.0115215 5.877 0.0601678C4.81262 0.108725 4.08569 0.277796 3.4496 0.524957C2.79201 0.780514 2.23434 1.12247 1.67842 1.67839C1.12247 2.23431 0.780514 2.79204 0.524987 3.44963C0.277766 4.08569 0.108755 4.81262 0.060138 5.877C0.0114917 6.94362 0 7.28417 0 10C0 12.7158 0.0114917 13.0564 0.060138 14.123C0.108755 15.1874 0.277766 15.9143 0.524987 16.5504C0.780544 17.208 1.1225 17.7656 1.67842 18.3216C2.23437 18.8775 2.79201 19.2195 3.4496 19.475C4.08569 19.7222 4.81262 19.8912 5.877 19.9398C6.94362 19.9885 7.28417 20 10 20C12.7158 20 13.0564 19.9885 14.123 19.9398C15.1874 19.8913 15.9143 19.7222 16.5504 19.475C17.208 19.2195 17.7656 18.8775 18.3216 18.3216C18.8775 17.7656 19.2195 17.208 19.475 16.5504C19.7222 15.9143 19.8913 15.1874 19.9398 14.123C19.9885 13.0564 20 12.7158 20 10C20 7.28417 19.9885 6.94362 19.9398 5.877C19.8913 4.81262 19.7222 4.08569 19.475 3.44963C19.2195 2.79204 18.8775 2.23431 18.3216 1.67839C17.7656 1.12247 17.208 0.780514 16.5504 0.524957C15.9143 0.277796 15.1874 0.108725 14.123 0.0601678C13.0564 0.0115215 12.7158 0 10 0ZM10 1.80179C12.6701 1.80179 12.9864 1.812 14.0409 1.86011C15.0159 1.90456 15.5454 2.06747 15.8977 2.20442C16.3645 2.38584 16.6976 2.60252 17.0475 2.95245C17.3975 3.30238 17.6142 3.63552 17.7956 4.10228C17.9325 4.45465 18.0954 4.98416 18.1399 5.95914C18.188 7.01361 18.1982 7.3299 18.1982 10C18.1982 12.6701 18.188 12.9864 18.1399 14.0409C18.0954 15.0159 17.9325 15.5454 17.7956 15.8977C17.6142 16.3645 17.3975 16.6976 17.0475 17.0475C16.6976 17.3975 16.3645 17.6142 15.8977 17.7956C15.5453 17.9325 15.0158 18.0954 14.0409 18.1399C12.9866 18.188 12.6703 18.1982 10 18.1982C7.32969 18.1982 7.01349 18.188 5.95914 18.1399C4.98413 18.0954 4.45465 17.9325 4.10231 17.7956C3.63549 17.6142 3.30238 17.3975 2.95248 17.0475C2.60255 16.6976 2.38584 16.3645 2.20442 15.8977C2.06747 15.5453 1.90459 15.0158 1.86011 14.0409C1.812 12.9864 1.80179 12.6701 1.80179 10C1.80179 7.3299 1.812 7.01361 1.86011 5.95914C1.90459 4.98413 2.06747 4.45465 2.20442 4.10231C2.38584 3.63549 2.60255 3.30238 2.95245 2.95248C3.30238 2.60252 3.63552 2.38584 4.10228 2.20442C4.45465 2.06747 4.98416 1.90456 5.95914 1.86011C7.01361 1.812 7.3299 1.80179 10 1.80179",fill:"currentColor"}),n.jsx("path",{d:"M9.99929 13.3327C8.15829 13.3327 6.66592 11.8403 6.66592 9.99935C6.66592 8.15835 8.15829 6.66598 9.99929 6.66598C11.8402 6.66598 13.3326 8.15835 13.3326 9.99935C13.3326 11.8403 11.8402 13.3327 9.99929 13.3327ZM9.99929 4.86419C7.16319 4.86419 4.86413 7.16325 4.86413 9.99935C4.86413 12.8354 7.16319 15.1345 9.99929 15.1345C12.8353 15.1345 15.1344 12.8354 15.1344 9.99935C15.1344 7.16325 12.8353 4.86419 9.99929 4.86419V4.86419ZM16.5373 4.6613C16.5373 5.32407 16 5.86129 15.3373 5.86129C14.6746 5.86129 14.1373 5.32407 14.1373 4.6613C14.1373 3.99856 14.6746 3.46128 15.3373 3.46128C16 3.46128 16.5373 3.99856 16.5373 4.6613",fill:"currentColor"})]})}],aa=()=>n.jsx("span",{className:"h-[7.5px] w-px bg-neutral-70"});function o8(){return n.jsx("footer",{className:"border-t border-neutral-10 bg-white",children:n.jsxs("div",{className:"mx-auto flex max-w-[1440px] flex-col gap-[28px] px-[120px] py-[64px]",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(jl,{className:"h-[24px] w-auto"}),n.jsx("div",{className:"flex items-center gap-[8px]",children:i8.map(e=>n.jsx("a",{href:e.href,"aria-label":e.label,target:"_blank",rel:"noreferrer",className:"flex size-[40px] items-center justify-center rounded-[12px] border border-neutral-10 text-neutral-60 transition-colors hover:bg-neutral-5",children:e.svg},e.label))})]}),n.jsxs("div",{className:"flex items-end justify-between",children:[n.jsxs("div",{className:"flex flex-col gap-[6px] text-body-3-medium text-neutral-70",children:[n.jsx("p",{children:"(주) 고트헤이븐"}),n.jsxs("div",{className:"flex items-center gap-[10px]",children:[n.jsx("span",{children:"대표자: 차형호"}),n.jsx(aa,{}),n.jsx("span",{children:"사업자 등록번호: 177-88-02306"})]}),n.jsx("p",{children:"광주광역시 북구 설죽로370번길 32, 6층 602-11호(오치동)"}),n.jsxs("div",{className:"flex items-center gap-[10px]",children:[n.jsx("span",{children:"이메일: contact@goatheaven.com"}),n.jsx(aa,{}),n.jsx("span",{children:"전화: 02-2106-5626"})]}),n.jsxs("div",{className:"flex items-center gap-[10px]",children:[n.jsx(On,{to:"/privacy",className:"transition-colors hover:text-neutral-90 hover:underline",children:"개인정보 처리방침"}),n.jsx(aa,{}),n.jsx(On,{to:"/terms",className:"transition-colors hover:text-neutral-90 hover:underline",children:"이용약관"})]})]}),n.jsx("p",{className:"text-body-3-regular text-neutral-60",children:"Copyright © 2026 GOATHEAVEN All Rights Reserved."})]})]})})}function c8(){return n.jsxs("div",{className:"flex min-h-screen flex-col bg-white",children:[n.jsx(Un,{}),n.jsx("main",{className:"flex-1",children:n.jsx(o5,{})}),n.jsx(o8,{})]})}const u8={small:"h-[36px] gap-[4px] rounded-xl px-[10px] text-body-3-semibold",medium:"gap-[6px] rounded-[14px] px-[14px] py-[8px] text-body-2-semibold",large:"gap-[8px] rounded-[14px] px-[16px] py-[12px] text-body-1-semibold"},d8={primary:"bg-primary-60 text-white hover:bg-primary-80",gray:"bg-neutral-10 text-neutral-80 hover:bg-neutral-20",secondary:"bg-primary-10 text-primary-60 hover:bg-primary-20",danger:"bg-danger-50 text-white hover:bg-danger-60"},x8="bg-neutral-10 text-neutral-30 cursor-not-allowed";function $({variant:e="primary",size:t="medium",leadingIcon:s,trailingIcon:r,disabled:l=!1,type:a="button",className:i="",children:o,...c}){return n.jsxs("button",{type:a,disabled:l,className:`inline-flex items-center justify-center whitespace-nowrap transition-colors ${u8[t]} ${l?x8:d8[e]} ${i}`,...c,children:[s&&n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center",children:s}),o,r&&n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center",children:r})]})}function je({children:e,delay:t=0,className:s=""}){const r=u.useRef(null),[l,a]=u.useState(!1);return u.useEffect(()=>{var c;if((c=window.matchMedia)!=null&&c.call(window,"(prefers-reduced-motion: reduce)").matches){a(!0);return}const i=r.current;if(!i)return;const o=new IntersectionObserver(([d])=>{d.isIntersecting&&(a(!0),o.disconnect())},{threshold:.15,rootMargin:"0px 0px -8% 0px"});return o.observe(i),()=>o.disconnect()},[]),n.jsx("div",{ref:r,style:{transitionDelay:`${t}ms`},className:`transition-[opacity,transform] duration-700 ease-out ${l?"translate-y-0 opacity-100":"translate-y-[40px] opacity-0"} ${s}`,children:e})}function Lo({size:e=40}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[n.jsx("path",{className:"fill-primary-50",d:"M15 7.60303C15 6.80738 14.6837 6.04454 14.1211 5.48193C13.5585 4.91932 12.7956 4.60303 12 4.60303C11.2044 4.60303 10.4415 4.91932 9.87891 5.48193C9.3163 6.04454 9 6.80738 9 7.60303V9.39696H15V7.60303ZM17 9.39696C17.7957 9.39696 18.5585 9.71326 19.1211 10.2759C19.6837 10.8385 20 11.6013 20 12.397V18.397C20 19.1926 19.6837 19.9554 19.1211 20.5181C18.5585 21.0807 17.7957 21.397 17 21.397H7C6.20435 21.397 5.44152 21.0807 4.87891 20.5181C4.3163 19.9554 4 19.1926 4 18.397V12.397C4 11.6013 4.3163 10.8385 4.87891 10.2759C5.44151 9.71326 6.20435 9.39696 7 9.39696V7.60303C7 6.27695 7.52716 5.00555 8.46484 4.06787C9.40253 3.13019 10.6739 2.60303 12 2.60303C13.3261 2.60303 14.5975 3.13019 15.5352 4.06787C16.4728 5.00555 17 6.27695 17 7.60303V9.39696Z"}),n.jsx("path",{className:"fill-white",d:"M12 12.373C13.042 12.373 13.8866 13.2177 13.8867 14.2598C13.8867 15.0639 13.3833 15.7488 12.6748 16.0205C12.6921 16.0816 12.7051 16.1453 12.7051 16.2119V17.7811C12.7051 18.1705 12.3894 18.4862 12 18.4862C11.6106 18.4862 11.2949 18.1705 11.2949 17.7811V16.2119C11.2949 16.1454 11.307 16.0815 11.3242 16.0205C10.6163 15.7485 10.1133 15.0634 10.1133 14.2598C10.1134 13.2178 10.958 12.3731 12 12.373Z"})]})}function p8(e){return e?e.split(` `).map(t=>t.replace(/^\s*(?:[•\-*]|\d+[.)])\s*/,"").trim()).filter(Boolean):[]}function g2(e){if(!e)return[];let t=p8(e);return t.length<=1&&(t=e.split(/\s*·\s*/).map(s=>s.replace(/^\s*(?:[•\-*]|\d+[.)])\s*/,"").trim()).filter(Boolean)),t}function f8(e){if(!e)return[];const t=e.split(` `).map(o=>o.trim()).filter(Boolean),s=/^Q\s*\d+\s*[.)]?\s*/i,r=[];let l=null,a="question";const i=()=>(l===null&&(l={question:"",intent:"",direction:"",answer:""}),l);for(const o of t)s.test(o)?(l&&r.push(l),l={question:o.replace(s,"").trim(),intent:"",direction:"",answer:""},a="question"):/^의도\s*[::]/.test(o)?(i().intent=o.replace(/^의도\s*[::]\s*/,"").trim(),a="intent"):/^답변\s*방향\s*[::]/.test(o)?(i().direction=o.replace(/^답변\s*방향\s*[::]\s*/,"").trim(),a="direction"):/^방어\s*답변\s*[::]/.test(o)?(i().answer=o.replace(/^방어\s*답변\s*[::]\s*/,"").trim(),a="answer"):l&&(l[a]=(l[a]?`${l[a]} `:"")+o);return l&&r.push(l),r.length===0?t.map(o=>({question:o.replace(s,"").trim(),intent:"",direction:"",answer:""})):r}function Hu({index:e,question:t,direction:s,answer:r,open:l,onToggle:a}){const i=!!(r&&r.trim()),o=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex w-full items-center justify-between gap-[12px]",children:[n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex w-full items-center gap-[12px]",children:[n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center rounded-[8px] bg-primary-60 text-body-3-semibold text-white",children:e}),n.jsx("p",{className:"flex-1 text-body-2-semibold text-neutral-90",children:t})]}),s&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:s})]}),i&&n.jsx(S,{name:l?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),i&&l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsx("p",{className:"whitespace-pre-line text-body-2-medium text-neutral-95",children:r})]})]});return i?n.jsx("button",{type:"button",onClick:a,"aria-expanded":l,className:"flex w-full flex-col gap-[16px] rounded-[20px] bg-neutral-5 p-[24px] text-left",children:o}):n.jsx("div",{className:"flex w-full flex-col gap-[16px] rounded-[20px] bg-neutral-5 p-[24px]",children:o})}function Ln({icon:e,title:t,subtitle:s,divider:r=!1,children:l}){return n.jsxs("div",{className:"flex w-full flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:e,size:24}),n.jsx("p",{className:"shrink-0 text-body-2-semibold text-neutral-90",children:t}),s&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:s})]}),r&&n.jsx("div",{className:"h-px w-full bg-neutral-10"}),l]})}function C2({items:e}){return n.jsx("div",{className:"flex flex-col gap-[6px] py-[8px]",children:e.map((t,s)=>n.jsxs("div",{className:"flex items-start gap-[10px]",children:[n.jsx("span",{className:"mt-[9px] size-[6px] shrink-0 rounded-full bg-primary-50"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:t})]},s))})}function $u({data:e,fallbackQuestion:t,onAskAnother:s,variant:r="guest",onSignup:l,onSave:a}){var g,x,m,j,b,N;const i=r==="member",o=((g=e.question)==null?void 0:g.trim())||t,c=(x=e.purpose)==null?void 0:x.trim(),d=g2(e.answer_points),f=f8(e.follow_up_questions),p=g2(e.improvement_tips),h=(m=e.record_basis)==null?void 0:m.trim(),[y,v]=u.useState(0),[C,w]=u.useState(!1);return n.jsxs("div",{className:"mx-auto w-full max-w-[1280px] px-[40px] pb-[120px] pt-[120px]",children:[n.jsxs("button",{type:"button",onClick:s,className:"mb-[48px] flex items-center gap-[12px] text-heading-4-semibold text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32,className:"text-neutral-80"}),"다른 질문하기"]}),n.jsxs("div",{className:"flex flex-col gap-[28px]",children:[n.jsxs("div",{className:"flex w-full flex-col gap-[28px] rounded-[32px] border border-neutral-20 bg-white px-[40px] pb-[36px] pt-[40px] shadow-[0px_2px_6px_0px_rgba(0,0,0,0.08)]",children:[n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-start gap-[12px]",children:[n.jsx("span",{className:"flex size-[28px] shrink-0 items-center justify-center rounded-[8px] bg-primary-60 text-body-2-semibold text-white",children:"Q"}),n.jsx("p",{className:"flex-1 pt-[1px] text-heading-4-semibold text-neutral-95",children:o}),i&&a&&n.jsxs("button",{type:"button",onClick:()=>{const E=!C;w(E),E&&a()},className:`flex shrink-0 items-center gap-[4px] rounded-[20px] py-[6px] pl-[10px] pr-[12px] transition-colors ${C?"bg-primary-10 text-body-2-semibold text-primary-60":"border border-neutral-10 bg-white text-body-2-medium text-neutral-50"}`,children:[n.jsx(S,{name:"star-filled",size:20,className:C?"text-primary-60":"text-neutral-30"}),"저장"]})]}),!i&&n.jsxs("div",{className:"flex w-fit items-center gap-[4px] rounded-full bg-neutral-5 px-[10px] py-[5px]",children:[n.jsx(S,{name:"circle-alert",size:16,className:"text-neutral-50"}),n.jsx("span",{className:"text-body-3-medium text-neutral-60",children:"생기부 없이 만든 일반 답변이에요"})]})]}),n.jsx("div",{className:"h-px w-full bg-neutral-10"}),n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[((j=e.question_intent)==null?void 0:j.trim())&&n.jsx(Ln,{icon:"target",title:"질문 의도",divider:!0,children:n.jsx("p",{className:"whitespace-pre-line text-body-2-medium text-neutral-90",children:e.question_intent.trim()})}),((b=e.evaluation_criteria)==null?void 0:b.trim())&&n.jsx(Ln,{icon:"puzzle",title:"면접관 평가 포인트",divider:!0,children:n.jsx("p",{className:"whitespace-pre-line text-body-2-medium text-neutral-90",children:e.evaluation_criteria.trim()})}),i&&h&&n.jsx(Ln,{icon:"file-search",title:"생기부 활용 근거",divider:!0,children:n.jsx("p",{className:"whitespace-pre-line text-body-2-medium text-neutral-90",children:h})}),(c||d.length>0)&&n.jsxs(Ln,{icon:"layer",title:"답변 전략",children:[c&&n.jsx("div",{className:"border-l-[6px] border-primary-30 bg-primary-5 px-[24px] py-[16px]",children:n.jsx("p",{className:"whitespace-pre-line text-body-2-medium text-neutral-90",children:c})}),d.length>0&&n.jsx(C2,{items:d})]}),((N=e.model_answer)==null?void 0:N.trim())&&n.jsx(Ln,{icon:"thumb-up",title:"예시 답변",children:n.jsx("div",{className:"border-l-[6px] border-primary-30 bg-primary-5 px-[24px] py-[16px]",children:n.jsx("p",{className:"whitespace-pre-line text-body-2-semibold text-neutral-90",children:e.model_answer.trim()})})}),f.length>0&&n.jsx(Ln,{icon:"chat-feedback",title:"예상 꼬리질문",subtitle:"실제 면접에선 답변 뒤에 이런 질문이 이어질 수 있어요. 먼저 스스로 답해보고, 눌러서 예시 답변을 확인하세요.",children:n.jsx("div",{className:"flex flex-col gap-[12px]",children:f.map((E,L)=>{const I=E.intent||E.direction;return n.jsx(Hu,{index:L+1,question:E.question,direction:I?`방향 · ${I}`:void 0,answer:E.answer,open:y===L,onToggle:()=>v(y===L?null:L)},L)})})}),p.length>0&&n.jsx(Ln,{icon:"idea",title:"답변 팁",divider:!0,children:n.jsx(C2,{items:p})})]})]}),!i&&n.jsxs("div",{className:"flex flex-col items-center gap-[28px] rounded-[28px] bg-primary-5 px-[40px] pb-[40px] pt-[56px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[16px]",children:[n.jsx(Lo,{size:40}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-heading-4-bold text-neutral-100",children:"내 생기부 속 내용으로 답변해보세요"}),n.jsx("p",{className:"text-body-2-regular text-neutral-70",children:"생기부를 올리면 위의 예시 답변이 내 실제 활동을 근거로 한 맞춤 답변으로 바뀌어요"})]})]}),n.jsx($,{variant:"primary",size:"large",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:l,children:"회원가입하고 내 생기부 맞춤 답변 보기"})]})]})]})}function Vu({value:e,onChange:t,onSubmit:s,canAsk:r,disabled:l=!1,placeholder:a="궁금한 면접 질문을 입력해주세요"}){return n.jsxs("div",{className:"flex h-[232px] w-full flex-col justify-between rounded-[24px] border border-neutral-20 bg-white p-[28px] shadow-[0px_2px_6px_0px_rgba(0,0,0,0.08)] transition-colors focus-within:border-primary-60",children:[n.jsx("textarea",{value:e,onChange:i=>t(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),r&&s())},disabled:l,placeholder:a,className:"w-full flex-1 resize-none bg-transparent text-body-1-regular text-neutral-90 outline-none placeholder:text-neutral-50"}),n.jsx("button",{type:"button","aria-label":"전송",onClick:s,disabled:!r||l,className:"flex size-[40px] items-center justify-center self-end rounded-full bg-primary-60 transition-colors hover:bg-primary-70 disabled:bg-neutral-20",children:n.jsx(S,{name:"arrow-up",size:28,className:r&&!l?"text-white":"text-neutral-40"})})]})}function Bu(){return n.jsx("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-white/60 backdrop-blur-[3px]",children:n.jsxs("div",{className:"flex flex-col items-center gap-[24px] text-center",children:[n.jsx("div",{className:"size-[56px] animate-spin rounded-full border-[4px] border-neutral-10 border-t-primary-60"}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] whitespace-nowrap",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:"질문에 대한 답변을 작성하고 있어요"}),n.jsx("p",{className:"text-body-2-regular text-neutral-80",children:"약 20초 정도 걸려요"})]})]})})}function Zu({message:e,onRetry:t,onBack:s}){return n.jsxs("div",{className:"mx-auto flex min-h-[60vh] w-full max-w-[1280px] flex-col items-center justify-center gap-[56px] px-[40px] py-[120px] text-center",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[36px]",children:[n.jsx("div",{className:"flex size-[100px] items-center justify-center rounded-full bg-danger-5",children:n.jsx(S,{name:"circle-alert-filled",size:56,className:"text-danger-50"})}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px]",children:[n.jsx("h2",{className:"text-heading-1-bold text-neutral-100",children:"답변을 만들지 못했어요"}),n.jsxs("p",{className:"text-body-1-medium text-neutral-60",children:[e||"서버에 일시적인 오류가 발생했어요.",n.jsx("br",{}),"잠시 후 다시 시도해주세요."]})]})]}),n.jsxs("div",{className:"flex w-[453px] max-w-full flex-col items-center gap-[16px]",children:[n.jsx($,{variant:"primary",size:"large",className:"w-full",leadingIcon:n.jsx(S,{name:"reset",size:24}),onClick:t,children:"다시 시도하기"}),n.jsx("button",{type:"button",onClick:s,className:"text-body-2-medium text-neutral-60 hover:underline",children:"이전으로 돌아가기"})]})]})}function m8(){const e=ge.getAccessToken();return{"Content-Type":"application/json",...e?{Authorization:`Bearer ${e}`}:{}}}async function Uu(e){const t=await fetch(`${ze("/ai/qna")}/ai/qna/answer`,{method:"POST",headers:m8(),body:JSON.stringify(e)});if(!t.ok){const s=await t.json().catch(()=>({}));throw new Ke(s.code??"QNA_ERROR",s.detail??s.message??"답변 생성에 실패했어요.",t.status)}return await t.json()}const h8=["전체","계정·로그인","생기부","면접 연습","결제·환불","개인정보·보안"],qu=[{id:1,category:"개인정보·보안",question:"업로드 한 생기부 데이터는 어떻게 처리하나요?",answer:`학교생활기록부 파일은 업로드 즉시 원본 파일이 파기되며 학생의 이름, 사진, 주소 등 개인 식별 정보는 삭제된 상태로 분석에 필요한 데이터만 저장됩니다. 이는 외부에 절대 공개되지 않으며 개인을 식별할 수 없는 분석 결과를 바탕으로 AI 진단 예측 정확도 개선에 사용됩니다.`},{id:2,category:"생기부",question:"생기부는 어떤 형식으로 업로드하나요?",answer:"나이스(NEIS)에서 내려받은 PDF 파일 또는 학교에서 발급한 HTML 형식의 생활기록부를 업로드할 수 있어요. 파일을 끌어다 놓거나 직접 선택해 올리면 됩니다."},{id:3,category:"결제·환불",question:"결제 후 환불은 어떻게 하나요?",answer:"결제일로부터 7일 이내, 이용 내역이 없는 경우 전액 환불됩니다. 마이페이지 > 결제 내역에서 환불을 신청하거나 고객센터로 문의해 주세요."},{id:4,category:"면접 연습",question:"면접 연습은 몇 번까지 할 수 있나요?",answer:"보유한 이용권 종류에 따라 연습 횟수가 달라요. 남은 횟수는 마이페이지에서 확인할 수 있습니다."},{id:5,category:"계정·로그인",question:"아이디나 비밀번호를 잊어버렸어요.",answer:"로그인 화면의 '비밀번호 찾기'에서 가입한 이메일로 재설정 링크를 받을 수 있어요. 소셜 로그인으로 가입한 경우 해당 소셜 계정으로 로그인해 주세요."},{id:6,category:"면접 연습",question:"예상 질문은 어떤 기준으로 만들어지나요?",answer:"업로드한 생활기록부의 교과·세특·창체·행특 항목과 지원 학과·전형을 분석해, 실제 면접에서 나올 법한 맞춤 질문을 생성합니다."}];function g8(e=new Date){const t=e.getDay(),s=e.getHours();return t>=1&&t<=5&&s>=9&&s<18}const C8="02-2016-5626",Wu=2,Qu="cari:qna:guestTrialsUsed";function y8(){try{const e=Number(localStorage.getItem(Qu));return Number.isFinite(e)&&e>0?Math.min(e,Wu):0}catch{return 0}}function v8(e){try{localStorage.setItem(Qu,String(e))}catch{}}const y2=["본인의 가장 큰 강점과 약점은?","동아리 활동에서 가장 큰 갈등은 무엇이었고, 어떻게 해결했는지?","왜 이 학과에 지원했는지?","고등학교 생활에서 가장 의미 있었던 경험은?","봉사활동 중 가장 기억에 남는 경험과, 그것이 본인에게 어떤 영향을 줬는지?"],j8=[{icon:"thumb-up",title:"모범답안 만들기",desc:["질문 의도를 먼저 짚고, 내 생기부 활동을 근거로","답변 전략까지 짠 모범답안을 받을 수 있어요"]},{icon:"link",title:"꼬리질문 대응",desc:["면접관이 파고들 꼬리질문을 미리 보고,","어떻게 답변할지 대비할 수 있어요"]},{icon:"chart",title:"면접 연습 결과",desc:["실전처럼 연습한 답변을 잘한 점·보완점으로","평가받고, 합격 예상까지 확인할 수 있어요"]},{icon:"target",title:"생기부 맞춤",desc:["생기부를 연동하면 내 활동에서 실제 나올 법한","질문만 골라 맞춤으로 받을 수 있어요"]},{icon:"idea",title:"보완점 집중 연습",desc:["자주 막히고 약했던 문항만 모아, 보완이 필요한","부분을 집중적으로 다시 연습할 수 있어요"]},{icon:"microphone",title:"실전 음성 연습",desc:["음성으로 답변하고 다시 들으며,","말투·속도 등을 실전 기준으로 점검할 수 있어요"]}],w8='"코딩 동아리에서 교내 분실물 찾기 앱을 만들었습니다. 초기 사용자가 적어 원인을 분석하던 중 복잡한 화면이 문제임을 발견했고, 직접 설문과 사용자 인터뷰를 거쳐 화면을 개선해 사용률을 두 배로 끌어올렸습니다."',N8=[{question:"그 문제를 해결하는 과정에서 본인의 역할은 무엇이었나요?",direction:"방향 · 팀 기여의 구체성과 책임 범위를 확인합니다.",answer:"저는 알고리즘의 전제 조건을 점검하는 역할을 맡아, 예외 데이터를 분류하는 테스트 케이스를 직접 설계했습니다. 팀원들이 로직을 수정할 때 어떤 입력에서 오류가 나는지 함께 확인할 수 있도록 기준을 만든 것이 제 기여였습니다."},{question:"결과를 수치로 말했는데, 그 수치는 어떻게 측정했나요?",direction:"방향 · 주장에 대한 근거와 검증 태도를 봅니다.",answer:"동일한 입력에 대해 기존 방식과 제가 설계한 방식을 각각 열 번씩 실행해 평균 처리 시간을 비교했습니다. 측정 환경을 똑같이 맞추고 이상치를 제외한 뒤 평균을 낸 값이라, 단순한 체감이 아니라 근거 있는 수치라고 말할 수 있습니다."},{question:"같은 프로젝트를 다시 한다면 무엇을 다르게 하겠어요?",direction:"방향 · 메타인지와 성장 가능성을 확인합니다.",answer:"처음부터 테스트 케이스를 더 촘촘하게 정의하고 시작하겠습니다. 후반에 예외 상황을 발견해 구조를 바꾸느라 시간을 많이 썼는데, 실패할 수 있는 경우를 먼저 적어두면 설계가 훨씬 단단해진다는 걸 배웠습니다."}],v2=[{title:"준비 시간이 확 줄었어요",body:"질문만 넣으면 모범답안이 바로 나와서, 막막하던 면접 준비를 어디서부터 할지 잡혔어요."},{title:"혼자 준비하는데 길잡이가 됐어요",body:"학원을 안 다녀서 막막했는데, 모범답안 구조를 보고 제 경험을 어떻게 풀어야 할지 감을 잡았어요."},{title:"꼬리질문이 실제와 비슷했어요",body:"미리 본 꼬리질문과 비슷한 질문이 실제 면접에서 나와 당황하지 않고 차분하게 답할 수 있었어요."},{title:"전날 마무리 점검으로 좋아요",body:"면접 전날 예상 질문을 쭉 돌려보고 가니 마음이 한결 놓였어요."},{title:"약한 문항만 다시 볼 수 있어요",body:"자주 막히던 문항만 모아 연습할 수 있어서, 시간이 부족할 때 특히 효율적이었어요."},{title:"말투와 속도를 점검했어요",body:"음성으로 연습하고 들어보니 제 말이 빠르다는 걸 알게 됐고, 고친 뒤 훨씬 안정적으로 말했어요."}],b8=["업로드 한 생기부 데이터는 어떻게 처리하나요?","생기부는 어떤 형식으로 업로드하나요?","면접 연습은 몇 번까지 할 수 있나요?","예상 질문은 어떤 기준으로 만들어지나요?"],k8=b8.map(e=>qu.find(t=>t.question===e)).filter(e=>!!e);function S8({icon:e,title:t,desc:s}){return n.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-[20px] rounded-[28px] bg-neutral-5 px-[28px] py-[52px]",children:[n.jsx(V,{name:e,size:48}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:t}),n.jsxs("p",{className:"text-body-2-medium text-neutral-60",children:[s[0],n.jsx("br",{}),s[1]]})]})]})}function L8({title:e,body:t}){return n.jsxs("div",{className:"flex w-[380px] shrink-0 flex-col gap-[20px] rounded-[28px] bg-neutral-5 px-[36px] py-[44px]",children:[n.jsx("div",{className:"flex gap-[4px]",children:Array.from({length:5}).map((s,r)=>n.jsx(S,{name:"star-filled",size:24,className:"text-warning-40"},r))}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:e}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:t})]})]})}function E8({faq:e,open:t,onToggle:s}){return n.jsxs("div",{className:"w-full",children:[n.jsxs("button",{type:"button",onClick:s,"aria-expanded":t,className:"flex w-full items-center justify-between gap-[16px] border-b border-neutral-10 py-[24px] text-left",children:[n.jsxs("span",{className:"flex items-center gap-[16px] text-body-1-semibold",children:[n.jsx("span",{className:"shrink-0 text-primary-50",children:"Q"}),n.jsx("span",{className:"text-neutral-95",children:e.question})]}),n.jsx(S,{name:"chevron-down",size:32,className:`shrink-0 text-neutral-50 transition-transform ${t?"rotate-180":""}`})]}),t&&n.jsx("div",{className:"bg-neutral-5 px-[28px] py-[32px]",children:n.jsx("p",{className:"whitespace-pre-line text-body-2-regular text-neutral-95",children:e.answer})})]})}function j2({text:e,onClick:t,muted:s=!1}){return n.jsx("button",{type:"button",onClick:t,disabled:s,className:`whitespace-nowrap rounded-full bg-neutral-5 px-[20px] py-[10px] text-body-2-medium transition-colors ${s?"cursor-default text-neutral-40":"text-neutral-80 hover:bg-neutral-10"}`,children:e})}function T8({onSignup:e}){return n.jsx("div",{className:"flex h-[232px] w-full flex-col items-center justify-center rounded-[24px] bg-neutral-5 p-[28px] shadow-[0px_2px_3px_0px_rgba(0,0,0,0.08)]",children:n.jsxs("div",{className:"flex flex-col items-center gap-[12px]",children:[n.jsx(V,{name:"lock",size:40}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px]",children:[n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:"무료 체험 2개를 모두 사용했어요"}),n.jsx($,{variant:"secondary",size:"small",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:e,children:"회원가입하고 면접 질문 받기"})]})]})})}function M8(){const e=ne(),[t,s]=u.useState("input"),[r,l]=u.useState(""),[a,i]=u.useState(null),[o,c]=u.useState(""),[d,f]=u.useState(0),[p,h]=u.useState(null),[y,v]=u.useState(()=>y8()),C=Math.max(0,Wu-y),w=C===0,g=r.trim().length>=2,x=()=>{window.scrollTo({top:0}),e("/login")},m=async()=>{const N=r.trim();if(!(N.length<2||t==="loading"||w)){s("loading"),window.scrollTo({top:0});try{const E=await Uu({question:N});i(E);const L=y+1;v8(L),v(L),s("result"),window.scrollTo({top:0})}catch(E){c(ee(E).message),s("error"),window.scrollTo({top:0})}}},j=()=>{i(null),l(""),s("input"),window.scrollTo({top:0})},b=()=>{c(""),s("input"),window.scrollTo({top:0})};return t==="result"&&a?n.jsx($u,{data:a,fallbackQuestion:r,variant:"guest",onAskAnother:j,onSignup:x}):t==="error"?n.jsx(Zu,{message:o,onRetry:()=>void m(),onBack:b}):n.jsxs("div",{className:"flex flex-col",children:[n.jsxs("section",{className:"relative overflow-hidden",children:[n.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute left-1/2 top-[-140px] h-[280px] w-[1052px] max-w-full -translate-x-1/2 rounded-full bg-primary-10/50 blur-[110px]"}),n.jsxs("div",{className:"relative mx-auto flex max-w-[1280px] flex-col items-center gap-[28px] px-[40px] py-[120px]",children:[n.jsxs(je,{className:"flex w-[840px] max-w-full flex-col items-center gap-[20px]",children:[n.jsx("div",{className:"flex size-[78px] items-center justify-center overflow-hidden rounded-full bg-gradient-to-br from-primary-10 to-white shadow-[inset_0px_3px_10px_0px_rgba(64,104,250,0.04)]",children:n.jsx("img",{src:"/brand/cari-symbol.png",alt:"카리",className:"size-full translate-y-[3px] scale-[1.3] object-cover"})}),n.jsxs("div",{className:"flex w-full flex-col items-center gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsxs("h1",{className:"text-[32px] font-bold leading-[46px] text-black",children:["안녕하세요, ",n.jsx("span",{className:"text-primary-60",children:"카리"}),"예요"]}),n.jsx("p",{className:"text-body-1-regular text-neutral-80",children:"어떤 면접이든 함께 준비해요. 아래 면접 질문을 입력하면 모범답안을 만들어드릴게요"})]}),n.jsx("div",{className:"flex w-full flex-col items-center gap-[12px]",children:w?n.jsx(T8,{onSignup:x}):n.jsxs(n.Fragment,{children:[n.jsx(Vu,{value:r,onChange:l,onSubmit:()=>void m(),canAsk:g,disabled:t==="loading"}),n.jsxs("p",{className:"text-body-2-medium text-neutral-60",children:["가입 없이 무료로 ",n.jsxs("span",{className:"text-body-2-semibold text-primary-60",children:[C,"개"]})," 받아볼 수 있어요"]})]})})]})]}),n.jsxs(je,{delay:120,className:"flex w-full flex-col items-center gap-[12px]",children:[n.jsx("div",{className:"flex flex-wrap items-center justify-center gap-[12px]",children:y2.slice(0,3).map(N=>n.jsx(j2,{text:N,muted:w,onClick:()=>l(N)},N))}),n.jsx("div",{className:"flex flex-wrap items-center justify-center gap-[12px]",children:y2.slice(3).map(N=>n.jsx(j2,{text:N,muted:w,onClick:()=>l(N)},N))})]})]})]}),n.jsxs("section",{className:"mx-auto flex w-full max-w-[1280px] flex-col items-center gap-[40px] px-[40px] py-[120px]",children:[n.jsxs(je,{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("h2",{className:"text-heading-1-bold text-neutral-100",children:"생기부 하나로 시작하는 면접 준비"}),n.jsx("p",{className:"text-body-1-regular text-neutral-70",children:"모범답안부터 꼬리질문·답변 피드백까지 빠짐없이 대비해요"})]}),n.jsx(je,{delay:120,className:"grid w-full grid-cols-3 gap-[24px]",children:j8.map(N=>n.jsx(S8,{...N},N.title))})]}),n.jsx("section",{className:"w-full bg-primary-60",children:n.jsxs("div",{className:"mx-auto flex max-w-[1280px] flex-col items-center gap-[40px] px-[40px] py-[120px]",children:[n.jsxs(je,{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("h2",{className:"text-heading-1-bold text-white",children:"면접은 한번의 답으로 끝나지 않아요"}),n.jsx("p",{className:"text-body-1-regular text-neutral-5",children:"카리면접은 내 답변에 이어질 꼬리질문까지 미리 예측해, 실전처럼 대비시켜요"})]}),n.jsxs(je,{delay:120,className:"flex w-full flex-col items-center gap-[40px]",children:[n.jsx("div",{className:"w-[840px] max-w-full rounded-[20px] bg-primary-50 p-[28px]",children:n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx("p",{className:"text-body-2-medium text-neutral-10",children:"내 답변"}),n.jsx("p",{className:"text-body-1-medium text-white",children:w8})]})}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-5",children:"카리면접이 예측한 꼬리질문"}),n.jsx(S,{name:"arrow-down",size:32,className:"text-white"})]}),n.jsx("div",{className:"flex w-[840px] max-w-full flex-col gap-[12px]",children:N8.map((N,E)=>n.jsx(Hu,{index:E+1,question:N.question,direction:N.direction,answer:N.answer,open:d===E,onToggle:()=>f(d===E?null:E)},N.question))})]})]})}),n.jsxs("section",{className:"flex w-full flex-col items-center gap-[40px] py-[120px]",children:[n.jsxs(je,{className:"flex flex-col items-center gap-[8px] px-[40px] text-center",children:[n.jsxs("h2",{className:"text-heading-1-bold text-neutral-100",children:["학생들이 ",n.jsx("span",{className:"text-primary-60",children:"카리 면접"}),"을 선택한 이유"]}),n.jsx("p",{className:"text-body-1-regular text-neutral-70",children:"실제로 면접을 준비한 학생들의 이야기예요"})]}),n.jsx("div",{className:"w-full overflow-hidden",children:n.jsx("div",{className:"flex w-max animate-home-marquee gap-[20px]",children:[...v2,...v2].map((N,E)=>n.jsx(L8,{title:N.title,body:N.body},E))})})]}),n.jsxs("section",{className:"mx-auto flex w-full max-w-[1280px] flex-col items-center gap-[40px] px-[40px] py-[120px]",children:[n.jsx(je,{children:n.jsx("h2",{className:"text-heading-1-bold text-neutral-100",children:"자주 묻는 질문"})}),n.jsx(je,{delay:120,className:"flex w-full flex-col",children:k8.map(N=>n.jsx(E8,{faq:N,open:p===N.id,onToggle:()=>h(p===N.id?null:N.id)},N.id))})]}),n.jsx("div",{className:"mx-auto w-full max-w-[1280px] px-[40px] pb-[120px]",children:n.jsx(je,{children:n.jsxs("section",{className:"flex flex-col items-center gap-[40px] rounded-[36px] bg-primary-60 pb-[64px] pt-[72px]",children:[n.jsxs("h2",{className:"text-center text-heading-2-bold text-white",children:["아직 면접 질문, 어디서 시작할지 막막하신가요?",n.jsx("br",{}),"생기부만 올리면 카리면접이 다 준비해드려요"]}),n.jsx($,{variant:"gray",size:"large",className:"!bg-white hover:!bg-neutral-5",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:x,children:"회원가입하고 시작하기"})]})})}),t==="loading"&&n.jsx(Bu,{})]})}function D1({children:e,icon:t,className:s=""}){return n.jsxs("div",{role:"status",className:`flex h-[48px] min-w-[360px] max-w-[420px] items-center gap-[8px] rounded-l-2xl bg-neutral-70 py-[12px] pl-[14px] pr-[16px] ${s}`,children:[t&&n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center text-white",children:t}),n.jsx("p",{className:"text-body-3-medium text-white",children:e})]})}function Ku({rounded:e=24}){return n.jsx("svg",{className:"pointer-events-none absolute inset-0 size-full","aria-hidden":"true",children:n.jsx("rect",{width:"100%",height:"100%",rx:e,ry:e,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"10 10"})})}function me({open:e,onClose:t,title:s,description:r,alert:l=!1,icon:a,align:i="center",children:o,confirmText:c,onConfirm:d,confirmVariant:f="primary",confirmDisabled:p=!1,cancelText:h,className:y=""}){if(u.useEffect(()=>{if(!e)return;const C=w=>w.key==="Escape"&&t();return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[e,t]),!e)return null;const v=i==="left";return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-[20px]",onClick:t,children:n.jsxs("div",{role:"dialog","aria-modal":"true",onClick:C=>C.stopPropagation(),className:`flex min-w-[360px] flex-col gap-[28px] rounded-3xl bg-white px-[24px] pb-[20px] pt-[36px] shadow-[0_2px_10px_rgba(0,0,0,0.15)] ${y}`,children:[n.jsxs("div",{className:`flex flex-col ${v?"items-start gap-[20px]":"items-center gap-[16px]"}`,children:[a||l&&n.jsx(S,{name:"circle-alert-filled",size:44,className:"text-neutral-40 fill-white"}),n.jsxs("div",{className:`flex w-full flex-col gap-[8px] ${v?"items-start text-left":"items-center text-center"}`,children:[s&&n.jsx("p",{className:"text-heading-4-semibold text-neutral-100",children:s}),r&&n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:r})]}),o]}),c&&n.jsxs("div",{className:"flex w-full items-center gap-[12px]",children:[h&&n.jsx($,{variant:"gray",size:"large",className:"flex-1",onClick:t,children:h}),n.jsx($,{variant:f,size:"large",disabled:p,className:h?"flex-1":"w-full",onClick:d,children:c})]})]})})}function wl({open:e,onClose:t}){return n.jsx(me,{open:e,onClose:t,alert:!0,title:"파일 형식이 맞지 않아요",description:n.jsxs(n.Fragment,{children:["PDF 또는 HTML 파일만 올릴 수 있어요.",n.jsx("br",{}),"다른 파일을 선택해주세요."]}),confirmText:"확인",onConfirm:t})}async function Is(e,t,s,r="처리 중 오류가 발생했습니다."){var C;let l=!1;const a=new AbortController,i=await fetch(e,t.signal?t:{...t,signal:a.signal});if(!i.ok){const w=await i.json().catch(()=>({})),g=w.code??"UNKNOWN_ERROR",x=w.message??r;throw new Ke(g,x,i.status)}const o=(C=i.body)==null?void 0:C.getReader();if(!o)throw new Ke("STREAM_ERROR","스트림을 읽을 수 없습니다.");const c=new TextDecoder;let d="",f=!1,p,h=!1;const y=()=>{p||f||(p=setTimeout(()=>{h=!0,a.abort()},8e3))},v=w=>{const g=w.trim();if(!g.startsWith("data:"))return!1;const x=g.slice(5).trim();if(!x)return!1;let m;try{m=JSON.parse(x)}catch(j){return console.error("[SSE Parse Error]",j,"Raw:",g),!1}if(l=!0,s(m),m.type==="error"||m.status==="error")throw new Ke("STREAM_FAILED",m.message??r);return m.type==="complete"||m.status==="completed"?!0:(typeof m.progress=="number"&&m.progress>=100&&y(),!1)};try{for(;;){const w=await o.read().catch(j=>{if(h)return null;throw j});if(w===null)break;const{done:g,value:x}=w;x&&(d+=c.decode(x,{stream:!0}));let m=d.indexOf(` `);for(m===-1&&(m=d.indexOf(` `));m!==-1;){const j=d.slice(0,m);if(d=d.slice(m+(d[m+1]===` `?2:1)),v(j)){f=!0;return}m=d.indexOf(` `),m===-1&&(m=d.indexOf(` `))}if(g){d.trim()&&v(d)&&(f=!0);break}}}finally{p&&clearTimeout(p),o.releaseLock()}if(!f&&!h&&!l)throw new Ke("INCOMPLETE","작업이 완료되지 않았습니다. 잠시 후 다시 시도해 주세요.")}const Nl=(e,t)=>e==null||e===""?t:e==="true"||e==="1",Yt=Nl(void 0,!1),Gu=Nl(void 0,Yt),Eo=Nl("false",!0),Yu=Nl("false",!1),cn={id:1,title:"이소희_고등학교_생활기록부",filename:"이소희_고등학교_생활기록부.pdf",createdAt:"2026-05-29T00:00:00Z"},To=[{id:91,title:"맞춤 면접 질문",targetSchool:"",targetMajor:"",interviewType:"",createdAt:"2026-06-01T00:00:00Z"},{id:92,title:"컴퓨터공학부 학생부교과전형",targetSchool:"",targetMajor:"컴퓨터공학부",interviewType:"학생부교과전형",createdAt:"2026-06-01T00:00:00Z"},{id:93,title:"학생부종합전형",targetSchool:"",targetMajor:"",interviewType:"학생부종합전형",createdAt:"2026-06-01T00:00:00Z"},{id:94,title:"서울대학교",targetSchool:"서울대학교",targetMajor:"",interviewType:"",createdAt:"2026-06-01T00:00:00Z"},{id:95,title:"서울대학교 컴퓨터공학부 학생부종합전형",targetSchool:"서울대학교",targetMajor:"컴퓨터공학부",interviewType:"학생부종합전형",createdAt:"2026-06-01T00:00:00Z"}];let _8=101;function z8(){const e=[{id:cn.id,title:cn.title}];return{records:e,totalPages:1,currentPage:1,totalCount:e.length}}function P8(){return{id:cn.id,title:cn.title,status:"READY",filename:cn.filename,createdAt:cn.createdAt,questionSets:To.map(e=>({id:e.id,title:e.title,targetSchool:e.targetSchool,targetMajor:e.targetMajor,interviewType:e.interviewType,createdAt:e.createdAt}))}}let Ds=!1;function ht(e){Ds=e}function R8(){return{presignedUrl:"mock://upload",s3Key:"mock/record.pdf",expiresIn:3600}}async function I8(e){for(let t=0;t<=100;t+=5){for(;Ds;)await new Promise(s=>setTimeout(s,100));e==null||e(t),await new Promise(s=>setTimeout(s,60))}}async function D8(e,t){for(let s=0;s<=100;s+=1){for(;Ds;)await new Promise(r=>setTimeout(r,100));t==null||t(s),await new Promise(r=>setTimeout(r,50))}To.push({id:_8++,title:e.title,targetSchool:e.target_school,targetMajor:e.target_major,interviewType:e.interview_type,createdAt:new Date().toISOString()})}const w2=["성적","세특","창체","행특","연계","기타"],N2=["기본","심화","압박"],A8={purpose:"동아리 활동에서 마주한 실제 문제를 어떻게 정의하고 풀어냈는지, 그 과정에서 지원 전공으로 이어지는 역량을 키웠는지 확인하려는 질문이에요.",answerPoints:"구체적 경험 · 본인의 역할 · 배운 점을 전공 역량과 연결",evaluationCriteria:"문제를 스스로 정의하는 능력, 팀 안에서의 구체적 기여, 결과보다 과정에서의 학습, 그리고 전공 적합성으로의 연결을 봅니다.",modelAnswer:"미적분 단원에서 함수의 극값 조건을 공부하던 중, 신호 처리에서도 비슷한 패턴이 쓰인다는 것을 발견했습니다. 교과서 밖의 개념을 직접 찾아보고 연결해보는 과정이 인상 깊었습니다.",basis:"수학 세특: 미적분 단원 심화 탐구 중 함수의 극값 조건이 신호 처리 분야와 연결됨을 발견하고, 관련 개념을 독자적으로 조사하여 발표함.",strategy:"가장 어려웠던 지점을 솔직히 드러내고, 그걸 해결한 구체적 행동과 배운 점을 전공 역량과 연결해 보여주세요.",strategyBullets:["문제 상황을 한 문장으로 명확히 정의하기","내가 한 구체적 행동(역할·시도)을 중심으로 말하기","수치나 결과로 변화를 보여주기","이 경험이 지원 전공과 어떻게 이어지는지 마무리"],followups:[{q:"그 문제를 해결하는 과정에서 본인의 역할은 무엇이었나요?",dir:"방향 · 팀 기여의 구체성과 책임 범위를 확인합니다.",a:"저는 알고리즘의 전제 조건을 점검하는 역할을 맡아, 예외 데이터를 분류하는 테스트 케이스를 직접 설계했습니다."},{q:"결과를 수치로 말했는데, 그 수치는 어떻게 측정했나요?",dir:"방향 · 주장에 대한 근거와 검증 태도를 봅니다.",a:"실험 전후 같은 데이터셋으로 정확도를 비교해, 오분류 비율이 얼마나 줄었는지 수치로 정리했습니다."}],tips:['"어려웠다"로 끝내지 말고 어떤 행동으로 풀었는지까지 말하기','팀 프로젝트라도 "내가 한 것"을 분명히 구분해 말하기',"마지막엔 배운 점을 지원 전공 관심과 연결하기"]};function Ju(e,t,s,r=!1){return{questionId:e,content:s,category:w2[t%w2.length],difficulty:N2[t%N2.length],isBookmarked:!1,isNew:r,...A8}}const F8="수학 시간에 진행한 탐구 활동에서 가장 흥미로웠던 발견은 무엇인가요?",kr={};function Xu(e){return kr[e]||(kr[e]=Array.from({length:6},(t,s)=>Ju(e*1e3+s+1,s,F8))),kr[e]}function O8(e){return Xu(e).map(t=>({...t,isBookmarked:p1.has(t.questionId)}))}const H8=["SW 동아리에서 맡은 역할 중 가장 어려웠던 의사결정은 무엇이었나요?","협업 중 의견이 충돌했을 때 어떻게 합의에 이르렀는지 설명해주세요.","이 전공을 선택하게 된 결정적인 계기는 무엇인가요?"];async function $8(e,t){for(let l=0;l<=100;l+=5){for(;Ds;)await new Promise(a=>setTimeout(a,100));await new Promise(a=>setTimeout(a,25))}const s=Xu(e);s.forEach(l=>{l.isNew=!1});const r=Math.max(e*1e3,...s.map(l=>l.questionId));H8.forEach((l,a)=>s.push(Ju(r+a+1,s.length,l,!0)))}const p1=new Set;function V8(e){return p1.has(e)?p1.delete(e):p1.add(e),{questionId:e,isBookmarked:p1.has(e)}}function B8(){const e=[];for(const[t,s]of Object.entries(kr)){const r=To.find(a=>a.id===Number(t)),l=r?[r.targetSchool,r.targetMajor].filter(Boolean).join(" · ")||r.title:cn.title;for(const a of s)p1.has(a.questionId)&&e.push({questionId:a.questionId,recordTitle:l,category:a.category,content:a.content,difficulty:a.difficulty,evaluationCriteria:a.evaluationCriteria,modelAnswer:a.modelAnswer,purpose:a.purpose,createdAt:(r==null?void 0:r.createdAt)||cn.createdAt,answerPoints:a.answerPoints,basis:a.basis,strategy:a.strategy,strategyBullets:a.strategyBullets,followups:a.followups,tips:a.tips})}return e}const vi={id:1,title:"맡은 역할을 행동으로 구체화하기",summary:"역할은 잘 설명했지만, 실제 한 행동이 잘 드러나지 않았어요",area:"major_fit",relatedCount:3,points:["경험을 나열하기보다 문제 원인까지 설명하기","무엇을 했는지보다 왜 그렇게 했는지 설명하기","활동 소개에서 끝내지 않고 배운 점까지 연결하기"],questions:["그 프로젝트에서 본인이 맡은 역할과 실제로 한 행동을 구체적으로 말해 주세요.","그 과정에서 본인이 직접 해결한 부분은 무엇인가요?","결과를 만들기까지 한 행동을 단계별로 설명해 주세요."]},ed=[{id:201,targetSchool:"서울대학교",targetMajor:"컴퓨터공학부",interviewType:"",mode:"voice",difficulty:"real",total:8,feedback:[{tone:"good",text:"결론부터 말하는 두괄식이 강점이에요"},{tone:"warn",text:"근거를 묻는 꼬리질문에 답변을 보강해보세요"}],date:"2026.05.27",status:"done"},{id:202,targetSchool:"연세대학교",targetMajor:"컴퓨터공학부",interviewType:"학생부종합",mode:"text",difficulty:"real",total:8,feedback:[{tone:"good",text:"지원동기를 구체적으로 잘 풀어냈어요"},{tone:"warn",text:"답변 길이를 전반적으로 조금 더 늘려보세요"}],date:"2026.05.27",status:"done"},{id:203,targetSchool:"",targetMajor:"",interviewType:"",mode:"text",difficulty:"real",total:8,feedback:[],date:"2026.05.20",status:"in_progress",progress:4},{id:204,targetSchool:"",targetMajor:"",interviewType:"학생부종합전형",mode:"text",difficulty:"real",total:8,feedback:[],date:"2026.05.20",status:"in_progress",progress:2},{id:210,targetSchool:"",targetMajor:"",interviewType:"",mode:"text",difficulty:"real",total:3,feedback:[],date:"2026.05.20",status:"in_progress",progress:1,isFocus:!0,focusTitle:"맡은 역할을 행동으로 구체화하기",focusItem:vi},{id:205,targetSchool:"",targetMajor:"",interviewType:"",mode:"text",difficulty:"real",total:3,feedback:[{tone:"good",text:"지난번보다 '맡은 역할'이 구체적으로 드러났어요"},{tone:"warn",text:"근거를 묻는 꼬리질문에 답변을 보강해보세요"}],date:"2026.05.20",status:"done",isFocus:!0,focusTitle:"맡은 역할을 행동으로 구체화하기",focusItem:vi},{id:206,targetSchool:"",targetMajor:"컴퓨터공학부",interviewType:"",mode:"text",difficulty:"real",total:8,feedback:[],date:"2026.05.20",status:"in_progress",progress:7},{id:207,targetSchool:"서울대학교",targetMajor:"컴퓨터공학부",interviewType:"",mode:"voice",difficulty:"real",total:8,feedback:[{tone:"good",text:"결론부터 말하는 두괄식이 강점이에요"},{tone:"warn",text:"근거를 묻는 꼬리질문에 답변을 보강해보세요"}],date:"2026.05.18",status:"done"},{id:208,targetSchool:"연세대학교",targetMajor:"컴퓨터공학부",interviewType:"학생부종합",mode:"text",difficulty:"real",total:8,feedback:[{tone:"good",text:"지원동기를 구체적으로 잘 풀어냈어요"},{tone:"warn",text:"답변 길이를 전반적으로 조금 더 늘려보세요"}],date:"2026.05.18",status:"done"}];let Z8=209;function U8(){return[...ed]}async function q8(e,t){for(let s=0;s<=100;s+=1){for(;Ds;)await new Promise(r=>setTimeout(r,100));t==null||t(s),await new Promise(r=>setTimeout(r,50))}ed.unshift({id:Z8++,targetSchool:e.target_school||"",targetMajor:e.target_major||"",interviewType:e.interview_type||"",mode:e.mode,difficulty:e.difficulty,total:8,feedback:[{tone:"good",text:"결론부터 말하는 두괄식이 강점이에요"},{tone:"warn",text:"근거를 묻는 꼬리질문에 답변을 보강해보세요"}],date:"2026.06.08",status:"done"})}const W8=[vi,{id:2,title:"꼬리질문에 근거 더하기",summary:"근거를 묻는 질문에서 답변이 짧게 끝났어요",area:"logic",relatedCount:6,points:['주장 뒤에 "왜냐하면"으로 근거를 잇기',"경험에서 나온 구체적 사실로 뒷받침하기","예상되는 반론을 미리 짚어 답하기"],questions:["그렇게 판단한 근거는 무엇인가요?","그 주장을 뒷받침할 구체적 사례가 있나요?","반대 의견에는 어떻게 답하시겠어요?"]},{id:3,title:"결론부터 말하기",summary:"답변 초반이 길어져 핵심이 늦게 전달됐어요",area:"communication",relatedCount:4,points:["첫 문장에서 핵심 결론 먼저 말하기","부연 설명은 결론 뒤에 짧게 붙이기","한 답변에 메시지 하나만 담기"],questions:["이 경험에서 가장 핵심은 무엇인가요?","한 문장으로 요약하면 어떻게 되나요?","지원 동기를 짧게 말해 주세요."]}];function Q8(){return[...W8]}function bl(e){if(Yt)return Promise.resolve(R8());const t=encodeURIComponent(e);return Pe(`/api/records/presigned-url?fileName=${t}`,{method:"GET"})}async function kl(e,t){if(Yt)return;const s=await fetch(e,{method:"PUT",body:t,headers:{"Content-Type":t.type||"application/pdf"}});if(!s.ok)throw new Error(`S3 업로드 실패: ${s.status}`)}function Ft(e=1){return Yt?Promise.resolve(z8()):Pe(`/api/records?page=${e}`,{method:"GET"})}function qn(e){return Yt?Promise.resolve(P8()):Pe(`/api/records/${e}`,{method:"GET"})}function K8(e){return Pe(`/api/records/${e}`,{method:"DELETE"})}function Sl(e,t){if(Yt)return I8(t);const s=ge.getAccessToken();return Is(`${ze("/ai/records")}/ai/records`,{method:"POST",headers:{"Content-Type":"application/json",...s&&{Authorization:`Bearer ${s}`}},body:JSON.stringify(e)},r=>{typeof r.progress=="number"&&(t==null||t(r.progress))},"생기부 처리 중 오류가 발생했습니다.")}const G8=".pdf,.html,.htm",Y8=["pdf","html","htm"];function J8(e){return e>=1024*1024?`${Math.round(e/(1024*1024))}MB`:e>=1024?`${Math.round(e/1024)}KB`:`${e}B`}function X8({open:e,onClose:t,onUploaded:s}){const[r,l]=u.useState(null),[a,i]=u.useState(!1),[o,c]=u.useState(!1),[d,f]=u.useState(""),[p,h]=u.useState(!1),y=u.useRef(null),v=()=>{l(null),f(""),h(!1),i(!1),c(!1)},C=()=>{o||(v(),t())},w=x=>{var j;if(!x)return;const m=((j=x.name.split(".").pop())==null?void 0:j.toLowerCase())||"";if(!Y8.includes(m)){h(!0);return}f(""),l(x)},g=async()=>{if(!(!r||o)){c(!0),f("");try{if(Gu){await new Promise(j=>setTimeout(j,600)),v(),s();return}const{presignedUrl:x,s3Key:m}=await bl(r.name);await kl(x,r),await Sl({title:r.name.replace(/\.[^.]+$/,""),filename:r.name,s3Key:m}),v(),s()}catch(x){f(ee(x).message||"생기부 등록에 실패했어요. 다시 시도해주세요."),c(!1)}}};return n.jsxs(n.Fragment,{children:[n.jsxs(me,{open:e,onClose:C,align:"left",className:"w-[560px]",title:"생기부 등록",description:"본인의 생기부 파일을 올려주세요",cancelText:"취소",confirmText:o?"등록 중…":"등록하기",confirmDisabled:!r||o,onConfirm:()=>void g(),children:[n.jsx("input",{ref:y,type:"file",accept:G8,className:"hidden",onChange:x=>{var m;return w((m=x.target.files)==null?void 0:m[0])}}),r?n.jsxs("div",{className:"flex w-full items-center justify-between rounded-[20px] bg-neutral-5 px-[20px] py-[22px]",children:[n.jsxs("div",{className:"flex min-w-0 items-center gap-[16px]",children:[n.jsx(V,{name:"file",size:48}),n.jsxs("div",{className:"flex min-w-0 flex-col gap-[2px]",children:[n.jsx("p",{className:"truncate text-body-2-semibold text-neutral-90",children:r.name}),n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:J8(r.size)})]})]}),n.jsx("button",{type:"button","aria-label":"파일 제거",onClick:()=>!o&&l(null),className:"shrink-0",children:n.jsx(S,{name:"circle-cancel-filled",size:28,className:"fill-white text-neutral-30 transition-colors hover:text-neutral-50"})})]}):n.jsxs("button",{type:"button",onClick:()=>{var x;return(x=y.current)==null?void 0:x.click()},onDragOver:x=>{x.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:x=>{var m;x.preventDefault(),i(!1),w((m=x.dataTransfer.files)==null?void 0:m[0])},className:`relative flex h-[200px] w-full flex-col items-center justify-center gap-[12px] rounded-[24px] p-[36px] transition-colors ${a?"bg-primary-5 text-primary-60":"bg-white text-neutral-20"}`,children:[n.jsx(Ku,{rounded:24}),n.jsx(V,{name:"file-upload",size:48}),n.jsx("p",{className:"whitespace-pre-line text-center text-body-3-medium text-neutral-70",children:`PDF 또는 HTML 파일을 여기로 끌어오거나 클릭해서 선택해주세요`})]}),d&&n.jsx("p",{className:"w-full text-body-3-medium text-danger-50",children:d})]}),n.jsx(wl,{open:p,onClose:()=>h(!1)})]})}const b2=["본인의 가장 큰 강점과 약점은?","동아리 활동에서 가장 큰 갈등은 무엇이었고, 어떻게 해결했는지?","왜 이 학과에 지원했는지?","고등학교 생활에서 가장 의미 있었던 경험은?","봉사활동 중 가장 기억에 남는 경험과, 그것이 본인에게 어떤 영향을 줬는지?"];function k2({children:e}){return n.jsx("div",{className:"fixed right-0 top-[88px] z-[60]",children:n.jsx(D1,{icon:n.jsx(S,{name:"circle-check-filled",size:24,className:"fill-white text-success-50"}),children:e})})}function ex(){return n.jsx("div",{className:"flex size-[78px] items-center justify-center overflow-hidden rounded-full bg-gradient-to-br from-primary-10 to-white shadow-[inset_0px_3px_10px_0px_rgba(64,104,250,0.04)]",children:n.jsx("img",{src:"/brand/cari-symbol.png",alt:"카리",className:"size-full translate-y-[3px] scale-[1.3] object-cover"})})}function S2({text:e,onClick:t}){return n.jsx("button",{type:"button",onClick:t,className:"whitespace-nowrap rounded-full bg-neutral-5 px-[20px] py-[10px] text-body-2-medium text-neutral-80 transition-colors hover:bg-neutral-10",children:e})}function tx({onRegister:e,onGuide:t}){return n.jsxs("div",{className:"flex w-full flex-col items-center gap-[40px]",children:[n.jsxs("div",{className:"relative flex h-[311px] w-full flex-col items-center justify-center gap-[16px] rounded-[24px] p-[36px] text-neutral-20 shadow-[0px_4px_10px_0px_rgba(0,0,0,0.08)]",children:[n.jsx(Ku,{rounded:24}),n.jsxs("div",{className:"flex flex-col items-center gap-[12px]",children:[n.jsx(V,{name:"file-upload",size:36}),n.jsx("p",{className:"text-body-2-semibold text-neutral-80",children:"생기부를 올리면 맞춤 면접 질문을 만들 수 있어요"})]}),n.jsx($,{variant:"primary",size:"small",onClick:e,children:"생기부 등록"})]}),n.jsxs("div",{className:"flex items-center gap-[16px]",children:[n.jsx("p",{className:"text-body-2-regular text-neutral-50",children:"생기부 파일이 없으신가요?"}),n.jsx("button",{type:"button",onClick:t,className:"text-body-2-semibold text-primary-60 hover:underline",children:"다운로드 방법 보기"})]})]})}function nx(){var E;const e=ne(),t=yt(L=>L.user),s=((E=t==null?void 0:t.name)==null?void 0:E.trim())||"회원",[r,l]=u.useState("loading"),[a,i]=u.useState(!1),[o,c]=u.useState(""),[d,f]=u.useState("input"),[p,h]=u.useState(""),[y,v]=u.useState(null),[C,w]=u.useState(""),g=p.trim().length>=2;u.useEffect(()=>{let L=!0;return Ft().then(I=>L&&l(I.records.length>0?"has":"none")).catch(()=>L&&l("none")),()=>{L=!1}},[]),u.useEffect(()=>{if(!o)return;const L=setTimeout(()=>c(""),3e3);return()=>clearTimeout(L)},[o]);const x=async()=>{const L=p.trim();if(!(L.length<2||d==="loading")){f("loading"),window.scrollTo({top:0});try{const I=await Uu({question:L});v(I),f("result"),window.scrollTo({top:0})}catch(I){w(ee(I).message),f("error"),window.scrollTo({top:0})}}},m=()=>{v(null),h(""),f("input"),window.scrollTo({top:0})},j=()=>{w(""),f("input"),window.scrollTo({top:0})};if(d==="result"&&y)return n.jsxs(n.Fragment,{children:[n.jsx($u,{data:y,fallbackQuestion:p,variant:"member",onAskAnother:m,onSave:()=>c("질문이 저장되었어요")}),o&&n.jsx(k2,{children:o})]});if(d==="error")return n.jsx(Zu,{message:C,onRetry:()=>void x(),onBack:j});const b=r==="has",N=b?`궁금한 질문을 입력하면, ${s}님 생기부에 맞춘 답변을 만들어드려요.`:"내 생기부를 올리면 맞춤 면접 연습을 시작할 수 있어요";return n.jsxs("div",{className:"flex flex-col",children:[n.jsxs("section",{className:"relative overflow-hidden",children:[n.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute left-1/2 top-[-140px] h-[280px] w-[1052px] max-w-full -translate-x-1/2 rounded-full bg-primary-10/50 blur-[110px]"}),n.jsxs("div",{className:"relative mx-auto flex max-w-[1280px] flex-col items-center gap-[28px] px-[40px] py-[120px]",children:[n.jsxs(je,{className:"flex w-[840px] max-w-full flex-col items-center gap-[20px]",children:[n.jsx(ex,{}),n.jsxs("div",{className:"flex w-full flex-col items-center gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsxs("h1",{className:"text-[30px] font-bold leading-[46px] text-black",children:[n.jsxs("span",{className:"text-primary-60",children:[s,"님"]}),", 오늘도 면접 준비 시작해볼까요?"]}),n.jsx("p",{className:"text-body-1-regular text-neutral-80",children:N})]}),n.jsxs("div",{className:"flex w-full flex-col items-center gap-[12px]",children:[r==="loading"&&n.jsx("div",{className:"flex h-[232px] w-full items-center justify-center",children:n.jsx("div",{className:"size-[40px] animate-spin rounded-full border-[4px] border-neutral-10 border-t-primary-60"})}),r==="none"&&n.jsx(tx,{onRegister:()=>i(!0),onGuide:()=>e("/guide/recordbook")}),r==="has"&&n.jsx(Vu,{value:p,onChange:h,onSubmit:()=>void x(),canAsk:g,disabled:d==="loading"})]})]})]}),b&&n.jsxs(je,{delay:120,className:"flex w-full flex-col items-center gap-[12px]",children:[n.jsx("div",{className:"flex flex-wrap items-center justify-center gap-[12px]",children:b2.slice(0,3).map(L=>n.jsx(S2,{text:L,onClick:()=>h(L)},L))}),n.jsx("div",{className:"flex flex-wrap items-center justify-center gap-[12px]",children:b2.slice(3).map(L=>n.jsx(S2,{text:L,onClick:()=>h(L)},L))})]})]})]}),n.jsx(X8,{open:a,onClose:()=>i(!1),onUploaded:()=>{i(!1),l("has"),c("생기부 등록이 완료되었어요")}}),d==="loading"&&n.jsx(Bu,{}),o&&n.jsx(k2,{children:o})]})}const sx="";function rx({mode:e,onEmailClick:t}){const s=r=>{window.location.href=`${sx}/api/auth/oauth/${r}/authorize`};return n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsxs("button",{onClick:()=>s("kakao"),className:"flex h-[48px] items-center justify-center gap-[8px] rounded-[14px] bg-[#FEE500] text-body-2-semibold text-neutral-100 hover:brightness-95",children:[n.jsx(V,{name:"kakao",size:24}),"카카오로 ",e==="login"?"로그인":"시작하기"]}),n.jsxs("button",{onClick:()=>s("naver"),className:"flex h-[48px] items-center justify-center gap-[8px] rounded-[14px] bg-[#03C75A] text-body-2-semibold text-white hover:brightness-95",children:[n.jsx(V,{name:"naver",size:24}),"네이버로 ",e==="login"?"로그인":"시작하기"]}),n.jsxs("button",{onClick:()=>s("google"),className:"flex h-[48px] items-center justify-center gap-[8px] rounded-[14px] border border-neutral-20 bg-neutral-5 text-body-2-semibold text-neutral-90 hover:bg-neutral-10",children:[n.jsx(V,{name:"google",size:24}),"구글로 ",e==="login"?"로그인":"시작하기"]}),e==="signup"&&n.jsxs("div",{className:"my-[24px] flex items-center gap-[12px]",children:[n.jsx("span",{className:"h-px flex-1 bg-neutral-10"}),n.jsx("span",{className:"text-body-3-medium text-neutral-50",children:"또는"}),n.jsx("span",{className:"h-px flex-1 bg-neutral-10"})]}),n.jsxs("button",{onClick:t,className:"flex h-[48px] items-center justify-center rounded-[14px] border border-neutral-20 bg-white text-body-2-semibold text-neutral-90 hover:bg-neutral-5",children:["이메일로 ",e==="login"?"로그인":"시작하기"]})]})}function lx({options:e,value:t,onChange:s,fullWidth:r=!1,className:l=""}){return n.jsx("div",{role:"tablist",className:`items-center gap-[4px] rounded-xl bg-neutral-10 p-[6px] ${r?"flex w-full":"inline-flex"} ${l}`,children:e.map(a=>{const i=a.value===t;return n.jsx("button",{type:"button",role:"tab","aria-selected":i,onClick:()=>s(a.value),className:`flex h-[40px] items-center justify-center whitespace-nowrap rounded-[10px] px-[16px] transition-colors ${r?"flex-1":"min-w-[100px]"} ${i?"bg-white text-body-2-semibold text-neutral-100 shadow-frame":"text-body-2-medium text-neutral-40 hover:text-neutral-60"}`,children:a.label},a.value)})})}function Se({label:e,required:t=!1,optional:s=!1,error:r=!1,helperText:l,helperTone:a,trailingIcon:i,trailing:o,disabled:c=!1,className:d="",id:f,...p}){const h=c?"border-neutral-10 bg-neutral-10":r?"border-danger-50":"border-neutral-10 focus-within:border-primary-60";return n.jsxs("div",{className:`flex w-full flex-col gap-[8px] ${d}`,children:[e&&n.jsxs("div",{className:"flex items-center gap-[6px]",children:[n.jsx("label",{htmlFor:f,className:"text-body-2-semibold text-neutral-90",children:e}),t&&n.jsx("span",{className:"text-body-2-semibold text-danger-50","aria-hidden":"true",children:"*"}),s&&n.jsx("span",{className:"text-body-3-medium text-neutral-60",children:"(선택)"})]}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsxs("div",{className:`flex items-center gap-[8px] rounded-2xl border px-[18px] py-[14px] transition-colors ${h}`,children:[n.jsx("input",{id:f,disabled:c,required:t,className:"min-w-0 flex-1 bg-transparent text-body-2-medium text-neutral-100 outline-none placeholder:text-neutral-40 disabled:text-neutral-60",...p}),i&&n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center",children:i}),o&&n.jsx("span",{className:"flex shrink-0 items-center",children:o})]}),l&&n.jsx("p",{className:`text-body-3-regular ${r?"text-danger-50":a==="success"?"text-success-50":"text-neutral-60"}`,children:l})]})]})}function nn({size:e=20,className:t="",...s}){const r=e===24?"size-[24px]":"size-[20px]";return n.jsxs("label",{className:`inline-flex cursor-pointer ${t}`,children:[n.jsx("input",{type:"checkbox",className:"peer sr-only",...s}),n.jsx("span",{className:`flex ${r} items-center justify-center rounded-[4px] border border-neutral-20 bg-white transition-colors peer-checked:border-primary-60 peer-checked:bg-primary-60 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,children:n.jsx(S,{name:"check",size:e===24?18:15,className:"text-white"})})]})}const ax=["(주)고트헤이븐은 개인정보 보호법 제30조에 따라 정보주체(고객)의 개인정보를 보호하고 이와 관련한 고충을 신속하고 원활하게 처리할 수 있도록 하기 위하여 다음과 같이 개인정보 처리방침을 두고 있습니다.","(주)고트헤이븐의 개인정보처리방침은 관련 법률이나 방침 변경 또는 내부방침 변경 등으로 인하여 수시로 변경될 수 있으며, 개인정보처리방침을 개정하는 경우 홈페이지에 게시하여 개정된 사항을 쉽게 알아볼 수 있도록 공지할 예정입니다.","","1. 개인정보의 처리목적(주)고트헤이븐은 서비스 이용시 필요한 최소한의 개인정보를 수집하며, 이에 대한 동의를 얻고 있습니다. 수집하는 개인정보의 항목은 아래와 같으며, 고지한 목적 범위 내에서만 사용됩니다. 다음의 목적을 위하여 개인정보를 처리하고 있으며, 다음의 목적 이외의 용도로는 이용하지 않습니다.서비스 제공에 관한 계약 이행 및 서비스 제공에 따른 서비스, 구매 및 요금 결제, 회원관리회원 관리를 위한 회원제 서비스 이용에 따른 본인확인, 개인 식별, 불량회원의 부정 이용 방지와 비인가 사용 방지, 이용계약 체결의사 확인, 연령확인, 불만처리 등 민원처리, 고지사항전달마케팅 및 광고에 활용을 위한 신규 서비스(제품) 개발 및 특화, 이벤트 등 광고성 정보 전달, 접속 빈도 파악 또는 회원의 서비스 이용에 대한 통계가입횟수 제한, 분쟁조정을 위한 기록보존, 회원의 신원 확인, 고충사항 확인, 사실조사를 위한 연락·통지, 처리결과 통보 등 고충처리","","2. 처리하는 개인정보 항목가. (주)고트헤이븐은 서비스 이용 과정에서 아래와 같은 개인정보를 수집하고 이용합니다.필수항목 : 성명, 이메일 주소, 휴대폰번호, 통신사, 생년월일선택항목 : 소속 기관, 프로필 사진, 직업, 마케팅 수신 동의 여부만 14세 미만 아동의 개인정보 수집 시: 법정대리인의 성명, 연락처(개인정보 보호법 제22조의2 제2항에 따라 법정대리인의 동의 없이 아동으로부터 직접 수집)이 외에 회원이 서비스 이용을 위해 회사에 추가 정보를 제공하는 경우 해당 정보가 추가로 수집될 수 있습니다.나. 서비스 이용과정이나 사업 처리과정에서 컨텐츠 이용여부 등을 확인하기 위하여 모바일 기기의 디바이스 아이디, 접속IP정보, Advertising ID (AAID, IDFA 등), 쿠키, 방문 일시, 위치정보 등의 정보들이 자동으로 생성되어 수집될 수 있습니다.","","3. 개인정보의 처리 및 보유기간가. (주)고트헤이븐은 정보주체로부터 개인정보를 수집할 때 동의받은 개인정보 보유·이용기간 또는 법령에 따른 개인정보 보유·이용기간 내에서 개인정보를 처리·보유합니다.나. 구체적인 개인정보 처리 및 보유 기간은 다음과 같습니다.부정 가입 및 부정 이용 방지 : 부정가입 및 게시물 유출, 아이디 공유 등의 서비스 부정 사용기록이 있는 경우 개인정보 중 가입인증 정보(이메일 또는 페이스북 고유번호, 만 14세 미만 회원의 경우 법정대리인 이메일 및 휴대전화번호)를 탈퇴일로부터 1년고객 가입 및 관리 : 서비스 이용계약 또는 회원가입 해지시까지, 다만 채권․채무관계 잔존시에는 해당 채권·채무관계 정산시까지전자상거래에서의 계약․청약철회, 대금결제, 재화 등의 공급에 관한 기록 : 5년소비자의 불만 또는 분쟁처리에 관한 기록 : 3년방문에 관한 기록(통신사실확인자료) : 3개월무료 체험 신청 : 5년","4. 개인정보의 제3자 제공가. (주)고트헤이븐은 정보 주체의 별도 동의, 개인정보 보호법 제17조에 해당하는 경우, 개인정보보호법 제28조의 2에 따라 통계 작성, 학술 연구나 시장 조사 등을 위하여 특정 개인을 식별할 수 없는 형태로 제공하는 경우 등 법률의 특별한 규정 이외에는 개인정보를 제3자에게 제공하지 않습니다.5. 개인정보처리의 위탁가. (주)고트헤이븐은 원활한 개인정보 업무처리를 위하여 다음과 같이 개인정보 처리업무를 위탁하고 있습니다.업체 및 기관위탁 업무 내용위탁 업체 및 기관의 개인정보 처리방침","(주)알리고 관련 문자, 메일 발송 https://m.aligo.in/smsterms/?terms=2","나. (주)고트헤이븐은 위탁업무계약서 등을 통하여 개인정보보호 관련 법규의 준수, 개인정보에 관한 비밀유지, 개인정보의 제3자 제공 금지, 사고시의 책임 부담, 위탁기간, 처리 종료 후의 개인정보의 반환 또는 파기의무 등을 규정하고, 이를 지키도록 관리하고 있습니다.7. 회원과 법정대리인의 권리·의무 및 행사방법가. 회원은 회사에 대해 언제든지 개인정보 열람·정정·삭제·처리정지 요구 등의 권리를 행사할 수 있습니다.나. 가항에 따른 권리 행사는 서면, 전자우편 등을 통하여 하실 수 있으며, 회사는 이에 대해 지체 없이 조치하겠습니다.다. 가항에 따른 권리 행사는 회원의 법정대리인이나 위임을 받은 자 등 대리인을 통하여서 하실 수 있습니다. 이 경우 수임인에 대한 위임사실을 확인할 수 있는 위임장을 제출하셔야 합니다.라. 개인정보 보호법 등 관계 법령에서 정하는 바에 따라 회원의 개인정보 열람·정정·삭제·처리정지 요구 등의 권리 행사가 제한될 수 있습니다.마. 개인정보의 정정 및 삭제 요구는 다른 법령에서 그 개인정보가 수입 대상으로 명시되어 있는 경우에는 그 삭제를 요구할 수 없습니다.바. 회사는 회원 권리에 따른 열람의 요구, 정정·삭제의 요구, 처리정지의 요구 시 열람 등 요구를 한 자가 본인이거나 정당한 대리인인이지를 확인합니다.","8. 개인정보의 파기(주)고트헤이븐은 개인정보 보유기간의 경과, 처리목적 달성 등 개인정보가 불필요하게 되었을 때에는 다음의 방법으로 지체없이 해당 개인정보를 파기합니다.파기절차: 회원이 입력한 정보는 목적 달성 후 별도의 DB에 옮겨져(종이의 경우 별도의 서류) 내부 방침 및 기타 관련 법령에 따라 일정기간 저장된 후 혹은 즉시 파기됩니다. 이 때, DB로 옮겨진 개인정보는 법률에 의한 경우가 아니고서는 다른 목적으로 이용되지 않습니다.파기기한: 회원의 개인정보는 개인정보의 보유기간이 경과된 경우에는 보유기간의 종료일로부터 5일 이내에, 개인정보의 처리 목적 달성, 해당 서비스의 폐지, 사업의 종료 등 그 개인정보가 불필요하게 되었을 때에는 개인정보의 처리가 불필요한 것으로 인정되는 날로부터 5일 이내에 그 개인정보를 파기합니다.파기방법: 전자적 파일 형태의 정보는 기록을 재생할 수 없는 기술적 방법을 사용합니다. 종이에 출력된 개인정보는 분쇄기로 분쇄하거나 소각을 통하여 파기합니다.","9. 개인정보의 안전성 확보조치(주)고트헤이븐은 개인정보의 안전성 확보를 위해 다음과 같은 조치를 취하고 있습니다.관리적 조치 : 내부관리계획 수립․시행, 직원․종업원 등에 대한 정기적 교육기술적 조치 : 개인정보가 저장된 컴퓨터의 비밀번호 설정 등 접근 권한 관리, 백신소프트웨어 등 보안프로그램 설치, 개인정보가 저장된 파일의 암호화","10. 개인정보 자동 수집 장치의 설치∙운영 및 거부에 관한 사항(주)고트헤이븐은 회원에게 개별적인 맞춤서비스를 제공하기 위해 이용정보를 저장하고 수시로 불러오는 ‘쿠키(cookie)’를 사용합니다.쿠키는 웹사이트를 운영하는데 이용되는 서버가 회원의 컴퓨터 브라우저에게 보내는 소량의 정보이며 회원들의 PC 컴퓨터내의 하드디스크에 저장되기도 합니다.가. 쿠키의 사용목적: 회원이 방문한 각 서비스와 웹 사이트들에 대한 방문 및 이용형태, 인기 검색어, 보안접속 여부 등을 파악하여 회원에게 최적화된 정보 제공을 위해 사용됩니다.나. 쿠키의 설치∙운영 및 거부 : 웹브라우저 상단의 도구 → 인터넷 옵션 → 개인정보 메뉴의 옵션 설정을 통해 쿠키 저장을 거부 할 수 있습니다.다. 쿠키 저장을 거부할 경우 맞춤형 서비스 이용에 어려움이 발생할 수 있습니다.","11. 수집목적과 합리적으로 관련된 범위 내의 개인정보 이용 및 제공(주)고트헤이븐은 당초 수집 목적과 합리적인 범위 내에서 아래 각 기준을 고려하여, 정보주체의 동의 없이 개인정보를 이용 또는 제3자에게 제공할 수 있습니다.당초 수집 목적과 관련성이 있는지 여부: 당초 수집 목적과 추가적 이용 제공 목적이 성질이나 경향에 있어 연관이 있는지를 고려하여 따라 판단개인정보를 수집한 정황 또는 처리 관행에 비추어 볼 때 개인정보의 추가적인 이용 또는 제공에 대한 예측 가능성이 있는지 여부: 개인정보처리자와 정보주체 간의 관계, 기술 수준 및 발전 속도, 상당한 기간동안 정립된 일반적인 사정(관행)을 고려하여 판단정보주체의 이익을 부당하게 침해하는지 여부: 추가적인 이용 목적과의 관계에서 정보주체의 이익이 실질적으로 침해되는지 및 해당 이익 침해가 부당한지를 고려하여 판단가명처리 또는 암호화 등 안전성 확보에 필요한 조치를 하였는지 여부: 침해 가능성을 고려한 안전 조치가 취해지는지를 고려하여 판단","12. 만 14세 미만 아동의 개인정보 처리에 관한 사항가. (주)고트헤이븐은 만 14세 미만 아동에 대해 개인정보를 수집할 때 법정대리인의 동의를 얻어 해당 서비스 수행에 필요한 최소한의 개인정보를 수집합니다.필수 항목 : 법정 대리인의 성명, 연락처, 통신사, 생년월일나. (주)고트헤이븐은 만 14세 미만 아동의 개인정보를 수집할 때에는 아동에게 법정대리인의 성명, 연락처와 같은 최소한의 정보를 요구할 수 있으며, 법정대리인이 동의하였는지를 확인합니다.","13. 개인정보 보호책임자(주)고트헤이븐은 개인정보 처리에 관한 업무를 총괄해서 책임지고, 개인정보 처리와 관련한 정보주체의 불만처리 및 피해구제를 처리하기 위하여 아래와 같이 개인정보 보호책임자 및 개인정보 보호담당자를 지정하고 있습니다.","개인정보 보호책임자성명 : 차형호","직책 : 대표이사","연락처 : alex@goatheaven.com개인정보 보호담당자성명 : 신가연","메일 : gayeon0317@goatheaven.com","정보주체께서는 (주)고트헤이븐의 서비스를 이용하면서 발생한 모든 개인정보 보호 관련 문의, 불만처리, 피해구제 등에 관한 사항을 개인정보 보호책임자 및 담당부서로 문의하실 수 있습니다. (주)고트헤이븐은 정보주체의 문의에 대해 지체 없이 답변 및 처리해드리겠습니다.","14. 개인정보 처리방침 변경현재 개인정보처리방침은 2024년 4월 5일부터 적용됩니다."],ix=['본 약관은 주식회사 고트헤이븐(이하 "회사")이 제공하는 카리면접 및 관련 제반 서비스(이하 "서비스")의 이용과 관련하여 회사와 회원 간의 권리·의무 및 책임사항을 규정함을 목적으로 합니다.',"","제1조 (목적) 이 약관은 회사가 제공하는 카리면접 서비스의 이용조건 및 절차, 회사와 회원의 권리·의무·책임사항, 기타 필요한 사항을 규정함을 목적으로 합니다.","",'제2조 (정의) "서비스"란 회사가 제공하는 생활기록부 기반 AI 모의면접, 예상 질문 생성, 답변 분석 등 일체의 서비스를 말합니다. "회원"이란 본 약관에 동의하고 회사와 이용계약을 체결하여 서비스를 이용하는 자를 말합니다. "생활기록부"란 회원이 서비스 이용을 위해 업로드하는 학교생활기록부 등 학생 관련 문서를 말합니다.',"","제3조 (약관의 효력 및 변경) 본 약관은 서비스 화면에 게시하거나 기타의 방법으로 회원에게 공지함으로써 효력이 발생합니다. 회사는 관련 법령을 위배하지 않는 범위에서 약관을 변경할 수 있으며, 변경 시 적용일자 및 변경사유를 명시하여 적용일자 7일 전(회원에게 불리하거나 중대한 변경은 30일 전)부터 공지합니다. 회원이 변경 약관의 효력 발생 후에도 서비스를 계속 이용하는 경우 변경에 동의한 것으로 봅니다.","","제4조 (이용계약의 성립) 이용계약은 회원이 되고자 하는 자가 약관에 동의하고 가입을 신청한 후, 회사가 이를 승낙함으로써 성립합니다. 회사는 타인의 명의를 도용하거나 허위 정보를 기재한 경우, 만 14세 미만이 법정대리인의 동의 없이 신청한 경우 등에는 승낙을 거부하거나 사후에 이용계약을 해지할 수 있습니다.","","제5조 (서비스의 제공 및 변경) 회사는 회원에게 생활기록부 기반 예상 질문 생성, AI 모의면접(텍스트·음성), 답변 분석 리포트 등의 서비스를 제공합니다. 서비스는 연중무휴 1일 24시간 제공을 원칙으로 하나, 시스템 점검·통신장애·천재지변 등 부득이한 사유가 있는 경우 일시 중단될 수 있습니다. AI가 생성한 질문·답변·평가는 학습 보조 자료이며 실제 면접 결과를 보장하지 않습니다.","","제6조 (회원의 의무) 회원은 본인의 계정 정보를 선량한 관리자의 주의로 관리하여야 하며 이를 제3자에게 양도·대여할 수 없습니다. 회원은 타인의 생활기록부 등 개인정보를 권한 없이 업로드해서는 안 되며, 서비스를 통해 얻은 정보를 회사의 사전 승낙 없이 복제·배포·상업적으로 이용할 수 없습니다.","","제7조 (결제 및 환불) 유료 서비스의 이용요금 및 결제 방법은 서비스 내 안내에 따릅니다. 회원은 결제일로부터 7일 이내이고 유료 서비스 이용 내역이 없는 경우 전액 환불을 요청할 수 있으며, 이미 이용한 서비스가 있는 경우 관련 법령 및 회사의 환불 정책에 따라 잔여분에 대해 환불이 이루어집니다. 환불은 마이페이지 또는 고객센터를 통해 신청할 수 있습니다.","","제8조 (이용계약의 해지) 회원은 언제든지 마이페이지의 회원탈퇴 기능을 통해 이용계약을 해지할 수 있습니다. 회원이 탈퇴하면 관련 법령 및 개인정보 처리방침에 따라 보관이 필요한 정보를 제외한 회원의 데이터는 파기됩니다. 회사는 회원이 본 약관을 위반한 경우 사전 통지 후 이용계약을 해지하거나 서비스 이용을 제한할 수 있습니다.","","제9조 (책임의 제한) 회사는 천재지변, 회원의 귀책사유, 통신서비스 사업자의 장애 등 불가항력으로 서비스를 제공할 수 없는 경우 책임이 면제됩니다. 회사는 AI가 생성한 질문·답변·평가의 정확성·적합성을 보장하지 않으며, 이를 신뢰하여 발생한 결과 및 회원이 업로드·게시한 자료의 신뢰성에 대하여 법령이 허용하는 범위에서 책임을 지지 않습니다.","","제10조 (분쟁의 해결) 본 약관은 대한민국 법령에 따라 해석되며, 서비스 이용과 관련한 분쟁은 상호 협의하여 해결함을 원칙으로 합니다. 협의가 이루어지지 않을 경우 관할 법원은 민사소송법에 따른 법원으로 합니다.","","부칙 본 약관은 2026년 6월 1일부터 시행합니다."];function td(e){return e==="privacy"?{title:"개인정보 처리방침",paragraphs:ax}:{title:"이용약관",paragraphs:ix}}function ox({open:e,doc:t,onClose:s}){if(u.useEffect(()=>{if(!e)return;const a=i=>i.key==="Escape"&&s();return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[e,s]),!e)return null;const{title:r,paragraphs:l}=td(t);return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-[20px]",onClick:s,children:n.jsxs("div",{role:"dialog","aria-modal":"true",onClick:a=>a.stopPropagation(),className:"flex h-[648px] w-[974px] max-w-full flex-col gap-[24px] rounded-[28px] bg-neutral-5 p-[36px] shadow-[0_2px_10px_rgba(0,0,0,0.15)]",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-100",children:r}),n.jsx("button",{type:"button",onClick:s,className:"text-neutral-90 hover:text-neutral-100","aria-label":"닫기",children:n.jsx(S,{name:"cancel",size:28})})]}),n.jsx("div",{className:"h-px w-full bg-neutral-10"}),n.jsx("div",{className:"flex flex-1 flex-col overflow-y-auto",children:l.map((a,i)=>n.jsx("p",{className:"text-body-3-medium leading-[20px] text-neutral-80",children:a||" "},i))})]})})}const cx=5*60,ux=e=>`${String(Math.floor(e/60)).padStart(2,"0")}:${String(e%60).padStart(2,"0")}`;function q1({ok:e,touched:t,children:s}){const r=e?"text-success-50":t?"text-danger-50":"text-neutral-50";return n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(S,{name:"check",size:24,className:r}),n.jsx("span",{className:`text-body-3-medium ${r}`,children:s})]})}function dx(){const[e]=Mu(),[t,s]=u.useState(e.get("tab")==="signup"?"signup":"login"),[r,l]=u.useState("social"),[a,i]=u.useState(""),[o,c]=u.useState(""),[d,f]=u.useState(""),[p,h]=u.useState(""),[y,v]=u.useState(!1),[C,w]=u.useState(!1),[g,x]=u.useState(""),[m,j]=u.useState(!1),[b,N]=u.useState(!1),[E,L]=u.useState(!1),[I,D]=u.useState(!1),[M,P]=u.useState(!1),[O,q]=u.useState(!1),[A,H]=u.useState(!1),[Z,T]=u.useState(""),[k,z]=u.useState(""),[K,Q]=u.useState(""),[oe,ae]=u.useState(""),[J,se]=u.useState(!1),[_,Y]=u.useState(0),[U,ue]=u.useState(""),[F,G]=u.useState(!1),[Ne,vt]=u.useState(!1),[He,X]=u.useState(null),{setAuth:be}=yt(),Re=ne();u.useEffect(()=>{if(!y||C||_<=0)return;const W=setInterval(()=>Y(jt=>jt<=1?0:jt-1),1e3);return()=>clearInterval(W)},[y,C,_]),u.useEffect(()=>{if(!U)return;const W=setTimeout(()=>ue(""),3e3);return()=>clearTimeout(W)},[U]),u.useEffect(()=>{e.get("preview")==="dup-email"&&(s("signup"),l("email"),i("sohee@chewing.com"),ae("이미 가입된 이메일이에요."))},[e]);const de=y&&!C&&_===0,lt=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a),Xe=o.length>=8,A1=/[A-Za-z]/.test(o),Fo=/[0-9]/.test(o),Oo=/[^A-Za-z0-9]/.test(o),Ot=Xe&&A1&&Fo&&Oo,Gn=o.length>0&&o===g,Ho=E&&I&&M,Ad=Ho&&O,$o=W=>{L(W),D(W),P(W),q(W)},Vo=lt&&o.length>=1,Bo=lt&&C&&d.trim().length>=1&&Ot&&Gn&&Ho,qe=()=>{T(""),z(""),Q(""),ae("")},Fd=()=>{v(!1),w(!1),Y(0),h(""),Q("")},Od=W=>{s(W),l("social"),h(""),v(!1),w(!1),Y(0),f(""),c(""),x(""),se(!1),$o(!1),qe()},Zo=async()=>{if(!(!Vo||F)){qe(),G(!0);try{const W=await m2({email:a,password:o});be(W,A),Re("/questions")}catch{T("이메일 또는 비밀번호를 다시 확인해주세요")}finally{G(!1)}}},Uo=async()=>{if(!lt||F)return;const W=y;qe(),G(!0);try{await s8({email:a}),h(""),w(!1),v(!0),Y(cx),ue(W?"인증번호가 다시 전송되었어요":"이메일로 인증번호가 전송되었어요")}catch(jt){ae(ee(jt).message||"이미 가입된 이메일이에요.")}finally{G(!1)}},Hd=async W=>{const jt=(W??p).trim();if(!(!jt||F||C)){qe(),G(!0);try{const Vs=await ko({email:a,code:jt});Vs.verified?w(!0):Q(Vs.message||"인증번호가 올바르지 않아요.")}catch(Vs){Q(ee(Vs).message)}finally{G(!1)}}},$d=async()=>{if(!(!Bo||F)){qe(),G(!0);try{await r8({email:a,password:o,name:d.trim(),marketingAgreement:O});const W=await m2({email:a,password:o});be(W,A),vt(!0)}catch(W){T(ee(W).message)}finally{G(!1)}}};return n.jsxs("div",{className:"flex min-h-[calc(100vh-68px)] items-start justify-center bg-white pt-[120px]",children:[U&&n.jsx("div",{className:"fixed right-0 top-[88px] z-50",children:n.jsx(D1,{icon:n.jsx(S,{name:"circle-check-filled",className:"text-success-50 fill-white"}),children:U})}),n.jsxs("div",{className:"w-[472px] pb-[120px]",children:[n.jsxs("div",{className:"mb-[56px] flex flex-col items-center gap-[16px]",children:[n.jsx(jl,{className:"h-[36px] w-auto"}),n.jsxs("p",{className:"text-center text-heading-4-semibold text-neutral-100",children:["내 생기부의 맞춤 면접 질문부터",n.jsx("br",{}),"실전 연습까지 한번에"]})]}),n.jsxs("div",{className:"rounded-[24px] border border-neutral-10 bg-white p-[36px] shadow-soft",children:[n.jsx(lx,{fullWidth:!0,className:"mb-[32px]",value:t,onChange:Od,options:[{label:"로그인",value:"login"},{label:"회원가입",value:"signup"}]}),r==="social"?n.jsx(rx,{mode:t,onEmailClick:()=>{qe(),l("email")}}):t==="signup"?n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[n.jsxs("button",{onClick:()=>{l("social"),qe()},className:"flex items-center gap-[8px] text-body-2-medium text-neutral-50 hover:text-neutral-90",children:[n.jsx(S,{name:"arrow-left",size:24}),"다른 방법으로 가입하기"]}),n.jsxs("div",{className:"flex flex-col gap-[28px]",children:[n.jsx(Se,{label:"이름",placeholder:"이름을 입력해주세요",helperText:"생기부 속 이름과 똑같이 입력해주세요",autoComplete:"off",value:d,onChange:W=>{f(W.target.value),qe()}}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-end gap-[8px]",children:[n.jsx(Se,{label:"이메일",type:"email",placeholder:"example@email.com",className:"flex-1",autoComplete:"off",value:a,error:!!oe,onChange:W=>{i(W.target.value),qe(),y&&Fd()}}),n.jsx($,{variant:"secondary",size:"medium",onClick:Uo,disabled:!lt||F||y,className:"h-[52px] shrink-0",children:"인증번호 받기"})]}),oe&&n.jsx("p",{className:"text-body-3-regular text-danger-50",children:oe}),n.jsx(Se,{placeholder:"이메일로 받은 인증번호 6자리",inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,value:p,disabled:!y,readOnly:C,tabIndex:C?-1:void 0,onMouseDown:C?W=>W.preventDefault():void 0,error:!!K||de,helperText:K||(de?"인증번호가 만료됐어요. 인증번호를 다시 요청해주세요.":void 0),trailing:C?n.jsx(S,{name:"circle-check-filled",size:24,className:"text-success-50 fill-white"}):y?n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("span",{className:`text-body-2-medium ${de||K?"text-danger-50":"text-neutral-50"}`,children:ux(_)}),(de||K)&&n.jsx(S,{name:"circle-alert-filled",size:24,className:"text-danger-50 fill-white"})]}):void 0,onChange:W=>{const jt=W.target.value.replace(/\D/g,"");h(jt),qe(),jt.length===6&&_>0&&Hd(jt)}}),y&&n.jsxs("div",{className:"flex items-center justify-center gap-[8px]",children:[n.jsx("span",{className:"text-body-3-medium text-neutral-50",children:"이메일을 못 받으셨나요?"}),n.jsx("button",{type:"button",onClick:Uo,disabled:F,className:"text-body-3-semibold text-primary-60 hover:underline disabled:opacity-50",children:"다시 받기"})]})]}),n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx(Se,{label:"비밀번호",type:m?"text":"password",placeholder:"비밀번호를 입력해주세요",autoComplete:"new-password",value:o,error:J&&!Ot,onBlur:()=>se(!0),onChange:W=>{c(W.target.value),qe()},trailing:n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("button",{type:"button",tabIndex:-1,onClick:()=>j(W=>!W),className:"text-neutral-50",children:n.jsx(S,{name:m?"eyeon":"eyeoff",size:24})}),J&&!Ot&&n.jsx(S,{name:"circle-alert-filled",size:24,className:"text-danger-50 fill-white"}),Ot&&n.jsx(S,{name:"circle-check-filled",size:24,className:"text-success-50 fill-white"})]})}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx(q1,{ok:Xe,touched:J,children:"8자 이상 입력해주세요"}),n.jsxs("div",{className:"flex gap-[12px]",children:[n.jsx(q1,{ok:A1,touched:J,children:"영문 포함"}),n.jsx(q1,{ok:Fo,touched:J,children:"숫자 포함"}),n.jsx(q1,{ok:Oo,touched:J,children:"특수문자 포함"})]})]})]}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx(Se,{label:"비밀번호 확인",type:b?"text":"password",placeholder:"비밀번호를 한번 더 입력해주세요",autoComplete:"new-password",value:g,error:Ot&&g.length>0&&!Gn,helperText:Ot&&g.length>0&&!Gn?"비밀번호가 일치하지 않아요.":void 0,onChange:W=>{x(W.target.value),qe()},trailing:n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("button",{type:"button",tabIndex:-1,onClick:()=>N(W=>!W),className:"text-neutral-50",children:n.jsx(S,{name:b?"eyeon":"eyeoff",size:24})}),Ot&&g.length>0&&!Gn&&n.jsx(S,{name:"circle-alert-filled",size:24,className:"text-danger-50 fill-white"}),Ot&&Gn&&n.jsx(S,{name:"circle-check-filled",size:24,className:"text-success-50 fill-white"})]})}),Ot&&Gn&&n.jsx(q1,{ok:!0,children:"비밀번호가 일치해요"})]})]}),n.jsx("div",{className:"h-px w-full bg-neutral-10"}),n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsxs("label",{className:"flex cursor-pointer items-center gap-[12px] rounded-[12px] bg-primary-5 px-[16px] py-[14px]",children:[n.jsx(nn,{size:24,checked:Ad,onChange:W=>$o(W.target.checked)}),n.jsx("span",{className:"text-body-2-semibold text-neutral-70",children:"전체 동의"})]}),n.jsxs("div",{className:"flex flex-col gap-[16px] pl-[16px]",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("label",{className:"flex cursor-pointer items-center gap-[12px]",children:[n.jsx(nn,{size:24,checked:E,onChange:W=>L(W.target.checked)}),n.jsx("span",{className:"text-body-2-medium text-neutral-70",children:"[필수] 이용약관 동의"})]}),n.jsx("button",{type:"button",onClick:()=>X("terms"),className:"text-neutral-40 hover:text-neutral-60","aria-label":"이용약관 보기",children:n.jsx(S,{name:"chevron-right",size:24})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("label",{className:"flex cursor-pointer items-center gap-[12px]",children:[n.jsx(nn,{size:24,checked:I,onChange:W=>D(W.target.checked)}),n.jsx("span",{className:"text-body-2-medium text-neutral-70",children:"[필수] 개인정보 처리방침 동의"})]}),n.jsx("button",{type:"button",onClick:()=>X("privacy"),className:"text-neutral-40 hover:text-neutral-60","aria-label":"개인정보 처리방침 보기",children:n.jsx(S,{name:"chevron-right",size:24})})]}),n.jsxs("label",{className:"flex cursor-pointer items-center gap-[12px]",children:[n.jsx(nn,{size:24,checked:M,onChange:W=>P(W.target.checked)}),n.jsx("span",{className:"text-body-2-medium text-neutral-70",children:"[필수] 만 14세 이상입니다"})]}),n.jsxs("label",{className:"flex cursor-pointer items-center gap-[12px]",children:[n.jsx(nn,{size:24,checked:O,onChange:W=>q(W.target.checked)}),n.jsx("span",{className:"text-body-2-medium text-neutral-70",children:"[선택] 면접 팁 · 이벤트 소식 받기"})]})]})]}),Z&&n.jsx("p",{className:"text-caption-medium text-danger-60",children:Z}),k&&!Z&&n.jsx("p",{className:"text-caption-medium text-primary-60",children:k})]}),n.jsx($,{variant:"primary",size:"large",onClick:$d,disabled:!Bo||F,className:"w-full",children:F?"처리 중…":"하이면접 시작하기"})]}):n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[n.jsxs("button",{onClick:()=>{l("social"),qe()},className:"flex items-center gap-[8px] text-body-2-medium text-neutral-50 hover:text-neutral-90",children:[n.jsx(S,{name:"arrow-left",size:24}),"다른 방법으로 로그인"]}),n.jsxs("div",{className:"flex flex-col gap-[28px]",children:[n.jsx(Se,{label:"이메일",type:"email",placeholder:"example@email.com",value:a,error:!!Z,onChange:W=>{i(W.target.value),qe()}}),n.jsx(Se,{label:"비밀번호",type:m?"text":"password",placeholder:"비밀번호를 입력해주세요",value:o,error:!!Z,helperText:Z||void 0,onKeyDown:W=>{W.key==="Enter"&&Zo()},onChange:W=>{c(W.target.value),qe()},trailingIcon:n.jsx("button",{type:"button",tabIndex:-1,onClick:()=>j(W=>!W),className:"text-neutral-50",children:n.jsx(S,{name:m?"eyeon":"eyeoff",size:24})})}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("label",{className:"flex cursor-pointer items-center gap-[12px]",children:[n.jsx(nn,{size:24,checked:A,onChange:W=>H(W.target.checked)}),n.jsx("span",{className:"text-body-2-medium text-neutral-70",children:"로그인 상태 유지"})]}),n.jsx("button",{type:"button",onClick:()=>Re("/password-reset"),className:"text-body-2-medium text-neutral-70 hover:text-neutral-90",children:"비밀번호 찾기"})]})]}),k&&!Z&&n.jsx("p",{className:"text-caption-medium text-primary-60",children:k})]}),n.jsx($,{variant:"primary",size:"large",onClick:Zo,disabled:!Vo||F,className:"w-full",children:F?"로그인 중…":"로그인"})]})]})]}),n.jsx(ox,{open:He!==null,doc:He==="privacy"?"privacy":"terms",onClose:()=>X(null)}),n.jsx(me,{open:Ne,onClose:()=>{vt(!1),Re("/onboarding")},icon:n.jsx(S,{name:"circle-check-filled",size:44,className:"text-success-50 fill-white"}),title:"하이면접 회원가입이 완료되었어요!",description:n.jsxs(n.Fragment,{children:["지금 바로 생기부를 올리고",n.jsx("br",{}),"첫 예상 질문을 받아봐요."]}),confirmText:"확인",onConfirm:()=>Re("/onboarding")})]})}const L2=300;function W1({ok:e,touched:t,children:s}){const r=e?"text-success-50":t?"text-danger-50":"text-neutral-50";return n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(S,{name:"check",size:24,className:r}),n.jsx("span",{className:`text-body-3-medium ${r}`,children:s})]})}function xx(){const e=ne(),[t,s]=u.useState("email"),[r,l]=u.useState(""),[a,i]=u.useState(""),[o,c]=u.useState(""),[d,f]=u.useState(""),[p,h]=u.useState(!1),[y,v]=u.useState(!1),[C,w]=u.useState(!1),[g,x]=u.useState(0),[m,j]=u.useState(""),[b,N]=u.useState(""),[E,L]=u.useState(""),[I,D]=u.useState(!1);u.useEffect(()=>{if(g<=0)return;const U=setTimeout(()=>x(ue=>ue-1),1e3);return()=>clearTimeout(U)},[g]),u.useEffect(()=>{if(!E)return;const U=setTimeout(()=>L(""),3e3);return()=>clearTimeout(U)},[E]);const M=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r),P=a.trim().length===6,O=o.length>=8,q=/[A-Za-z]/.test(o),A=/[0-9]/.test(o),H=/[^A-Za-z0-9]/.test(o),Z=O&&q&&A&&H,T=o.length>0&&o===d,k=Z&&d.length>0&&!T,z=t==="code"&&g===0,K=`${String(Math.floor(g/60)).padStart(2,"0")}:${String(g%60).padStart(2,"0")}`,Q=()=>{j(""),N("")},oe=async()=>{if(!(!M||I)){Q(),D(!0);try{await Jr({email:r}),i(""),x(L2),s("code"),L("이메일로 인증번호가 전송되었어요")}catch(U){j(ee(U).message)}finally{D(!1)}}},ae=async()=>{if(!I){Q(),D(!0);try{await Jr({email:r}),i(""),x(L2),L("인증번호가 다시 전송되었어요")}catch(U){j(ee(U).message)}finally{D(!1)}}},J=async()=>{if(!(!P||z||I)){Q(),D(!0);try{const U=await ko({email:r,code:a.trim()});U.verified?s("password"):N(U.message||"인증번호가 올바르지 않아요.")}catch(U){N(ee(U).message)}finally{D(!1)}}},se=async()=>{if(!(!(Z&&T)||I)){Q(),D(!0);try{await Fu({email:r,code:a.trim(),newPassword:o}),s("done")}catch(U){j(ee(U).message)}finally{D(!1)}}},_=(U,ue,F,G)=>n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("button",{type:"button",tabIndex:-1,onClick:ue,className:"text-neutral-50",children:n.jsx(S,{name:U?"eyeon":"eyeoff",size:24})}),G&&n.jsx(S,{name:"circle-alert-filled",size:24,className:"text-danger-50 fill-white"}),F&&n.jsx(S,{name:"circle-check-filled",size:24,className:"text-success-50 fill-white"})]}),Y=n.jsxs("button",{onClick:()=>e("/login"),className:"flex items-center gap-[8px] text-body-2-medium text-neutral-50 hover:text-neutral-90",children:[n.jsx(S,{name:"arrow-left",size:24}),"로그인으로 돌아가기"]});return n.jsxs("div",{className:"flex min-h-[calc(100vh-68px)] items-start justify-center bg-white pt-[120px]",children:[E&&n.jsx("div",{className:"fixed right-0 top-[88px] z-50",children:n.jsx(D1,{icon:n.jsx(S,{name:"circle-check-filled",className:"text-success-50 fill-white"}),children:E})}),n.jsxs("div",{className:"w-[472px] pb-[120px]",children:[n.jsxs("div",{className:"mb-[56px] flex flex-col items-center gap-[16px]",children:[n.jsx(jl,{className:"h-[36px] w-auto"}),n.jsxs("p",{className:"text-center text-heading-4-semibold text-neutral-100",children:["내 생기부의 맞춤 면접 질문부터",n.jsx("br",{}),"실전 연습까지 한번에"]})]}),n.jsx("div",{className:"rounded-[24px] border border-neutral-10 bg-white p-[36px] shadow-soft",children:t==="done"?n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[16px] py-[20px] text-center",children:[n.jsx("span",{className:"flex size-[52px] items-center justify-center rounded-full bg-success-50",children:n.jsx(S,{name:"check",size:32,className:"text-white"})}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-heading-4-bold text-neutral-100",children:"비밀번호가 변경됐어요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:"새 비밀번호로 다시 로그인해주세요"})]})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:()=>e("/login"),children:"로그인하기"})]}):n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[Y,t==="email"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-90",children:"비밀번호 찾기"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"가입한 이메일로 인증번호를 보내드릴게요."})]}),n.jsx(Se,{type:"email",placeholder:"example@email.com",value:r,onChange:U=>{l(U.target.value),Q()}})]}),t==="code"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-90",children:"비밀번호 찾기"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"가입한 이메일로 인증번호를 보내드렸어요."})]}),n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx(Se,{type:"email",value:r,readOnly:!0}),n.jsx(Se,{placeholder:"이메일로 받은 인증번호 6자리",inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,value:a,error:!!b||z,helperText:b||(z?"인증번호가 만료됐어요. 인증번호를 다시 요청해주세요.":void 0),onChange:U=>{i(U.target.value.replace(/\D/g,"")),Q()},trailing:n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("span",{className:`text-body-2-medium ${z||b?"text-danger-50":"text-neutral-50"}`,children:K}),(z||b)&&n.jsx(S,{name:"circle-alert-filled",size:24,className:"text-danger-50 fill-white"})]})}),n.jsxs("div",{className:"flex items-center justify-center gap-[8px]",children:[n.jsx("span",{className:"text-body-3-medium text-neutral-50",children:"이메일을 못 받으셨나요?"}),n.jsx("button",{type:"button",onClick:ae,disabled:I,className:"text-body-3-semibold text-primary-60 hover:underline disabled:opacity-50",children:"다시 받기"})]})]})]}),t==="password"&&n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-90",children:"새 비밀번호 설정"}),n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx(Se,{label:"새 비밀번호",type:p?"text":"password",placeholder:"비밀번호를 입력해주세요",autoComplete:"new-password",value:o,error:C&&!Z,onBlur:()=>w(!0),onChange:U=>{c(U.target.value),Q()},trailing:_(p,()=>h(U=>!U),Z,C&&!Z)}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx(W1,{ok:O,touched:C,children:"8자 이상 입력해주세요"}),n.jsxs("div",{className:"flex gap-[12px]",children:[n.jsx(W1,{ok:q,touched:C,children:"영문 포함"}),n.jsx(W1,{ok:A,touched:C,children:"숫자 포함"}),n.jsx(W1,{ok:H,touched:C,children:"특수문자 포함"})]})]})]}),n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx(Se,{label:"비밀번호 확인",type:y?"text":"password",placeholder:"비밀번호를 한번 더 입력해주세요",autoComplete:"new-password",value:d,error:k,helperText:k?"비밀번호가 일치하지 않아요.":void 0,onChange:U=>{f(U.target.value),Q()},trailing:_(y,()=>v(U=>!U),Z&&T,k)}),Z&&T&&n.jsx(W1,{ok:!0,children:"비밀번호가 일치해요"})]})]})]}),m&&n.jsx("p",{className:"text-caption-medium text-danger-60",children:m})]}),t==="email"&&n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!M||I,onClick:oe,children:I?"전송 중…":"인증번호 받기"}),t==="code"&&n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!P||z||I,onClick:J,children:I?"확인 중…":"인증번호 확인"}),t==="password"&&n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!(Z&&T)||I,onClick:se,children:I?"변경 중…":"비밀번호 변경하기"})]})})]})]})}const E2=["school","major","clipboard-check"],T2=[{title:"생기부 내용을 파악하고 있어요",subtitle:"파일을 읽고 내용을 정리하고 있어요"},{title:"학교와 학과 특성을 분석하고 있어요",subtitle:"어떤 경험이 돋보이는지 보고 있어요"},{title:"예상 면접 질문을 생성하고 있어요",subtitle:"거의 다 됐어요, 질문을 마무리하고 있어요"}],Pn=160,ji=8,wi=(Pn-ji)/2,M2=2*Math.PI*wi;function As({progress:e,paused:t=!1,className:s=""}){const[r,l]=u.useState(0);u.useEffect(()=>{var c;if(t||(c=window.matchMedia)!=null&&c.call(window,"(prefers-reduced-motion: reduce)").matches)return;const o=window.setInterval(()=>l(d=>(d+1)%E2.length),1e3);return()=>window.clearInterval(o)},[t]);const a=Math.max(0,Math.min(100,e)),i=e<50?0:e<80?1:2;return n.jsxs("div",{className:`flex flex-col items-center gap-[32px] pb-[40px] ${s}`,role:"status","aria-live":"polite",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[24px]",children:[n.jsxs("div",{className:"relative size-[160px]",children:[n.jsxs("svg",{className:"absolute inset-0 size-full -rotate-90",viewBox:`0 0 ${Pn} ${Pn}`,fill:"none","aria-hidden":"true",children:[n.jsx("circle",{cx:Pn/2,cy:Pn/2,r:wi,className:"stroke-neutral-10",strokeWidth:ji}),n.jsx("circle",{cx:Pn/2,cy:Pn/2,r:wi,className:"stroke-primary-60 transition-[stroke-dashoffset] duration-300 ease-out",strokeWidth:ji,strokeLinecap:"round",strokeDasharray:M2,strokeDashoffset:M2*(1-a/100)})]}),n.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:n.jsx("div",{className:"relative size-[120px]",children:E2.map((o,c)=>n.jsx("div",{"aria-hidden":c!==r,className:`absolute inset-0 transition-all duration-500 ease-in-out motion-reduce:transition-none ${c===r?"scale-100 opacity-100":"scale-90 opacity-0"}`,children:n.jsx("div",{className:`flex size-full items-center justify-center rounded-full bg-primary-5 ${c===r&&!t?"motion-safe:animate-float":""}`,children:n.jsx(V,{name:o,size:72})})},o))})})]}),n.jsxs("p",{className:"text-heading-1-semibold text-primary-60",children:[e,"%"]})]}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px]",children:[n.jsx("p",{className:"text-heading-1-bold text-neutral-100",children:T2[i].title}),n.jsx("p",{className:"text-heading-4-medium text-neutral-60",children:T2[i].subtitle})]})]})}const Fs=()=>ze("/ai/guest");async function px(){const e=await fetch(`${Fs()}/ai/guest/session`,{method:"POST",credentials:"include"});if(!e.ok)throw new Ke("GUEST_SESSION","게스트 세션 발급에 실패했어요.",e.status)}async function fx(e){const t=await fetch(`${Fs()}/ai/guest/presigned-url?fileName=${encodeURIComponent(e)}`,{credentials:"include"});if(!t.ok)throw new Ke("GUEST_PRESIGN","업로드 URL 발급에 실패했어요.",t.status);const s=await t.json();return{presignedUrl:s.presignedUrl,s3Key:s.s3Key}}async function mx(e,t){const s=await fetch(e,{method:"PUT",headers:{"Content-Type":"application/pdf"},body:t});if(!s.ok)throw new Ke("GUEST_UPLOAD","파일 업로드에 실패했어요.",s.status)}function hx(e,t){return Is(`${Fs()}/ai/guest/records`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},s=>{typeof s.progress=="number"&&(t==null||t(s.progress))},"생기부 분석 중 오류가 발생했어요.")}function gx(e,t){return Is(`${Fs()}/ai/guest/questions`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)},s=>{typeof s.progress=="number"&&(t==null||t(s.progress))},"질문 생성 중 오류가 발생했어요.")}async function Cx(){const e=await fetch(`${Fs()}/ai/guest/questions`,{credentials:"include"});return e.ok?await e.json():[]}const yx={blue:"bg-primary-5 text-primary-60",gray:"bg-neutral-10 text-neutral-80",red:"bg-danger-5 text-danger-50",yellow:"bg-warning-5 text-warning-50",green:"bg-success-5 text-success-50",orange:"bg-atomic-orange-10 text-atomic-orange-50",purple:"bg-atomic-purple-10 text-atomic-purple-50",pink:"bg-atomic-pink-10 text-atomic-pink-50"},vx={small:"h-[26px] px-[8px] text-body-3-medium",medium:"h-[32px] px-[12px] text-body-2-medium"};function Ae({color:e="gray",size:t="small",children:s,className:r=""}){return n.jsx("span",{className:`inline-flex items-center justify-center rounded-full whitespace-nowrap ${vx[t]} ${yx[e]} ${r}`,children:s})}function Dt({selected:e=!1,number:t,children:s,className:r="",...l}){return n.jsxs("button",{type:"button",role:"tab","aria-selected":e,className:`inline-flex items-center justify-center gap-[10px] px-[28px] py-[14px] transition-colors ${e?"border-b-[1px] border-neutral-90 text-body-2-semibold text-neutral-95":"border-b-[1px] border-neutral-20 text-body-2-medium text-neutral-40"} ${r}`,...l,children:[s,t!=null&&n.jsx("span",{className:e?"text-body-1-semibold text-neutral-70":"text-body-1-medium text-neutral-30",children:t})]})}const jx=[{label:"전체",count:18},{label:"교과 성적",count:6},{label:"세부능력 및 특기사항",count:4},{label:"창의적 체험활동",count:3},{label:"행동특성 및 종합의견",count:3},{label:"기타",count:2}],En={category:"세특",question:"수학 시간에 진행한 탐구 활동에서 가장 흥미로웠던 발견은 무엇인가요?",intent:"동아리 활동에서 마주한 실제 문제를 어떻게 정의하고 풀어냈는지, 그 과정에서 지원 전공으로 이어지는 역량을 키웠는지 확인하려는 질문이에요.",evalPoint:"문제를 스스로 정의하는 능력, 팀 안에서의 구체적 기여, 결과보다 과정에서의 학습, 그리고 전공 적합성으로의 연결을 봅니다.",basis:"수학 세특: 미적분 단원 심화 탐구 중 함수의 극값 조건이 신호 처리 분야와 연결됨을 발견하고, 관련 개념을 독자적으로 조사하여 발표함.",strategy:"가장 어려웠던 지점을 솔직히 드러내고, 그걸 해결한 구체적 행동과 배운 점을 전공 역량과 연결해 보여주세요.",strategyBullets:["문제 상황을 한 문장으로 명확히 정의하기","내가 한 구체적 행동(역할·시도)을 중심으로 말하기","수치나 결과로 변화를 보여주기","이 경험이 지원 전공과 어떻게 이어지는지 마무리"],example:"미적분 단원에서 함수의 극값 조건을 공부하던 중, 신호 처리에서도 비슷한 패턴이 쓰인다는 것을 발견했습니다. 교과서 밖의 개념을 직접 찾아보고 연결해보는 과정이 인상 깊었고, 이후 수학이 단순한 계산이 아니라 현실 문제를 모델링하는 도구라는 시각을 갖게 됐습니다.",followups:[{q:"그 문제를 해결하는 과정에서 본인의 역할은 무엇이었나요?",dir:"방향 · 팀 기여의 구체성과 책임 범위를 확인합니다.",a:"저는 알고리즘의 전제 조건을 점검하는 역할을 맡아, 예외 데이터를 분류하는 테스트 케이스를 직접 설계했습니다. 팀원들이 로직을 수정할 때 어떤 입력에서 오류가 나는지 함께 확인할 수 있도록 기준을 만든 것이 제 기여였습니다."},{q:"결과를 수치로 말했는데, 그 수치는 어떻게 측정했나요?",dir:"방향 · 주장에 대한 근거와 검증 태도를 봅니다.",a:"실험 전후 같은 데이터셋으로 정확도를 비교해, 오분류 비율이 얼마나 줄었는지 수치로 정리했습니다."},{q:"같은 프로젝트를 다시 한다면 무엇을 다르게 하겠어요?",dir:"방향 · 메타인지와 성장 가능성을 확인합니다.",a:"초반에 평가 기준을 먼저 합의했을 거예요. 그래야 중간 점검이 빨라지고 불필요한 재작업을 줄일 수 있다고 느꼈습니다."}],tips:['"어려웠다"로 끝내지 말고 어떤 행동으로 풀었는지까지 말하기','팀 프로젝트라도 "내가 한 것"을 분명히 구분해 말하기',"마지막엔 배운 점을 지원 전공 관심과 연결하기"]},wx=[{cat:"세특",color:"orange",text:"SW 동아리에서 진행한 프로젝트 중 가장 도전적이었던 부분은 무엇이었나요?"},{cat:"세특",color:"orange",text:"물리학 탐구 실험에서 예상과 다른 결과가 나왔을 때 어떻게 대처했나요?"},{cat:"행특",color:"purple",text:"선생님이 기록한 리더십 관련 내용에 대해 구체적인 상황을 설명해주세요."},{cat:"창체",color:"green",text:"SW 동아리에서 진행한 프로젝트 중 가장 도전적이었던 부분은 무엇이었나요?"},{cat:"창체",color:"green",text:"SW 동아리에서 팀원과 의견 충돌이 있었을 때 어떻게 해결했나요?"},{cat:"행특",color:"purple",text:"학급에서 어려움을 겪는 친구를 도운 경험이 있다면 말해주세요."},{cat:"행특",color:"purple",text:"학교생활에서 가장 힘들었던 순간과 그것을 극복한 방법은 무엇인가요?"}];function Tn({icon:e,label:t,desc:s,divider:r=!0}){return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:e,size:24}),n.jsx("p",{className:"text-body-3-semibold text-neutral-90",children:t}),s&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:s})]}),r&&n.jsx("div",{className:"h-px w-full bg-neutral-10"})]})}function _2({items:e}){return n.jsx("div",{className:"flex flex-col gap-[6px] py-[8px]",children:e.map((t,s)=>n.jsxs("div",{className:"flex items-start gap-[10px]",children:[n.jsx("span",{className:"mt-[9px] size-[6px] shrink-0 rounded-full bg-primary-50"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:t})]},s))})}function z2({children:e,semibold:t=!1}){return n.jsx("div",{className:"flex w-full items-center border-l-[6px] border-primary-30 bg-primary-5 px-[24px] py-[16px]",children:n.jsx("p",{className:`${t?"text-body-2-semibold":"text-body-2-medium"} text-neutral-90`,children:e})})}function Nx({no:e,q:t,dir:s,a:r}){const[l,a]=u.useState(e===1);return n.jsxs("div",{className:"flex flex-col gap-[16px] rounded-[20px] bg-neutral-5 p-[24px]",children:[n.jsxs("button",{type:"button",onClick:()=>a(i=>!i),className:"flex w-full items-center justify-between gap-[8px] text-left",children:[n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center rounded-[8px] bg-primary-60 text-body-3-semibold text-white",children:e}),n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:t})]}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:s})]}),n.jsx(S,{name:l?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsx("p",{className:"text-body-2-medium text-neutral-95",children:r})]})]})}function bx({school:e,dept:t,appType:s,fileName:r}){const l=ne(),[a,i]=u.useState(!0),[o,c]=u.useState(!1),[d,f]=u.useState(null);u.useEffect(()=>{let y=!0;return Cx().then(v=>{y&&v.length&&f(v[0])}).catch(()=>{}),()=>{y=!1}},[]);const p=d?{...En,category:d.category||En.category,question:d.content||En.question,intent:d.purpose||En.intent,evalPoint:d.evaluationCriteria||En.evalPoint,example:d.modelAnswer||En.example}:En,h=[e||"한양대학교 ERICA",t||"ICT융합학부"].join(" · ");return n.jsxs("div",{className:"mx-auto max-w-[1240px] px-[40px] pb-[48px] pt-[80px]",children:[n.jsxs("div",{className:"mb-[56px] flex items-center justify-between gap-[56px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[n.jsx("div",{className:"flex size-[68px] shrink-0 items-center justify-center rounded-[16px] border border-neutral-10 bg-white",children:n.jsx(V,{name:"school",size:40})}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("p",{className:"text-heading-3-semibold text-neutral-95",children:h}),n.jsxs("div",{className:"flex flex-wrap items-center gap-[12px]",children:[n.jsx("span",{className:"rounded-[12px] bg-primary-10 px-[8px] py-[3px] text-body-3-medium text-primary-60",children:s||"학생부종합"}),n.jsx("span",{className:"h-[14px] w-px bg-neutral-20"}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:"최근 생성 2026.06.01"}),n.jsx("span",{className:"h-[14px] w-px bg-neutral-20"}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:"질문 18개"}),n.jsx("span",{className:"h-[14px] w-px bg-neutral-20"}),n.jsxs("div",{className:"flex items-center gap-[4px]",children:[n.jsx(V,{name:"file",size:20}),n.jsxs("p",{className:"text-body-3-medium text-neutral-60",children:[r||"이소희_생활기록부.pdf"," · 2026.06.10 등록"]})]})]})]})]}),n.jsx($,{variant:"primary",size:"medium",disabled:!0,className:"shrink-0",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"추가 질문 생성하기"})]}),n.jsx("div",{className:"mb-[36px] flex w-full overflow-x-auto border-b-[1px] border-neutral-20",children:jx.map((y,v)=>n.jsx(Dt,{selected:v===0,number:y.count,onClick:()=>v!==0&&l("/login"),children:y.label},y.label))}),n.jsxs("div",{className:"rounded-[20px] bg-neutral-5 px-[28px] py-[24px]",children:[n.jsxs("button",{type:"button",onClick:()=>i(y=>!y),className:"flex w-full items-center gap-[12px] text-left",children:[n.jsx(Ae,{color:"orange",size:"small",children:p.category}),n.jsx("p",{className:"flex-1 text-body-1-semibold text-neutral-90",children:p.question}),n.jsx(S,{name:a?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),a&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mt-[24px] flex flex-col gap-[32px] rounded-[20px] bg-white px-[28px] py-[24px]",children:[n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Tn,{icon:"target",label:"질문 의도"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:p.intent})]}),n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Tn,{icon:"puzzle",label:"면접관 평가 포인트"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:p.evalPoint})]}),n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Tn,{icon:"file-search",label:"생기부 활용 근거"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:p.basis})]}),n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Tn,{icon:"layer",label:"답변 전략",divider:!1}),n.jsx(z2,{children:p.strategy}),n.jsx(_2,{items:p.strategyBullets})]}),n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Tn,{icon:"thumb-up",label:"예시 답변",divider:!1}),n.jsx(z2,{semibold:!0,children:p.example})]}),n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Tn,{icon:"chat-feedback",label:"예상 꼬리질문",desc:"실제 면접에선 답변 뒤에 이런 질문이 이어질 수 있어요. 먼저 스스로 답해보고, 눌러서 예시 답변을 확인하세요.",divider:!1}),p.followups.map((y,v)=>n.jsx(Nx,{no:v+1,q:y.q,dir:y.dir,a:y.a},v))]}),n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Tn,{icon:"idea",label:"답변 팁"}),n.jsx(_2,{items:p.tips})]})]}),n.jsx("div",{className:"mt-[16px] flex justify-end",children:n.jsxs("button",{type:"button",onClick:()=>c(y=>!y),className:"flex items-center gap-[4px] px-[10px] py-[8px] text-body-2-medium text-neutral-50 hover:text-neutral-70",children:[n.jsx(S,{name:o?"star-filled":"star",size:20,className:o?"text-warning-50":""}),"저장"]})})]})]}),n.jsxs("div",{className:"relative mt-[12px] min-h-[340px]",children:[n.jsx("div",{"aria-hidden":!0,className:"pointer-events-none flex max-h-[320px] select-none flex-col gap-[12px] overflow-hidden blur-[3px]",children:wx.map((y,v)=>n.jsxs("div",{className:"flex h-[80px] items-center justify-between gap-[12px] rounded-[20px] bg-neutral-5 px-[28px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx(Ae,{color:y.color,size:"small",children:y.cat}),n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:y.text})]}),n.jsx(S,{name:"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]},v))}),n.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 top-0 bg-gradient-to-b from-white/10 via-white/80 to-white"}),n.jsxs("div",{className:"absolute inset-x-0 bottom-[24px] flex flex-col items-center gap-[20px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:"내 생기부로 만든 맞춤 예상 질문을 보려면 로그인이 필요해요"}),n.jsx($,{variant:"primary",size:"large",onClick:()=>l("/login"),children:"로그인하기"})]})]})]})}function Mo({color:e="neutral",helperText:t,onClear:s,className:r="",value:l,...a}){const i=l!=null&&l!=="";return n.jsxs("div",{className:"flex w-full flex-col gap-[4px]",children:[n.jsxs("div",{className:`flex items-center gap-[10px] rounded-2xl px-[16px] py-[14px] ${e==="white"?"bg-white":"bg-neutral-10"} ${r}`,children:[n.jsx(S,{name:"search",size:24,className:"shrink-0 text-neutral-50"}),n.jsx("input",{value:l,className:"min-w-0 flex-1 bg-transparent text-body-2-medium text-neutral-90 outline-none placeholder:text-neutral-40",...a}),i&&s&&n.jsx("button",{type:"button",onClick:s,"aria-label":"지우기",className:"shrink-0",children:n.jsx(S,{name:"circle-cancel-filled",size:24,className:"text-neutral-30 fill-white"})})]}),t&&n.jsx("p",{className:"text-body-3-regular text-neutral-60",children:t})]})}const kx=["서울대학교","연세대학교","고려대학교","서강대학교","한양대학교","성균관대학교","KAIST","숭실대학교","국민대학교","세종대학교","단국대학교"],Sx=["경영학과","경제학부","컴퓨터공학부","전기전자공학과","의예과","간호학과","건축학과","광고홍보학부","산업경영공학과","ICT융합학부","로봇공학과","기계공학과"],nd=["학생부종합전형","학생부교과전형","논술전형","실기전형","기타"],Lx=["서울대학교","연세대학교","고려대학교","서강대학교","한양대학교","성균관대학교","중앙대학교","경희대학교","한국외국어대학교","서울시립대학교","이화여자대학교","숙명여자대학교","동국대학교","홍익대학교","국민대학교","숭실대학교","세종대학교","건국대학교","단국대학교","아주대학교","인하대학교","광운대학교","명지대학교","상명대학교","가천대학교","가톨릭대학교","경기대학교","KAIST","POSTECH","UNIST","GIST","DGIST","연세대학교(미래)","고려대학교(세종)","부산대학교","경북대학교","전남대학교","전북대학교","충남대학교","충북대학교","강원대학교","제주대학교","인천대학교","울산대학교","부경대학교","한국항공대학교","한국기술교육대학교","서울과학기술대학교","한국교원대학교","동덕여자대학교","덕성여자대학교","서울여자대학교","성신여자대학교","한성대학교","삼육대학교","서경대학교","한신대학교","수원대학교","대진대학교","을지대학교","차의과학대학교","연세대학교 의과대학","영남대학교","계명대학교","동아대학교","조선대학교"],Ex=["컴퓨터공학부","컴퓨터공학과","소프트웨어학과","인공지능학과","데이터사이언스학과","정보통신공학과","전기전자공학과","전자공학과","기계공학과","화학공학과","신소재공학과","산업공학과","산업경영공학과","건축학과","건축공학과","토목공학과","환경공학과","로봇공학과","항공우주공학과","바이오메디컬공학과","경영학과","경제학부","경제학과","회계학과","무역학과","국제학부","행정학과","정치외교학과","사회학과","심리학과","미디어커뮤니케이션학과","광고홍보학부","신문방송학과","문헌정보학과","교육학과","국어국문학과","영어영문학과","중어중문학과","일어일문학과","사학과","철학과","문화인류학과","수학과","물리학과","화학과","생명과학과","통계학과","천문우주학과","지구환경과학과","의예과","치의예과","한의예과","약학과","간호학과","수의예과","보건학과","식품영양학과","디자인학부","시각디자인학과","산업디자인학과","패션디자인학과","음악학과","체육교육과","스포츠과학과","ICT융합학부","글로벌리더학부","자유전공학부"];function sd(e,t,s=8){const r=t.trim();if(!r)return[];const l=r.toLowerCase(),a=e.filter(o=>o.toLowerCase().startsWith(l)),i=e.filter(o=>!o.toLowerCase().startsWith(l)&&o.toLowerCase().includes(l));return[...a,...i].slice(0,s)}async function Tx(e){return sd(Lx,e)}async function Mx(e){return sd(Ex,e)}function rd({no:e,label:t,filled:s}){const r=s?"bg-primary-60 text-white":"bg-primary-10 text-primary-60";return n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("span",{className:`flex size-[24px] items-center justify-center rounded-[8px] text-body-3-semibold ${r}`,children:e}),n.jsx("span",{className:"text-body-2-semibold text-primary-60",children:t})]})}function ld({icon:e,label:t,onReset:s,variant:r}){const l=r==="onNeutral";return n.jsxs("div",{className:`flex items-center justify-between rounded-[16px] px-[16px] py-[12px] ${l?"bg-primary-10":"bg-primary-5"}`,children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"flex size-[36px] shrink-0 items-center justify-center rounded-full bg-white",children:n.jsx(V,{name:e,size:24})}),n.jsx("span",{className:"text-body-2-semibold text-neutral-90",children:t})]}),n.jsx("button",{type:"button",onClick:s,className:`flex items-center justify-center gap-[10px] rounded-[8px] px-[6px] py-[2px] text-body-3-semibold text-primary-60 ${l?"bg-primary-20":"bg-primary-10"}`,children:"변경"})]})}function ad({label:e,onClick:t}){return n.jsx("button",{type:"button",onClick:t,className:"rounded-full border border-neutral-20 bg-white px-[12px] py-[8px] text-body-3-medium text-neutral-70 transition-colors hover:border-neutral-40",children:e})}function _x(e,t){const s=t.trim();if(!s)return e;const r=e.indexOf(s);return r===-1?e:n.jsxs(n.Fragment,{children:[e.slice(0,r),n.jsx("span",{className:"text-primary-60",children:e.slice(r,r+s.length)}),e.slice(r+s.length)]})}function P2({no:e,label:t,icon:s,placeholder:r,value:l,onSelect:a,frequents:i,search:o,variant:c,filled:d}){const[f,p]=u.useState(""),[h,y]=u.useState([]),[v,C]=u.useState(-1),w=u.useId(),g=x=>{if(!(x.nativeEvent.isComposing||x.keyCode===229))if(x.key==="ArrowDown"){if(!h.length)return;x.preventDefault(),C(m=>m+1>=h.length?0:m+1)}else if(x.key==="ArrowUp"){if(!h.length)return;x.preventDefault(),C(m=>m<=0?h.length-1:m-1)}else if(x.key==="Enter"){const m=v>=0?h[v]:h[0];m&&(x.preventDefault(),a(m),p(""))}else x.key==="Escape"&&(p(""),C(-1))};return u.useEffect(()=>{if(!f.trim()){y([]);return}let x=!0;return o(f).then(m=>{x&&y(m)}).catch(()=>{x&&y([])}),()=>{x=!1}},[f,o]),n.jsxs("section",{className:"flex flex-col gap-[20px]",children:[n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx(rd,{no:e,label:t,filled:d}),l?n.jsx(ld,{icon:s,label:l,onReset:()=>a(""),variant:c}):n.jsxs("div",{className:"relative flex flex-col gap-[4px]",children:[n.jsx(Mo,{color:c==="onNeutral"?"white":"neutral",placeholder:r,value:f,onChange:x=>{p(x.target.value),C(-1)},onClear:()=>{p(""),C(-1)},onKeyDown:g,role:"combobox","aria-expanded":h.length>0,"aria-controls":w,"aria-autocomplete":"list","aria-activedescendant":v>=0?`${w}-${v}`:void 0}),f.trim()&&n.jsx("div",{id:w,role:"listbox",className:"flex flex-col overflow-hidden rounded-[16px] border border-neutral-20 bg-white shadow-soft",children:h.length>0?h.map((x,m)=>n.jsx("button",{id:`${w}-${m}`,role:"option","aria-selected":m===v,type:"button",onMouseEnter:()=>C(m),onClick:()=>{a(x),p("")},className:`px-[16px] py-[12px] text-left text-body-2-medium text-neutral-90 ${m===v?"bg-primary-5":""}`,children:_x(x,f)},x)):n.jsx("p",{className:"px-[16px] py-[12px] text-body-2-medium text-neutral-70",children:"검색 결과가 없어요"})})]})]}),!l&&n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsxs("p",{className:"text-body-3-medium text-neutral-60",children:["자주 찾는 ",t]}),n.jsx("div",{className:"flex flex-wrap gap-[8px]",children:i.map(x=>n.jsx(ad,{label:x,onClick:()=>a(x)},x))})]})]})}function Os({school:e,onSchool:t,dept:s,onDept:r,appType:l,onAppType:a,variant:i="default",filledNumber:o=!1}){const c=i==="onNeutral"||o;return n.jsxs("div",{className:"flex flex-col gap-[48px]",children:[n.jsx(P2,{no:1,label:"학교",icon:"school",placeholder:"대학교 이름을 검색해주세요",value:e,onSelect:t,frequents:kx,search:Tx,variant:i,filled:c}),n.jsx(P2,{no:2,label:"학과",icon:"major",placeholder:"학과 이름을 검색해주세요",value:s,onSelect:r,frequents:Sx,search:Mx,variant:i,filled:c}),n.jsxs("section",{className:"flex flex-col gap-[20px]",children:[n.jsx(rd,{no:3,label:"지원 전형",filled:c}),l?n.jsx(ld,{icon:"clipboard-check",label:l,onReset:()=>a(""),variant:i}):n.jsx("div",{className:"flex flex-wrap gap-[8px]",children:nd.map(d=>n.jsx(ad,{label:d,onClick:()=>a(d)},d))})]})]})}const zx=340/658,Px={top:"2.4%",right:"5.5%",bottom:"2.6%",left:"5.5%"};function Rx({src:e,index:t}){const[s,r]=u.useState(!1);return s?n.jsxs("div",{className:"flex h-full w-full shrink-0 items-center justify-center bg-neutral-5 text-body-2-medium text-neutral-40",children:["화면 ",t+1]}):n.jsx("img",{src:e,alt:"",onError:()=>r(!0),className:"h-full w-full shrink-0 object-cover"})}function id({frameSrc:e,images:t,active:s,width:r,ratio:l=zx,screen:a=Px,className:i=""}){return n.jsxs("div",{className:`relative shrink-0 ${i}`,style:{width:r,aspectRatio:l},children:[n.jsx("div",{className:"absolute overflow-hidden bg-white",style:{top:a.top,right:a.right,bottom:a.bottom,left:a.left,borderRadius:Math.round(r*.1)},children:n.jsx("div",{className:"flex h-full w-full transition-transform duration-500 ease-out",style:{transform:`translateX(-${s*100}%)`},children:t.map((o,c)=>n.jsx(Rx,{src:o,index:c},c))})}),n.jsx("img",{src:e,alt:"","aria-hidden":!0,className:"pointer-events-none absolute inset-0 h-full w-full select-none",onError:o=>{o.currentTarget.style.display="none"}})]})}const M1="/guide/phone-frame.svg",od=["카카오톡 앱","네이버 앱","정부24 웹사이트"],Ix=[{n:1,title:"생기부 발급받기",sub:"카카오톡에서 학교생활기록부 전자증명서를 발급받아요.",frame:M1,width:320,screens:["/guide/kako-step1-1.png","/guide/kako-step1-2.png","/guide/kako-step1-3.png"],cards:[{n:1,title:"지갑 메뉴 선택",sub:"카카오톡 앱에서 오른쪽 아래 더보기를 누른 후, 지갑을 선택하고 발급 버튼을 눌러주세요."},{n:2,title:"학교 생활기록부 선택",sub:"학교생활기록부초중고를 선택해 주세요."},{n:3,title:"신청내용 입력",sub:"출신 고등학교 정보를 입력한 뒤, 인증 후 신청하기 버튼을 눌러 학교생활기록부를 발급합니다."}]},{n:2,title:"PDF 저장하고 카리면접에 업로드하기",sub:"PDF 파일을 기기에 저장한 후, 카리면접에 직접 업로드해요.",frame:M1,width:340,screens:["/guide/kako-step2-1.png","/guide/kako-step2-2.png"],cards:[{n:1,title:"저장 방식 선택",sub:"발급된 화면에서 저장하기 버튼을 누른 후, 비밀번호 설정 없이 저장하기 버튼을 눌러 주세요."},{n:2,title:"휴대폰에 파일 저장",sub:"iOS: 파일에 저장을 눌러, 휴대폰에 파일을 저장해 주세요. 파일 앱에 저장됩니다. 안드로이드: 따로 선택할 필요 없이 자동으로 내 파일 앱에 저장됩니다."}]}],Dx=[{n:1,title:"생기부 발급받기",sub:"네이버에서 학교생활기록부 전자증명서를 발급받아요.",frame:M1,width:320,screens:["/guide/naver-step1-1.png","/guide/naver-step1-2.png","/guide/naver-step1-3.png"],cards:[{n:1,title:"네이버에서 메뉴 열기",sub:"네이버 모바일 앱을 열고, 왼쪽 위의 더보기 탭을 눌러 주세요."},{n:2,title:"전자증명서 선택",sub:"아래로 스크롤해서 ‘인증’ 카테고리에서 전자증명서를 선택해 주세요."},{n:3,title:"학교생활기록부(초중고) 선택",sub:"학교생활기록부(초중고)를 선택하면 학교생활기록부가 발급됩니다."}]},{n:2,title:"PDF 저장하고 카리면접에 업로드하기",sub:"PDF 파일을 기기에 저장한 후, 카리면접에 직접 업로드해요.",frame:M1,width:340,screens:["/guide/naver-step2-1.png","/guide/naver-step2-2.png"],cards:[{n:1,title:"저장 방식 선택",sub:"발급된 화면에서 저장 버튼을 누른 후, 비밀번호를 설정하지 않고 바로 저장 버튼을 눌러 주세요."},{n:2,title:"휴대폰에 파일 저장",sub:"iOS: 파일에 저장을 눌러, 휴대폰에 파일을 저장해 주세요. 파일 앱에 저장됩니다. 안드로이드: 따로 선택할 필요 없이 자동으로 내 파일 앱에 저장됩니다."}]}],Ax=[{n:1,title:"생기부 PDF 파일 저장",sub:"정부24 웹사이트에서 생기부를 PDF 파일로 저장해요.",kind:"web",imgWidth:604,screens:["/guide/gov24-step1-1.png","/guide/gov24-step1-2.png","/guide/gov24-step1-3.png","/guide/gov24-step1-4.png"],cards:[{n:1,title:"정부24 접속 후 로그인",sub:"정부24 웹사이트에 접속해 로그인해요",link:{label:"바로가기",href:"https://www.gov.kr"}},{n:2,title:"검색창에 ‘생활기록부’ 검색",sub:"검색창에 생활기록부를 검색한 후, 발급하기 버튼을 눌러주세요."},{n:3,title:"신청 내용과 수령 방법 선택",sub:"학교, 학적 정보를 입력하고, 주민등록 번호 뒷자리는 비공개, 수령 방법은 온라인발급을 선택해 주세요."},{n:4,title:"PDF 저장",sub:"서비스 신청 내역에서 ‘문서 출력’ 버튼을 누르고, 인쇄 버튼을 눌러 ‘미리보기에서 PDF 열기’를 눌러 저장해주세요."}]}],cd={"카카오톡 앱":Ix,"네이버 앱":Dx,"정부24 웹사이트":Ax},Fx=[{title:"재학생",sub:"현재 고등학교 재학 중",icon:"bag"},{title:"졸업생",sub:"2022년 2월 이후 졸업",icon:"major"},{title:"학부모",sub:"자녀 생기부를 대신 발급",icon:"users"}],Ox=["[학부모 나이스] 학교생활기록 HTML","[학부모 나이스] 대입전형자료 HTML"],Hx=["재학생","졸업생"],ia=e=>e==="학부모"?Ox:od,$x="나이스 4세대 개편으로 인해, 위 방법으로 생기부 업로드가 가능한 대상은 2022년 2월 이후 졸업생과 재학생에 한합니다.",Vx={"카카오톡 앱":["카카오톡은 본인 명의 계좌가 있어야 발급돼요. 계좌가 없다면 정부24를 이용해주세요 ","나이스 4세대 개편으로 인해, 위 방법으로 생기부 업로드가 가능한 대상은 2022년 2월 이후 졸업생과 재학생에 한합니다."],"네이버 앱":["네이버는 본인 명의 계좌가 있어야 발급돼요. 계좌가 없다면 정부24를 이용해주세요","나이스 4세대 개편으로 인해, 위 방법으로 생기부 업로드가 가능한 대상은 2022년 2월 이후 졸업생과 재학생에 한합니다."]};function Bx({n:e}){return n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center rounded-[8px] bg-primary-60 text-body-3-semibold text-white",children:e})}function Zx({images:e,active:t}){return n.jsx("div",{className:"w-full shrink-0 overflow-hidden rounded-[16px] border border-neutral-20 shadow-[0px_2px_10px_rgba(0,0,0,0.08)]",children:n.jsx("div",{className:"flex w-full transition-transform duration-500 ease-out",style:{transform:`translateX(-${t*100}%)`},children:e.map((s,r)=>n.jsx("img",{src:s,alt:"",className:"block w-full shrink-0"},r))})})}function Ux({card:e,active:t,onClick:s}){return n.jsxs("div",{role:"button",tabIndex:0,"aria-pressed":t,onClick:s,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),s())},className:`flex w-full cursor-pointer items-start gap-[12px] rounded-[20px] p-[20px] text-left transition-colors ${t?"bg-primary-5":"border border-neutral-20 bg-white hover:bg-neutral-5"}`,children:[n.jsx(Bx,{n:e.n}),n.jsxs("div",{className:"flex flex-1 flex-col gap-[4px]",children:[n.jsxs("div",{className:"flex items-center justify-between gap-[12px]",children:[n.jsx("p",{className:`text-body-2-semibold ${t?"text-primary-60":"text-neutral-100"}`,children:e.title}),e.link&&n.jsxs("a",{href:e.link.href,target:"_blank",rel:"noreferrer",onClick:r=>r.stopPropagation(),className:"flex shrink-0 items-center gap-[4px] text-body-3-medium text-neutral-50 transition-colors hover:text-neutral-80",children:[e.link.label,n.jsx(S,{name:"external-link",size:16})]})]}),n.jsx("p",{className:"text-body-3-regular text-neutral-70",children:e.sub})]})]})}function qx({step:e}){const[t,s]=u.useState(0),r=e.kind==="web",l=n.jsx("div",{className:"flex flex-1 flex-col gap-[16px]",children:e.cards.map((a,i)=>n.jsx(Ux,{card:a,active:t===i,onClick:()=>s(i)},a.n))});return n.jsxs("div",{className:"flex flex-col gap-[28px]",children:[n.jsxs("div",{className:"flex items-start gap-[8px]",children:[n.jsxs("span",{className:"flex h-[28px] shrink-0 items-center justify-center rounded-full bg-neutral-80 px-[10px] text-body-3-semibold text-white",children:["STEP ",e.n]}),n.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-[8px] gap-y-[2px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:e.title}),n.jsx("p",{className:"text-body-3-regular text-neutral-60",children:e.sub})]})]}),r?n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsx(Zx,{images:e.screens,active:t}),l]}):n.jsxs("div",{className:"flex items-start gap-[20px]",children:[n.jsx(id,{frameSrc:e.frame??M1,images:e.screens,active:t,width:220}),l]})]})}function _o({open:e,onClose:t}){const[s,r]=u.useState("카카오톡 앱"),l=cd[s],a=Vx[s];return u.useEffect(()=>{if(!e)return;const i=o=>{o.key==="Escape"&&t()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[e,t]),e?n.jsxs(n.Fragment,{children:[n.jsx("div",{onClick:t,className:"fixed inset-0 z-[55]"}),n.jsxs("div",{className:"animate-slide-in-right fixed right-0 top-0 z-[60] flex h-screen w-[700px] flex-col border-l border-neutral-20 bg-white shadow-[-4px_0px_6px_0px_rgba(0,0,0,0.04)]",children:[n.jsxs("div",{className:"flex items-start justify-between px-[36px] pb-[32px] pt-[36px]",children:[n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("h2",{className:"text-heading-3-bold text-neutral-100",children:"생기부 다운로드 안내"}),n.jsx("p",{className:"text-body-2-regular text-neutral-60",children:"방법을 선택하면 단계별로 안내해드려요"})]}),n.jsx("button",{type:"button","aria-label":"닫기",onClick:t,className:"shrink-0 text-neutral-50 transition-colors hover:text-neutral-90",children:n.jsx(S,{name:"cancel",size:28})})]}),n.jsxs("div",{className:"flex flex-1 flex-col gap-[28px] overflow-y-auto px-[36px] pb-[24px]",children:[n.jsx("div",{className:"flex w-full border-b border-neutral-20",children:od.map(i=>n.jsx(Dt,{selected:s===i,onClick:()=>r(i),children:i},i))}),a&&n.jsxs("div",{className:"mb-[8px] flex w-full items-start gap-[8px] rounded-[12px] bg-neutral-5 px-[14px] py-[12px]",children:[n.jsx(S,{name:"circle-alert",size:20,className:"mt-[1px] shrink-0 text-neutral-40"}),n.jsx("div",{className:"flex flex-col",children:a.map((i,o)=>n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:i},o))})]}),n.jsx("div",{className:"flex flex-col gap-[48px]",children:l.map(i=>n.jsx(qx,{step:i},`${s}-${i.n}`))})]})]})]}):null}function Hs({open:e,onLeave:t,onStay:s}){return n.jsx(me,{open:e,onClose:s,alert:!0,title:"지금 나가면 질문 생성이 취소돼요",description:n.jsxs(n.Fragment,{children:["예상 질문이 아직 완성되지 않았어요.",n.jsx("br",{}),"페이지를 나가면 처음부터 다시 생성해야 해요."]}),children:n.jsxs("div",{className:"mt-[12px] flex w-full gap-[12px]",children:[n.jsx($,{variant:"gray",size:"large",className:"flex-1",onClick:t,children:"나가기"}),n.jsx($,{variant:"primary",size:"large",className:"flex-1",onClick:s,children:"생성하기"})]})})}function $s(e,t){const s=u.useRef(t);s.current=t,u.useEffect(()=>{if(!e)return;const r=a=>{a.preventDefault(),a.returnValue=""},l=()=>{s.current(),window.history.pushState(null,"",window.location.href)};return window.addEventListener("beforeunload",r),window.history.pushState(null,"",window.location.href),window.addEventListener("popstate",l),()=>{window.removeEventListener("beforeunload",r),window.removeEventListener("popstate",l)}},[e])}function Wx(e){return e>=1024*1024?`${Math.round(e/1024/1024)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}function Qx(){const[e,t]=u.useState("upload"),[s,r]=u.useState(null),[l,a]=u.useState(!1),[i,o]=u.useState(!1),[c,d]=u.useState(!1),[f,p]=u.useState(""),[h,y]=u.useState(""),[v,C]=u.useState(""),[w,g]=u.useState(0),[x,m]=u.useState(!1),j=u.useRef(null),b=u.useRef(null),N=u.useRef(!1),E=ne();u.useEffect(()=>()=>{b.current&&window.clearInterval(b.current)},[]),u.useEffect(()=>{if(e!=="processing"||w<100)return;const M=window.setTimeout(()=>t("done"),600);return()=>window.clearTimeout(M)},[e,w]),$s(e==="processing",()=>{N.current=!0,m(!0)});const L=M=>{var O;const P=((O=M.name.split(".").pop())==null?void 0:O.toLowerCase())??"";if(!["pdf","html","htm"].includes(P)){a(!0);return}r(M)},I=()=>{b.current&&window.clearInterval(b.current),b.current=window.setInterval(()=>{g(M=>N.current?M:M>=100?(b.current&&window.clearInterval(b.current),100):M+1)},40)},D=()=>{window.scrollTo({top:0}),t("processing"),g(0),N.current=!1,b.current&&window.clearInterval(b.current),(async()=>{try{if(!s)throw new Error("no file");await px();const{presignedUrl:M,s3Key:P}=await fx(s.name);await mx(M,s),await hx({filename:s.name,s3Key:P},O=>g(Math.round(O*.5))),await gx({target_school:f,target_major:h,interview_type:v,questions_per_category:6},O=>g(50+Math.round(O*.5))),g(100)}catch{I()}})()};return e==="done"?n.jsx(bx,{school:f,dept:h,appType:v,fileName:s==null?void 0:s.name}):n.jsxs("div",{className:"flex min-h-[calc(100vh-68px)] flex-col items-center bg-white px-[40px] pb-[120px] pt-[120px]",children:[e==="processing"&&n.jsx(As,{progress:w,className:"pt-[160px]"}),e!=="processing"&&n.jsx("div",{className:"mb-[56px] flex flex-col items-center gap-[4px] text-center",children:e==="upload"?n.jsxs(n.Fragment,{children:[n.jsx("h1",{className:"text-heading-3-bold text-neutral-100",children:"생활기록부를 올려주세요"}),n.jsx("p",{className:"text-body-1-medium text-neutral-60",children:"내 생활기록부를 올리면 맞춤 면접 질문을 만들어드려요"})]}):n.jsxs(n.Fragment,{children:[n.jsx("h1",{className:"text-heading-3-bold text-neutral-100",children:"지원하는 학교를 알려주세요"}),n.jsxs("p",{className:"text-body-1-medium text-neutral-60",children:["학교·학과·전형을 자유롭게 선택하세요.",n.jsx("br",{}),"아무것도 고르지 않아도 생기부만으로 질문을 만들 수 있어요."]})]})}),e==="upload"&&n.jsxs("div",{className:"flex flex-col items-center gap-[40px]",children:[n.jsx("input",{ref:j,type:"file",accept:".pdf,.html,.htm",className:"hidden",onChange:M=>{var P;return((P=M.target.files)==null?void 0:P[0])&&L(M.target.files[0])}}),s?n.jsxs("div",{className:"flex w-[600px] flex-col gap-[56px]",children:[n.jsxs("div",{className:"flex items-center justify-between rounded-[20px] bg-neutral-5 px-[20px] py-[22px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[n.jsx(V,{name:"file",size:48}),n.jsxs("div",{className:"flex flex-col gap-[2px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:s.name}),n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:Wx(s.size)})]})]}),n.jsx("button",{type:"button","aria-label":"파일 제거",onClick:()=>{r(null),j.current&&(j.current.value="")},children:n.jsx(S,{name:"circle-cancel-filled",size:28,className:"text-neutral-40 hover:text-neutral-50 fill-white"})})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:()=>t("school"),trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"학교 선택하기"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{onClick:()=>{var M;return(M=j.current)==null?void 0:M.click()},onDragOver:M=>{M.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:M=>{var O;M.preventDefault(),o(!1);const P=(O=M.dataTransfer.files)==null?void 0:O[0];P&&L(P)},className:`relative flex h-[311px] w-[781px] cursor-pointer flex-col items-center justify-center gap-[16px] rounded-[24px] p-[36px] shadow-soft transition-colors ${i?"bg-primary-5 text-primary-60":"bg-white text-neutral-20 hover:bg-primary-5 hover:text-primary-40"}`,children:[n.jsx("svg",{className:"pointer-events-none absolute inset-0",width:"781",height:"311","aria-hidden":"true",children:n.jsx("rect",{x:"1",y:"1",width:"779",height:"309",rx:"23",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"10 10"})}),n.jsx(V,{name:"file-upload",size:56}),n.jsxs("p",{className:"text-center text-body-2-medium text-neutral-70",children:["PDF 또는 HTML 파일을 여기로 끌어오거나",n.jsx("br",{}),"클릭해서 선택해주세요"]})]}),n.jsxs("div",{className:"flex items-center gap-[16px] text-center",children:[n.jsx("span",{className:"text-body-2-regular text-neutral-50",children:"생기부 파일이 없으신가요?"}),n.jsx("button",{type:"button",onClick:()=>d(!0),className:"text-body-2-semibold text-primary-60 hover:underline",children:"다운로드 방법 보기"})]})]})]}),e==="school"&&n.jsxs("div",{className:"flex w-[600px] flex-col gap-[56px]",children:[n.jsx(Os,{school:f,onSchool:p,dept:h,onDept:y,appType:v,onAppType:C,filledNumber:!0}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:D,trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"예상 질문 만들기"})]}),n.jsx(_o,{open:c,onClose:()=>d(!1)}),n.jsx(wl,{open:l,onClose:()=>a(!1)}),n.jsx(Hs,{open:x,onLeave:()=>{m(!1),E("/")},onStay:()=>{N.current=!1,m(!1)}})]})}function ud(e,t,s){if(Yt)return D8(t,s);const r=ge.getAccessToken();return Is(`${ze("/ai/records")}/ai/records/${e}/generate-questions`,{method:"POST",headers:{"Content-Type":"application/json",...r&&{Authorization:`Bearer ${r}`}},body:JSON.stringify(t)},l=>{typeof l.progress=="number"&&(s==null||s(l.progress))},"질문 생성 중 오류가 발생했습니다.")}async function Kx(e){const t=ge.getAccessToken(),s=await fetch(`${ze("/ai/records")}/ai/records/question-sets/${e}/keywords`,{headers:t?{Authorization:`Bearer ${t}`}:{}});return s.ok?(await s.json()).keywords??[]:[]}async function Gx(e){const t=ge.getAccessToken(),s=await fetch(`${ze("/ai/records")}/ai/records/question-sets/${e}/new-question-ids`,{headers:t?{Authorization:`Bearer ${t}`}:{}});return s.ok?(await s.json()).new_question_ids??[]:[]}function Ni(e,t){if(Yt)return Promise.resolve(O8(e));const r=new URLSearchParams().toString();return Pe(`/api/question-sets/${e}/questions${r?`?${r}`:""}`,{method:"GET"})}function Yx(e,t,s,r){if(Yt)return $8(t);const l=ge.getAccessToken();return Is(`${ze("/ai/records")}/ai/records/${e}/question-sets/${t}/generate-questions`,{method:"POST",headers:{"Content-Type":"application/json",...l&&{Authorization:`Bearer ${l}`}},body:JSON.stringify(s)},a=>{a.progress},"질문 추가 생성 중 오류가 발생했습니다.")}const zo=7;function Jx(e){return e>=1024*1024?`${Math.round(e/1024/1024)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}function Xx(){const[e,t]=u.useState("upload"),[s,r]=u.useState(null),[l,a]=u.useState(!1),[i,o]=u.useState(!1),[c,d]=u.useState(!1),[f,p]=u.useState(""),[h,y]=u.useState(""),[v,C]=u.useState(""),[w,g]=u.useState(0),[x,m]=u.useState(!1),[j,b]=u.useState(""),N=u.useRef(null),E=u.useRef(!1),L=ne();$s(e==="processing",()=>{m(!0),ht(!0)});const I=M=>{var O;const P=((O=M.name.split(".").pop())==null?void 0:O.toLowerCase())??"";if(!["pdf","html","htm"].includes(P)){a(!0);return}b(""),r(M)},D=async()=>{if(!s)return;window.scrollTo({top:0}),t("processing"),g(0),b("");const M=(s.name.replace(/\.[^./\\]+$/,"").trim()||"내 생기부").slice(0,28),P=([f,h,v].filter(Boolean).join(" ").trim()||M||"맞춤 면접 질문").slice(0,40);try{const{presignedUrl:O,s3Key:q}=await bl(s.name);await kl(O,s),await Sl({title:M,filename:s.name,s3Key:q},z=>g(Math.round(z*.4)));const H=(await Ft()).records.reduce((z,K)=>!z||K.id>z.id?K:z,null);if(!H)throw new Error("업로드된 생기부를 찾을 수 없어요.");await ud(H.id,{title:P,target_school:f,target_major:h,interview_type:v,questions_per_category:zo},z=>g(40+Math.round(z*.6)));const Z=await qn(H.id),k=Z.questionSets.find(z=>z.title===P)??Z.questionSets[Z.questionSets.length-1];if(!k)throw new Error("생성된 질문 세트를 찾을 수 없어요.");g(100),setTimeout(()=>{E.current||L(`/questions/${k.id}`)},500)}catch(O){b(ee(O).message),t("school")}};return n.jsxs("div",{className:"flex min-h-[calc(100vh-68px)] flex-col items-center bg-white px-[40px] pb-[120px] pt-[120px]",children:[e==="processing"&&n.jsx(As,{progress:w,paused:x,className:"pt-[160px]"}),e!=="processing"&&n.jsx("div",{className:"mb-[56px] flex flex-col items-center gap-[4px] text-center",children:e==="upload"?n.jsxs(n.Fragment,{children:[n.jsx("h1",{className:"text-heading-3-bold text-neutral-100",children:"생활기록부를 올려주세요"}),n.jsx("p",{className:"text-body-1-medium text-neutral-60",children:"내 생활기록부를 올리면 맞춤 면접 질문을 받을 수 있어요"})]}):n.jsxs(n.Fragment,{children:[n.jsx("h1",{className:"text-heading-3-bold text-neutral-100",children:"지원하는 학교를 알려주세요"}),n.jsxs("p",{className:"text-body-1-medium text-neutral-60",children:["학교·학과·전형을 자유롭게 선택하세요.",n.jsx("br",{}),"아무것도 고르지 않아도 생기부만으로 질문을 만들 수 있어요."]})]})}),e==="upload"&&n.jsxs("div",{className:"flex flex-col items-center gap-[40px]",children:[n.jsx("input",{ref:N,type:"file",accept:".pdf,.html,.htm",className:"hidden",onChange:M=>{var P;return((P=M.target.files)==null?void 0:P[0])&&I(M.target.files[0])}}),s?n.jsxs("div",{className:"flex w-[600px] flex-col gap-[56px]",children:[n.jsxs("div",{className:"flex items-center justify-between rounded-[20px] bg-neutral-5 px-[20px] py-[22px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[n.jsx(V,{name:"file",size:48}),n.jsxs("div",{className:"flex flex-col gap-[2px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:s.name}),n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:Jx(s.size)})]})]}),n.jsx("button",{type:"button","aria-label":"파일 제거",onClick:()=>{r(null),N.current&&(N.current.value="")},children:n.jsx(S,{name:"circle-cancel-filled",size:28,className:"text-neutral-40 hover:text-neutral-50 fill-white"})})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:()=>t("school"),trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"학교 선택하기"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{onClick:()=>{var M;return(M=N.current)==null?void 0:M.click()},onDragOver:M=>{M.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:M=>{var O;M.preventDefault(),o(!1);const P=(O=M.dataTransfer.files)==null?void 0:O[0];P&&I(P)},className:`relative flex h-[311px] w-[781px] cursor-pointer flex-col items-center justify-center gap-[16px] rounded-[24px] p-[36px] shadow-soft transition-colors ${i?"bg-primary-5 text-primary-60":"bg-white text-neutral-20 hover:bg-primary-5 hover:text-primary-40"}`,children:[n.jsx("svg",{className:"pointer-events-none absolute inset-0",width:"781",height:"311","aria-hidden":"true",children:n.jsx("rect",{x:"1",y:"1",width:"779",height:"309",rx:"23",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"10 10"})}),n.jsx(V,{name:"file-upload",size:56}),n.jsxs("p",{className:"text-center text-body-2-medium text-neutral-70",children:["PDF 또는 HTML 파일을 여기로 끌어오거나",n.jsx("br",{}),"클릭해서 선택해주세요"]})]}),n.jsxs("div",{className:"flex items-center gap-[16px] text-center",children:[n.jsx("span",{className:"text-body-2-regular text-neutral-50",children:"생기부 파일이 없으신가요?"}),n.jsx("button",{type:"button",onClick:()=>d(!0),className:"text-body-2-semibold text-primary-60 hover:underline",children:"다운로드 방법 보기"})]})]})]}),e==="school"&&n.jsxs("div",{className:"flex w-[600px] flex-col gap-[56px]",children:[n.jsx(Os,{school:f,onSchool:p,dept:h,onDept:y,appType:v,onAppType:C,filledNumber:!0}),n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:D,trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"예상 질문 만들기"}),j&&n.jsx("p",{className:"text-center text-body-3-semibold text-danger-60",children:j})]})]}),n.jsx(_o,{open:c,onClose:()=>d(!1)}),n.jsx(wl,{open:l,onClose:()=>a(!1)}),n.jsx(Hs,{open:x,onLeave:()=>{E.current=!0,ht(!1),m(!1),L("/")},onStay:()=>{ht(!1),m(!1)}})]})}const e7={서울대:"/logos/seoul.svg",연세:"/logos/yonsei.svg",고려:"/logos/korea.svg",서강:"/logos/seogang.svg",성균관:"/logos/sungkyunkwan.svg",KAIST:"/logos/kaist.svg",숭실:"/logos/soongisl.svg",국민:"/logos/kookmin.svg",세종:"/logos/sejong.svg",단국:"/logos/dankook.svg",이화:"/logos/ehwa.svg",한양:"/logos/hanyang.svg"},R2=["#1F3D7A","#003876","#A30033","#00A85B","#4169E1","#EE8027","#6F5AE6","#27A567"];function t7(e){let t=0;for(let s=0;s>>0;return t}function n7(e){var s;const t=e??"";return(s=Object.entries(e7).find(([r])=>t.includes(r)))==null?void 0:s[1]}function Sn({university:e,size:t=48,fallback:s}){const r=n7(e),[l,a]=u.useState(!1);if(u.useEffect(()=>{a(!1)},[r]),r&&!l)return n.jsx("div",{className:"flex shrink-0 items-center justify-center overflow-hidden rounded-[16px] border border-neutral-10 bg-white",style:{width:t,height:t},children:n.jsx("img",{src:r,alt:e,onError:()=>a(!0),className:"h-[72%] w-[72%] object-contain"})});if(s)return n.jsx("div",{className:"flex shrink-0 items-center justify-center overflow-hidden rounded-[16px] border border-neutral-10 bg-white",style:{width:t,height:t},children:s});const i=R2[t7(e||"?")%R2.length],o=(e||"?").trim().charAt(0);return n.jsx("div",{className:"flex shrink-0 items-center justify-center rounded-[16px] text-body-2-semibold text-white",style:{width:t,height:t,background:i},children:o})}function dd({set:e}){return n.jsxs(On,{to:`/questions/${e.setId}`,className:"flex h-full flex-col gap-[24px] rounded-[20px] bg-neutral-5 px-[28px] pt-[28px] pb-[24px] transition-shadow hover:shadow-frame",children:[n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[e.icon.kind==="emblem"?n.jsx(Sn,{university:e.icon.university,size:64}):n.jsx("span",{className:"flex size-[64px] shrink-0 items-center justify-center rounded-[16px] border border-neutral-10 bg-white",children:n.jsx(V,{name:e.icon.name,size:48})}),n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-[8px]",children:[n.jsx("p",{className:"truncate text-heading-4-semibold text-neutral-95",children:e.title}),e.chipLabel&&n.jsx("span",{className:"inline-flex w-fit items-center rounded-[12px] bg-primary-10 px-[8px] py-[3px] text-body-3-medium text-primary-60",children:e.chipLabel})]})]}),n.jsx("div",{className:"flex flex-wrap gap-[8px]",children:e.keywords.slice(0,3).map((t,s)=>n.jsxs("span",{className:"rounded-[12px] border border-neutral-10 bg-white px-[10px] py-[6px] text-body-3-medium text-neutral-80",children:["# ",t]},s))})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("span",{className:"flex items-center gap-[4px] text-body-3-medium",children:[n.jsx("span",{className:"text-neutral-70",children:"질문"}),n.jsxs("span",{className:"text-body-3-semibold text-primary-60",children:[e.count,"개"]})]}),n.jsx("span",{className:"text-body-3-medium text-neutral-50",children:e.date})]})]})}function Po(e){return Yu?Promise.resolve(V8(e)):Pe("/api/bookmarks",{method:"POST",body:JSON.stringify({questionId:e})})}function xd(){return Yu?Promise.resolve(B8()):Pe("/api/bookmarks",{method:"GET"})}const s7={성적:{label:"교과",cls:"bg-atomic-pink-10 text-atomic-pink-50"},세특:{label:"세특",cls:"bg-atomic-orange-10 text-atomic-orange-50"},창체:{label:"창체",cls:"bg-success-10 text-success-60"},행특:{label:"행특",cls:"bg-atomic-purple-10 text-atomic-purple-50"},연계:{label:"연계",cls:"bg-primary-10 text-primary-60"},기타:{label:"기타",cls:"bg-neutral-10 text-neutral-60"}},bi=["성적","세특","창체","행특","연계","기타"];function Ll(e){return s7[e]??{label:e,cls:"bg-neutral-10 text-neutral-60"}}function pd(e){if(e.targetSchool!=null||e.targetMajor!=null||e.interviewType!=null)return{school:e.targetSchool??"",dept:e.targetMajor??"",appTypeFull:e.interviewType??""};const t=nd.find(i=>e.title.includes(i))??"",r=(t?e.title.replace(t,""):e.title).trim().split(/\s+/).filter(Boolean),l=r.find(i=>/(대학교|대학|대|KAIST|DGIST|UNIST|GIST|POSTECH)$/i.test(i))??"",a=r.filter(i=>i!==l).join(" ");return{school:l,dept:a,appTypeFull:t}}function fd(e,t,s){const r=s.replace(/전형$/,"");return e?{title:t?`${e} · ${t}`:`${e} 면접 연습`,chipLabel:r,icon:{kind:"emblem",university:e}}:t?{title:`${t} 면접 연습`,chipLabel:r,icon:{kind:"color",name:"major"}}:s?{title:`${s} 면접 연습`,chipLabel:r,icon:{kind:"color",name:"clipboard-check"}}:{title:"공통 면접 연습",chipLabel:r,icon:{kind:"color",name:"school"}}}const r7=e=>e?e.slice(0,10).replace(/-/g,"."):"",oa=["수학 성적 향상","과학탐구실험","SW 동아리","진로 탐색 활동","학급 자치 활동","독서·토론","교내 봉사","전공 연계 탐구"];function l7(e){const t=Math.abs(e)%oa.length;return[0,1,2].map(s=>oa[(t+s)%oa.length])}async function a7(e=3,t=600){for(let s=0;;s++)try{return await Ft()}catch(r){if(s>=e-1)throw r;await new Promise(l=>setTimeout(l,t))}}async function Ro(){const e=await a7(),s=(await Promise.all(e.records.map(o=>qn(o.id).catch(()=>null)))).filter(o=>!!o).flatMap(o=>o.questionSets.map(c=>({qs:c,d:o}))),r={},l={};return{sets:(s.length===0?[]:await Promise.all(s.map(async({qs:o,d:c})=>{const{school:d,dept:f,appTypeFull:p}=pd(o),h=fd(d,f,p),[y,v]=await Promise.all([Ni(o.id).catch(()=>[]),Kx(o.id).catch(()=>[])]);return y.forEach(C=>{r[C.questionId]=h.title,l[C.questionId]=d}),{setId:o.id,...h,keywords:v.length?v:l7(o.id),count:y.length,date:r7(c.createdAt)}}))).filter(o=>o.count>0).reverse(),sourceByQuestionId:r,schoolByQuestionId:l}}const i7={성적:"pink",세특:"orange",창체:"green",행특:"purple",기타:"gray"},I2=6,o7=5;function c7(){const e=ne(),[t,s]=u.useState([]),[r,l]=u.useState([]),[a,i]=u.useState({}),[o,c]=u.useState(new Set),[d,f]=u.useState(!0),[p,h]=u.useState(""),y=async()=>{f(!0),h("");try{const{sets:j,sourceByQuestionId:b}=await Ro(),N=await xd().catch(()=>[]);if(j.length===0&&N.length===0){e("/questions/new",{replace:!0});return}s(j),l(N),i(b)}catch(j){h(ee(j).message)}finally{f(!1)}};u.useEffect(()=>{y()},[]);const v=async j=>{c(b=>{const N=new Set(b);return N.has(j)?N.delete(j):N.add(j),N});try{await Po(j)}catch{}},C=()=>e("/questions/all"),w=t.slice(0,I2),g=t.length>I2,x=r.slice(0,o7),m=r.length>0;return n.jsxs("div",{className:"mx-auto max-w-[1280px] px-[40px] pt-[80px] pb-[120px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsx("h1",{className:"text-heading-2-semibold text-neutral-100",children:"면접 질문"}),n.jsx("p",{className:"text-body-1-medium text-neutral-80",children:"생기부를 바탕으로 나만의 면접 질문을 만들고 관리해요"})]}),n.jsx($,{variant:"primary",size:"medium",onClick:()=>e("/questions/new",{state:{breadcrumb:!0}}),trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),className:"shrink-0",children:"새 질문 만들기"})]}),n.jsx("hr",{className:"my-[48px] border-neutral-10"}),d?n.jsxs("div",{className:"py-[80px] text-center",children:[n.jsx("div",{className:"mx-auto h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsx("p",{className:"mt-[16px] text-body-2-medium text-neutral-60",children:"불러오는 중…"})]}):p?n.jsxs("div",{className:"rounded-[16px] border border-dashed border-danger-20 bg-danger-5 py-[40px] text-center text-body-3-medium text-danger-60",children:[p,n.jsx("button",{onClick:y,className:"ml-[8px] underline",children:"다시 시도"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("section",{className:"mb-[80px]",children:[n.jsxs("div",{className:"mb-[20px] flex items-center justify-between",children:[n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"질문 보관함"}),g&&n.jsx("button",{type:"button",onClick:C,className:"text-body-2-semibold text-primary-60 hover:underline",children:"모두 보기"})]}),n.jsx("div",{className:"grid grid-cols-2 gap-[16px]",children:w.map(j=>n.jsx(dd,{set:j},j.setId))})]}),n.jsxs("section",{children:[n.jsxs("div",{className:"mb-[20px] flex items-center justify-between",children:[n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"저장한 질문"}),m&&n.jsx("button",{type:"button",onClick:()=>e("/questions/saved"),className:"text-body-2-semibold text-primary-60 hover:underline",children:"모두 보기"})]}),r.length===0?n.jsx("div",{className:"flex h-[300px] flex-col items-center justify-center gap-[4px] rounded-[12px] bg-neutral-5",children:n.jsx("p",{className:"text-body-1-semibold text-neutral-70",children:"아직 저장한 질문이 없어요"})}):n.jsx("div",{className:"flex flex-col",children:x.map(j=>{const b=Ll(j.category),N=!o.has(j.questionId);return n.jsxs("div",{className:"flex items-center gap-[16px] border-b border-neutral-10 py-[24px]",children:[n.jsxs("button",{type:"button",onClick:()=>e(`/questions/saved?q=${j.questionId}`),className:"group flex flex-1 flex-col gap-[12px] text-left",children:[n.jsx("p",{className:"line-clamp-2 text-body-1-semibold text-neutral-90 group-hover:underline",children:j.content}),n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx(Ae,{color:i7[j.category]??"gray",size:"small",children:b.label}),n.jsx("span",{className:"text-body-3-medium text-neutral-60",children:a[j.questionId]??j.recordTitle})]})]}),n.jsx("button",{onClick:()=>v(j.questionId),"aria-label":N?"저장 해제":"다시 저장",className:`flex size-[36px] shrink-0 items-center justify-center rounded-[20px] transition-colors ${N?"bg-primary-10 text-primary-60 hover:bg-primary-20":"bg-neutral-5 text-neutral-40 hover:bg-neutral-10"}`,children:n.jsx(S,{name:N?"star-filled":"star",size:24})})]},j.questionId)})})]})]})]})}function u7({value:e,options:t,onChange:s,align:r="right",className:l=""}){const[a,i]=u.useState(!1),o=u.useRef(null);u.useEffect(()=>{if(!a)return;const d=f=>{o.current&&!o.current.contains(f.target)&&i(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[a]);const c=t.find(d=>d.value===e);return n.jsxs("div",{ref:o,className:`relative ${l}`,children:[n.jsxs("button",{type:"button",onClick:()=>i(d=>!d),"aria-haspopup":"menu","aria-expanded":a,className:"flex items-center gap-[4px] rounded-[12px] border border-neutral-20 bg-white py-[8px] pl-[12px] pr-[8px] text-body-2-medium text-neutral-60",children:[c==null?void 0:c.label,n.jsx(S,{name:a?"chevron-up":"chevron-down",size:24})]}),a&&n.jsx("div",{className:`absolute top-[calc(100%+8px)] z-10 min-w-full ${r==="right"?"right-0":"left-0"}`,children:n.jsx(So,{children:t.map(d=>n.jsx(Xr,{onClick:()=>{s(d.value),i(!1)},children:d.label},d.value))})})]})}const d7=[{value:"recent",label:"최신 생성순"},{value:"alpha",label:"가나다순"}];function x7(){const e=ne(),[t,s]=u.useState([]),[r,l]=u.useState("recent"),[a,i]=u.useState(!0),[o,c]=u.useState(""),d=async()=>{i(!0),c("");try{const{sets:p}=await Ro();s(p)}catch(p){c(ee(p).message)}finally{i(!1)}};u.useEffect(()=>{d()},[]);const f=r==="alpha"?[...t].sort((p,h)=>p.title.localeCompare(h.title,"ko")):t;return n.jsxs("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("button",{type:"button",onClick:()=>e("/questions"),"aria-label":"뒤로",className:"shrink-0",children:n.jsx(S,{name:"arrow-left",size:32,className:"text-neutral-100"})}),n.jsx("h1",{className:"text-heading-4-semibold text-neutral-100",children:"질문 보관함"})]}),a?n.jsxs("div",{className:"py-[80px] text-center",children:[n.jsx("div",{className:"mx-auto h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsx("p",{className:"mt-[16px] text-body-2-medium text-neutral-60",children:"불러오는 중…"})]}):o?n.jsxs("div",{className:"mt-[48px] rounded-[16px] border border-dashed border-danger-20 bg-danger-5 py-[40px] text-center text-body-3-medium text-danger-60",children:[o,n.jsx("button",{onClick:d,className:"ml-[8px] underline",children:"다시 시도"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mt-[56px] flex items-center justify-between",children:[n.jsxs("p",{className:"flex items-center gap-[6px] text-body-2-medium",children:[n.jsx("span",{className:"text-neutral-60",children:"전체"}),n.jsxs("span",{className:"text-body-2-semibold text-primary-60",children:[t.length,"개"]})]}),n.jsx(u7,{value:r,options:d7,onChange:l})]}),f.length===0?n.jsx("p",{className:"mt-[28px] text-body-2-medium text-neutral-50",children:"표시할 질문 보관함이 없어요."}):n.jsx("div",{className:"mt-[28px] grid grid-cols-2 gap-[16px]",children:f.map(p=>n.jsx(dd,{set:p},p.setId))})]})]})}function un({selected:e=!1,children:t,className:s="",...r}){return n.jsx("button",{type:"button","aria-pressed":e,className:`inline-flex h-[40px] items-center justify-center rounded-full px-[14px] transition-colors ${e?"bg-primary-60 text-white text-body-2-semibold":"bg-neutral-10 text-neutral-50 text-body-2-medium hover:bg-neutral-20"} ${s}`,...r,children:t})}const p7=[{icon:"file-upload",title:"생기부 업로드",desc:"나의 생기부를 올려요"},{icon:"file-search",title:"AI 분석",desc:"활동과 지원 정보를 분석해요"},{icon:"chat-feedback-primary",title:"질문 생성",desc:"내 맞춤 면접 질문을 만들어요"},{icon:"layer",title:"질문 관리",desc:"중요 질문을 모아 대비해요"}],ir=[{title:"서울대학교 · 컴퓨터공학부",university:"서울대학교",track:"학생부종합",keywords:["수학 성적 향상","과학탐구실험","SW 동아리"],count:20,date:"2026.07.02"},{title:"연세대학교 · 컴퓨터공학과",university:"연세대학교",track:"학생부종합",keywords:["미적분 심화","정보 동아리","진로 독서"],count:17,date:"2026.07.01"},{title:"서강대학교 · 컴퓨터공학과",university:"서강대학교",track:"학생부종합",keywords:["알고리즘 탐구","물리 세특","자율 동아리"],count:21,date:"2026.06.28"},{title:"컴퓨터공학부 면접 연습",track:"논술전형",keywords:["데이터 분석 프로젝트","수학 세특","학급 임원"],count:24,date:"2026.06.27"}];function or({title:e,university:t,track:s,keywords:r,count:l,date:a}){return n.jsxs("div",{className:"flex flex-1 flex-col gap-[24px] rounded-[24px] bg-neutral-5 px-[28px] pb-[24px] pt-[28px]",children:[n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[t?n.jsx(Sn,{university:t,size:64}):n.jsx("div",{className:"flex size-[64px] shrink-0 items-center justify-center rounded-[16px] border border-neutral-10 bg-white",children:n.jsx(V,{name:"major",size:48})}),n.jsxs("div",{className:"flex flex-col items-start gap-[8px]",children:[n.jsx("p",{className:"whitespace-nowrap text-body-2-semibold text-neutral-95",children:e}),n.jsx("span",{className:"inline-flex items-center rounded-[12px] bg-primary-10 px-[8px] py-[3px] text-caption-medium text-primary-60",children:s})]})]}),n.jsx("div",{className:"flex items-center gap-[8px]",children:r.map(i=>n.jsxs("span",{className:"whitespace-nowrap rounded-[12px] border border-neutral-10 bg-white px-[10px] py-[6px] text-caption-medium text-neutral-80",children:["# ",i]},i))})]}),n.jsxs("div",{className:"flex w-full items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-[4px]",children:[n.jsx("span",{className:"text-body-3-medium text-neutral-70",children:"질문"}),n.jsxs("span",{className:"text-body-3-semibold text-primary-60",children:[l,"개"]})]}),n.jsx("span",{className:"text-body-3-medium text-neutral-50",children:a})]})]})}const D2=[{tab:"교과 성적",chipLabel:"교과",chipColor:"pink",question:"수학 시간에 진행한 탐구 활동에서 가장 흥미로웠던 발견은 무엇인가요?",evalPoint:"문제를 스스로 정의하는 능력, 팀 안에서의 구체적 기여, 결과보다 과정에서의 학습, 그리고 전공 적합성으로의 연결을 봅니다.",exampleAnswer:"미적분 단원에서 함수의 극값 조건을 공부하던 중, 신호 처리에서도 비슷한 패턴이 쓰인다는 것을 발견했습니다. 교과서 밖의 개념을 직접 찾아보고 연결해보는 과정이 인상 깊었고, 이후 수학이 단순한 계산이 아니라 현실 문제를 모델링하는 도구라는 시각을 갖게 됐습니다.",followups:[{question:"그 문제를 해결하는 과정에서 본인의 역할은 무엇이었나요?",direction:"방향 · 팀 기여의 구체성과 책임 범위를 확인합니다.",answer:"저는 알고리즘의 전제 조건을 점검하는 역할을 맡아, 예외 데이터를 분류하는 테스트 케이스를 직접 설계했습니다. 팀원들이 로직을 수정할 때 어떤 입력에서 오류가 나는지 함께 확인할 수 있도록 기준을 만든 것이 제 기여였습니다."},{question:"결과를 수치로 말했는데, 그 수치는 어떻게 측정했나요?",direction:"방향 · 주장에 대한 근거와 검증 태도를 봅니다.",answer:"동일한 입력에 대해 기존 방식과 제가 설계한 방식을 각각 열 번씩 실행해 평균 처리 시간을 비교했습니다. 측정 환경을 똑같이 맞추고 이상치를 제외한 뒤 평균을 낸 값이라, 단순한 체감이 아니라 근거 있는 수치라고 말할 수 있습니다."},{question:"같은 프로젝트를 다시 한다면 무엇을 다르게 하겠어요?",direction:"방향 · 메타인지와 성장 가능성을 확인합니다.",answer:"처음부터 테스트 케이스를 더 촘촘하게 정의하고 시작하겠습니다. 후반에 예외 상황을 발견해 구조를 바꾸느라 시간을 많이 썼는데, 실패할 수 있는 경우를 먼저 적어두면 설계가 훨씬 단단해진다는 걸 배웠습니다."}]},{tab:"세부능력 및 특기사항",chipLabel:"세특",chipColor:"orange",question:"생명과학 세특에서 다룬 탐구 중 가장 기억에 남는 실험은 무엇인가요?",evalPoint:"탐구 동기의 진정성, 실험 설계의 논리성, 데이터 해석의 객관성, 그리고 전공으로의 연결성을 봅니다.",exampleAnswer:"효소 활성에 온도가 미치는 영향을 확인하는 실험에서, 예상과 달리 특정 구간에서 활성이 급격히 떨어지는 결과를 얻었습니다. 단순히 오차로 넘기지 않고 변성 온도라는 개념을 찾아 연결해보며, 생명 현상을 조건 변화의 관점에서 해석하는 시각을 기를 수 있었습니다.",followups:[{question:"실험 결과가 예상과 달랐을 때 어떻게 대처했나요?",direction:"방향 · 문제 상황에서의 태도와 해결 과정을 확인합니다.",answer:"먼저 측정 과정을 다시 점검해 오차 요인을 배제한 뒤, 교과서 밖 자료에서 변성 온도 개념을 찾아 결과를 재해석했습니다. 결과를 부정하기보다 원인을 설명할 수 있는 가설을 세우는 데 집중했습니다."},{question:"이 탐구가 지원 전공과 어떻게 연결된다고 생각하나요?",direction:"방향 · 전공 적합성과 탐구의 확장 가능성을 봅니다.",answer:"조건 변화에 따른 반응을 정량적으로 분석한 경험은 생명 데이터를 다루는 전공 학습의 기초가 된다고 생각합니다. 앞으로 효소 반응을 수학적으로 모델링하는 것까지 공부해보고 싶습니다."},{question:"함께한 친구들과 역할은 어떻게 나눴나요?",direction:"방향 · 협업 안에서의 기여와 소통 방식을 확인합니다.",answer:"저는 데이터 기록과 그래프 작성을 맡아 결과를 시각화했고, 실험 조건을 통제하는 역할의 친구와 수시로 결과를 공유하며 오차를 줄였습니다."}]},{tab:"창의적 체험활동",chipLabel:"창체",chipColor:"green",question:"SW 동아리에서 진행한 프로젝트 중 가장 도전적이었던 부분은 무엇이었나요?",evalPoint:"문제 정의의 주도성, 협업 안에서의 기여, 시행착오를 통한 학습, 그리고 전공 역량으로의 연결을 봅니다.",exampleAnswer:"교내 분실물을 등록·검색하는 웹 서비스를 만들면서, 사진만으로 물건을 찾도록 하는 기능 구현이 가장 어려웠습니다. 처음엔 막막했지만 비슷한 이미지 검색 사례를 조사하고 단순화한 방식으로 직접 구현해보며, 완벽함보다 동작하는 결과를 먼저 만드는 태도를 배웠습니다.",followups:[{question:"협업 과정에서 의견 충돌은 어떻게 조율했나요?",direction:"방향 · 갈등 상황에서의 소통과 조율 능력을 봅니다.",answer:"기능 우선순위를 두고 의견이 갈렸을 때, 각자 주장하는 기능의 예상 사용 빈도를 짧게 조사해 데이터를 근거로 결정했습니다. 감정이 아니라 기준으로 이야기하니 합의가 빨라졌습니다."},{question:"기술적으로 막혔을 때 어떻게 해결했나요?",direction:"방향 · 문제 해결 전략과 학습 태도를 확인합니다.",answer:"공식 문서와 오픈소스 예제를 먼저 살펴 문제를 작게 쪼갠 뒤, 가장 단순한 버전부터 동작시키고 점진적으로 기능을 더했습니다. 한 번에 완성하려 하지 않은 것이 핵심이었습니다."},{question:"이 프로젝트에서 본인이 가장 성장한 점은 무엇인가요?",direction:"방향 · 메타인지와 성장 가능성을 확인합니다.",answer:"처음엔 코드를 잘 짜는 것이 전부라고 생각했는데, 사용자의 진짜 불편을 정의하는 일이 더 중요하다는 걸 배웠습니다. 기술을 문제 해결의 수단으로 바라보게 됐습니다."}]}],f7=[{icon:"idea",label:"답변 팁"},{icon:"layer",label:"답변 전략"},{icon:"target",label:"질문 의도"},{icon:"file-search",label:"생기부 활용 근거"}];function m7({index:e,question:t,direction:s,answer:r,open:l,onToggle:a}){return n.jsxs("button",{type:"button",onClick:a,"aria-expanded":l,className:"flex w-full flex-col gap-[16px] rounded-[20px] bg-neutral-5 p-[24px] text-left",children:[n.jsxs("div",{className:"flex w-full items-center justify-between gap-[12px]",children:[n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex w-full items-center gap-[12px]",children:[n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center rounded-[8px] bg-primary-60 text-body-3-semibold text-white",children:e+1}),n.jsx("p",{className:"flex-1 text-body-2-semibold text-neutral-90",children:t})]}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:s})]}),n.jsx(S,{name:l?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsx("p",{className:"text-body-2-medium text-neutral-95",children:r})]})]})}function h7(){const e=ne(),t=()=>{window.scrollTo({top:0}),e("/login?tab=signup")},[s,r]=u.useState(0),[l,a]=u.useState(0),i=D2[s],o=c=>{r(c),a(0)};return n.jsx("div",{className:"mx-auto max-w-[1280px] px-[40px] pb-[120px] pt-[80px]",children:n.jsxs("div",{className:"flex flex-col gap-[128px]",children:[n.jsxs("section",{className:"flex flex-col items-center gap-[48px] rounded-[36px] bg-primary-60 pb-[64px] pt-[72px]",children:[n.jsxs(je,{className:"flex flex-col items-center gap-[16px]",children:[n.jsx("span",{className:"inline-flex h-[34px] items-center rounded-[20px] bg-primary-5 px-[10px] text-body-2-semibold text-primary-60",children:"면접 질문"}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsxs("h1",{className:"text-heading-1-semibold text-white",children:["생기부 하나로",n.jsx("br",{}),"맞춤 면접 질문이 만들어져요"]}),n.jsxs("p",{className:"text-body-2-regular text-neutral-5",children:["생기부를 올리면 지원 대학에 맞는",n.jsx("br",{}),"예상 질문을 바로 확인할 수 있어요"]})]})]}),n.jsxs(je,{delay:150,className:"flex w-[800px] flex-col gap-[16px] drop-shadow-[0px_2px_5px_rgba(0,0,0,0.15)]",children:[n.jsxs("div",{className:"flex w-full gap-[16px]",children:[n.jsx(or,{...ir[0]}),n.jsx(or,{...ir[1]})]}),n.jsxs("div",{className:"flex w-full gap-[16px]",children:[n.jsx(or,{...ir[2]}),n.jsx(or,{...ir[3]})]})]})]}),n.jsx(je,{children:n.jsxs("section",{className:"flex flex-col items-center gap-[28px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("h2",{className:"text-heading-3-semibold text-neutral-100",children:"이렇게 만들어져요"}),n.jsx("p",{className:"text-body-1-regular text-neutral-70",children:"생기부만 올리면 나만의 예상 질문이 준비돼요"})]}),n.jsx("div",{className:"flex w-full items-center justify-center gap-[12px]",children:p7.map((c,d)=>n.jsxs(u.Fragment,{children:[d>0&&n.jsx(S,{name:"arrow-right",size:32,className:"shrink-0 text-primary-40"}),n.jsxs("div",{className:"flex h-[240px] flex-1 flex-col items-center justify-center gap-[16px] rounded-[28px] bg-neutral-5 py-[28px]",children:[n.jsx("div",{className:"flex size-[56px] items-center justify-center rounded-[12px] bg-neutral-5",children:n.jsx(V,{name:c.icon,size:48})}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:c.title}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:c.desc})]})]})]},c.title))})]})}),n.jsx(je,{children:n.jsxs("section",{className:"flex flex-col items-center gap-[28px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("h2",{className:"text-heading-3-semibold text-neutral-100",children:"내가 받을 예상 질문, 미리 보기"}),n.jsx("p",{className:"text-body-1-regular text-neutral-70",children:"생기부를 올리면 이런 질문과 답변 가이드를 받을 수 있어요. 영역을 눌러 확인해보세요."})]}),n.jsxs("div",{className:"flex w-full flex-col items-center gap-[28px]",children:[n.jsx("div",{className:"flex items-center justify-center gap-[12px]",children:D2.map((c,d)=>n.jsx(un,{selected:s===d,onClick:()=>o(d),children:c.tab},c.tab))}),n.jsxs("div",{className:"flex w-full flex-col gap-[28px] rounded-[32px] border border-neutral-20 px-[40px] pb-[36px] pt-[40px] shadow-[0px_2px_6px_0px_rgba(0,0,0,0.08)]",children:[n.jsxs("div",{className:"flex flex-col items-start gap-[12px]",children:[n.jsx(Ae,{color:i.chipColor,size:"small",children:i.chipLabel}),n.jsx("p",{className:"text-heading-4-semibold text-neutral-90",children:i.question})]}),n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsxs("div",{className:"flex flex-col items-start gap-[32px]",children:[n.jsxs("div",{className:"flex w-full flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:"puzzle",size:24}),n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:"면접관 평가 포인트"})]}),n.jsx("div",{className:"h-px w-full bg-neutral-10"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:i.evalPoint})]}),n.jsxs("div",{className:"flex w-full flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:"thumb-up",size:24}),n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:"예시 답변"})]}),n.jsx("div",{className:"w-full border-l-[6px] border-primary-30 bg-primary-5 px-[24px] py-[16px]",children:n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:i.exampleAnswer})})]}),n.jsxs("div",{className:"flex w-full flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:"chat-feedback",size:24}),n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:"예상 꼬리질문"}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:"실제 면접에선 답변 뒤에 이런 질문이 이어질 수 있어요. 먼저 스스로 답해보고, 눌러서 예시 답변을 확인하세요."})]})]}),i.followups.map((c,d)=>n.jsx(m7,{index:d,question:c.question,direction:c.direction,answer:c.answer,open:l===d,onToggle:()=>a(l===d?null:d)},c.question))]})]}),n.jsxs("div",{className:"flex w-full flex-col items-center gap-[28px] rounded-[28px] bg-primary-5 px-[40px] pb-[40px] pt-[56px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[12px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[16px]",children:[n.jsx(Lo,{size:40}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-heading-4-bold text-neutral-100",children:"분석은 여기서 끝이 아니에요"}),n.jsx("p",{className:"text-body-2-regular text-neutral-70",children:"질문 의도, 생기부 활용 근거, 답변 전략, 답변 팁까지 — 질문마다 전체 분석을 제공해요."})]})]}),n.jsx("div",{className:"flex items-start justify-center gap-[8px]",children:f7.map(c=>n.jsxs("div",{className:"flex items-center gap-[4px] rounded-[20px] border border-primary-10 bg-white py-[6px] pl-[10px] pr-[12px]",children:[n.jsx(V,{name:c.icon,size:24}),n.jsx("span",{className:"text-body-3-semibold text-neutral-70",children:c.label})]},c.label))})]}),n.jsx($,{variant:"primary",size:"large",onClick:t,children:"내 생기부로 분석받기"})]})]})]})]})}),n.jsx(je,{children:n.jsxs("section",{className:"flex flex-col items-center gap-[40px] rounded-[36px] bg-primary-60 pb-[64px] pt-[72px]",children:[n.jsxs("h2",{className:"text-center text-heading-2-bold text-white",children:["아직 면접 질문, 어디서 시작할지 막막하신가요?",n.jsx("br",{}),"생기부만 올리면 카리면접이 다 준비해드려요"]}),n.jsx($,{variant:"gray",size:"large",className:"!bg-white hover:!bg-neutral-5",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:t,children:"회원가입하고 시작하기"})]})})]})})}function md({value:e,className:t=""}){const s=Math.max(0,Math.min(100,e));return n.jsx("div",{role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,className:`h-[12px] w-full overflow-hidden rounded-full bg-white ${t}`,children:n.jsx("div",{className:"h-full rounded-full bg-primary-50 transition-[width] duration-200 ease-linear",style:{width:`${s}%`}})})}const g7=[{icon:"clipboard-check",title:"면접 시작",desc:`방식과 난이도를 골라 연습을 시작해요`},{icon:"microphone",title:"실전 면접 연습",desc:"꼬리질문까지 이어지는 질문에 답해요"},{icon:"chart",title:"결과 및 피드백 확인",desc:`잘한 점과 보완할 점을 확인해요`},{icon:"target",title:"약점 집중 연습",desc:`보완하면 좋을 부분을 다시 연습해요`}],C7=[{icon:"target",label:"합격 예상"},{icon:"idea",label:"답변 팁"},{icon:"thumb-up",label:"예시 답변"},{icon:"file-search",label:"약점 집중 연습"}],ca={name:"면접관",sub:"서울대학교 컴퓨터공학부 모의면접",university:"서울대학교"};function A2({text:e}){return n.jsxs("div",{className:"flex w-full items-start gap-[12px]",children:[n.jsx(Sn,{university:ca.university,size:48}),n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-[8px]",children:[n.jsxs("div",{className:"flex flex-col items-start",children:[n.jsx("p",{className:"text-body-3-semibold text-neutral-100",children:ca.name}),n.jsx("p",{className:"text-caption-medium text-neutral-70",children:ca.sub})]}),n.jsx("div",{className:"rounded-bl-[20px] rounded-br-[20px] rounded-tr-[20px] border border-primary-10 bg-white p-[16px] drop-shadow-[0px_0px_3px_rgba(180,152,216,0.1)]",children:n.jsx("p",{className:"text-body-3-medium text-neutral-90",children:e})})]})]})}function y7(){return n.jsxs("div",{className:"flex w-[800px] flex-col overflow-clip rounded-[32px] drop-shadow-[0px_2px_5px_rgba(0,0,0,0.15)]",children:[n.jsxs("div",{className:"flex w-full flex-col gap-[32px] bg-primary-5 px-[36px] py-[32px]",children:[n.jsxs("div",{className:"flex w-full flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px] text-body-3-semibold text-neutral-60",children:[n.jsx("span",{children:"면접 진행"}),n.jsxs("span",{children:[n.jsx("span",{className:"text-primary-60",children:"2 "}),"/ 8"]})]}),n.jsx(md,{value:43,className:"!h-[8px]"})]}),n.jsxs("div",{className:"flex w-full flex-col items-end gap-[16px]",children:[n.jsx(A2,{text:"생기부를 보니까 과학 동아리 활동을 굉장히 열심히 하신 것 같은데, 활동 중 가장 기억에 남는 프로젝트를 하나 골라 설명해 주세요."}),n.jsx("div",{className:"flex w-full flex-col items-end",children:n.jsx("div",{className:"w-[642px] rounded-bl-[20px] rounded-br-[20px] rounded-tl-[20px] border border-primary-10 bg-primary-50 p-[16px] drop-shadow-[0px_0px_3px_rgba(180,152,216,0.1)]",children:n.jsx("p",{className:"text-body-3-medium text-white",children:"가장 기억에 남는 프로젝트는 아두이노를 활용한 스마트 화분 제작 활동입니다. 토양 습도에 따라 자동으로 물을 공급하는 시스템을 구현했는데, 센서 오류를 해결하며 문제 해결 과정의 중요성을 배울 수 있었습니다."})})}),n.jsx(A2,{text:"센서 오류를 해결했다고 했는데, 당시 어떤 문제가 있었고 구체적으로 어떻게 해결했나요?"})]})]}),n.jsx("div",{className:"flex w-full flex-col items-center bg-white px-[120px] py-[20px] drop-shadow-[0px_2px_5px_rgba(0,0,0,0.15)]",children:n.jsxs("div",{className:"flex flex-col items-center gap-[8px]",children:[n.jsx("div",{className:"flex size-[44px] items-center justify-center rounded-full bg-neutral-10",children:n.jsx(V,{name:"microphone",size:32})}),n.jsx("p",{className:"text-body-3-medium text-neutral-70",children:"마이크를 누르고 소리내어 답해보세요"})]})})]})}function v7({onCta:e}){return n.jsxs("div",{className:"flex w-full flex-col gap-[28px] rounded-[32px] border border-neutral-20 px-[40px] pb-[36px] pt-[40px] shadow-[0px_2px_6px_0px_rgba(0,0,0,0.08)]",children:[n.jsxs("div",{className:"flex w-full flex-col gap-[20px]",children:[n.jsx("h3",{className:"text-heading-4-semibold text-neutral-100",children:"이번 면접 연습 요약"}),n.jsxs("div",{className:"flex w-full flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex w-full flex-col gap-[8px] rounded-[16px] bg-success-5 px-[24px] py-[26px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"shrink-0 rounded-[20px] bg-success-50 px-[8px] py-[2px] text-body-2-semibold text-white",children:"잘한 점 1"}),n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:"문제 해결 경험 구체적으로 설명하기"})]}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:'"무엇을 했다"가 아니라 어떤 문제를 어떻게 해결했는지까지 보여줘 전공 적합성이 자연스럽게 드러났어요.'})]}),n.jsxs("div",{className:"flex w-full flex-col gap-[12px] rounded-[16px] bg-warning-5 px-[24px] py-[26px]",children:[n.jsxs("div",{className:"flex w-full flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"shrink-0 rounded-[20px] bg-warning-40 px-[8px] py-[2px] text-body-2-semibold text-white",children:"보완할 점 1"}),n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:"본인의 판단 근거 더 명확히 설명하기"})]}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:'"평균값을 사용했다", "기준값을 조정했다"는 설명은 있었지만 왜 그런 판단을 했는지에 대한 근거가 조금 더 드러나면 좋아요.'})]}),n.jsxs("div",{className:"flex items-center gap-[4px]",children:[n.jsx("span",{className:"text-body-2-medium text-neutral-60",children:"예시보기"}),n.jsx(S,{name:"chevron-down",size:24,className:"text-neutral-60"})]})]})]})]}),n.jsxs("div",{className:"flex w-full flex-col gap-[20px]",children:[n.jsx("h3",{className:"text-heading-4-semibold text-neutral-100",children:"문항별 다시보기"}),n.jsxs("div",{className:"flex w-full flex-col gap-[16px]",children:[n.jsxs("div",{className:"flex w-full flex-col gap-[12px] rounded-[20px] bg-neutral-5 px-[28px] py-[24px]",children:[n.jsxs("div",{className:"flex flex-1 items-center gap-[8px]",children:[n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center rounded-full bg-neutral-80 text-body-2-semibold text-white",children:"1"}),n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:"생기부를 보니 과학 동아리에서 아두이노를 활용한 스마트 화분 제작 활동을 했네요. 어떤 프로젝트였는지 설명해 주세요."})]}),n.jsxs("div",{className:"flex flex-wrap items-start gap-[8px]",children:[n.jsx(Ae,{color:"green",size:"small",children:"강점 먼저 제시"}),n.jsx(Ae,{color:"yellow",size:"small",children:"핵심 압축"})]})]}),n.jsxs("div",{className:"flex w-full flex-col gap-[12px] rounded-[20px] bg-neutral-5 px-[28px] py-[24px]",children:[n.jsxs("div",{className:"flex flex-1 items-center gap-[8px]",children:[n.jsxs("span",{className:"flex shrink-0 items-center gap-[4px]",children:[n.jsx("span",{className:"flex size-[24px] items-center justify-center rounded-full bg-neutral-80 text-body-2-semibold text-white",children:"1"}),n.jsx("span",{className:"text-body-1-semibold text-neutral-80",children:"-"}),n.jsx("span",{className:"text-body-1-semibold text-neutral-80",children:"1"})]}),n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:"센서값이 일정하지 않았다고 했는데, 그 원인이 무엇이라고 생각했나요?"})]}),n.jsxs("div",{className:"flex flex-wrap items-start gap-[8px]",children:[n.jsx(Ae,{color:"green",size:"small",children:"경험 구체적 설명"}),n.jsx(Ae,{color:"yellow",size:"small",children:"본인 역할 설명"}),n.jsx(Ae,{color:"yellow",size:"small",children:"근거 구체화"})]})]})]})]}),n.jsxs("div",{className:"flex w-full flex-col items-center gap-[28px] rounded-[28px] bg-primary-5 px-[40px] pb-[40px] pt-[56px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[12px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[16px]",children:[n.jsx(Lo,{size:40}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-heading-4-bold text-neutral-100",children:"분석은 여기서 끝이 아니에요"}),n.jsx("p",{className:"text-body-2-regular text-neutral-70",children:"질문 의도, 생기부 활용 근거, 답변 전략, 답변 팁까지 — 질문마다 전체 분석을 제공해요."})]})]}),n.jsx("div",{className:"flex items-start justify-center gap-[8px]",children:C7.map(t=>n.jsxs("div",{className:"flex items-center gap-[4px] rounded-[20px] border border-primary-10 bg-white py-[6px] pl-[10px] pr-[12px]",children:[n.jsx(V,{name:t.icon,size:24}),n.jsx("span",{className:"text-body-3-semibold text-neutral-70",children:t.label})]},t.label))})]}),n.jsx($,{variant:"primary",size:"large",onClick:e,children:"내 생기부로 연습하기"})]})]})}function j7(){const e=ne(),t=()=>{window.scrollTo({top:0}),e("/login?tab=signup")};return n.jsx("div",{className:"mx-auto max-w-[1280px] px-[40px] pb-[120px] pt-[80px]",children:n.jsxs("div",{className:"flex flex-col gap-[128px]",children:[n.jsxs("section",{className:"flex flex-col items-center gap-[48px] rounded-[36px] bg-primary-80 pb-[64px] pt-[72px]",children:[n.jsxs(je,{className:"flex flex-col items-center gap-[16px]",children:[n.jsx("span",{className:"inline-flex h-[34px] items-center rounded-[20px] bg-primary-5 px-[10px] text-body-2-semibold text-primary-80",children:"면접 연습"}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsxs("h1",{className:"text-heading-1-semibold text-white",children:["꼬리질문까지,",n.jsx("br",{}),"진짜 면접처럼 연습해봐요"]}),n.jsxs("p",{className:"text-body-2-regular text-neutral-5",children:["텍스트·음성으로 실전처럼 답하면 꼬리질문까지 이어지고",n.jsx("br",{}),"어디가 약한지 바로 짚어줘요"]})]})]}),n.jsx(je,{delay:150,children:n.jsx(y7,{})})]}),n.jsx(je,{children:n.jsxs("section",{className:"flex flex-col items-center gap-[28px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("h2",{className:"text-heading-3-semibold text-neutral-100",children:"이렇게 연습해요"}),n.jsx("p",{className:"text-body-1-regular text-neutral-70",children:"실전처럼 답하고, 약점을 찾아 다시 채우는 흐름이에요"})]}),n.jsx("div",{className:"flex w-full items-center justify-center gap-[12px]",children:g7.map((s,r)=>n.jsxs(u.Fragment,{children:[r>0&&n.jsx(S,{name:"arrow-right",size:32,className:"shrink-0 text-primary-40"}),n.jsxs("div",{className:"flex h-[240px] flex-1 flex-col items-center justify-center gap-[16px] rounded-[28px] bg-neutral-5 py-[28px]",children:[n.jsx("div",{className:"flex size-[56px] items-center justify-center rounded-[12px] bg-neutral-5",children:n.jsx(V,{name:s.icon,size:44})}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:s.title}),n.jsx("p",{className:"whitespace-pre-line text-body-2-medium text-neutral-60",children:s.desc})]})]})]},s.title))})]})}),n.jsx(je,{children:n.jsxs("section",{className:"flex flex-col items-center gap-[28px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("h2",{className:"text-heading-3-semibold text-neutral-100",children:"면접 연습 결과는 이렇게 볼 수 있어요"}),n.jsx("p",{className:"text-body-1-regular text-neutral-70",children:"잘한 점과 보완할 점을 짚고, 문항마다 평가 태그로 다시 정리해줘요"})]}),n.jsx(v7,{onCta:t})]})}),n.jsx(je,{children:n.jsxs("section",{className:"flex flex-col items-center gap-[40px] rounded-[36px] bg-primary-80 pb-[64px] pt-[72px]",children:[n.jsxs("h2",{className:"text-center text-heading-2-bold text-white",children:["답은 머릿속에 있는데, 막상 말로는 잘 안 나오시나요?",n.jsx("br",{}),"카리 면접으로 실전처럼 연습하고, 약한 부분을 다듬어보세요"]}),n.jsx($,{variant:"gray",size:"large",className:"!bg-white hover:!bg-neutral-5",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:t,children:"회원가입하고 시작하기"})]})})]})})}const w7={성적:"pink",세특:"orange",창체:"green",행특:"purple",연계:"blue",기타:"gray"};function Mn({icon:e,label:t,desc:s,divider:r=!0}){return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:e,size:24}),n.jsx("p",{className:"text-body-3-semibold text-neutral-90",children:t}),s&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:s})]}),r&&n.jsx("div",{className:"h-px w-full bg-neutral-10"})]})}function F2({items:e}){return n.jsx("div",{className:"flex flex-col gap-[6px] py-[8px]",children:e.map((t,s)=>n.jsxs("div",{className:"flex items-start gap-[10px]",children:[n.jsx("span",{className:"mt-[9px] size-[6px] shrink-0 rounded-full bg-primary-50"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:t})]},s))})}function O2({children:e,semibold:t=!1}){return n.jsx("div",{className:"flex w-full items-center border-l-[6px] border-primary-30 bg-primary-5 px-[24px] py-[16px]",children:n.jsx("p",{className:`${t?"text-body-2-semibold":"text-body-2-medium"} text-neutral-90`,children:e})})}function N7({no:e,item:t}){const[s,r]=u.useState(e===1);return n.jsxs("div",{className:"flex flex-col gap-[16px] rounded-[20px] bg-neutral-5 p-[24px]",children:[n.jsxs("button",{type:"button",onClick:()=>r(l=>!l),className:"flex w-full items-center justify-between gap-[8px] text-left",children:[n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center rounded-[8px] bg-primary-60 text-body-3-semibold text-white",children:e}),n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:t.q})]}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:t.dir})]}),n.jsx(S,{name:s?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsx("p",{className:"text-body-2-medium text-neutral-95",children:t.a})]})]})}function hd({question:e,expanded:t,onToggle:s,onBookmark:r,subtitle:l,stackedHeader:a=!1}){const i=e,o=Ll(i.category),c=i.strategy??i.answerPoints,d=i.strategyBullets??[],f=i.followups??[],p=i.tips??[],h=i.isNew&&n.jsx("span",{className:"ml-[12px] inline-flex h-[22px] items-center rounded-[8px] bg-primary-60 px-[6px] align-middle text-caption-medium text-white",children:"NEW"}),y=n.jsx(Ae,{color:w7[i.category]??"gray",size:"small",children:o.label});return n.jsxs("div",{className:"rounded-[20px] bg-neutral-5 px-[28px] py-[24px]",children:[n.jsxs("button",{type:"button",onClick:s,className:"flex w-full items-center gap-[16px] text-left",children:[a?n.jsxs("div",{className:"flex flex-1 flex-col gap-[12px]",children:[n.jsxs("p",{className:"text-body-1-semibold text-neutral-90",children:[i.content,h]}),n.jsxs("div",{className:"flex items-center gap-[12px]",children:[y,l&&n.jsx("span",{className:"text-body-3-medium text-neutral-60",children:l})]})]}):n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-start gap-[12px]",children:[y,n.jsxs("p",{className:"flex-1 text-body-1-semibold text-neutral-90",children:[i.content,h]})]}),l&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:l})]}),n.jsx(S,{name:t?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),t&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mt-[24px] flex flex-col gap-[32px] rounded-[20px] bg-white px-[28px] py-[24px]",children:[i.purpose&&n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Mn,{icon:"target",label:"질문 의도"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:i.purpose})]}),i.evaluationCriteria&&n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Mn,{icon:"puzzle",label:"면접관 평가 포인트"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:i.evaluationCriteria})]}),i.basis&&n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Mn,{icon:"file-search",label:"생기부 활용 근거"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:i.basis})]}),(c||d.length>0)&&n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Mn,{icon:"layer",label:"답변 전략",divider:!1}),c&&n.jsx(O2,{children:c}),d.length>0&&n.jsx(F2,{items:d})]}),i.modelAnswer&&n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Mn,{icon:"thumb-up",label:"예시 답변",divider:!1}),n.jsx(O2,{semibold:!0,children:i.modelAnswer})]}),f.length>0&&n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Mn,{icon:"chat-feedback",label:"예상 꼬리질문",desc:"실제 면접에선 답변 뒤에 이런 질문이 이어질 수 있어요. 먼저 스스로 답해보고, 눌러서 예시 답변을 확인하세요.",divider:!1}),f.map((v,C)=>n.jsx(N7,{no:C+1,item:v},C))]}),p.length>0&&n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsx(Mn,{icon:"idea",label:"답변 팁"}),n.jsx(F2,{items:p})]})]}),n.jsx("div",{className:"mt-[16px] flex justify-end",children:n.jsxs("button",{type:"button",onClick:r,"aria-pressed":i.isBookmarked,className:`flex h-[36px] items-center gap-[4px] rounded-[20px] pl-[10px] pr-[12px] transition-colors ${i.isBookmarked?"bg-primary-10 text-body-2-semibold text-primary-60":"border border-neutral-10 bg-white text-body-2-medium text-neutral-50"}`,children:[n.jsx(S,{name:"star-filled",size:20,className:i.isBookmarked?"text-primary-60":"text-neutral-30"}),"저장"]})})]})]})}const H2=e=>e?e.slice(0,10).replace(/-/g,"."):"",b7={성적:"교과 성적",세특:"세부능력 및 특기사항",창체:"창의적 체험활동",행특:"행동특성 및 종합의견",연계:"항목 간 연계",기타:"기타"};function k7(){const{id:e}=bo(),t=Number(e),s=ne(),[r,l]=u.useState([]),[a,i]=u.useState(null),[o,c]=u.useState(!0),[d,f]=u.useState(""),[p,h]=u.useState("전체"),[y,v]=u.useState(null),[C,w]=u.useState(""),[g,x]=u.useState(!1),[m,j]=u.useState(!1);u.useEffect(()=>{let A=!0;if(!t||Number.isNaN(t)){f("잘못된 질문 세트예요."),c(!1);return}return c(!0),Promise.all([Ni(t),Gx(t).catch(()=>[])]).then(([H,Z])=>{if(!A)return;const T=new Set(Z);l(H.map(k=>({...k,isNew:k.isNew||T.has(k.questionId)})))}).catch(H=>A&&f(ee(H).message)).finally(()=>A&&c(!1)),(async()=>{try{const H=await Ft();for(const Z of H.records){const T=await qn(Z.id),k=T.questionSets.find(z=>z.id===t);if(k){const z=pd(k);A&&i({title:k.title,school:z.school,dept:z.dept,appTypeFull:z.appTypeFull,filename:T.filename,recordDate:T.createdAt,setDate:k.createdAt??T.createdAt,recordId:Z.id});break}}}catch{}})(),()=>{A=!1}},[t]);const b=A=>{w(A),window.setTimeout(()=>w(""),2e3)},N=async A=>{try{const H=await Po(A.questionId);l(Z=>Z.map(T=>T.questionId===A.questionId?{...T,isBookmarked:H.isBookmarked}:T)),b(H.isBookmarked?"질문이 저장되었어요":"저장을 취소했어요")}catch(H){b(ee(H).message)}},E=async()=>{if(!a)return;x(!1),j(!0);const A=new Set(r.map(H=>H.questionId));try{await Yx(a.recordId,t,{title:a.title,target_school:a.school,target_major:a.dept,interview_type:a.appTypeFull,questions_per_category:zo});const H=await Ni(t);l(H.map(Z=>({...Z,isNew:Z.isNew||!A.has(Z.questionId)}))),h("전체"),b("질문을 추가 생성했어요")}catch(H){b(ee(H).message)}finally{j(!1)}},L=bi.filter(A=>r.some(H=>H.category===A)),D=[...p==="전체"?r:r.filter(A=>A.category===p)].sort((A,H)=>Number(H.isNew??!1)-Number(A.isNew??!1)),M=Object.fromEntries(bi.map(A=>[A,r.filter(H=>H.category===A).length])),P=a?fd(a.school,a.dept,a.appTypeFull):null,O=(P==null?void 0:P.title)??"맞춤 면접 질문",q=a&&[a.school,a.dept,a.appTypeFull.replace(/전형$/,"")].filter(Boolean).join(" ")||"동일한";return o?n.jsxs("div",{className:"mx-auto max-w-[1280px] px-[40px] py-[120px] text-center",children:[n.jsx("div",{className:"mx-auto h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsx("p",{className:"mt-[16px] text-body-2-medium text-neutral-60",children:"질문을 불러오고 있어요…"})]}):d?n.jsxs("div",{className:"mx-auto max-w-[1280px] px-[40px] py-[80px] text-center",children:[n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:d}),n.jsx("button",{onClick:()=>s("/questions"),className:"mt-[16px] inline-block text-body-3-semibold text-primary-60 underline",children:"질문 보관함으로 가기"})]}):n.jsxs("div",{className:"mx-auto max-w-[1280px] px-[40px] pt-[80px] pb-[120px]",children:[n.jsxs("button",{onClick:()=>s("/questions"),className:"mb-[56px] flex items-center gap-[8px] text-neutral-80 transition-colors hover:text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32}),n.jsx("span",{className:"text-body-1-semibold text-neutral-90",children:"질문 보관함"})]}),n.jsxs("div",{className:"mb-[40px] flex items-center justify-between gap-[56px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[(P==null?void 0:P.icon.kind)==="emblem"?n.jsx(Sn,{university:P.icon.university,size:68}):n.jsx("div",{className:"flex size-[68px] shrink-0 items-center justify-center rounded-[16px] border border-neutral-10 bg-white",children:n.jsx(V,{name:(P==null?void 0:P.icon.kind)==="color"?P.icon.name:"school",size:40})}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("p",{className:"text-heading-3-semibold text-neutral-95",children:O}),n.jsxs("div",{className:"flex flex-wrap items-center gap-[12px]",children:[(P==null?void 0:P.chipLabel)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"rounded-[12px] bg-primary-10 px-[8px] py-[3px] text-body-3-medium text-primary-60",children:P.chipLabel}),n.jsx("span",{className:"h-[14px] w-px bg-neutral-20"})]}),n.jsxs("div",{className:"flex items-center gap-[8px] text-body-3-medium text-neutral-60",children:[n.jsx("span",{children:"최근 생성"}),n.jsx("span",{children:H2(a==null?void 0:a.setDate)})]}),n.jsx("span",{className:"h-[14px] w-px bg-neutral-20"}),n.jsxs("p",{className:"text-body-3-medium text-neutral-60",children:["질문 ",r.length,"개"]}),(a==null?void 0:a.filename)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h-[14px] w-px bg-neutral-20"}),n.jsxs("div",{className:"flex items-center gap-[4px]",children:[n.jsx(V,{name:"file",size:20}),n.jsxs("p",{className:"text-body-3-medium text-neutral-60",children:[a.filename,a.recordDate?` · ${H2(a.recordDate)} 등록`:""]})]})]})]})]})]}),n.jsx($,{variant:"primary",size:"medium",className:"shrink-0",onClick:()=>x(!0),trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"추가 질문 생성하기"})]}),n.jsxs("div",{className:"mb-[36px] flex w-full overflow-x-auto border-b-[1px] border-neutral-20",children:[n.jsx(Dt,{selected:p==="전체",number:r.length,onClick:()=>h("전체"),children:"전체"}),L.map(A=>n.jsx(Dt,{selected:p===A,number:M[A],onClick:()=>h(A),children:b7[A]??Ll(A).label},A))]}),n.jsx("div",{className:"flex flex-col gap-[12px]",children:D.map(A=>n.jsx(hd,{question:A,expanded:y===A.questionId,onToggle:()=>v(y===A.questionId?null:A.questionId),onBookmark:()=>N(A)},A.questionId))}),n.jsx(me,{open:g,onClose:()=>x(!1),title:n.jsxs(n.Fragment,{children:["동일한 학교·학과·전형으로",n.jsx("br",{}),"질문을 추가할까요?"]}),description:n.jsxs(n.Fragment,{children:[q," 조건으로",n.jsx("br",{}),"질문을 추가 생성해요."]}),cancelText:"아니오",confirmText:"추가하기",onConfirm:E}),m&&n.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center gap-[16px] bg-white/80",children:[n.jsx("div",{className:"h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:"추가 질문을 생성하고 있어요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-50",children:"약 20초 정도 걸려요"})]})]}),C&&n.jsx("div",{className:"fixed right-0 top-[88px] z-50",children:n.jsx(D1,{icon:n.jsx(S,{name:"circle-check-filled",className:"text-success-50 fill-white"}),children:C})})]})}function S7(e){return{questionId:e.questionId,content:e.content,category:e.category,difficulty:e.difficulty,purpose:e.purpose,answerPoints:e.answerPoints??"",modelAnswer:e.modelAnswer,evaluationCriteria:e.evaluationCriteria,isBookmarked:!0,basis:e.basis,strategy:e.strategy,strategyBullets:e.strategyBullets,followups:e.followups,tips:e.tips}}function L7(){const e=ne(),[t]=Mu(),[s,r]=u.useState([]),[l,a]=u.useState(new Set),[i,o]=u.useState({}),[c,d]=u.useState({}),[f,p]=u.useState(!0),[h,y]=u.useState(""),[v,C]=u.useState("all"),[w,g]=u.useState(""),[x,m]=u.useState(""),[j,b]=u.useState(()=>Number(t.get("q"))||null),[N,E]=u.useState(""),L=u.useRef(!1),I=async()=>{p(!0),y("");try{const[k,z]=await Promise.all([xd(),Ro().catch(()=>null)]);r(k),a(new Set(k.map(K=>K.questionId))),o((z==null?void 0:z.sourceByQuestionId)??{}),d((z==null?void 0:z.schoolByQuestionId)??{})}catch(k){y(ee(k).message)}finally{p(!1)}};u.useEffect(()=>{I()},[]),u.useEffect(()=>{if(f||L.current)return;const k=Number(t.get("q"))||null;if(k==null)return;const z=document.getElementById(`saved-q-${k}`);z&&(z.scrollIntoView({behavior:"smooth",block:"center"}),L.current=!0)},[f,t]);const D=k=>{E(k),window.setTimeout(()=>E(""),2e3)},M=async k=>{try{const z=await Po(k);a(K=>{const Q=new Set(K);return z.isBookmarked?Q.add(k):Q.delete(k),Q}),z.isBookmarked&&D("질문이 저장되었어요")}catch(z){D(ee(z).message)}},P=k=>i[k.questionId]??k.recordTitle,O=k=>{var z;return((z=c[k.questionId])==null?void 0:z.trim())||P(k)},q=Array.from(new Set(s.map(O))),A=bi.filter(k=>s.some(z=>z.category===k)),H=k=>s.filter(z=>O(z)===k).length,Z=k=>s.filter(z=>z.category===k).length,T=s.filter(k=>v==="school"&&w?O(k)===w:v==="category"&&x?k.category===x:!0);return n.jsxs("div",{className:"mx-auto max-w-[1280px] px-[40px] pt-[80px] pb-[120px]",children:[n.jsxs("button",{onClick:()=>e("/questions"),className:"mb-[56px] flex items-center gap-[8px] text-neutral-80 transition-colors hover:text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32}),n.jsx("span",{className:"text-body-1-semibold text-neutral-90",children:"저장한 질문"})]}),n.jsxs("div",{className:"flex w-full overflow-x-auto border-b-[1px] border-neutral-20",children:[n.jsx(Dt,{selected:v==="all",onClick:()=>C("all"),children:"전체"}),n.jsx(Dt,{selected:v==="school",onClick:()=>C("school"),children:"학교별"}),n.jsx(Dt,{selected:v==="category",onClick:()=>C("category"),children:"생기부 영역별"})]}),v==="school"&&n.jsxs("div",{className:"mt-[20px] flex flex-wrap gap-[8px]",children:[n.jsx(un,{selected:w==="",onClick:()=>g(""),children:"학교 전체"}),q.map(k=>n.jsxs(un,{selected:w===k,onClick:()=>g(k),children:[k," ",H(k)]},k))]}),v==="category"&&n.jsxs("div",{className:"mt-[20px] flex flex-wrap gap-[8px]",children:[n.jsx(un,{selected:x==="",onClick:()=>m(""),children:"영역 전체"}),A.map(k=>n.jsxs(un,{selected:x===k,onClick:()=>m(k),children:[Ll(k).label," ",Z(k)]},k))]}),f?n.jsxs("div",{className:"py-[80px] text-center",children:[n.jsx("div",{className:"mx-auto h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsx("p",{className:"mt-[16px] text-body-2-medium text-neutral-60",children:"불러오는 중…"})]}):h?n.jsxs("div",{className:"mt-[32px] rounded-[16px] border border-dashed border-danger-20 bg-danger-5 py-[40px] text-center text-body-3-medium text-danger-60",children:[h,n.jsx("button",{onClick:I,className:"ml-[8px] underline",children:"다시 시도"})]}):s.length===0?n.jsxs("div",{className:"mt-[32px] flex h-[300px] flex-col items-center justify-center gap-[4px] rounded-[12px] bg-neutral-5",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-70",children:"아직 저장한 질문이 없어요"}),n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:"질문 목록에서 ★를 눌러 저장해보세요"})]}):n.jsx("div",{className:"mt-[32px] flex flex-col gap-[12px]",children:T.map(k=>n.jsx("div",{id:`saved-q-${k.questionId}`,className:"scroll-mt-[88px]",children:n.jsx(hd,{question:{...S7(k),isBookmarked:l.has(k.questionId)},subtitle:P(k),stackedHeader:!0,expanded:j===k.questionId,onToggle:()=>b(j===k.questionId?null:k.questionId),onBookmark:()=>M(k.questionId)})},k.questionId))}),N&&n.jsx("div",{className:"fixed right-0 top-[88px] z-50",children:n.jsx(D1,{icon:n.jsx(S,{name:"circle-check-filled",className:"text-success-50 fill-white"}),children:N})})]})}function E7(){return Pe("/api/users/me/dashboard",{method:"GET"})}function gd(){return Pe("/api/users/me/accountInfo",{method:"GET"})}function T7(e){return Pe("/api/users/me/password",{method:"PATCH",body:JSON.stringify(e)})}function M7(e){return Pe("/api/users/me",{method:"DELETE",body:JSON.stringify(e)})}const _7={kakao:"bg-[#FEE500]",naver:"bg-[#03C75A]",google:"border border-neutral-20 bg-white"};function z7({provider:e}){return n.jsx("span",{"aria-label":`${e} 가입`,className:`flex size-[26px] items-center justify-center rounded-full ${_7[e]}`,children:n.jsx(V,{name:e,size:18})})}function cr({ok:e,children:t}){const s=e?"text-success-50":"text-neutral-50";return n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(S,{name:"check",size:24,className:s}),n.jsx("span",{className:`text-body-3-medium ${s}`,children:t})]})}const P7=e=>{const{code:t,message:s}=ee(e);return/current|password|mismatch|일치|현재 비밀번호/i.test(`${t} ${s}`)};function R7({onBack:e,onFindPassword:t}){const[s,r]=u.useState("current"),[l,a]=u.useState(""),[i,o]=u.useState(""),[c,d]=u.useState(""),[f,p]=u.useState(!1),[h,y]=u.useState(!1),[v,C]=u.useState(!1),[w,g]=u.useState(""),[x,m]=u.useState(""),[j,b]=u.useState(!1),N=i.length>=8,E=/[A-Za-z]/.test(i),L=/[0-9]/.test(i),I=/[^A-Za-z0-9]/.test(i),D=N&&E&&L&&I,M=c.length>0&&i===c,P=l.length>=1&&!w&&!j,O=D&&M&&!j,q=()=>{s==="new"?r("current"):e()},A=()=>{P&&(m(""),r("new"))},H=async()=>{if(O){m(""),b(!0);try{await T7({currentPassword:l,newPassword:i}),r("done")}catch(T){P7(T)?(g("비밀번호가 일치하지 않아요"),r("current")):m(ee(T).message)}finally{b(!1)}}},Z=(T,k)=>n.jsx("button",{type:"button",onClick:k,className:"text-neutral-50",children:n.jsx(S,{name:T?"eyeon":"eyeoff",size:24})});return n.jsxs("section",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("button",{type:"button","aria-label":"뒤로",onClick:q,className:"text-neutral-80 transition-colors hover:text-neutral-100",children:n.jsx(S,{name:"arrow-left",size:32})}),n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"비밀번호 변경"})]}),s==="current"&&n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsx(Se,{label:"현재 비밀번호",type:f?"text":"password",placeholder:"현재 비밀번호를 입력해주세요",autoComplete:"current-password",value:l,error:!!w,helperText:w||void 0,onChange:T=>{a(T.target.value),g("")},onKeyDown:T=>{T.key==="Enter"&&A()},trailing:n.jsxs("div",{className:"flex items-center gap-[8px]",children:[Z(f,()=>p(T=>!T)),w&&n.jsx(S,{name:"circle-alert-filled",size:24,className:"text-neutral-40 fill-white"})]})}),n.jsx("button",{type:"button",onClick:t,className:"self-end text-body-3-medium text-neutral-50 hover:text-neutral-90",children:"비밀번호 찾기"})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!P,onClick:A,children:j?"확인 중…":"다음"})]}),s==="new"&&n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx(Se,{label:"새 비밀번호",type:h?"text":"password",placeholder:"비밀번호를 입력해주세요",autoComplete:"new-password",value:i,onChange:T=>{o(T.target.value),m("")},trailingIcon:Z(h,()=>y(T=>!T))}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx(cr,{ok:N,children:"8자 이상"}),n.jsxs("div",{className:"flex gap-[12px]",children:[n.jsx(cr,{ok:E,children:"영문 포함"}),n.jsx(cr,{ok:L,children:"숫자 포함"}),n.jsx(cr,{ok:I,children:"특수문자 포함"})]})]})]}),n.jsx(Se,{label:"비밀번호 확인",type:v?"text":"password",placeholder:"비밀번호를 한번 더 입력해주세요",autoComplete:"new-password",value:c,error:c.length>0&&!M,helperTone:M?"success":void 0,helperText:M?"비밀번호가 일치해요":c.length>0?"비밀번호가 일치하지 않아요":void 0,onChange:T=>{d(T.target.value),m("")},trailingIcon:Z(v,()=>C(T=>!T))})]}),x&&n.jsx("p",{className:"text-caption-medium text-danger-60",children:x}),n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!O,onClick:H,children:j?"변경 중…":"변경하기"})]}),s==="done"&&n.jsx("div",{className:"flex w-full flex-col items-center rounded-[16px] bg-neutral-5 py-[40px]",children:n.jsxs("div",{className:"flex w-[312px] flex-col items-center gap-[12px] py-[20px]",children:[n.jsx(S,{name:"circle-check-filled",size:40,className:"text-success-50 fill-white"}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:"비밀번호가 변경됐어요"}),n.jsx("p",{className:"text-body-3-medium text-neutral-70",children:"다음 로그인부터 새 비밀번호를 사용해주세요"})]})]})})]})}const $2=300,I7=e=>`${String(Math.floor(e/60)).padStart(2,"0")}:${String(e%60).padStart(2,"0")}`;function ur({ok:e,children:t}){const s=e?"text-success-50":"text-neutral-50";return n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(S,{name:"check",size:24,className:s}),n.jsx("span",{className:`text-body-3-medium ${s}`,children:t})]})}function D7({email:e,onBack:t}){const[s,r]=u.useState("email"),[l,a]=u.useState(""),[i,o]=u.useState(""),[c,d]=u.useState(""),[f,p]=u.useState(!1),[h,y]=u.useState(!1),[v,C]=u.useState(0),[w,g]=u.useState(""),[x,m]=u.useState(""),[j,b]=u.useState(!1);u.useEffect(()=>{if(v<=0)return;const k=setTimeout(()=>C(z=>z-1),1e3);return()=>clearTimeout(k)},[v]);const N=i.length>=8,E=/[A-Za-z]/.test(i),L=/[0-9]/.test(i),I=/[^A-Za-z0-9]/.test(i),D=N&&E&&L&&I,M=c.length>0&&i===c,P=async()=>{if(!(!e||j)){m(""),b(!0);try{await Jr({email:e}),a(""),g(""),C($2),r("code")}catch(k){m(ee(k).message)}finally{b(!1)}}},O=async()=>{if(!j){m(""),b(!0);try{await Jr({email:e}),a(""),g(""),C($2)}catch(k){m(ee(k).message)}finally{b(!1)}}},q=async()=>{if(!(!l.trim()||j)){m(""),b(!0);try{const k=await ko({email:e,code:l.trim()});k.verified?r("newpw"):g(k.message||"인증번호가 맞지 않아요. 다시 확인해주세요.")}catch{g("인증번호가 맞지 않아요. 다시 확인해주세요.")}finally{b(!1)}}},A=async()=>{if(!(!(D&&M)||j)){m(""),b(!0);try{await Fu({email:e,code:l.trim(),newPassword:i}),r("done")}catch(k){m(ee(k).message)}finally{b(!1)}}},H=()=>{s==="code"?r("email"):s==="newpw"?r("code"):t()},Z=(k,z)=>n.jsx("button",{type:"button",onClick:z,className:"text-neutral-50",children:n.jsx(S,{name:k?"eyeon":"eyeoff",size:24})}),T=s==="done"?"비밀번호 변경":"비밀번호 찾기";return n.jsxs("section",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("button",{type:"button","aria-label":"뒤로",onClick:H,className:"text-neutral-80 transition-colors hover:text-neutral-100",children:n.jsx(S,{name:"arrow-left",size:32})}),n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:T})]}),s==="email"&&n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:"본인 확인을 위해 가입하신 이메일로 인증번호를 보내드려요."}),n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsx(Se,{type:"email",value:e,readOnly:!0,tabIndex:-1,className:"pointer-events-none"}),n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!e||j,onClick:P,children:j?"전송 중…":"인증번호 받기"})]})]}),s==="code"&&n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx(Se,{placeholder:"이메일로 받은 인증번호 6자리",inputMode:"numeric",maxLength:6,value:l,error:!!w,helperText:w||void 0,onChange:k=>{a(k.target.value),g("")},onKeyDown:k=>{k.key==="Enter"&&q()},trailing:n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:`text-body-2-regular ${w?"text-danger-50":"text-neutral-50"}`,children:I7(v)}),w&&n.jsx(S,{name:"circle-alert-filled",size:24,className:"text-neutral-40 fill-white"})]})}),n.jsxs("div",{className:"flex justify-center gap-[8px] text-body-3-medium",children:[n.jsx("span",{className:"text-neutral-80",children:"이메일을 못 받으셨나요?"}),n.jsx("button",{type:"button",onClick:O,disabled:j,className:"text-primary-60 hover:underline disabled:opacity-50",children:"다시 받기"})]})]}),x&&n.jsx("p",{className:"text-caption-medium text-danger-60",children:x}),n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!l.trim()||j,onClick:q,children:j?"확인 중…":"인증번호 확인"})]}),s==="newpw"&&n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx(Se,{label:"새 비밀번호",type:f?"text":"password",placeholder:"비밀번호를 입력해주세요",autoComplete:"new-password",value:i,onChange:k=>{o(k.target.value),m("")},trailingIcon:Z(f,()=>p(k=>!k))}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx(ur,{ok:N,children:"8자 이상"}),n.jsxs("div",{className:"flex gap-[12px]",children:[n.jsx(ur,{ok:E,children:"영문 포함"}),n.jsx(ur,{ok:L,children:"숫자 포함"}),n.jsx(ur,{ok:I,children:"특수문자 포함"})]})]})]}),n.jsx(Se,{label:"비밀번호 확인",type:h?"text":"password",placeholder:"비밀번호를 한번 더 입력해주세요",autoComplete:"new-password",value:c,error:c.length>0&&!M,helperTone:M?"success":void 0,helperText:M?"비밀번호가 일치해요":c.length>0?"비밀번호가 일치하지 않아요":void 0,onChange:k=>{d(k.target.value),m("")},trailingIcon:Z(h,()=>y(k=>!k))})]}),x&&n.jsx("p",{className:"text-caption-medium text-danger-60",children:x}),n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!(D&&M)||j,onClick:A,children:j?"변경 중…":"변경하기"})]}),s==="done"&&n.jsx("div",{className:"flex w-full flex-col items-center rounded-[16px] bg-neutral-5 py-[40px]",children:n.jsxs("div",{className:"flex w-[312px] flex-col items-center gap-[12px] py-[20px]",children:[n.jsx(S,{name:"circle-check-filled",size:40,className:"text-success-50 fill-white"}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:"비밀번호가 변경됐어요"}),n.jsx("p",{className:"text-body-3-medium text-neutral-70",children:"다음 로그인부터 새 비밀번호를 사용해주세요"})]})]})})]})}const A7=["대학교에 합격했어요","원하는 학교·학과 질문이 없어요","서비스가 자주 오류가 나거나 느려요","다른 서비스를 이용해요","기능이 기대에 미치지 못했어요","기타"],V2="기타";function F7({open:e,onClose:t,onComplete:s,storedCount:r,savedCount:l}){const[a,i]=u.useState("reason"),[o,c]=u.useState([]),[d,f]=u.useState(""),[p,h]=u.useState(!1),[y,v]=u.useState(""),[C,w]=u.useState(!1);u.useEffect(()=>{e&&(i("reason"),c([]),f(""),h(!1),v(""))},[e]);const g=(j,b)=>{c(N=>b?[...N,j]:N.filter(E=>E!==j))},x=async()=>{if(!(!p||C)){v(""),w(!0);try{const j=o.includes(V2)&&d.trim()||void 0;await M7({reasons:o,reasonDetail:j}),s()}catch(j){v(ee(j).message)}finally{w(!1)}}},m=[n.jsx(n.Fragment,{children:"등록한 생기부 파일이 영구 삭제되며 복구할 수 없어요"}),n.jsxs(n.Fragment,{children:["질문 보관함 ",n.jsxs("span",{className:"text-danger-50",children:[r,"개"]})," · 저장한 질문"," ",n.jsxs("span",{className:"text-danger-50",children:[l,"개"]}),"가 모두 삭제돼요."]}),n.jsx(n.Fragment,{children:"같은 이메일로 다시 가입해도 기존 데이터는 복구되지 않아요."}),n.jsx(n.Fragment,{children:"탈퇴 즉시 로그아웃되며 서비스 이용이 중단돼요."})];return n.jsxs(n.Fragment,{children:[n.jsx(me,{open:e&&a==="reason",onClose:t,align:"left",className:"w-[560px]",title:"회원탈퇴를 계속 진행할까요?",cancelText:"취소",confirmText:"다음",confirmDisabled:o.length===0,onConfirm:()=>i("caution"),children:n.jsxs("div",{className:"flex w-full flex-col gap-[20px]",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-70",children:"탈퇴 사유"}),n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[A7.map(j=>n.jsxs("label",{className:"flex cursor-pointer items-center gap-[12px]",children:[n.jsx(nn,{size:20,checked:o.includes(j),onChange:b=>g(j,b.target.checked)}),n.jsx("span",{className:"text-body-2-medium text-neutral-90",children:j})]},j)),o.includes(V2)&&n.jsx(Se,{placeholder:"자세한 이유를 들려주시면 큰 도움이 돼요 (50자 이내)",maxLength:50,value:d,onChange:j=>f(j.target.value)})]})]})}),n.jsxs(me,{open:e&&a==="caution",onClose:()=>i("reason"),align:"left",className:"w-[560px]",title:"탈퇴 전 꼭 확인해주세요",description:"탈퇴하면 아래 내용이 모두 삭제되고 복구할 수 없어요",cancelText:"이전",confirmText:C?"처리 중…":"탈퇴하기",confirmVariant:"danger",confirmDisabled:!p||C,onConfirm:x,children:[n.jsx("div",{className:"flex w-full flex-col gap-[8px] rounded-[16px] bg-danger-5 px-[24px] py-[18px]",children:m.map((j,b)=>n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"size-[8px] shrink-0 rounded-full bg-danger-50"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:j})]},b))}),n.jsxs("label",{className:"flex w-full cursor-pointer items-center gap-[12px]",children:[n.jsx(nn,{size:20,checked:p,onChange:j=>h(j.target.checked)}),n.jsx("span",{className:"text-body-2-medium text-neutral-90",children:"위 내용을 모두 확인했으며, 탈퇴에 동의합니다."})]}),y&&n.jsx("p",{className:"w-full text-body-3-medium text-danger-60",children:y})]})]})}const B2=e=>{if(!e)return"-";const t=/^(\d{4})(\d{2})(\d{2})$/.exec(e.trim());return t?`${t[1]}.${t[2]}.${t[3]}`:e.slice(0,10).replace(/-/g,".")},O7=e=>e>=1024*1024?`${Math.round(e/1024/1024)}MB`:`${Math.max(1,Math.round(e/1024))}KB`;function ua({label:e,value:t,trailing:s}){return n.jsxs("div",{className:"flex items-center gap-[24px] rounded-[16px] bg-neutral-5 px-[28px] py-[20px]",children:[n.jsx("span",{className:"w-[74px] shrink-0 text-body-2-medium text-neutral-60",children:e}),n.jsx("span",{className:"text-body-1-semibold text-neutral-95",children:t||"-"}),s&&n.jsx("span",{className:"ml-auto shrink-0",children:s})]})}const H7=e=>{const{code:t,message:s}=ee(e);return/name.*mismatch|name_not_match|이름/i.test(`${t} ${s}`)};function $7(){const{user:e,clearAuth:t}=yt(),s=ne(),[r,l]=u.useState(null),[a,i]=u.useState(null),[o,c]=u.useState(null),[d,f]=u.useState(""),[p,h]=u.useState(!1),[y,v]=u.useState("main"),[C,w]=u.useState(!1),[g,x]=u.useState("none"),[m,j]=u.useState(null),[b,N]=u.useState(""),[E,L]=u.useState(""),[I,D]=u.useState(!1),[M,P]=u.useState(!1),[O,q]=u.useState(""),A=u.useRef(null);u.useEffect(()=>{let F=!0;return Promise.all([E7().catch(()=>null),gd().catch(()=>null)]).then(([G,Ne])=>{F&&(l(G),i(Ne))}),H(()=>F),()=>{F=!1}},[]),u.useEffect(()=>{if(!O)return;const F=window.setTimeout(()=>q(""),3e3);return()=>window.clearTimeout(F)},[O]);async function H(F=()=>!0){try{const Ne=(await Ft()).records.reduce((He,X)=>!He||X.id>He.id?X:He,null),vt=Ne?await qn(Ne.id):null;F()&&c(vt)}catch{}}const Z=async()=>{const F=ge.getRefreshToken(),G=ge.getAccessToken();try{F&&G&&await Ou({refreshToken:F},G)}catch{}finally{t(),s("/")}},T=()=>{j(null),N(""),L(""),x("register")},k=()=>{x("none"),j(null),N(""),L("")},z=()=>{I||(m?x("cancelConfirm"):k())},K=F=>{var Ne;const G=((Ne=F.name.split(".").pop())==null?void 0:Ne.toLowerCase())??"";if(!["pdf","html","htm"].includes(G)){N("PDF 또는 HTML 파일만 올릴 수 있어요");return}N(""),L(""),j(F)},Q=async()=>{if(!(!m||I)){D(!0),f("");try{const F=(m.name.replace(/\.[^./\\]+$/,"").trim()||"내 생기부").slice(0,28);if(Gu){await new Promise(vt=>setTimeout(vt,600)),c({id:Date.now(),title:F,status:"READY",filename:m.name,createdAt:new Date().toISOString(),questionSets:[]}),x("none"),j(null),q("생기부가 등록되었어요");return}const{presignedUrl:G,s3Key:Ne}=await bl(m.name);await kl(G,m),await Sl({title:F,filename:m.name,s3Key:Ne}),x("none"),j(null),await H(),q("생기부가 등록되었어요")}catch(F){H7(F)?(j(null),x("nameMismatch")):L(ee(F).message||"등록에 실패했어요. 잠시 후 다시 시도해주세요.")}finally{D(!1)}}},oe=async()=>{if(o)try{await K8(o.id),c(null)}catch(F){f(ee(F).message)}finally{x("none")}},ae=(a==null?void 0:a.userName)??(r==null?void 0:r.userName)??(e==null?void 0:e.name)??"",J=(a==null?void 0:a.email)??(e==null?void 0:e.email)??"",se=B2((a==null?void 0:a.registDate)??(r==null?void 0:r.registDate)),_=["kakao","naver","google"].find(F=>F===(a==null?void 0:a.provider))??null,Y=()=>{w(!1),s("/withdraw-complete",{state:{name:ae}}),t()},U=[{label:"회원 정보",action:()=>v("account")},{label:"비밀번호 변경",action:()=>v("password")},{label:"로그아웃",action:()=>x("logoutConfirm")},{label:"회원탈퇴",action:()=>w(!0)}],ue=[{label:"질문 보관함",value:(r==null?void 0:r.questionSetCnt)??0},{label:"저장한 질문",value:(r==null?void 0:r.questionBookmarkCnt)??0},{label:"총 면접 질문",value:(r==null?void 0:r.totalQuestionCnt)??0}];return n.jsxs("div",{className:"mx-auto max-w-[1240px] px-[40px] pb-[120px] pt-[80px]",children:[n.jsx("h1",{className:"mb-[48px] text-heading-2-semibold text-neutral-100",children:"마이페이지"}),d&&n.jsx("p",{className:"mb-[24px] text-body-3-medium text-danger-60",children:d}),n.jsxs("div",{className:"flex items-start gap-[40px]",children:[n.jsxs("aside",{className:"flex w-[360px] shrink-0 flex-col gap-[24px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[12px] rounded-[20px] bg-primary-5 px-[28px] pb-[24px] pt-[36px]",children:[n.jsx(V,{name:"user-white",size:64}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px]",children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-95",children:ae}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:J}),n.jsxs("p",{className:"text-body-3-regular text-neutral-50",children:["가입일 ",se]})]})]}),n.jsx("div",{className:"overflow-hidden rounded-[16px] border border-neutral-10",children:U.map((F,G)=>n.jsxs("button",{onClick:F.action,className:`flex w-full items-center justify-between p-[20px] text-left transition-colors hover:bg-neutral-5 ${Gv("password")}):y==="password"?n.jsx(R7,{onBack:()=>v("main"),onFindPassword:()=>v("passwordFind")}):y==="account"?n.jsxs("section",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("button",{type:"button","aria-label":"뒤로",onClick:()=>v("main"),className:"text-neutral-80 transition-colors hover:text-neutral-100",children:n.jsx(S,{name:"arrow-left",size:32})}),n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"회원 정보"})]}),n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx(ua,{label:"이름",value:ae}),n.jsx(ua,{label:"이메일",value:J,trailing:_?n.jsx(z7,{provider:_}):void 0}),n.jsx(ua,{label:"가입일",value:se})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("section",{className:"flex flex-col gap-[20px]",children:[n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"면접 준비 현황"}),n.jsx("div",{className:"flex gap-[16px]",children:ue.map(F=>n.jsxs("div",{className:"flex flex-1 flex-col gap-[12px] rounded-[20px] bg-neutral-5 px-[28px] py-[24px]",children:[n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:F.label}),n.jsxs("div",{className:"flex items-baseline gap-[4px]",children:[n.jsx("p",{className:"text-heading-3-semibold text-neutral-95",children:F.value}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:"개"})]})]},F.label))})]}),n.jsxs("section",{className:"flex flex-col gap-[20px]",children:[n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"내 생기부"}),o?n.jsxs("div",{className:"relative flex items-center justify-between rounded-[20px] bg-neutral-5 p-[24px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[n.jsx(V,{name:"file",size:40}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:o.filename}),n.jsxs("p",{className:"text-body-3-medium text-neutral-50",children:["등록일 ",B2(o.createdAt)]})]})]}),n.jsx("button",{type:"button","aria-label":"생기부 메뉴",onClick:()=>h(F=>!F),className:"text-neutral-50 hover:text-neutral-90",children:n.jsx(S,{name:"dots-vertical",size:28})}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>h(!1)}),n.jsx("div",{className:"absolute right-[24px] top-[60px] z-20 w-[150px]",children:n.jsxs(So,{children:[n.jsx(Xr,{onClick:()=>{h(!1),x("replaceGuide")},children:"교체하기"}),n.jsx(Xr,{danger:!0,onClick:()=>{h(!1),x("delete")},children:"삭제하기"})]})})]})]}):n.jsxs("div",{className:"flex h-[260px] flex-col items-center justify-center gap-[16px] rounded-[20px] border-2 border-dashed border-neutral-20 bg-white p-[36px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[12px]",children:[n.jsx(V,{name:"file-upload",size:36}),n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-80",children:"생기부가 등록되지 않았어요"}),n.jsx("p",{className:"text-body-3-regular text-neutral-70",children:"생기부를 올려야 맞춤 면접 질문을 만들 수 있어요"})]})]}),n.jsx($,{variant:"primary",size:"small",onClick:T,children:"생기부 등록"})]})]})]})})]}),n.jsxs(me,{open:g==="register"||g==="cancelConfirm",onClose:z,align:"left",className:"w-[560px]",title:"생기부 등록",description:"본인의 생기부 파일을 올려주세요",cancelText:"취소",confirmText:I?"등록 중…":"등록하기",confirmDisabled:!m||I,onConfirm:Q,children:[n.jsx("input",{ref:A,type:"file",accept:".pdf,.html,.htm",className:"hidden",onChange:F=>{var G;return((G=F.target.files)==null?void 0:G[0])&&K(F.target.files[0])}}),E&&n.jsx("p",{className:"w-full text-body-3-medium text-danger-60",children:E}),m?n.jsxs("div",{className:"flex w-full items-center justify-between rounded-[20px] bg-neutral-5 px-[20px] py-[22px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[n.jsx(V,{name:"file",size:48}),n.jsxs("div",{className:"flex flex-col gap-[2px]",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:m.name}),n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:O7(m.size)})]})]}),n.jsx("button",{type:"button","aria-label":"파일 제거",onClick:()=>j(null),disabled:I,children:n.jsx(S,{name:"circle-cancel-filled",size:28,className:"text-neutral-30 fill-white"})})]}):n.jsxs("div",{className:"flex w-full flex-col gap-[8px]",children:[n.jsxs("div",{onClick:()=>{var F;return(F=A.current)==null?void 0:F.click()},onDragOver:F=>{F.preventDefault(),P(!0)},onDragLeave:()=>P(!1),onDrop:F=>{var Ne;F.preventDefault(),P(!1);const G=(Ne=F.dataTransfer.files)==null?void 0:Ne[0];G&&K(G)},className:`flex h-[200px] cursor-pointer flex-col items-center justify-center gap-[12px] rounded-[24px] border-[1.4px] border-dashed p-[36px] transition-colors ${b?"border-danger-50 bg-danger-5":M?"border-primary-60 bg-primary-5":"border-neutral-20 hover:border-primary-40 hover:bg-primary-5"}`,children:[n.jsx(V,{name:"file-upload",size:48}),n.jsxs("p",{className:"text-center text-body-3-medium text-neutral-70",children:["PDF 또는 HTML 파일을 여기로 끌어오거나",n.jsx("br",{}),"클릭해서 선택해주세요"]})]}),b&&n.jsx("p",{className:"text-body-3-medium text-danger-60",children:b})]})]}),n.jsx(me,{open:g==="cancelConfirm",onClose:k,title:"생기부 등록을 그만둘까요?",description:n.jsxs(n.Fragment,{children:["지금 닫으면 입력한 내용이 사라지고,",n.jsx("br",{}),"처음부터 다시 시작해야 해요."]}),cancelText:"취소",confirmText:"계속 등록",onConfirm:()=>x("register")}),n.jsx(me,{open:g==="replaceGuide",onClose:()=>x("none"),alert:!0,className:"w-[520px]",title:"교체하기 전에 확인해주세요",description:n.jsxs(n.Fragment,{children:["새 생기부로 교체해도 기존에 만든 질문은 그대로 보관돼요.",n.jsx("br",{}),"다만 그 질문들은 이전 생기부를 기준으로 만들어졌기 때문에,",n.jsx("br",{}),"새 생기부 내용과는 맞지 않을 수 있어요."]}),cancelText:"취소",confirmText:"계속하기",onConfirm:T}),n.jsx(me,{open:g==="nameMismatch",onClose:()=>x("register"),alert:!0,title:"이름이 일치하지 않아요",description:"본인의 생기부만 등록할 수 있어요. 생기부의 이름과 계정 이름이 일치해야해요.",confirmText:"확인",onConfirm:()=>x("register")}),n.jsx(me,{open:g==="delete",onClose:()=>x("none"),alert:!0,title:"생기부를 삭제할까요?",description:n.jsxs(n.Fragment,{children:["등록된 생기부 파일을 삭제하면",n.jsx("br",{}),"기존의 질문들은 유지되지만,",n.jsx("br",{}),"새로운 질문을 만들 수 없어요"]}),children:n.jsxs("div",{className:"mt-[12px] flex w-full gap-[12px]",children:[n.jsx($,{variant:"gray",size:"large",className:"flex-1",onClick:oe,children:"삭제"}),n.jsx($,{variant:"primary",size:"large",className:"flex-1",onClick:()=>x("none"),children:"취소"})]})}),n.jsx(me,{open:g==="logoutConfirm",onClose:()=>x("none"),title:"로그아웃 하시겠어요?",children:n.jsxs("div",{className:"mt-[12px] flex w-full gap-[12px]",children:[n.jsx($,{variant:"gray",size:"large",className:"flex-1",onClick:Z,children:"로그아웃"}),n.jsx($,{variant:"primary",size:"large",className:"flex-1",onClick:()=>x("none"),children:"취소"})]})}),n.jsx(F7,{open:C,onClose:()=>w(!1),onComplete:Y,storedCount:ue[0].value,savedCount:ue[1].value}),O&&n.jsx("div",{className:"fixed right-0 top-[88px] z-50",children:n.jsx(D1,{icon:n.jsx(S,{name:"circle-check-filled",className:"text-success-50 fill-white"}),children:O})})]})}function V7(){var D;const e=ne(),s=!!((D=Ue().state)!=null&&D.breadcrumb),[r,l]=u.useState(null),[a,i]=u.useState(!0),[o,c]=u.useState("form"),[d,f]=u.useState(""),[p,h]=u.useState(""),[y,v]=u.useState(""),[C,w]=u.useState(0),[g,x]=u.useState(!1),m=u.useRef(!1),j=u.useRef(!1),b=u.useRef(null),N=()=>{j.current=!0,x(!0),ht(!0)},E=()=>{if(j.current=!1,x(!1),ht(!1),b.current){const M=b.current;b.current=null,M()}};u.useEffect(()=>{let M=!0;return(async()=>{try{const O=(await Ft()).records.reduce((A,H)=>!A||H.id>A.id?H:A,null),q=O?await qn(O.id):null;if(!M)return;if(!q){e("/onboarding",{replace:!0});return}l(q)}catch{M&&e("/onboarding",{replace:!0})}finally{M&&i(!1)}})(),()=>{M=!1}},[e]),$s(o==="processing",N);const L=async()=>{if(!r)return;c("processing"),w(0),window.scrollTo({top:0});const M=([d,p,y].filter(Boolean).join(" ").trim()||r.title||"맞춤 면접 질문").slice(0,40);try{await ud(r.id,{title:M,target_school:d,target_major:p,interview_type:y,questions_per_category:zo},H=>w(H));const P=await qn(r.id),q=P.questionSets.find(H=>H.title===M)??P.questionSets[P.questionSets.length-1];if(!q)throw new Error("생성된 질문 세트를 찾을 수 없어요.");w(100);const A=()=>{m.current||e(`/questions/${q.id}`)};j.current?b.current=A:setTimeout(A,400)}catch{c("error")}},I=()=>{m.current=!0,j.current=!1,b.current=null,ht(!1),x(!1),e("/questions")};return a?n.jsx("div",{className:"py-[160px] text-center",children:n.jsx("div",{className:"mx-auto h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"})}):n.jsxs("div",{className:"mx-auto max-w-[1280px] px-[40px] pt-[80px] pb-[120px]",children:[o==="processing"&&n.jsx(As,{progress:C,paused:g,className:"pt-[160px]"}),o==="error"&&n.jsxs("div",{className:"mx-auto flex max-w-[465px] flex-col items-center pt-[160px] text-center",children:[n.jsx("div",{className:"flex size-[100px] items-center justify-center rounded-full bg-danger-5",children:n.jsx(S,{name:"circle-alert-filled",size:56,className:"text-danger-50"})}),n.jsxs("div",{className:"mt-[36px] flex flex-col gap-[8px]",children:[n.jsx("p",{className:"text-heading-1-bold text-neutral-100",children:"질문을 만들지 못했어요"}),n.jsxs("p",{className:"text-body-1-medium text-neutral-60",children:["서버에 일시적인 오류가 발생했어요.",n.jsx("br",{}),"잠시 후 다시 시도해주세요."]})]}),n.jsxs("div",{className:"mt-[56px] flex w-full flex-col items-center gap-[16px]",children:[n.jsx($,{variant:"primary",size:"large",className:"w-full",leadingIcon:n.jsx(S,{name:"reset",size:24}),onClick:L,children:"다시 시도하기"}),n.jsx("button",{type:"button",onClick:()=>c("form"),className:"text-body-2-medium text-neutral-60 transition-colors hover:text-neutral-80",children:"이전으로 돌아가기"})]})]}),o==="form"&&r&&n.jsxs(n.Fragment,{children:[s&&n.jsxs("button",{type:"button",onClick:()=>e(-1),className:"mb-[56px] flex items-center gap-[8px] text-neutral-80 transition-colors hover:text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32}),n.jsx("span",{className:"text-body-1-semibold text-neutral-90",children:"새 질문 만들기"})]}),n.jsx("div",{className:"rounded-[28px] bg-neutral-5 px-[56px] pt-[64px] pb-[52px]",children:n.jsxs("div",{className:"flex flex-col gap-[56px]",children:[n.jsxs("div",{className:"flex flex-col gap-[36px]",children:[n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsx(V,{name:"file-search",size:56}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("h1",{className:"text-heading-3-semibold text-neutral-100",children:"생기부를 분석해 지원 대학 맞춤 면접 질문을 만들어드려요"}),n.jsxs("p",{className:"text-body-1-regular text-neutral-60",children:["학교·학과·전형을 자유롭게 선택하세요.",n.jsx("br",{}),"아무것도 고르지 않아도 생기부만으로 질문을 만들 수 있어요."]})]})]}),n.jsxs("div",{className:"flex items-center justify-between rounded-[16px] bg-white px-[20px] py-[16px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[n.jsx(V,{name:"file",size:40}),n.jsxs("div",{className:"flex flex-col gap-[2px]",children:[n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:"생기부 업로드 완료"}),n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:r.filename})]})]}),n.jsx("button",{type:"button",onClick:()=>e("/mypage"),className:"rounded-[8px] bg-neutral-10 px-[6px] py-[2px] text-caption-medium text-neutral-70",children:"변경"})]})]}),n.jsx(Os,{variant:"onNeutral",school:d,onSchool:f,dept:p,onDept:h,appType:y,onAppType:v}),n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx("div",{className:"h-px w-full bg-neutral-10"}),n.jsx("p",{className:"text-center text-body-3-medium text-neutral-50",children:"생기부를 분석해 예상 면접 질문 약 30개를 생성해요 (약 30초 소요)"}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:L,trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"예상 질문 만들기"})]})]})})]}),n.jsx(Hs,{open:g,onLeave:I,onStay:E})]})}const El={basic:"Easy",real:"Normal",pressure:"Hard"},Cd="자기소개 부탁드립니다.";function Kn(){const e=ge.getAccessToken();return{"Content-Type":"application/json",...e?{Authorization:`Bearer ${e}`}:{}}}async function Jt(e,t){const s=await e.json().catch(()=>({}));throw new Ke(s.code??"INTERVIEW_ERROR",s.detail??s.message??t,e.status)}async function Tl(e){const t=await fetch(`${ze("/ai/interview")}/ai/interview/start`,{method:"POST",headers:Kn(),body:JSON.stringify(e)});return t.ok||await Jt(t,"면접 세션 생성에 실패했어요."),(await t.json()).session_id}async function B7(e,t,s){var c;const r=await fetch(`${ze("/ai/interview")}/ai/interview/chat/text/${e}`,{method:"POST",headers:Kn(),body:JSON.stringify(t)});r.ok||await Jt(r,"답변 처리 중 오류가 발생했어요.");const l=(c=r.body)==null?void 0:c.getReader();if(!l)throw new Ke("STREAM_ERROR","스트림을 읽을 수 없습니다.");const a=new TextDecoder;let i="";const o=d=>{var y,v,C,w;const f=d.trim();if(!f.startsWith("data:"))return;const p=f.slice(5).trim();if(!p)return;let h;try{h=JSON.parse(p)}catch{return}if(h.status==="generating"&&typeof h.token=="string")(y=s.onToken)==null||y.call(s,h.token);else if(h.status==="completed")(v=s.onCompleted)==null||v.call(s);else if(h.status==="finished")(w=s.onFinished)==null||w.call(s,((C=h.report)==null?void 0:C.message)??"면접을 종료합니다. 수고하셨습니다.");else if(h.status==="error")throw new Ke("STREAM_FAILED",h.message??"면접 처리 중 오류가 발생했어요.")};for(;;){const{done:d,value:f}=await l.read();f&&(i+=a.decode(f,{stream:!0}));let p=i.indexOf(` `);for(;p!==-1;)o(i.slice(0,p)),i=i.slice(p+2),p=i.indexOf(` `);if(d){i.trim()&&o(i);break}}}async function Z7(){const e=await fetch(`${ze("/ai/interview")}/ai/interview/list`,{headers:Kn()});return e.ok||await Jt(e,"면접 기록을 불러오지 못했어요."),(await e.json()).interviews??[]}async function U7(e){const t=await fetch(`${ze("/ai/interview")}/ai/interview/session/${e}`,{headers:Kn()});return t.ok||await Jt(t,"면접 세션을 불러오지 못했어요."),await t.json()}async function q7(){const e=await fetch(`${ze("/ai/interview")}/ai/interview/improvements`,{headers:Kn()});e.ok||await Jt(e,"보완점을 불러오지 못했어요.");const t=await e.json();return{improvements:t.improvements??[],weaknessTags:t.weakness_tags??[]}}async function yd(e){const t=await fetch(`${ze("/ai/interview")}/ai/interview/analyze/${e}`,{headers:Kn()});return t.ok||await Jt(t,"면접 결과 분석에 실패했어요."),await t.json()}async function W7(e,t,s){const r=ge.getAccessToken(),l=new FormData,a=t.type.includes("webm")?"webm":t.type.includes("ogg")?"ogg":t.type.includes("mp4")?"mp4":"wav";l.append("audio",t,`answer.${a}`),l.append("response_time",String(s));const i=await fetch(`${ze("/ai/interview")}/ai/interview/chat/audio/${e}`,{method:"POST",headers:r?{Authorization:`Bearer ${r}`}:{},body:l});i.ok||await Jt(i,"음성 답변 처리 중 오류가 발생했어요.");const o=await i.json(),c=(...d)=>{for(const f of d){const p=o[f];if(typeof p=="number")return p}};return{transcript:String(o.transcript??""),next_question:String(o.next_question??""),is_finished:!!o.is_finished,question_number:c("question_number","current_question_number","question_index","turn"),total_questions:c("total_questions","question_count","total")}}async function Q7(e){const t=ge.getAccessToken(),s=new FormData,r=e.type.includes("webm")?"webm":e.type.includes("ogg")?"ogg":e.type.includes("mp4")?"mp4":"wav";s.append("audio",e,`reanswer.${r}`);const l=await fetch(`${ze("/ai/interview")}/ai/interview/transcribe`,{method:"POST",headers:t?{Authorization:`Bearer ${t}`}:{},body:s});return l.ok||await Jt(l,"음성 변환 중 오류가 발생했어요."),(await l.json()).transcript??""}async function K7(e,t){const s=await fetch(`${ze("/ai/interview")}/ai/interview/quick-feedback`,{method:"POST",headers:Kn(),body:JSON.stringify({question:e,answer:t})});s.ok||await Jt(s,"피드백을 받지 못했어요.");const r=await s.json();return{tone:r.tone==="warn"?"warn":"good",text:r.text??""}}function da(e){try{const t=window.speechSynthesis;if(!t||!e)return;t.cancel();const s=new SpeechSynthesisUtterance(e);s.lang="ko-KR",s.rate=1;const r=t.getVoices().find(l=>l.lang==="ko-KR"||l.lang.startsWith("ko"));r&&(s.voice=r),t.speak(s)}catch{}}function Q1(){var e;try{(e=window.speechSynthesis)==null||e.cancel()}catch{}}var s0;const vd=typeof window<"u"&&typeof navigator<"u"&&!!((s0=navigator.mediaDevices)!=null&&s0.getUserMedia)&&typeof window.MediaRecorder<"u",G7=["major_fit","academic","growth","character","logic","communication"],Y7={TEXT:"text",AUDIO:"voice"},J7={Easy:"basic",Normal:"real",Hard:"pressure"},X7=8;function ep(e){if(!e)return"";const t=new Date(e);return Number.isNaN(t.getTime())?"":`${t.getFullYear()}.${String(t.getMonth()+1).padStart(2,"0")}.${String(t.getDate()).padStart(2,"0")}`}async function jd(){return Eo?U8():(await Z7()).map(t=>{var i,o,c,d;const s=(t.status??"").toUpperCase()==="IN_PROGRESS",r=t.answered_count??t.question_count??0,l=t.total_questions??t.question_count??X7,a=[];return(o=(i=t.summary)==null?void 0:i.strength)!=null&&o.trim()&&a.push({tone:"good",text:t.summary.strength.trim()}),(d=(c=t.summary)==null?void 0:c.weakness)!=null&&d.trim()&&a.push({tone:"warn",text:t.summary.weakness.trim()}),{id:t.session_id,targetSchool:t.target_university&&t.target_university!=="미지정"?t.target_university:"",targetMajor:t.target_department&&t.target_department!=="미지정"?t.target_department:"",interviewType:t.interview_type&&t.interview_type!=="미지정"?t.interview_type:"",mode:Y7[t.mode??"TEXT"]??"text",difficulty:J7[t.difficulty??"Normal"]??"real",total:l,feedback:a,date:ep(t.created_at),status:s?"in_progress":"done",progress:s?r:void 0,isFocus:!!t.is_focus,_answered:r}}).filter(t=>t._answered>0).map(({_answered:t,...s})=>s)}async function tp(){if(Eo)return Q8();const{improvements:e,weaknessTags:t}=await q7();return e.map(s=>({id:s.id,title:s.title,summary:s.summary,area:G7.includes(s.area)?s.area:"major_fit",relatedCount:s.relatedCount,points:t.slice(0,3),questions:s.questions??[]}))}function wd(e,t,s){return q8(t,s)}const Ml={text:"텍스트",voice:"음성"},wn={basic:"기본",real:"실전",pressure:"압박"},Io={major_fit:{label:"전공 적합성",color:"purple"},academic:{label:"학업 역량",color:"red"},growth:{label:"발전 가능성",color:"green"},character:{label:"인성·태도",color:"yellow"},logic:{label:"논리성",color:"blue"},communication:{label:"의사소통",color:"pink"}};function ki(e){if(e.isFocus&&e.focusTitle)return e.focusTitle;const{targetSchool:t,targetMajor:s,interviewType:r}=e;return t&&s?`${t} · ${s}`:t?`${t} 면접 연습`:s?`${s} 면접 연습`:r?`${r} 면접 연습`:"공통 면접 연습"}function np(e){return e.isFocus?{kind:"color",name:"target"}:e.targetSchool?{kind:"emblem",school:e.targetSchool}:e.targetMajor?{kind:"color",name:"major"}:e.interviewType?{kind:"color",name:"clipboard-check"}:{kind:"color",name:"school"}}function Nd({record:e,onResume:t}){const s=ne(),r=ki(e),l=np(e),a=`${Ml[e.mode]} 면접 · ${wn[e.difficulty]} 난이도 · ${e.total}문항`,i=!e.isFocus&&!!e.interviewType&&(!!e.targetSchool||!!e.targetMajor),o=e.status==="in_progress",c=e.total>0?Math.round((e.progress??0)/e.total*100):0;return n.jsxs("div",{className:"flex h-full flex-col gap-[20px] rounded-[20px] bg-neutral-5 px-[28px] pt-[28px] pb-[24px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[l.kind==="emblem"?n.jsx(Sn,{university:l.school,size:64}):n.jsx("div",{className:"flex size-[64px] shrink-0 items-center justify-center rounded-[16px] bg-white",children:n.jsx(V,{name:l.name,size:48})}),n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("p",{className:"min-w-0 truncate text-heading-4-semibold text-neutral-95",children:r}),i&&n.jsx("span",{className:"shrink-0 rounded-[12px] bg-primary-10 px-[8px] py-[3px] text-body-3-medium text-primary-60",children:e.interviewType})]}),n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:a})]}),e.isFocus&&n.jsx("span",{className:"inline-flex h-[26px] shrink-0 items-center self-start rounded-[8px] border border-neutral-20 bg-white px-[8px] text-body-3-medium text-neutral-80",children:"집중연습"})]}),o?n.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-[20px]",children:[n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsxs("div",{className:"flex items-center gap-[4px]",children:[n.jsx("span",{className:"text-heading-4-semibold text-primary-50",children:e.progress??0}),n.jsx("span",{className:"text-body-2-medium text-neutral-95",children:"/"}),n.jsxs("span",{className:"text-body-2-medium text-neutral-95",children:[e.total,"문항"]})]}),n.jsx(Ae,{color:"purple",size:"small",children:"진행중"})]}),n.jsx("div",{className:"h-[6px] w-full overflow-hidden rounded-full bg-neutral-20",children:n.jsx("div",{className:"h-full rounded-full bg-primary-40",style:{width:`${c}%`}})})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-body-3-medium text-neutral-50",children:e.date}),n.jsx($,{variant:"primary",size:"small",onClick:()=>t(e),children:"이어서 연습하기"})]})]}):n.jsxs("div",{className:"flex flex-1 flex-col gap-[16px]",children:[e.feedback.length>0&&n.jsx("div",{className:"flex flex-col gap-[8px] rounded-[8px] bg-white px-[16px] py-[14px]",children:e.feedback.map((d,f)=>n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:`size-[8px] shrink-0 rounded-full ${d.tone==="good"?"bg-success-50":"bg-warning-40"}`}),n.jsx("span",{className:"text-body-3-medium text-neutral-90",children:d.text})]},f))}),n.jsxs("div",{className:"mt-auto flex items-center justify-between",children:[n.jsx("span",{className:"text-body-3-medium text-neutral-50",children:e.date}),n.jsx($,{variant:"secondary",size:"small",onClick:()=>e.isFocus&&e.focusItem?s("/practice/focus/result",{state:{item:e.focusItem,mode:e.mode}}):s(`/practice/result/${e.id}`),children:"결과 보기"})]})]})]})}function sp({item:e,onPractice:t}){const[s,r]=u.useState(!1),l=Io[e.area];return n.jsxs("div",{className:"flex flex-col gap-[24px] rounded-[20px] border border-neutral-20 px-[28px] py-[24px]",children:[n.jsxs("button",{type:"button",onClick:()=>r(a=>!a),className:"flex w-full items-center gap-[16px] text-left",children:[n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:e.title}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:e.summary})]}),n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(Ae,{color:l.color,size:"small",children:l.label}),n.jsxs("span",{className:"text-body-3-medium text-neutral-60",children:["관련 질문 ",e.relatedCount,"개"]})]})]}),n.jsx(S,{name:s?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),s&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex flex-col gap-[24px] rounded-[20px] bg-neutral-5 p-[20px]",children:[n.jsx(Z2,{icon:"idea",label:"개선 포인트",items:e.points}),n.jsx(Z2,{icon:"chat-feedback",label:"관련 질문",items:e.questions})]}),n.jsx($,{variant:"primary",size:"small",className:"self-end",trailingIcon:n.jsx(S,{name:"arrow-right",size:20}),onClick:()=>t(e),children:"이 부분 집중 연습하기"})]})]})}function Z2({icon:e,label:t,items:s}){return n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:e,size:24}),n.jsx("p",{className:"text-body-3-semibold text-neutral-90",children:t})]}),n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsx("ul",{className:"flex flex-col gap-[6px] pl-[8px]",children:s.map((r,l)=>n.jsxs("li",{className:"flex items-start gap-[10px]",children:[n.jsx("span",{className:"mt-[9px] size-[6px] shrink-0 rounded-full bg-neutral-70"}),n.jsx("span",{className:"text-body-2-medium text-neutral-90",children:r})]},l))})]})}function rp(e){const s=e.trim().slice(-1).charCodeAt(0);return s>=44032&&s<=55203?(s-44032)%28!==0?"을":"를":"을"}function bd({target:e,onClose:t}){const s=ne();let r;if(e)if(e.isFocus)r=`"${e.focusTitle??ki(e)}" 집중 연습을 이어서 할까요?`;else{const l=ki(e);r=`${l}${rp(l)} 이어서 할까요?`}return n.jsx(me,{open:!!e,onClose:t,title:r,description:n.jsxs(n.Fragment,{children:["이어서 진행하면 남은 질문부터 계속 연습해요.",n.jsx("br",{}),"지금까지 한 답변은 저장되어있어요."]}),cancelText:"취소",confirmText:"이어서 하기",onConfirm:()=>{const l=e;t(),l&&s(l.mode==="voice"?"/practice/voice":"/practice/text",{state:{resume:!0,sessionId:l.id,progress:l.progress,mode:l.mode,difficulty:l.difficulty,difficultyLabel:wn[l.difficulty],school:l.targetSchool,dept:l.targetMajor}})}})}const U2=6;function lp(){const e=ne(),[t,s]=u.useState([]),[r,l]=u.useState([]),[a,i]=u.useState(!0),[o,c]=u.useState(""),[d,f]=u.useState(null),[p,h]=u.useState(null),y=async()=>{i(!0),c("");try{const[w,g]=await Promise.all([jd(),tp()]);if(w.length===0){e("/practice/new",{replace:!0});return}s(w),l(g)}catch(w){c(ee(w).message)}finally{i(!1)}};u.useEffect(()=>{y()},[]);const v=t.length>U2,C=v?t.slice(0,U2):t;return n.jsxs("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsx("h1",{className:"text-heading-2-semibold text-neutral-100",children:"면접 연습"}),n.jsx("p",{className:"text-body-1-medium text-neutral-80",children:"지금까지 본 면접 연습을 다시 보고, 약한 부분을 다시 연습해요"})]}),n.jsx($,{variant:"primary",size:"medium",className:"shrink-0",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:()=>e("/practice/new",{state:{breadcrumb:!0}}),children:"면접 연습하기"})]}),n.jsx("hr",{className:"my-[48px] border-neutral-10"}),a?n.jsxs("div",{className:"py-[80px] text-center",children:[n.jsx("div",{className:"mx-auto h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsx("p",{className:"mt-[16px] text-body-2-medium text-neutral-60",children:"불러오는 중…"})]}):o?n.jsxs("div",{className:"rounded-[16px] border border-dashed border-danger-20 bg-danger-5 py-[40px] text-center text-body-3-medium text-danger-60",children:[o,n.jsx("button",{onClick:y,className:"ml-[8px] underline",children:"다시 시도"})]}):n.jsxs("div",{className:"flex flex-col gap-[80px]",children:[n.jsxs("section",{className:"flex flex-col gap-[20px]",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"면접 기록"}),v&&n.jsx("button",{onClick:()=>e("/practice/all"),className:"text-body-2-medium text-primary-60",children:"모두 보기"})]}),n.jsx("div",{className:"grid grid-cols-2 gap-[16px]",children:C.map(w=>n.jsx(Nd,{record:w,onResume:f},w.id))})]}),r.length>0&&n.jsxs("section",{className:"flex flex-col gap-[20px]",children:[n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"보완하면 좋은 부분"}),n.jsx("div",{className:"flex flex-col gap-[12px]",children:r.map(w=>n.jsx(sp,{item:w,onPractice:h},w.id))})]})]}),n.jsx(bd,{target:d,onClose:()=>f(null)}),n.jsx(me,{open:!!p,onClose:()=>h(null),title:"보완점 집중 연습을 시작할까요?",description:"이 보완점을 바탕으로 집중 연습을 진행해요.",cancelText:"취소",confirmText:"연습하기",onConfirm:()=>{const w=p;h(null),w&&e("/practice/focus",{state:{item:w}})}})]})}function ap(){const e=ne(),[t,s]=u.useState([]),[r,l]=u.useState("all"),[a,i]=u.useState(!0),[o,c]=u.useState(""),[d,f]=u.useState(null),p=async()=>{i(!0),c("");try{s(await jd())}catch(y){c(ee(y).message)}finally{i(!1)}};u.useEffect(()=>{p()},[]);const h=r==="all"?t:t.filter(y=>y.status==="in_progress");return n.jsxs("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("button",{type:"button",onClick:()=>e("/practice"),"aria-label":"뒤로",className:"shrink-0",children:n.jsx(S,{name:"arrow-left",size:28,className:"text-neutral-100"})}),n.jsx("h1",{className:"text-heading-2-semibold text-neutral-100",children:"면접 기록"})]}),n.jsxs("div",{className:"mt-[40px] flex gap-[8px]",children:[n.jsx(un,{selected:r==="all",onClick:()=>l("all"),children:"전체"}),n.jsx(un,{selected:r==="in_progress",onClick:()=>l("in_progress"),children:"진행중"})]}),a?n.jsxs("div",{className:"py-[80px] text-center",children:[n.jsx("div",{className:"mx-auto h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsx("p",{className:"mt-[16px] text-body-2-medium text-neutral-60",children:"불러오는 중…"})]}):o?n.jsxs("div",{className:"mt-[32px] rounded-[16px] border border-dashed border-danger-20 bg-danger-5 py-[40px] text-center text-body-3-medium text-danger-60",children:[o,n.jsx("button",{onClick:p,className:"ml-[8px] underline",children:"다시 시도"})]}):h.length===0?n.jsx("p",{className:"mt-[40px] text-body-2-medium text-neutral-50",children:"표시할 면접 기록이 없어요."}):n.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-[16px]",children:h.map(y=>n.jsx(Nd,{record:y,onResume:f},y.id))}),n.jsx(bd,{target:d,onClose:()=>f(null)})]})}function Do({selected:e,onClick:t,children:s,className:r=""}){return n.jsx("button",{type:"button",onClick:t,className:`flex flex-1 flex-col items-start gap-[16px] rounded-[20px] border text-left transition-colors ${e?"border-primary-60 bg-primary-5":"border-neutral-10 bg-white hover:border-primary-40"} ${r}`,children:s})}const ip=[{key:"text",icon:"keyboard",title:"텍스트로 면접보기",desc:"답을 글로 적으며 논리와 구성을 다듬어요. 부담 없이 시작하기 좋아요."},{key:"voice",icon:"microphone",title:"음성으로 면접보기",desc:"실제 면접처럼 말하며 연습해요. 말 속도와 멈춤까지 점검할 수 있어요."}];function Ao({value:e,onChange:t,highlightSelected:s=!1}){return n.jsx("div",{className:"flex gap-[16px]",children:ip.map(r=>{const l=e===r.key;return n.jsxs(Do,{selected:l,onClick:()=>t(r.key),className:"p-[28px]",children:[n.jsx(V,{name:r.icon,size:40}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:`text-body-2-semibold ${s&&l?"text-primary-60":"text-neutral-100"}`,children:r.title}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:r.desc})]})]},r.key)})})}function xa({no:e,label:t,optional:s}){return n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("span",{className:"flex size-[24px] items-center justify-center rounded-[8px] bg-primary-60 text-body-3-semibold text-white",children:e}),n.jsx("p",{className:"text-body-2-semibold text-primary-60",children:t}),s&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:"(선택)"})]})}function op({children:e}){return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-[20px]",children:n.jsx("div",{className:"flex min-w-[360px] flex-col items-center gap-[28px] rounded-3xl bg-white px-[24px] pb-[20px] pt-[36px] shadow-[0_2px_10px_rgba(0,0,0,0.15)]",children:e})})}const cp=[{key:"basic",label:"기본",desc:"예상 질문 위주",dots:1,dot:"bg-success-40"},{key:"real",label:"실전",desc:"꼬리 질문 포함",dots:2,dot:"bg-warning-40"},{key:"pressure",label:"압박",desc:"돌발 질문 포함",dots:3,dot:"bg-danger-40"}];function up(){var ae;const e=ne(),s=!!((ae=Ue().state)!=null&&ae.breadcrumb),[r,l]=u.useState(null),[a,i]=u.useState(!0),[o,c]=u.useState("form"),[d,f]=u.useState(null),[p,h]=u.useState(null),[y,v]=u.useState(!1),[C,w]=u.useState(""),[g,x]=u.useState(""),[m,j]=u.useState(""),[b,N]=u.useState("none"),[E,L]=u.useState(0),[I,D]=u.useState(""),[M,P]=u.useState(!1),O=u.useRef(!1),q=u.useRef(null),A=u.useRef(!1);u.useEffect(()=>{let J=!0;return(async()=>{try{const _=(await Ft()).records.reduce((U,ue)=>!U||ue.id>U.id?ue:U,null),Y=_?await qn(_.id):null;if(!J)return;if(!Y){e("/practice/onboarding",{replace:!0});return}l(Y)}catch{J&&e("/practice/onboarding",{replace:!0})}finally{J&&i(!1)}})(),()=>{J=!1}},[e]);const H=()=>{O.current=!0,P(!0),ht(!0)},Z=()=>{if(O.current=!1,P(!1),ht(!1),q.current){const J=q.current;q.current=null,J()}};$s(o==="processing",H);const T=!!d&&!!p,k=async()=>{if(!(!r||!d||!p)){N("none"),c("processing"),L(0),D(""),window.scrollTo({top:0});try{const[J]=await Promise.all([Tl({record_id:r.id,difficulty:El[p],target_university:C||"미지정",target_department:g||"미지정",mode:d==="voice"?"AUDIO":"TEXT"}),wd(r.id,{target_school:C,target_major:g,interview_type:m,mode:d,difficulty:p},Y=>L(Y))]),se=d==="voice"?"/practice/voice":"/practice/text",_=()=>{A.current||e(se,{state:{recordId:r.id,difficulty:p,school:C,dept:g,difficultyLabel:wn[p],sessionId:J}})};O.current?q.current=_:setTimeout(_,400)}catch(J){D(ee(J).message),c("error")}}},z=()=>{!T||!r||!p||(d==="voice"?N("permission"):k())},K=async()=>{var J;if(!((J=navigator.mediaDevices)!=null&&J.getUserMedia)){N("nomic");return}try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(_=>_.stop()),k()}catch(se){const _=se==null?void 0:se.name;N(_==="NotFoundError"||_==="DevicesNotFoundError"||_==="OverconstrainedError"?"nomic":"denied")}},Q=()=>{A.current=!0,O.current=!1,q.current=null,ht(!1),P(!1),e("/practice")},oe=`${d?Ml[d]:"텍스트"} 면접 · ${p?wn[p]:"실전"} 난이도로 약 8개 질문을 진행해요 · 중간에 멈춰도 저장돼요`;return a?n.jsx("div",{className:"py-[160px] text-center",children:n.jsx("div",{className:"mx-auto h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"})}):n.jsxs("div",{className:"mx-auto max-w-[1280px] px-[40px] pt-[80px] pb-[120px]",children:[o==="processing"&&n.jsx(As,{progress:E,className:"pt-[160px]"}),o==="error"&&n.jsx("div",{className:"rounded-[24px] bg-neutral-5 p-[40px]",children:n.jsxs("div",{className:"flex flex-col items-center gap-[24px] py-[40px] text-center",children:[n.jsx(S,{name:"circle-alert-filled",size:56,className:"text-danger-50 fill-white"}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-90",children:"면접 연습 생성에 실패했어요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:I||"잠시 후 다시 시도해주세요."})]}),n.jsxs("div",{className:"flex gap-[12px]",children:[n.jsx($,{variant:"gray",size:"large",onClick:()=>c("form"),children:"이전으로 돌아가기"}),n.jsx($,{variant:"primary",size:"large",onClick:k,children:"다시 시도하기"})]})]})}),o==="form"&&r&&n.jsxs(n.Fragment,{children:[s&&n.jsxs("button",{type:"button",onClick:()=>e(-1),className:"mb-[56px] flex items-center gap-[8px] text-neutral-80 transition-colors hover:text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32}),n.jsx("span",{className:"text-body-1-semibold text-neutral-90",children:"면접 연습하기"})]}),n.jsx("div",{className:"rounded-[28px] bg-neutral-5 px-[56px] pt-[64px] pb-[52px]",children:n.jsxs("div",{className:"flex flex-col gap-[56px]",children:[n.jsxs("div",{className:"flex flex-col gap-[36px]",children:[n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsx(V,{name:"chat-feedback",size:56}),n.jsxs("h1",{className:"text-heading-3-semibold text-neutral-100",children:["예상 질문부터 꼬리 질문까지,",n.jsx("br",{}),"면접을 실전처럼 준비해요"]})]}),n.jsxs("div",{className:"flex items-center justify-between rounded-[16px] bg-white px-[20px] py-[16px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx(V,{name:"file",size:40}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:"생기부 업로드 완료"}),n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:r.filename})]})]}),n.jsx("button",{type:"button",onClick:()=>e("/mypage"),className:"rounded-[8px] bg-neutral-10 px-[6px] py-[2px] text-caption-medium text-neutral-70",children:"변경"})]})]}),n.jsxs("div",{className:"flex flex-col gap-[48px]",children:[n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx(xa,{no:1,label:"연습모드"}),n.jsx(Ao,{value:d,onChange:f})]}),n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx(xa,{no:2,label:"난이도"}),n.jsx("div",{className:"flex gap-[16px]",children:cp.map(J=>n.jsxs(Do,{selected:p===J.key,onClick:()=>h(J.key),className:"p-[24px]",children:[n.jsx("div",{className:"flex items-center gap-[6px]",children:[0,1,2].map(se=>n.jsx("span",{className:`size-[10px] rounded-full ${sev(J=>!J),className:"flex w-full items-center justify-between text-left",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"flex size-[48px] items-center justify-center rounded-full bg-neutral-20",children:n.jsx(V,{name:"search",size:28})}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-100",children:"지원 대학에 맞춘 질문으로 연습하기"}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:"내가 원하는 학교에 맞춘 예상 질문으로 연습해요"})]})]}),n.jsx(S,{name:y?"chevron-up":"chevron-down",size:28,className:"text-neutral-50"})]}),y&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"my-[24px] h-px w-full bg-neutral-10"}),n.jsx(Os,{school:C,onSchool:w,dept:g,onDept:x,appType:m,onAppType:j})]})]})]})]}),n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsx("div",{className:"h-px w-full bg-neutral-10"}),n.jsxs("div",{className:"flex flex-col items-center gap-[16px]",children:[n.jsx("p",{className:"text-center text-body-2-medium text-neutral-50",children:oe}),n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!T,onClick:z,trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"면접 연습 시작하기"})]})]})]})})]}),b==="permission"&&n.jsxs(op,{children:[n.jsxs("div",{className:"flex flex-col items-center gap-[20px]",children:[n.jsx(V,{name:"microphone",size:44}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("p",{className:"whitespace-nowrap text-heading-4-semibold text-neutral-100",children:"음성 면접 모드에는 마이크 권한이 필요해요"}),n.jsxs("p",{className:"text-body-2-medium text-neutral-70",children:["면접관 질문에 소리 내어 답하려면 마이크 사용을 허용해 주세요.",n.jsx("br",{}),"브라우저가 물어보면 ",n.jsx("span",{className:"text-primary-60",children:"허용"}),"을 눌러 주세요."]})]})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:K,children:"확인"})]}),n.jsx(me,{open:b==="denied",onClose:()=>N("none"),alert:!0,title:"마이크 권한이 거부됐어요",description:n.jsxs(n.Fragment,{children:["음성 면접을 하려면 브라우저 주소창의",n.jsx("br",{}),"자물쇠 → 마이크 → 허용으로 바꾼 뒤 다시 시도해 주세요."]}),confirmText:"확인",onConfirm:()=>N("none")}),n.jsx(me,{open:b==="nomic",onClose:()=>N("none"),alert:!0,title:"마이크를 찾을 수 없어요",description:n.jsxs(n.Fragment,{children:["연결된 마이크가 없는 것 같아요.",n.jsx("br",{}),"헤드셋이나 이어폰 마이크를 연결한 뒤 다시 확인해 주세요."]}),confirmText:"확인",onConfirm:()=>N("none")}),n.jsx(Hs,{open:M,onLeave:Q,onStay:Z})]})}function dp(e){return e>=1024*1024?`${Math.round(e/1024/1024)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}function pa({no:e,label:t,optional:s}){return n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("span",{className:"flex size-[24px] items-center justify-center rounded-[8px] bg-primary-60 text-body-3-semibold text-white",children:e}),n.jsx("p",{className:"text-body-2-semibold text-primary-60",children:t}),s&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:"(선택)"})]})}function xp({children:e}){return n.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-[20px]",children:n.jsx("div",{className:"flex min-w-[360px] flex-col items-center gap-[28px] rounded-3xl bg-white px-[24px] pb-[20px] pt-[36px] shadow-[0_2px_10px_rgba(0,0,0,0.15)]",children:e})})}const pp=[{key:"basic",label:"기본",desc:"예상 질문 위주",dots:1,dot:"bg-success-40"},{key:"real",label:"실전",desc:"꼬리 질문 포함",dots:2,dot:"bg-warning-40"},{key:"pressure",label:"압박",desc:"돌발 질문 포함",dots:3,dot:"bg-danger-40"}];function fp(){const e=ne(),[t,s]=u.useState("upload"),[r,l]=u.useState(null),[a,i]=u.useState(!1),[o,c]=u.useState(!1),[d,f]=u.useState(!1),[p,h]=u.useState(null),[y,v]=u.useState(null),[C,w]=u.useState(!1),[g,x]=u.useState(""),[m,j]=u.useState(""),[b,N]=u.useState(""),[E,L]=u.useState("none"),[I,D]=u.useState(0),[M,P]=u.useState(""),[O,q]=u.useState(!1),A=u.useRef(null),H=u.useRef(!1),Z=u.useRef(null),T=u.useRef(!1),k=!!p&&!!y,z=()=>{H.current=!0,q(!0),ht(!0)},K=()=>{if(H.current=!1,q(!1),ht(!1),Z.current){const _=Z.current;Z.current=null,_()}};$s(t==="processing",z);const Q=_=>{var U;const Y=((U=_.name.split(".").pop())==null?void 0:U.toLowerCase())??"";if(!["pdf","html","htm"].includes(Y)){i(!0);return}l(_)},oe=async()=>{if(!(!r||!p||!y)){L("none"),s("processing"),D(0),P(""),window.scrollTo({top:0});try{const{presignedUrl:_,s3Key:Y}=await bl(r.name);await kl(_,r);const U=(r.name.replace(/\.[^./\\]+$/,"").trim()||"내 생기부").slice(0,28);await Sl({title:U,filename:r.name,s3Key:Y},He=>D(Math.round(He*.4)));const F=(await Ft()).records.reduce((He,X)=>!He||X.id>He.id?X:He,null);if(!F)throw new Error("업로드된 생기부를 찾을 수 없어요.");const[G]=await Promise.all([Tl({record_id:F.id,difficulty:El[y],target_university:g||"미지정",target_department:m||"미지정",mode:p==="voice"?"AUDIO":"TEXT"}),wd(F.id,{target_school:g,target_major:m,interview_type:b,mode:p,difficulty:y},He=>D(40+Math.round(He*.6)))]),Ne=p==="voice"?"/practice/voice":"/practice/text",vt=()=>{T.current||e(Ne,{state:{recordId:F.id,difficulty:y,school:g,dept:m,difficultyLabel:wn[y],sessionId:G}})};H.current?Z.current=vt:setTimeout(vt,400)}catch(_){P(ee(_).message),s("setup")}}},ae=()=>{!k||!r||(p==="voice"?L("permission"):oe())},J=async()=>{var _;if(!((_=navigator.mediaDevices)!=null&&_.getUserMedia)){L("nomic");return}try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(U=>U.stop()),oe()}catch(Y){const U=Y==null?void 0:Y.name;L(U==="NotFoundError"||U==="DevicesNotFoundError"||U==="OverconstrainedError"?"nomic":"denied")}},se=()=>{T.current=!0,H.current=!1,Z.current=null,ht(!1),q(!1),e("/practice")};return n.jsxs(n.Fragment,{children:[t==="processing"&&n.jsx("div",{className:"mx-auto max-w-[1280px] px-[40px] pb-[120px]",children:n.jsx(As,{progress:I,paused:O,className:"pt-[160px]"})}),t==="upload"&&n.jsxs("div",{className:"flex flex-col items-center px-[40px] pb-[120px] pt-[120px]",children:[n.jsxs("div",{className:"mb-[56px] flex flex-col items-center gap-[4px] text-center",children:[n.jsx("h1",{className:"text-heading-3-bold text-neutral-100",children:"생활기록부를 올려주세요"}),n.jsx("p",{className:"text-body-1-medium text-neutral-60",children:"내 생활기록부를 올리면 맞춤 면접 연습을 시작할 수 있어요"})]}),n.jsxs("div",{className:"flex flex-col items-center gap-[40px]",children:[n.jsx("input",{ref:A,type:"file",accept:".pdf,.html,.htm",className:"hidden",onChange:_=>{var Y;return((Y=_.target.files)==null?void 0:Y[0])&&Q(_.target.files[0])}}),r?n.jsxs("div",{className:"flex w-[600px] flex-col gap-[56px]",children:[n.jsxs("div",{className:"flex items-center justify-between rounded-[20px] bg-neutral-5 px-[20px] py-[22px]",children:[n.jsxs("div",{className:"flex items-center gap-[16px]",children:[n.jsx(V,{name:"file",size:48}),n.jsxs("div",{className:"flex flex-col gap-[2px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:r.name}),n.jsx("p",{className:"text-body-3-medium text-neutral-50",children:dp(r.size)})]})]}),n.jsx("button",{type:"button","aria-label":"파일 제거",onClick:()=>{l(null),A.current&&(A.current.value="")},children:n.jsx(S,{name:"circle-cancel-filled",size:28,className:"text-neutral-40 hover:text-neutral-50 fill-white"})})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:()=>s("setup"),trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"다음"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{onClick:()=>{var _;return(_=A.current)==null?void 0:_.click()},onDragOver:_=>{_.preventDefault(),c(!0)},onDragLeave:()=>c(!1),onDrop:_=>{var U;_.preventDefault(),c(!1);const Y=(U=_.dataTransfer.files)==null?void 0:U[0];Y&&Q(Y)},className:`relative flex h-[311px] w-[781px] cursor-pointer flex-col items-center justify-center gap-[16px] rounded-[24px] p-[36px] shadow-soft transition-colors ${o?"bg-primary-5 text-primary-60":"bg-white text-neutral-20 hover:bg-primary-5 hover:text-primary-40"}`,children:[n.jsx("svg",{className:"pointer-events-none absolute inset-0",width:"781",height:"311","aria-hidden":"true",children:n.jsx("rect",{x:"1",y:"1",width:"779",height:"309",rx:"23",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:"10 10"})}),n.jsx(V,{name:"file-upload",size:56}),n.jsxs("p",{className:"text-center text-body-2-medium text-neutral-70",children:["PDF 또는 HTML 파일을 여기로 끌어오거나",n.jsx("br",{}),"클릭해서 선택해주세요"]})]}),n.jsxs("div",{className:"flex items-center gap-[16px] text-center",children:[n.jsx("span",{className:"text-body-2-regular text-neutral-50",children:"생기부 파일이 없으신가요?"}),n.jsx("button",{type:"button",onClick:()=>f(!0),className:"text-body-2-semibold text-primary-60 hover:underline",children:"다운로드 방법 보기"})]})]})]})]}),t==="setup"&&n.jsxs("div",{className:"mx-auto flex w-[600px] flex-col gap-[56px] pb-[120px] pt-[120px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[4px] text-center",children:[n.jsx("h1",{className:"text-heading-3-bold text-neutral-100",children:"어떻게 연습할지 골라주세요"}),n.jsxs("p",{className:"text-body-1-medium text-neutral-60",children:["방식과 난이도만 골라도 바로 시작할 수 있어요.",n.jsx("br",{}),"맞춤 설정은 선택이에요."]})]}),n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx(pa,{no:1,label:"연습모드"}),n.jsx(Ao,{value:p,onChange:h})]}),n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx(pa,{no:2,label:"난이도"}),n.jsx("div",{className:"flex gap-[16px]",children:pp.map(_=>n.jsxs(Do,{selected:y===_.key,onClick:()=>v(_.key),className:"flex-1 p-[24px]",children:[n.jsx("div",{className:"flex items-center gap-[6px]",children:[0,1,2].map(Y=>n.jsx("span",{className:`size-[10px] rounded-full ${Y<_.dots?_.dot:"bg-neutral-20"}`},Y))}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-100",children:_.label}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:_.desc})]})]},_.key))})]}),n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsx(pa,{no:3,label:"맞춤 설정",optional:!0}),n.jsxs("div",{className:"rounded-[20px] border border-neutral-10 bg-white p-[24px]",children:[n.jsxs("button",{type:"button",onClick:()=>w(_=>!_),className:"flex w-full items-center justify-between text-left",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"flex size-[48px] items-center justify-center rounded-full bg-neutral-20",children:n.jsx(V,{name:"search",size:28})}),n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-100",children:"지원 대학에 맞춘 질문으로 연습하기"}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:"내가 원하는 학교에 맞춘 예상 질문으로 연습해요"})]})]}),n.jsx(S,{name:C?"chevron-up":"chevron-down",size:28,className:"text-neutral-50"})]}),C&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"my-[24px] h-px w-full bg-neutral-10"}),n.jsx(Os,{school:g,onSchool:x,dept:m,onDept:j,appType:b,onAppType:N})]})]})]})]}),n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!k,onClick:ae,trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"면접 연습 시작하기"}),M&&n.jsx("p",{className:"text-center text-body-3-semibold text-danger-60",children:M})]})]}),n.jsx(_o,{open:d,onClose:()=>f(!1)}),n.jsx(wl,{open:a,onClose:()=>i(!1)}),E==="permission"&&n.jsxs(xp,{children:[n.jsx(V,{name:"microphone",size:44}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("p",{className:"whitespace-nowrap text-heading-4-semibold text-neutral-100",children:"음성 면접 모드에는 마이크 권한이 필요해요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"면접관 질문에 소리 내어 답하려면 마이크 사용을 허용해 주세요."})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:J,children:"확인"})]}),n.jsx(me,{open:E==="denied",onClose:()=>L("none"),alert:!0,title:"마이크 권한이 거부됐어요",description:n.jsxs(n.Fragment,{children:["음성 면접을 하려면 브라우저 주소창의",n.jsx("br",{}),"자물쇠 → 마이크 → 허용으로 바꾼 뒤 다시 시도해 주세요."]}),confirmText:"확인",onConfirm:()=>L("none")}),n.jsx(me,{open:E==="nomic",onClose:()=>L("none"),alert:!0,title:"마이크를 찾을 수 없어요",description:n.jsxs(n.Fragment,{children:["연결된 마이크가 없는 것 같아요.",n.jsx("br",{}),"헤드셋이나 이어폰 마이크를 연결한 뒤 다시 확인해 주세요."]}),confirmText:"확인",onConfirm:()=>L("none")}),n.jsx(Hs,{open:O,onLeave:se,onStay:K})]})}const q2="실전";function mp(e){const t=e.charCodeAt(e.length-1);return t<44032||t>55203||(t-44032)%28===0?"를":"을"}function hp(){const e=ne(),{state:t}=Ue(),s=(t==null?void 0:t.item)??null,[r,l]=u.useState(null);if(u.useEffect(()=>{window.scrollTo(0,0)},[]),!s)return n.jsx(Rs,{to:"/practice",replace:!0});const a=Io[s.area],i=`${r?Ml[r]:"텍스트"} 면접 · ${q2} 난이도로 약 ${s.relatedCount}개 질문을 진행해요 · 중간에 멈춰도 저장돼요`,o=()=>{!r||!s||e(r==="voice"?"/practice/voice":"/practice/text",{state:{difficulty:"real",difficultyLabel:q2,focusArea:s.area,focusItem:s}})};return n.jsxs("div",{className:"mx-auto max-w-[1240px] px-[40px] pt-[80px] pb-[120px]",children:[n.jsxs("button",{type:"button",onClick:()=>e(-1),className:"mb-[56px] flex items-center gap-[12px] text-neutral-80 transition-colors hover:text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32}),n.jsx("span",{className:"text-heading-4-semibold text-neutral-100",children:"집중 연습하기"})]}),n.jsx("div",{className:"rounded-[24px] bg-neutral-5 px-[56px] pt-[56px] pb-[52px]",children:n.jsxs("div",{className:"flex flex-col gap-[56px]",children:[n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[n.jsxs("h1",{className:"text-heading-3-semibold",children:[n.jsx("span",{className:"text-primary-60",children:s.title}),n.jsx("span",{className:"text-neutral-100",children:mp(s.title)}),n.jsx("br",{}),n.jsx("span",{className:"text-neutral-100",children:"집중 연습해볼까요?"})]}),n.jsxs("div",{className:"flex flex-col gap-[16px] rounded-[20px] bg-white px-[28px] py-[24px]",children:[n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-90",children:s.title}),n.jsx(Ae,{color:a.color,size:"small",children:a.label})]}),n.jsxs("p",{className:"text-body-2-medium text-neutral-60",children:["생기부 기반 ",n.jsxs("span",{className:"text-primary-60",children:[s.relatedCount,"문항"]})," · ",n.jsx("span",{className:"text-primary-60",children:"내 경험 중심으로"})," 나와요"]})]}),n.jsx("ul",{className:"flex flex-col gap-[6px] pl-[8px]",children:s.points.map((c,d)=>n.jsxs("li",{className:"flex items-start gap-[10px]",children:[n.jsx("span",{className:"mt-[9px] size-[6px] shrink-0 rounded-full bg-neutral-70"}),n.jsx("span",{className:"text-body-2-medium text-neutral-90",children:c})]},d))})]})]}),n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsx("p",{className:"text-body-2-medium text-neutral-50",children:"연습모드 설정"}),n.jsx(Ao,{value:r,onChange:l,highlightSelected:!0})]}),n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsxs("div",{className:"flex flex-col items-center gap-[16px]",children:[n.jsx("p",{className:"text-center text-body-2-medium text-neutral-50",children:i}),n.jsx($,{variant:"primary",size:"large",className:"w-full",disabled:!r,onClick:o,trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"집중 연습 시작하기"})]})]})]})})]})}const gp=[{key:"danger",label:"위험",text:"text-danger-50",track:"bg-danger-50"},{key:"caution",label:"소신",text:"text-warning-50",track:"bg-warning-50"},{key:"fit",label:"적정",text:"text-success-50",track:"bg-success-50"},{key:"stable",label:"안정",text:"text-primary-60",track:"bg-primary-60"}];function Cp(e){return e<25?"danger":e<50?"caution":e<75?"fit":"stable"}function yp(e){return e.isFirstPractice?{title:"첫 연습을 완주했어요",sub:"이번 연습을 바탕으로 결과를 정리했어요"}:{title:"오늘도 실전에 한 걸음 더 가까워졌어요",sub:"지난 연습과 비교해서 달라진 점을 확인해봐요"}}function vp(e){const{targetSchool:t,targetMajor:s,interviewType:r}=e;return t&&s?`${t} · ${s}`:t?`${t} 면접 연습`:s?`${s} 면접 연습`:r?`${r} 면접 연습`:"공통 면접 연습"}function jp(e){return e.targetSchool?{kind:"emblem",school:e.targetSchool}:e.targetMajor?{kind:"color",name:"major"}:e.interviewType?{kind:"color",name:"clipboard-check"}:{kind:"color",name:"school"}}function wp(e){return!!e.interviewType&&(!!e.targetSchool||!!e.targetMajor)}const Np="카리면접 연습 기록으로 추정한 참고 지표예요. 실제 합격을 예측하거나 보장하지 않아요. 학교·전형·실제 면접 컨디션에 따라 결과는 달라질 수 있어요.",el=[{kind:"good",title:"문제 해결 경험 구체적으로 설명하기",desc:'"무엇을 했다"가 아니라 어떤 문제를 어떻게 해결했는지까지 보여줘 전공 적합성이 자연스럽게 드러났어요.'},{kind:"good",title:"전공과 경험 연결하기",desc:"활동 경험을 나열하는 데서 끝나지 않고 컴퓨터공학에 대한 관심과 배운 점으로 연결했어요."},{kind:"improve",title:"결론부터 말하기",desc:"답변 초반이 길어져 핵심이 늦게 전달됐어요. 먼저 결론을 말하면 면접관이 내용을 더 쉽게 따라올 수 있어요.",example:{before:"저는 평소에 데이터를 다루는 걸 좋아했고, 그래서 여러 가지 프로젝트를 진행했는데 그중에서 스마트 화분이…",after:"가장 기억에 남는 건 스마트 화분 프로젝트예요. 센서 오차 문제를 직접 정의하고 해결한 경험이 있습니다."}},{kind:"improve",title:"본인의 판단 근거 더 명확히 설명하기",desc:'"평균값을 사용했다", "기준값을 조정했다"는 설명은 있었지만 왜 그런 판단을 했는지에 대한 근거가 조금 더 드러나면 좋아요.',example:{before:"평균값을 사용했습니다.",after:"튀는 값이 많아 중앙값보다 평균이 노이즈에 덜 민감하다고 판단해 평균값을 사용했습니다."}}],v1=[{no:"1",followup:!1,mode:"text",answerState:"normal",question:"생기부를 보니 과학 동아리에서 아두이노를 활용한 스마트 화분 제작 활동을 했네요. 어떤 프로젝트였는지 설명해 주세요.",tags:[{label:"강점 먼저 제시",tone:"good"},{label:"핵심 압축",tone:"warn"}],answer:"스마트 화분은 토양 습도 센서로 흙의 상태를 측정해 일정 기준 이하로 마르면 자동으로 물을 주는 장치예요. 아두이노로 센서 값을 읽고 펌프를 제어했습니다.",exampleAnswer:"문제 정의 → 내가 한 역할 → 배운 점 순으로, 센서 오차를 어떻게 보정했는지 구체적으로 말하면 좋아요.",tip:"결론(무엇을 만들었는지)부터 한 문장으로 말하고, 그다음 과정을 덧붙이세요."},{no:"1-1",followup:!0,mode:"text",answerState:"normal",question:"센서값이 일정하지 않았다고 했는데, 그 원인이 무엇이라고 생각했나요?",tags:[{label:"경험 구체적 설명",tone:"good"},{label:"본인 역할 설명",tone:"good"},{label:"근거 구체화",tone:"warn"}],answer:"습도 센서가 흙의 위치나 수분 분포에 따라 값이 튀었습니다. 그래서 여러 번 측정해 평균값을 사용했어요.",exampleAnswer:"원인 가설 → 검증 방법 → 결과 순으로 설명하면 분석력이 더 잘 보여요.",tip:'"왜 그렇게 판단했는지" 근거를 한 문장 더 붙이세요.'},{no:"1-2",followup:!0,mode:"text",answerState:"normal",question:"평균값을 사용한 이유는 무엇인가요? 평균값 말고 다른 방법은 없었을까요?",tags:[{label:"경험-진로 연결",tone:"good"},{label:"전공 근거 보완",tone:"warn"}],answer:"평균값이 구현이 간단해서 사용했습니다.",exampleAnswer:"중앙값·이동평균 등 대안을 언급하고, 왜 평균을 택했는지 트레이드오프로 설명해 보세요.",tip:"대안을 알고 있다는 걸 보여주면 더 좋아요."},{no:"2",followup:!1,mode:"text",answerState:"normal",question:"진로를 컴퓨터공학으로 정하게 된 결정적 계기는 무엇인가요?",tags:[{label:"경험-진로 연결",tone:"good"},{label:"전공 근거 보완",tone:"warn"}],answer:"스마트 화분을 만들며 코드로 실제 문제를 푸는 게 즐거웠고, 그때 진로를 정했습니다.",exampleAnswer:"계기 → 그 후의 노력 → 지원 전공 연결 순으로 구성해 보세요.",tip:"계기 이후 어떤 노력을 했는지 한 줄 덧붙이면 설득력이 올라가요."},{no:"3",followup:!1,mode:"text",answerState:"normal",question:"이 프로젝트를 다시 진행한다면 어떤 기능을 추가해 보고 싶나요?",tags:[{label:"경험-진로 연결",tone:"good"},{label:"전공 근거 보완",tone:"warn"}],answer:"현재는 습도만 측정해 물을 공급하는 수준이지만, 와이파이 모듈을 추가해 스마트폰으로 실시간 상태를 확인할 수 있도록 개선해 보고 싶습니다.",exampleAnswer:"추가 기능 → 그 기능이 필요한 이유 → 구현 아이디어 순으로 말하면 좋아요.",tip:'"왜 그 기능인지" 사용자 관점의 이유를 곁들이세요.'}],Ie={targetSchool:"서울대학교",targetMajor:"컴퓨터공학부",interviewType:"학생부종합",mode:"text",difficulty:"real",total:18,date:"2026.06.01",recordFile:"이소희_생활기록부.pdf",recordDate:"2026.06.10",isFirstPractice:!1,passState:"ok",passPercent:62,summary:el,questions:v1},bp={base:{label:"기본(재연습·산출·잘한+보완)",data:Ie},first:{label:"2-A 첫 연습",data:{...Ie,isFirstPractice:!0}},insufficient:{label:"3-B 데이터 부족",data:{...Ie,passState:"insufficient"}},"pass-error":{label:"3-C 합격예상 오류",data:{...Ie,passState:"error"}},"band-danger":{label:"E 구간: 위험",data:{...Ie,passPercent:14}},"band-stable":{label:"E 구간: 안정",data:{...Ie,passPercent:88}},"improve-only":{label:"4-B 보완할 점만",data:{...Ie,summary:el.filter(e=>e.kind==="improve")}},"good-only":{label:"4-C 잘한 점만",data:{...Ie,summary:el.filter(e=>e.kind==="good")}},"1a":{label:"1-A 선택 없음 · 건물",data:{...Ie,targetSchool:"",targetMajor:"",interviewType:""}},"1b":{label:"1-B 학교만 · 엠블럼",data:{...Ie,targetMajor:"",interviewType:""}},"1c":{label:"1-C 학과만 · 학사모",data:{...Ie,targetSchool:"",interviewType:""}},"1d":{label:"1-D 전형만 · 클립보드",data:{...Ie,targetSchool:"",targetMajor:""}},"1e":{label:"1-E 학교+학과",data:{...Ie,interviewType:""}},"1f":{label:"1-F 학교+전형(칩)",data:{...Ie,targetMajor:""}},"1g":{label:"1-G 학과+전형(칩)·학사모",data:{...Ie,targetSchool:""}},"q-states":{label:"5-C 짧은 답변 문항",data:{...Ie,questions:[{...v1[0],answerState:"short",answer:"음… 잘 기억이 안 나요. 그냥 센서로 물 주는 거 만들었어요.",tags:[{label:"내용 구체화",tone:"warn"}]},...v1.slice(1)]}},voice:{label:"음성 면접 — 내 답변 다시듣기",data:{...Ie,mode:"voice",questions:v1.map(e=>({...e,mode:"voice"}))}}},kp="base",Sp="linear-gradient(90deg, #FFB3AF 7%, #FFE39F 37%, #9EEACA 62%, #B2B6F4 89%)",Lp={danger:"text-danger-50",caution:"text-warning-50",fit:"text-success-50",stable:"text-primary-60"};function kd({state:e,percent:t}){const s=Cp(t);return n.jsxs("div",{className:"flex w-full flex-col gap-[24px] overflow-hidden rounded-[28px] bg-primary-5 px-[36px] py-[32px]",children:[n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-80",children:"합격 예상"}),n.jsx("span",{className:"rounded-[8px] bg-white px-[8px] py-[4px] text-body-3-medium text-neutral-60",children:"참고용"})]}),e==="ok"&&n.jsxs("div",{className:"flex items-center gap-[6px]",children:[n.jsx("span",{className:"pt-[8px] text-body-2-medium text-neutral-80",children:"약"}),n.jsx("span",{className:"text-display-2 text-primary-60",children:t}),n.jsx("span",{className:"pt-[8px] text-body-2-medium text-neutral-80",children:"%"})]})]}),e==="ok"?n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("div",{className:"relative h-[20px] w-full rounded-full border-[1.2px] border-white",style:{backgroundImage:Sp},role:"meter","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,children:n.jsx("span",{className:`pointer-events-none absolute bottom-[2px] -translate-x-1/2 ${Lp[s]}`,style:{left:`${Math.max(0,Math.min(100,t))}%`,filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"},children:n.jsx("svg",{width:"34",height:"32",viewBox:"0 0 40 38",fill:"none","aria-hidden":"true",children:n.jsx("path",{d:"M11 5H29C32.5 5 34.3 7.7 32.6 10.8L22.6 28.2C20.6 31.8 19.4 31.8 17.4 28.2L7.4 10.8C5.7 7.7 7.5 5 11 5Z",fill:"currentColor",stroke:"white",strokeWidth:"2.2",strokeLinejoin:"round"})})})}),n.jsx("div",{className:"flex gap-[20px]",children:gp.map(r=>n.jsx("div",{className:"flex flex-1 items-center justify-center px-[8px] py-[3px]",children:n.jsx("span",{className:`text-body-2-semibold ${r.text}`,children:r.label})},r.key))})]}):e==="insufficient"?n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"연습이 더 쌓이면 합격 예상을 보여드려요."}):n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(S,{name:"circle-alert-filled",size:20,className:"fill-white text-danger-50"}),n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:"합격 예상을 불러오지 못했어요 · 잠시 후 다시 확인해 주세요."})]}),n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(S,{name:"circle-alert-filled",size:20,className:"shrink-0 fill-white text-neutral-40"}),n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:Np})]})]})}function Ep({no:e,item:t}){return n.jsxs("div",{className:"flex w-full flex-col gap-[8px] rounded-[16px] bg-success-5 px-[24px] py-[26px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsxs("span",{className:"shrink-0 rounded-full bg-success-50 px-[8px] py-[2px] text-body-2-semibold text-white",children:["잘한 점 ",e]}),n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:t.title})]}),t.desc&&n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:t.desc})]})}function Tp({no:e,item:t}){const[s,r]=u.useState(!1);return n.jsxs("div",{className:"flex w-full flex-col gap-[12px] rounded-[16px] bg-warning-5 px-[24px] py-[26px]",children:[n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsxs("span",{className:"shrink-0 rounded-full bg-warning-40 px-[8px] py-[2px] text-body-2-semibold text-white",children:["보완할 점 ",e]}),n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:t.title})]}),t.desc&&n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:t.desc})]}),t.example&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",onClick:()=>r(l=>!l),className:"flex items-center gap-[4px] self-start text-body-2-medium text-neutral-60",children:["예시보기",n.jsx(S,{name:s?"chevron-up":"chevron-down",size:24})]}),s&&n.jsxs("div",{className:"flex flex-col gap-[12px] rounded-[12px] bg-white p-[20px]",children:[n.jsxs("div",{className:"flex flex-col gap-[6px]",children:[n.jsx("span",{className:"text-body-3-semibold text-neutral-50",children:"Before"}),n.jsx("p",{className:"text-body-2-medium text-neutral-80",children:t.example.before})]}),n.jsx("div",{className:"h-px w-full bg-neutral-10"}),n.jsxs("div",{className:"flex flex-col gap-[6px]",children:[n.jsx("span",{className:"text-body-3-semibold text-primary-60",children:"After"}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:t.example.after})]})]})]})]})}function Sd({items:e}){const t=e.filter(r=>r.kind==="good"),s=e.filter(r=>r.kind==="improve");return n.jsxs("section",{className:"flex flex-col gap-[20px]",children:[n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"이번 면접 연습 요약"}),n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[t.map((r,l)=>n.jsx(Ep,{no:l+1,item:r},`good-${l}`)),s.map((r,l)=>n.jsx(Tp,{no:l+1,item:r},`imp-${l}`)),t.length>0&&s.length===0&&n.jsx("p",{className:"px-[4px] text-body-2-medium text-neutral-60",children:"이번엔 특별히 고칠 점이 없었어요."})]})]})}const Mp=[32,14,32,22,28,28,32,24,32,14,32,22,28,32,18,22,24,32,14,32,24,14],_p=e=>{const t=Math.max(0,Math.round(e));return`${String(Math.floor(t/60)).padStart(2,"0")}:${String(t%60).padStart(2,"0")}`};function zp({src:e,total:t=42}){const s=u.useRef(null),[r,l]=u.useState(!1),[a,i]=u.useState(t);u.useEffect(()=>{const c=s.current;if(!c)return;const d=()=>i(Math.max(0,(c.duration||t)-c.currentTime)),f=()=>i(c.duration||t),p=()=>{l(!1),i(c.duration||t)};return c.addEventListener("timeupdate",d),c.addEventListener("loadedmetadata",f),c.addEventListener("ended",p),()=>{c.removeEventListener("timeupdate",d),c.removeEventListener("loadedmetadata",f),c.removeEventListener("ended",p)}},[t]),u.useEffect(()=>{if(e||!r)return;const c=setInterval(()=>{i(d=>d<=1?(l(!1),0):d-1)},1e3);return()=>clearInterval(c)},[r,e]);const o=()=>{if(e){const c=s.current;if(!c)return;c.paused?(c.play(),l(!0)):(c.pause(),l(!1));return}a===0&&i(t),l(c=>!c)};return n.jsxs("div",{className:"flex w-[390px] max-w-full items-center gap-[16px] rounded-[16px] bg-white p-[16px] shadow-frame",children:[e&&n.jsx("audio",{ref:s,src:e,preload:"metadata"}),n.jsx("button",{type:"button","aria-label":r?"일시정지":"재생",onClick:o,className:"flex size-[32px] shrink-0 items-center justify-center rounded-full bg-primary-50 text-white",children:n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:r?n.jsx("path",{d:"M11 18C11 18.5304 10.7891 19.039 10.4141 19.4141C10.039 19.7891 9.53043 20 9 20H7C6.46957 20 5.96101 19.7891 5.58594 19.4141C5.21086 19.039 5 18.5304 5 18V6C5 5.46957 5.21087 4.96101 5.58594 4.58594C5.96101 4.21087 6.46957 4 7 4H9C9.53043 4 10.039 4.21087 10.4141 4.58594C10.7891 4.96101 11 5.46957 11 6V18ZM19 18C19 18.5304 18.7891 19.039 18.4141 19.4141C18.039 19.7891 17.5304 20 17 20H15C14.4696 20 13.961 19.7891 13.5859 19.4141C13.2109 19.039 13 18.5304 13 18V6C13 5.46957 13.2109 4.96101 13.5859 4.58594C13.961 4.21087 14.4696 4 15 4H17C17.5304 4 18.039 4.21086 18.4141 4.58594C18.7891 4.96101 19 5.46957 19 6V18Z",fill:"currentColor"}):n.jsx("path",{d:"M9.35254 4.27371C7.8868 3.37212 6 4.42679 6 6.14774V17.8528C6.00021 19.5737 7.88686 20.6276 9.35254 19.7259L18.8633 13.8733C20.2592 13.0142 20.2592 10.9853 18.8633 10.1263L9.35254 4.27371Z",fill:"currentColor"})})}),n.jsx("div",{className:"flex flex-1 items-center justify-between overflow-hidden",children:Mp.map((c,d)=>n.jsx("span",{className:"w-[4px] shrink-0 origin-center rounded-full bg-primary-40",style:{height:`${c}px`,...r?{animation:"wfPulse 0.9s ease-in-out infinite",animationDelay:`${d%6*90}ms`}:{}}},d))}),n.jsx("span",{className:"shrink-0 text-body-3-regular text-neutral-70",children:_p(a)}),n.jsx("style",{children:"@keyframes wfPulse{0%,100%{transform:scaleY(0.45)}50%{transform:scaleY(1)}}"})]})}function Pp(){const e=["audio/webm;codecs=opus","audio/webm","audio/ogg;codecs=opus","audio/mp4"];for(const t of e)if(typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported(t))return t}function Rp({mode:e,onChange:t}){const s=[{key:"text",icon:"keyboard",label:"텍스트"},{key:"voice",icon:"microphone",label:"음성"}];return n.jsx("div",{className:"flex items-center rounded-[24px] bg-neutral-10 p-[4px]",children:s.map(r=>{const l=e===r.key;return n.jsxs("button",{type:"button",onClick:()=>t(r.key),className:`flex items-center gap-[4px] rounded-full py-[6px] pl-[12px] pr-[14px] text-body-3-semibold transition-colors ${l?"bg-white text-neutral-80 shadow-frame":"text-neutral-40"}`,children:[n.jsx("span",{className:l?"":"opacity-40",children:n.jsx(V,{name:r.icon,size:24})}),r.label]},r.key)})})}function Ip({tone:e,text:t}){const s=e==="good";return n.jsxs("div",{className:`flex w-full flex-col gap-[10px] rounded-[16px] px-[24px] py-[16px] ${s?"bg-success-5":"bg-warning-5"}`,children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(S,{name:s?"circle-check-filled":"circle-alert-filled",size:24,className:s?"fill-white text-success-50":"fill-white text-warning-50"}),n.jsx("p",{className:"text-body-3-semibold text-neutral-90",children:"간단 피드백"})]}),n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:t})]})}function Dp({question:e,onClose:t}){const[s,r]=u.useState(e.mode),[l,a]=u.useState(""),[i,o]=u.useState("idle"),[c,d]=u.useState(null),[f,p]=u.useState(!1),[h,y]=u.useState(""),v=u.useRef(null),C=u.useRef([]),w=u.useRef(null),g=u.useRef(!1),x=l.trim(),j=(s==="text"||i==="done")&&x.length>0&&!c&&!f,b=M=>{M!==s&&((i==="recording"||i==="transcribing")&&(g.current=!0,v.current&&v.current.state!=="inactive"&&v.current.stop(),N(),o("idle"),a("")),r(M),d(null),y(""))},N=()=>{var M;(M=w.current)==null||M.getTracks().forEach(P=>P.stop()),w.current=null},E=async()=>{y(""),d(null),g.current=!1;try{const M=await navigator.mediaDevices.getUserMedia({audio:!0});w.current=M;const P=Pp(),O=P?new MediaRecorder(M,{mimeType:P}):new MediaRecorder(M);C.current=[],O.ondataavailable=q=>{q.data.size>0&&C.current.push(q.data)},O.onstop=async()=>{if(N(),g.current)return;const q=new Blob(C.current,{type:O.mimeType||"audio/webm"});o("transcribing");try{const A=await Q7(q);if(g.current)return;a(A),o("done")}catch(A){if(g.current)return;y(ee(A).message),o("idle")}},v.current=O,O.start(),o("recording")}catch{y("마이크 권한이 필요해요. 브라우저 권한을 허용해 주세요."),o("idle")}},L=()=>{var M;(M=v.current)==null||M.stop()},I=()=>{o("idle"),a(""),d(null),y("")};u.useEffect(()=>()=>{var M;g.current=!0,v.current&&v.current.state!=="inactive"&&v.current.stop(),(M=w.current)==null||M.getTracks().forEach(P=>P.stop())},[]);const D=async()=>{if(j){p(!0),y("");try{const M=await K7(e.question,x);d(M)}catch(M){y(ee(M).message)}finally{p(!1)}}};return n.jsxs("div",{className:"flex flex-col gap-[20px] rounded-[20px] bg-white px-[28px] py-[24px]",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("span",{className:"text-body-1-semibold text-neutral-90",children:"다시 답해보기"}),n.jsx("span",{className:"text-body-3-medium text-neutral-50",children:"대답이 저장되지 않아요"})]}),n.jsx("button",{type:"button",onClick:t,"aria-label":"닫기",className:"text-neutral-50 transition-colors hover:text-neutral-80",children:n.jsx(S,{name:"cancel",size:28})})]}),s==="text"?n.jsx("div",{className:"flex flex-col gap-[12px] rounded-[24px] border border-neutral-10 p-[24px]",children:n.jsx("textarea",{value:l,onChange:M=>a(M.target.value),placeholder:"면접관에게 답하듯 다시 작성해보세요.",className:"max-h-[130px] min-h-[78px] w-full resize-none bg-transparent text-body-2-medium text-neutral-90 outline-none placeholder:text-neutral-40"})}):vd?i==="done"?n.jsxs("div",{className:"flex flex-col gap-[12px] rounded-[24px] border border-neutral-10 p-[24px]",children:[n.jsx("p",{className:"whitespace-pre-wrap text-body-2-medium text-neutral-90",children:l}),n.jsxs("button",{type:"button",onClick:I,className:"flex items-center gap-[4px] self-start text-body-3-medium text-primary-60",children:[n.jsx(S,{name:"reset",size:20}),"다시 녹음하기"]})]}):n.jsx("div",{className:"rounded-[24px] border border-neutral-10 p-[24px]",children:n.jsxs("div",{className:"flex items-center gap-[20px]",children:[n.jsx("button",{type:"button","aria-label":i==="recording"?"녹음 멈추기":"녹음 시작",disabled:i==="transcribing",onClick:()=>i==="recording"?L():E(),className:`relative flex size-[72px] shrink-0 items-center justify-center rounded-full transition-colors ${i==="recording"?"bg-danger-50":"bg-neutral-10"} ${i==="transcribing"?"opacity-60":""}`,children:i==="recording"?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-full bg-danger-50",style:{animation:"recPulse 1.5s ease-out infinite"}}),n.jsx("span",{className:"pointer-events-none absolute inset-0 rounded-full bg-danger-50",style:{animation:"recPulse 1.5s ease-out infinite",animationDelay:"0.75s"}}),n.jsx("span",{className:"relative size-[28px] rounded-[10px] bg-white"}),n.jsx("style",{children:"@keyframes recPulse{0%{transform:scale(1);opacity:.45}70%,100%{transform:scale(1.6);opacity:0}}"})]}):n.jsx(V,{name:"microphone",size:52})}),n.jsx("div",{className:"flex flex-col gap-[2px]",children:i==="recording"?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-95",children:"녹음 중이에요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:"다 말한 뒤 버튼을 다시 누르면 텍스트로 정리돼요"})]}):i==="transcribing"?n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-95",children:"변환 중이에요…"}),n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:"말한 내용을 텍스트로 정리하고 있어요"})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-95",children:"마이크를 누르고 소리내어 답해보세요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:"조용한 곳에서 또박또박 말하면 더 정확해요"})]})})]})}):n.jsx("div",{className:"rounded-[24px] border border-neutral-10 p-[24px] text-body-2-medium text-neutral-70",children:"이 브라우저는 음성 입력을 지원하지 않아요. 텍스트로 다시 답해 주세요."}),h&&n.jsx("p",{className:"text-body-3-medium text-danger-60",children:h}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx(Rp,{mode:s,onChange:b}),n.jsx($,{variant:"primary",size:"medium",disabled:!j,onClick:D,children:f?"피드백 받는 중…":"간단 피드백 받기"})]}),c&&n.jsx(Ip,{tone:c.tone,text:c.text})]})}function Ld({no:e}){const[t,s]=e.split("-");return n.jsxs("div",{className:"flex shrink-0 items-center gap-[4px]",children:[n.jsx("span",{className:"flex size-[24px] items-center justify-center rounded-full bg-neutral-80 text-body-2-semibold text-white",children:t}),s&&n.jsxs("span",{className:"text-body-1-semibold text-neutral-80",children:["- ",s]})]})}function Ed({tag:e}){const t=e.tone==="good"?"bg-success-10 text-success-60":"bg-warning-10 text-warning-60";return n.jsx("span",{className:`inline-flex h-[26px] shrink-0 items-center rounded-full px-[8px] text-body-3-medium ${t}`,children:e.label})}function fa({icon:e,label:t,children:s}){return n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:e,size:24}),n.jsx("p",{className:"text-body-3-semibold text-neutral-90",children:t})]}),s]})}function Ap({q:e}){const[t,s]=u.useState(!1),[r,l]=u.useState(!1),[a,i]=u.useState(!1);return n.jsxs("div",{className:"flex flex-col gap-[12px] rounded-[20px] bg-neutral-5 px-[28px] py-[24px]",children:[n.jsxs("button",{type:"button",onClick:()=>s(o=>!o),className:"flex w-full items-start justify-between gap-[8px] text-left",children:[n.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-[8px]",children:[n.jsx(Ld,{no:e.no}),n.jsx("p",{className:"min-w-0 flex-1 text-body-1-semibold text-neutral-90",children:e.question})]}),n.jsx(S,{name:t?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),e.tags.length>0&&n.jsx("div",{className:"flex flex-wrap gap-[8px]",children:e.tags.map((o,c)=>n.jsx(Ed,{tag:o},c))}),t&&n.jsxs("div",{className:"flex flex-col gap-[16px]",children:[n.jsxs("div",{className:"flex flex-col gap-[32px] rounded-[20px] bg-white px-[28px] py-[24px]",children:[n.jsx(fa,{icon:"file",label:"내 답변",children:n.jsxs("div",{className:"relative flex flex-col items-end gap-[16px] rounded-[16px] bg-neutral-5 px-[24px] py-[16px]",children:[n.jsx("p",{className:"w-full whitespace-pre-wrap text-body-2-medium text-neutral-90",children:e.answer}),e.mode==="voice"&&n.jsxs("button",{type:"button",onClick:()=>i(o=>!o),className:"flex items-center gap-[6px] text-body-3-medium text-primary-60",children:[n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[n.jsx("path",{d:"M9.41699 8.00013V15.9999C9.41697 16.0888 9.4391 16.1762 9.4811 16.2529C9.5231 16.3297 9.58346 16.393 9.65593 16.4364C9.7284 16.4798 9.81038 16.5017 9.89339 16.4999C9.9764 16.498 10.0575 16.4725 10.1282 16.4259L16.1947 12.426C16.2626 12.3813 16.3187 12.3186 16.3576 12.244C16.3966 12.1695 16.417 12.0854 16.417 12C16.417 11.9146 16.3966 11.8305 16.3576 11.756C16.3187 11.6814 16.2626 11.6187 16.1947 11.574L10.1282 7.57414C10.0575 7.52752 9.9764 7.50197 9.89339 7.50011C9.81038 7.49825 9.7284 7.52016 9.65593 7.56357C9.58346 7.60698 9.5231 7.67032 9.4811 7.74706C9.4391 7.8238 9.41697 7.91116 9.41699 8.00013Z",fill:"currentColor"}),n.jsx("path",{d:"M20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20V22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22V20C16.4183 20 20 16.4183 20 12Z",fill:"currentColor"})]}),"다시듣기"]}),e.mode==="voice"&&a&&n.jsx("div",{className:"absolute right-0 top-full z-20 mt-[8px]",children:n.jsx(zp,{src:e.audioUrl})})]})}),n.jsx(fa,{icon:"thumb-up",label:"예시 답변",children:n.jsx("div",{className:"rounded-[16px] bg-primary-5 px-[24px] py-[16px]",children:n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:e.exampleAnswer})})}),n.jsxs(fa,{icon:"idea",label:"답변 팁",children:[n.jsx("div",{className:"h-px w-full bg-neutral-10"}),n.jsx("ul",{className:"flex flex-col gap-[6px] py-[8px]",children:e.tip.split(` `).map((o,c)=>n.jsxs("li",{className:"flex items-start gap-[10px]",children:[n.jsx("span",{className:"mt-[9px] size-[6px] shrink-0 rounded-full bg-warning-50"}),n.jsx("span",{className:"text-body-2-medium text-neutral-90",children:o})]},c))})]}),!r&&n.jsx("div",{className:"flex justify-end",children:n.jsx($,{variant:"secondary",size:"medium",trailingIcon:n.jsx(S,{name:"arrow-right",size:20}),onClick:()=>l(!0),children:"다시 답해보기"})})]}),r&&n.jsx(Dp,{question:e,onClose:()=>l(!1)})]})]})}function Td({questions:e}){return n.jsxs("section",{className:"flex flex-col gap-[20px]",children:[n.jsx("h2",{className:"text-heading-4-semibold text-neutral-100",children:"문항별 다시보기"}),n.jsx("div",{className:"flex flex-col gap-[16px]",children:e.map(t=>n.jsx(Ap,{q:t},t.no))})]})}const Fp={TEXT:"text",AUDIO:"voice"},Op={Easy:"basic",Normal:"real",Hard:"pressure"},W2=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"):[];function Md(e){var o;const t=e.interview_logs??[],s=e.detailed_analysis??[],r=Math.round(Number(((o=e.scores)==null?void 0:o.총점)??0)),l=[...(e.strength_tags??[]).map(c=>({kind:"good",title:c,desc:""})),...(e.weakness_tags??[]).map(c=>({kind:"improve",title:c,desc:""}))],a=Fp[e.mode??"TEXT"]??"text",i=s.map((c,d)=>{var h,y,v;const f=[...W2(c.good_keywords).map(C=>({label:C,tone:"good"})),...W2(c.improve_keywords).map(C=>({label:C,tone:"warn"}))],p=((h=t[d])==null?void 0:h.answer)??"";return{no:String(d+1).padStart(2,"0"),followup:!1,question:String(c.question??((y=t[d])==null?void 0:y.question)??""),tags:f,mode:a,answerState:p.trim().length>0&&p.trim().length<20?"short":"normal",answer:p,audioUrl:(v=t[d])==null?void 0:v.audio_url,exampleAnswer:String(c.supplement_needed??""),tip:String(c.improvement_point??"")}});return{targetSchool:e.target_university&&e.target_university!=="미지정"?e.target_university:"",targetMajor:e.target_department&&e.target_department!=="미지정"?e.target_department:"",interviewType:"",mode:a,difficulty:Op[e.difficulty??"Normal"]??"real",total:t.length||i.length,date:"",recordFile:"",recordDate:"",isFirstPractice:!1,passState:"ok",passPercent:Math.max(0,Math.min(100,r)),summary:l,questions:i}}function ma(){return n.jsx("span",{className:"h-[14px] w-px shrink-0 bg-neutral-20"})}function Hp(){const e=ne(),{state:t}=Ue(),s=(t==null?void 0:t.item)??null,r=(t==null?void 0:t.mode)??"text",l=t==null?void 0:t.sessionId,[a,i]=u.useState(62),[o,c]=u.useState(el),[d,f]=u.useState(r==="voice"?v1.map(v=>({...v,mode:"voice"})):v1),[p,h]=u.useState(!!l);if(u.useEffect(()=>{window.scrollTo(0,0)},[]),u.useEffect(()=>{if(!l)return;let v=!0;return yd(l).then(C=>{if(!v)return;const w=Md(C);i(w.passPercent),w.summary.length&&c(w.summary),w.questions.length&&f(w.questions)}).catch(()=>{}).finally(()=>{v&&h(!1)}),()=>{v=!1}},[l]),!s)return n.jsx(Rs,{to:"/practice",replace:!0});const y=Io[s.area];return n.jsxs("div",{className:"min-h-screen bg-white",children:[n.jsx(Un,{}),n.jsx("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:n.jsxs("div",{className:"flex flex-col gap-[56px]",children:[n.jsxs("div",{className:"flex flex-col gap-[56px]",children:[n.jsxs("button",{type:"button",onClick:()=>e("/practice"),className:"flex items-center gap-[12px] text-neutral-90 transition-colors hover:text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32}),n.jsx("span",{className:"text-heading-4-semibold text-neutral-100",children:"면접 연습 결과"})]}),n.jsxs("div",{className:"flex items-center gap-[56px]",children:[n.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-[16px]",children:[n.jsx("div",{className:"flex size-[68px] shrink-0 items-center justify-center rounded-[16px] border border-neutral-10 bg-white",children:n.jsx(V,{name:"target",size:52})}),n.jsxs("div",{className:"flex min-w-0 flex-col gap-[8px]",children:[n.jsx("p",{className:"truncate text-heading-3-semibold text-neutral-95",children:s.title}),n.jsxs("div",{className:"flex flex-wrap items-center gap-[12px] text-body-3-medium text-neutral-60",children:[n.jsx(Ae,{color:y.color,size:"small",children:y.label}),n.jsx(ma,{}),n.jsxs("span",{className:"flex items-center gap-[8px]",children:[n.jsx("span",{children:"최근 연습"}),n.jsx("span",{children:"2026.06.01"})]}),n.jsx(ma,{}),n.jsxs("span",{children:[s.relatedCount,"문항"]}),n.jsx(ma,{}),n.jsxs("span",{className:"flex items-center gap-[4px]",children:[n.jsx(V,{name:"file",size:20}),"이소희_생활기록부.pdf · 2026.06.10 등록"]})]})]})]}),n.jsx($,{variant:"primary",size:"medium",className:"shrink-0",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:()=>e("/practice/focus",{state:{item:s}}),children:"다시 연습하기"})]})]}),n.jsx("hr",{className:"border-neutral-10"}),n.jsxs("section",{className:"flex flex-col gap-[24px]",children:[n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("h1",{className:"text-heading-3-semibold text-neutral-100",children:"지난번보다 나아졌어요"}),n.jsxs("p",{className:"text-body-1-medium text-neutral-70",children:["이전엔 ",s.title," 부분이 잘 드러나지 않았는데, 이번엔 한층 또렷하게 짚어냈어요. 조금만 더 다듬으면 거의 완성이에요."]})]}),n.jsx(kd,{state:"ok",percent:a})]}),p?n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"결과를 분석하고 있어요…"}):n.jsxs(n.Fragment,{children:[n.jsx(Sd,{items:o}),n.jsx(Td,{questions:d})]})]})})]})}const dr=8,Q2=[{q:"간단한 자기소개와 지원 동기를 말씀해 주세요.",a:"안녕하세요. 데이터로 문제를 푸는 과정에 매력을 느껴 컴퓨터공학부에 지원한 이소희입니다."},{q:"가장 인상 깊었던 활동과 그 과정에서 배운 점은 무엇인가요?",a:"스마트 화분 동아리 프로젝트가 가장 기억에 남습니다. 센서 값이 튀는 문제를 직접 정의하고 보정 로직을 설계하며 문제 해결의 즐거움을 배웠습니다."},{q:"그 프로젝트에서 본인이 맡은 역할은 무엇이었나요?",a:"저는 센서 데이터 수집과 이상치 처리를 맡아, 예외 데이터를 분류하는 테스트 케이스를 직접 설계했습니다."}],$p="이 프로젝트를 다시 진행한다면 어떤 기능을 추가해 보고 싶나요?";function Vp(e){const t=[];for(let s=0;sn.jsx("span",{className:"size-[8px] animate-bounce rounded-full bg-primary-40",style:{animationDelay:`${e*.15}s`}},e))})}function K2({subtitle:e,university:t,children:s}){return n.jsxs("div",{className:"flex gap-[12px] items-start",children:[n.jsx(Sn,{university:t,size:56,fallback:n.jsx(V,{name:"interview",size:52})}),n.jsxs("div",{className:"flex flex-1 flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:"면접관"}),n.jsx("p",{className:"text-body-3-medium text-neutral-70",children:e})]}),n.jsx("div",{className:"flex w-fit max-w-[1132px] items-center rounded-bl-[32px] rounded-br-[32px] rounded-tr-[32px] border border-primary-10 bg-white px-[24px] py-[22px] shadow-[0_0_3px_rgba(180,152,216,0.1)]",children:s})]})]})}function Zp({text:e,muted:t}){return n.jsx("div",{className:"flex justify-end",children:n.jsx("div",{className:`max-w-[828px] whitespace-pre-wrap rounded-bl-[32px] rounded-tl-[32px] rounded-br-[32px] border border-primary-10 px-[24px] py-[22px] text-body-1-medium text-white shadow-[0_0_3px_rgba(180,152,216,0.1)] ${t?"bg-primary-30":"bg-primary-60"}`,children:e})})}function Up(){const e=ne(),s=Ue().state??{},r=Array.isArray(s.selectedQuestions)?s.selectedQuestions.filter(_=>typeof _=="string"&&_.trim()):[],l=[s.school,s.dept].filter(Boolean).join(" · ")||"모의 면접",a=`텍스트 면접 · ${s.difficultyLabel||"실전"} 난이도`,i=([s.school,s.dept].filter(Boolean).join(" ")+" 모의면접").trim(),o=!!s.resume,c=o?Math.max(0,(s.progress??1)-1):0,[d,f]=u.useState(o?"chat":"intro"),[p,h]=u.useState(o?s.sessionId?[]:Vp(c):[{role:"interviewer",text:r[0]??Cd}]),[y,v]=u.useState(o?c:0),[C,w]=u.useState(""),[g,x]=u.useState(!1),[m,j]=u.useState(!1),[b,N]=u.useState(!1),[E,L]=u.useState(0),[I,D]=u.useState(""),[M,P]=u.useState(!1),O=u.useRef(null),q=u.useRef(null),A=u.useRef(null),H=u.useRef(Date.now());u.useEffect(()=>{let _=!0;return(async()=>{try{if(o&&s.sessionId){const ue=await U7(s.sessionId);if(!_)return;A.current=ue.session_id;const F=[];for(const G of ue.interview_logs)G.question&&F.push({role:"interviewer",text:G.question}),G.answer&&F.push({role:"user",text:G.answer});F.length&&h(F),v(ue.interview_logs.filter(G=>G.answer&&G.answer.trim()).length),H.current=Date.now();return}if(s.sessionId){A.current=s.sessionId,H.current=Date.now();return}let Y=s.recordId;if(!Y){const F=(await Ft()).records.reduce((G,Ne)=>!G||Ne.id>G.id?Ne:G,null);if(!F){_&&e("/onboarding",{replace:!0});return}Y=F.id}const U=await Tl({record_id:Y,difficulty:El[s.difficulty??"real"],target_university:s.school||"미지정",target_department:s.dept||"미지정",mode:"TEXT",...s.focusArea?{focus_area:s.focusArea}:{},...r.length?{selected_questions:r}:{}});_&&(A.current=U,H.current=Date.now())}catch(Y){_&&D(ee(Y).message)}})(),()=>{_=!1}},[]);const Z=d==="complete"?dr:Math.min(y+1,dr),T=Z/dr*100,k=y-c,z=()=>{const _=O.current;_&&(_.style.height="auto",_.style.height=`${Math.min(_.scrollHeight,130)}px`)},K=()=>{const _=q.current;_&&P(_.scrollHeight-_.scrollTop-_.clientHeight>160)};u.useEffect(()=>{const _=q.current;_&&_.scrollTo({top:_.scrollHeight}),P(!1)},[p,g]),u.useEffect(()=>{const _=q.current;_&&P(_.scrollHeight-_.scrollTop-_.clientHeight>160)},[m]),u.useEffect(()=>{if(d!=="analyzing")return;L(0);const _=window.setInterval(()=>{L(Y=>Y>=100?(window.clearInterval(_),window.setTimeout(()=>e("/practice"),500),100):Y+2)},60);return()=>window.clearInterval(_)},[d,e]);const Q=async()=>{const _=C.trim();if(!_||g)return;const Y=A.current;if(!Y){D("면접 세션이 아직 준비 중이에요. 잠시 후 다시 시도해 주세요.");return}const U=Math.max(1,Math.round((Date.now()-H.current)/1e3));h(F=>[...F,{role:"user",text:_}]),w(""),O.current&&(O.current.style.height="auto"),v(F=>F+1),x(!0);let ue="";try{await B7(Y,{answer:_,response_time:U},{onToken:F=>{ue+=F},onCompleted:()=>{const F=ue.trim()||"다음 질문을 준비하지 못했어요. 한 번 더 답변해 주세요.";h(G=>[...G,{role:"interviewer",text:F}]),H.current=Date.now()},onFinished:F=>{h(G=>[...G,{role:"interviewer",text:ue.trim()||F}]),f("complete")}}),x(!1)}catch(F){x(!1),h(G=>[...G,{role:"interviewer",text:`${ee(F).message} 다시 답변해 주세요.`}]),H.current=Date.now()}},oe=()=>{d==="chat"?N(!0):e(s.returnTo??"/practice")},ae=p.map(_=>_.role).lastIndexOf("interviewer"),J=m?p:p.slice(ae),se=m?0:ae;return n.jsxs("div",{className:"min-h-screen bg-primary-5",children:[n.jsx(Un,{variant:"practice",title:l,subtitle:a,onBack:oe}),d==="intro"&&n.jsx("div",{className:"flex min-h-[calc(100vh-84px)] flex-col items-center justify-center px-[40px]",children:n.jsxs("div",{className:"flex w-[453px] flex-col items-center gap-[56px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[20px]",children:[n.jsx("div",{className:"flex size-[80px] items-center justify-center rounded-[20px] bg-white p-[10px]",children:n.jsx(V,{name:"keyboard",size:56})}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("p",{className:"text-heading-2-semibold text-neutral-100",children:"이제 텍스트 면접을 시작할게요"}),n.jsxs("p",{className:"text-body-2-medium text-neutral-60",children:["면접관이 질문하면 글로 답하면 돼요.",n.jsx("br",{}),"실제 면접처럼 차분하게 답해봐요."]})]})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:()=>f("chat"),children:"면접 시작하기"}),I&&n.jsx("p",{className:"text-body-3-medium text-danger-60",children:I})]})}),d==="analyzing"&&n.jsxs("div",{className:"flex min-h-[calc(100vh-84px)] flex-col items-center justify-center gap-[40px] px-[40px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[20px]",children:[n.jsx(V,{name:"school",size:140}),n.jsxs("p",{className:"text-display-3 text-primary-60",children:[E,"%"]}),n.jsx("div",{className:"h-[12px] w-[280px] overflow-hidden rounded-full bg-white",children:n.jsx("div",{className:"h-full rounded-full bg-primary-50 transition-[width] duration-200 ease-linear",style:{width:`${E}%`}})})]}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("p",{className:"text-heading-1-semibold text-neutral-100",children:"면접 답변을 분석하고 있어요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"잠시만 기다려 주세요!"})]})]}),d==="failed"&&n.jsx("div",{className:"flex min-h-[calc(100vh-84px)] flex-col items-center justify-center px-[40px]",children:n.jsxs("div",{className:"flex w-[465px] flex-col items-center gap-[56px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[36px] text-center",children:[n.jsx(S,{name:"circle-alert-filled",size:56,className:"text-neutral-40 fill-white"}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("p",{className:"text-heading-1-semibold text-neutral-100",children:"분석을 마치지 못했어요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"네트워크 문제로 답변 분석이 멈췄어요. 답변은 저장돼 있으니 잠시 후 다시 시도해 주세요."})]})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",leadingIcon:n.jsx(S,{name:"reset",size:24}),onClick:()=>f("analyzing"),children:"다시 시도하기"})]})}),(d==="chat"||d==="complete")&&n.jsxs("div",{className:"relative mx-auto flex h-[calc(100vh-84px)] w-[1200px] flex-col pb-[64px] pt-[64px]",children:[n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsxs("p",{className:"flex items-center gap-[8px] text-body-3-semibold text-neutral-60",children:["면접 진행",n.jsxs("span",{children:[n.jsx("span",{className:"text-primary-60",children:Z})," / ",dr]})]}),n.jsx("div",{className:"h-[8px] w-full overflow-hidden rounded-full bg-white",children:n.jsx("div",{className:"h-full rounded-full bg-primary-50 transition-[width] duration-300 ease-out",style:{width:`${T}%`}})})]}),(y>0||m)&&n.jsx("div",{className:"mt-[36px] flex justify-end",children:n.jsx("button",{type:"button",onClick:()=>j(_=>!_),className:"rounded-full border border-primary-20 bg-primary-10 px-[10px] py-[7px] text-body-3-semibold text-primary-60",children:m?"이전 답변 접기":"이전 답변 보기"})}),n.jsxs("div",{className:"relative mt-[36px] flex min-h-0 flex-1 flex-col",children:[n.jsx("div",{ref:q,onScroll:K,className:"flex-1 overflow-y-auto",children:n.jsxs("div",{className:"flex flex-col gap-[40px] pb-[12px]",children:[J.map((_,Y)=>{const U=se+Y{var _;return(_=q.current)==null?void 0:_.scrollTo({top:q.current.scrollHeight,behavior:"smooth"})},className:"absolute bottom-[-16px] left-1/2 flex size-[48px] -translate-x-1/2 items-center justify-center rounded-full border border-neutral-10 bg-white shadow-[0_2px_8px_rgba(0,0,0,0.12)]",children:n.jsx(S,{name:"arrow-down",size:28,className:"text-neutral-70"})})]}),d==="chat"&&!g&&n.jsxs("div",{className:"mt-[36px] flex flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[6px]",children:[n.jsx(V,{name:"user-white",size:36}),n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:"지원자"}),n.jsx("p",{className:"text-body-2-medium text-primary-60",children:"(나)"})]}),n.jsxs("div",{className:"flex flex-col items-end gap-[8px] rounded-[24px] bg-white p-[24px] shadow-[0_2px_3px_rgba(0,0,0,0.08)]",children:[n.jsx("textarea",{ref:O,value:C,onChange:_=>{w(_.target.value),z()},onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&!_.nativeEvent.isComposing&&(_.preventDefault(),C.trim()&&Q())},placeholder:"면접관에게 실제로 답하듯 작성해보세요. (Enter 제출 · Shift+Enter 줄바꿈)",className:"max-h-[130px] min-h-[78px] w-full resize-none bg-transparent text-body-1-medium text-neutral-90 outline-none placeholder:text-neutral-40"}),n.jsx($,{variant:C.trim()?"primary":"gray",size:"medium",disabled:!C.trim(),onClick:Q,children:"답변 완료"})]})]}),d==="complete"&&n.jsx("div",{className:"mt-[36px] flex justify-end",children:n.jsx($,{variant:"primary",size:"large",onClick:()=>{const _=A.current;_&&s.focusItem?e("/practice/focus/result",{state:{item:s.focusItem,mode:"text",sessionId:_}}):e(_?`/practice/result/${_}`:"/practice")},trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),children:"결과 보기"})})]}),n.jsx(me,{open:b,onClose:()=>N(!1),alert:!0,title:"면접 연습을 종료할까요?",description:k===0?o?n.jsxs(n.Fragment,{children:["아직 새로 답변한 문항이 없어요.",n.jsx("br",{}),"종료하면 홈으로 돌아가요."]}):n.jsxs(n.Fragment,{children:["아직 답변한 문항이 없어요.",n.jsx("br",{}),"종료하면 결과가 저장되지 않아요."]}):n.jsxs(n.Fragment,{children:["지금까지 답한 ",y,"문항은 저장돼요.",n.jsx("br",{}),"결과는 모든 문항을 답해야 볼 수 있어요."]}),children:n.jsxs("div",{className:"mt-[12px] flex w-full gap-[12px]",children:[n.jsx($,{variant:"gray",size:"large",className:"flex-1",onClick:()=>{N(!1),e(s.returnTo??"/practice")},children:"종료"}),n.jsx($,{variant:"primary",size:"large",className:"flex-1",onClick:()=>N(!1),children:"계속하기"})]})})]})}const G2=19,qp=700;function Wp({open:e,onClose:t}){const[s,r]=u.useState([]),[l,a]=u.useState(""),[i,o]=u.useState("기본 마이크"),[c,d]=u.useState(!1),[f,p]=u.useState(!1),[h,y]=u.useState(""),v=u.useRef(null),C=u.useRef(null),w=u.useRef(0),g=u.useRef([]),x=u.useRef(0),m=u.useRef(!1);return u.useEffect(()=>{if(!e)return;let j=!0;return y(""),d(!1),(async()=>{var b,N,E;try{const L=await navigator.mediaDevices.getUserMedia({audio:l?{deviceId:{exact:l}}:!0});if(!j){L.getTracks().forEach(H=>H.stop());return}v.current=L;const I=(await navigator.mediaDevices.enumerateDevices()).filter(H=>H.kind==="audioinput");if(!j)return;r(I);const D=(b=L.getAudioTracks()[0])==null?void 0:b.getSettings().deviceId;o(((N=I.find(H=>H.deviceId===D))==null?void 0:N.label)||((E=I[0])==null?void 0:E.label)||"기본 마이크");const M=window.AudioContext??window.webkitAudioContext,P=new M;C.current=P;const O=P.createAnalyser();O.fftSize=64,P.createMediaStreamSource(L).connect(O);const q=new Uint8Array(O.frequencyBinCount),A=()=>{O.getByteFrequencyData(q);let H=0;for(let T=0;TH&&(H=k);const z=g.current[T];z&&(z.style.height=`${8+k/255*71}px`)}H>28&&(x.current=Date.now());const Z=Date.now()-x.current{var b,N;j=!1,cancelAnimationFrame(w.current),(b=v.current)==null||b.getTracks().forEach(E=>E.stop()),v.current=null,(N=C.current)==null||N.close().catch(()=>{}),C.current=null,m.current=!1,p(!1)}},[e,l]),n.jsx(me,{open:e,onClose:t,title:"마이크가 잘 들어오는지 확인해볼게요",description:"편하게 말해보세요",confirmText:"확인",onConfirm:t,className:"w-[408px]",children:n.jsxs("div",{className:"flex w-full flex-col items-center gap-[16px]",children:[n.jsx("div",{className:"relative h-[112px] w-full overflow-hidden rounded-[12px] bg-neutral-5",children:n.jsx("div",{className:"absolute left-1/2 top-[22px] flex h-[79px] -translate-x-1/2 items-end gap-[8px]",children:Array.from({length:G2}).map((j,b)=>n.jsx("div",{ref:N=>{g.current[b]=N},className:"w-[8px] rounded-full bg-primary-50 transition-[height] duration-75 ease-out",style:{height:8}},b))})}),h?n.jsx("p",{className:"text-body-3-medium text-danger-60",children:h}):f?n.jsxs("div",{className:"flex items-center gap-[4px]",children:[n.jsx(S,{name:"circle-check-filled",size:20,className:"text-success-50 fill-white"}),n.jsx("span",{className:"text-body-3-medium text-success-50",children:"소리가 잘 들어와요"})]}):n.jsxs("div",{className:"flex items-center gap-[4px]",children:[n.jsx(S,{name:"circle-alert-filled",size:20,className:"text-neutral-40 fill-white"}),n.jsx("span",{className:"text-body-3-medium text-neutral-60",children:"소리가 잘 안들려요"})]}),n.jsxs("div",{className:"flex w-full flex-col items-center gap-[10px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsxs("span",{className:"text-body-3-regular text-neutral-70",children:["입력 장치: ",i]}),s.length>1&&n.jsx("button",{type:"button",onClick:()=>d(j=>!j),className:"text-body-3-medium text-primary-60 hover:text-primary-70",children:"변경"})]}),c&&n.jsx("div",{className:"flex w-full flex-col overflow-hidden rounded-[12px] border border-neutral-10",children:s.map(j=>n.jsx("button",{type:"button",onClick:()=>{a(j.deviceId),d(!1)},className:`px-[16px] py-[10px] text-left text-body-3-medium transition-colors hover:bg-primary-5 ${j.label===i?"text-primary-60":"text-neutral-80"}`,children:j.label||"마이크"},j.deviceId))})]})]})})}const Qp=8,Kp=e=>new Promise(t=>setTimeout(t,e));function Gp(){const e=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg"];for(const t of e)if(typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported(t))return t;return""}function ha({university:e,subtitle:t,children:s}){return n.jsxs("div",{className:"flex w-full items-start gap-[12px]",children:[n.jsx(Sn,{university:e,size:56,fallback:n.jsx(V,{name:"interview",size:52})}),n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-100",children:"면접관"}),n.jsx("p",{className:"text-body-3-medium text-neutral-70",children:t})]}),n.jsx("div",{className:"flex w-fit max-w-[1132px] items-center rounded-[32px] rounded-tl-none border border-primary-10 bg-white px-[24px] py-[22px] shadow-[0px_0px_3px_rgba(180,152,216,0.1)]",children:s})]})]})}function Y2({children:e,muted:t}){return n.jsx("div",{className:"flex w-full justify-end",children:n.jsx("div",{className:`max-w-[828px] whitespace-pre-wrap rounded-[32px] rounded-tr-none border border-primary-10 px-[24px] py-[22px] text-body-1-medium text-white shadow-[0px_0px_3px_rgba(180,152,216,0.1)] ${t?"bg-primary-30":"bg-primary-60"}`,children:e})})}function Yp(){const e=ne(),s=Ue().state??{},r=Array.isArray(s.selectedQuestions)?s.selectedQuestions.filter(X=>typeof X=="string"&&X.trim()):[],l=s.school??"",a=s.dept??"",i=[l,a].filter(Boolean).join(" · ")||"모의 면접",o=`음성 면접${s.difficultyLabel?` · ${s.difficultyLabel}`:""}`,c=`${[l,a].filter(Boolean).join(" ")} 모의면접`.trim(),[d,f]=u.useState("intro"),[p,h]=u.useState(r[0]??Cd),[y,v]=u.useState(null),[C,w]=u.useState([]),[g,x]=u.useState(1),[m,j]=u.useState(Qp),[b,N]=u.useState(!1),[E,L]=u.useState(!1),[I,D]=u.useState(!1),[M,P]=u.useState(""),[O,q]=u.useState(!1),[A,H]=u.useState(!1),[Z,T]=u.useState(!1),[k,z]=u.useState(!1),K=u.useRef(!0),Q=u.useRef(null),oe=u.useRef(Date.now()),ae=u.useRef(null),J=u.useRef([]),se=u.useRef(null);u.useEffect(()=>{let X=!0;return(async()=>{try{if(s.sessionId){Q.current=s.sessionId,oe.current=Date.now();return}let be=s.recordId;if(!be){const lt=(await Ft()).records.reduce((Xe,A1)=>!Xe||A1.id>Xe.id?A1:Xe,null);if(!lt){X&&e("/onboarding",{replace:!0});return}be=lt.id}const Re=await Tl({record_id:be,difficulty:El[s.difficulty??"real"],target_university:l||"미지정",target_department:a||"미지정",mode:"AUDIO",...s.focusArea?{focus_area:s.focusArea}:{},...r.length?{selected_questions:r}:{}});X&&(Q.current=Re,oe.current=Date.now())}catch(be){X&&P(ee(be).message)}})(),()=>{var be,Re;X=!1,K.current=!1,Q1();try{(be=ae.current)==null||be.stop()}catch{}(Re=se.current)==null||Re.getTracks().forEach(de=>de.stop())}},[]),u.useEffect(()=>{const X=()=>{const be=window.innerHeight+window.scrollY>=document.body.scrollHeight-220;T(!be)};return window.addEventListener("scroll",X,{passive:!0}),X(),()=>window.removeEventListener("scroll",X)},[A,p,y]);const _=()=>{f("chat"),da(p),oe.current=Date.now()},Y=async()=>{if(!(b||E||I)){P(""),Q1();try{const X=await navigator.mediaDevices.getUserMedia({audio:!0});se.current=X;const be=Gp(),Re=be?new MediaRecorder(X,{mimeType:be}):new MediaRecorder(X);J.current=[],Re.ondataavailable=de=>{de.data.size>0&&J.current.push(de.data)},Re.onstop=()=>{var lt;const de=new Blob(J.current,{type:Re.mimeType||"audio/webm"});(lt=se.current)==null||lt.getTracks().forEach(Xe=>Xe.stop()),se.current=null,ue(de)},ae.current=Re,Re.start(),N(!0),oe.current=Date.now()}catch{P("마이크를 사용할 수 없어요. 브라우저 마이크 권한을 허용해 주세요.")}}},U=()=>{var X;if(b){N(!1);try{(X=ae.current)==null||X.stop()}catch{}}},ue=async X=>{const be=Q.current;if(!be){P("면접 세션이 아직 준비 중이에요.");return}if(X.size<1200){P("녹음이 너무 짧아요. 다시 말씀해 주세요.");return}const Re=Math.max(1,Math.round((Date.now()-oe.current)/1e3));L(!0);try{const de=await W7(be,X,Re);if(!K.current)return;const lt=de.transcript||"(인식된 답변 없음)";if(v(lt),typeof de.total_questions=="number"&&j(de.total_questions),await Kp(900),!K.current)return;w(Xe=>[...Xe,{question:p,answer:lt}]),v(null),de.is_finished?(h(de.next_question||"오늘 면접은 여기까지예요. 답변을 정리해 결과를 보여드릴게요."),x(Xe=>de.question_number??Xe),D(!0),da(de.next_question||"오늘 면접은 여기까지예요.")):(h(de.next_question),x(Xe=>de.question_number??Xe+1),da(de.next_question),oe.current=Date.now())}catch(de){K.current&&P(ee(de).message)}finally{K.current&&L(!1)}},F=()=>{if(d==="chat"&&!I){z(!0);return}Q1(),e(s.returnTo??"/practice")},G=()=>{z(!1),Q1(),e(s.returnTo??"/practice")},Ne=()=>{Q1();const X=Q.current;X&&s.focusItem?e("/practice/focus/result",{state:{item:s.focusItem,mode:"voice",sessionId:X}}):e(X?`/practice/result/${X}`:"/practice")},vt=()=>window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"}),He=I?100:Math.min(100,Math.round(g/Math.max(1,m)*100));return vd?n.jsxs("div",{className:"min-h-screen bg-primary-5",children:[n.jsx(Un,{variant:"practice",title:i,subtitle:o,onBack:F}),d==="intro"&&n.jsx("div",{className:"flex min-h-[calc(100vh-84px)] flex-col items-center justify-center px-[40px]",children:n.jsxs("div",{className:"flex w-[465px] max-w-full flex-col items-center gap-[56px]",children:[n.jsxs("div",{className:"flex w-full flex-col items-center gap-[20px]",children:[n.jsx("div",{className:"flex size-[80px] items-center justify-center rounded-[20px] bg-white",children:n.jsx(V,{name:"microphone",size:56})}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("p",{className:"text-heading-2-semibold text-neutral-100",children:"이제 음성 면접을 시작할게요"}),n.jsxs("p",{className:"text-body-2-medium text-neutral-60",children:["면접관이 질문하면 마이크를 누르고 소리 내어 답하면 돼요.",n.jsx("br",{}),"조용한 곳에서 진행하면 더 정확하게 인식돼요."]})]}),n.jsx("button",{type:"button",onClick:()=>q(!0),className:"text-body-2-medium text-primary-60 transition-colors hover:text-primary-70",children:"마이크 다시 확인하기"})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:_,children:"면접 시작하기"}),M&&n.jsx("p",{className:"text-body-3-medium text-danger-60",children:M})]})}),d==="chat"&&n.jsxs("div",{className:"mx-auto w-full max-w-[1280px] px-[40px] pb-[220px] pt-[64px]",children:[n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px] text-body-3-semibold text-neutral-60",children:[n.jsx("span",{children:"면접 진행"}),n.jsxs("span",{children:[n.jsx("span",{className:"text-primary-60",children:Math.min(g,m)})," / ",m]})]}),n.jsx(md,{value:He})]}),C.length>0&&n.jsx("div",{className:"mt-[24px] flex justify-end",children:n.jsx("button",{type:"button",onClick:()=>H(X=>!X),className:"rounded-full border border-primary-20 bg-primary-10 px-[10px] py-[7px] text-body-3-semibold text-primary-60",children:A?"이전 답변 접기":"이전 답변 보기"})}),n.jsxs("div",{className:`flex flex-col gap-[36px] ${C.length>0?"mt-[16px]":"mt-[40px]"}`,children:[A&&C.map((X,be)=>n.jsxs(u.Fragment,{children:[n.jsx(ha,{university:l,subtitle:c,children:n.jsx("p",{className:"whitespace-pre-wrap text-body-1-medium text-neutral-80",children:X.question})}),n.jsx(Y2,{muted:!0,children:X.answer})]},be)),n.jsx(ha,{university:l,subtitle:c,children:n.jsx("p",{className:"whitespace-pre-wrap text-body-1-medium text-neutral-90",children:p})}),y&&n.jsx(Y2,{children:y}),E&&n.jsx(ha,{university:l,subtitle:c,children:n.jsxs("span",{className:"flex items-center gap-[6px]",children:[[0,1,2].map(X=>n.jsx("span",{className:"size-[8px] animate-bounce rounded-full bg-primary-40",style:{animationDelay:`${X*.15}s`}},X)),n.jsx("span",{className:"ml-[4px] text-body-1-semibold text-neutral-100",children:"답변을 분석하고 있어요"})]})}),I&&n.jsx("div",{className:"mt-[4px] flex justify-end",children:n.jsx($,{variant:"primary",size:"large",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:Ne,children:"결과 보기"})})]})]}),d==="chat"&&Z&&n.jsx("button",{type:"button",onClick:vt,"aria-label":"최신으로 이동",className:"fixed bottom-[180px] left-1/2 z-40 flex size-[48px] -translate-x-1/2 items-center justify-center rounded-full bg-white text-neutral-70 shadow-[0px_2px_8px_rgba(0,0,0,0.15)] transition-colors hover:text-neutral-100",children:n.jsx(S,{name:"arrow-down",size:28})}),d==="chat"&&!I&&n.jsx("div",{className:"fixed inset-x-0 bottom-0 bg-white pb-[24px] pt-[32px] shadow-[0px_2px_5px_rgba(0,0,0,0.15)]",children:n.jsxs("div",{className:"mx-auto flex w-full max-w-[1280px] flex-col items-center gap-[12px] px-[40px]",children:[n.jsx("button",{type:"button",disabled:E,onClick:b?U:Y,"aria-label":b?"녹음 종료":"녹음 시작",className:`flex size-[64px] items-center justify-center rounded-full transition-colors disabled:opacity-40 ${b?"bg-danger-50":"bg-neutral-10 hover:bg-neutral-20"}`,children:b?n.jsx("span",{className:"size-[24px] rounded-[6px] bg-white"}):n.jsx(V,{name:"microphone",size:52})}),n.jsx("p",{className:"text-body-1-medium text-neutral-70",children:E?"답변을 분석하고 있어요":b?"듣고 있어요 — 답변을 완료하면 버튼을 다시 눌러주세요":"마이크를 누르고 소리내어 답해보세요"}),M&&n.jsx("p",{className:"text-body-3-medium text-danger-60",children:M})]})}),n.jsx(Wp,{open:O,onClose:()=>q(!1)}),n.jsx(me,{open:k,onClose:()=>z(!1),alert:!0,title:"면접 연습을 종료할까요?",description:C.length===0?n.jsxs(n.Fragment,{children:["아직 답변한 문항이 없어요.",n.jsx("br",{}),"종료하면 결과가 저장되지 않아요."]}):n.jsxs(n.Fragment,{children:["지금까지 답한 ",C.length,"문항은 저장돼요.",n.jsx("br",{}),"결과는 모든 문항을 답해야 볼 수 있어요."]}),children:n.jsxs("div",{className:"mt-[12px] flex w-full gap-[12px]",children:[n.jsx($,{variant:"gray",size:"large",className:"flex-1",onClick:G,children:"종료"}),n.jsx($,{variant:"primary",size:"large",className:"flex-1",onClick:()=>z(!1),children:"계속하기"})]})})]}):n.jsxs("div",{className:"min-h-screen bg-primary-5",children:[n.jsx(Un,{variant:"practice",title:i,subtitle:o,onBack:F}),n.jsxs("div",{className:"flex min-h-[calc(100vh-84px)] flex-col items-center justify-center gap-[16px] px-[40px] text-center",children:[n.jsx("p",{className:"text-heading-3-semibold text-neutral-100",children:"이 브라우저는 음성 면접을 지원하지 않아요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"마이크 녹음이 가능한 최신 크롬·엣지·사파리에서 이용해 주세요."}),n.jsx($,{variant:"primary",size:"large",onClick:()=>e("/practice/text",{state:s}),children:"텍스트 면접으로 진행"})]})]})}function ga(){return n.jsx("span",{className:"h-[14px] w-px shrink-0 bg-neutral-20"})}function Jp({data:e,onReplay:t,onBack:s}){const r=vp(e),l=jp(e);return n.jsxs("div",{className:"flex flex-col gap-[56px]",children:[n.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-[12px] text-neutral-90 transition-colors hover:text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32}),n.jsx("span",{className:"text-heading-4-semibold text-neutral-100",children:"면접 연습 결과"})]}),n.jsxs("div",{className:"flex items-center gap-[56px]",children:[n.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-[16px]",children:[l.kind==="emblem"?n.jsx(Sn,{university:l.school,size:68}):n.jsx("div",{className:"flex size-[68px] shrink-0 items-center justify-center rounded-[16px] border border-neutral-10 bg-white",children:n.jsx(V,{name:l.name,size:52})}),n.jsxs("div",{className:"flex min-w-0 flex-col gap-[8px]",children:[n.jsx("p",{className:"truncate text-heading-3-semibold text-neutral-95",children:r}),n.jsxs("div",{className:"flex flex-wrap items-center gap-[12px] text-body-3-medium text-neutral-60",children:[wp(e)&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"rounded-[12px] bg-primary-10 px-[8px] py-[3px] text-primary-60",children:e.interviewType}),n.jsx(ga,{})]}),n.jsxs("span",{children:[Ml[e.mode]," 면접 · ",wn[e.difficulty]," 난이도 · ",e.total,"문항"]}),e.date&&n.jsxs(n.Fragment,{children:[n.jsx(ga,{}),n.jsxs("span",{className:"flex items-center gap-[8px]",children:[n.jsx("span",{children:"최근 연습"}),n.jsx("span",{children:e.date})]})]}),e.recordFile&&n.jsxs(n.Fragment,{children:[n.jsx(ga,{}),n.jsxs("span",{className:"flex items-center gap-[4px]",children:[n.jsx(V,{name:"file",size:20}),e.recordFile," · ",e.recordDate," 등록"]})]})]})]})]}),n.jsx($,{variant:"primary",size:"medium",className:"shrink-0",trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:t,children:"다시 연습하기"})]})]})}function Xp({open:e,onClose:t,onConfirm:s}){const[r,l]=u.useState(null),a=[{key:"pick",title:"직접 골라서 연습하기",sub:"원하는 질문을 체크해서 연습하기"},{key:"all",title:"처음부터 전체 다시 연습하기",sub:"같은 설정으로 다시 연습하기"}];return n.jsx(me,{open:e,onClose:t,title:"어떻게 다시 연습할까요?",cancelText:"취소",confirmText:"확인",confirmDisabled:!r,onConfirm:()=>r&&s(r),children:n.jsx("div",{className:"flex w-full flex-col gap-[12px]",children:a.map(i=>n.jsxs("button",{type:"button",onClick:()=>l(i.key),className:`flex w-full flex-col gap-[4px] rounded-[16px] border px-[20px] py-[16px] text-left transition-colors ${r===i.key?"border-primary-60 bg-primary-5":"border-transparent bg-neutral-5 hover:bg-neutral-10"}`,children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-100",children:i.title}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:i.sub})]},i.key))})})}function ef({data:e,onReplay:t,onBack:s}){const r=yp(e);return n.jsx("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:n.jsxs("div",{className:"flex flex-col gap-[56px]",children:[n.jsx(Jp,{data:e,onReplay:t,onBack:s}),n.jsx("hr",{className:"border-neutral-10"}),n.jsxs("section",{className:"flex flex-col gap-[24px]",children:[n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("h1",{className:"text-heading-3-semibold text-neutral-100",children:r.title}),n.jsx("p",{className:"text-body-1-medium text-neutral-70",children:r.sub})]}),n.jsx(kd,{state:e.passState,percent:e.passPercent})]}),n.jsx(Sd,{items:e.summary}),n.jsx(Td,{questions:e.questions})]})})}function tf(){const e=ne(),{sessionId:t=""}=bo(),[s,r]=u.useState(null),[l,a]=u.useState(""),[i,o]=u.useState(!1);return u.useEffect(()=>{if(!t){e("/practice",{replace:!0});return}let c=!0;return(async()=>{try{const d=await yd(t);c&&r(Md(d))}catch(d){if(!c)return;Eo?r(bp[kp].data):a(ee(d).message)}})(),()=>{c=!1}},[t,e]),n.jsxs("div",{className:"min-h-screen bg-white",children:[n.jsx(Un,{}),!s&&!l&&n.jsxs("div",{className:"flex min-h-[calc(100vh-84px)] flex-col items-center justify-center gap-[20px]",children:[n.jsx("div",{className:"h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"면접 답변을 분석하고 있어요…"})]}),l&&n.jsxs("div",{className:"flex min-h-[calc(100vh-84px)] flex-col items-center justify-center gap-[24px] px-[40px] text-center",children:[n.jsx("p",{className:"text-heading-3-semibold text-neutral-100",children:"결과를 불러오지 못했어요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:l}),n.jsx($,{variant:"primary",size:"large",onClick:()=>e("/practice"),children:"면접 기록으로"})]}),s&&n.jsx(ef,{data:s,onReplay:()=>o(!0),onBack:()=>e("/practice")}),n.jsx(Xp,{open:i,onClose:()=>o(!1),onConfirm:c=>{o(!1),s&&(c==="pick"?e("/practice/replay-select",{state:{sessionId:t,questions:s.questions,mode:s.mode,difficulty:s.difficulty,difficultyLabel:wn[s.difficulty],school:s.targetSchool,dept:s.targetMajor}}):e(s.mode==="voice"?"/practice/voice":"/practice/text",{state:{difficulty:s.difficulty,difficultyLabel:wn[s.difficulty],school:s.targetSchool,dept:s.targetMajor,returnTo:`/practice/result/${t}`}}))}})]})}function nf(){const e=ne(),{state:t}=Ue(),s=t??{},r=s.questions??[],[l,a]=u.useState(new Set),[i,o]=u.useState(!1);if(!s.questions||r.length===0)return n.jsx(Rs,{to:"/practice",replace:!0});const c=l.size,d=v=>a(C=>{const w=new Set(C);return w.has(v)?w.delete(v):w.add(v),w}),f=()=>e(s.sessionId?`/practice/result/${s.sessionId}`:"/practice"),p=()=>c===0?f():o(!0),h=()=>{o(!1),a(new Set),f()},y=()=>{if(c===0)return;const v=r.filter(C=>l.has(C.no)).map(C=>C.question);e(s.mode==="voice"?"/practice/voice":"/practice/text",{state:{difficulty:s.difficulty,difficultyLabel:s.difficultyLabel,school:s.school,dept:s.dept,selectedQuestions:v,returnTo:s.sessionId?`/practice/result/${s.sessionId}`:void 0}})};return n.jsxs("div",{className:"min-h-screen bg-white pb-[104px]",children:[n.jsx(Un,{}),n.jsxs("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px]",children:[n.jsxs("button",{type:"button",onClick:p,className:"mb-[56px] flex items-center gap-[12px] text-neutral-90 transition-colors hover:text-neutral-100",children:[n.jsx(S,{name:"arrow-left",size:32}),n.jsx("span",{className:"text-heading-4-semibold text-neutral-100",children:"다시 연습할 질문 선택하기"})]}),n.jsx("div",{className:"flex flex-col gap-[16px]",children:r.map(v=>{const C=l.has(v.no);return n.jsxs("button",{type:"button",onClick:()=>d(v.no),className:"flex items-center gap-[16px] rounded-[20px] bg-neutral-5 px-[28px] py-[24px] text-left transition-colors hover:bg-neutral-10",children:[n.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(Ld,{no:v.no}),n.jsx("p",{className:"min-w-0 flex-1 text-body-1-semibold text-neutral-90",children:v.question})]}),v.tags.length>0&&n.jsx("div",{className:"flex flex-wrap gap-[8px]",children:v.tags.map((w,g)=>n.jsx(Ed,{tag:w},g))})]}),n.jsx("span",{className:`flex size-[32px] shrink-0 items-center justify-center rounded-[8px] border transition-colors ${C?"border-primary-60 bg-primary-60":"border-neutral-20 bg-white"}`,children:C&&n.jsx(S,{name:"check",size:24,className:"text-white"})})]},v.no)})})]}),n.jsx("div",{className:"fixed inset-x-0 bottom-0 z-30 border-t border-neutral-10 bg-white shadow-[0_2px_10px_rgba(0,0,0,0.15)]",children:n.jsxs("div",{className:"mx-auto flex max-w-[1440px] items-center justify-between px-[120px] py-[20px]",children:[n.jsxs("p",{className:"text-body-1-semibold text-neutral-90",children:["선택한 질문 ",n.jsx("span",{className:"text-primary-60",children:c}),"개"]}),n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx($,{variant:"gray",size:"large",onClick:p,children:"취소"}),n.jsx($,{variant:"primary",size:"large",disabled:c===0,trailingIcon:n.jsx(S,{name:"arrow-right",size:24}),onClick:y,children:"선택한 질문 다시 연습하기"})]})]})}),n.jsx(me,{open:i,onClose:()=>o(!1),alert:!0,title:"질문 선택을 그만둘까요?",description:"지금 나가면 선택한 질문이 모두 해제돼요.",children:n.jsxs("div",{className:"mt-[12px] flex w-full gap-[12px]",children:[n.jsx($,{variant:"gray",size:"large",className:"flex-1",onClick:h,children:"나가기"}),n.jsx($,{variant:"primary",size:"large",className:"flex-1",onClick:()=>o(!1),children:"계속 선택하기"})]})})]})}function sf(){var r,l;const e=ne(),s=((l=(r=Ue().state)==null?void 0:r.name)==null?void 0:l.trim())||"";return n.jsx("div",{className:"flex min-h-[calc(100vh-68px)] items-center justify-center bg-white",children:n.jsxs("div",{className:"flex w-[400px] flex-col items-center gap-[72px]",children:[n.jsxs("div",{className:"flex flex-col items-center gap-[20px]",children:[n.jsxs("div",{className:"flex w-[312px] flex-col items-center gap-[16px]",children:[n.jsx(S,{name:"circle-check-filled",size:64,className:"text-success-50 fill-white"}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px] text-center",children:[n.jsx("p",{className:"text-heading-3-semibold text-neutral-100",children:"탈퇴가 완료되었어요"}),n.jsxs("p",{className:"text-body-2-medium text-neutral-70",children:["그동안 하이면접을 이용해주셔서 감사해요.",n.jsx("br",{}),s?`${s} 님의`:"회원님의"," 면접을 응원해요. 꼭 좋은 결과 있길 바랄게요!"]})]})]}),n.jsx("div",{className:"flex items-center justify-center rounded-[12px] bg-neutral-5 px-[20px] py-[10px]",children:n.jsx("p",{className:"text-body-3-medium text-neutral-70",children:"생기부와 모든 데이터가 안전하게 삭제되었어요"})})]}),n.jsx($,{variant:"primary",size:"large",className:"w-full",onClick:()=>e("/"),children:"홈으로 가기"})]})})}function rf(e){try{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(decodeURIComponent(escape(atob(t))))}catch{return{}}}function lf(){const e=ne(),t=yt(s=>s.setAuth);return u.useEffect(()=>{const s=window.location.hash.replace(/^#/,""),r=new URLSearchParams(s),l=r.get("accessToken"),a=r.get("refreshToken");if(l&&a){ge.setTokens(l,a,!0),window.history.replaceState(null,"",window.location.pathname);const i=rf(l),o=Number(i.sub??0);gd().then(c=>t({accessToken:l,refreshToken:a,user:{id:o,email:c.email,name:c.userName}},!0)).catch(()=>t({accessToken:l,refreshToken:a,user:{id:o,email:i.email??"",name:i.email??"사용자"}},!0)).finally(()=>e("/questions",{replace:!0}))}else ge.getAccessToken()?e("/questions",{replace:!0}):e("/login?error=oauth",{replace:!0})},[e,t]),n.jsxs("div",{className:"flex min-h-[calc(100vh-68px)] flex-col items-center justify-center gap-[16px]",children:[n.jsx("div",{className:"h-[40px] w-[40px] animate-spin rounded-full border-4 border-primary-60 border-t-transparent"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"로그인 중이에요…"})]})}const J2=[{no:"01",title:"생기부 업로드",desc:`활동·세특·진로 내용을 바탕으로 맞춤 질문을 준비해요.`},{no:"02",title:"예상 질문 생성",desc:`대입 6개 영역 맞춤 질문과 답변 포인트를 받아요.`},{no:"03",title:"면접 연습",desc:`텍스트·음성으로 실전처럼 답변을 연습해요.`},{no:"04",title:"결과 확인",desc:`문항별 피드백과 개선 포인트를 확인해요.`}],af=[{icon:"idea",label:"답변 팁"},{icon:"layer",label:"답변 전략"},{icon:"target",label:"질문 의도"},{icon:"file-search",label:"생기부 활용 근거"}],X2=[{key:"교과 성적",chip:"교과",chipColor:"red",question:"수학 시간에 진행한 탐구 활동에서 가장 흥미로웠던 발견은 무엇인가요?",evalPoint:"문제를 스스로 정의하는 능력, 팀 안에서의 구체적 기여, 결과보다 과정에서의 학습, 그리고 전공 적합성으로의 연결을 봅니다.",modelAnswer:"미적분 단원에서 함수의 극값 조건을 공부하던 중, 신호 처리에서도 비슷한 패턴이 쓰인다는 것을 발견했습니다. 교과서 밖의 개념을 직접 찾아보고 연결해보는 과정이 인상 깊었고, 이후 수학이 단순한 계산이 아니라 현실 문제를 모델링하는 도구라는 시각을 갖게 됐습니다.",followups:[{q:"그 문제를 해결하는 과정에서 본인의 역할은 무엇이었나요?",dir:"방향 · 팀 기여의 구체성과 책임 범위를 확인합니다.",a:"저는 알고리즘의 전제 조건을 점검하는 역할을 맡아, 예외 데이터를 분류하는 테스트 케이스를 직접 설계했습니다. 팀원들이 로직을 수정할 때 어떤 입력에서 오류가 나는지 함께 확인할 수 있도록 기준을 만든 것이 제 기여였습니다."},{q:"결과를 수치로 말했는데, 그 수치는 어떻게 측정했나요?",dir:"방향 · 주장에 대한 근거와 검증 태도를 봅니다.",a:"실험 전후 같은 데이터셋으로 정확도를 비교해, 오분류 비율이 얼마나 줄었는지 수치로 정리했습니다."},{q:"같은 프로젝트를 다시 한다면 무엇을 다르게 하겠어요?",dir:"방향 · 메타인지와 성장 가능성을 확인합니다.",a:"데이터 양이 부족했던 점이 아쉬워, 다음엔 수집 단계부터 다양한 사례를 확보하고 결과를 더 객관적으로 검증해보고 싶습니다."}]},{key:"세부능력 및 특기사항",chip:"세특",chipColor:"orange",question:"동아리 프로젝트에서 가장 어려웠던 의사결정은 무엇이었나요?",evalPoint:"문제 상황을 스스로 정의했는지, 선택의 근거가 분명한지, 그리고 그 경험이 지원 전공과 어떻게 연결되는지를 봅니다.",modelAnswer:"센서 값이 불안정해 기준값을 어떻게 잡을지 고민했는데, 여러 번 실험하며 오차가 가장 적은 값을 직접 찾아 적용했습니다. 정답을 찾기보다 근거를 만들어가는 과정이 인상 깊었습니다.",followups:[{q:"그 결정을 내릴 때 가장 중요하게 본 기준은 무엇이었나요?",dir:"방향 · 판단 기준의 합리성을 확인합니다.",a:"오작동을 줄이는 것이 가장 중요했기에, 정확도보다 안정성을 우선해 기준값을 보수적으로 설정했습니다."},{q:"다른 팀원과 의견이 달랐다면 어떻게 조율했나요?",dir:"방향 · 협업과 설득 태도를 봅니다.",a:"각자의 근거를 데이터로 정리해 비교한 뒤, 함께 테스트해보고 결과로 합의했습니다."},{q:"이 경험이 지원 전공과 어떻게 이어지나요?",dir:"방향 · 전공 적합성을 확인합니다.",a:"데이터로 의사결정을 내리는 경험이 인상 깊어, 대학에서도 실측 데이터를 다루는 분야를 더 공부하고 싶습니다."}]},{key:"창의적 체험활동",chip:"창체",chipColor:"green",question:"교내 활동 중 공동체를 위해 자발적으로 시도한 일은 무엇인가요?",evalPoint:"주도성과 실천력, 협업 과정에서의 기여, 그리고 활동을 통해 배운 점을 봅니다.",modelAnswer:"급식 잔반 문제를 보고 캠페인을 기획해, 학급별 잔반량을 게시하고 줄이기 챌린지를 운영했습니다. 작은 데이터 공유만으로 행동이 바뀐다는 것을 직접 확인했습니다.",followups:[{q:"그 활동을 시작하게 된 계기는 무엇이었나요?",dir:"방향 · 문제의식의 진정성을 확인합니다.",a:"매일 버려지는 음식이 아깝다는 생각에서 출발했고, 데이터로 보여주면 설득될 거라 판단했습니다."},{q:"활동에서 가장 어려웠던 점은 무엇이었나요?",dir:"방향 · 문제 해결 태도를 봅니다.",a:"초반 참여가 저조해, 결과를 눈에 보이게 게시하고 작은 보상을 더해 참여를 끌어올렸습니다."},{q:"이 경험에서 무엇을 배웠나요?",dir:"방향 · 성찰과 성장 가능성을 확인합니다.",a:"사람을 움직이는 건 구호가 아니라 구체적인 데이터와 경험이라는 걸 배웠습니다."}]}];function Ca({icon:e,label:t,desc:s,divider:r=!1,children:l}){return n.jsxs("section",{className:"flex flex-col gap-[12px]",children:[n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx(V,{name:e,size:24}),n.jsx("p",{className:"text-body-3-semibold text-neutral-90",children:t}),s&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:s})]}),r&&n.jsx("div",{className:"h-px w-full bg-neutral-10"}),l]})}function of({no:e,item:t}){const[s,r]=u.useState(e===1);return n.jsxs("div",{className:"flex flex-col gap-[16px] rounded-[20px] bg-neutral-5 p-[24px]",children:[n.jsxs("button",{type:"button",onClick:()=>r(l=>!l),className:"flex w-full items-center justify-between gap-[8px] text-left",children:[n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"flex size-[24px] shrink-0 items-center justify-center rounded-[8px] bg-primary-60 text-body-3-semibold text-white",children:e}),n.jsx("p",{className:"text-body-2-semibold text-neutral-90",children:t.q})]}),n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:t.dir})]}),n.jsx(S,{name:s?"chevron-up":"chevron-down",size:32,className:"shrink-0 text-neutral-50"})]}),s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsx("p",{className:"text-body-2-medium text-neutral-95",children:t.a})]})]})}function cf(){const e=ne(),{isAuthenticated:t}=yt(),[s,r]=u.useState(0),l=X2[s],a=()=>e(t?"/questions/new":"/login?tab=signup");return n.jsx("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:n.jsxs("div",{className:"flex flex-col gap-[80px]",children:[n.jsxs("section",{className:"flex flex-col items-start gap-[16px] rounded-[32px] bg-primary-60 px-[44px] pb-[40px] pt-[48px]",children:[n.jsx(V,{name:"file-search-white",size:48}),n.jsxs("h1",{className:"text-heading-2-bold text-white",children:["생기부 하나로,",n.jsx("br",{}),"면접 준비를 끝까지 이어나가요"]}),n.jsxs("p",{className:"text-body-1-regular text-neutral-10",children:["학교생활기록부를 올리면 대입 5개 영역 맞춤 예상 질문을 만들어드려요.",n.jsx("br",{}),"질문을 연습하고, 결과를 확인하고, 약점 질문을 다시 연습하는 흐름까지 카리면접 안에서 이어집니다."]})]}),n.jsxs("section",{className:"flex flex-col gap-[24px]",children:[n.jsx("h2",{className:"text-heading-3-semibold text-neutral-100",children:"이런 흐름으로 준비해요"}),n.jsx("div",{className:"flex items-stretch gap-[12px]",children:J2.map((i,o)=>n.jsxs(u.Fragment,{children:[n.jsxs("div",{className:"flex h-[240px] flex-1 flex-col items-center justify-center gap-[24px] rounded-[28px] bg-neutral-5 px-[20px] py-[28px] text-center",children:[n.jsx("p",{className:"text-display-3 text-primary-60",children:i.no}),n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-100",children:i.title}),n.jsx("p",{className:"whitespace-pre-line text-body-2-medium text-neutral-80",children:i.desc})]})]}),on.jsx(un,{selected:s===o,onClick:()=>r(o),children:i.key},i.key))}),n.jsxs("div",{className:"rounded-[32px] border border-neutral-20 bg-white p-[40px] shadow-frame",children:[n.jsxs("div",{className:"flex flex-col gap-[12px]",children:[n.jsx("div",{children:n.jsx(Ae,{color:l.chipColor,size:"small",children:l.chip})}),n.jsx("p",{className:"text-heading-4-semibold text-neutral-90",children:l.question})]}),n.jsx("div",{className:"my-[28px] h-px w-full bg-neutral-10"}),n.jsxs("div",{className:"flex flex-col gap-[32px]",children:[n.jsx(Ca,{icon:"puzzle",label:"면접관 평가 포인트",divider:!0,children:n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:l.evalPoint})}),n.jsx(Ca,{icon:"thumb-up",label:"예시 답변",children:n.jsx("div",{className:"flex w-full items-center border-l-[6px] border-primary-30 bg-primary-5 px-[24px] py-[16px]",children:n.jsx("p",{className:"text-body-2-medium text-neutral-90",children:l.modelAnswer})})}),n.jsx(Ca,{icon:"chat-feedback",label:"예상 꼬리질문",desc:"실제 면접에선 답변 뒤에 이런 질문이 이어질 수 있어요. 먼저 스스로 답해보고, 눌러서 예시 답변을 확인하세요.",children:n.jsx("div",{className:"flex flex-col gap-[12px]",children:l.followups.map((i,o)=>n.jsx(of,{no:o+1,item:i},o))})})]}),n.jsxs("div",{className:"mt-[40px] flex flex-col items-center gap-[24px] rounded-[20px] bg-primary-5 px-[24px] py-[48px] text-center",children:[n.jsx(V,{name:"lock",size:36}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px]",children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-100",children:"분석은 여기서 끝이 아니에요"}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"질문 의도, 생기부 활용 근거, 답변 전략, 답변 팁까지 — 질문마다 전체 분석을 제공해요."})]}),n.jsx("div",{className:"flex flex-wrap items-center justify-center gap-[8px]",children:af.map(i=>n.jsxs("span",{className:"inline-flex items-center gap-[8px] rounded-full bg-white px-[12px] py-[6px]",children:[n.jsx(V,{name:i.icon,size:24}),n.jsx("span",{className:"text-body-3-medium text-neutral-70",children:i.label})]},i.label))}),n.jsx($,{variant:"primary",size:"medium",onClick:a,children:"내 생기부로 분석받기"})]})]})]})]})})}const uf=["전체","업데이트","점검","안내","이벤트"],_d={업데이트:"purple",점검:"red",안내:"green",이벤트:"yellow"},e0=e=>String(e).padStart(2,"0"),Nt=e=>{const t=new Date;return t.setHours(0,0,0,0),t.setDate(t.getDate()-e),`${t.getFullYear()}.${e0(t.getMonth()+1)}.${e0(t.getDate())}`},_t=e=>[{kind:"p",text:`${e}에 대한 안내입니다. 자세한 내용은 카리면접 고객센터를 통해 확인하실 수 있어요.`}],df=[{id:1,category:"업데이트",title:"생기부 다운로드 방식 변경 안내 (PDF 직접 업로드 지원)",date:Nt(1),body:_t("생기부 다운로드 방식 변경")},{id:2,category:"점검",title:"6/10(수) 02:00~04:00 서버 정기 점검 안내",date:Nt(3),body:[{kind:"p",text:"안녕하세요, 카리면접입니다. 더 안정적인 서비스 제공을 위해 아래와 같이 서버 정기 점검을 진행합니다. 이용에 참고 부탁드립니다."},{kind:"list",heading:"점검 일시",items:["2026년 6월 10일(수) 02:00 ~ 04:00 (약 2시간)","점검 상황에 따라 시간이 단축되거나 연장될 수 있습니다."]},{kind:"list",heading:"점검 중 이용 제한 기능",items:["면접 연습(녹화·AI 피드백)","생기부 업로드 및 키워드 분석","이용권 결제 및 환불"]},{kind:"list",heading:"안내 사항",items:["점검 시작 전 작성·녹화 중이던 내용은 미리 저장해 주세요.","점검 완료 후에는 별도 조치 없이 정상 이용 가능합니다."]}],attachment:{name:"점검_상세_안내.pdf",size:"238KB"}},{id:3,category:"점검",title:"5/28(수) 결제 시스템 긴급 점검 완료 안내",date:Nt(9),body:_t("결제 시스템 긴급 점검 완료")},{id:4,category:"이벤트",title:"수시 면접 응원 — 1:1 모의면접 무료 체험권 배포",date:Nt(12),body:_t("1:1 모의면접 무료 체험권 배포")},{id:5,category:"안내",title:"개인정보 처리방침 개정 안내 (시행 2026.06.01)",date:Nt(15),body:_t("개인정보 처리방침 개정")},{id:6,category:"업데이트",title:"면접 연습 영상 다시보기 기능 추가",date:Nt(18),body:_t("면접 연습 영상 다시보기 기능 추가")},{id:7,category:"점검",title:"4/28(목) 02:00~04:00 서버 정기 점검 안내",date:Nt(22),body:_t("서버 정기 점검")},{id:8,category:"업데이트",title:"AI 예상 질문 추천 정확도 개선",date:Nt(26),body:_t("AI 예상 질문 추천 정확도 개선")},{id:9,category:"점검",title:"3/28(수) 결제 시스템 긴급 점검 완료 안내",date:Nt(33),body:_t("결제 시스템 긴급 점검 완료")},{id:10,category:"안내",title:"카리면접 서비스 이용약관 개정 안내 (시행 2026.03.22)",date:Nt(40),body:_t("서비스 이용약관 개정")}],t0=["업데이트","점검","안내","이벤트"],xf=Array.from({length:90},(e,t)=>{const s=t+11,r=t0[t%t0.length];return{id:s,category:r,title:`지난 ${r} 공지사항 ${String(s).padStart(2,"0")}`,date:Nt(45+t),body:_t(`지난 ${r} 공지사항`)}}),cs=[...df,...xf];function pf(e){return cs.find(t=>t.id===e)}function ff(e){const t=cs.findIndex(s=>s.id===e);return t===-1?{}:{prev:cs[t-1],next:cs[t+1]}}const mf=7;function hf(e){const[t,s,r]=e.split(".").map(Number);return new Date(t,s-1,r).getTime()}function gf(e){const t=(Date.now()-hf(e))/864e5;return t>=0&&t<=mf}function zd(){var t;return`kari:notice:read:${((t=yt.getState().user)==null?void 0:t.id)??"guest"}`}function Pd(){try{return new Set(JSON.parse(localStorage.getItem(zd())??"[]"))}catch{return new Set}}function Cf(e){return Pd().has(e)}function yf(e){const t=Pd();t.has(e)||(t.add(e),localStorage.setItem(zd(),JSON.stringify([...t])))}function Rd(e){return gf(e.date)&&!Cf(e.id)}const vf=["업데이트","점검","안내","이벤트"];function jf(e){if(!e)return"";const t=new Date(e);if(Number.isNaN(t.getTime()))return"";const s=r=>String(r).padStart(2,"0");return`${t.getFullYear()}.${s(t.getMonth()+1)}.${s(t.getDate())}`}function wf(e){try{const t=JSON.parse(e);if(t&&Array.isArray(t.body))return{category:vf.includes(t.category??"")?t.category:"안내",body:t.body,attachment:t.attachment}}catch{}return{category:"안내",body:[{kind:"p",text:e}]}}function Nf(e){const{category:t,body:s,attachment:r}=wf(e.content);return{id:e.id,category:t,title:e.title,date:jf(e.createdAt),body:s,attachment:r}}async function Id(){const e=await fetch(`${ze("/api/notices")}/api/notices?size=200`,{headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`공지 조회 실패 (${e.status})`);return((await e.json()).notices??[]).map(Nf)}const X1="dots";function bf(e,t,s){const r=s*2+5;if(t<=r)return Array.from({length:t},(d,f)=>f+1);const l=Math.max(e-s,1),a=Math.min(e+s,t),i=l>2,o=af+1),X1,t]:i&&!o?[1,X1,...Array.from({length:c},(d,f)=>t-c+1+f)]:[1,X1,...Array.from({length:a-l+1},(d,f)=>l+f),X1,t]}const ya="flex size-[36px] items-center justify-center rounded-[12px] transition-colors";function kf({page:e,totalPages:t,onChange:s,siblingCount:r=1,className:l=""}){if(t<=1)return null;const a=bf(e,t,r),i=c=>{const d=Math.min(Math.max(c,1),t);d!==e&&s(d)},o=c=>{const d=c==="prev"?e===1:e===t;return n.jsx("button",{type:"button","aria-label":c==="prev"?"이전 페이지":"다음 페이지",disabled:d,onClick:()=>i(c==="prev"?e-1:e+1),className:`${ya} border border-neutral-10 bg-white ${d?"cursor-default text-neutral-30":"text-neutral-80 hover:border-neutral-20 hover:bg-neutral-20"}`,children:n.jsx(S,{name:c==="prev"?"chevron-left":"chevron-right",size:24})})};return n.jsxs("nav",{"aria-label":"페이지네이션",className:`inline-flex items-center gap-[8px] ${l}`,children:[o("prev"),a.map((c,d)=>c===X1?n.jsx("span",{className:`${ya} text-body-3-medium text-neutral-80`,children:"…"},`dots-${d}`):n.jsx("button",{type:"button","aria-current":c===e?"page":void 0,onClick:()=>i(c),className:`${ya} text-body-3-medium ${c===e?"bg-primary-60 text-white":"border border-neutral-10 bg-white text-neutral-80 hover:border-neutral-20 hover:bg-neutral-20"}`,children:c},c)),o("next")]})}const va=10;function Sf(){return n.jsx("span",{className:"inline-flex h-[22px] shrink-0 items-center rounded-[8px] bg-primary-60 px-[6px] text-caption-medium text-white",children:"NEW"})}function ja({icon:e,title:t,subtitle:s,dark:r=!1}){return n.jsxs("div",{className:"flex flex-col items-center justify-center gap-[20px] py-[140px] text-center",children:[n.jsx(V,{name:e,size:48}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px]",children:[n.jsx("p",{className:`text-heading-4-semibold ${r?"text-neutral-90":"text-neutral-70"}`,children:t}),s&&n.jsx("p",{className:"text-body-2-medium text-neutral-70",children:s})]})]})}function Lf({notice:e,onClick:t}){return n.jsxs("button",{onClick:t,className:"flex w-full flex-col items-start gap-[8px] border-b border-neutral-10 py-[24px] text-left transition-colors hover:bg-neutral-5",children:[n.jsxs("div",{className:"flex flex-col items-start gap-[8px]",children:[n.jsx(Ae,{color:_d[e.category],children:e.category}),n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-95",children:e.title}),Rd(e)&&n.jsx(Sf,{})]})]}),n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:e.date})]})}function Ef(){const e=ne(),[t,s]=u.useState(""),[r,l]=u.useState("전체"),[a,i]=u.useState(1),[o,c]=u.useState(cs);u.useEffect(()=>{let C=!0;return Id().then(w=>{C&&w.length&&c(w)}).catch(()=>{}),()=>{C=!1}},[]);const d=t.trim(),f=u.useMemo(()=>o.filter(C=>(r==="전체"||C.category===r)&&(d===""||C.title.includes(d))),[o,r,d]),p=Math.ceil(f.length/va),h=f.slice((a-1)*va,a*va),y=C=>{l(C),i(1)},v=C=>{s(C),i(1)};return n.jsxs("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:[n.jsxs("div",{className:"flex flex-col gap-[48px]",children:[n.jsx("h1",{className:"text-heading-2-semibold text-neutral-100",children:"공지사항"}),n.jsxs("div",{className:"flex flex-col gap-[24px]",children:[n.jsxs("div",{className:"flex flex-col gap-[28px]",children:[n.jsx("div",{className:"w-[353px]",children:n.jsx(Mo,{value:t,onChange:C=>v(C.target.value),onClear:()=>v(""),placeholder:"검색어를 입력해주세요"})}),n.jsx("div",{className:"flex w-full overflow-x-auto border-b-[1px] border-neutral-20",children:uf.map(C=>n.jsx(Dt,{selected:r===C,onClick:()=>y(C),children:C},C))})]}),f.length===0?d!==""?n.jsx(ja,{icon:"search",dark:!0,title:`‘${d}' 검색 결과가 없어요`,subtitle:"검색어의 철자를 확인하거나, 다른 키워드로 다시 검색해 보세요."}):r!=="전체"?n.jsx(ja,{icon:"file",title:`‘${r}' 카테고리에 등록된 공지사항이 없어요`}):n.jsx(ja,{icon:"file",title:"등록된 공지사항이 없어요"}):n.jsx("div",{className:"flex flex-col",children:h.map(C=>n.jsx(Lf,{notice:C,onClick:()=>e(`/notice/${C.id}`)},C.id))})]})]}),p>1&&n.jsx("div",{className:"mt-[48px] flex justify-center",children:n.jsx(kf,{page:a,totalPages:p,onChange:i})})]})}function Tf(){return n.jsx("span",{className:"inline-flex h-[22px] shrink-0 items-center rounded-[8px] bg-primary-60 px-[6px] text-caption-medium text-white",children:"NEW"})}function Mf(){const{id:e}=bo(),t=ne(),s=Number(e),[r,l]=u.useState(()=>pf(s)),[a,i]=u.useState(()=>ff(s));u.useEffect(()=>{let f=!0;return Id().then(p=>{if(!f||!p.length)return;const h=p.findIndex(y=>y.id===s);h!==-1&&(l(p[h]),i({prev:p[h-1],next:p[h+1]}))}).catch(()=>{}),()=>{f=!1}},[s]);const{prev:o,next:c}=a;if(u.useEffect(()=>{r&&yf(r.id)},[r]),!r)return n.jsxs("div",{className:"mx-auto max-w-[1440px] px-[120px] py-[120px] text-center",children:[n.jsx("p",{className:"text-body-2-medium text-neutral-60",children:"존재하지 않는 공지사항이에요."}),n.jsx("button",{onClick:()=>t("/notice"),className:"mt-[16px] text-body-3-semibold text-primary-60 underline",children:"공지사항 목록으로"})]});const d=[o&&{label:"이전",n:o},c&&{label:"다음",n:c}].filter(Boolean);return n.jsxs("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("button",{onClick:()=>t("/notice"),"aria-label":"목록으로",className:"flex size-[32px] items-center justify-center text-neutral-90 transition-colors hover:text-neutral-100",children:n.jsx(S,{name:"arrow-left",size:32})}),n.jsx("p",{className:"text-heading-4-semibold text-neutral-100",children:"공지사항"})]}),n.jsxs("div",{className:"mt-[56px] flex flex-col gap-[80px]",children:[n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsxs("div",{className:"flex flex-col items-start gap-[8px]",children:[n.jsx(Ae,{color:_d[r.category],children:r.category}),n.jsxs("div",{className:"flex items-center gap-[8px]",children:[n.jsx("p",{className:"text-heading-3-semibold text-neutral-95",children:r.title}),Rd(r)&&n.jsx(Tf,{})]})]}),n.jsx("p",{className:"text-body-1-medium text-neutral-60",children:r.date})]}),n.jsx("div",{className:"h-px w-full bg-neutral-20"}),n.jsx("div",{className:"flex min-h-[168px] flex-col gap-[24px]",children:r.body.map((f,p)=>f.kind==="p"?n.jsx("p",{className:"text-body-2-regular text-neutral-100",children:f.text},p):n.jsxs("div",{className:"flex flex-col gap-[8px]",children:[n.jsx("p",{className:"text-body-2-semibold text-neutral-100",children:f.heading}),n.jsx("ul",{className:"list-disc pl-[24px] text-body-2-regular text-neutral-100",children:f.items.map((h,y)=>n.jsx("li",{children:h},y))})]},p))}),r.attachment&&n.jsxs("div",{className:"flex items-center justify-between rounded-[20px] bg-neutral-5 px-[20px] py-[16px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx(V,{name:"file",size:40}),n.jsxs("div",{className:"flex flex-col gap-[2px]",children:[n.jsx("p",{className:"text-body-3-semibold text-neutral-90",children:r.attachment.name}),n.jsx("p",{className:"text-body-3-regular text-neutral-50",children:r.attachment.size})]})]}),n.jsx("button",{type:"button","aria-label":"첨부파일 다운로드",className:"flex size-[28px] items-center justify-center text-neutral-80 transition-colors hover:text-neutral-100",children:n.jsx(S,{name:"download",size:28})})]})]}),n.jsxs("div",{className:"flex flex-col gap-[28px]",children:[d.length>0&&n.jsx("div",{className:"flex flex-col overflow-hidden rounded-[20px] border border-neutral-10",children:d.map((f,p)=>n.jsxs("button",{onClick:()=>t(`/notice/${f.n.id}`),className:`flex w-full items-center gap-[23px] px-[24px] py-[20px] text-left transition-colors hover:bg-neutral-5 ${pt("/notice"),children:"목록으로 돌아가기"})]})]})]})}const _f=["계정·로그인","생기부","면접 연습","결제·환불","개인정보·보안"];async function zf(){const e=await fetch(`${ze("/api/faqs")}/api/faqs?size=200`,{headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error(`FAQ 조회 실패 (${e.status})`);return((await e.json()).faqs??[]).map(s=>({id:s.id,category:_f.includes(s.category??"")?s.category:"면접 연습",question:s.question,answer:s.answer}))}const Pf="https://pf.kakao.com/_xbfxlUG",Rf=`${Pf}/chat`;function If({faq:e,open:t,onToggle:s}){return n.jsxs("div",{className:"w-full",children:[n.jsxs("button",{onClick:s,"aria-expanded":t,className:"flex w-full items-center justify-between border-b border-neutral-10 py-[24px] text-left",children:[n.jsxs("span",{className:"flex items-center gap-[16px] text-body-1-semibold",children:[n.jsx("span",{className:"shrink-0 text-primary-50",children:"Q"}),n.jsx("span",{className:"text-neutral-95",children:e.question})]}),n.jsx(S,{name:"chevron-down",size:32,className:`shrink-0 text-neutral-40 transition-transform ${t?"rotate-180":""}`})]}),t&&n.jsx("div",{className:"bg-neutral-5 px-[28px] py-[32px]",children:n.jsx("p",{className:"whitespace-pre-line text-body-2-regular text-neutral-95",children:e.answer})})]})}function Df(){const e=g8();return n.jsxs("div",{className:"flex items-center justify-between rounded-[24px] bg-primary-5 px-[36px] py-[32px]",children:[n.jsxs("div",{className:"flex w-[280px] flex-col gap-[18px]",children:[n.jsxs("div",{className:"flex flex-col gap-[4px]",children:[n.jsx("p",{className:"text-heading-4-bold text-primary-60",children:"찾는 질문이 없나요?"}),n.jsx("p",{className:"text-body-3-medium text-neutral-80",children:"운영팀이 도와드릴테니 편한 방법으로 문의해주세요"})]}),n.jsxs("div",{className:"flex w-fit items-center gap-[8px] rounded-[20px] bg-white px-[12px] py-[6px]",children:[n.jsx("span",{className:`size-[6px] shrink-0 rounded-full ${e?"bg-success-40":"bg-neutral-40"}`}),n.jsxs("span",{className:"text-caption-regular text-neutral-80",children:[e?"지금 상담 가능":"지금은 상담 시간이 아니에요"," · 평일 09:00 ~ 18:00"]})]})]}),n.jsxs("div",{className:"flex w-[192px] flex-col gap-[12px]",children:[n.jsxs("a",{href:Rf,target:"_blank",rel:"noopener noreferrer",className:"flex h-[48px] w-full items-center justify-center gap-[8px] rounded-[14px] border-[0.75px] border-neutral-10 bg-white px-[16px] py-[12px] transition-colors hover:bg-neutral-5",children:[n.jsx(S,{name:"channel-talk",size:24,className:"text-neutral-90"}),n.jsx("span",{className:"text-body-2-semibold text-neutral-90",children:"카카오채널 문의하기"})]}),n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("span",{className:"text-body-2-semibold text-neutral-90",children:"고객센터"}),n.jsx("span",{className:"h-[12px] w-px rounded-full bg-neutral-40"}),n.jsx("span",{className:"text-body-2-semibold text-neutral-90",children:C8})]})]})]})}function Af(){const[e,t]=u.useState(""),[s,r]=u.useState("전체"),[l,a]=u.useState(null),[i,o]=u.useState(qu);u.useEffect(()=>{let C=!0;return zf().then(w=>{C&&w.length&&o(w)}).catch(()=>{}),()=>{C=!1}},[]);const c=e.trim(),d=c!=="",f=u.useMemo(()=>d?i.filter(C=>C.question.includes(c)||C.answer.includes(c)):s==="전체"?i:i.filter(C=>C.category===s),[i,d,c,s]),p=C=>{r(C),a(null)},h=C=>{t(C),a(null)},y=C=>a(w=>w===C?null:C),v=d&&f.length===0;return n.jsx("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:n.jsxs("div",{className:"flex flex-col gap-[72px]",children:[n.jsxs("div",{className:"flex flex-col gap-[28px]",children:[n.jsxs("div",{className:"flex flex-col gap-[48px]",children:[n.jsx("h1",{className:"text-heading-2-semibold text-neutral-100",children:"자주 묻는 질문"}),n.jsxs("div",{className:"flex flex-col gap-[28px]",children:[n.jsx("div",{className:"w-[353px]",children:n.jsx(Mo,{value:e,onChange:C=>h(C.target.value),onClear:()=>h(""),placeholder:"검색어를 입력해주세요"})}),n.jsx("div",{className:"flex w-full overflow-x-auto border-b-[1px] border-neutral-20",children:h8.map(C=>n.jsx(Dt,{selected:!d&&s===C,onClick:()=>p(C),children:C},C))})]})]}),v?n.jsxs("div",{className:"flex flex-col items-center justify-center gap-[20px] py-[140px] text-center",children:[n.jsx(V,{name:"search",size:48}),n.jsxs("div",{className:"flex flex-col items-center gap-[8px]",children:[n.jsx("p",{className:"text-heading-4-semibold text-neutral-90",children:`‘${c}' 검색 결과가 없어요`}),n.jsxs("p",{className:"text-body-2-medium text-neutral-70",children:["검색어의 철자를 확인하거나, 다른 키워드로 다시 검색해 보세요.",n.jsx("br",{}),"찾는 질문이 없다면 직접 문의해 주세요."]})]})]}):n.jsx("div",{className:"flex flex-col",children:f.map(C=>n.jsx(If,{faq:C,open:l===C.id,onToggle:()=>y(C.id)},C.id))})]}),n.jsx(Df,{})]})})}function n0({doc:e}){const{title:t,paragraphs:s}=td(e);return u.useEffect(()=>{window.scrollTo(0,0)},[e]),n.jsxs("div",{className:"mx-auto max-w-[900px] px-[24px] py-[80px] md:px-[40px]",children:[n.jsx("h1",{className:"text-heading-2-semibold text-neutral-100",children:t}),n.jsx("div",{className:"mt-[32px] flex flex-col gap-[2px]",children:s.map((r,l)=>n.jsx("p",{className:"text-body-2-regular leading-[24px] text-neutral-80",children:r||" "},l))})]})}const Ff={"카카오톡 앱":"카카오톡은 본인 명의 계좌가 있어야 발급돼요. 계좌가 없다면 정부24 웹사이트를 이용해주세요","네이버 앱":"네이버는 본인 명의 계좌가 있어야 발급돼요. 계좌가 없다면 정부24 웹사이트를 이용해주세요"};function Dd({n:e,tone:t}){return n.jsx("span",{className:`flex size-[28px] shrink-0 items-center justify-center rounded-[8px] text-body-2-semibold text-white ${t==="dark"?"bg-neutral-90":"bg-primary-60"}`,children:e})}function Of({images:e,active:t,width:s}){return n.jsx("div",{className:"shrink-0 overflow-hidden rounded-[24px] shadow-[0px_2px_10px_rgba(0,0,0,0.15)]",style:{width:s},children:n.jsx("div",{className:"flex w-full transition-transform duration-500 ease-out",style:{transform:`translateX(-${t*100}%)`},children:e.map((r,l)=>n.jsx("img",{src:r,alt:"",className:"block w-full shrink-0"},l))})})}function Hf({card:e,active:t,onClick:s}){return n.jsxs("div",{role:"button",tabIndex:0,"aria-pressed":t,onClick:s,onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),s())},className:`flex w-full cursor-pointer items-start gap-[12px] rounded-[20px] p-[26px] text-left transition-colors ${t?"bg-primary-5":"border border-neutral-10 bg-white hover:bg-neutral-5"}`,children:[n.jsx("span",{className:"flex items-center py-[4px]",children:n.jsx(Dd,{n:e.n,tone:"primary"})}),n.jsxs("div",{className:"flex flex-1 flex-col gap-[8px]",children:[n.jsxs("div",{className:"flex items-center justify-between gap-[12px]",children:[n.jsx("p",{className:`text-heading-4-semibold ${t?"text-primary-60":"text-neutral-100"}`,children:e.title}),e.link&&n.jsxs("a",{href:e.link.href,target:"_blank",rel:"noreferrer",onClick:r=>r.stopPropagation(),className:"flex shrink-0 items-center gap-[4px] text-body-3-medium text-neutral-50 transition-colors hover:text-neutral-80",children:[e.link.label,n.jsx(S,{name:"external-link",size:16})]})]}),n.jsx("p",{className:"text-body-2-regular text-neutral-60",children:e.sub})]})]})}function $f({step:e}){const[t,s]=u.useState(0);return n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx(Dd,{n:e.n,tone:"dark"}),n.jsxs("div",{className:"flex items-center gap-[12px]",children:[n.jsx("p",{className:"text-heading-3-semibold text-neutral-100",children:e.title}),n.jsx("p",{className:"text-body-2-regular text-neutral-60",children:e.sub})]})]}),n.jsxs("div",{className:"flex items-start gap-[40px]",children:[e.kind==="web"?n.jsx(Of,{images:e.screens,active:t,width:e.imgWidth??604}):n.jsx(id,{frameSrc:e.frame??M1,images:e.screens,active:t,width:e.width??320}),n.jsx("div",{className:"flex flex-1 flex-col gap-[20px]",children:e.cards.map((r,l)=>n.jsx(Hf,{card:r,active:t===l,onClick:()=>s(l)},r.n))})]})]})}function Vf(){const[e,t]=u.useState("재학생"),[s,r]=u.useState("카카오톡 앱"),l=Hx.includes(e)?cd[s]:void 0,a=!!l,i=ia(e),o=Ff[s];return n.jsx("div",{className:"mx-auto max-w-[1440px] px-[120px] pt-[80px] pb-[120px]",children:n.jsxs("div",{className:"flex flex-col gap-[48px]",children:[n.jsx("h1",{className:"text-heading-2-semibold text-neutral-100",children:"생기부 다운로드 안내"}),n.jsxs("div",{className:"flex flex-col gap-[72px]",children:[n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsxs("div",{className:"flex flex-col gap-[40px]",children:[n.jsxs("div",{className:"flex flex-col gap-[20px]",children:[n.jsx("p",{className:"text-body-1-semibold text-neutral-95",children:"나에게 맞는 방법 찾기"}),n.jsx("div",{className:"flex gap-[16px]",children:Fx.map(c=>{const d=e===c.title;return n.jsxs("button",{type:"button",onClick:()=>{t(c.title),ia(c.title).includes(s)||r(ia(c.title)[0])},"aria-pressed":d,className:`flex flex-1 items-center gap-[16px] rounded-[20px] p-[24px] text-left transition-colors ${d?"bg-primary-60":"border border-neutral-20 bg-white hover:bg-neutral-5"}`,children:[n.jsx(V,{name:c.icon,size:48}),n.jsxs("div",{className:"flex flex-col",children:[n.jsx("p",{className:`text-body-1-semibold ${d?"text-white":"text-neutral-100"}`,children:c.title}),n.jsx("p",{className:`text-body-2-regular ${d?"text-neutral-10":"text-neutral-60"}`,children:c.sub})]})]},c.title)})})]}),n.jsx("div",{className:"flex w-full overflow-x-auto border-b-[1px] border-neutral-20",children:i.map(c=>n.jsx(Dt,{selected:s===c,onClick:()=>r(c),children:c},c))})]}),a&&o&&n.jsxs("div",{className:"flex w-full items-start gap-[8px] rounded-[12px] bg-neutral-5 px-[14px] py-[12px]",children:[n.jsx(S,{name:"circle-alert",size:20,className:"mt-[1px] shrink-0 text-neutral-60"}),n.jsxs("div",{className:"flex flex-col gap-[2px]",children:[n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:o}),e==="졸업생"&&n.jsx("p",{className:"text-body-3-medium text-neutral-60",children:$x})]})]})]}),l?n.jsx("div",{className:"flex flex-col gap-[88px]",children:l.map(c=>n.jsx($f,{step:c},`${s}-${c.n}`))}):n.jsxs("div",{className:"py-[120px] text-center text-body-2-medium text-neutral-60",children:[e," · ",s," 발급 안내는 준비 중이에요."]})]})]})})}function We({children:e}){return yt(s=>s.isAuthenticated)?e:n.jsx(Rs,{to:"/login",replace:!0})}function Bf(){return yt(t=>t.isAuthenticated)?n.jsx(nx,{}):n.jsx(M8,{})}function Zf(){return yt(t=>t.isAuthenticated)?n.jsx(c7,{}):n.jsx(h7,{})}function Uf(){return yt(t=>t.isAuthenticated)?n.jsx(lp,{}):n.jsx(j7,{})}function qf(){const e=ne(),t=yt(s=>s.clearAuth);return u.useEffect(()=>(p2(()=>{t(),e("/login",{replace:!0})}),()=>p2(null)),[t,e]),n.jsxs(u5,{children:[n.jsxs(re,{element:n.jsx(c8,{}),children:[n.jsx(re,{index:!0,element:n.jsx(Bf,{})}),n.jsx(re,{path:"login",element:n.jsx(dx,{})}),n.jsx(re,{path:"auth/callback",element:n.jsx(lf,{})}),n.jsx(re,{path:"password-reset",element:n.jsx(xx,{})}),n.jsx(re,{path:"start",element:n.jsx(Qx,{})}),n.jsx(re,{path:"onboarding",element:n.jsx(We,{children:n.jsx(Xx,{})})}),n.jsx(re,{path:"questions",element:n.jsx(Zf,{})}),n.jsx(re,{path:"questions/all",element:n.jsx(We,{children:n.jsx(x7,{})})}),n.jsx(re,{path:"questions/new",element:n.jsx(We,{children:n.jsx(V7,{})})}),n.jsx(re,{path:"questions/saved",element:n.jsx(We,{children:n.jsx(L7,{})})}),n.jsx(re,{path:"questions/:id",element:n.jsx(We,{children:n.jsx(k7,{})})}),n.jsx(re,{path:"mypage",element:n.jsx(We,{children:n.jsx($7,{})})}),n.jsx(re,{path:"withdraw-complete",element:n.jsx(sf,{})}),n.jsx(re,{path:"practice",element:n.jsx(Uf,{})}),n.jsx(re,{path:"practice/all",element:n.jsx(We,{children:n.jsx(ap,{})})}),n.jsx(re,{path:"practice/new",element:n.jsx(We,{children:n.jsx(up,{})})}),n.jsx(re,{path:"practice/onboarding",element:n.jsx(We,{children:n.jsx(fp,{})})}),n.jsx(re,{path:"practice/focus",element:n.jsx(We,{children:n.jsx(hp,{})})}),n.jsx(re,{path:"guide",element:n.jsx(cf,{})}),n.jsx(re,{path:"guide/recordbook",element:n.jsx(Vf,{})}),n.jsx(re,{path:"notice",element:n.jsx(Ef,{})}),n.jsx(re,{path:"notice/:id",element:n.jsx(Mf,{})}),n.jsx(re,{path:"faq",element:n.jsx(Af,{})}),n.jsx(re,{path:"terms",element:n.jsx(n0,{doc:"terms"})}),n.jsx(re,{path:"privacy",element:n.jsx(n0,{doc:"privacy"})}),n.jsx(re,{path:"*",element:n.jsx(Rs,{to:"/",replace:!0})})]}),n.jsx(re,{path:"practice/text",element:n.jsx(We,{children:n.jsx(Up,{})})}),n.jsx(re,{path:"practice/voice",element:n.jsx(We,{children:n.jsx(Yp,{})})}),n.jsx(re,{path:"practice/result/:sessionId",element:n.jsx(We,{children:n.jsx(tf,{})})}),n.jsx(re,{path:"practice/replay-select",element:n.jsx(We,{children:n.jsx(nf,{})})}),n.jsx(re,{path:"practice/focus/result",element:n.jsx(We,{children:n.jsx(Hp,{})})})]})}Cu(document.getElementById("root")).render(n.jsx(u.StrictMode,{children:n.jsx(y5,{children:n.jsx(qf,{})})}));