diff --git a/.gitignore b/.gitignore index 112544d..6db85ac 100644 --- a/.gitignore +++ b/.gitignore @@ -18,7 +18,7 @@ .env.development.local .env.test.local .env.production.local -/dist + npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/.vscode/settings.json b/.vscode/settings.json index 7f3c887..1494e0a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,5 +11,6 @@ "javascriptreact", "typescript", "typescriptreact" - ] + ], + "compile-hero.disable-compile-files-on-did-save-code": true } diff --git a/dist/assets/default-featured-image.png-C2hm5daT.jpg b/dist/assets/default-featured-image.png-C2hm5daT.jpg new file mode 100644 index 0000000..7133496 Binary files /dev/null and b/dist/assets/default-featured-image.png-C2hm5daT.jpg differ diff --git a/dist/assets/index-4YtmX69h.js b/dist/assets/index-4YtmX69h.js new file mode 100644 index 0000000..382d1b5 --- /dev/null +++ b/dist/assets/index-4YtmX69h.js @@ -0,0 +1,5341 @@ +var xh=e=>{throw TypeError(e)};var Gc=(e,t,n)=>t.has(e)||xh("Cannot "+n);var k=(e,t,n)=>(Gc(e,t,"read from private field"),n?n.call(e):t.get(e)),te=(e,t,n)=>t.has(e)?xh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,r)=>(Gc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ue=(e,t,n)=>(Gc(e,t,"access private method"),n);var Ca=(e,t,n,r)=>({set _(o){V(e,t,o,n)},get _(){return k(e,t,r)}});function Cx(e,t){for(var n=0;nr[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function Sx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kx={exports:{}},ac={},Px={exports:{}},pe={};/** + * @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 oa=Symbol.for("react.element"),Zv=Symbol.for("react.portal"),ew=Symbol.for("react.fragment"),tw=Symbol.for("react.strict_mode"),nw=Symbol.for("react.profiler"),rw=Symbol.for("react.provider"),ow=Symbol.for("react.context"),iw=Symbol.for("react.forward_ref"),sw=Symbol.for("react.suspense"),aw=Symbol.for("react.memo"),lw=Symbol.for("react.lazy"),yh=Symbol.iterator;function cw(e){return e===null||typeof e!="object"?null:(e=yh&&e[yh]||e["@@iterator"],typeof e=="function"?e:null)}var Ex={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rx=Object.assign,Ax={};function Ti(e,t,n){this.props=e,this.context=t,this.refs=Ax,this.updater=n||Ex}Ti.prototype.isReactComponent={};Ti.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")};Ti.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ix(){}Ix.prototype=Ti.prototype;function zf(e,t,n){this.props=e,this.context=t,this.refs=Ax,this.updater=n||Ex}var Ff=zf.prototype=new Ix;Ff.constructor=zf;Rx(Ff,Ti.prototype);Ff.isPureReactComponent=!0;var vh=Array.isArray,Dx=Object.prototype.hasOwnProperty,Uf={current:null},Ox={key:!0,ref:!0,__self:!0,__source:!0};function Tx(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Dx.call(t,r)&&!Ox.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1>>1,ne=W[ie];if(0>>1;ieo(Ne,X))Ceo(M,Ne)?(W[ie]=M,W[Ce]=X,ie=Ce):(W[ie]=Ne,W[be]=X,ie=be);else if(Ceo(M,X))W[ie]=M,W[Ce]=X,ie=Ce;else break e}}return H}function o(W,H){var X=W.sortIndex-H.sortIndex;return X!==0?X:W.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var u=[],d=[],p=1,f=null,h=3,b=!1,y=!1,x=!1,j=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(W){for(var H=n(d);H!==null;){if(H.callback===null)r(d);else if(H.startTime<=W)r(d),H.sortIndex=H.expirationTime,t(u,H);else break;H=n(d)}}function C(W){if(x=!1,v(W),!y)if(n(u)!==null)y=!0,he(P);else{var H=n(d);H!==null&&oe(C,H.startTime-W)}}function P(W,H){y=!1,x&&(x=!1,g(I),I=-1),b=!0;var X=h;try{for(v(H),f=n(u);f!==null&&(!(f.expirationTime>H)||W&&!N());){var ie=f.callback;if(typeof ie=="function"){f.callback=null,h=f.priorityLevel;var ne=ie(f.expirationTime<=H);H=e.unstable_now(),typeof ne=="function"?f.callback=ne:f===n(u)&&r(u),v(H)}else r(u);f=n(u)}if(f!==null)var Ve=!0;else{var be=n(d);be!==null&&oe(C,be.startTime-H),Ve=!1}return Ve}finally{f=null,h=X,b=!1}}var S=!1,R=null,I=-1,L=5,B=-1;function N(){return!(e.unstable_now()-BW||125ie?(W.sortIndex=X,t(d,W),n(u)===null&&W===n(d)&&(x?(g(I),I=-1):x=!0,oe(C,X-ie))):(W.sortIndex=ne,t(u,W),y||b||(y=!0,he(P))),W},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(W){var H=h;return function(){var X=h;h=H;try{return W.apply(this,arguments)}finally{h=X}}}})($x);Mx.exports=$x;var bw=Mx.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 jw=w,Ht=bw;function z(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dd=Object.prototype.hasOwnProperty,Cw=/^[: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]*$/,bh={},jh={};function Sw(e){return dd.call(jh,e)?!0:dd.call(bh,e)?!1:Cw.test(e)?jh[e]=!0:(bh[e]=!0,!1)}function kw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Pw(e,t,n,r){if(t===null||typeof t>"u"||kw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 kt(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ft[e]=new kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ft[t]=new kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ft[e]=new kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ft[e]=new kt(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){ft[e]=new kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ft[e]=new kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ft[e]=new kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ft[e]=new kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ft[e]=new kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wf=/[\-:]([a-z])/g;function Hf(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(Wf,Hf);ft[t]=new kt(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(Wf,Hf);ft[t]=new kt(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(Wf,Hf);ft[t]=new kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ft[e]=new kt(e,1,!1,e.toLowerCase(),null,!1,!1)});ft.xlinkHref=new kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ft[e]=new kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vf(e,t,n,r){var o=ft.hasOwnProperty(t)?ft[t]:null;(o!==null?o.type!==0:r||!(2l||o[a]!==i[l]){var u=` +`+o[a].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=a&&0<=l);break}}}finally{Jc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ps(e):""}function Ew(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=Xc(e.type,!1),e;case 11:return e=Xc(e.type.render,!1),e;case 1:return e=Xc(e.type,!0),e;default:return""}}function md(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 Uo:return"Fragment";case Fo:return"Portal";case fd:return"Profiler";case Qf:return"StrictMode";case pd:return"Suspense";case hd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ux:return(e.displayName||"Context")+".Consumer";case Fx:return(e._context.displayName||"Context")+".Provider";case Kf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gf:return t=e.displayName||null,t!==null?t:md(e.type)||"Memo";case dr:t=e._payload,e=e._init;try{return md(e(t))}catch{}}return null}function Rw(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 md(t);case 8:return t===Qf?"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 _r(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Aw(e){var t=Wx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pa(e){e._valueTracker||(e._valueTracker=Aw(e))}function Hx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wx(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function jl(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 gd(e,t){var n=t.checked;return Fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Sh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_r(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Vx(e,t){t=t.checked,t!=null&&Vf(e,"checked",t,!1)}function xd(e,t){Vx(e,t);var n=_r(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yd(e,t.type,n):t.hasOwnProperty("defaultValue")&&yd(e,t.type,_r(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kh(e,t,n){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,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function yd(e,t,n){(t!=="number"||jl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hs=Array.isArray;function Zo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Ea.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ds(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ws={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},Iw=["Webkit","ms","Moz","O"];Object.keys(ws).forEach(function(e){Iw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ws[t]=ws[e]})});function qx(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ws.hasOwnProperty(e)&&ws[e]?(""+t).trim():t+"px"}function Yx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=qx(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Dw=Fe({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 bd(e,t){if(t){if(Dw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(z(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(z(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(z(61))}if(t.style!=null&&typeof t.style!="object")throw Error(z(62))}}function jd(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 Cd=null;function qf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sd=null,ei=null,ti=null;function Rh(e){if(e=aa(e)){if(typeof Sd!="function")throw Error(z(280));var t=e.stateNode;t&&(t=fc(t),Sd(e.stateNode,e.type,t))}}function Jx(e){ei?ti?ti.push(e):ti=[e]:ei=e}function Xx(){if(ei){var e=ei,t=ti;if(ti=ei=null,Rh(e),t)for(e=0;e>>=0,e===0?32:31-(Bw(e)/Ww|0)|0}var Ra=64,Aa=4194304;function ms(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 Pl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~o;l!==0?r=ms(l):(i&=a,i!==0&&(r=ms(i)))}else a=n&~o,a!==0?r=ms(a):i!==0&&(r=ms(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ia(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fn(t),e[t]=n}function Kw(e,t){var n=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=js),Mh=" ",$h=!1;function y0(e,t){switch(e){case"keyup":return bb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bo=!1;function Cb(e,t){switch(e){case"compositionend":return v0(t);case"keypress":return t.which!==32?null:($h=!0,Mh);case"textInput":return e=t.data,e===Mh&&$h?null:e;default:return null}}function Sb(e,t){if(Bo)return e==="compositionend"||!rp&&y0(e,t)?(e=g0(),ol=ep=Sr=null,Bo=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Bh(n)}}function C0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?C0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S0(){for(var e=window,t=jl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=jl(e.document)}return t}function op(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 Tb(e){var t=S0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&C0(n.ownerDocument.documentElement,n)){if(r!==null&&op(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Wh(n,i);var a=Wh(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Wo=null,Id=null,Ss=null,Dd=!1;function Hh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dd||Wo==null||Wo!==jl(r)||(r=Wo,"selectionStart"in r&&op(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}),Ss&&Ms(Ss,r)||(Ss=r,r=Al(Id,"onSelect"),0Qo||(e.current=Md[Qo],Md[Qo]=null,Qo--)}function Ie(e,t){Qo++,Md[Qo]=e.current,e.current=t}var Mr={},yt=zr(Mr),Dt=zr(!1),xo=Mr;function bi(e,t){var n=e.type.contextTypes;if(!n)return Mr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ot(e){return e=e.childContextTypes,e!=null}function Dl(){Te(Dt),Te(yt)}function Jh(e,t,n){if(yt.current!==Mr)throw Error(z(168));Ie(yt,t),Ie(Dt,n)}function T0(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(z(108,Rw(e)||"Unknown",o));return Fe({},n,r)}function Ol(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mr,xo=yt.current,Ie(yt,e),Ie(Dt,Dt.current),!0}function Xh(e,t,n){var r=e.stateNode;if(!r)throw Error(z(169));n?(e=T0(e,t,xo),r.__reactInternalMemoizedMergedChildContext=e,Te(Dt),Te(yt),Ie(yt,e)):Te(Dt),Ie(Dt,n)}var Wn=null,pc=!1,fu=!1;function N0(e){Wn===null?Wn=[e]:Wn.push(e)}function Vb(e){pc=!0,N0(e)}function Fr(){if(!fu&&Wn!==null){fu=!0;var e=0,t=Pe;try{var n=Wn;for(Pe=1;e>=a,o-=a,Vn=1<<32-fn(t)+o|n<I?(L=R,R=null):L=R.sibling;var B=h(g,R,v[I],C);if(B===null){R===null&&(R=L);break}e&&R&&B.alternate===null&&t(g,R),m=i(B,m,I),S===null?P=B:S.sibling=B,S=B,R=L}if(I===v.length)return n(g,R),_e&&Gr(g,I),P;if(R===null){for(;II?(L=R,R=null):L=R.sibling;var N=h(g,R,B.value,C);if(N===null){R===null&&(R=L);break}e&&R&&N.alternate===null&&t(g,R),m=i(N,m,I),S===null?P=N:S.sibling=N,S=N,R=L}if(B.done)return n(g,R),_e&&Gr(g,I),P;if(R===null){for(;!B.done;I++,B=v.next())B=f(g,B.value,C),B!==null&&(m=i(B,m,I),S===null?P=B:S.sibling=B,S=B);return _e&&Gr(g,I),P}for(R=r(g,R);!B.done;I++,B=v.next())B=b(R,g,I,B.value,C),B!==null&&(e&&B.alternate!==null&&R.delete(B.key===null?I:B.key),m=i(B,m,I),S===null?P=B:S.sibling=B,S=B);return e&&R.forEach(function(O){return t(g,O)}),_e&&Gr(g,I),P}function j(g,m,v,C){if(typeof v=="object"&&v!==null&&v.type===Uo&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ka:e:{for(var P=v.key,S=m;S!==null;){if(S.key===P){if(P=v.type,P===Uo){if(S.tag===7){n(g,S.sibling),m=o(S,v.props.children),m.return=g,g=m;break e}}else if(S.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===dr&&tm(P)===S.type){n(g,S.sibling),m=o(S,v.props),m.ref=Zi(g,S,v),m.return=g,g=m;break e}n(g,S);break}else t(g,S);S=S.sibling}v.type===Uo?(m=ho(v.props.children,g.mode,C,v.key),m.return=g,g=m):(C=fl(v.type,v.key,v.props,null,g.mode,C),C.ref=Zi(g,m,v),C.return=g,g=C)}return a(g);case Fo:e:{for(S=v.key;m!==null;){if(m.key===S)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(g,m.sibling),m=o(m,v.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=wu(v,g.mode,C),m.return=g,g=m}return a(g);case dr:return S=v._init,j(g,m,S(v._payload),C)}if(hs(v))return y(g,m,v,C);if(Gi(v))return x(g,m,v,C);_a(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,v),m.return=g,g=m):(n(g,m),m=vu(v,g.mode,C),m.return=g,g=m),a(g)):n(g,m)}return j}var Ci=$0(!0),z0=$0(!1),Ll=zr(null),_l=null,qo=null,lp=null;function cp(){lp=qo=_l=null}function up(e){var t=Ll.current;Te(Ll),e._currentValue=t}function Fd(e,t,n){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===n)break;e=e.return}}function ri(e,t){_l=e,lp=qo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(It=!0),e.firstContext=null)}function en(e){var t=e._currentValue;if(lp!==e)if(e={context:e,memoizedValue:t,next:null},qo===null){if(_l===null)throw Error(z(308));qo=e,_l.dependencies={lanes:0,firstContext:e}}else qo=qo.next=e;return t}var eo=null;function dp(e){eo===null?eo=[e]:eo.push(e)}function F0(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,dp(t)):(n.next=o.next,o.next=n),t.interleaved=n,Xn(e,r)}function Xn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fr=!1;function fp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function U0(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 Kn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Dr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ve&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Xn(e,n)}return o=r.interleaved,o===null?(t.next=t,dp(r)):(t.next=o.next,o.next=t),r.interleaved=t,Xn(e,n)}function sl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jf(e,n)}}function nm(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ml(e,t,n,r){var o=e.updateQueue;fr=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var u=l,d=u.next;u.next=null,a===null?i=d:a.next=d,a=u;var p=e.alternate;p!==null&&(p=p.updateQueue,l=p.lastBaseUpdate,l!==a&&(l===null?p.firstBaseUpdate=d:l.next=d,p.lastBaseUpdate=u))}if(i!==null){var f=o.baseState;a=0,p=d=u=null,l=i;do{var h=l.lane,b=l.eventTime;if((r&h)===h){p!==null&&(p=p.next={eventTime:b,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,x=l;switch(h=t,b=n,x.tag){case 1:if(y=x.payload,typeof y=="function"){f=y.call(b,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,h=typeof y=="function"?y.call(b,f,h):y,h==null)break e;f=Fe({},f,h);break e;case 2:fr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else b={eventTime:b,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},p===null?(d=p=b,u=f):p=p.next=b,a|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(p===null&&(u=f),o.baseState=u,o.firstBaseUpdate=d,o.lastBaseUpdate=p,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);wo|=a,e.lanes=a,e.memoizedState=f}}function rm(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=hu.transition;hu.transition={};try{e(!1),t()}finally{Pe=n,hu.transition=r}}function oy(){return tn().memoizedState}function qb(e,t,n){var r=Tr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},iy(e))sy(t,n);else if(n=F0(e,t,n,r),n!==null){var o=Ct();pn(n,e,r,o),ay(n,t,r)}}function Yb(e,t,n){var r=Tr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(iy(e))sy(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,mn(l,a)){var u=t.interleaved;u===null?(o.next=o,dp(t)):(o.next=u.next,u.next=o),t.interleaved=o;return}}catch{}finally{}n=F0(e,t,o,r),n!==null&&(o=Ct(),pn(n,e,r,o),ay(n,t,r))}}function iy(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function sy(e,t){ks=zl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ay(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jf(e,n)}}var Fl={readContext:en,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},Jb={readContext:en,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:en,useEffect:im,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ll(4194308,4,Z0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ll(4194308,4,e,t)},useInsertionEffect:function(e,t){return ll(4,2,e,t)},useMemo:function(e,t){var n=wn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wn();return t=n!==void 0?n(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=qb.bind(null,ze,e),[r.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:om,useDebugValue:wp,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=om(!1),t=e[0];return e=Gb.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ze,o=wn();if(_e){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),st===null)throw Error(z(349));vo&30||V0(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,im(K0.bind(null,r,i,e),[e]),r.flags|=2048,Vs(9,Q0.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wn(),t=st.identifierPrefix;if(_e){var n=Qn,r=Vn;n=(r&~(1<<32-fn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ws++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Pn]=t,e[Fs]=r,xy(e,t,!1,!1),t.stateNode=e;e:{switch(a=jd(n,r),n){case"dialog":De("cancel",e),De("close",e),o=r;break;case"iframe":case"object":case"embed":De("load",e),o=r;break;case"video":case"audio":for(o=0;oPi&&(t.flags|=128,r=!0,es(i,!1),t.lanes=4194304)}else{if(!r)if(e=$l(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),es(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!_e)return ht(t),null}else 2*Qe()-i.renderingStartTime>Pi&&n!==1073741824&&(t.flags|=128,r=!0,es(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Qe(),t.sibling=null,n=$e.current,Ie($e,r?n&1|2:n&1),t):(ht(t),null);case 22:case 23:return Pp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?zt&1073741824&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),null;case 24:return null;case 25:return null}throw Error(z(156,t.tag))}function ij(e,t){switch(sp(t),t.tag){case 1:return Ot(t.type)&&Dl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Si(),Te(Dt),Te(yt),mp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hp(t),null;case 13:if(Te($e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Te($e),null;case 4:return Si(),null;case 10:return up(t.type._context),null;case 22:case 23:return Pp(),null;case 24:return null;default:return null}}var $a=!1,gt=!1,sj=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Yo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){He(e,t,r)}else n.current=null}function qd(e,t,n){try{n()}catch(r){He(e,t,r)}}var gm=!1;function aj(e,t){if(Od=El,e=S0(),op(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,u=-1,d=0,p=0,f=e,h=null;t:for(;;){for(var b;f!==n||o!==0&&f.nodeType!==3||(l=a+o),f!==i||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(b=f.firstChild)!==null;)h=f,f=b;for(;;){if(f===e)break t;if(h===n&&++d===o&&(l=a),h===i&&++p===r&&(u=a),(b=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=b}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Td={focusedElem:e,selectionRange:n},El=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,j=y.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:sn(t.type,x),j);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(z(163))}}catch(C){He(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return y=gm,gm=!1,y}function Ps(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&qd(t,n,i)}o=o.next}while(o!==r)}}function gc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yd(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wy(e){var t=e.alternate;t!==null&&(e.alternate=null,wy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pn],delete t[Fs],delete t[_d],delete t[Wb],delete t[Hb])),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 by(e){return e.tag===5||e.tag===3||e.tag===4}function xm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||by(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 Jd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Il));else if(r!==4&&(e=e.child,e!==null))for(Jd(e,t,n),e=e.sibling;e!==null;)Jd(e,t,n),e=e.sibling}function Xd(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Xd(e,t,n),e=e.sibling;e!==null;)Xd(e,t,n),e=e.sibling}var ct=null,ln=!1;function rr(e,t,n){for(n=n.child;n!==null;)jy(e,t,n),n=n.sibling}function jy(e,t,n){if(En&&typeof En.onCommitFiberUnmount=="function")try{En.onCommitFiberUnmount(lc,n)}catch{}switch(n.tag){case 5:gt||Yo(n,t);case 6:var r=ct,o=ln;ct=null,rr(e,t,n),ct=r,ln=o,ct!==null&&(ln?(e=ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ct.removeChild(n.stateNode));break;case 18:ct!==null&&(ln?(e=ct,n=n.stateNode,e.nodeType===8?du(e.parentNode,n):e.nodeType===1&&du(e,n),Ls(e)):du(ct,n.stateNode));break;case 4:r=ct,o=ln,ct=n.stateNode.containerInfo,ln=!0,rr(e,t,n),ct=r,ln=o;break;case 0:case 11:case 14:case 15:if(!gt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&qd(n,t,a),o=o.next}while(o!==r)}rr(e,t,n);break;case 1:if(!gt&&(Yo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){He(n,t,l)}rr(e,t,n);break;case 21:rr(e,t,n);break;case 22:n.mode&1?(gt=(r=gt)||n.memoizedState!==null,rr(e,t,n),gt=r):rr(e,t,n);break;default:rr(e,t,n)}}function ym(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new sj),t.forEach(function(r){var o=gj.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*cj(r/1960))-r,10e?16:e,kr===null)var r=!1;else{if(e=kr,kr=null,Wl=0,ve&6)throw Error(z(331));var o=ve;for(ve|=4,Q=e.current;Q!==null;){var i=Q,a=i.child;if(Q.flags&16){var l=i.deletions;if(l!==null){for(var u=0;uQe()-Sp?po(e,0):Cp|=n),Tt(e,t)}function Iy(e,t){t===0&&(e.mode&1?(t=Aa,Aa<<=1,!(Aa&130023424)&&(Aa=4194304)):t=1);var n=Ct();e=Xn(e,t),e!==null&&(ia(e,t,n),Tt(e,n))}function mj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Iy(e,n)}function gj(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(z(314))}r!==null&&r.delete(t),Iy(e,n)}var Dy;Dy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Dt.current)It=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return It=!1,rj(e,t,n);It=!!(e.flags&131072)}else It=!1,_e&&t.flags&1048576&&L0(t,Nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;cl(e,t),e=t.pendingProps;var o=bi(t,yt.current);ri(t,n),o=xp(null,t,r,e,o,n);var i=yp();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ot(r)?(i=!0,Ol(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,fp(t),o.updater=mc,t.stateNode=o,o._reactInternals=t,Bd(t,r,e,n),t=Vd(null,t,r,!0,i,n)):(t.tag=0,_e&&i&&ip(t),jt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(cl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=yj(r),e=sn(r,e),o){case 0:t=Hd(null,t,r,e,n);break e;case 1:t=pm(null,t,r,e,n);break e;case 11:t=dm(null,t,r,e,n);break e;case 14:t=fm(null,t,r,sn(r.type,e),n);break e}throw Error(z(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:sn(r,o),Hd(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:sn(r,o),pm(e,t,r,o,n);case 3:e:{if(hy(t),e===null)throw Error(z(387));r=t.pendingProps,i=t.memoizedState,o=i.element,U0(e,t),Ml(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ki(Error(z(423)),t),t=hm(e,t,r,n,o);break e}else if(r!==o){o=ki(Error(z(424)),t),t=hm(e,t,r,n,o);break e}else for(Ut=Ir(t.stateNode.containerInfo.firstChild),Bt=t,_e=!0,un=null,n=z0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ji(),r===o){t=Zn(e,t,n);break e}jt(e,t,r,n)}t=t.child}return t;case 5:return B0(t),e===null&&zd(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Nd(r,o)?a=null:i!==null&&Nd(r,i)&&(t.flags|=32),py(e,t),jt(e,t,a,n),t.child;case 6:return e===null&&zd(t),null;case 13:return my(e,t,n);case 4:return pp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ci(t,null,r,n):jt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:sn(r,o),dm(e,t,r,o,n);case 7:return jt(e,t,t.pendingProps,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Ie(Ll,r._currentValue),r._currentValue=a,i!==null)if(mn(i.value,a)){if(i.children===o.children&&!Dt.current){t=Zn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Kn(-1,n&-n),u.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?u.next=u:(u.next=p.next,p.next=u),d.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Fd(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(z(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Fd(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}jt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ri(t,n),o=en(o),r=r(o),t.flags|=1,jt(e,t,r,n),t.child;case 14:return r=t.type,o=sn(r,t.pendingProps),o=sn(r.type,o),fm(e,t,r,o,n);case 15:return dy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:sn(r,o),cl(e,t),t.tag=1,Ot(r)?(e=!0,Ol(t)):e=!1,ri(t,n),ly(t,r,o),Bd(t,r,o,n),Vd(null,t,r,!0,e,n);case 19:return gy(e,t,n);case 22:return fy(e,t,n)}throw Error(z(156,t.tag))};function Oy(e,t){return i0(e,t)}function xj(e,t,n,r){this.tag=e,this.key=n,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 Xt(e,t,n,r){return new xj(e,t,n,r)}function Rp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yj(e){if(typeof e=="function")return Rp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Kf)return 11;if(e===Gf)return 14}return 2}function Nr(e,t){var n=e.alternate;return n===null?(n=Xt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function fl(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Rp(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Uo:return ho(n.children,o,i,t);case Qf:a=8,o|=8;break;case fd:return e=Xt(12,n,t,o|2),e.elementType=fd,e.lanes=i,e;case pd:return e=Xt(13,n,t,o),e.elementType=pd,e.lanes=i,e;case hd:return e=Xt(19,n,t,o),e.elementType=hd,e.lanes=i,e;case Bx:return yc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fx:a=10;break e;case Ux:a=9;break e;case Kf:a=11;break e;case Gf:a=14;break e;case dr:a=16,r=null;break e}throw Error(z(130,e==null?e:typeof e,""))}return t=Xt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ho(e,t,n,r){return e=Xt(7,e,r,t),e.lanes=n,e}function yc(e,t,n,r){return e=Xt(22,e,r,t),e.elementType=Bx,e.lanes=n,e.stateNode={isHidden:!1},e}function vu(e,t,n){return e=Xt(6,e,null,t),e.lanes=n,e}function wu(e,t,n){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vj(e,t,n,r,o){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=eu(0),this.expirationTimes=eu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eu(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ap(e,t,n,r,o,i,a,l,u){return e=new vj(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Xt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fp(i),e}function wj(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_y)}catch(e){console.error(e)}}_y(),_x.exports=Vt;var Tp=_x.exports;const kj=Sx(Tp),Pj=Cx({__proto__:null,default:kj},[Tp]);var My,Pm=Tp;My=Pm.createRoot,Pm.hydrateRoot;/** + * @remix-run/router v1.21.0 + * + * 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 Le(){return Le=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Rj(){return Math.random().toString(36).substr(2,8)}function Rm(e,t){return{usr:e.state,key:e.key,idx:t}}function Ks(e,t,n,r){return n===void 0&&(n=null),Le({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ur(t):t,{state:n,key:t&&t.key||r||Rj()})}function jo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ur(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Aj(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l=qe.Pop,u=null,d=p();d==null&&(d=0,a.replaceState(Le({},a.state,{idx:d}),""));function p(){return(a.state||{idx:null}).idx}function f(){l=qe.Pop;let j=p(),g=j==null?null:j-d;d=j,u&&u({action:l,location:x.location,delta:g})}function h(j,g){l=qe.Push;let m=Ks(x.location,j,g);d=p()+1;let v=Rm(m,d),C=x.createHref(m);try{a.pushState(v,"",C)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(C)}i&&u&&u({action:l,location:x.location,delta:1})}function b(j,g){l=qe.Replace;let m=Ks(x.location,j,g);d=p();let v=Rm(m,d),C=x.createHref(m);a.replaceState(v,"",C),i&&u&&u({action:l,location:x.location,delta:0})}function y(j){let g=o.location.origin!=="null"?o.location.origin:o.location.href,m=typeof j=="string"?j:jo(j);return m=m.replace(/ $/,"%20"),fe(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let x={get action(){return l},get location(){return e(o,a)},listen(j){if(u)throw new Error("A history only accepts one active listener");return o.addEventListener(Em,f),u=j,()=>{o.removeEventListener(Em,f),u=null}},createHref(j){return t(o,j)},createURL:y,encodeLocation(j){let g=y(j);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:b,go(j){return a.go(j)}};return x}var Re;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Re||(Re={}));const Ij=new Set(["lazy","caseSensitive","path","id","index","children"]);function Dj(e){return e.index===!0}function Ql(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let a=[...n,String(i)],l=typeof o.id=="string"?o.id:a.join("-");if(fe(o.index!==!0||!o.children,"Cannot specify children on an index route"),fe(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),Dj(o)){let u=Le({},o,t(o),{id:l});return r[l]=u,u}else{let u=Le({},o,t(o),{id:l,children:void 0});return r[l]=u,o.children&&(u.children=Ql(o.children,t,a,r)),u}})}function Jr(e,t,n){return n===void 0&&(n="/"),pl(e,t,n,!1)}function pl(e,t,n,r){let o=typeof t=="string"?Ur(t):t,i=_i(o.pathname||"/",n);if(i==null)return null;let a=$y(e);Tj(a);let l=null;for(let u=0;l==null&&u{let u={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};u.relativePath.startsWith("/")&&(fe(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let d=Gn([r,u.relativePath]),p=n.concat(u);i.children&&i.children.length>0&&(fe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),$y(i.children,t,p,d)),!(i.path==null&&!i.index)&&t.push({path:d,score:Fj(d,i.index),routesMeta:p})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let u of zy(i.path))o(i,a,u)}),t}function zy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=zy(r.join("/")),l=[];return l.push(...a.map(u=>u===""?i:[i,u].join("/"))),o&&l.push(...a),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function Tj(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Uj(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Nj=/^:[\w-]+$/,Lj=3,_j=2,Mj=1,$j=10,zj=-2,Am=e=>e==="*";function Fj(e,t){let n=e.split("/"),r=n.length;return n.some(Am)&&(r+=zj),t&&(r+=_j),n.filter(o=>!Am(o)).reduce((o,i)=>o+(Nj.test(i)?Lj:i===""?Mj:$j),r)}function Uj(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Bj(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l{let{paramName:h,isOptional:b}=p;if(h==="*"){let x=l[f]||"";a=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const y=l[f];return b&&!y?d[h]=void 0:d[h]=(y||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:a,pattern:e}}function Wj(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ei(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,u)=>(r.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Hj(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ei(!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 _i(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Vj(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Ur(e):e;return{pathname:n?n.startsWith("/")?n:Qj(n,t):t,search:Gj(r),hash:qj(o)}}function Qj(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function bu(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Fy(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cc(e,t){let n=Fy(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Sc(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Ur(e):(o=Le({},e),fe(!o.pathname||!o.pathname.includes("?"),bu("?","pathname","search",o)),fe(!o.pathname||!o.pathname.includes("#"),bu("#","pathname","hash",o)),fe(!o.search||!o.search.includes("#"),bu("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}l=f>=0?t[f]:"/"}let u=Vj(o,l),d=a&&a!=="/"&&a.endsWith("/"),p=(i||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||p)&&(u.pathname+="/"),u}const Gn=e=>e.join("/").replace(/\/\/+/g,"/"),Kj=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Gj=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qj=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Kl{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ca(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Uy=["post","put","patch","delete"],Yj=new Set(Uy),Jj=["get",...Uy],Xj=new Set(Jj),Zj=new Set([301,302,303,307,308]),eC=new Set([307,308]),ju={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tC={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ns={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Np=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nC=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),By="remix-router-transitions";function rC(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;fe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let E=e.detectErrorBoundary;o=A=>({hasErrorBoundary:E(A)})}else o=nC;let i={},a=Ql(e.routes,o,void 0,i),l,u=e.basename||"/",d=e.dataStrategy||aC,p=e.patchRoutesOnNavigation,f=Le({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,b=new Set,y=null,x=null,j=null,g=e.hydrationData!=null,m=Jr(a,e.history.location,u),v=null;if(m==null&&!p){let E=Rt(404,{pathname:e.history.location.pathname}),{matches:A,route:D}=Um(a);m=A,v={[D.id]:E}}m&&!e.hydrationData&&va(m,a,e.history.location.pathname).active&&(m=null);let C;if(m)if(m.some(E=>E.route.lazy))C=!1;else if(!m.some(E=>E.route.loader))C=!0;else if(f.v7_partialHydration){let E=e.hydrationData?e.hydrationData.loaderData:null,A=e.hydrationData?e.hydrationData.errors:null;if(A){let D=m.findIndex(_=>A[_.route.id]!==void 0);C=m.slice(0,D+1).every(_=>!of(_.route,E,A))}else C=m.every(D=>!of(D.route,E,A))}else C=e.hydrationData!=null;else if(C=!1,m=[],f.v7_partialHydration){let E=va(null,a,e.history.location.pathname);E.active&&E.matches&&(m=E.matches)}let P,S={historyAction:e.history.action,location:e.history.location,matches:m,initialized:C,navigation:ju,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},R=qe.Pop,I=!1,L,B=!1,N=new Map,O=null,$=!1,F=!1,se=[],he=new Set,oe=new Map,W=0,H=-1,X=new Map,ie=new Set,ne=new Map,Ve=new Map,be=new Set,Ne=new Map,Ce=new Map,M;function U(){if(h=e.history.listen(E=>{let{action:A,location:D,delta:_}=E;if(M){M(),M=void 0;return}Ei(Ce.size===0||_!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let K=ph({currentLocation:S.location,nextLocation:D,historyAction:A});if(K&&_!=null){let Z=new Promise(le=>{M=le});e.history.go(_*-1),ya(K,{state:"blocked",location:D,proceed(){ya(K,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),Z.then(()=>e.history.go(_))},reset(){let le=new Map(S.blockers);le.set(K,ns),Me({blockers:le})}});return}return at(A,D)}),n){bC(t,N);let E=()=>jC(t,N);t.addEventListener("pagehide",E),O=()=>t.removeEventListener("pagehide",E)}return S.initialized||at(qe.Pop,S.location,{initialHydration:!0}),P}function ae(){h&&h(),O&&O(),b.clear(),L&&L.abort(),S.fetchers.forEach((E,A)=>xa(A)),S.blockers.forEach((E,A)=>fh(A))}function Ke(E){return b.add(E),()=>b.delete(E)}function Me(E,A){A===void 0&&(A={}),S=Le({},S,E);let D=[],_=[];f.v7_fetcherPersist&&S.fetchers.forEach((K,Z)=>{K.state==="idle"&&(be.has(Z)?_.push(Z):D.push(Z))}),[...b].forEach(K=>K(S,{deletedFetchers:_,viewTransitionOpts:A.viewTransitionOpts,flushSync:A.flushSync===!0})),f.v7_fetcherPersist&&(D.forEach(K=>S.fetchers.delete(K)),_.forEach(K=>xa(K)))}function rt(E,A,D){var _,K;let{flushSync:Z}=D===void 0?{}:D,le=S.actionData!=null&&S.navigation.formMethod!=null&&cn(S.navigation.formMethod)&&S.navigation.state==="loading"&&((_=E.state)==null?void 0:_._isRedirect)!==!0,q;A.actionData?Object.keys(A.actionData).length>0?q=A.actionData:q=null:le?q=S.actionData:q=null;let Y=A.loaderData?zm(S.loaderData,A.loaderData,A.matches||[],A.errors):S.loaderData,G=S.blockers;G.size>0&&(G=new Map(G),G.forEach((ye,lt)=>G.set(lt,ns)));let ee=I===!0||S.navigation.formMethod!=null&&cn(S.navigation.formMethod)&&((K=E.state)==null?void 0:K._isRedirect)!==!0;l&&(a=l,l=void 0),$||R===qe.Pop||(R===qe.Push?e.history.push(E,E.state):R===qe.Replace&&e.history.replace(E,E.state));let me;if(R===qe.Pop){let ye=N.get(S.location.pathname);ye&&ye.has(E.pathname)?me={currentLocation:S.location,nextLocation:E}:N.has(E.pathname)&&(me={currentLocation:E,nextLocation:S.location})}else if(B){let ye=N.get(S.location.pathname);ye?ye.add(E.pathname):(ye=new Set([E.pathname]),N.set(S.location.pathname,ye)),me={currentLocation:S.location,nextLocation:E}}Me(Le({},A,{actionData:q,loaderData:Y,historyAction:R,location:E,initialized:!0,navigation:ju,revalidation:"idle",restoreScrollPosition:mh(E,A.matches||S.matches),preventScrollReset:ee,blockers:G}),{viewTransitionOpts:me,flushSync:Z===!0}),R=qe.Pop,I=!1,B=!1,$=!1,F=!1,se=[]}async function J(E,A){if(typeof E=="number"){e.history.go(E);return}let D=rf(S.location,S.matches,u,f.v7_prependBasename,E,f.v7_relativeSplatPath,A==null?void 0:A.fromRouteId,A==null?void 0:A.relative),{path:_,submission:K,error:Z}=Dm(f.v7_normalizeFormMethod,!1,D,A),le=S.location,q=Ks(S.location,_,A&&A.state);q=Le({},q,e.history.encodeLocation(q));let Y=A&&A.replace!=null?A.replace:void 0,G=qe.Push;Y===!0?G=qe.Replace:Y===!1||K!=null&&cn(K.formMethod)&&K.formAction===S.location.pathname+S.location.search&&(G=qe.Replace);let ee=A&&"preventScrollReset"in A?A.preventScrollReset===!0:void 0,me=(A&&A.flushSync)===!0,ye=ph({currentLocation:le,nextLocation:q,historyAction:G});if(ye){ya(ye,{state:"blocked",location:q,proceed(){ya(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),J(E,A)},reset(){let lt=new Map(S.blockers);lt.set(ye,ns),Me({blockers:lt})}});return}return await at(G,q,{submission:K,pendingError:Z,preventScrollReset:ee,replace:A&&A.replace,enableViewTransition:A&&A.viewTransition,flushSync:me})}function ge(){if(Hc(),Me({revalidation:"loading"}),S.navigation.state!=="submitting"){if(S.navigation.state==="idle"){at(S.historyAction,S.location,{startUninterruptedRevalidation:!0});return}at(R||S.historyAction,S.navigation.location,{overrideNavigation:S.navigation,enableViewTransition:B===!0})}}async function at(E,A,D){L&&L.abort(),L=null,R=E,$=(D&&D.startUninterruptedRevalidation)===!0,qv(S.location,S.matches),I=(D&&D.preventScrollReset)===!0,B=(D&&D.enableViewTransition)===!0;let _=l||a,K=D&&D.overrideNavigation,Z=Jr(_,A,u),le=(D&&D.flushSync)===!0,q=va(Z,_,A.pathname);if(q.active&&q.matches&&(Z=q.matches),!Z){let{error:Ae,notFoundMatches:je,route:Ue}=Vc(A.pathname);rt(A,{matches:je,loaderData:{},errors:{[Ue.id]:Ae}},{flushSync:le});return}if(S.initialized&&!F&&pC(S.location,A)&&!(D&&D.submission&&cn(D.submission.formMethod))){rt(A,{matches:Z},{flushSync:le});return}L=new AbortController;let Y=To(e.history,A,L.signal,D&&D.submission),G;if(D&&D.pendingError)G=[Xr(Z).route.id,{type:Re.error,error:D.pendingError}];else if(D&&D.submission&&cn(D.submission.formMethod)){let Ae=await Wi(Y,A,D.submission,Z,q.active,{replace:D.replace,flushSync:le});if(Ae.shortCircuited)return;if(Ae.pendingActionResult){let[je,Ue]=Ae.pendingActionResult;if(Ft(Ue)&&ca(Ue.error)&&Ue.error.status===404){L=null,rt(A,{matches:Ae.matches,loaderData:{},errors:{[je]:Ue.error}});return}}Z=Ae.matches||Z,G=Ae.pendingActionResult,K=Cu(A,D.submission),le=!1,q.active=!1,Y=To(e.history,Y.url,Y.signal)}let{shortCircuited:ee,matches:me,loaderData:ye,errors:lt}=await On(Y,A,Z,q.active,K,D&&D.submission,D&&D.fetcherSubmission,D&&D.replace,D&&D.initialHydration===!0,le,G);ee||(L=null,rt(A,Le({matches:me||Z},Fm(G),{loaderData:ye,errors:lt})))}async function Wi(E,A,D,_,K,Z){Z===void 0&&(Z={}),Hc();let le=vC(A,D);if(Me({navigation:le},{flushSync:Z.flushSync===!0}),K){let G=await wa(_,A.pathname,E.signal);if(G.type==="aborted")return{shortCircuited:!0};if(G.type==="error"){let ee=Xr(G.partialMatches).route.id;return{matches:G.partialMatches,pendingActionResult:[ee,{type:Re.error,error:G.error}]}}else if(G.matches)_=G.matches;else{let{notFoundMatches:ee,error:me,route:ye}=Vc(A.pathname);return{matches:ee,pendingActionResult:[ye.id,{type:Re.error,error:me}]}}}let q,Y=xs(_,A);if(!Y.route.action&&!Y.route.lazy)q={type:Re.error,error:Rt(405,{method:E.method,pathname:A.pathname,routeId:Y.route.id})};else if(q=(await Hr("action",S,E,[Y],_,null))[Y.route.id],E.signal.aborted)return{shortCircuited:!0};if(no(q)){let G;return Z&&Z.replace!=null?G=Z.replace:G=_m(q.response.headers.get("Location"),new URL(E.url),u)===S.location.pathname+S.location.search,await Ln(E,q,!0,{submission:D,replace:G}),{shortCircuited:!0}}if(Pr(q))throw Rt(400,{type:"defer-action"});if(Ft(q)){let G=Xr(_,Y.route.id);return(Z&&Z.replace)!==!0&&(R=qe.Push),{matches:_,pendingActionResult:[G.route.id,q]}}return{matches:_,pendingActionResult:[Y.route.id,q]}}async function On(E,A,D,_,K,Z,le,q,Y,G,ee){let me=K||Cu(A,Z),ye=Z||le||Wm(me),lt=!$&&(!f.v7_partialHydration||!Y);if(_){if(lt){let Be=Tn(ee);Me(Le({navigation:me},Be!==void 0?{actionData:Be}:{}),{flushSync:G})}let we=await wa(D,A.pathname,E.signal);if(we.type==="aborted")return{shortCircuited:!0};if(we.type==="error"){let Be=Xr(we.partialMatches).route.id;return{matches:we.partialMatches,loaderData:{},errors:{[Be]:we.error}}}else if(we.matches)D=we.matches;else{let{error:Be,notFoundMatches:Io,route:Ki}=Vc(A.pathname);return{matches:Io,loaderData:{},errors:{[Ki.id]:Be}}}}let Ae=l||a,[je,Ue]=Tm(e.history,S,D,ye,A,f.v7_partialHydration&&Y===!0,f.v7_skipActionErrorRevalidation,F,se,he,be,ne,ie,Ae,u,ee);if(Qc(we=>!(D&&D.some(Be=>Be.route.id===we))||je&&je.some(Be=>Be.route.id===we)),H=++W,je.length===0&&Ue.length===0){let we=uh();return rt(A,Le({matches:D,loaderData:{},errors:ee&&Ft(ee[1])?{[ee[0]]:ee[1].error}:null},Fm(ee),we?{fetchers:new Map(S.fetchers)}:{}),{flushSync:G}),{shortCircuited:!0}}if(lt){let we={};if(!_){we.navigation=me;let Be=Tn(ee);Be!==void 0&&(we.actionData=Be)}Ue.length>0&&(we.fetchers=ga(Ue)),Me(we,{flushSync:G})}Ue.forEach(we=>{nr(we.key),we.controller&&oe.set(we.key,we.controller)});let Ao=()=>Ue.forEach(we=>nr(we.key));L&&L.signal.addEventListener("abort",Ao);let{loaderResults:Vi,fetcherResults:Mn}=await ah(S,D,je,Ue,E);if(E.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",Ao),Ue.forEach(we=>oe.delete(we.key));let yn=Ua(Vi);if(yn)return await Ln(E,yn.result,!0,{replace:q}),{shortCircuited:!0};if(yn=Ua(Mn),yn)return ie.add(yn.key),await Ln(E,yn.result,!0,{replace:q}),{shortCircuited:!0};let{loaderData:Kc,errors:Qi}=$m(S,D,Vi,ee,Ue,Mn,Ne);Ne.forEach((we,Be)=>{we.subscribe(Io=>{(Io||we.done)&&Ne.delete(Be)})}),f.v7_partialHydration&&Y&&S.errors&&(Qi=Le({},S.errors,Qi));let Vr=uh(),ba=dh(H),ja=Vr||ba||Ue.length>0;return Le({matches:D,loaderData:Kc,errors:Qi},ja?{fetchers:new Map(S.fetchers)}:{})}function Tn(E){if(E&&!Ft(E[1]))return{[E[0]]:E[1].data};if(S.actionData)return Object.keys(S.actionData).length===0?null:S.actionData}function ga(E){return E.forEach(A=>{let D=S.fetchers.get(A.key),_=rs(void 0,D?D.data:void 0);S.fetchers.set(A.key,_)}),new Map(S.fetchers)}function Nn(E,A,D,_){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");nr(E);let K=(_&&_.flushSync)===!0,Z=l||a,le=rf(S.location,S.matches,u,f.v7_prependBasename,D,f.v7_relativeSplatPath,A,_==null?void 0:_.relative),q=Jr(Z,le,u),Y=va(q,Z,le);if(Y.active&&Y.matches&&(q=Y.matches),!q){_n(E,A,Rt(404,{pathname:le}),{flushSync:K});return}let{path:G,submission:ee,error:me}=Dm(f.v7_normalizeFormMethod,!0,le,_);if(me){_n(E,A,me,{flushSync:K});return}let ye=xs(q,G),lt=(_&&_.preventScrollReset)===!0;if(ee&&cn(ee.formMethod)){Hi(E,A,G,ye,q,Y.active,K,lt,ee);return}ne.set(E,{routeId:A,path:G}),Wc(E,A,G,ye,q,Y.active,K,lt,ee)}async function Hi(E,A,D,_,K,Z,le,q,Y){Hc(),ne.delete(E);function G(Ge){if(!Ge.route.action&&!Ge.route.lazy){let Do=Rt(405,{method:Y.formMethod,pathname:D,routeId:A});return _n(E,A,Do,{flushSync:le}),!0}return!1}if(!Z&&G(_))return;let ee=S.fetchers.get(E);tr(E,wC(Y,ee),{flushSync:le});let me=new AbortController,ye=To(e.history,D,me.signal,Y);if(Z){let Ge=await wa(K,D,ye.signal);if(Ge.type==="aborted")return;if(Ge.type==="error"){_n(E,A,Ge.error,{flushSync:le});return}else if(Ge.matches){if(K=Ge.matches,_=xs(K,D),G(_))return}else{_n(E,A,Rt(404,{pathname:D}),{flushSync:le});return}}oe.set(E,me);let lt=W,je=(await Hr("action",S,ye,[_],K,E))[_.route.id];if(ye.signal.aborted){oe.get(E)===me&&oe.delete(E);return}if(f.v7_fetcherPersist&&be.has(E)){if(no(je)||Ft(je)){tr(E,lr(void 0));return}}else{if(no(je))if(oe.delete(E),H>lt){tr(E,lr(void 0));return}else return ie.add(E),tr(E,rs(Y)),Ln(ye,je,!1,{fetcherSubmission:Y,preventScrollReset:q});if(Ft(je)){_n(E,A,je.error);return}}if(Pr(je))throw Rt(400,{type:"defer-action"});let Ue=S.navigation.location||S.location,Ao=To(e.history,Ue,me.signal),Vi=l||a,Mn=S.navigation.state!=="idle"?Jr(Vi,S.navigation.location,u):S.matches;fe(Mn,"Didn't find any matches after fetcher action");let yn=++W;X.set(E,yn);let Kc=rs(Y,je.data);S.fetchers.set(E,Kc);let[Qi,Vr]=Tm(e.history,S,Mn,Y,Ue,!1,f.v7_skipActionErrorRevalidation,F,se,he,be,ne,ie,Vi,u,[_.route.id,je]);Vr.filter(Ge=>Ge.key!==E).forEach(Ge=>{let Do=Ge.key,gh=S.fetchers.get(Do),Xv=rs(void 0,gh?gh.data:void 0);S.fetchers.set(Do,Xv),nr(Do),Ge.controller&&oe.set(Do,Ge.controller)}),Me({fetchers:new Map(S.fetchers)});let ba=()=>Vr.forEach(Ge=>nr(Ge.key));me.signal.addEventListener("abort",ba);let{loaderResults:ja,fetcherResults:we}=await ah(S,Mn,Qi,Vr,Ao);if(me.signal.aborted)return;me.signal.removeEventListener("abort",ba),X.delete(E),oe.delete(E),Vr.forEach(Ge=>oe.delete(Ge.key));let Be=Ua(ja);if(Be)return Ln(Ao,Be.result,!1,{preventScrollReset:q});if(Be=Ua(we),Be)return ie.add(Be.key),Ln(Ao,Be.result,!1,{preventScrollReset:q});let{loaderData:Io,errors:Ki}=$m(S,Mn,ja,void 0,Vr,we,Ne);if(S.fetchers.has(E)){let Ge=lr(je.data);S.fetchers.set(E,Ge)}dh(yn),S.navigation.state==="loading"&&yn>H?(fe(R,"Expected pending action"),L&&L.abort(),rt(S.navigation.location,{matches:Mn,loaderData:Io,errors:Ki,fetchers:new Map(S.fetchers)})):(Me({errors:Ki,loaderData:zm(S.loaderData,Io,Mn,Ki),fetchers:new Map(S.fetchers)}),F=!1)}async function Wc(E,A,D,_,K,Z,le,q,Y){let G=S.fetchers.get(E);tr(E,rs(Y,G?G.data:void 0),{flushSync:le});let ee=new AbortController,me=To(e.history,D,ee.signal);if(Z){let je=await wa(K,D,me.signal);if(je.type==="aborted")return;if(je.type==="error"){_n(E,A,je.error,{flushSync:le});return}else if(je.matches)K=je.matches,_=xs(K,D);else{_n(E,A,Rt(404,{pathname:D}),{flushSync:le});return}}oe.set(E,ee);let ye=W,Ae=(await Hr("loader",S,me,[_],K,E))[_.route.id];if(Pr(Ae)&&(Ae=await Lp(Ae,me.signal,!0)||Ae),oe.get(E)===ee&&oe.delete(E),!me.signal.aborted){if(be.has(E)){tr(E,lr(void 0));return}if(no(Ae))if(H>ye){tr(E,lr(void 0));return}else{ie.add(E),await Ln(me,Ae,!1,{preventScrollReset:q});return}if(Ft(Ae)){_n(E,A,Ae.error);return}fe(!Pr(Ae),"Unhandled fetcher deferred data"),tr(E,lr(Ae.data))}}async function Ln(E,A,D,_){let{submission:K,fetcherSubmission:Z,preventScrollReset:le,replace:q}=_===void 0?{}:_;A.response.headers.has("X-Remix-Revalidate")&&(F=!0);let Y=A.response.headers.get("Location");fe(Y,"Expected a Location header on the redirect Response"),Y=_m(Y,new URL(E.url),u);let G=Ks(S.location,Y,{_isRedirect:!0});if(n){let je=!1;if(A.response.headers.has("X-Remix-Reload-Document"))je=!0;else if(Np.test(Y)){const Ue=e.history.createURL(Y);je=Ue.origin!==t.location.origin||_i(Ue.pathname,u)==null}if(je){q?t.location.replace(Y):t.location.assign(Y);return}}L=null;let ee=q===!0||A.response.headers.has("X-Remix-Replace")?qe.Replace:qe.Push,{formMethod:me,formAction:ye,formEncType:lt}=S.navigation;!K&&!Z&&me&&ye&<&&(K=Wm(S.navigation));let Ae=K||Z;if(eC.has(A.response.status)&&Ae&&cn(Ae.formMethod))await at(ee,G,{submission:Le({},Ae,{formAction:Y}),preventScrollReset:le||I,enableViewTransition:D?B:void 0});else{let je=Cu(G,K);await at(ee,G,{overrideNavigation:je,fetcherSubmission:Z,preventScrollReset:le||I,enableViewTransition:D?B:void 0})}}async function Hr(E,A,D,_,K,Z){let le,q={};try{le=await lC(d,E,A,D,_,K,Z,i,o)}catch(Y){return _.forEach(G=>{q[G.route.id]={type:Re.error,error:Y}}),q}for(let[Y,G]of Object.entries(le))if(hC(G)){let ee=G.result;q[Y]={type:Re.redirect,response:dC(ee,D,Y,K,u,f.v7_relativeSplatPath)}}else q[Y]=await uC(G);return q}async function ah(E,A,D,_,K){let Z=E.matches,le=Hr("loader",E,K,D,A,null),q=Promise.all(_.map(async ee=>{if(ee.matches&&ee.match&&ee.controller){let ye=(await Hr("loader",E,To(e.history,ee.path,ee.controller.signal),[ee.match],ee.matches,ee.key))[ee.match.route.id];return{[ee.key]:ye}}else return Promise.resolve({[ee.key]:{type:Re.error,error:Rt(404,{pathname:ee.path})}})})),Y=await le,G=(await q).reduce((ee,me)=>Object.assign(ee,me),{});return await Promise.all([xC(A,Y,K.signal,Z,E.loaderData),yC(A,G,_)]),{loaderResults:Y,fetcherResults:G}}function Hc(){F=!0,se.push(...Qc()),ne.forEach((E,A)=>{oe.has(A)&&he.add(A),nr(A)})}function tr(E,A,D){D===void 0&&(D={}),S.fetchers.set(E,A),Me({fetchers:new Map(S.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function _n(E,A,D,_){_===void 0&&(_={});let K=Xr(S.matches,A);xa(E),Me({errors:{[K.route.id]:D},fetchers:new Map(S.fetchers)},{flushSync:(_&&_.flushSync)===!0})}function lh(E){return f.v7_fetcherPersist&&(Ve.set(E,(Ve.get(E)||0)+1),be.has(E)&&be.delete(E)),S.fetchers.get(E)||tC}function xa(E){let A=S.fetchers.get(E);oe.has(E)&&!(A&&A.state==="loading"&&X.has(E))&&nr(E),ne.delete(E),X.delete(E),ie.delete(E),be.delete(E),he.delete(E),S.fetchers.delete(E)}function Qv(E){if(f.v7_fetcherPersist){let A=(Ve.get(E)||0)-1;A<=0?(Ve.delete(E),be.add(E)):Ve.set(E,A)}else xa(E);Me({fetchers:new Map(S.fetchers)})}function nr(E){let A=oe.get(E);A&&(A.abort(),oe.delete(E))}function ch(E){for(let A of E){let D=lh(A),_=lr(D.data);S.fetchers.set(A,_)}}function uh(){let E=[],A=!1;for(let D of ie){let _=S.fetchers.get(D);fe(_,"Expected fetcher: "+D),_.state==="loading"&&(ie.delete(D),E.push(D),A=!0)}return ch(E),A}function dh(E){let A=[];for(let[D,_]of X)if(_0}function Kv(E,A){let D=S.blockers.get(E)||ns;return Ce.get(E)!==A&&Ce.set(E,A),D}function fh(E){S.blockers.delete(E),Ce.delete(E)}function ya(E,A){let D=S.blockers.get(E)||ns;fe(D.state==="unblocked"&&A.state==="blocked"||D.state==="blocked"&&A.state==="blocked"||D.state==="blocked"&&A.state==="proceeding"||D.state==="blocked"&&A.state==="unblocked"||D.state==="proceeding"&&A.state==="unblocked","Invalid blocker state transition: "+D.state+" -> "+A.state);let _=new Map(S.blockers);_.set(E,A),Me({blockers:_})}function ph(E){let{currentLocation:A,nextLocation:D,historyAction:_}=E;if(Ce.size===0)return;Ce.size>1&&Ei(!1,"A router only supports one blocker at a time");let K=Array.from(Ce.entries()),[Z,le]=K[K.length-1],q=S.blockers.get(Z);if(!(q&&q.state==="proceeding")&&le({currentLocation:A,nextLocation:D,historyAction:_}))return Z}function Vc(E){let A=Rt(404,{pathname:E}),D=l||a,{matches:_,route:K}=Um(D);return Qc(),{notFoundMatches:_,route:K,error:A}}function Qc(E){let A=[];return Ne.forEach((D,_)=>{(!E||E(_))&&(D.cancel(),A.push(_),Ne.delete(_))}),A}function Gv(E,A,D){if(y=E,j=A,x=D||null,!g&&S.navigation===ju){g=!0;let _=mh(S.location,S.matches);_!=null&&Me({restoreScrollPosition:_})}return()=>{y=null,j=null,x=null}}function hh(E,A){return x&&x(E,A.map(_=>Oj(_,S.loaderData)))||E.key}function qv(E,A){if(y&&j){let D=hh(E,A);y[D]=j()}}function mh(E,A){if(y){let D=hh(E,A),_=y[D];if(typeof _=="number")return _}return null}function va(E,A,D){if(p)if(E){if(Object.keys(E[0].params).length>0)return{active:!0,matches:pl(A,D,u,!0)}}else return{active:!0,matches:pl(A,D,u,!0)||[]};return{active:!1,matches:null}}async function wa(E,A,D){if(!p)return{type:"success",matches:E};let _=E;for(;;){let K=l==null,Z=l||a,le=i;try{await p({path:A,matches:_,patch:(G,ee)=>{D.aborted||Lm(G,ee,Z,le,o)}})}catch(G){return{type:"error",error:G,partialMatches:_}}finally{K&&!D.aborted&&(a=[...a])}if(D.aborted)return{type:"aborted"};let q=Jr(Z,A,u);if(q)return{type:"success",matches:q};let Y=pl(Z,A,u,!0);if(!Y||_.length===Y.length&&_.every((G,ee)=>G.route.id===Y[ee].route.id))return{type:"success",matches:null};_=Y}}function Yv(E){i={},l=Ql(E,o,void 0,i)}function Jv(E,A){let D=l==null;Lm(E,A,l||a,i,o),D&&(a=[...a],Me({}))}return P={get basename(){return u},get future(){return f},get state(){return S},get routes(){return a},get window(){return t},initialize:U,subscribe:Ke,enableScrollRestoration:Gv,navigate:J,fetch:Nn,revalidate:ge,createHref:E=>e.history.createHref(E),encodeLocation:E=>e.history.encodeLocation(E),getFetcher:lh,deleteFetcher:Qv,dispose:ae,getBlocker:Kv,deleteBlocker:fh,patchRoutes:Jv,_internalFetchControllers:oe,_internalActiveDeferreds:Ne,_internalSetRoutes:Yv},P}function oC(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function rf(e,t,n,r,o,i,a,l){let u,d;if(a){u=[];for(let f of t)if(u.push(f),f.route.id===a){d=f;break}}else u=t,d=t[t.length-1];let p=Sc(o||".",Cc(u,i),_i(e.pathname,n)||e.pathname,l==="path");if(o==null&&(p.search=e.search,p.hash=e.hash),(o==null||o===""||o===".")&&d){let f=_p(p.search);if(d.route.index&&!f)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&f){let h=new URLSearchParams(p.search),b=h.getAll("index");h.delete("index"),b.filter(x=>x).forEach(x=>h.append("index",x));let y=h.toString();p.search=y?"?"+y:""}}return r&&n!=="/"&&(p.pathname=p.pathname==="/"?n:Gn([n,p.pathname])),jo(p)}function Dm(e,t,n,r){if(!r||!oC(r))return{path:n};if(r.formMethod&&!gC(r.formMethod))return{path:n,error:Rt(405,{method:r.formMethod})};let o=()=>({path:n,error:Rt(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=e?i.toUpperCase():i.toLowerCase(),l=Vy(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!cn(a))return o();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((b,y)=>{let[x,j]=y;return""+b+x+"="+j+` +`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!cn(a))return o();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:l,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return o()}}}fe(typeof FormData=="function","FormData is not available in this environment");let u,d;if(r.formData)u=sf(r.formData),d=r.formData;else if(r.body instanceof FormData)u=sf(r.body),d=r.body;else if(r.body instanceof URLSearchParams)u=r.body,d=Mm(u);else if(r.body==null)u=new URLSearchParams,d=new FormData;else try{u=new URLSearchParams(r.body),d=Mm(u)}catch{return o()}let p={formMethod:a,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(cn(p.formMethod))return{path:n,submission:p};let f=Ur(n);return t&&f.search&&_p(f.search)&&u.append("index",""),f.search="?"+u,{path:jo(f),submission:p}}function Om(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(o=>o.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Tm(e,t,n,r,o,i,a,l,u,d,p,f,h,b,y,x){let j=x?Ft(x[1])?x[1].error:x[1].data:void 0,g=e.createURL(t.location),m=e.createURL(o),v=n;i&&t.errors?v=Om(n,Object.keys(t.errors)[0],!0):x&&Ft(x[1])&&(v=Om(n,x[0]));let C=x?x[1].statusCode:void 0,P=a&&C&&C>=400,S=v.filter((I,L)=>{let{route:B}=I;if(B.lazy)return!0;if(B.loader==null)return!1;if(i)return of(B,t.loaderData,t.errors);if(iC(t.loaderData,t.matches[L],I)||u.some($=>$===I.route.id))return!0;let N=t.matches[L],O=I;return Nm(I,Le({currentUrl:g,currentParams:N.params,nextUrl:m,nextParams:O.params},r,{actionResult:j,actionStatus:C,defaultShouldRevalidate:P?!1:l||g.pathname+g.search===m.pathname+m.search||g.search!==m.search||Wy(N,O)}))}),R=[];return f.forEach((I,L)=>{if(i||!n.some(F=>F.route.id===I.routeId)||p.has(L))return;let B=Jr(b,I.path,y);if(!B){R.push({key:L,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let N=t.fetchers.get(L),O=xs(B,I.path),$=!1;h.has(L)?$=!1:d.has(L)?(d.delete(L),$=!0):N&&N.state!=="idle"&&N.data===void 0?$=l:$=Nm(O,Le({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:j,actionStatus:C,defaultShouldRevalidate:P?!1:l})),$&&R.push({key:L,routeId:I.routeId,path:I.path,matches:B,match:O,controller:new AbortController})}),[S,R]}function of(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,o=n!=null&&n[e.id]!==void 0;return!r&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!o}function iC(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Wy(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Nm(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Lm(e,t,n,r,o){var i;let a;if(e){let d=r[e];fe(d,"No route found to patch children into: routeId = "+e),d.children||(d.children=[]),a=d.children}else a=n;let l=t.filter(d=>!a.some(p=>Hy(d,p))),u=Ql(l,o,[e||"_","patch",String(((i=a)==null?void 0:i.length)||"0")],r);a.push(...u)}function Hy(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var o;return(o=t.children)==null?void 0:o.some(i=>Hy(n,i))}):!1}async function sC(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];fe(o,"No route found in manifest");let i={};for(let a in r){let u=o[a]!==void 0&&a!=="hasErrorBoundary";Ei(!u,'Route "'+o.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!u&&!Ij.has(a)&&(i[a]=r[a])}Object.assign(o,i),Object.assign(o,Le({},t(o),{lazy:void 0}))}async function aC(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,i,a)=>Object.assign(o,{[n[a].route.id]:i}),{})}async function lC(e,t,n,r,o,i,a,l,u,d){let p=i.map(b=>b.route.lazy?sC(b.route,u,l):void 0),f=i.map((b,y)=>{let x=p[y],j=o.some(m=>m.route.id===b.route.id);return Le({},b,{shouldLoad:j,resolve:async m=>(m&&r.method==="GET"&&(b.route.lazy||b.route.loader)&&(j=!0),j?cC(t,r,b,x,m,d):Promise.resolve({type:Re.data,result:void 0}))})}),h=await e({matches:f,request:r,params:i[0].params,fetcherKey:a,context:d});try{await Promise.all(p)}catch{}return h}async function cC(e,t,n,r,o,i){let a,l,u=d=>{let p,f=new Promise((y,x)=>p=x);l=()=>p(),t.signal.addEventListener("abort",l);let h=y=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:i},...y!==void 0?[y]:[]),b=(async()=>{try{return{type:"data",result:await(o?o(x=>h(x)):h())}}catch(y){return{type:"error",result:y}}})();return Promise.race([b,f])};try{let d=n.route[e];if(r)if(d){let p,[f]=await Promise.all([u(d).catch(h=>{p=h}),r]);if(p!==void 0)throw p;a=f}else if(await r,d=n.route[e],d)a=await u(d);else if(e==="action"){let p=new URL(t.url),f=p.pathname+p.search;throw Rt(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:Re.data,result:void 0};else if(d)a=await u(d);else{let p=new URL(t.url),f=p.pathname+p.search;throw Rt(404,{pathname:f})}fe(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:Re.error,result:d}}finally{l&&t.signal.removeEventListener("abort",l)}return a}async function uC(e){let{result:t,type:n}=e;if(Qy(t)){let d;try{let p=t.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?t.body==null?d=null:d=await t.json():d=await t.text()}catch(p){return{type:Re.error,error:p}}return n===Re.error?{type:Re.error,error:new Kl(t.status,t.statusText,d),statusCode:t.status,headers:t.headers}:{type:Re.data,data:d,statusCode:t.status,headers:t.headers}}if(n===Re.error){if(Bm(t)){var r;if(t.data instanceof Error){var o;return{type:Re.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status}}t=new Kl(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:Re.error,error:t,statusCode:ca(t)?t.status:void 0}}if(mC(t)){var i,a;return{type:Re.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(Bm(t)){var l,u;return{type:Re.data,data:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:Re.data,data:t}}function dC(e,t,n,r,o,i){let a=e.headers.get("Location");if(fe(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!Np.test(a)){let l=r.slice(0,r.findIndex(u=>u.route.id===n)+1);a=rf(new URL(t.url),l,o,!0,a,i),e.headers.set("Location",a)}return e}function _m(e,t,n){if(Np.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=_i(o.pathname,n)!=null;if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function To(e,t,n,r){let o=e.createURL(Vy(t)).toString(),i={signal:n};if(r&&cn(r.formMethod)){let{formMethod:a,formEncType:l}=r;i.method=a.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(r.json)):l==="text/plain"?i.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?i.body=sf(r.formData):i.body=r.formData}return new Request(o,i)}function sf(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Mm(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function fC(e,t,n,r,o){let i={},a=null,l,u=!1,d={},p=n&&Ft(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,b=t[h];if(fe(!no(b),"Cannot handle redirect results in processLoaderData"),Ft(b)){let y=b.error;p!==void 0&&(y=p,p=void 0),a=a||{};{let x=Xr(e,h);a[x.route.id]==null&&(a[x.route.id]=y)}i[h]=void 0,u||(u=!0,l=ca(b.error)?b.error.status:500),b.headers&&(d[h]=b.headers)}else Pr(b)?(r.set(h,b.deferredData),i[h]=b.deferredData.data,b.statusCode!=null&&b.statusCode!==200&&!u&&(l=b.statusCode),b.headers&&(d[h]=b.headers)):(i[h]=b.data,b.statusCode&&b.statusCode!==200&&!u&&(l=b.statusCode),b.headers&&(d[h]=b.headers))}),p!==void 0&&n&&(a={[n[0]]:p},i[n[0]]=void 0),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:d}}function $m(e,t,n,r,o,i,a){let{loaderData:l,errors:u}=fC(t,n,r,a);return o.forEach(d=>{let{key:p,match:f,controller:h}=d,b=i[p];if(fe(b,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Ft(b)){let y=Xr(e.matches,f==null?void 0:f.route.id);u&&u[y.route.id]||(u=Le({},u,{[y.route.id]:b.error})),e.fetchers.delete(p)}else if(no(b))fe(!1,"Unhandled fetcher revalidation redirect");else if(Pr(b))fe(!1,"Unhandled fetcher deferred data");else{let y=lr(b.data);e.fetchers.set(p,y)}}),{loaderData:l,errors:u}}function zm(e,t,n,r){let o=Le({},t);for(let i of n){let a=i.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(o[a]=t[a]):e[a]!==void 0&&i.route.loader&&(o[a]=e[a]),r&&r.hasOwnProperty(a))break}return o}function Fm(e){return e?Ft(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Xr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Um(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Rt(e,t){let{pathname:n,routeId:r,method:o,type:i,message:a}=t===void 0?{}:t,l="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(l="Bad Request",o&&n&&r?u="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?u="defer() is not supported in actions":i==="invalid-body"&&(u="Unable to encode submission body")):e===403?(l="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",u='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?u="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(u='Invalid request method "'+o.toUpperCase()+'"')),new Kl(e||500,l,new Error(u),!0)}function Ua(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(no(o))return{key:r,result:o}}}function Vy(e){let t=typeof e=="string"?Ur(e):e;return jo(Le({},t,{hash:""}))}function pC(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function hC(e){return Qy(e.result)&&Zj.has(e.result.status)}function Pr(e){return e.type===Re.deferred}function Ft(e){return e.type===Re.error}function no(e){return(e&&e.type)===Re.redirect}function Bm(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function mC(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Qy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function gC(e){return Xj.has(e.toLowerCase())}function cn(e){return Yj.has(e.toLowerCase())}async function xC(e,t,n,r,o){let i=Object.entries(t);for(let a=0;a(h==null?void 0:h.route.id)===l);if(!d)continue;let p=r.find(h=>h.route.id===d.route.id),f=p!=null&&!Wy(p,d)&&(o&&o[d.route.id])!==void 0;Pr(u)&&f&&await Lp(u,n,!1).then(h=>{h&&(t[l]=h)})}}async function yC(e,t,n){for(let r=0;r(d==null?void 0:d.route.id)===i)&&Pr(l)&&(fe(a,"Expected an AbortController for revalidating fetcher deferred result"),await Lp(l,a.signal,!0).then(d=>{d&&(t[o]=d)}))}}async function Lp(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Re.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Re.error,error:o}}return{type:Re.data,data:e.deferredData.data}}}function _p(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function xs(e,t){let n=typeof t=="string"?Ur(t).search:t.search;if(e[e.length-1].route.index&&_p(n||""))return e[e.length-1];let r=Fy(e);return r[r.length-1]}function Wm(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:a}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function Cu(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function vC(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function rs(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function wC(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function lr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function bC(e,t){try{let n=e.sessionStorage.getItem(By);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function jC(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(By,JSON.stringify(n))}catch(r){Ei(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + * React Router v6.28.0 + * + * 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 Gl(){return Gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{l.current=!0}),w.useCallback(function(d,p){if(p===void 0&&(p={}),!l.current)return;if(typeof d=="number"){r.go(d);return}let f=Sc(d,JSON.parse(a),i,p.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Gn([t,f.pathname])),(p.replace?r.replace:r.push)(f,p.state,p)},[t,r,a,i,e])}const kC=w.createContext(null);function PC(e){let t=w.useContext(Dn).outlet;return t&&w.createElement(kC.Provider,{value:e},t)}function $i(){let{matches:e}=w.useContext(Dn),t=e[e.length-1];return t?t.params:{}}function Yy(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=w.useContext(Br),{matches:o}=w.useContext(Dn),{pathname:i}=nt(),a=JSON.stringify(Cc(o,r.v7_relativeSplatPath));return w.useMemo(()=>Sc(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function EC(e,t,n,r){Mi()||fe(!1);let{navigator:o}=w.useContext(Br),{matches:i}=w.useContext(Dn),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let d=nt(),p;p=d;let f=p.pathname||"/",h=f;if(u!=="/"){let x=u.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let b=Jr(e,{pathname:h});return OC(b&&b.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:Gn([u,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:Gn([u,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r)}function RC(){let e=Zy(),t=ca(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:o},n):null,null)}const AC=w.createElement(RC,null);class IC extends w.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?w.createElement(Dn.Provider,{value:this.props.routeContext},w.createElement(Gy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function DC(e){let{routeContext:t,match:n,children:r}=e,o=w.useContext(kc);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(Dn.Provider,{value:t},r)}function OC(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let p=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);p>=0||fe(!1),a=a.slice(0,Math.min(a.length,p+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p=0?a=a.slice(0,d+1):a=[a[0]];break}}}return a.reduceRight((p,f,h)=>{let b,y=!1,x=null,j=null;n&&(b=l&&f.route.id?l[f.route.id]:void 0,x=f.route.errorElement||AC,u&&(d<0&&h===0?(MC("route-fallback"),y=!0,j=null):d===h&&(y=!0,j=f.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,h+1)),m=()=>{let v;return b?v=x:y?v=j:f.route.Component?v=w.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=p,w.createElement(DC,{match:f,routeContext:{outlet:p,matches:g,isDataRoute:n!=null},children:v})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?w.createElement(IC,{location:n.location,revalidation:n.revalidation,component:x,error:b,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var Jy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Jy||{}),ql=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}(ql||{});function TC(e){let t=w.useContext(kc);return t||fe(!1),t}function NC(e){let t=w.useContext(Ky);return t||fe(!1),t}function LC(e){let t=w.useContext(Dn);return t||fe(!1),t}function Xy(e){let t=LC(),n=t.matches[t.matches.length-1];return n.route.id||fe(!1),n.route.id}function Zy(){var e;let t=w.useContext(Gy),n=NC(ql.UseRouteError),r=Xy(ql.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function _C(){let{router:e}=TC(Jy.UseNavigateStable),t=Xy(ql.UseNavigateStable),n=w.useRef(!1);return qy(()=>{n.current=!0}),w.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Gl({fromRouteId:t},i)))},[e,t])}const Hm={};function MC(e,t,n){Hm[e]||(Hm[e]=!0)}const Vm={};function $C(e,t){Vm[t]||(Vm[t]=!0,console.warn(t))}const No=(e,t,n)=>$C(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function zC(e,t){e!=null&&e.v7_startTransition||No("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&(!t||!t.v7_relativeSplatPath)&&No("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist||No("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod||No("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration||No("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation||No("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function FC(e){let{to:t,replace:n,state:r,relative:o}=e;Mi()||fe(!1);let{future:i,static:a}=w.useContext(Br),{matches:l}=w.useContext(Dn),{pathname:u}=nt(),d=Ee(),p=Sc(t,Cc(l,i.v7_relativeSplatPath),u,o==="path"),f=JSON.stringify(p);return w.useEffect(()=>d(JSON.parse(f),{replace:n,state:r,relative:o}),[d,f,o,n,r]),null}function UC(e){return PC(e.context)}function BC(e){let{basename:t="/",children:n=null,location:r,navigationType:o=qe.Pop,navigator:i,static:a=!1,future:l}=e;Mi()&&fe(!1);let u=t.replace(/^\/*/,"/"),d=w.useMemo(()=>({basename:u,navigator:i,static:a,future:Gl({v7_relativeSplatPath:!1},l)}),[u,l,i,a]);typeof r=="string"&&(r=Ur(r));let{pathname:p="/",search:f="",hash:h="",state:b=null,key:y="default"}=r,x=w.useMemo(()=>{let j=_i(p,u);return j==null?null:{location:{pathname:j,search:f,hash:h,state:b,key:y},navigationType:o}},[u,p,f,h,b,y,o]);return x==null?null:w.createElement(Br.Provider,{value:d},w.createElement(Mp.Provider,{children:n,value:x}))}new Promise(()=>{});function WC(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:w.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:w.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:w.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.28.0 + * + * 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 Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function VC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function QC(e,t){return e.button===0&&(!t||t==="_self")&&!VC(e)}const KC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],GC="6";try{window.__reactRouterVersion=GC}catch{}function qC(e,t){return rC({basename:t==null?void 0:t.basename,future:Gs({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Ej({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||YC(),routes:e,mapRouteProperties:WC,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function YC(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Gs({},t,{errors:JC(t.errors)})),t}function JC(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Kl(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const XC=w.createContext({isTransitioning:!1}),ZC=w.createContext(new Map),eS="startTransition",Qm=hw[eS],tS="flushSync",Km=Pj[tS];function nS(e){Qm?Qm(e):e()}function os(e){Km?Km(e):e()}class rS{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function oS(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=w.useState(n.state),[a,l]=w.useState(),[u,d]=w.useState({isTransitioning:!1}),[p,f]=w.useState(),[h,b]=w.useState(),[y,x]=w.useState(),j=w.useRef(new Map),{v7_startTransition:g}=r||{},m=w.useCallback(I=>{g?nS(I):I()},[g]),v=w.useCallback((I,L)=>{let{deletedFetchers:B,flushSync:N,viewTransitionOpts:O}=L;B.forEach(F=>j.current.delete(F)),I.fetchers.forEach((F,se)=>{F.data!==void 0&&j.current.set(se,F.data)});let $=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!O||$){N?os(()=>i(I)):m(()=>i(I));return}if(N){os(()=>{h&&(p&&p.resolve(),h.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:O.currentLocation,nextLocation:O.nextLocation})});let F=n.window.document.startViewTransition(()=>{os(()=>i(I))});F.finished.finally(()=>{os(()=>{f(void 0),b(void 0),l(void 0),d({isTransitioning:!1})})}),os(()=>b(F));return}h?(p&&p.resolve(),h.skipTransition(),x({state:I,currentLocation:O.currentLocation,nextLocation:O.nextLocation})):(l(I),d({isTransitioning:!0,flushSync:!1,currentLocation:O.currentLocation,nextLocation:O.nextLocation}))},[n.window,h,p,j,m]);w.useLayoutEffect(()=>n.subscribe(v),[n,v]),w.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new rS)},[u]),w.useEffect(()=>{if(p&&a&&n.window){let I=a,L=p.promise,B=n.window.document.startViewTransition(async()=>{m(()=>i(I)),await L});B.finished.finally(()=>{f(void 0),b(void 0),l(void 0),d({isTransitioning:!1})}),b(B)}},[m,a,p,n.window]),w.useEffect(()=>{p&&a&&o.location.key===a.location.key&&p.resolve()},[p,h,o.location,a]),w.useEffect(()=>{!u.isTransitioning&&y&&(l(y.state),d({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),x(void 0))},[u.isTransitioning,y]),w.useEffect(()=>{},[]);let C=w.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:I=>n.navigate(I),push:(I,L,B)=>n.navigate(I,{state:L,preventScrollReset:B==null?void 0:B.preventScrollReset}),replace:(I,L,B)=>n.navigate(I,{replace:!0,state:L,preventScrollReset:B==null?void 0:B.preventScrollReset})}),[n]),P=n.basename||"/",S=w.useMemo(()=>({router:n,navigator:C,static:!1,basename:P}),[n,C,P]),R=w.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return w.useEffect(()=>zC(r,n.future),[r,n.future]),w.createElement(w.Fragment,null,w.createElement(kc.Provider,{value:S},w.createElement(Ky.Provider,{value:o},w.createElement(ZC.Provider,{value:j.current},w.createElement(XC.Provider,{value:u},w.createElement(BC,{basename:P,location:o.location,navigationType:o.historyAction,navigator:C,future:R},o.initialized||n.future.v7_partialHydration?w.createElement(iS,{routes:n.routes,future:n.future,state:o}):t))))),null)}const iS=w.memo(sS);function sS(e){let{routes:t,future:n,state:r}=e;return EC(t,void 0,r,n)}const aS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,An=w.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:l,target:u,to:d,preventScrollReset:p,viewTransition:f}=t,h=HC(t,KC),{basename:b}=w.useContext(Br),y,x=!1;if(typeof d=="string"&&lS.test(d)&&(y=d,aS))try{let v=new URL(window.location.href),C=d.startsWith("//")?new URL(v.protocol+d):new URL(d),P=_i(C.pathname,b);C.origin===v.origin&&P!=null?d=P+C.search+C.hash:x=!0}catch{}let j=CC(d,{relative:o}),g=cS(d,{replace:a,state:l,target:u,preventScrollReset:p,relative:o,viewTransition:f});function m(v){r&&r(v),v.defaultPrevented||g(v)}return w.createElement("a",Gs({},h,{href:y||j,onClick:x||i?r:m,ref:n,target:u}))});var Gm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Gm||(Gm={}));var qm;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qm||(qm={}));function cS(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:l}=t===void 0?{}:t,u=Ee(),d=nt(),p=Yy(e,{relative:a});return w.useCallback(f=>{if(QC(f,n)){f.preventDefault();let h=r!==void 0?r:jo(d)===jo(p);u(e,{replace:h,state:o,preventScrollReset:i,relative:a,viewTransition:l})}},[d,u,p,r,o,n,e,i,a,l])}const uS=()=>{var t;const e=Zy();return ca(e)?s.jsxs("div",{children:[s.jsx("h1",{children:"Oops! something is wrong"}),s.jsx("h2",{children:e.status}),s.jsx("p",{children:e.statusText}),((t=e.data)==null?void 0:t.message)&&s.jsx("p",{children:e.data.message})]}):s.jsx("h1",{children:"Oops! something is wrong"})},dS=()=>s.jsx("h1",{children:"NotFoundPage"});var xt=function(){return xt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0?it(zi,--nn):0,Ai--,Ye===10&&(Ai=1,Ec--),Ye}function hn(){return Ye=nn2||lf(Ye)>3?"":" "}function bS(e,t){for(;--t&&hn()&&!(Ye<48||Ye>102||Ye>57&&Ye<65||Ye>70&&Ye<97););return Ac(e,ml()+(t<6&&mo()==32&&hn()==32))}function cf(e){for(;hn();)switch(Ye){case e:return nn;case 34:case 39:e!==34&&e!==39&&cf(Ye);break;case 40:e===41&&cf(e);break;case 92:hn();break}return nn}function jS(e,t){for(;hn()&&e+Ye!==57;)if(e+Ye===84&&mo()===47)break;return"/*"+Ac(t,nn-1)+"*"+zp(e===47?e:hn())}function CS(e){for(;!lf(mo());)hn();return Ac(e,nn)}function SS(e){return vS(gl("",null,null,null,[""],e=yS(e),0,[0],e))}function gl(e,t,n,r,o,i,a,l,u){for(var d=0,p=0,f=a,h=0,b=0,y=0,x=1,j=1,g=1,m=0,v="",C=o,P=i,S=r,R=v;j;)switch(y=m,m=hn()){case 40:if(y!=108&&it(R,f-1)==58){hl(R+=de(Su(m),"&","&\f"),"&\f",n1(d?l[d-1]:0))!=-1&&(g=-1);break}case 34:case 39:case 91:R+=Su(m);break;case 9:case 10:case 13:case 32:R+=wS(y);break;case 92:R+=bS(ml()-1,7);continue;case 47:switch(mo()){case 42:case 47:ys(kS(jS(hn(),ml()),t,n,u),u);break;default:R+="/"}break;case 123*x:l[d++]=kn(R)*g;case 125*x:case 59:case 0:switch(m){case 0:case 125:j=0;case 59+p:g==-1&&(R=de(R,/\f/g,"")),b>0&&kn(R)-f&&ys(b>32?Xm(R+";",r,n,f-1,u):Xm(de(R," ","")+";",r,n,f-2,u),u);break;case 59:R+=";";default:if(ys(S=Jm(R,t,n,d,p,o,l,v,C=[],P=[],f,i),i),m===123)if(p===0)gl(R,t,S,S,C,i,f,l,P);else switch(h===99&&it(R,3)===110?100:h){case 100:case 108:case 109:case 115:gl(e,S,S,r&&ys(Jm(e,S,S,0,0,o,l,v,o,C=[],f,P),P),o,P,f,l,r?C:P);break;default:gl(R,S,S,S,[""],P,0,l,P)}}d=p=b=0,x=g=1,v=R="",f=a;break;case 58:f=1+kn(R),b=y;default:if(x<1){if(m==123)--x;else if(m==125&&x++==0&&xS()==125)continue}switch(R+=zp(m),m*x){case 38:g=p>0?1:(R+="\f",-1);break;case 44:l[d++]=(kn(R)-1)*g,g=1;break;case 64:mo()===45&&(R+=Su(hn())),h=mo(),p=f=kn(v=R+=CS(ml())),m++;break;case 45:y===45&&kn(R)==2&&(x=0)}}return i}function Jm(e,t,n,r,o,i,a,l,u,d,p,f){for(var h=o-1,b=o===0?i:[""],y=o1(b),x=0,j=0,g=0;x0?b[m]+" "+v:de(v,/&\f/g,b[m])))&&(u[g++]=C);return Rc(e,t,n,o===0?Pc:l,u,d,p,f)}function kS(e,t,n,r){return Rc(e,t,n,e1,zp(gS()),Ri(e,2,-2),0,r)}function Xm(e,t,n,r,o){return Rc(e,t,n,$p,Ri(e,0,r),Ri(e,r+1,-1),r,o)}function s1(e,t,n){switch(hS(e,t)){case 5103:return Se+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Se+e+e;case 4789:return As+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Se+e+As+e+Oe+e+e;case 5936:switch(it(e,t+11)){case 114:return Se+e+Oe+de(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Se+e+Oe+de(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Se+e+Oe+de(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Se+e+Oe+e+e;case 6165:return Se+e+Oe+"flex-"+e+e;case 5187:return Se+e+de(e,/(\w+).+(:[^]+)/,Se+"box-$1$2"+Oe+"flex-$1$2")+e;case 5443:return Se+e+Oe+"flex-item-"+de(e,/flex-|-self/g,"")+(Bn(e,/flex-|baseline/)?"":Oe+"grid-row-"+de(e,/flex-|-self/g,""))+e;case 4675:return Se+e+Oe+"flex-line-pack"+de(e,/align-content|flex-|-self/g,"")+e;case 5548:return Se+e+Oe+de(e,"shrink","negative")+e;case 5292:return Se+e+Oe+de(e,"basis","preferred-size")+e;case 6060:return Se+"box-"+de(e,"-grow","")+Se+e+Oe+de(e,"grow","positive")+e;case 4554:return Se+de(e,/([^-])(transform)/g,"$1"+Se+"$2")+e;case 6187:return de(de(de(e,/(zoom-|grab)/,Se+"$1"),/(image-set)/,Se+"$1"),e,"")+e;case 5495:case 3959:return de(e,/(image-set\([^]*)/,Se+"$1$`$1");case 4968:return de(de(e,/(.+:)(flex-)?(.*)/,Se+"box-pack:$3"+Oe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Se+e+e;case 4200:if(!Bn(e,/flex-|baseline/))return Oe+"grid-column-align"+Ri(e,t)+e;break;case 2592:case 3360:return Oe+de(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,o){return t=o,Bn(r.props,/grid-\w+-end/)})?~hl(e+(n=n[t].value),"span",0)?e:Oe+de(e,"-start","")+e+Oe+"grid-row-span:"+(~hl(n,"span",0)?Bn(n,/\d+/):+Bn(n,/\d+/)-+Bn(e,/\d+/))+";":Oe+de(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Bn(r.props,/grid-\w+-start/)})?e:Oe+de(de(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return de(e,/(.+)-inline(.+)/,Se+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(kn(e)-1-t>6)switch(it(e,t+1)){case 109:if(it(e,t+4)!==45)break;case 102:return de(e,/(.+:)(.+)-([^]+)/,"$1"+Se+"$2-$3$1"+As+(it(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~hl(e,"stretch",0)?s1(de(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return de(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,o,i,a,l,u,d){return Oe+o+":"+i+d+(a?Oe+o+"-span:"+(l?u:+u-+i)+d:"")+e});case 4949:if(it(e,t+6)===121)return de(e,":",":"+Se)+e;break;case 6444:switch(it(e,it(e,14)===45?18:11)){case 120:return de(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Se+(it(e,14)===45?"inline-":"")+"box$3$1"+Se+"$2$3$1"+Oe+"$2box$3")+e;case 100:return de(e,":",":"+Oe)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return de(e,"scroll-","scroll-snap-")+e}return e}function Yl(e,t){for(var n="",r=0;r-1&&!e.return)switch(e.type){case $p:e.return=s1(e.value,e.length,n);return;case t1:return Yl([cr(e,{value:de(e.value,"@","@"+Se)})],r);case Pc:if(e.length)return mS(n=e.props,function(o){switch(Bn(o,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Lo(cr(e,{props:[de(o,/:(read-\w+)/,":"+As+"$1")]})),Lo(cr(e,{props:[o]})),af(e,{props:Ym(n,r)});break;case"::placeholder":Lo(cr(e,{props:[de(o,/:(plac\w+)/,":"+Se+"input-$1")]})),Lo(cr(e,{props:[de(o,/:(plac\w+)/,":"+As+"$1")]})),Lo(cr(e,{props:[de(o,/:(plac\w+)/,Oe+"input-$1")]})),Lo(cr(e,{props:[o]})),af(e,{props:Ym(n,r)});break}return""})}}var IS={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Mt={VITE_API_URL:"http://15.164.5.135:8080",VITE_KAKAO_KEY:"af7394f12b174cad35e87960ddccf91f",ALLUSERSPROFILE:"C:\\ProgramData",APPDATA:"C:\\Users\\yscho\\AppData\\Roaming",ChocolateyInstall:"C:\\ProgramData\\chocolatey",ChocolateyLastPathUpdate:"133643746293195846",CHROME_CRASHPAD_PIPE_NAME:"\\\\.\\pipe\\crashpad_36248_XICQXOUWABLVCZIM",COLOR:"1",COLORTERM:"truecolor",CommonProgramFiles:"C:\\Program Files\\Common Files","CommonProgramFiles(x86)":"C:\\Program Files (x86)\\Common Files",CommonProgramW6432:"C:\\Program Files\\Common Files",COMPUTERNAME:"LAPTOP-1U9BALFB",ComSpec:"C:\\WINDOWS\\system32\\cmd.exe",DriverData:"C:\\Windows\\System32\\Drivers\\DriverData",EDITOR:"C:\\WINDOWS\\notepad.exe",EFC_13440:"1",FPS_BROWSER_APP_PROFILE_STRING:"Internet Explorer",FPS_BROWSER_USER_PROFILE_STRING:"Default",GIT_ASKPASS:"c:\\Users\\yscho\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\extensions\\git\\dist\\askpass.sh",HOME:"C:\\Users\\yscho",HOMEDRIVE:"C:",HOMEPATH:"\\Users\\yscho",INIT_CWD:"C:\\Users\\yscho\\Desktop\\Good Buy Us\\WEB1_2_LinkUP_FE",LANG:"ko_KR.UTF-8",LOCALAPPDATA:"C:\\Users\\yscho\\AppData\\Local",LOGONSERVER:"\\\\LAPTOP-1U9BALFB",NODE:"C:\\Program Files\\nodejs\\node.exe",NODE_ENV:"production",NODE_EXE:"C:\\Program Files\\nodejs\\\\node.exe",NPM_CLI_JS:"C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js",npm_command:"run-script",npm_config_cache:"C:\\Users\\yscho\\AppData\\Local\\npm-cache",npm_config_globalconfig:"C:\\Program Files\\nodejs\\etc\\npmrc",npm_config_global_prefix:"C:\\Program Files\\nodejs",npm_config_init_module:"C:\\Users\\yscho\\.npm-init.js",npm_config_local_prefix:"C:\\Users\\yscho\\Desktop\\Good Buy Us\\WEB1_2_LinkUP_FE",npm_config_metrics_registry:"https://registry.npmjs.org/",npm_config_node_gyp:"C:\\Users\\yscho\\AppData\\Roaming\\nvm\\v18.18.2\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js",npm_config_noproxy:"",npm_config_npm_version:"9.8.1",npm_config_prefix:"C:\\Program Files\\nodejs",npm_config_userconfig:"C:\\Users\\yscho\\.npmrc",npm_config_user_agent:"npm/9.8.1 node/v18.18.2 win32 x64 workspaces/false",npm_execpath:"C:\\Users\\yscho\\AppData\\Roaming\\nvm\\v18.18.2\\node_modules\\npm\\bin\\npm-cli.js",npm_lifecycle_event:"build",npm_lifecycle_script:"vite build",npm_node_execpath:"C:\\Program Files\\nodejs\\node.exe",npm_package_json:"C:\\Users\\yscho\\Desktop\\Good Buy Us\\WEB1_2_LinkUP_FE\\package.json",npm_package_name:"goodbuyus",npm_package_version:"0.1.0",NPM_PREFIX_NPM_CLI_JS:"C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js",NUMBER_OF_PROCESSORS:"8",NVM_HOME:"C:\\Users\\yscho\\AppData\\Roaming\\nvm",NVM_SYMLINK:"C:\\Program Files\\nodejs",OneDrive:"C:\\Users\\yscho\\OneDrive",ORIGINAL_XDG_CURRENT_DESKTOP:"undefined",OS:"Windows_NT",Path:"C:\\Users\\yscho\\Desktop\\Good Buy Us\\WEB1_2_LinkUP_FE\\node_modules\\.bin;C:\\Users\\yscho\\Desktop\\Good Buy Us\\node_modules\\.bin;C:\\Users\\yscho\\Desktop\\node_modules\\.bin;C:\\Users\\yscho\\node_modules\\.bin;C:\\Users\\node_modules\\.bin;C:\\node_modules\\.bin;C:\\Users\\yscho\\AppData\\Roaming\\nvm\\v18.18.2\\node_modules\\npm\\node_modules\\@npmcli\\run-script\\lib\\node-gyp-bin;C:\\Python312\\Scripts\\;C:\\Python312\\;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files (x86)\\NAT Service;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\windows\\system32;C:\\windows;C:\\windows\\System32\\Wbem;C:\\windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\dotnet\\;C:\\Python27\\Scripts;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\ProgramData\\chocolatey\\bin;C:\\Users\\yscho\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Program Files\\Git\\cmd;C:\\Users\\yscho\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\yscho\\AppData\\Local\\Programs\\Python\\Python36\\Scripts\\;C:\\Users\\yscho\\AppData\\Local\\Programs\\Python\\Python36\\;C:\\Users\\yscho\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\yscho\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\yscho\\AppData\\Roaming\\npm;C:\\Users\\yscho\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Users\\yscho\\AppData\\Local\\SOOP",PATHEXT:".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL",PROCESSOR_ARCHITECTURE:"AMD64",PROCESSOR_IDENTIFIER:"Intel64 Family 6 Model 142 Stepping 10, GenuineIntel",PROCESSOR_LEVEL:"6",PROCESSOR_REVISION:"8e0a",ProgramData:"C:\\ProgramData",ProgramFiles:"C:\\Program Files","ProgramFiles(x86)":"C:\\Program Files (x86)",ProgramW6432:"C:\\Program Files",PROMPT:"$P$G",PSModulePath:"C:\\Users\\yscho\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules",PUBLIC:"C:\\Users\\Public",SESSIONNAME:"Console",SystemDrive:"C:",SystemRoot:"C:\\WINDOWS",TEMP:"C:\\Users\\yscho\\AppData\\Local\\Temp",TERM_PROGRAM:"vscode",TERM_PROGRAM_VERSION:"1.95.3",TMP:"C:\\Users\\yscho\\AppData\\Local\\Temp",USERDOMAIN:"LAPTOP-1U9BALFB",USERDOMAIN_ROAMINGPROFILE:"LAPTOP-1U9BALFB",USERNAME:"yunsung",USERPROFILE:"C:\\Users\\yscho",VSCODE_GIT_ASKPASS_EXTRA_ARGS:"",VSCODE_GIT_ASKPASS_MAIN:"c:\\Users\\yscho\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app\\extensions\\git\\dist\\askpass-main.js",VSCODE_GIT_ASKPASS_NODE:"C:\\Users\\yscho\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe",VSCODE_GIT_IPC_HANDLE:"\\\\.\\pipe\\vscode-git-ee27cb4a5d-sock",VSCODE_INJECTION:"1",windir:"C:\\WINDOWS"},Ii=typeof process<"u"&&Mt!==void 0&&(Mt.REACT_APP_SC_ATTR||Mt.SC_ATTR)||"data-styled",a1="active",l1="data-styled-version",Ic="6.1.13",Fp=`/*!sc*/ +`,Jl=typeof window<"u"&&"HTMLElement"in window,DS=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&Mt!==void 0&&Mt.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&Mt.REACT_APP_SC_DISABLE_SPEEDY!==""?Mt.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&Mt.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&Mt!==void 0&&Mt.SC_DISABLE_SPEEDY!==void 0&&Mt.SC_DISABLE_SPEEDY!==""&&Mt.SC_DISABLE_SPEEDY!=="false"&&Mt.SC_DISABLE_SPEEDY),OS={},Dc=Object.freeze([]),Di=Object.freeze({});function c1(e,t,n){return n===void 0&&(n=Di),e.theme!==n.theme&&e.theme||t||n.theme}var u1=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),TS=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,NS=/(^-|-$)/g;function Zm(e){return e.replace(TS,"-").replace(NS,"")}var LS=/(a)(d)/gi,Ba=52,eg=function(e){return String.fromCharCode(e+(e>25?39:97))};function uf(e){var t,n="";for(t=Math.abs(e);t>Ba;t=t/Ba|0)n=eg(t%Ba)+n;return(eg(t%Ba)+n).replace(LS,"$1-$2")}var ku,d1=5381,Xo=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},f1=function(e){return Xo(d1,e)};function p1(e){return uf(f1(e)>>>0)}function _S(e){return e.displayName||e.name||"Component"}function Pu(e){return typeof e=="string"&&!0}var h1=typeof Symbol=="function"&&Symbol.for,m1=h1?Symbol.for("react.memo"):60115,MS=h1?Symbol.for("react.forward_ref"):60112,$S={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},zS={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},g1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},FS=((ku={})[MS]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ku[m1]=g1,ku);function tg(e){return("type"in(t=e)&&t.type.$$typeof)===m1?g1:"$$typeof"in e?FS[e.$$typeof]:$S;var t}var US=Object.defineProperty,BS=Object.getOwnPropertyNames,ng=Object.getOwnPropertySymbols,WS=Object.getOwnPropertyDescriptor,HS=Object.getPrototypeOf,rg=Object.prototype;function x1(e,t,n){if(typeof t!="string"){if(rg){var r=HS(t);r&&r!==rg&&x1(e,r,n)}var o=BS(t);ng&&(o=o.concat(ng(t)));for(var i=tg(e),a=tg(t),l=0;l0?" Args: ".concat(t.join(", ")):""))}var VS=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var n=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,o=r.length,i=o;t>=i;)if((i<<=1)<0)throw ua(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var a=o;a=this.length||this.groupSizes[t]===0)return n;for(var r=this.groupSizes[t],o=this.indexOfGroup(t),i=o+r,a=o;a=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t0&&(j+="".concat(g,","))}),u+="".concat(y).concat(x,'{content:"').concat(j,'"}').concat(Fp)},p=0;p0?".".concat(t):h},p=u.slice();p.push(function(h){h.type===Pc&&h.value.includes("&")&&(h.props[0]=h.props[0].replace(n2,n).replace(r,d))}),a.prefix&&p.push(AS),p.push(PS);var f=function(h,b,y,x){b===void 0&&(b=""),y===void 0&&(y=""),x===void 0&&(x="&"),t=x,n=b,r=new RegExp("\\".concat(n,"\\b"),"g");var j=h.replace(r2,""),g=SS(y||b?"".concat(y," ").concat(b," { ").concat(j," }"):j);a.namespace&&(g=v1(g,a.namespace));var m=[];return Yl(g,ES(p.concat(RS(function(v){return m.push(v)})))),m};return f.hash=u.length?u.reduce(function(h,b){return b.name||ua(15),Xo(h,b.name)},d1).toString():"",f}var i2=new Zl,pf=o2(),w1=ut.createContext({shouldForwardProp:void 0,styleSheet:i2,stylis:pf});w1.Consumer;ut.createContext(void 0);function hf(){return w.useContext(w1)}var s2=function(){function e(t,n){var r=this;this.inject=function(o,i){i===void 0&&(i=pf);var a=r.name+i.hash;o.hasNameForId(r.id,a)||o.insertRules(r.id,a,i(r.rules,a,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=n,Bp(this,function(){throw ua(12,String(r.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=pf),this.name+t.hash},e}(),a2=function(e){return e>="A"&&e<="Z"};function sg(e){for(var t="",n=0;n>>0);if(!n.hasNameForId(this.componentId,a)){var l=r(i,".".concat(a),void 0,this.componentId);n.insertRules(this.componentId,a,l)}o=ro(o,a),this.staticRulesId=a}else{for(var u=Xo(this.baseHash,r.hash),d="",p=0;p>>0);n.hasNameForId(this.componentId,b)||n.insertRules(this.componentId,b,r(d,".".concat(b),void 0,this.componentId)),o=ro(o,b)}}return o},e}(),Wp=ut.createContext(void 0);Wp.Consumer;var Eu={};function u2(e,t,n){var r=Up(e),o=e,i=!Pu(e),a=t.attrs,l=a===void 0?Dc:a,u=t.componentId,d=u===void 0?function(C,P){var S=typeof C!="string"?"sc":Zm(C);Eu[S]=(Eu[S]||0)+1;var R="".concat(S,"-").concat(p1(Ic+S+Eu[S]));return P?"".concat(P,"-").concat(R):R}(t.displayName,t.parentComponentId):u,p=t.displayName,f=p===void 0?function(C){return Pu(C)?"styled.".concat(C):"Styled(".concat(_S(C),")")}(e):p,h=t.displayName&&t.componentId?"".concat(Zm(t.displayName),"-").concat(t.componentId):t.componentId||d,b=r&&o.attrs?o.attrs.concat(l).filter(Boolean):l,y=t.shouldForwardProp;if(r&&o.shouldForwardProp){var x=o.shouldForwardProp;if(t.shouldForwardProp){var j=t.shouldForwardProp;y=function(C,P){return x(C,P)&&j(C,P)}}else y=x}var g=new c2(n,h,r?o.componentStyle:void 0);function m(C,P){return function(S,R,I){var L=S.attrs,B=S.componentStyle,N=S.defaultProps,O=S.foldedComponentIds,$=S.styledComponentId,F=S.target,se=ut.useContext(Wp),he=hf(),oe=S.shouldForwardProp||he.shouldForwardProp,W=c1(R,se,N)||Di,H=function(Ne,Ce,M){for(var U,ae=xt(xt({},Ce),{className:void 0,theme:M}),Ke=0;Ke2&&Zl.registerId(this.componentId+t),this.removeStyles(t,r),this.createStyles(t,n,r,o)},e}();function f2(e){for(var t=[],n=1;n{const t=()=>{const n=[],r=Math.floor(e),o=e%1>=.3&&e%1<=.7,i=e%1<.3&&e%1>0,a=e%1>.7;for(let u=0;ue!=="likes"})` + position: absolute; + bottom: 20px; + right: 30px; + width: 25px; + height: 25px; + cursor: pointer; + content: ${({likes:e})=>`url(${e?E1:P1})`}; + color: ${({likes:e})=>e?"red ":"transparent"}; + + &:hover { + cursor: pointer; + transform: scale(1.2); + transition: transform 0.2s ease-in-out; + } +`,b2=c.div` + width: 100%; + display: flex; + align-items: center; + position: relative; +`,j2=c.div.withConfig({shouldForwardProp:e=>e!=="expanded"})` + display: flex; + flex-wrap: wrap; + gap: 2px; + position: absolute; + top: 15px; + left: 190px; + padding: 10px 20px; + z-index: 10; + visibility: ${e=>e.expanded?"visible":"hidden"}; + opacity: ${e=>e.expanded?1:0}; + transition: + opacity 0.3s ease, + visibility 0.3s ease; +`,C2=c.div` + padding: 5px 10px; + border-radius: 5px; + width: 120px; + font-weight: ${e=>e.selected?"bold":"normal"}; + text-decoration: ${e=>e.selected?"underline":"none"}; + &:hover { + cursor: pointer; + text-decoration: underline; + } +`,z1=c.div` + position: relative; + margin-top: 30px; + display: flex; + justify-content: flex-end; + width: 100%; +`,F1=c(An)` + position: absolute; + right: 20px; + display: inline-block; + padding: 10px 30px; + background-color: black; + color: white; + border-radius: 8px; + text-decoration: none; + font-weight: bold; + font-size: 16px; + transition: background-color 0.3s; + + &:hover { + cursor: pointer; + background-color: gray; + } +`,In="/assets/default-featured-image.png-C2hm5daT.jpg",S2=({products:e})=>{if(!e)return s.jsx("div",{children:"No products available"});const t=o=>[...o].sort((a,l)=>{var u,d;return(((u=l.reviews)==null?void 0:u.length)||0)-(((d=a.reviews)==null?void 0:d.length)||0)}).slice(0,8),n=w.useMemo(()=>t(e),[e]),r=()=>{};return s.jsxs(v2,{children:[s.jsx(w2,{children:"실시간 인기 상품"}),s.jsx(R1,{children:n.map(o=>s.jsxs(A1,{children:[s.jsxs(I1,{to:`/products/${o.id}`,children:[s.jsx(D1,{src:o.url||In,alt:o.name,onError:i=>{i.currentTarget.src=In}}),s.jsxs(O1,{children:[s.jsx(T1,{children:o.name}),s.jsx(N1,{children:s.jsx(da,{rating:o.rating})}),s.jsxs(L1,{children:[s.jsxs(_1,{children:[o.originalprice,"원"]}),s.jsxs(M1,{children:[o.discountprice,"원"]})]})]})]}),s.jsx($1,{likes:o.likes,onClick:r})]},o.id))}),s.jsx(z1,{children:s.jsx(F1,{to:"/products",children:"더보기"})})]})};var Fi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Co=typeof window>"u"||"Deno"in globalThis;function qt(){}function k2(e,t){return typeof e=="function"?e(t):e}function gf(e){return typeof e=="number"&&e>=0&&e!==1/0}function U1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ii(e,t){return typeof e=="function"?e(t):e}function dn(e,t){return typeof e=="function"?e(t):e}function cg(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==Hp(a,t.options))return!1}else if(!Js(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function ug(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(So(t.options.mutationKey)!==So(i))return!1}else if(!Js(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Hp(e,t){return((t==null?void 0:t.queryKeyHashFn)||So)(e)}function So(e){return JSON.stringify(e,(t,n)=>xf(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Js(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Js(e[n],t[n])):!1}function B1(e,t){if(e===t)return e;const n=dg(e)&&dg(t);if(n||xf(e)&&xf(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,l=n?[]:{};let u=0;for(let d=0;d{setTimeout(t,e)})}function yf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?B1(e,t):t}function E2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function R2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Vp=Symbol();function W1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var io,mr,ai,px,A2=(px=class extends Fi{constructor(){super();te(this,io);te(this,mr);te(this,ai);V(this,ai,t=>{if(!Co&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,mr)||this.setEventListener(k(this,ai))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,mr))==null||t.call(this),V(this,mr,void 0))}setEventListener(t){var n;V(this,ai,t),(n=k(this,mr))==null||n.call(this),V(this,mr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,io)!==t&&(V(this,io,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof k(this,io)=="boolean"?k(this,io):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},io=new WeakMap,mr=new WeakMap,ai=new WeakMap,px),Qp=new A2,li,gr,ci,hx,I2=(hx=class extends Fi{constructor(){super();te(this,li,!0);te(this,gr);te(this,ci);V(this,ci,t=>{if(!Co&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){k(this,gr)||this.setEventListener(k(this,ci))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,gr))==null||t.call(this),V(this,gr,void 0))}setEventListener(t){var n;V(this,ci,t),(n=k(this,gr))==null||n.call(this),V(this,gr,t(this.setOnline.bind(this)))}setOnline(t){k(this,li)!==t&&(V(this,li,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,li)}},li=new WeakMap,gr=new WeakMap,ci=new WeakMap,hx),tc=new I2;function vf(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function D2(e){return Math.min(1e3*2**e,3e4)}function H1(e){return(e??"online")==="online"?tc.isOnline():!0}var V1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ru(e){return e instanceof V1}function Q1(e){let t=!1,n=0,r=!1,o;const i=vf(),a=x=>{var j;r||(h(new V1(x)),(j=e.abort)==null||j.call(e))},l=()=>{t=!0},u=()=>{t=!1},d=()=>Qp.isFocused()&&(e.networkMode==="always"||tc.isOnline())&&e.canRun(),p=()=>H1(e.networkMode)&&e.canRun(),f=x=>{var j;r||(r=!0,(j=e.onSuccess)==null||j.call(e,x),o==null||o(),i.resolve(x))},h=x=>{var j;r||(r=!0,(j=e.onError)==null||j.call(e,x),o==null||o(),i.reject(x))},b=()=>new Promise(x=>{var j;o=g=>{(r||d())&&x(g)},(j=e.onPause)==null||j.call(e)}).then(()=>{var x;o=void 0,r||(x=e.onContinue)==null||x.call(e)}),y=()=>{if(r)return;let x;const j=n===0?e.initialPromise:void 0;try{x=j??e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(f).catch(g=>{var S;if(r)return;const m=e.retry??(Co?0:3),v=e.retryDelay??D2,C=typeof v=="function"?v(n,g):v,P=m===!0||typeof m=="number"&&nd()?void 0:b()).then(()=>{t?h(g):y()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:l,continueRetry:u,canStart:p,start:()=>(p()?y():b().then(y),i)}}function O2(){let e=[],t=0,n=l=>{l()},r=l=>{l()},o=l=>setTimeout(l,0);const i=l=>{t?e.push(l):o(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&o(()=>{r(()=>{l.forEach(u=>{n(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||a()}return u},batchCalls:l=>(...u)=>{i(()=>{l(...u)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{o=l}}}var et=O2(),so,mx,K1=(mx=class{constructor(){te(this,so)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gf(this.gcTime)&&V(this,so,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Co?1/0:5*60*1e3))}clearGcTimeout(){k(this,so)&&(clearTimeout(k(this,so)),V(this,so,void 0))}},so=new WeakMap,mx),ui,di,Gt,mt,ea,ao,an,Fn,gx,T2=(gx=class extends K1{constructor(t){super();te(this,an);te(this,ui);te(this,di);te(this,Gt);te(this,mt);te(this,ea);te(this,ao);V(this,ao,!1),V(this,ea,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,Gt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,ui,N2(this.options)),this.state=t.state??k(this,ui),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,mt))==null?void 0:t.promise}setOptions(t){this.options={...k(this,ea),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,Gt).remove(this)}setData(t,n){const r=yf(this.state.data,t,this.options);return ue(this,an,Fn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ue(this,an,Fn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=k(this,mt))==null?void 0:r.promise;return(o=k(this,mt))==null||o.cancel(t),n?n.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,ui))}isActive(){return this.observers.some(t=>dn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!U1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,mt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,mt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,Gt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(k(this,mt)&&(k(this,ao)?k(this,mt).cancel({revert:!0}):k(this,mt).cancelRetry()),this.scheduleGc()),k(this,Gt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ue(this,an,Fn).call(this,{type:"invalidate"})}fetch(t,n){var u,d,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,mt))return k(this,mt).continueRetry(),k(this,mt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,o=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(V(this,ao,!0),r.signal)})},i=()=>{const f=W1(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return o(h),V(this,ao,!1),this.options.persister?this.options.persister(f,h,this):f(h)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};o(a),(u=this.options.behavior)==null||u.onFetch(a,this),V(this,di,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&ue(this,an,Fn).call(this,{type:"fetch",meta:(p=a.fetchOptions)==null?void 0:p.meta});const l=f=>{var h,b,y,x;Ru(f)&&f.silent||ue(this,an,Fn).call(this,{type:"error",error:f}),Ru(f)||((b=(h=k(this,Gt).config).onError)==null||b.call(h,f,this),(x=(y=k(this,Gt).config).onSettled)==null||x.call(y,this.state.data,f,this)),this.scheduleGc()};return V(this,mt,Q1({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,b,y,x;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(j){l(j);return}(b=(h=k(this,Gt).config).onSuccess)==null||b.call(h,f,this),(x=(y=k(this,Gt).config).onSettled)==null||x.call(y,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{ue(this,an,Fn).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{ue(this,an,Fn).call(this,{type:"pause"})},onContinue:()=>{ue(this,an,Fn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),k(this,mt).start()}},ui=new WeakMap,di=new WeakMap,Gt=new WeakMap,mt=new WeakMap,ea=new WeakMap,ao=new WeakMap,an=new WeakSet,Fn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...G1(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Ru(o)&&o.revert&&k(this,di)?{...k(this,di),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),et.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,Gt).notify({query:this,type:"updated",action:t})})},gx);function G1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:H1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function N2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var bn,xx,L2=(xx=class extends Fi{constructor(t={}){super();te(this,bn);this.config=t,V(this,bn,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Hp(o,n);let a=this.get(i);return a||(a=new T2({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){k(this,bn).has(t.queryHash)||(k(this,bn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=k(this,bn).get(t.queryHash);n&&(t.destroy(),n===t&&k(this,bn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,bn).get(t)}getAll(){return[...k(this,bn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>cg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>cg(t,r)):n}notify(t){et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bn=new WeakMap,xx),jn,wt,lo,Cn,ur,yx,_2=(yx=class extends K1{constructor(t){super();te(this,Cn);te(this,jn);te(this,wt);te(this,lo);this.mutationId=t.mutationId,V(this,wt,t.mutationCache),V(this,jn,[]),this.state=t.state||q1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,jn).includes(t)||(k(this,jn).push(t),this.clearGcTimeout(),k(this,wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,jn,k(this,jn).filter(n=>n!==t)),this.scheduleGc(),k(this,wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,jn).length||(this.state.status==="pending"?this.scheduleGc():k(this,wt).remove(this))}continue(){var t;return((t=k(this,lo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,u,d,p,f,h,b,y,x,j,g,m,v,C,P,S,R;V(this,lo,Q1({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,L)=>{ue(this,Cn,ur).call(this,{type:"failed",failureCount:I,error:L})},onPause:()=>{ue(this,Cn,ur).call(this,{type:"pause"})},onContinue:()=>{ue(this,Cn,ur).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,wt).canRun(this)}));const n=this.state.status==="pending",r=!k(this,lo).canStart();try{if(!n){ue(this,Cn,ur).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=k(this,wt).config).onMutate)==null?void 0:i.call(o,t,this));const L=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));L!==this.state.context&&ue(this,Cn,ur).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const I=await k(this,lo).start();return await((d=(u=k(this,wt).config).onSuccess)==null?void 0:d.call(u,I,t,this.state.context,this)),await((f=(p=this.options).onSuccess)==null?void 0:f.call(p,I,t,this.state.context)),await((b=(h=k(this,wt).config).onSettled)==null?void 0:b.call(h,I,null,this.state.variables,this.state.context,this)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,I,null,t,this.state.context)),ue(this,Cn,ur).call(this,{type:"success",data:I}),I}catch(I){try{throw await((g=(j=k(this,wt).config).onError)==null?void 0:g.call(j,I,t,this.state.context,this)),await((v=(m=this.options).onError)==null?void 0:v.call(m,I,t,this.state.context)),await((P=(C=k(this,wt).config).onSettled)==null?void 0:P.call(C,void 0,I,this.state.variables,this.state.context,this)),await((R=(S=this.options).onSettled)==null?void 0:R.call(S,void 0,I,t,this.state.context)),I}finally{ue(this,Cn,ur).call(this,{type:"error",error:I})}}finally{k(this,wt).runNext(this)}}},jn=new WeakMap,wt=new WeakMap,lo=new WeakMap,Cn=new WeakSet,ur=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),et.batch(()=>{k(this,jn).forEach(r=>{r.onMutationUpdate(t)}),k(this,wt).notify({mutation:this,type:"updated",action:t})})},yx);function q1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $t,ta,vx,M2=(vx=class extends Fi{constructor(t={}){super();te(this,$t);te(this,ta);this.config=t,V(this,$t,new Map),V(this,ta,Date.now())}build(t,n,r){const o=new _2({mutationCache:this,mutationId:++Ca(this,ta)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=Ha(t),r=k(this,$t).get(n)??[];r.push(t),k(this,$t).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Ha(t);if(k(this,$t).has(n)){const o=(r=k(this,$t).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?k(this,$t).delete(n):k(this,$t).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=k(this,$t).get(Ha(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=k(this,$t).get(Ha(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...k(this,$t).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ug(n,r))}findAll(t={}){return this.getAll().filter(n=>ug(t,n))}notify(t){et.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return et.batch(()=>Promise.all(t.map(n=>n.continue().catch(qt))))}},$t=new WeakMap,ta=new WeakMap,vx);function Ha(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function pg(e){return{onFetch:(t,n)=>{var p,f,h,b,y;const r=t.options,o=(h=(f=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((b=t.state.data)==null?void 0:b.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const d=async()=>{let x=!1;const j=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},g=W1(t.options,t.fetchOptions),m=async(v,C,P)=>{if(x)return Promise.reject();if(C==null&&v.pages.length)return Promise.resolve(v);const S={queryKey:t.queryKey,pageParam:C,direction:P?"backward":"forward",meta:t.options.meta};j(S);const R=await g(S),{maxPages:I}=t.options,L=P?R2:E2;return{pages:L(v.pages,R,I),pageParams:L(v.pageParams,C,I)}};if(o&&i.length){const v=o==="backward",C=v?$2:hg,P={pages:i,pageParams:a},S=C(r,P);l=await m(P,S,v)}else{const v=e??i.length;do{const C=u===0?a[0]??r.initialPageParam:hg(r,l);if(u>0&&C==null)break;l=await m(l,C),u++}while(u{var x,j;return(j=(x=t.options).persister)==null?void 0:j.call(x,d,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function hg(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function $2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var We,xr,yr,fi,pi,vr,hi,mi,wx,z2=(wx=class{constructor(e={}){te(this,We);te(this,xr);te(this,yr);te(this,fi);te(this,pi);te(this,vr);te(this,hi);te(this,mi);V(this,We,e.queryCache||new L2),V(this,xr,e.mutationCache||new M2),V(this,yr,e.defaultOptions||{}),V(this,fi,new Map),V(this,pi,new Map),V(this,vr,0)}mount(){Ca(this,vr)._++,k(this,vr)===1&&(V(this,hi,Qp.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,We).onFocus())})),V(this,mi,tc.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,We).onOnline())})))}unmount(){var e,t;Ca(this,vr)._--,k(this,vr)===0&&((e=k(this,hi))==null||e.call(this),V(this,hi,void 0),(t=k(this,mi))==null||t.call(this),V(this,mi,void 0))}isFetching(e){return k(this,We).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,xr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,We).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=k(this,We).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(ii(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return k(this,We).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=k(this,We).get(r.queryHash),i=o==null?void 0:o.state.data,a=k2(t,i);if(a!==void 0)return k(this,We).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return et.batch(()=>k(this,We).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,We).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=k(this,We);et.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=k(this,We),r={type:"active",...e};return et.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=et.batch(()=>k(this,We).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(qt).catch(qt)}invalidateQueries(e={},t={}){return et.batch(()=>{if(k(this,We).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=et.batch(()=>k(this,We).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(qt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(qt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=k(this,We).build(this,t);return n.isStaleByTime(ii(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qt).catch(qt)}fetchInfiniteQuery(e){return e.behavior=pg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qt).catch(qt)}ensureInfiniteQueryData(e){return e.behavior=pg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return tc.isOnline()?k(this,xr).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,We)}getMutationCache(){return k(this,xr)}getDefaultOptions(){return k(this,yr)}setDefaultOptions(e){V(this,yr,e)}setQueryDefaults(e,t){k(this,fi).set(So(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,fi).values()];let n={};return t.forEach(r=>{Js(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){k(this,pi).set(So(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,pi).values()];let n={};return t.forEach(r=>{Js(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,yr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Hp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===Vp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,yr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,We).clear(),k(this,xr).clear()}},We=new WeakMap,xr=new WeakMap,yr=new WeakMap,fi=new WeakMap,pi=new WeakMap,vr=new WeakMap,hi=new WeakMap,mi=new WeakMap,wx),Pt,xe,na,bt,co,gi,wr,Sn,ra,xi,yi,uo,fo,br,vi,ke,vs,wf,bf,jf,Cf,Sf,kf,Pf,Y1,bx,F2=(bx=class extends Fi{constructor(t,n){super();te(this,ke);te(this,Pt);te(this,xe);te(this,na);te(this,bt);te(this,co);te(this,gi);te(this,wr);te(this,Sn);te(this,ra);te(this,xi);te(this,yi);te(this,uo);te(this,fo);te(this,br);te(this,vi,new Set);this.options=n,V(this,Pt,t),V(this,Sn,null),V(this,wr,vf()),this.options.experimental_prefetchInRender||k(this,wr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,xe).addObserver(this),mg(k(this,xe),this.options)?ue(this,ke,vs).call(this):this.updateResult(),ue(this,ke,Cf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ef(k(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ef(k(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ue(this,ke,Sf).call(this),ue(this,ke,kf).call(this),k(this,xe).removeObserver(this)}setOptions(t,n){const r=this.options,o=k(this,xe);if(this.options=k(this,Pt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof dn(this.options.enabled,k(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ue(this,ke,Pf).call(this),k(this,xe).setOptions(this.options),r._defaulted&&!ec(this.options,r)&&k(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,xe),observer:this});const i=this.hasListeners();i&&gg(k(this,xe),o,this.options,r)&&ue(this,ke,vs).call(this),this.updateResult(n),i&&(k(this,xe)!==o||dn(this.options.enabled,k(this,xe))!==dn(r.enabled,k(this,xe))||ii(this.options.staleTime,k(this,xe))!==ii(r.staleTime,k(this,xe)))&&ue(this,ke,wf).call(this);const a=ue(this,ke,bf).call(this);i&&(k(this,xe)!==o||dn(this.options.enabled,k(this,xe))!==dn(r.enabled,k(this,xe))||a!==k(this,br))&&ue(this,ke,jf).call(this,a)}getOptimisticResult(t){const n=k(this,Pt).getQueryCache().build(k(this,Pt),t),r=this.createResult(n,t);return B2(this,r)&&(V(this,bt,r),V(this,gi,this.options),V(this,co,k(this,xe).state)),r}getCurrentResult(){return k(this,bt)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){k(this,vi).add(t)}getCurrentQuery(){return k(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=k(this,Pt).defaultQueryOptions(t),r=k(this,Pt).getQueryCache().build(k(this,Pt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ue(this,ke,vs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,bt)))}createResult(t,n){var I;const r=k(this,xe),o=this.options,i=k(this,bt),a=k(this,co),l=k(this,gi),d=t!==r?t.state:k(this,na),{state:p}=t;let f={...p},h=!1,b;if(n._optimisticResults){const L=this.hasListeners(),B=!L&&mg(t,n),N=L&&gg(t,r,n,o);(B||N)&&(f={...f,...G1(p.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:y,errorUpdatedAt:x,status:j}=f;if(n.select&&f.data!==void 0)if(i&&f.data===(a==null?void 0:a.data)&&n.select===k(this,ra))b=k(this,xi);else try{V(this,ra,n.select),b=n.select(f.data),b=yf(i==null?void 0:i.data,b,n),V(this,xi,b),V(this,Sn,null)}catch(L){V(this,Sn,L)}else b=f.data;if(n.placeholderData!==void 0&&b===void 0&&j==="pending"){let L;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))L=i.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((I=k(this,yi))==null?void 0:I.state.data,k(this,yi)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),V(this,Sn,null)}catch(B){V(this,Sn,B)}L!==void 0&&(j="success",b=yf(i==null?void 0:i.data,L,n),h=!0)}k(this,Sn)&&(y=k(this,Sn),b=k(this,xi),x=Date.now(),j="error");const g=f.fetchStatus==="fetching",m=j==="pending",v=j==="error",C=m&&g,P=b!==void 0,R={status:j,fetchStatus:f.fetchStatus,isPending:m,isSuccess:j==="success",isError:v,isInitialLoading:C,isLoading:C,data:b,dataUpdatedAt:f.dataUpdatedAt,error:y,errorUpdatedAt:x,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>d.dataUpdateCount||f.errorUpdateCount>d.errorUpdateCount,isFetching:g,isRefetching:g&&!m,isLoadingError:v&&!P,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:v&&P,isStale:Kp(t,n),refetch:this.refetch,promise:k(this,wr)};if(this.options.experimental_prefetchInRender){const L=O=>{R.status==="error"?O.reject(R.error):R.data!==void 0&&O.resolve(R.data)},B=()=>{const O=V(this,wr,R.promise=vf());L(O)},N=k(this,wr);switch(N.status){case"pending":t.queryHash===r.queryHash&&L(N);break;case"fulfilled":(R.status==="error"||R.data!==N.value)&&B();break;case"rejected":(R.status!=="error"||R.error!==N.reason)&&B();break}}return R}updateResult(t){const n=k(this,bt),r=this.createResult(k(this,xe),this.options);if(V(this,co,k(this,xe).state),V(this,gi,this.options),k(this,co).data!==void 0&&V(this,yi,k(this,xe)),ec(r,n))return;V(this,bt,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,l=typeof a=="function"?a():a;if(l==="all"||!l&&!k(this,vi).size)return!0;const u=new Set(l??k(this,vi));return this.options.throwOnError&&u.add("error"),Object.keys(k(this,bt)).some(d=>{const p=d;return k(this,bt)[p]!==n[p]&&u.has(p)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),ue(this,ke,Y1).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ue(this,ke,Cf).call(this)}},Pt=new WeakMap,xe=new WeakMap,na=new WeakMap,bt=new WeakMap,co=new WeakMap,gi=new WeakMap,wr=new WeakMap,Sn=new WeakMap,ra=new WeakMap,xi=new WeakMap,yi=new WeakMap,uo=new WeakMap,fo=new WeakMap,br=new WeakMap,vi=new WeakMap,ke=new WeakSet,vs=function(t){ue(this,ke,Pf).call(this);let n=k(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(qt)),n},wf=function(){ue(this,ke,Sf).call(this);const t=ii(this.options.staleTime,k(this,xe));if(Co||k(this,bt).isStale||!gf(t))return;const r=U1(k(this,bt).dataUpdatedAt,t)+1;V(this,uo,setTimeout(()=>{k(this,bt).isStale||this.updateResult()},r))},bf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,xe)):this.options.refetchInterval)??!1},jf=function(t){ue(this,ke,kf).call(this),V(this,br,t),!(Co||dn(this.options.enabled,k(this,xe))===!1||!gf(k(this,br))||k(this,br)===0)&&V(this,fo,setInterval(()=>{(this.options.refetchIntervalInBackground||Qp.isFocused())&&ue(this,ke,vs).call(this)},k(this,br)))},Cf=function(){ue(this,ke,wf).call(this),ue(this,ke,jf).call(this,ue(this,ke,bf).call(this))},Sf=function(){k(this,uo)&&(clearTimeout(k(this,uo)),V(this,uo,void 0))},kf=function(){k(this,fo)&&(clearInterval(k(this,fo)),V(this,fo,void 0))},Pf=function(){const t=k(this,Pt).getQueryCache().build(k(this,Pt),this.options);if(t===k(this,xe))return;const n=k(this,xe);V(this,xe,t),V(this,na,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Y1=function(t){et.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(k(this,bt))}),k(this,Pt).getQueryCache().notify({query:k(this,xe),type:"observerResultsUpdated"})})},bx);function U2(e,t){return dn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mg(e,t){return U2(e,t)||e.state.data!==void 0&&Ef(e,t,t.refetchOnMount)}function Ef(e,t,n){if(dn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Kp(e,t)}return!1}function gg(e,t,n,r){return(e!==t||dn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Kp(e,n)}function Kp(e,t){return dn(t.enabled,e)!==!1&&e.isStaleByTime(ii(t.staleTime,e))}function B2(e,t){return!ec(e.getCurrentResult(),t)}var jr,Cr,Et,Hn,qn,vl,Rf,jx,W2=(jx=class extends Fi{constructor(n,r){super();te(this,qn);te(this,jr);te(this,Cr);te(this,Et);te(this,Hn);V(this,jr,n),this.setOptions(r),this.bindMethods(),ue(this,qn,vl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=k(this,jr).defaultMutationOptions(n),ec(this.options,r)||k(this,jr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,Et),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&So(r.mutationKey)!==So(this.options.mutationKey)?this.reset():((o=k(this,Et))==null?void 0:o.state.status)==="pending"&&k(this,Et).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=k(this,Et))==null||n.removeObserver(this)}onMutationUpdate(n){ue(this,qn,vl).call(this),ue(this,qn,Rf).call(this,n)}getCurrentResult(){return k(this,Cr)}reset(){var n;(n=k(this,Et))==null||n.removeObserver(this),V(this,Et,void 0),ue(this,qn,vl).call(this),ue(this,qn,Rf).call(this)}mutate(n,r){var o;return V(this,Hn,r),(o=k(this,Et))==null||o.removeObserver(this),V(this,Et,k(this,jr).getMutationCache().build(k(this,jr),this.options)),k(this,Et).addObserver(this),k(this,Et).execute(n)}},jr=new WeakMap,Cr=new WeakMap,Et=new WeakMap,Hn=new WeakMap,qn=new WeakSet,vl=function(){var r;const n=((r=k(this,Et))==null?void 0:r.state)??q1();V(this,Cr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Rf=function(n){et.batch(()=>{var r,o,i,a,l,u,d,p;if(k(this,Hn)&&this.hasListeners()){const f=k(this,Cr).variables,h=k(this,Cr).context;(n==null?void 0:n.type)==="success"?((o=(r=k(this,Hn)).onSuccess)==null||o.call(r,n.data,f,h),(a=(i=k(this,Hn)).onSettled)==null||a.call(i,n.data,null,f,h)):(n==null?void 0:n.type)==="error"&&((u=(l=k(this,Hn)).onError)==null||u.call(l,n.error,f,h),(p=(d=k(this,Hn)).onSettled)==null||p.call(d,void 0,n.error,f,h))}this.listeners.forEach(f=>{f(k(this,Cr))})})},jx),J1=w.createContext(void 0),Oc=e=>{const t=w.useContext(J1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},H2=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(J1.Provider,{value:e,children:t})),X1=w.createContext(!1),V2=()=>w.useContext(X1);X1.Provider;function Q2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var K2=w.createContext(Q2()),G2=()=>w.useContext(K2);function Z1(e,t){return typeof e=="function"?e(...t):!!e}function Af(){}var q2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Y2=e=>{w.useEffect(()=>{e.clearReset()},[e])},J2=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Z1(n,[e.error,r]),X2=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Z2=(e,t)=>e.isLoading&&e.isFetching&&!t,ek=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xg=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function tk(e,t,n){var p,f,h,b,y;const r=Oc(),o=V2(),i=G2(),a=r.defaultQueryOptions(e);(f=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||f.call(p,a),a._optimisticResults=o?"isRestoring":"optimistic",X2(a),q2(a,i),Y2(i);const l=!r.getQueryCache().get(a.queryHash),[u]=w.useState(()=>new t(r,a)),d=u.getOptimisticResult(a);if(w.useSyncExternalStore(w.useCallback(x=>{const j=o?Af:u.subscribe(et.batchCalls(x));return u.updateResult(),j},[u,o]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),w.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),ek(a,d))throw xg(a,u,i);if(J2({result:d,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw d.error;if((b=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||b.call(h,a,d),a.experimental_prefetchInRender&&!Co&&Z2(d,o)){const x=l?xg(a,u,i):(y=r.getQueryCache().get(a.queryHash))==null?void 0:y.promise;x==null||x.catch(Af).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?d:u.trackResult(d)}function Gp(e,t){return tk(e,F2)}function Yr(e,t){const n=Oc(),[r]=w.useState(()=>new W2(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);const o=w.useSyncExternalStore(w.useCallback(a=>r.subscribe(et.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=w.useCallback((a,l)=>{r.mutate(a,l).catch(Af)},[r]);if(o.error&&Z1(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function ev(e,t){return function(){return e.apply(t,arguments)}}const{toString:nk}=Object.prototype,{getPrototypeOf:qp}=Object,Tc=(e=>t=>{const n=nk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),gn=e=>(e=e.toLowerCase(),t=>Tc(t)===e),Nc=e=>t=>typeof t===e,{isArray:Ui}=Array,Xs=Nc("undefined");function rk(e){return e!==null&&!Xs(e)&&e.constructor!==null&&!Xs(e.constructor)&&Wt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tv=gn("ArrayBuffer");function ok(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tv(e.buffer),t}const ik=Nc("string"),Wt=Nc("function"),nv=Nc("number"),Lc=e=>e!==null&&typeof e=="object",sk=e=>e===!0||e===!1,wl=e=>{if(Tc(e)!=="object")return!1;const t=qp(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ak=gn("Date"),lk=gn("File"),ck=gn("Blob"),uk=gn("FileList"),dk=e=>Lc(e)&&Wt(e.pipe),fk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Wt(e.append)&&((t=Tc(e))==="formdata"||t==="object"&&Wt(e.toString)&&e.toString()==="[object FormData]"))},pk=gn("URLSearchParams"),[hk,mk,gk,xk]=["ReadableStream","Request","Response","Headers"].map(gn),yk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pa(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ui(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const oo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ov=e=>!Xs(e)&&e!==oo;function If(){const{caseless:e}=ov(this)&&this||{},t={},n=(r,o)=>{const i=e&&rv(t,o)||o;wl(t[i])&&wl(r)?t[i]=If(t[i],r):wl(r)?t[i]=If({},r):Ui(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(pa(t,(o,i)=>{n&&Wt(o)?e[i]=ev(o,n):e[i]=o},{allOwnKeys:r}),e),wk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bk=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},jk=(e,t,n,r)=>{let o,i,a;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=n!==!1&&qp(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ck=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Sk=e=>{if(!e)return null;if(Ui(e))return e;let t=e.length;if(!nv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},kk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qp(Uint8Array)),Pk=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Ek=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Rk=gn("HTMLFormElement"),Ak=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),yg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ik=gn("RegExp"),iv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};pa(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},Dk=e=>{iv(e,(t,n)=>{if(Wt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Wt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ok=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Ui(e)?r(e):r(String(e).split(t)),n},Tk=()=>{},Nk=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Au="abcdefghijklmnopqrstuvwxyz",vg="0123456789",sv={DIGIT:vg,ALPHA:Au,ALPHA_DIGIT:Au+Au.toUpperCase()+vg},Lk=(e=16,t=sv.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function _k(e){return!!(e&&Wt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Mk=e=>{const t=new Array(10),n=(r,o)=>{if(Lc(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Ui(r)?[]:{};return pa(r,(a,l)=>{const u=n(a,o+1);!Xs(u)&&(i[l]=u)}),t[o]=void 0,i}}return r};return n(e,0)},$k=gn("AsyncFunction"),zk=e=>e&&(Lc(e)||Wt(e))&&Wt(e.then)&&Wt(e.catch),av=((e,t)=>e?setImmediate:t?((n,r)=>(oo.addEventListener("message",({source:o,data:i})=>{o===oo&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),oo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Wt(oo.postMessage)),Fk=typeof queueMicrotask<"u"?queueMicrotask.bind(oo):typeof process<"u"&&process.nextTick||av,T={isArray:Ui,isArrayBuffer:tv,isBuffer:rk,isFormData:fk,isArrayBufferView:ok,isString:ik,isNumber:nv,isBoolean:sk,isObject:Lc,isPlainObject:wl,isReadableStream:hk,isRequest:mk,isResponse:gk,isHeaders:xk,isUndefined:Xs,isDate:ak,isFile:lk,isBlob:ck,isRegExp:Ik,isFunction:Wt,isStream:dk,isURLSearchParams:pk,isTypedArray:kk,isFileList:uk,forEach:pa,merge:If,extend:vk,trim:yk,stripBOM:wk,inherits:bk,toFlatObject:jk,kindOf:Tc,kindOfTest:gn,endsWith:Ck,toArray:Sk,forEachEntry:Pk,matchAll:Ek,isHTMLForm:Rk,hasOwnProperty:yg,hasOwnProp:yg,reduceDescriptors:iv,freezeMethods:Dk,toObjectSet:Ok,toCamelCase:Ak,noop:Tk,toFiniteNumber:Nk,findKey:rv,global:oo,isContextDefined:ov,ALPHABET:sv,generateString:Lk,isSpecCompliantForm:_k,toJSONObject:Mk,isAsyncFn:$k,isThenable:zk,setImmediate:av,asap:Fk};function ce(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}T.inherits(ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:T.toJSONObject(this.config),code:this.code,status:this.status}}});const lv=ce.prototype,cv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{cv[e]={value:e}});Object.defineProperties(ce,cv);Object.defineProperty(lv,"isAxiosError",{value:!0});ce.from=(e,t,n,r,o,i)=>{const a=Object.create(lv);return T.toFlatObject(e,a,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),ce.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const Uk=null;function Df(e){return T.isPlainObject(e)||T.isArray(e)}function uv(e){return T.endsWith(e,"[]")?e.slice(0,-2):e}function wg(e,t,n){return e?e.concat(t).map(function(o,i){return o=uv(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Bk(e){return T.isArray(e)&&!e.some(Df)}const Wk=T.toFlatObject(T,{},null,function(t){return/^is[A-Z]/.test(t)});function _c(e,t,n){if(!T.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=T.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,j){return!T.isUndefined(j[x])});const r=n.metaTokens,o=n.visitor||p,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&T.isSpecCompliantForm(t);if(!T.isFunction(o))throw new TypeError("visitor must be a function");function d(y){if(y===null)return"";if(T.isDate(y))return y.toISOString();if(!u&&T.isBlob(y))throw new ce("Blob is not supported. Use a Buffer instead.");return T.isArrayBuffer(y)||T.isTypedArray(y)?u&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function p(y,x,j){let g=y;if(y&&!j&&typeof y=="object"){if(T.endsWith(x,"{}"))x=r?x:x.slice(0,-2),y=JSON.stringify(y);else if(T.isArray(y)&&Bk(y)||(T.isFileList(y)||T.endsWith(x,"[]"))&&(g=T.toArray(y)))return x=uv(x),g.forEach(function(v,C){!(T.isUndefined(v)||v===null)&&t.append(a===!0?wg([x],C,i):a===null?x:x+"[]",d(v))}),!1}return Df(y)?!0:(t.append(wg(j,x,i),d(y)),!1)}const f=[],h=Object.assign(Wk,{defaultVisitor:p,convertValue:d,isVisitable:Df});function b(y,x){if(!T.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(y),T.forEach(y,function(g,m){(!(T.isUndefined(g)||g===null)&&o.call(t,g,T.isString(m)?m.trim():m,x,h))===!0&&b(g,x?x.concat(m):[m])}),f.pop()}}if(!T.isObject(e))throw new TypeError("data must be an object");return b(e),t}function bg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Yp(e,t){this._pairs=[],e&&_c(e,this,t)}const dv=Yp.prototype;dv.append=function(t,n){this._pairs.push([t,n])};dv.toString=function(t){const n=t?function(r){return t.call(this,r,bg)}:bg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Hk(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function fv(e,t,n){if(!t)return e;const r=n&&n.encode||Hk,o=n&&n.serialize;let i;if(o?i=o(t,n):i=T.isURLSearchParams(t)?t.toString():new Yp(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class jg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){T.forEach(this.handlers,function(r){r!==null&&t(r)})}}const pv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Vk=typeof URLSearchParams<"u"?URLSearchParams:Yp,Qk=typeof FormData<"u"?FormData:null,Kk=typeof Blob<"u"?Blob:null,Gk={isBrowser:!0,classes:{URLSearchParams:Vk,FormData:Qk,Blob:Kk},protocols:["http","https","file","blob","url","data"]},Jp=typeof window<"u"&&typeof document<"u",Of=typeof navigator=="object"&&navigator||void 0,qk=Jp&&(!Of||["ReactNative","NativeScript","NS"].indexOf(Of.product)<0),Yk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Jk=Jp&&window.location.href||"http://localhost",Xk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Jp,hasStandardBrowserEnv:qk,hasStandardBrowserWebWorkerEnv:Yk,navigator:Of,origin:Jk},Symbol.toStringTag,{value:"Module"})),Nt={...Xk,...Gk};function Zk(e,t){return _c(e,new Nt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Nt.isNode&&T.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function eP(e){return T.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function tP(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&T.isArray(o)?o.length:a,u?(T.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!l):((!o[a]||!T.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&T.isArray(o[a])&&(o[a]=tP(o[a])),!l)}if(T.isFormData(e)&&T.isFunction(e.entries)){const n={};return T.forEachEntry(e,(r,o)=>{t(eP(r),o,n,0)}),n}return null}function nP(e,t,n){if(T.isString(e))try{return(t||JSON.parse)(e),T.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ha={transitional:pv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=T.isObject(t);if(i&&T.isHTMLForm(t)&&(t=new FormData(t)),T.isFormData(t))return o?JSON.stringify(hv(t)):t;if(T.isArrayBuffer(t)||T.isBuffer(t)||T.isStream(t)||T.isFile(t)||T.isBlob(t)||T.isReadableStream(t))return t;if(T.isArrayBufferView(t))return t.buffer;if(T.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Zk(t,this.formSerializer).toString();if((l=T.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return _c(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),nP(t)):t}],transformResponse:[function(t){const n=this.transitional||ha.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(T.isResponse(t)||T.isReadableStream(t))return t;if(t&&T.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?ce.from(l,ce.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch"],e=>{ha.headers[e]={}});const rP=T.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oP=e=>{const t={};let n,r,o;return e&&e.split(` +`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&rP[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Cg=Symbol("internals");function is(e){return e&&String(e).trim().toLowerCase()}function bl(e){return e===!1||e==null?e:T.isArray(e)?e.map(bl):String(e)}function iP(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const sP=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Iu(e,t,n,r,o){if(T.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!T.isString(t)){if(T.isString(r))return t.indexOf(r)!==-1;if(T.isRegExp(r))return r.test(t)}}function aP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function lP(e,t){const n=T.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Lt{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(l,u,d){const p=is(u);if(!p)throw new Error("header name must be a non-empty string");const f=T.findKey(o,p);(!f||o[f]===void 0||d===!0||d===void 0&&o[f]!==!1)&&(o[f||u]=bl(l))}const a=(l,u)=>T.forEach(l,(d,p)=>i(d,p,u));if(T.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(T.isString(t)&&(t=t.trim())&&!sP(t))a(oP(t),n);else if(T.isHeaders(t))for(const[l,u]of t.entries())i(u,l,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=is(t),t){const r=T.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return iP(o);if(T.isFunction(n))return n.call(this,o,r);if(T.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=is(t),t){const r=T.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Iu(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=is(a),a){const l=T.findKey(r,a);l&&(!n||Iu(r,r[l],l,n))&&(delete r[l],o=!0)}}return T.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Iu(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return T.forEach(this,(o,i)=>{const a=T.findKey(r,i);if(a){n[a]=bl(o),delete n[i];return}const l=t?aP(i):String(i).trim();l!==i&&delete n[i],n[l]=bl(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return T.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&T.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Cg]=this[Cg]={accessors:{}}).accessors,o=this.prototype;function i(a){const l=is(a);r[l]||(lP(o,a),r[l]=!0)}return T.isArray(t)?t.forEach(i):i(t),this}}Lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);T.reduceDescriptors(Lt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});T.freezeMethods(Lt);function Du(e,t){const n=this||ha,r=t||n,o=Lt.from(r.headers);let i=r.data;return T.forEach(e,function(l){i=l.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function mv(e){return!!(e&&e.__CANCEL__)}function Bi(e,t,n){ce.call(this,e??"canceled",ce.ERR_CANCELED,t,n),this.name="CanceledError"}T.inherits(Bi,ce,{__CANCEL__:!0});function gv(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ce("Request failed with status code "+n.status,[ce.ERR_BAD_REQUEST,ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function cP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function uP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),p=r[i];a||(a=d),n[o]=u,r[o]=d;let f=i,h=0;for(;f!==o;)h+=n[f++],f=f%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),d-a{n=p,o=null,i&&(clearTimeout(i),i=null),e.apply(null,d)};return[(...d)=>{const p=Date.now(),f=p-n;f>=r?a(d,p):(o=d,i||(i=setTimeout(()=>{i=null,a(o)},r-f)))},()=>o&&a(o)]}const nc=(e,t,n=3)=>{let r=0;const o=uP(50,250);return dP(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,u=a-r,d=o(u),p=a<=l;r=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:d||void 0,estimated:d&&l&&p?(l-a)/d:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},Sg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},kg=e=>(...t)=>T.asap(()=>e(...t)),fP=Nt.hasStandardBrowserEnv?function(){const t=Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const l=T.isString(a)?o(a):a;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}(),pP=Nt.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];T.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),T.isString(r)&&a.push("path="+r),T.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mP(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function xv(e,t){return e&&!hP(t)?mP(e,t):t}const Pg=e=>e instanceof Lt?{...e}:e;function ko(e,t){t=t||{};const n={};function r(d,p,f){return T.isPlainObject(d)&&T.isPlainObject(p)?T.merge.call({caseless:f},d,p):T.isPlainObject(p)?T.merge({},p):T.isArray(p)?p.slice():p}function o(d,p,f){if(T.isUndefined(p)){if(!T.isUndefined(d))return r(void 0,d,f)}else return r(d,p,f)}function i(d,p){if(!T.isUndefined(p))return r(void 0,p)}function a(d,p){if(T.isUndefined(p)){if(!T.isUndefined(d))return r(void 0,d)}else return r(void 0,p)}function l(d,p,f){if(f in t)return r(d,p);if(f in e)return r(void 0,d)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(d,p)=>o(Pg(d),Pg(p),!0)};return T.forEach(Object.keys(Object.assign({},e,t)),function(p){const f=u[p]||o,h=f(e[p],t[p],p);T.isUndefined(h)&&f!==l||(n[p]=h)}),n}const yv=e=>{const t=ko({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:l}=t;t.headers=a=Lt.from(a),t.url=fv(xv(t.baseURL,t.url),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(T.isFormData(n)){if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[d,...p]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...p].join("; "))}}if(Nt.hasStandardBrowserEnv&&(r&&T.isFunction(r)&&(r=r(t)),r||r!==!1&&fP(t.url))){const d=o&&i&&pP.read(i);d&&a.set(o,d)}return t},gP=typeof XMLHttpRequest<"u",xP=gP&&function(e){return new Promise(function(n,r){const o=yv(e);let i=o.data;const a=Lt.from(o.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=o,p,f,h,b,y;function x(){b&&b(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let j=new XMLHttpRequest;j.open(o.method.toUpperCase(),o.url,!0),j.timeout=o.timeout;function g(){if(!j)return;const v=Lt.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),P={data:!l||l==="text"||l==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:v,config:e,request:j};gv(function(R){n(R),x()},function(R){r(R),x()},P),j=null}"onloadend"in j?j.onloadend=g:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(g)},j.onabort=function(){j&&(r(new ce("Request aborted",ce.ECONNABORTED,e,j)),j=null)},j.onerror=function(){r(new ce("Network Error",ce.ERR_NETWORK,e,j)),j=null},j.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const P=o.transitional||pv;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),r(new ce(C,P.clarifyTimeoutError?ce.ETIMEDOUT:ce.ECONNABORTED,e,j)),j=null},i===void 0&&a.setContentType(null),"setRequestHeader"in j&&T.forEach(a.toJSON(),function(C,P){j.setRequestHeader(P,C)}),T.isUndefined(o.withCredentials)||(j.withCredentials=!!o.withCredentials),l&&l!=="json"&&(j.responseType=o.responseType),d&&([h,y]=nc(d,!0),j.addEventListener("progress",h)),u&&j.upload&&([f,b]=nc(u),j.upload.addEventListener("progress",f),j.upload.addEventListener("loadend",b)),(o.cancelToken||o.signal)&&(p=v=>{j&&(r(!v||v.type?new Bi(null,e,j):v),j.abort(),j=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const m=cP(o.url);if(m&&Nt.protocols.indexOf(m)===-1){r(new ce("Unsupported protocol "+m+":",ce.ERR_BAD_REQUEST,e));return}j.send(i||null)})},yP=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(d){if(!o){o=!0,l();const p=d instanceof Error?d:this.reason;r.abort(p instanceof ce?p:new Bi(p instanceof Error?p.message:p))}};let a=t&&setTimeout(()=>{a=null,i(new ce(`timeout ${t} of ms exceeded`,ce.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>T.asap(l),u}},vP=function*(e,t){let n=e.byteLength;if(n{const o=wP(e,t);let i=0,a,l=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:d,value:p}=await o.next();if(d){l(),u.close();return}let f=p.byteLength;if(n){let h=i+=f;n(h)}u.enqueue(new Uint8Array(p))}catch(d){throw l(d),d}},cancel(u){return l(u),o.return()}},{highWaterMark:2})},Mc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",vv=Mc&&typeof ReadableStream=="function",jP=Mc&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},CP=vv&&wv(()=>{let e=!1;const t=new Request(Nt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Rg=64*1024,Tf=vv&&wv(()=>T.isReadableStream(new Response("").body)),rc={stream:Tf&&(e=>e.body)};Mc&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!rc[t]&&(rc[t]=T.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ce(`Response type '${t}' is not supported`,ce.ERR_NOT_SUPPORT,r)})})})(new Response);const SP=async e=>{if(e==null)return 0;if(T.isBlob(e))return e.size;if(T.isSpecCompliantForm(e))return(await new Request(Nt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(T.isArrayBufferView(e)||T.isArrayBuffer(e))return e.byteLength;if(T.isURLSearchParams(e)&&(e=e+""),T.isString(e))return(await jP(e)).byteLength},kP=async(e,t)=>{const n=T.toFiniteNumber(e.getContentLength());return n??SP(t)},PP=Mc&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:u,responseType:d,headers:p,withCredentials:f="same-origin",fetchOptions:h}=yv(e);d=d?(d+"").toLowerCase():"text";let b=yP([o,i&&i.toAbortSignal()],a),y;const x=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let j;try{if(u&&CP&&n!=="get"&&n!=="head"&&(j=await kP(p,r))!==0){let P=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(T.isFormData(r)&&(S=P.headers.get("content-type"))&&p.setContentType(S),P.body){const[R,I]=Sg(j,nc(kg(u)));r=Eg(P.body,Rg,R,I)}}T.isString(f)||(f=f?"include":"omit");const g="credentials"in Request.prototype;y=new Request(t,{...h,signal:b,method:n.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:g?f:void 0});let m=await fetch(y);const v=Tf&&(d==="stream"||d==="response");if(Tf&&(l||v&&x)){const P={};["status","statusText","headers"].forEach(L=>{P[L]=m[L]});const S=T.toFiniteNumber(m.headers.get("content-length")),[R,I]=l&&Sg(S,nc(kg(l),!0))||[];m=new Response(Eg(m.body,Rg,R,()=>{I&&I(),x&&x()}),P)}d=d||"text";let C=await rc[T.findKey(rc,d)||"text"](m,e);return!v&&x&&x(),await new Promise((P,S)=>{gv(P,S,{data:C,headers:Lt.from(m.headers),status:m.status,statusText:m.statusText,config:e,request:y})})}catch(g){throw x&&x(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new ce("Network Error",ce.ERR_NETWORK,e,y),{cause:g.cause||g}):ce.from(g,g&&g.code,e,y)}}),Nf={http:Uk,xhr:xP,fetch:PP};T.forEach(Nf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ag=e=>`- ${e}`,EP=e=>T.isFunction(e)||e===null||e===!1,bv={getAdapter:e=>{e=T.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : +`+i.map(Ag).join(` +`):" "+Ag(i[0]):"as no adapter specified";throw new ce("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Nf};function Ou(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Bi(null,e)}function Ig(e){return Ou(e),e.headers=Lt.from(e.headers),e.data=Du.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bv.getAdapter(e.adapter||ha.adapter)(e).then(function(r){return Ou(e),r.data=Du.call(e,e.transformResponse,r),r.headers=Lt.from(r.headers),r},function(r){return mv(r)||(Ou(e),r&&r.response&&(r.response.data=Du.call(e,e.transformResponse,r.response),r.response.headers=Lt.from(r.response.headers))),Promise.reject(r)})}const jv="1.7.7",Xp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Dg={};Xp.transitional=function(t,n,r){function o(i,a){return"[Axios v"+jv+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,l)=>{if(t===!1)throw new ce(o(a," has been removed"+(n?" in "+n:"")),ce.ERR_DEPRECATED);return n&&!Dg[a]&&(Dg[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}};function RP(e,t,n){if(typeof e!="object")throw new ce("options must be an object",ce.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const l=e[i],u=l===void 0||a(l,i,e);if(u!==!0)throw new ce("option "+i+" must be "+u,ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ce("Unknown option "+i,ce.ERR_BAD_OPTION)}}const Lf={assertOptions:RP,validators:Xp},or=Lf.validators;class go{constructor(t){this.defaults=t,this.interceptors={request:new jg,response:new jg}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ko(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Lf.assertOptions(r,{silentJSONParsing:or.transitional(or.boolean),forcedJSONParsing:or.transitional(or.boolean),clarifyTimeoutError:or.transitional(or.boolean)},!1),o!=null&&(T.isFunction(o)?n.paramsSerializer={serialize:o}:Lf.assertOptions(o,{encode:or.function,serialize:or.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&T.merge(i.common,i[n.method]);i&&T.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=Lt.concat(a,i);const l=[];let u=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(u=u&&x.synchronous,l.unshift(x.fulfilled,x.rejected))});const d=[];this.interceptors.response.forEach(function(x){d.push(x.fulfilled,x.rejected)});let p,f=0,h;if(!u){const y=[Ig.bind(this),void 0];for(y.unshift.apply(y,l),y.push.apply(y,d),h=y.length,p=Promise.resolve(n);f{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{r.subscribe(l),i=l}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,l){r.reason||(r.reason=new Bi(i,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Zp(function(o){t=o}),cancel:t}}}function AP(e){return function(n){return e.apply(null,n)}}function IP(e){return T.isObject(e)&&e.isAxiosError===!0}const _f={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_f).forEach(([e,t])=>{_f[t]=e});function Cv(e){const t=new go(e),n=ev(go.prototype.request,t);return T.extend(n,go.prototype,t,{allOwnKeys:!0}),T.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Cv(ko(e,o))},n}const Xe=Cv(ha);Xe.Axios=go;Xe.CanceledError=Bi;Xe.CancelToken=Zp;Xe.isCancel=mv;Xe.VERSION=jv;Xe.toFormData=_c;Xe.AxiosError=ce;Xe.Cancel=Xe.CanceledError;Xe.all=function(t){return Promise.all(t)};Xe.spread=AP;Xe.isAxiosError=IP;Xe.mergeConfig=ko;Xe.AxiosHeaders=Lt;Xe.formToJSON=e=>hv(T.isHTMLForm(e)?new FormData(e):e);Xe.getAdapter=bv.getAdapter;Xe.HttpStatusCode=_f;Xe.default=Xe;const re=Xe.create({baseURL:"http://15.164.5.135:8080",timeout:5e3,headers:{"Content-Type":"application/json"}});re.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const DP=async e=>{try{const t=`/goodbuyUs/product?postid=${e}`;return(await re.get(t)).data}catch{throw new Error("상품 정보를 가져오는 데 실패했습니다.")}},OP=async()=>{try{return(await re.get("/goodbuyUs")).data}catch{throw new Error("상품 정보를 가져오는 데 실패했습니다.")}},ma=e=>Gp({queryKey:["product",e],queryFn:()=>DP(e)}),Sv=()=>Gp({queryKey:["products"],queryFn:OP}),Ro=({isLoading:e,isError:t,children:n})=>e?s.jsx("div",{children:"로딩 중..."}):t?s.jsx("div",{children:"잠시 후 다시 시도해주세요."}):s.jsx(s.Fragment,{children:n}),TP=({popular:e,category:t})=>{if(!e)return s.jsx("div",{children:"No popular product available"});const{data:n,isLoading:r,isError:o}=ma(e.id);return n?s.jsx(s.Fragment,{children:s.jsx(Ro,{isLoading:r,isError:o,children:s.jsx(NP,{children:s.jsxs(LP,{children:[s.jsx(_P,{children:s.jsx(MP,{src:n.url||In,alt:n.name,onError:i=>{i.currentTarget.src=In}})}),s.jsxs($P,{children:[s.jsx(zP,{children:s.jsx(da,{rating:n.rating})}),s.jsxs(FP,{children:[s.jsxs(UP,{children:[s.jsx(BP,{children:n.name}),s.jsx(WP,{children:t})]}),s.jsx(HP,{children:n.description})]})]})]})})})}):s.jsx("div",{children:"Product data is not available"})},NP=c.div` + width: 80%; + margin: 0 auto; + display: block; +`,LP=c.div` + height: 300px; + width: 1100px; + display: flex; + background-color: #f5f5f5; + border-radius: 12px; + overflow: hidden; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + transition: all 0.3s ease-in-out; + &:hover { + cursor: pointer; + transform: translateY(-5px); + } + @media (min-width: 768px) and (max-width: 1024px) { + width: 750px; + height: 300px; + } + @media (min-width: 576px) and (max-width: 767px) { + width: 550px; + height: 200px; + } +`,_P=c.div` + width: 300px; + height: 300px; + display: flex; + justify-content: center; + align-items: center; + background-color: white; + @media (min-width: 576px) and (max-width: 767px) { + width: 200px; + height: 200px; + } +`,MP=c.img` + height: 300px; + width: auto; + object-fit: contain; +`,$P=c.div` + background: linear-gradient(to top, rgba(155, 155, 155, 0.7), transparent); + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: center; + padding: 0 50px; + background-color: #f5f5f5; + position: relative; +`,zP=c.div` + position: absolute; + top: 20px; + right: 20px; + font-size: 20px; + @media (min-width: 576px) and (max-width: 767px) { + font-size: 15px; + top: 10px; + } +`,FP=c.div` + display: flex; + flex-direction: column; + width: 100%; +`,UP=c.div` + display: flex; + align-items: baseline; + margin-bottom: 15px; + @media (min-width: 768px) and (max-width: 1024px) { + flex-direction: column; + } + @media (min-width: 576px) and (max-width: 767px) { + flex-direction: column; + } +`,BP=c.h3` + font-size: 24px; + font-weight: 700; + color: #333; + margin-right: 15px; + @media (min-width: 576px) and (max-width: 767px) { + font-size: 19px; + } +`,WP=c.p` + font-size: 16px; + color: #666; + @media (min-width: 768px) and (max-width: 1024px) { + margin-top: -10px; + } + @media (min-width: 576px) and (max-width: 767px) { + font-size: 12px; + } +`,HP=c.p` + font-size: 14px; + color: #555; + line-height: 1.6; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + @media (min-width: 768px) and (max-width: 1024px) { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + } + @media (min-width: 576px) and (max-width: 767px) { + display: none; + } +`,VP=({categories:e,products:t})=>{if(!t)return s.jsx("div",{children:"No products available"});const[n,r]=w.useState(!1),[o,i]=w.useState("LIFESTYLE"),a=()=>r(!n),l=p=>{i(p),r(!1)},u=w.useMemo(()=>(t==null?void 0:t.filter(p=>p.category.toLowerCase().includes(o.toLowerCase())))||[],[o,t]),d=w.useMemo(()=>[...u].sort(()=>.5-Math.random()).slice(0,8),[u]);return s.jsxs(QP,{children:[s.jsxs(b2,{children:[s.jsx(KP,{onClick:a,children:o}),s.jsx(j2,{expanded:n,children:e.map(p=>s.jsx(C2,{selected:p==o,onClick:()=>l(p),children:p},p))})]}),s.jsx(R1,{children:d.map(p=>s.jsxs(A1,{children:[s.jsxs(I1,{to:`/products/${p.id}`,children:[s.jsx(D1,{src:p.url||In,alt:p.name,onError:f=>{f.currentTarget.src=In}}),s.jsxs(O1,{children:[s.jsx(T1,{children:p.name}),s.jsxs(N1,{children:[" ",s.jsx(da,{rating:p.rating})]}),s.jsxs(L1,{children:[s.jsxs(_1,{children:[p.originalprice,"원"]}),s.jsxs(M1,{children:[p.discountprice,"원"]})]})]})]}),s.jsx($1,{likes:p.likes})]},p.id))}),s.jsx(z1,{children:s.jsx(F1,{to:`/products?category=${o}`,children:"더보기"})})]})},QP=c.div` + display: flex; + flex-wrap: wrap; + width: 80%; + height: auto; + margin: 0 auto; +`,KP=c.h2` + text-decoration: underline; + margin-left: 10px; + margin-bottom: 20px; + font-size: 1.5rem; + color: #333; + &:hover { + cursor: pointer; + } +`;var kv={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Og=ut.createContext&&ut.createContext(kv),GP=["attr","size","title"];function qP(e,t){if(e==null)return{};var n=YP(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YP(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function oc(){return oc=Object.assign?Object.assign.bind():function(e){for(var t=1;tut.createElement(t.tag,ic({key:n},t.attr),Pv(t.child)))}function xn(e){return t=>ut.createElement(eE,oc({attr:ic({},e.attr)},t),Pv(e.child))}function eE(e){var t=n=>{var{attr:r,size:o,title:i}=e,a=qP(e,GP),l=o||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),ut.createElement("svg",oc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:ic(ic({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&ut.createElement("title",null,i),e.children)};return Og!==void 0?ut.createElement(Og.Consumer,null,n=>t(n)):t(kv)}function tE(e){return xn({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M177 255.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 351.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 425.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1zm-34-192L7 199.7c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l96.4-96.4 96.4 96.4c9.4 9.4 24.6 9.4 33.9 0l22.6-22.6c9.4-9.4 9.4-24.6 0-33.9l-136-136c-9.2-9.4-24.4-9.4-33.8 0z"},child:[]}]})(e)}function $c(e){return xn({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"},child:[]}]})(e)}function zc(e){return xn({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"},child:[]}]})(e)}function eh(e){return xn({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M576 64H205.26A63.97 63.97 0 0 0 160 82.75L9.37 233.37c-12.5 12.5-12.5 32.76 0 45.25L160 429.25c12 12 28.28 18.75 45.25 18.75H576c35.35 0 64-28.65 64-64V128c0-35.35-28.65-64-64-64zm-84.69 254.06c6.25 6.25 6.25 16.38 0 22.63l-22.62 22.62c-6.25 6.25-16.38 6.25-22.63 0L384 301.25l-62.06 62.06c-6.25 6.25-16.38 6.25-22.63 0l-22.62-22.62c-6.25-6.25-6.25-16.38 0-22.63L338.75 256l-62.06-62.06c-6.25-6.25-6.25-16.38 0-22.63l22.62-22.62c6.25-6.25 16.38-6.25 22.63 0L384 210.75l62.06-62.06c6.25-6.25 16.38-6.25 22.63 0l22.62 22.62c6.25 6.25 6.25 16.38 0 22.63L429.25 256l62.06 62.06z"},child:[]}]})(e)}function Ev(e){return xn({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"},child:[]}]})(e)}function th(e){return xn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zM124 296c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h264c6.6 0 12 5.4 12 12v56c0 6.6-5.4 12-12 12H124z"},child:[]}]})(e)}function nE(e){return xn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M290.74 93.24l128.02 128.02-277.99 277.99-114.14 12.6C11.35 513.54-1.56 500.62.14 485.34l12.7-114.22 277.9-277.88zm207.2-19.06l-60.11-60.11c-18.75-18.75-49.16-18.75-67.91 0l-56.55 56.55 128.02 128.02 56.55-56.55c18.75-18.76 18.75-49.16 0-67.91z"},child:[]}]})(e)}function nh(e){return xn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"},child:[]}]})(e)}function rE(e){return xn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function oE(e){return xn({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"},child:[]}]})(e)}function iE(e){return xn({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 32C114.6 32 0 125.1 0 240c0 47.6 19.9 91.2 52.9 126.3C38 405.7 7 439.1 6.5 439.5c-6.6 7-8.4 17.2-4.6 26S14.4 480 24 480c61.5 0 110-25.7 139.1-46.3C192 442.8 223.2 448 256 448c141.4 0 256-93.1 256-208S397.4 32 256 32zm0 368c-26.7 0-53.1-4.1-78.4-12.1l-22.7-7.2-19.5 13.8c-14.3 10.1-33.9 21.4-57.5 29 7.3-12.1 14.4-25.7 19.9-40.2l10.6-28.1-20.6-21.8C69.7 314.1 48 282.2 48 240c0-88.2 93.3-160 208-160s208 71.8 208 160-93.3 160-208 160z"},child:[]}]})(e)}const rh=()=>{const[e,t]=w.useState(!1);w.useEffect(()=>{const r=()=>{window.scrollY>200?t(!0):t(!1)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[]);const n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return e?s.jsx(sE,{onClick:n,children:s.jsx(tE,{})}):null},sE=c.button` + position: fixed; + bottom: 20px; + right: 20px; + width: 50px; + height: 50px; + background-color: #000; + color: #fff; + border: 1px solid #333; + border-radius: 50%; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + cursor: pointer; + font-size: 1.5rem; + display: flex; + justify-content: center; + align-items: center; + transition: background-color 0.3s; + + &:hover { + background-color: #333; + } +`,aE=["FOOD","LIFESTYLE","FASHION"],lE=()=>{const{data:e,isLoading:t,isError:n}=Sv(),r=e==null?void 0:e.filter(i=>i.available===!0&&new Date(i.deadline)>new Date),o=r==null?void 0:r.sort((i,a)=>a.currentStock-i.currentStock)[0];return s.jsx(s.Fragment,{children:s.jsxs(Ro,{isLoading:t,isError:n,children:[s.jsx(Tu,{children:s.jsx(Nu,{children:s.jsxs(cE,{to:`/products/${o==null?void 0:o.id}`,children:[" ",s.jsx(TP,{popular:o,category:o==null?void 0:o.category})]})})}),s.jsx(Tu,{children:s.jsx(Nu,{children:s.jsx(S2,{products:r})})}),s.jsxs(Tu,{children:[s.jsx(Nu,{children:s.jsx(VP,{categories:aE,products:r})}),s.jsx(rh,{})]})]})})},cE=c(An)` + text-decoration: none; + color: inherit; + width: 100%; + &:link, + &:visited, + &:hover, + &:active { + color: inherit; + text-decoration: none; + } +`,Tu=c.div` + display: flex; + margin-top: 5vh; + align-items: center; + justify-content: center; + width: 100%; + max-width: 1400px; + margin-left: auto; + margin-right: auto; +`,Nu=c.div` + display: flex; + align-items: center; + width: 100%; +`,Fc=({categories:e,selectedCategory:t,onCategoryChange:n,title:r="카테고리"})=>{const[o,i]=w.useState(t);w.useEffect(()=>{i(t)},[t]);const a=l=>{i(l),n(l)};return s.jsxs(uE,{children:[s.jsx(dE,{children:r}),e.map(l=>s.jsx(fE,{active:l.id===o,onClick:()=>a(l.id),children:l.name},l.id))]})},uE=c.div` + display: flex; + flex-wrap: wrap; + gap: 5px 10px; + width: 100%; + justify-content: flex-start; + align-items: center; +`,dE=c.h2` + font-size: 1.2rem; + font-weight: bold; + margin: 0 50px 0 0; + white-space: nowrap; /* 텍스트 줄바꿈 방지 */ +`,fE=c.div` + padding: 1rem 1rem; + font-weight: ${({active:e})=>e?"bold":"normal"}; + cursor: pointer; + position: relative; + + &::after { + content: ''; + display: ${({active:e})=>e?"block":"none"}; + height: 2px; + background-color: black; + width: 100%; + position: absolute; + bottom: 0; + left: 0; + } +`,_t={NOT_APPROVED:"NOT_APPROVED",APPROVED:"APPROVED",REJECTED:"REJECTED",PAYMENT_STANDBY:"PAYMENT_STANDBY",PAYMENT_COMPLETED:"PAYMENT_COMPLETED",DELECTED:"DELECTED"},Rv={communityPostId:0,title:"",description:"",imageUrls:[],productUrl:"",userId:"",nickname:"",currentQuantity:0,availableNumber:0,createdAt:"",closeAt:"",period:0,totalAmount:0,unitAmount:0,category:"",participants:[],comments:[],status:"NOT_APPROVED",cancelledUsers:[]},pE=async(e,t)=>(await re.get("/post",{params:{category:e,search:t}})).data.filter(r=>r.status!=="DELECTED"),hE=async e=>(await re.post("/post",e)).data,sc=async(e,t,n)=>{const o=(await re.get(`/post/${e}`)).data;switch(t){case"APPROVED":if(o.status==="NOT_APPROVED"||o.status==="REJECTED"){const i=o.title.startsWith("(수정요망)")?o.title.replace(/^\(수정요망\)/,"").trim():o.title,a=new Date().toISOString(),l=new Date(new Date(a).getTime()+0*24*60*60*1e3).toISOString();return(await re.patch(`/post/${e}/status`,{status:t,title:i,createdAt:a,closeAt:l})).data}else throw new Error("현재 상태에서 APPROVED로 변경할 수 없습니다.");case"REJECTED":if(o.status==="NOT_APPROVED"||o.status==="REJECTED"){const i=o.title.startsWith("(수정요망)")?o.title:`(수정요망)${o.title}`;return(await re.patch(`/post/${e}/status`,{status:t,title:i})).data}else throw new Error("REJECTED 상태로 변경할 수 없습니다.");case"PAYMENT_STANDBY":if(o.status==="APPROVED"&&o.currentQuantity===o.availableNumber){const i=new Date().toISOString();return(await re.patch(`/post/${e}/status`,{status:t,stateUpdatedAt:i})).data}else throw new Error("PAYMENT_STANDBY 상태로 변경할 수 없습니다.");case"PAYMENT_COMPLETED":{if(o.participants.every(a=>a.isPaymentCompleted&&!a.isCancelled))return(await re.patch(`/post/${e}/status`,{status:t})).data;throw new Error("PAYMENT_COMPLETED 상태로 변경할 수 없습니다.")}case"DELECTED":{if(o.status==="APPROVED"||o.status==="PAYMENT_STANDBY")return(await re.patch(`/post/${e}/status`,{status:t})).data;throw new Error("DELETED 상태로 변경할 수 없습니다.")}default:throw new Error("잘못된 상태 변경 요청입니다.")}},si=async e=>(await re.get(`/post/${e}`)).data,mE=async(e,t)=>(await re.patch(`/mypage/post/${e}`,t)).data,Av=async e=>{await re.delete(`/post/${e}`)},gE=async(e,t,n)=>{await re.post(`/community/post/${e}/join`,{userId:t,quantity:n})},xE=async(e,t)=>{await re.post(`community/post/${e}/cancel`,{userId:t})},yE=async(e,t,n,r)=>{await re.post(`/post/${e}/comments`,{userId:t,userNickname:n,content:r})},vE=async(e,t)=>{await re.delete(`/post/${e}/comments/${t}`)},wE=async(e,t,n)=>{await re.put(`/post/${e}/comments/${t}`,{content:n})},bE=({onClick:e})=>s.jsxs(jE,{onClick:e,children:[s.jsx(nE,{})," 글 작성"]}),jE=c.button` + padding: 8px 16px; + font-size: 1rem; + font-weight: bold; + color: #fff; + background-color: #000; + border: none; + border-radius: 4px; + cursor: pointer; + + &:hover { + background-color: #333; + } +`,CE=({placeholder:e="검색어를 입력해주세요.",value:t,onChange:n,onSearch:r})=>{const o=i=>{i.key==="Enter"&&r()};return s.jsxs(SE,{children:[s.jsx(kE,{type:"text",placeholder:e,value:t,onChange:n,onKeyDown:o}),s.jsx(PE,{onClick:r})," "]})},SE=c.div` + display: flex; + align-items: center; + padding: 1.5px; + border: 1px solid #ddd; + border-radius: 4px; + background-color: #fff; + width: 100%; + max-width: 280px; + + &:focus-within { + border-color: #000; + } +`,kE=c.input` + flex: 1; + border: none; + font-size: 1rem; + padding: 8px; + outline: none; + + &::placeholder { + color: #aaa; + } +`,PE=c(rE)` + color: #333; + margin: 0 8px; + font-size: 1.2rem; + cursor: pointer; /* 클릭 가능 */ +`,oh=({currentPage:e,totalPages:t,onPageChange:n})=>t<=1?null:s.jsx(EE,{children:Array.from({length:t},(r,o)=>s.jsx(RE,{active:e===o+1,onClick:()=>n(o+1),children:o+1},o+1))}),EE=c.div` + display: flex; + justify-content: center; + margin-top: 16px; + gap: 8px; +`,RE=c.button.withConfig({shouldForwardProp:e=>e!=="active"})` + padding: 8px 16px; + font-size: 1rem; + font-weight: 500; + border-radius: 8px; + border: 1px solid #fff; + background-color: ${({active:e})=>e?"#000":"#fff"}; + color: ${({active:e})=>e?"#fff":"#333"}; + cursor: pointer; + + &:hover { + background-color: #333; + color: #fff; + } +`,Lu=6,Iv=({selectedCategory:e,hideWriteButton:t})=>{const n=Ee(),[r,o]=w.useState([]),[i,a]=w.useState(1),[l,u]=w.useState(""),[d,p]=w.useState(""),[f,h]=w.useState(!1),b=async()=>{try{h(!0);const P=await pE(e,d);o(P)}catch(P){console.error("게시물 조회 중 오류 발생:",P),alert("게시물 조회 중 오류가 발생했습니다. 다시 시도해주세요.")}finally{h(!1)}};w.useEffect(()=>{b()},[e,d]);const y=r.filter(P=>e==="NOT_APPROVED"?P.status==="NOT_APPROVED"||P.status==="REJECTED":P.category===e&&P.status!=="NOT_APPROVED"&&P.status!=="REJECTED").sort((P,S)=>new Date(S.createdAt).getTime()-new Date(P.createdAt).getTime()),x=Math.ceil(y.length/Lu),j=(i-1)*Lu,g=y.slice(j,j+Lu),m=()=>{p(l),a(1)};w.useEffect(()=>{p(""),u(""),a(1)},[e]);const v=()=>{n("/community/post/create",{state:{selectedCategory:e}})},C=P=>{e==="NOT_APPROVED"?n(`/admin/post/approval/${P}`,{state:{communityPostId:P}}):n(`/community/post/${P}`)};return s.jsxs(AE,{children:[s.jsxs(IE,{children:[!t&&s.jsx(bE,{onClick:v}),s.jsx(CE,{value:l,onChange:P=>u(P.target.value),onSearch:m})]}),f?s.jsx(_u,{children:"게시물을 불러오는 중입니다..."}):y.length===0?s.jsx(_u,{children:"선택된 카테고리에 해당하는 게시글이 없습니다."}):g.length===0?s.jsxs(_u,{children:["'",d,"'의 검색 결과가 존재하지 않습니다."]}):g.map(P=>s.jsxs(DE,{onClick:()=>C(P.communityPostId),children:[s.jsx(OE,{src:P.imageUrls[0],alt:P.title}),s.jsxs(TE,{children:[s.jsx(NE,{children:P.title}),s.jsxs(_E,{children:[s.jsx(ME,{children:P.nickname}),s.jsxs($E,{children:[s.jsx(zE,{children:new Date(P.createdAt).toLocaleString("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})}),"~",s.jsx(FE,{children:new Date(P.closeAt).toLocaleString("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1})})]}),s.jsxs(UE,{children:["참여 현황: ",P.currentQuantity," / ",P.availableNumber]})]}),s.jsx(LE,{children:P.description})]})]},P.communityPostId)),x>1&&s.jsx(oh,{currentPage:i,totalPages:x,onPageChange:P=>a(P)})]})},AE=c.div` + display: flex; + flex-direction: column; + margin: 20px auto; + max-width: 800px; +`,IE=c.div` + display: flex; + justify-content: flex-end; /* 오른쪽 정렬 */ + align-items: center; + margin-bottom: 16px; + gap: 20px; /* 버튼과 검색바 사이의 간격 */ +`,DE=c.div` + display: flex; + flex-direction: row; + align-items: flex-start; + border: 1px solid #e0e0e0; + border-radius: 8px; + margin-bottom: 16px; + padding: 16px; + background-color: #fff; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + transition: box-shadow 0.3s ease; + cursor: pointer; + + &:hover { + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); + } +`,OE=c.img` + width: 172px; + height: 100px; + object-fit: cover; + border-radius: 8px; + margin-right: 16px; +`,TE=c.div` + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: flex-start; + height: 100%; + padding: 4px 0; +`,NE=c.h3` + font-size: 1.4rem; + font-weight: 700; + margin-top: 0; + margin-bottom: 8px; + color: #333; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; +`,LE=c.p` + font-size: 0.9rem; + margin-bottom: 0; + color: #555; + line-height: 1.5; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; +`,_E=c.div` + display: flex; + flex-wrap: wrap; + gap: 15px; + font-size: 0.9rem; + color: #777; +`,ME=c.span` + font-weight: 400; +`,$E=c.span` + font-weight: 400; +`,zE=c.span` + font-weight: 400; + margin-right: 10px; +`,FE=c.span` + font-weight: 400; + margin-left: 10px; +`,UE=c.div` + font-weight: 400; +`,_u=c.p` + text-align: center; + color: #888; + font-size: 1.2rem; + padding: 20px; +`,ih=[{id:"LIFESTYLE",name:"생활용품"},{id:"FOOD",name:"식료품"},{id:"FASHION",name:"패션/의류"},{id:"ELECTRONICS",name:"전자제품"},{id:"FURNITURE",name:"가구/인테리어"},{id:"KIDS",name:"유아/아동용품"},{id:"SPORTS",name:"스포츠/레저"}],BE=()=>{var o;const t=((o=nt().state)==null?void 0:o.selectedCategory)||"LIFESTYLE",[n,r]=w.useState(t);return s.jsx("div",{children:s.jsx(WE,{children:s.jsxs(HE,{children:[s.jsx(VE,{children:"공구 모집 및 진행"}),s.jsx(QE,{children:s.jsx(Fc,{categories:ih,selectedCategory:n,onCategoryChange:i=>r(i)})}),s.jsx(Iv,{selectedCategory:n,posts:[]})]})})})},WE=c.div` + display: flex; + justify-content: center; + padding: 20px; +`,HE=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,VE=c.h1` + font-size: 1.8rem; + font-weight: bold; + margin-bottom: 1.5rem; + text-align: left; +`,QE=c.div` + display: flex; + justify-content: flex-end; + margin-left: 50px; +`,KE=()=>{var Ce;const e=Ee(),t=nt(),n=Oc(),r=((Ce=t.state)==null?void 0:Ce.selectedCategory)||"LIFESTYLE",[o,i]=w.useState(r),[a,l]=w.useState(""),[u,d]=w.useState(""),[p,f]=w.useState(!1),[h,b]=w.useState("마감 기한 "),[y,x]=w.useState(""),[j,g]=w.useState(""),[m,v]=w.useState([]),[C,P]=w.useState(-1),[S,R]=w.useState(""),[I,L]=w.useState(!1),B=Yr({mutationFn:M=>hE(M),onSuccess:()=>{n.invalidateQueries({queryKey:["postList"]}),alert("포스트가 작성되었습니다. 관리자의 승인을 대기 중입니다."),e("/community/post")},onError:M=>{console.error("포스트 생성 중 오류 발생:",M),alert("포스트 생성에 실패했습니다.")}}),N=()=>{f(!p)},O=M=>{b(M),f(!1)},$=async()=>{if(!y||!a||!u||h==="마감 기한"||m.length===0||!S||!j){alert("모든 필수 정보를 입력하세요.");return}if(!be(S)){L(!0);return}const M=parseInt(u.replace(/,/g,""),10),U=parseInt(a,10),ae=h!=="마감 기한"?parseInt(h.replace(/[^0-9]/g,""),10):0;if(ae<=0){alert("마감 기한을 올바르게 설정하세요.");return}const Ke={title:y.trim(),description:j.trim(),imageUrls:m,category:o,currentQuantity:0,availableNumber:U,totalAmount:M,unitAmount:Math.floor(M/U),productUrl:S.trim(),period:ae,status:"NOT_APPROVED"};B.mutate(Ke)},F=M=>{const U=M.target.value.replace(/[^0-9]/g,""),ae=Number(U);U===""||ae<=0?l(""):l(U)},se=M=>{const U=M.target.value.replace(/[^0-9]/g,""),ae=Number(U);U===""||ae<=0?d(""):d(oe(U))},he=()=>{e("/community/post",{state:{selectedCategory:o}})},oe=M=>{const U=M.replace(/\D/g,"");return new Intl.NumberFormat().format(Number(U))},W=u&&a?oe(String(Math.floor(parseInt(u.replace(/,/g,""),10)/parseInt(a,10)))):"자동 계산",H=M=>{if(M.target.files){const U=Array.from(M.target.files).map(ae=>URL.createObjectURL(ae));v(ae=>[...ae,...U]),P(m.length)}},X=()=>{C>=0&&v(M=>{const U=M.filter((ae,Ke)=>Ke!==C);if(U.length>0){const ae=C>=U.length?C-1:C;P(ae)}else P(-1);return U})},ie=()=>{CM+1):C===m.length-1&&P(-1)},ne=()=>{P(C===-1?m.length-1:M=>Math.max(M-1,0))},Ve=M=>{P(M)},be=M=>!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|(\\d{1,3}\\.){3}\\d{1,3})(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(M),Ne=M=>{R(M.target.value),L(!be(M.target.value))};return s.jsx("div",{children:s.jsx(GE,{children:s.jsxs(qE,{children:[s.jsx(YE,{children:"공구 모집 및 진행"}),s.jsxs(JE,{children:[s.jsxs(XE,{children:[s.jsxs(ZE,{children:[s.jsxs(e3,{children:[s.jsx(o3,{children:m.length>0&&(C>0||C===-1)&&s.jsx(s3,{onClick:ne,children:s.jsx($c,{size:20})})}),C===-1?s.jsxs(n3,{children:[s.jsx(nh,{size:30}),"이미지 추가",s.jsx("input",{type:"file",multiple:!0,accept:"image/*",onChange:H})]}):s.jsxs(t3,{children:[s.jsx("img",{src:m[C],alt:"이미지 미리보기"}),s.jsx(r3,{onClick:X,children:s.jsx(th,{size:30})})]}),s.jsx(i3,{children:m.length>0&&C!==-1&&s.jsx(a3,{onClick:ie,children:s.jsx(zc,{size:20})})})]}),s.jsx(l3,{children:m.length>0&&s.jsx(c3,{children:m.map((M,U)=>s.jsx("span",{className:C===U?"active":"",onClick:()=>Ve(U)},U))})}),s.jsxs(u3,{children:[s.jsxs(d3,{children:[s.jsx(_o,{htmlFor:"urlInput",children:"URL 주소"}),s.jsx(f3,{id:"urlInput",type:"text",placeholder:"상품 관련 URL 주소를 입력해주세요.",value:S,onChange:Ne,isError:I,spellCheck:!1})]}),I&&s.jsx(p3,{children:"올바른 URL을 입력해주세요."})]})]}),s.jsxs(h3,{children:[s.jsxs(m3,{children:[s.jsxs(ss,{children:[s.jsx(_o,{children:"제목"}),s.jsx(g3,{placeholder:"제목을 입력해주세요.",value:y,onChange:M=>x(M.target.value),spellCheck:!1})]}),s.jsx(x3,{children:s.jsx(y3,{title:"카테고리 선택",categories:ih,selectedCategory:o,onCategoryChange:M=>i(M)})})]}),s.jsxs(v3,{children:[s.jsxs(ss,{children:[s.jsx(_o,{children:"참여 필요 수량 선택"}),s.jsx(Mu,{type:"text",placeholder:"수량 입력",value:a,onChange:F})]}),s.jsxs(ss,{children:[s.jsx(_o,{children:"모집 마감 기한 설정"}),s.jsxs(w3,{children:[s.jsxs(b3,{onClick:N,children:[h,s.jsx(Ev,{})]}),p&&s.jsx(j3,{children:Array.from({length:7},(M,U)=>s.jsxs(C3,{onClick:()=>O(`${U+1}일 `),isSelected:h===`${U+1}일 `,children:[U+1,"일"]},U))})]})]}),s.jsxs(S3,{children:[s.jsxs(ss,{children:[s.jsx(_o,{children:"총 가격 설정"}),s.jsx(Mu,{type:"text",placeholder:"총 가격 입력",value:u,onChange:se})," 원"]}),s.jsxs(ss,{children:[s.jsx(_o,{children:"개당 가격"}),s.jsx(Mu,{disabled:!0,value:W})," 원"]})]})]})]})]}),s.jsx(k3,{children:s.jsx(P3,{placeholder:"내용을 입력해주세요.",value:j,onChange:M=>g(M.target.value),spellCheck:!1})}),s.jsxs(E3,{children:[s.jsx(Ng,{onClick:$,children:"확인"}),s.jsx(Ng,{onClick:he,children:"취소"})]})]})]})})})},GE=c.div` + display: flex; + justify-content: center; + padding: 20px; +`,qE=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,YE=c.h1` + font-size: 1.8rem; + font-weight: bold; + margin-bottom: 1.5rem; + text-align: left; +`,JE=c.div` + display: flex; + flex-direction: column; /* 내부 요소를 세로로 정렬 */ + background: #fff; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +`,XE=c.div` + display: flex; /* 가로 정렬 */ + flex-direction: row; /* 기본값이므로 명시적으로 추가 */ + align-items: stretch; /* 양쪽 요소의 높이를 동일하게 */ + justify-content: center; /* 양쪽 여백 균등 배치 */ + gap: 20px; /* 두 컨테이너 사이 간격 */ + margin-bottom: 20px; /* 아래 요소와의 간격 */ +`,ZE=c.div` + display: flex; + flex-direction: column; + align-items: center; + width: 490px; + height: 495px; /* 고정된 높이 설정 */ + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px 11px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,e3=c.div` + display: flex; + justify-content: space-between; /* 좌우 버튼 공간 확보 */ + align-items: center; /* 수직 중앙 정렬 */ + width: 100%; + height: 320px; /* 기준 높이 */ + position: relative; /* 자식 요소 위치 기준 */ + overflow: hidden; /* 높이를 벗어난 콘텐츠 숨김 */ +`,t3=c.div` + flex: 1; /* 이미지 영역이 버튼 사이에 위치 */ + display: flex; + align-items: center; + justify-content: center; + width: 400px; + height: 100%; + border: 1px solid #ccc; + border-radius: 10px; + overflow: hidden; /* 콘텐츠가 영역을 벗어나지 않도록 */ + + img { + max-width: 100%; /* 부모 너비를 넘지 않도록 */ + max-height: 100%; /* 부모 높이를 넘지 않도록 */ + object-fit: contain; /* 비율을 유지하며 부모 크기 안에 맞춤 */ + } +`,n3=c.label` + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 1.2rem; + color: #555; + cursor: pointer; + border-radius: 10px; + width: 400px; /* img의 크기와 동일하게 설정 */ + height: 100%; /* img의 높이와 동일하게 설정 */ + background-color: #ececec; /* 요구된 배경색 추가 */ + + input { + display: none; + } +`,r3=c.button` + position: absolute; + top: 0px; + right: 45px; + background: none; + border: none; + padding: 8px; + cursor: pointer; + z-index: 1; +`,o3=c.div` + flex: 0 0 32px; /* 버튼 고정 너비 */ + display: flex; + justify-content: center; + align-items: center; + height: 100%; /* PreviewWrapper의 높이에 맞춤 */ +`,i3=c.div` + flex: 0 0 32px; /* 버튼 고정 너비 */ + display: flex; + justify-content: center; + align-items: center; + height: 100%; /* PreviewWrapper의 높이에 맞춤 */ +`,s3=c.button` + background: none; + border: none; + color: #333; + cursor: pointer; +`,a3=c.button` + background: none; + border: none; + color: #333; + cursor: pointer; +`,l3=c.div` + width: 100%; + height: 54px; /* 높이 설정 */ + display: flex; /* 플렉스 박스로 변경 */ + align-items: center; /* 세로 중앙 정렬 */ + justify-content: center; /* 가로 중앙 정렬 */ +`,c3=c.div` + display: flex; + justify-content: center; + gap: 5px; + + span { + width: 8px; + height: 8px; + border-radius: 50%; + background: #ddd; + cursor: pointer; + } + + span.active { + background: #000; + } +`,u3=c.div` + display: flex; + flex-direction: column; + align-items: flex-start; /* 세로로 가운데 정렬 */ + width: 100%; +`,d3=c.div` + margin-left: 20px; + display: flex; + align-items: center; /* Label과 Url을 같은 높이에 배치 */ + gap: 10px; /* Label과 Url 사이 간격 */ + padding: 10px; + border: none; +`,f3=c.input` + width: 285px; + flex: 1; + padding: 10px; + background-color: #ececec; + border: 1px solid ${({isError:e})=>e?"red":"#ccc"}; + border-radius: 5px; +`,p3=c.span` + margin-left: 125px; + color: red; + font-size: 0.8rem; + margin-top: 5px; +`,h3=c.div` + display: flex; + flex-direction: column; /* 세로 정렬 */ + align-items: flex-start; /* 왼쪽 정렬 */ + width: 490px; + height: 495px; /* ImageUploadContainer와 동일한 고정 높이 */ + flex-grow: 1; /* 가로 공간을 균등 분배 */ + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; + gap: 20px; + box-sizing: border-box; +`,m3=c.div` + display: flex; + flex-direction: column; /* 세로 정렬 */ + gap: 20px; /* 컴포넌트 간 간격 */ + width: 100%; +`,ss=c.div` + display: flex; + flex-direction: row; /* 가로 배치 */ + align-items: center; /* 세로 중앙 정렬 */ + gap: 10px; /* 컴포넌트 간 간격 */ + width: 100%; +`,_o=c.label` + font-size: 1.2rem; + font-weight: bold; + flex-shrink: 0; /* 라벨 크기를 고정 */ + text-align: left; /* 라벨 텍스트 왼쪽 정렬 */ +`,g3=c.input` + width: 80%; + padding: 10px; + background-color: #ececec; + border: 1px solid #ccc; + border-radius: 5px; +`,x3=c.div` + display: flex; + justify-content: flex-start; +`,y3=c(Fc)` + display: flex; + margin-left: 50px; + flex-wrap: wrap; + gap: 8px; + padding: 10px 0; + + div { + padding: 12px !important; /* 강제로 적용 */ + flex: 1 1 calc(25% - 8px); + box-sizing: border-box; + + &:hover { + background-color: #f0f0f0 !important; /* 호버 스타일도 강제 */ + } + + &.active { + font-weight: bold !important; /* 활성 상태 스타일 강제 */ + border-bottom: 2px solid black !important; + } + } +`,v3=c.div` + display: flex; + flex-direction: column; /* 세로 정렬 */ + gap: 20px; /* 컴포넌트 간 간격 */ + width: 100%; +`,Mu=c.input` + width: 100px; + padding: 10px 0px; + text-align: center; + background-color: #ececec; + border: 1px solid #ccc; + border-radius: 5px; +`,w3=c.div` + position: relative; +`,b3=c.button` + width: 120px; + padding: 10px; + border: 1px solid #ccc; + border-radius: 5px; + font-weight: bold; + display: flex; + gap: 10px; + justify-content: center; + align-items: center; + box-sizing: border-box; +`,j3=c.div` + position: absolute; + width: 120px; + top: 100%; + left: 0; + right: 0; + font-size: 0.9rem; + border: 1px solid #ccc; + border-radius: 5px; + background: #fff; + z-index: 1000; + box-sizing: border-box; +`,C3=c.div` + padding: 10px; + text-align: center; + cursor: pointer; + background: ${({isSelected:e})=>e?"#f0f0f0":"#fff"}; + font-weight: ${({isSelected:e})=>e?"bold":"normal"}; + + &:hover { + background: #eaeaea; + } +`,S3=c.div` + display: flex; + flex-direction: row; /* 가로 배치 */ + gap: 20px; /* 두 요소 간 간격 */ + width: 100%; /* 부모 컨테이너에 맞게 확장 */ + align-items: center; /* 세로 중앙 정렬 */ +`,k3=c.div` + width: 100%; /* Wrapper 크기는 기존 유지 */ + max-width: 1100px; + margin: 0 auto; + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; /* 내부 여백 */ + margin-bottom: 20px; + box-sizing: border-box; +`,P3=c.textarea` + width: 100%; + height: 460px; /* 고정된 높이 */ + background-color: #ececec; + border: none; /* 테두리 제거 */ + border-radius: 10px; + padding: 20px; + outline: none; /* 포커스 시 외곽선 제거 */ + resize: none; /* 크기 조절 비활성화 */ + font-size: 1rem; /* 텍스트 크기 */ + line-height: 1.5; + color: #333; /* 텍스트 색상 */ + box-sizing: border-box; +`,E3=c.div` + display: flex; + justify-content: flex-end; + gap: 10px; +`,Ng=c.button` + padding: 10px 20px; + background: #000; + color: #fff; + border: 1px solid #000; + border-radius: 5px; + cursor: pointer; + + &:hover { + background: #333; + } +`;class R3{constructor(t){this.url=t,this.socket=null,this.subscriptions=new Map,this.reconnectSubscriptions=new Set,this.reconnectAttempts=0,this.maxReconnectAttempts=5}connect(t,n,r,o){this.socket=new WebSocket(this.url),this.socket.onopen=()=>{console.log("WebSocket connected"),n&&n(),this.reconnectAttempts=0,this.resubscribe()},this.socket.onmessage=i=>{const a=JSON.parse(i.data),l=a.destination;if(l&&this.subscriptions.has(l)){const u=this.subscriptions.get(l);u&&u(a.message)}else console.warn("No subscription found for destination:",l)},this.socket.onclose=()=>{console.log("WebSocket disconnected"),r&&r(),this.reconnect()},this.socket.onerror=i=>{console.error("WebSocket error:",i),o&&o(i)}}subscribe(t,n,r=!1){this.subscriptions.has(t)?console.warn(`Already subscribed to ${t}`):(this.subscriptions.set(t,n),console.log(`Subscribed to ${t}`)),r&&this.reconnectSubscriptions.add(t)}unsubscribe(t){this.subscriptions.has(t)?(this.subscriptions.delete(t),this.reconnectSubscriptions.delete(t),console.log(`Unsubscribed from ${t}`)):console.warn(`No subscription found for ${t}`)}send(t,n){if(!this.socket||this.socket.readyState!==WebSocket.OPEN){console.warn("WebSocket is not connected");return}const r=JSON.stringify({destination:t,message:n});console.log(`Sending message to ${t}:`,r),this.socket.send(r)}isConnected(){var t;return((t=this.socket)==null?void 0:t.readyState)===WebSocket.OPEN}close(){this.socket&&(this.socket.close(),console.log("WebSocket connection closed"))}reconnect(){this.reconnectAttempts{this.connect(t=>console.log("Reconnected message:",t),()=>console.log("Reconnected successfully"),()=>console.log("Reconnection closed"),t=>console.error("Reconnection error:",t))},3e3)):console.error("Max reconnect attempts reached")}resubscribe(){this.reconnectSubscriptions.size>0&&(console.log("Resubscribing to specific channels after reconnect"),this.reconnectSubscriptions.forEach(t=>{const n=this.subscriptions.get(t);n&&(console.log(`Resubscribing to ${t}`),this.subscribe(t,n))}))}}const Zs=new R3("ws://your-api-endpoint.com/websocket"),on="user-00001",A3="사용자 A",I3=()=>{var rt;const{communityPostId:e}=$i(),t=Ee(),n=Oc(),r=Number(e);if(!r)return alert("잘못된 게시물 ID입니다."),t("/community"),null;const[o,i]=w.useState(Rv),[a,l]=w.useState(1),[u,d]=w.useState(!1),[p,f]=w.useState(0),[h,b]=w.useState(""),[y,x]=w.useState(""),[j,g]=w.useState(""),[m,v]=w.useState(null),[C,P]=w.useState(""),S=["postDetail",r],{data:R,isLoading:I,isError:L}=Gp({queryKey:S,queryFn:()=>si(r),enabled:!!e});w.useEffect(()=>{if(R){i(R);const J=R.participants.find(ge=>ge.userId===on&&!ge.isCancelled);l(J?J.quantity:1),d(R.userId===on),R.participants.some(ge=>ge.userId===on&&ge.isCancelled)&&(alert("참여를 취소한 게시물에는 접근할 수 없습니다."),t("/community"))}},[R,on,t]),w.useEffect(()=>{L&&(alert("게시물을 불러오는 데 실패했습니다."),t("/community"))},[L,t]),w.useEffect(()=>{if(e){const J=ge=>{ge.type==="STATUS_UPDATE"?i(at=>({...at,status:ge.status})):ge.type==="USER_UPDATE"&&i(at=>({...at,participants:ge.participants,cancelledUsers:ge.cancelledUsers}))};return Zs.connect(J,()=>console.log("WebSocket connected"),()=>console.log("WebSocket disconnected"),ge=>console.error("WebSocket error:",ge)),()=>{Zs.close()}}},[e]),w.useEffect(()=>{const J=o==null?void 0:o.closeAt;if(!J)return;const ge=On=>{const Tn=new Date().getTime(),Nn=new Date(On).getTime()-Tn;if(Nn<=0)return"마감되었습니다.";const Hi=Math.floor(Nn/(1e3*60*60*24)),Wc=Math.floor(Nn%(1e3*60*60*24)/(1e3*60*60)),Ln=Math.floor(Nn%(1e3*60*60)/(1e3*60)),Hr=Math.floor(Nn%(1e3*60)/1e3);return`${Hi}일 ${Wc}시간 ${Ln}분 ${Hr}초 남음`},at=()=>{const On=ge(J);b(On)};at();const Wi=setInterval(at,1e3);return()=>clearInterval(Wi)},[o]),w.useEffect(()=>{if(o.status===_t.PAYMENT_STANDBY&&o.stateUpdatedAt){const J=new Date(o.stateUpdatedAt).getTime()+432e5,ge=()=>{const On=new Date().getTime(),Tn=J-On;if(Tn<=0)return"결제 마감되었습니다.";const ga=Math.floor(Tn/(1e3*60*60)),Nn=Math.floor(Tn%(1e3*60*60)/(1e3*60)),Hi=Math.floor(Tn%(1e3*60)/1e3);return`${ga}시간 ${Nn}분 ${Hi}초 남음`},at=()=>{const On=ge();x(On)};at();const Wi=setInterval(at,1e3);return()=>clearInterval(Wi)}else x("")},[o]);const B=Yr({mutationFn:Av,onSuccess:()=>{n.invalidateQueries({queryKey:S}),alert("게시물이 삭제되었습니다."),t("/community")},onError:J=>{console.error(J),alert("게시물 삭제에 실패했습니다.")}}),N=()=>{window.confirm("정말 이 게시물을 삭제하시겠습니까?")&&B.mutate(r)},O=()=>{o&&f(J=>(J+1)%o.imageUrls.length)},$=()=>{o&&f(J=>(J-1+o.imageUrls.length)%o.imageUrls.length)},F=J=>{f(J)},se=Yr({mutationFn:()=>gE(r,on,a),onSuccess:async()=>{n.invalidateQueries({queryKey:S}),alert("참여가 완료되었습니다.");const J=await si(r);J.currentQuantity===J.availableNumber&&J.status===_t.APPROVED&&(await sc(r,_t.PAYMENT_STANDBY),n.invalidateQueries({queryKey:S}))},onError:()=>{alert("참여에 실패했습니다.")}}),he=()=>{o.status===_t.APPROVED?se.mutate():alert("현재 참여할 수 없는 상태입니다.")},oe=Yr({mutationFn:()=>xE(r,on),onSuccess:async()=>{n.invalidateQueries({queryKey:S}),alert("참여가 취소되었습니다.");const J=await si(r);J.status===_t.PAYMENT_STANDBY&&J.currentQuantity{alert("참여 취소에 실패했습니다.")}}),W=()=>{[_t.APPROVED,_t.PAYMENT_STANDBY].includes(o.status)?oe.mutate():alert("현재 취소할 수 없는 상태입니다.")},H=()=>{window.confirm("진행자가 공구 진행 취소를 할 경우, 포스트 자체도 삭제됩니다. 정말 취소하시겠습니까?")&&B.mutate(r)},X=()=>{t(`/community/post/${e}/report`)},ie=J=>{if(o){const ge=a+J;ge>=1&&ge<=o.availableNumber-o.currentQuantity&&l(ge)}},ne=((rt=o==null?void 0:o.participants)==null?void 0:rt.some(J=>J.userId===on&&!J.isCancelled))||!1,Ve=Yr({mutationFn:()=>yE(r,on,A3,j),onSuccess:()=>{n.invalidateQueries({queryKey:["postDetail",r]}),g("")},onError:()=>{alert("댓글 작성에 실패했습니다.")}}),be=()=>{if(!j.trim()){alert("댓글을 입력해주세요.");return}if(j.length>300){alert("댓글은 최대 300자까지만 입력 가능합니다.");return}Ve.mutate()},Ne=Yr({mutationFn:J=>vE(r,J),onSuccess:()=>{n.invalidateQueries({queryKey:["postDetail",r]})},onError:()=>{alert("댓글 삭제에 실패했습니다.")}}),Ce=J=>{window.confirm("이 댓글을 삭제하시겠습니까?")&&Ne.mutate(J)},M=(J,ge)=>{v(J),P(ge)},U=Yr({mutationFn:()=>wE(Number(e),m,C),onSuccess:()=>{n.invalidateQueries({queryKey:["postDetail",e]}),v(null),P("")},onError:()=>{alert("댓글 수정에 실패했습니다.")}}),ae=()=>{if(!C.trim()){alert("수정할 댓글 내용을 입력하세요.");return}if(C.length>300){alert("댓글은 최대 300자까지만 입력 가능합니다.");return}U.mutate()},Ke=()=>{if(o.status!==_t.PAYMENT_STANDBY){alert("현재 결제할 수 없는 상태입니다.");return}const J={post:{title:o.title,unitAmount:o.unitAmount,imageUrls:o.imageUrls},quantity:a};u?t(`/community/post/${e}/payment/author`,{state:J}):t(`/community/post/${e}/payment/participant`,{state:J})},Me=()=>{o.participants.find(ge=>ge.userId===on&&!ge.isCancelled&&ge.isPaymentCompleted)?t(`/community/post/${e}/refund`):alert("환불 요청은 결제를 완료한 이용자만 가능합니다.")};return w.useEffect(()=>{o.status===_t.PAYMENT_STANDBY&&!ne&&(alert("모집이 완료되어 더 이상 접근할 수 없습니다."),t("/community"))},[o.status,ne,t]),I?s.jsx("div",{children:"Loading..."}):o?s.jsx(D3,{children:s.jsxs(O3,{children:[s.jsxs(T3,{children:[s.jsx(M3,{children:"공구 모집 및 진행"}),s.jsxs(N3,{children:[s.jsx(L3,{onClick:()=>t(-1),children:s.jsx(eh,{size:24})}),s.jsx(_3,{children:u?ne?"":s.jsx(Lg,{onClick:N,children:"글 삭제"}):s.jsx(Lg,{onClick:X,children:"글 신고"})})]})]}),s.jsxs($3,{children:[s.jsxs(z3,{children:[s.jsxs(F3,{children:[s.jsxs(U3,{children:[s.jsx(W3,{children:o.imageUrls.length>1&&p>0&&s.jsx(V3,{onClick:$,children:s.jsx($c,{size:20})})}),s.jsx(B3,{children:s.jsx("img",{src:o.imageUrls[p],alt:`이미지 ${p+1}`})}),s.jsx(H3,{children:o.imageUrls.length>1&&p1&&s.jsx(G3,{children:o.imageUrls.map((J,ge)=>s.jsx("span",{className:p===ge?"active":"",onClick:()=>F(ge)},ge))})}),s.jsx(q3,{children:s.jsxs(Y3,{children:[s.jsx(Kt,{htmlFor:"urlInput",children:"URL 주소"}),s.jsx(J3,{children:o.productUrl})]})})]}),s.jsx(X3,{children:s.jsxs(Z3,{children:[s.jsxs($n,{children:[s.jsx(Kt,{children:"제목"}),s.jsx(_g,{children:o.title})]}),s.jsxs(as,{children:[s.jsxs(e4,{children:[s.jsx(Kt,{children:"작성자"}),s.jsx(t4,{children:o.nickname})]}),s.jsxs(n4,{children:[s.jsx(Kt,{children:"작성일"})," ",new Date(o.createdAt).toLocaleString()]})]}),s.jsxs(as,{children:[s.jsxs($n,{children:[s.jsx(Kt,{children:"카테고리"})," ",o.category]}),s.jsxs($n,{children:[s.jsx(Kt,{children:"참여 현황"})," ",o.currentQuantity," / ",o.availableNumber]})]}),s.jsxs(as,{children:[s.jsxs($n,{children:[s.jsx(Kt,{children:"모집 마감"})," ",h]}),(o==null?void 0:o.status)===_t.PAYMENT_STANDBY&&s.jsxs($n,{children:[s.jsx(Kt,{children:"결제 마감"}),s.jsx(_g,{children:y})]})]}),s.jsxs(as,{children:[s.jsxs($n,{children:[s.jsx(Kt,{children:"총 가격"})," ",o.totalAmount.toLocaleString()," ","원"]}),s.jsxs($n,{children:[s.jsx(Kt,{children:"개당 가격"})," ",o.unitAmount.toLocaleString()," ","원"]})]}),s.jsxs(as,{children:[s.jsxs($n,{children:[s.jsx(Kt,{children:"수량"})," ",s.jsxs(r4,{children:[!ne&&s.jsxs(s.Fragment,{children:[s.jsx(th,{onClick:()=>ie(-1)}),s.jsx("span",{children:a}),s.jsx(nh,{onClick:()=>ie(1)})]}),ne&&s.jsx("span",{children:a})," "]})]}),ne&&s.jsxs($n,{children:[s.jsx(Kt,{children:"결제 금액"})," ",s.jsxs(o4,{children:[(a*o.unitAmount).toLocaleString()," 원"]})]}),o&&o.status&&s.jsx(a4,{children:o.participants.some(J=>J.userId===on&&!J.isCancelled&&J.isPaymentCompleted)?s.jsx(ir,{primary:!0,onClick:Me,children:"환불"}):o.status===_t.PAYMENT_STANDBY?s.jsx(s.Fragment,{children:ne&&s.jsxs(s.Fragment,{children:[s.jsx(ir,{primary:!0,onClick:Ke,children:"결제"}),s.jsx(ir,{onClick:W,children:"취소"})]})}):o.status===_t.APPROVED?s.jsx(s.Fragment,{children:ne?u?s.jsx(ir,{onClick:H,children:"취소"}):s.jsx(ir,{onClick:W,children:"취소"}):s.jsx(ir,{primary:!0,onClick:he,children:"참여"})}):null})]})]})})]}),s.jsx(i4,{children:s.jsx(s4,{readOnly:!0,value:o.description})}),s.jsxs(l4,{children:[s.jsx(c4,{children:"댓글"}),s.jsxs(u4,{children:[o.comments.map(J=>s.jsxs(d4,{children:[s.jsxs(f4,{children:[s.jsx(p4,{children:J.userNickname}),s.jsx(h4,{children:new Date(J.createdAt).toLocaleString()})]}),m===J.commentId?s.jsxs(x4,{children:[s.jsx(y4,{value:C,onChange:ge=>P(ge.target.value),maxLength:300}),s.jsxs($g,{children:[s.jsxs(Mg,{overLimit:C.length>300,children:["(",C.length,"/300)"]}),s.jsx(ir,{onClick:ae,children:"확인"}),s.jsx(ir,{onClick:()=>v(null),children:"취소"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(m4,{children:J.content}),J.userId===on&&s.jsxs(g4,{children:[s.jsx(v4,{onClick:()=>M(J.commentId,J.content),children:"수정"}),s.jsx(w4,{onClick:()=>Ce(J.commentId),children:"삭제"})]})]})]},J.commentId)),s.jsxs(b4,{children:[s.jsx(j4,{value:j,onChange:J=>g(J.target.value),placeholder:"댓글 내용을 입력해주세요.",maxLength:300}),s.jsxs($g,{children:[s.jsxs(Mg,{overLimit:j.length>300,children:["(",j.length,"/300)"]}),s.jsx(C4,{onClick:be,children:"작성"})]})]})]})]})]})]})}):s.jsx("div",{children:"게시물이 없습니다."})},D3=c.div` + display: flex; + justify-content: center; + padding: 20px; +`,O3=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,T3=c.div` + display: flex; + flex-direction: column; /* Title과 HeaderWrapper를 세로로 배치 */ + gap: 10px; /* Title과 HeaderWrapper 사이 간격 */ + margin-bottom: 1.5rem; +`,N3=c.div` + width: 1000px; + margin: 30px auto 0; + display: flex; + justify-content: space-between; + align-items: center; +`,L3=c.button` + background: none; + border: none; + cursor: pointer; +`,_3=c.div` + display: flex; + gap: 10px; +`,Lg=c.button` + padding: 10px 15px; + background: #000; + color: #fff; + border: 1px solid #000; + border-radius: 5px; + cursor: pointer; +`,M3=c.h1` + font-size: 1.8rem; + font-weight: bold; + text-align: left; + margin: 0; /* Title의 기본 마진 제거 */ +`,$3=c.div` + display: flex; + flex-direction: column; + background: #fff; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +`,z3=c.div` + display: flex; /* 가로 정렬 */ + flex-direction: row; /* 기본값이므로 명시적으로 추가 */ + align-items: stretch; /* 양쪽 요소의 높이를 동일하게 */ + justify-content: center; /* 양쪽 여백 균등 배치 */ + gap: 20px; /* 두 컨테이너 사이 간격 */ + margin-bottom: 20px; /* 아래 요소와의 간격 */ +`,F3=c.div` + display: flex; + flex-direction: column; + align-items: center; + width: 490px; + height: 470px; /* 고정된 높이 설정 */ + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px 11px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,U3=c.div` + display: flex; + justify-content: space-between; /* 좌우 버튼 공간 확보 */ + align-items: center; /* 수직 중앙 정렬 */ + width: 100%; + height: 320px; /* 기준 높이 */ + position: relative; /* 자식 요소 위치 기준 */ + overflow: hidden; /* 높이를 벗어난 콘텐츠 숨김 */ +`,B3=c.div` + flex: 1; /* 이미지 영역이 버튼 사이에 위치 */ + display: flex; + align-items: center; + justify-content: center; + width: 400px; + height: 100%; + border: 1px solid #ccc; + border-radius: 10px; + overflow: hidden; /* 콘텐츠가 영역을 벗어나지 않도록 */ + + img { + max-width: 100%; /* 부모 너비를 넘지 않도록 */ + max-height: 100%; /* 부모 높이를 넘지 않도록 */ + object-fit: contain; /* 비율을 유지하며 부모 크기 안에 맞춤 */ + } +`,W3=c.div` + flex: 0 0 32px; /* 버튼 고정 너비 */ + display: flex; + justify-content: center; + align-items: center; + height: 100%; /* PreviewWrapper의 높이에 맞춤 */ +`,H3=c.div` + flex: 0 0 32px; /* 버튼 고정 너비 */ + display: flex; + justify-content: center; + align-items: center; + height: 100%; /* PreviewWrapper의 높이에 맞춤 */ +`,V3=c.button` + background: none; + border: none; + color: #333; + cursor: pointer; +`,Q3=c.button` + background: none; + border: none; + color: #333; + cursor: pointer; +`,K3=c.div` + width: 100%; + height: 54px; /* 높이 설정 */ + display: flex; /* 플렉스 박스로 변경 */ + align-items: center; /* 세로 중앙 정렬 */ + justify-content: center; /* 가로 중앙 정렬 */ +`,G3=c.div` + display: flex; + justify-content: center; + gap: 5px; + + span { + width: 8px; + height: 8px; + border-radius: 50%; + background: #ddd; + cursor: pointer; + } + + span.active { + background: #000; + } +`,q3=c.div` + display: flex; + flex-direction: column; + align-items: flex-start; /* 세로로 가운데 정렬 */ + width: 100%; +`,Y3=c.div` + margin-left: 20px; + display: flex; + align-items: center; /* Label과 Url을 같은 높이에 배치 */ + gap: 10px; /* Label과 Url 사이 간격 */ + padding: 10px; + border: none; +`,J3=c.div` + width: 285px; + flex: 1; + padding: 10px; + border: none; + border-radius: 5px; +`,X3=c.div` + display: flex; + flex-direction: column; /* 세로 정렬 */ + align-items: flex-start; /* 왼쪽 정렬 */ + justify-content: space-between; /* 위아래 요소 간격 균등 */ + width: 490px; + max-width: 490px; /* 최대 너비 고정 */ + height: 470px; /* ImageUploadContainer와 동일한 고정 높이 */ + flex-grow: 1; /* 가로 공간을 균등 분배 */ + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; + box-sizing: border-box; +`,Z3=c.div` + display: flex; + flex-direction: column; + gap: 20px; /* 컴포넌트 간 간격 */ + width: 100%; +`,$n=c.div` + display: flex; + flex-direction: column; + font-size: 1rem; +`,Kt=c.label` + font-size: 1.2rem; + font-weight: bold; + margin-bottom: 4px; /* Label과 텍스트 사이 간격 */ +`,_g=c.span` + display: -webkit-box; /* Flexbox 기반으로 동작 */ + -webkit-line-clamp: 2; /* 두 줄까지만 표시 */ + -webkit-box-orient: vertical; /* 수직 방향 박스 정렬 */ + overflow: hidden; /* 넘치는 텍스트 숨김 */ + text-overflow: ellipsis; /* 넘치는 텍스트에 ... 표시 */ + white-space: normal; /* 줄바꿈 허용 */ + color: #333; /* 텍스트 색상 */ +`,as=c.div` + display: flex; /* 한 줄로 배치 */ + align-items: center; /* 세로 가운데 정렬 */ + justify-content: space-between; /* 양쪽 여백 균등 배치 */ + width: 100%; /* 부모 컨테이너 너비 */ + + & > div { + flex: 1; /* 내부 요소들이 동일한 크기로 영역 나눔 */ + } +`,e4=c.div` + display: flex; /* 가로 배치 */ + flex-direction: column; /* 내부 요소가 한 줄씩 배치되도록 */ + gap: 5px; /* 내부 요소 간 간격 */ +`,t4=c.div` + display: flex; /* 한 줄로 배치 */ + align-items: center; /* 세로로 가운데 정렬 */ + font-size: 1rem; /* 텍스트 크기 설정 */ +`,n4=c.div` + display: flex; /* 가로 배치 */ + flex-direction: column; /* 내부 요소가 한 줄씩 배치되도록 */ + gap: 5px; /* 내부 요소 간 간격 */ +`,r4=c.div` + display: flex; + gap: 10px; + align-items: center; + + svg { + cursor: pointer; + } +`,o4=c.div` + display: flex; + gap: 10px; + align-items: center; +`,i4=c.div` + width: 100%; + max-width: 1000px; + margin: 0 auto; + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; + margin-bottom: 20px; + box-sizing: border-box; +`,s4=c.textarea` + width: 100%; + height: 460px; /* 고정된 높이 */ + border: none; /* 테두리 제거 */ + border-radius: 10px; + padding: 20px; + outline: none; /* 포커스 시 외곽선 제거 */ + resize: none; /* 크기 조절 비활성화 */ + font-size: 1rem; /* 텍스트 크기 */ + line-height: 1.5; + color: #333; /* 텍스트 색상 */ + box-sizing: border-box; +`,a4=c.div` + display: flex; + justify-content: right; /* 버튼을 가운데 정렬 */ + align-items: center; /* 세로 정렬 */ + gap: 10px; /* 버튼 간 간격 */ +`,ir=c.button` + padding: 10px 20px; + background: #000; + color: #fff; + border: 1px solid #000; + border-radius: 5px; + cursor: pointer; +`,l4=c.div` + width: 1000px; + margin: 0 auto; + border: 1px solid #ccc; + border-radius: 10px; +`,c4=c.h3` + font-size: 1.5rem; + font-weight: bold; + margin-left: 40px; + margin-bottom: 0; +`,u4=c.ul` + list-style: none; + padding: 20px; + margin: 0; +`,d4=c.li` + margin-bottom: 15px; + padding: 15px; + border: 1px solid #ddd; + border-radius: 8px; + display: flex; + flex-direction: column; +`,f4=c.div` + display: flex; + justify-content: left; + align-items: center; + margin-bottom: 10px; +`,p4=c.div` + display: flex; + align-items: center; + font-weight: bold; + + &::before { + content: ''; + display: inline-block; + width: 32px; + height: 32px; + border-radius: 50%; + background-color: #ccc; + margin-right: 8px; + } +`,h4=c.span` + margin-left: 20px; + font-size: 0.9rem; + color: #666; +`,m4=c.p` + margin: 10px 0; + font-size: 1rem; + color: #333; + word-wrap: break-word; +`,g4=c.div` + display: flex; + justify-content: flex-end; + gap: 10px; +`,x4=c.div` + display: flex; + flex-direction: column; /* 세로 배치 */ + gap: 10px; /* EditCommentInput과 ActionButtonsWrapper 간격 */ +`,Mg=c.span` + font-size: 0.9rem; + color: ${e=>e.overLimit?"red":"#666"}; /* 300자를 초과하면 빨간색 */ + margin-right: 10px; /* 버튼과 간격 */ +`,y4=c.textarea` + width: 100%; /* CommentContent와 동일한 너비 */ + min-height: 60px; /* 기본 높이 */ + max-height: 120px; /* 최대 높이 */ + padding: 10px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #ececec; /* 배경색 설정 */ + font-size: 1rem; /* 글씨 크기 */ + line-height: 1.5; /* 줄 간격 */ + color: #333; /* 글씨 색상 */ + resize: none; /* 크기 조절 비활성화 */ + font-family: inherit; /* 기본 글꼴 사용 */ + box-sizing: border-box; /* 패딩 포함 크기 계산 */ +`,v4=c.button` + padding: 10px 20px; + background: #000; + color: #fff; + border: 1px solid #000; + border-radius: 5px; + cursor: pointer; +`,w4=c.button` + padding: 10px 20px; + background: #000; + color: #fff; + border: 1px solid #000; + border-radius: 5px; + cursor: pointer; +`,b4=c.div` + border: 1px solid #ddd; + border-radius: 8px; + padding: 15px; + display: flex; + flex-direction: column; /* 세로 정렬 */ + gap: 10px; /* 요소 간 간격 */ + box-sizing: border-box; /* 패딩과 보더를 포함한 크기 계산 */ +`,j4=c.textarea` + width: 100%; + min-height: 60px; + max-height: 120px; + padding: 10px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #ececec; + font-size: 1rem; /* CommentContent와 동일한 글꼴 크기 */ + color: #333; /* CommentContent와 동일한 텍스트 색상 */ + resize: none; /* 크기 조절 비활성화 */ + font-family: inherit; + box-sizing: border-box; /* 패딩과 보더를 포함한 너비 계산 */ +`,C4=c.button` + padding: 10px 20px; + background: #000; + color: #fff; + border: 1px solid #000; + border-radius: 5px; + cursor: pointer; + align-self: flex-end; /* 오른쪽 정렬 */ +`,$g=c.div` + display: flex; + gap: 10px; + justify-content: flex-end; + align-items: center; + margin-top: 10px; +`,S4="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAATCAYAAACKsM07AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD8SURBVHgBtZXtDcIgEIZfSP/bEToCG8gIdYK6ihu4gSMYJ5BuUCeoG6gT4F0osSX9SKE+yZuWAncH1wNhrT0CqPDjIIR4YyMkKe+1NanEv6DVvEhnbEgWtBtSRU522IZb6KCG2yaNdArSZ/CFItfWkZQHmq+8HRn0Nd1TIw0d2Bt4v7OQAM2/klp+lyP9DxIvMUc8qrMz6sDA1YZCBBRYAZdgM+fARxGDCuyMRtHG5oELlQvWt+XEuBrxK9ij9/dkE4MMXEXzsbH24OPATrMjOFE2Hj7Pllff5eGCRLKZPs5DSU5qrIO31CzeKXwR2Xi0tyMWnBSIgKJ/+vcviL7xJoSwybgAAAAASUVORK5CYII=",k4="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNDAwIiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7Ij4NCiAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTAwLCA1MCkiPg0KICAgIDxjaXJjbGUgY3g9IjE1MCIgY3k9IjEyMCIgcj0iNTAiIGZpbGw9IiM0MkE1RjUiIG9wYWNpdHk9IjAuMyIvPg0KICAgIDxjaXJjbGUgY3g9IjI1MCIgY3k9IjEyMCIgcj0iNTAiIGZpbGw9IiM2NEI1RjYiIG9wYWNpdHk9IjAuMyIvPg0KICAgIDxjaXJjbGUgY3g9IjIwMCIgY3k9IjIyMCIgcj0iNTAiIGZpbGw9IiMyMTk2RjMiIG9wYWNpdHk9IjAuMyIvPg0KICAgIA0KICAgIDxwYXRoIGQ9Ik0xNTAsMTIwIEwyNTAsMTIwIE0yMDAsMjIwIEwxNTAsMTIwIE0yMDAsMjIwIEwyNTAsMTIwIiANCiAgICAgICAgICBzdHJva2U9IiMxRTg4RTUiIA0KICAgICAgICAgIHN0cm9rZS13aWR0aD0iNCIgDQogICAgICAgICAgc3Ryb2tlLWRhc2hhcnJheT0iMTAsMTAiLz4NCiAgICANCiAgICA8dGV4dCB4PSIzNTAiIHk9IjIwMCIgDQogICAgICAgICAgZm9udC1mYW1pbHk9IkFyaWFsIEJsYWNrLCBzYW5zLXNlcmlmIiANCiAgICAgICAgICBmb250LXNpemU9IjcwIiANCiAgICAgICAgICBmb250LXdlaWdodD0iOTAwIj4NCiAgICAgIDx0c3BhbiB4PSIyNTAiIGR5PSItMjAiIGZpbGw9IiMxNTY1QzAiPkdvb2Q8L3RzcGFuPg0KICAgICAgPHRzcGFuIHg9IjMwMCIgZHk9IjcwIiBmaWxsPSIjMjE5NkYzIj5CdXlVczwvdHNwYW4+DQogICAgPC90ZXh0Pg0KICA8L2c+DQo8L3N2Zz4=",P4="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='30px'%20viewBox='0%20-960%20960%20960'%20width='30px'%20fill='%23434343'%3e%3cpath%20d='M144-264v-72h672v72H144Zm0-180v-72h672v72H144Zm0-180v-72h672v72H144Z'/%3e%3c/svg%3e",Dv=w.createContext(null),E4=({children:e})=>{const[t,n]=w.useState(!1),[r,o]=w.useState(!1),i=()=>{const u=localStorage.getItem("token"),d=localStorage.getItem("role");n(!!u),o(d==="ROLE_ADMIN")};w.useEffect(()=>{i()},[t]);const a=()=>{n(!0);const u=localStorage.getItem("role");o(u==="ROLE_ADMIN")},l=()=>{localStorage.removeItem("role"),localStorage.removeItem("token"),n(!1),o(!1)};return s.jsx(Dv.Provider,{value:{isLoggedIn:t,isAdmin:r,login:a,logout:l},children:e})},Uc=()=>{const e=w.useContext(Dv);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},R4=()=>{const{isLoggedIn:e,isAdmin:t,logout:n}=Uc(),[r,o]=w.useState(!1),i=()=>{o(!r)};return s.jsx(A4,{children:s.jsxs(I4,{children:[s.jsx(D4,{children:s.jsx(An,{to:"/",children:s.jsx("img",{src:k4,alt:"로고"})})}),s.jsx(O4,{onClick:i,children:s.jsx("img",{src:P4,alt:"메뉴버튼"})}),s.jsx(T4,{$isOpen:r,children:s.jsxs(N4,{children:[s.jsx(ls,{children:s.jsx(sr,{to:"/",onClick:i,children:"Home"})}),s.jsx(ls,{children:s.jsx(sr,{to:"/products",onClick:i,children:"Products"})}),s.jsx(ls,{children:s.jsx(sr,{to:"/mypage/notification",onClick:i,children:"Notifications"})}),s.jsx(ls,{children:s.jsx(sr,{to:"/community/post",onClick:i,children:"Community"})}),s.jsxs(ls,{children:[e&&s.jsx(sr,{to:t?"/adminpage":"/mypage/setting",onClick:i,children:t?"Admin Page":"My Page"}),t&&s.jsxs(Mf,{children:[s.jsx(zg,{children:s.jsx(sr,{to:"/adminpage/post-management",children:"Post Management"})}),s.jsx(zg,{children:s.jsx(sr,{to:"/adminpage/chat-management",children:"Chat Management"})})]})]}),e?s.jsxs(s.Fragment,{children:[s.jsx(Fg,{onClick:n,children:s.jsx("a",{children:"LogOut"})}),s.jsx(Fg,{children:s.jsx(_4,{children:s.jsx(sr,{to:"/cart",onClick:i,children:s.jsx("img",{src:S4,alt:"장바구니 아이콘"})})})})]}):s.jsx(L4,{children:s.jsx(An,{to:"/signin",onClick:i,children:"Login"})})," "]})})]})})},A4=c.header` + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 20px; + position: relative; +`,I4=c.div` + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + max-width: 1120px; + margin-left: auto; + margin-right: auto; + position: relative; +`,D4=c.div` + img { + margin-top: -10%; + margin-left: -25%; + height: auto; + width: 250px; + } + + @media (min-width: 576px) and (max-width: 767px) { + img { + margin-top: 0; + margin-left: 0; + width: 150px; + } + } +`,O4=c.button` + display: none; + + @media (min-width: 576px) and (max-width: 767px) { + display: block; + background: none; + border: none; + cursor: pointer; + position: absolute; + right: 0; + top: 50%; + transform: translateY(-50%); + z-index: 20; + } +`,T4=c.nav` + display: flex; + justify-content: flex-end; + flex-grow: 1; + + @media (min-width: 576px) and (max-width: 767px) { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100vh; + background-color: white; + z-index: 10; + display: ${({$isOpen:e})=>e?"flex":"none"}; + align-items: center; + justify-content: center; + } +`,N4=c.ul` + display: flex; + list-style: none; + gap: 10px; + margin: 0; + padding: 0; + align-items: center; + + @media (min-width: 576px) and (max-width: 767px) { + flex-direction: column; + gap: 20px; + width: 100%; + align-items: center; + } +`,Mf=c.ul` + display: none; + position: absolute; + top: 100%; + left: 0; + background: white; + border: 1px solid #ccc; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + list-style: none; + padding: 5px 0; + margin: 0; + z-index: 1000; + + @media (min-width: 576px) and (max-width: 767px) { + position: static; + box-shadow: none; + border: none; + padding: 0; + background: transparent; + } +`,zg=c.li` + padding: 8px 12px; + + a { + text-decoration: none; + color: black; + display: block; + } + + &:hover { + background: #f4f4f4; + } + + @media (min-width: 576px) and (max-width: 767px) { + padding: 10px; + text-align: center; + } +`,ls=c.li` + margin: 0; + position: relative; + a { + display: block; + padding-bottom: 15px; + text-decoration: none; + color: #000; + font-weight: bold; + border-radius: 5px; + } + &:hover > ${Mf} { + display: block; + } + &:hover { + background-color: #f4f4f4; + border-radius: 8px; + } + + @media (min-width: 576px) and (max-width: 767px) { + width: 100%; + text-align: center; + &:hover > ${Mf} { + display: flex; + flex-direction: column; + align-items: center; + gap: 10px; + } + a { + padding: 10px; + width: 100%; + } + } +`,L4=c.li` + background-color: black; + height: 30px; + width: 70px; + border-radius: 5px; + overflow: hidden; + + a { + color: white; + text-decoration: none; + display: block; + text-align: center; + margin-top: 5px; + font-weight: bold; + } + + &:hover { + background-color: #333; + } + + @media (min-width: 576px) and (max-width: 767px) { + width: 130px; + height: 40px; + margin-left: 10px; + a { + margin-top: 10px; + font-size: 16px; + } + } +`,Fg=c.li` + background-color: black; + height: 30px; + border-radius: 5px; + overflow: hidden; + display: inline-flex; + align-items: center; + padding: 0px 10px; + + a { + font-size: 15px; + color: white; + text-decoration: none; + display: block; + text-align: center; + font-weight: bold; + } + + &:hover { + background-color: #333; + } + + @media (min-width: 576px) and (max-width: 767px) { + width: 130px; + height: 40px; + margin-left: 10px; + + a { + margin-top: -1px; + margin-left: -8px; + font-size: 16px; + } + } +`,sr=c(An)` + text-decoration: none; + color: #000; + padding: 5px 12px; + margin-top: 10px; + transition: background-color 0.2s; + border-radius: 5px; + + @media (min-width: 576px) and (max-width: 767px) { + color: black; + padding: 10px; + width: 100%; + text-align: center; + } +`,_4=c.div` + img { + margin-top: -4px; + width: 22px; + height: 22px; + } + + @media (min-width: 576px) and (max-width: 767px) { + img { + width: 25px; + height: 25px; + } + } +`,M4=()=>s.jsx($4,{children:s.jsx(z4,{children:"© 2024 LinkUp. All Rights Reserved."})}),$4=c.footer` + width: 100%; + + color: white; + background-color: black; + text-align: center; + padding: 1rem 0; + margin-top: auto; +`,z4=c.p` + margin: 0; + font-size: 1rem; +`,F4=()=>s.jsxs(U4,{children:[s.jsx(R4,{}),s.jsx(B4,{children:s.jsx(UC,{})}),s.jsx(M4,{})]}),U4=c.div` + display: flex; + flex-direction: column; + min-height: 100vh; +`,B4=c.main` + flex: 1; /* 남은 공간을 모두 차지 */ + padding: 1rem; + margin-bottom: 150px; +`,W4=async e=>(await re.post("/users/checkemail",e)).data,H4=async e=>(await re.post("/users/checkaddress",e)).data,V4=async e=>(await re.post("/users/checknickname",e)).data,Ug=async e=>{const t=localStorage.getItem("email"),n=localStorage.getItem("password"),r=localStorage.getItem("password_confirm"),o=localStorage.getItem("name"),i=localStorage.getItem("phone"),a=localStorage.getItem("nickname"),l=localStorage.getItem("address"),u={email:t,password:n,password_confirm:r,name:o,phone:i,nickname:a,address:l},d=new FormData;if(d.append("user",new Blob([JSON.stringify(u)],{type:"application/json"})),e)d.append("profile",e);else{const h=await fetch("/public/images/origin.png").then(y=>y.blob()),b=new File([h],"origin.png",{type:h.type});d.append("profile",b)}return(await re.post("/users",d,{headers:{"Content-Type":"multipart/form-data"}})).data},Q4=async e=>{const t=await re.post("/users/login",e),n=t.headers.authorization||t.headers.Authorization;return n&&localStorage.setItem("token",n),t},K4=async e=>(await re.post("/users/find",e)).data,G4=async(e,t)=>(await re.post(`/users/reset?token=${t}`,e)).data,q4=()=>{const e=Ee(),[t,n]=w.useState(""),[r,o]=w.useState(""),{login:i}=Uc();return s.jsxs(nR,{children:[s.jsx(eR,{children:s.jsx("img",{src:"/images/login1.jpg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"contain"}})}),s.jsxs(tR,{children:[s.jsx(Z4,{children:"Welcome 👋🏼"}),s.jsx(Hg,{children:"email address"}),s.jsx(Wg,{placeholder:"이메일 입력",value:t,onChange:a=>{n(a.target.value)}}),s.jsx(Hg,{children:"password"}),s.jsx(Wg,{placeholder:"비밀번호 입력 (8 ~ 16자리)",value:r,type:"password",onChange:a=>{o(a.target.value)}}),s.jsx(X4,{onClick:async()=>{(await Q4({email:t,password:r})).status===200?(i(),e("/")):alert("틀렸습니다.")},children:"Login"}),s.jsx(J4,{children:s.jsxs("a",{href:"http://15.164.5.135:8080/users/sociallogin",style:{textDecoration:"none",color:"inherit",display:"inline-flex",alignItems:"center",gap:"8px"},children:[s.jsx("img",{src:"/images/naverlogo.png",alt:"Naver Logo",style:{width:"50px",height:"15px"}}),"계정으로 로그인"]})}),s.jsxs(Y4,{children:[s.jsx(Bg,{onClick:()=>{e("/signup")},children:"회원가입 하기"}),s.jsx(Bg,{onClick:()=>{e("/findpassword")},children:"비밀번호 찾기"})]})]})]})},Bg=c.div` + font-size: 13px; + font-weight: 400; + cursor: pointer; +`,Y4=c.div` + margin-top: 35px; + width: calc(100% - 20px); + display: inline-flex; + justify-content: space-around; +`,J4=c.div` + border: 1px solid #000; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 10px; + border-radius: 5px; + font-size: 13px; + cursor: pointer; + gap: 5px; +`,X4=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 35px; + cursor: pointer; +`,Wg=c.input` + width: calc(100% - 40px); + height: 25px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + padding: 5px 10px; + box-shadow: none; + outline: none; + transition: border-color 0.3s ease; + + &:focus { + border-color: #000; + } +`,Hg=c.div` + font-size: 12px; + font-weight: 500; + margin-top: 10px; +`,Z4=c.div` + font-size: 30px; + font-weight: 900; + margin-bottom: 20px; +`,eR=c.div` + flex: 6; + background-color: #fff; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,tR=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,nR=c.div` + display: flex; + width: 100%; + height: 100vh; +`;function rR(){const e=Ee(),[t,n]=w.useState(""),[r,o]=w.useState(""),[i,a]=w.useState(""),[l,u]=w.useState(""),[d,p]=w.useState("");return s.jsxs(uR,{children:[s.jsx(lR,{children:s.jsx("img",{src:"/images/login4.jpg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"contain"}})}),s.jsxs(cR,{children:[s.jsx(aR,{children:"회원가입"}),s.jsx(us,{children:"Name"}),s.jsx(cs,{placeholder:"이름 입력",value:t,onChange:f=>{n(f.target.value)}}),s.jsx(us,{children:"Phone Number"}),s.jsx(cs,{placeholder:"휴대폰 번호 입력",value:r,onChange:f=>{o(f.target.value)}}),s.jsx(us,{children:"Email Address"}),s.jsx(cs,{placeholder:"이메일 입력",value:i,onChange:f=>{a(f.target.value)}}),s.jsx(us,{children:"Password"}),s.jsx(cs,{placeholder:"비밀번호 입력 (8 ~ 16자리)",value:l,onChange:f=>{u(f.target.value)}}),s.jsx(us,{children:"Confirm Password"}),s.jsx(cs,{placeholder:"비밀번호 확인",value:d,onChange:f=>{p(f.target.value)}}),s.jsx(sR,{onClick:async()=>{l!==d?alert("비밀번호가 일치하지 않습니다."):(await W4({email:i,password:l,password_confirm:d,name:t,phone:r})).message==="이메일, 전화번호 중복 확인 완료"?(localStorage.setItem("email",i),localStorage.setItem("password",l),localStorage.setItem("password_confirm",d),localStorage.setItem("name",t),localStorage.setItem("phone",r),e("/termsandservice")):alert("이메일 또는 전화번호가 중복 되었습니다.")},children:"Signup"}),s.jsx(iR,{children:s.jsx(oR,{onClick:()=>{e("/signin")},children:"로그인하기"})})]})]})}const oR=c.div` + font-size: 13px; + font-weight: 400; + cursor: pointer; +`,iR=c.div` + margin-top: 35px; + width: calc(100% - 20px); + display: inline-flex; + justify-content: center; +`,sR=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 35px; + cursor: pointer; +`,cs=c.input` + width: calc(100% - 40px); + height: 25px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + padding: 5px 10px; + box-shadow: none; + outline: none; + transition: border-color 0.3s ease; + + &:focus { + border-color: #000; + } +`,us=c.div` + font-size: 12px; + font-weight: 500; + margin-top: 10px; +`,aR=c.div` + font-size: 30px; + font-weight: 900; + margin-bottom: 20px; +`,lR=c.div` + flex: 6; + background-color: #fff; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,cR=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,uR=c.div` + display: flex; + width: 100%; + height: 100vh; +`,dR=()=>{const e=Ee(),[t,n]=w.useState(!1),[r,o]=w.useState("");return s.jsxs(s.Fragment,{children:[s.jsxs(SR,{children:[s.jsx(jR,{children:s.jsx("img",{src:"/images/login7.jpg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"contain"}})}),s.jsxs(CR,{children:[s.jsxs(gR,{onClick:()=>{e(-1)},children:[s.jsx("img",{src:"/images/arrow-left.png",alt:"left arrow",style:{width:"20px",height:"20px"}}),"Back"]}),s.jsx(bR,{children:"비밀번호 찾기"}),s.jsx(xR,{children:"등록된 이메일 주소를 입력하고 확인 버튼을 클릭해주세요"}),s.jsx(wR,{children:"email address"}),s.jsx(vR,{placeholder:"이메일 입력",value:r,onChange:i=>{o(i.target.value)}}),s.jsx(yR,{onClick:async()=>{n(!0),(await K4({email:r})).message==="비밀번호 재설정 링크가 이메일로 전송되었습니다."&&e("/resetpassword")},children:"확인"})]})]}),t&&s.jsx(mR,{children:s.jsxs(hR,{children:[s.jsx(pR,{children:"이메일을 확인해주세요"}),s.jsx(fR,{onClick:()=>n(!1),children:"확인"})]})})]})},fR=c.button` + background-color: #000; + color: #fff; + border: none; + border-radius: 5px; + padding: 8px 20px; + cursor: pointer; + width: 100px; + height: 35px; + font-size: 14px; + + &:hover { + opacity: 0.9; + } +`,pR=c.div` + font-size: 16px; + font-weight: 500; + color: #333; +`,hR=c.div` + background-color: white; + padding: 30px; + border-radius: 10px; + width: 300px; + display: flex; + flex-direction: column; + align-items: center; + gap: 20px; +`,mR=c.div` + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,gR=c.div` + margin-bottom: 35px; + display: inline-flex; + align-items: center; + cursor: pointer; +`,xR=c.div` + margin-bottom: 20px; + color: #a4a1aa; + font-size: 14px; + font-weight: 500; + margin-top: 10px; +`,yR=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 35px; + cursor: pointer; +`,vR=c.input` + width: calc(100% - 40px); + height: 25px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + padding: 5px 10px; + box-shadow: none; + outline: none; + transition: border-color 0.3s ease; + + &:focus { + border-color: #000; + } +`,wR=c.div` + font-size: 12px; + font-weight: 500; + margin-top: 10px; +`,bR=c.div` + font-size: 30px; + font-weight: 900; +`,jR=c.div` + flex: 6; + background-color: #fff; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,CR=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,SR=c.div` + display: flex; + width: 100%; + height: 100vh; +`,kR=()=>{const e=Ee(),t=nt(),[n,r]=w.useState(""),[o,i]=w.useState(""),[a,l]=w.useState(!1),d=new URLSearchParams(t.search).get("token"),p=async()=>{n===o&&n.length>=8&&d?(await G4({newPassword:n},d),l(!0)):alert("비밀번호가 일치하지 않거나 유효하지 않습니다.")};return s.jsxs(NR,{children:[s.jsx(OR,{children:s.jsx("img",{src:"/images/login6.jpg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"contain"}})}),s.jsxs(TR,{children:[s.jsx(DR,{children:"비밀번호 재설정"}),s.jsx(Qg,{children:"password"}),s.jsx(Vg,{type:"password",placeholder:"비밀번호 입력 (8 ~ 16자리)",value:n,onChange:f=>r(f.target.value)}),s.jsx(Qg,{children:"confirm password"}),s.jsx(Vg,{type:"password",placeholder:"비밀번호 확인",value:o,onChange:f=>i(f.target.value)}),s.jsx(IR,{onClick:p,children:"Confirm"})]}),a&&s.jsx(ER,{children:s.jsxs(RR,{children:[s.jsx(AR,{children:"비밀번호가 변경되었습니다."}),s.jsx(PR,{onClick:()=>{e("/signin")},children:"Back to Login"})]})})]})},PR=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 40px); + height: 50px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 35px; + cursor: pointer; +`,ER=c.div` + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.7); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,RR=c.div` + width: 432px; + height: 332px; + background-color: white; + border-radius: 10px; + display: flex; + justify-content: center; + align-items: center; + text-align: center; + flex-direction: column; + z-index: 1001; +`,AR=c.div` + font-size: 18px; + font-weight: 800; + color: #333; +`,IR=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 35px; + cursor: pointer; +`,Vg=c.input` + width: calc(100% - 20px); + height: 25px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + padding: 5px 10px; + box-shadow: none; + outline: none; + transition: border-color 0.3s ease; + + &:focus { + border-color: #000; + } +`,Qg=c.div` + font-size: 12px; + font-weight: 500; + margin-top: 10px; +`,DR=c.div` + font-size: 30px; + font-weight: 900; + margin-bottom: 20px; +`,OR=c.div` + flex: 6; + background-color: #fff; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,TR=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,NR=c.div` + display: flex; + width: 100%; + height: 100vh; +`,LR=` +1. 서비스 이용약관 동의 + +제1조 (목적) + +이 약관은 사용자가 제공받는 서비스의 이용 조건 및 절차, 회사와 사용자 간의 권리·의무 및 책임사항, 기타 필요한 사항을 규정함을 목적으로 합니다. + +제2조 (서비스 제공의 범위 및 이용자의 책임) + +1. 회사는 사용자가 공동구매 및 할인 플랫폼에서 상품을 검색, 구매, 참여할 수 있는 서비스를 제공합니다. +2. 사용자는 서비스 이용 시 타인의 권리를 침해하거나 법령을 위반하는 행위를 해서는 안 됩니다. +3. 사용자는 자신의 계정 정보를 안전하게 관리할 책임이 있으며, 이를 제3자에게 공유하거나 양도해서는 안 됩니다. + +제3조 (서비스 이용 제한 및 해지 조건) + +1. 회사는 다음의 경우 사용자에게 사전 통지 없이 서비스 이용을 제한하거나 해지할 수 있습니다. + - 약관을 위반한 경우 + - 부정한 방법으로 서비스를 이용한 경우 + - 기타 공공질서 및 미풍양속에 반하는 행위를 한 경우 +2. 사용자는 서비스 이용을 원하지 않을 경우 언제든지 탈퇴 신청을 할 수 있습니다. + +제4조 (분쟁 해결 및 법적 준거법) + +1. 이 약관과 관련된 모든 분쟁은 회사가 위치한 지역의 법률을 준거법으로 합니다. +2. 분쟁이 발생할 경우, 회사와 사용자는 상호 협의하여 해결을 위해 노력합니다. +`,_R=` +2. 전자 금융거래 이용약관 동의 + +제1조 (목적) + +이 약관은 사용자가 전자 금융거래를 이용하는 경우 발생하는 권리, 의무 및 책임사항을 규정하는 것을 목적으로 합니다. + +제2조 (전자 금융거래의 정의 및 적용 범위) + +1. 전자 금융거래란 인터넷, 모바일 애플리케이션 등 전자적 매체를 통해 상품 구매 시 발생하는 결제 행위를 말합니다. +2. 본 약관은 사용자가 결제 서비스, 환불 절차 등과 관련하여 전자 금융거래를 이용하는 모든 경우에 적용됩니다. + +제3조 (전자 금융거래 이용자의 권리와 의무) + +1. 사용자는 정확한 결제 정보를 입력하고, 비밀번호 등 중요한 정보를 안전하게 관리해야 합니다. +2. 회사는 전자 금융거래와 관련된 모든 정보를 투명하고 명확하게 제공하며, 이용자의 권리를 보호합니다. + +제4조 (사고 발생 시 손해 배상 기준 및 절차) + +1. 사용자가 전자 금융거래 이용 중 사고를 경험한 경우, 회사는 관련 법령에 따라 손해를 배상합니다. +2. 사용자는 사고 발생 시 지체 없이 회사에 알리고 필요한 증빙 자료를 제출해야 합니다. +`,MR=` +3. 개인정보 제공 동의 + +제1조 (수집되는 개인정보의 항목 및 이용 목적) + +1. 회사는 서비스 제공을 위해 다음과 같은 개인정보를 수집합니다: + - 필수 정보: 이름, 연락처, 이메일, 결제 정보 + - 선택 정보: 배송 주소, 기타 서비스 이용 시 필요한 정보 +2. 수집된 개인정보는 다음 목적으로 이용됩니다: + - 회원 가입 및 관리 + - 상품 구매 및 배송 + - 고객 서비스 및 공지사항 전달 + +제2조 (개인정보 보관 기간 및 삭제 절차) + +1. 회사는 사용자의 개인정보를 법령에서 정한 기간 동안 보관하며, 그 이후에는 즉시 삭제합니다. + - 회원 정보: 회원 탈퇴 후 30일 내 삭제 + - 결제 정보: 거래 완료 후 5년간 보관 (전자상거래법에 의거) +2. 개인정보 삭제 요청 시, 회사는 7일 이내에 삭제를 완료합니다. + +제3조 (개인정보 제3자 제공 여부와 제공 목적) + +1. 회사는 사용자의 동의 없이 개인정보를 제3자에게 제공하지 않습니다. +2. 서비스 제공 과정에서 필요한 경우, 제3자에게 제공될 수 있으며, 주요 제공 대상과 목적은 다음과 같습니다: + - 배송 업체: 상품 배송 + - 결제 대행사: 결제 처리 + - 법적 요청: 관련 법령 준수를 위한 제공 + `,$R=()=>{const e=Ee(),[t,n]=w.useState(!1),[r,o]=w.useState(""),[i,a]=w.useState(""),l=h=>{switch(h){case"service":a("서비스 이용약관"),o(LR);break;case"finance":a("전자 금융거래 이용약관"),o(_R);break;case"privacy":a("개인정보 제공 동의"),o(MR);break}n(!0)},[u,d]=w.useState({all:!1,age:!1,service:!1,finance:!1,privacy:!1,marketing:!1}),p=()=>{const h=!u.all;d({all:h,age:h,service:h,finance:h,privacy:h,marketing:h})},f=h=>{d(b=>{const y={...b,[h]:!b[h]};return y.all=y.age&&y.service&&y.finance&&y.privacy&&y.marketing,y})};return s.jsxs(s.Fragment,{children:[s.jsxs(JR,{children:[s.jsx(qR,{children:s.jsx("img",{src:"/images/login2.jpg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"contain"}})}),s.jsxs(YR,{children:[s.jsxs(GR,{children:["서비스 약관에",s.jsx("br",{}),"동의해주세요."]}),s.jsxs(VR,{children:[s.jsxs(Mo,{children:[s.jsx("input",{type:"checkbox",checked:u.all,onChange:p}),"약관에 모두 동의"]}),s.jsx(QR,{}),s.jsxs(Qa,{children:[s.jsxs(Mo,{children:[s.jsx("input",{type:"checkbox",checked:u.age,onChange:()=>f("age")}),"(필수) 만 14세 이상입니다."]}),s.jsx(Va,{})]}),s.jsxs(Qa,{children:[s.jsxs(Mo,{children:[s.jsx("input",{type:"checkbox",checked:u.service,onChange:()=>f("service")}),"(필수) 서비스 이용약관 동의"]}),s.jsx(Va,{onClick:()=>l("service"),children:"보기"})]}),s.jsxs(Qa,{children:[s.jsxs(Mo,{children:[s.jsx("input",{type:"checkbox",checked:u.finance,onChange:()=>f("finance")}),"(필수) 전자 금융거래 이용약관 동의"]}),s.jsx(Va,{onClick:()=>l("finance"),children:"보기"})]}),s.jsxs(Qa,{children:[s.jsxs(Mo,{children:[s.jsx("input",{type:"checkbox",checked:u.privacy,onChange:()=>f("privacy")}),"(필수) 개인정보 제공 동의"]}),s.jsx(Va,{onClick:()=>l("privacy"),children:"보기"})]}),s.jsxs(Mo,{children:[s.jsx("input",{type:"checkbox",checked:u.marketing,onChange:()=>f("marketing")}),"(선택) 마케팅 수신 동의"]})]}),s.jsx(KR,{onClick:()=>{u.age&&u.service&&u.finance&&u.privacy?e("/setlocation"):alert("필수 항목을 모두 동의해주세요.")},children:"Next"})]})]}),t&&s.jsx(HR,{children:s.jsxs(WR,{children:[s.jsxs(BR,{children:[s.jsx(UR,{children:i}),s.jsx(FR,{onClick:()=>n(!1),children:"×"})]}),s.jsx(zR,{children:s.jsx("pre",{children:r})})]})})]})},zR=c.div` + padding: 20px; + max-height: calc(80vh - 100px); + overflow-y: auto; + + pre { + white-space: pre-wrap; + font-family: inherit; + margin: 0; + } +`,FR=c.button` + background: none; + border: none; + font-size: 24px; + cursor: pointer; + padding: 0; +`,UR=c.h2` + margin: 0; + font-size: 20px; + font-weight: 600; +`,BR=c.div` + display: flex; + justify-content: space-between; + align-items: center; + padding: 20px; + border-bottom: 1px solid #eee; +`,WR=c.div` + background-color: white; + width: 80%; + max-width: 600px; + max-height: 80vh; + border-radius: 10px; + overflow: hidden; +`,HR=c.div` + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,Va=c.div` + font-size: 10px; + color: #737171; + cursor: pointer; +`,VR=c.div` + margin-top: 20px; + width: calc(100% - 20px); +`,Qa=c.div` + display: inline-flex; + justify-content: space-between; + width: 100%; +`,Mo=c.div` + margin-bottom: 10px; + display: flex; + align-items: center; + font-size: 14px; + + input { + margin-right: 10px; + } +`,QR=c.div` + height: 1px; + background-color: #ddd; + margin: 15px 0; +`,KR=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 35px; + cursor: pointer; +`,GR=c.div` + font-size: 30px; + font-weight: 900; + margin-bottom: 20px; +`,qR=c.div` + flex: 6; + background-color: #fff; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,YR=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,JR=c.div` + display: flex; + width: 100%; + height: 100vh; +`,XR=({input:e,setInput:t})=>s.jsx(ZR,{children:s.jsx(e5,{type:"text",value:e,onChange:n=>t(n.target.value),placeholder:"검색어를 입력하세요"})}),ZR=c.div` + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + margin-top: 2rem; +`,e5=c.input` + padding: 1rem 2rem; + font-size: 1.5rem; + width: 60%; + border: 2px solid #ccc; + border-radius: 8px; + outline: none; + transition: all 0.3s ease; + + &:focus { + border-color: #4f86e6; + box-shadow: 0 0 10px rgba(79, 134, 230, 0.3); + } + + ::placeholder { + color: #888; + } + @media (min-width: 576px) and (max-width: 767px) { + font-size: 1rem; + } +`,t5=({input:e,products:t})=>{const[n,r]=w.useState(1),[o,i]=w.useState("판매 상품"),a=16,l=(n-1)*a,u=o==="마감 상품"?t.filter(f=>f.available===!1&&new Date(f.deadline)f.available===!0&&new Date(f.deadline)>new Date),d=Math.ceil(u.length/a);w.useEffect(()=>{r(1)},[o]);const p=u.slice(l,l+a);return s.jsxs(n5,{children:[s.jsxs(r5,{children:[s.jsxs(o5,{children:[s.jsx(Kg,{selected:o==="판매 상품",onClick:()=>i("판매 상품"),children:"판매 상품"}),s.jsx(Kg,{selected:o==="마감 상품",onClick:()=>i("마감 상품"),children:"마감 상품"})]}),e?`${e}에 대한 검색 결과`:""]}),s.jsx(i5,{children:p.map(f=>s.jsxs(s5,{selected:o==="판매 상품",children:[s.jsxs(a5,{to:`/products/${f.id}`,children:[s.jsx(l5,{src:f.url||In,alt:f.name,onError:h=>{h.currentTarget.src=In}}),s.jsxs(c5,{children:[s.jsx(u5,{children:f.name}),s.jsxs(d5,{children:[" ",s.jsx(da,{rating:f.rating})]}),s.jsx(f5,{children:f.available?s.jsxs(s.Fragment,{children:[s.jsxs(p5,{children:[f.originalprice,"원"]}),s.jsxs(h5,{children:[f.discountprice,"원"]})]}):s.jsx(m5,{children:"∞ (판매 종료)"})})]})]}),s.jsx(g5,{likes:f.likes})]},f.id))}),d>1&&s.jsx(x5,{children:s.jsx(oh,{currentPage:n,totalPages:d,onPageChange:f=>r(f)})})]})},n5=c.div` + display: flex; + flex-wrap: wrap; + width: 80%; + height: auto; + margin: 0 auto; +`,r5=c.h2` + margin-left: 10px; + margin-bottom: 20px; + font-size: 1.5rem; + color: #333; +`,o5=c.div` + width: 200px; + display: flex; + gap: 25px; + margin-top: -15%; + margin-bottom: 5%; +`,Kg=c.h2.withConfig({shouldForwardProp:e=>e!=="selected"})` + cursor: pointer; + text-decoration: ${({selected:e})=>e?"underline":"none"}; + font-size: 16px; +`,i5=c.div` + display: grid; + grid-template-columns: repeat(4, 1fr); + width: 100%; + gap: 20px; + margin-top: 20px; + @media (min-width: 576px) and (max-width: 767px) { + gap: 5px; + } +`,s5=c.div.withConfig({shouldForwardProp:e=>e!=="selected"})` + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 15px; + margin: 10px; + width: 200px; + background-color: ${({selected:e})=>e?"white":"#474545"}; + border-radius: 8px; + box-shadow: ${({selected:e})=>e?"0 4px 6px rgba(0, 0, 0, 0.1)":"none"}; + opacity: ${({selected:e})=>e?1:.6}; + align-items: center; + position: relative; + transition: all 0.3s ease-in-out; + &::after { + content: ${({selected:e})=>e?'""':'"판매 종료"'}; + position: absolute; + top: 10px; + left: 50%; + transform: translateX(-50%); + color: #474545; + font-size: 14px; + font-weight: bold; + padding: 5px 10px; + border-radius: 5px; + } + &:hover { + cursor: pointer; + box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.4); + transform: translateY(-5px); + } + @media (min-width: 768px) and (max-width: 1024px) { + width: 130px; + } + @media (min-width: 576px) and (max-width: 767px) { + width: 90px; + } +`,a5=c(An)` + text-decoration: none; + &:link { + color: inherit; + } + &:visited { + color: inherit; + } + &:active { + color: inherit; + } +`,l5=c.img` + width: 90%; + height: 200px; + background-color: #e0e0e0; + border-radius: 8px; + object-fit: cover; + @media (min-width: 576px) and (max-width: 767px) { + width: 110px; + height: 110px; + } +`,c5=c.div` + display: flex; + flex-direction: column; + width: 90%; +`,u5=c.div` + font-size: 16px; + font-weight: bold; + margin-top: 10px; + text-align: left; + @media (min-width: 576px) and (max-width: 767px) { + font-size: 12px; + } +`,d5=c.div` + font-size: 20px; + color: #ffaa00; + text-align: left; + margin-left: -5px; + margin-top: 5px; + @media (min-width: 576px) and (max-width: 767px) { + display: none; + } +`,f5=c.div` + display: flex; + flex-direction: column; + width: 100%; + margin-top: 30px; + text-align: left; +`,p5=c.div` + text-decoration: line-through; + color: #999; + font-size: 14px; + @media (min-width: 576px) and (max-width: 767px) { + font-size: 10px; + position: absolute; + bottom: 25px; + } +`,h5=c.div` + font-size: 16px; + font-weight: bold; + color: #ff4d4f; + @media (min-width: 576px) and (max-width: 767px) { + font-size: 12px; + position: absolute; + bottom: 10px; + } +`,m5=c.div` + font-size: 20px; + color: gray; + @media (min-width: 576px) and (max-width: 767px) { + font-size: 12px; + position: absolute; + bottom: 10px; + } +`,g5=c.img.withConfig({shouldForwardProp:e=>e!=="likes"})` + position: absolute; + bottom: 20px; + right: 30px; + width: 25px; + height: 25px; + cursor: pointer; + content: ${({likes:e})=>`url(${e?E1:P1})`}; + color: ${({likes:e})=>e?"red ":"transparent"}; + + &:hover { + cursor: pointer; + transform: scale(1.2); + transition: transform 0.2s ease-in-out; + } + @media (min-width: 576px) and (max-width: 767px) { + bottom: 10px; + right: 10px; + width: 18px; + height: 18px; + } +`,x5=c.div` + margin-top: 100px; + display: flex; + justify-content: center; + width: 100%; +`,y5=()=>{const{data:e,isLoading:t,isError:n}=Sv(),[r,o]=w.useState(""),i=nt();w.useEffect(()=>{const p=new URLSearchParams(i.search).get("category");p&&o(p)},[]);const a=d=>[...d].sort((f,h)=>{var b,y;return(((b=h.reviews)==null?void 0:b.length)||0)-(((y=f.reviews)==null?void 0:y.length)||0)}),u=w.useMemo(()=>e?a(e):[],[e]).filter(d=>d.name.toLowerCase().includes(r.toLowerCase())||d.category.toLowerCase().includes(r.toLowerCase()));return s.jsx(s.Fragment,{children:s.jsxs(Ro,{isLoading:t,isError:n,children:[s.jsx(Gg,{children:s.jsx(qg,{children:s.jsx(XR,{input:r,setInput:o})})}),s.jsxs(Gg,{children:[s.jsx(qg,{children:s.jsx(t5,{input:r,products:u})}),s.jsx(rh,{})]})]})})},Gg=c.div` + display: flex; + margin-top: 5vh; + align-items: center; + justify-content: center; + width: 100%; + max-width: 1400px; + margin-left: auto; + margin-right: auto; +`,qg=c.div` + display: flex; + align-items: center; + width: 100%; +`,v5=async(e,t)=>{try{const n=`/api/v1/orders?postId=${e}`;return(await re.post(n,{amount:t})).data}catch{throw new Error("주문에 실패하였습니다.")}},w5=async e=>{try{const t="/products/wishlist",{data:n}=await re.post(t,e);return n}catch{throw new Error("위시리스트 추가에 실패하였습니다.")}},b5=async(e,t)=>{const n=`/api/review/${e}`;return await re.post(n,t)},j5=async(e,t)=>{const n=`/api/review/update/${e}`;return await re.put(n,t)},C5=async e=>{const t=`/api/review/remove/${e}`;return await re.put(t)},S5=({initReviews:e,productId:t})=>{const[n,r]=w.useState(e),[o,i]=w.useState(""),[a,l]=w.useState(5),[u,d]=w.useState(10),[p,f]=w.useState(null),[h,b]=w.useState(""),[y,x]=w.useState(5),j=n.map((R,I)=>({...R,originalIndex:I})).filter(R=>R.using===!0),g=()=>{d(R=>R+10)},m=async R=>{R.preventDefault();try{await b5(t,{content:o,rate:a}),r(I=>[...I,{content:o,rating:a,using:!0}]),i(""),l(5)}catch{alert("현재 댓글을 작성할 수 없는 상태입니다.")}},v=(R,I,L)=>{f(R),b(I),x(L)},C=async R=>{try{const I=j[R].originalIndex,L=I+1;await j5(L,{content:h,rate:y}),r(B=>B.map((N,O)=>O===I?{...N,content:h,rating:y}:N)),f(null),b(""),x(5)}catch{alert("현재 댓글을 수정할 수 없는 상태입니다.")}},P=()=>{f(null),b(""),x(5)},S=async R=>{try{const I=j[R].originalIndex,L=I+1;await C5(L),r(B=>B.map((N,O)=>O===I?{...N,using:!1}:N))}catch{alert("현재 댓글을 삭제할 수 없는 상태입니다.")}};return s.jsxs($5,{children:[s.jsx(k5,{onSubmit:m,children:s.jsxs(P5,{children:[s.jsx(E5,{value:o,onChange:R=>i(R.target.value),placeholder:"댓글을 입력하세요"}),s.jsx(Yg,{value:a,onChange:R=>l(Number(R.target.value)),children:[1,2,3,4,5].map(R=>s.jsx("option",{value:R,children:"⭐".repeat(R)},R))}),s.jsx(R5,{type:"submit",children:"댓글 달기"})]})}),s.jsxs("div",{children:[j.slice(0,u).map((R,I)=>s.jsx(A5,{children:p===I?s.jsxs(L5,{children:[s.jsx(_5,{value:h,onChange:L=>b(L.target.value)}),s.jsx(Yg,{value:y,onChange:L=>x(Number(L.target.value)),children:[1,2,3,4,5].map(L=>s.jsx("option",{value:L,children:"⭐".repeat(L)},L))}),s.jsxs(M5,{children:[s.jsx(Ka,{onClick:()=>C(I),color:"primary",children:"저장"}),s.jsx(Ka,{onClick:P,color:"secondary",children:"취소"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs(I5,{children:[s.jsx(D5,{children:R.content}),s.jsx(O5,{children:"⭐".repeat(R.rating)})]}),s.jsxs(Ov,{children:[s.jsx(Ka,{onClick:()=>v(I,R.content,R.rating),children:"수정"}),s.jsx(Ka,{onClick:()=>S(I),children:"삭제"})]})]})},R.originalIndex)),s.jsx(T5,{children:u{const[t,n]=w.useState(1);return s.jsx(Tv.Provider,{value:{quantity:t,setQuantity:n},children:e})},Nv=()=>{const e=w.useContext(Tv);if(!e)throw new Error("useQuantity must be used within a QuantityProvider");return e},F5=()=>{const{id:e}=$i(),t=w.useMemo(()=>e&&!isNaN(Number(e))?Number(e):null,[e]);if(!t)return s.jsx("p",{children:"잘못된 상품 ID입니다."});const{data:n,isLoading:r,isError:o}=ma(t||0),{quantity:i,setQuantity:a}=Nv(),[l,u]=w.useState(""),d=Ee(),h=(n?n.now>=n.currentStock:!1)||l==="마감되었습니다.";w.useEffect(()=>{if(!n)return;const g=()=>{const v=new Date,P=new Date(n.deadline).getTime()-v.getTime();if(P<=0||n.available===!1){u("마감되었습니다.");return}const S=Math.floor(P/(1e3*60*60*24)),R=Math.floor(P%(1e3*60*60*24)/(1e3*60*60)),I=Math.floor(P%(1e3*60*60)/(1e3*60));u(`${S}일 ${R}시간 ${I}분 남음`)};g();const m=setInterval(g,6e4);return()=>clearInterval(m)},[n]);const b=g=>{const m=parseInt(g.target.value);m>0&&a(m)},y=async()=>{await v5(t,i),d(`/products/payment/${t}`)};if(!n)return s.jsx("p",{children:"상품 정보를 불러올 수 없습니다."});const x=n.minamount-(n.initstock-n.currentStock),j=Math.min((n.initstock-n.currentStock)/n.currentStock*100,100);return s.jsx(s.Fragment,{children:s.jsx(Ro,{isLoading:r,isError:o,children:s.jsxs(U5,{children:[s.jsxs(B5,{children:[s.jsxs(W5,{children:[s.jsx(V5,{src:n.url||In,alt:n.name,onError:g=>g.currentTarget.src=In}),s.jsx(K5,{children:s.jsx(da,{rating:n.rating})})]}),s.jsxs(H5,{children:[s.jsx(Q5,{children:n.name}),s.jsx(G5,{children:n.available?s.jsxs(s.Fragment,{children:[s.jsxs(X5,{children:[n.originalprice,"원"]}),s.jsxs(Y5,{children:[s.jsxs(Z5,{children:[n.discountprice,"원"]}),s.jsxs(J5,{children:[n.minamount,"개부터 할인 적용"]})]}),x>0&&s.jsxs(eA,{children:["할인 적용까지 ",x,"개 남음"]})]}):s.jsx(q5,{children:"∞ (판매 종료)"})})," ",n.available&&s.jsx(tA,{children:n.description}),s.jsx(nA,{children:l}),s.jsxs(rA,{children:[s.jsx(oA,{children:"현재 구매 현황"}),s.jsx(iA,{children:s.jsx(sA,{style:{width:`${j}%`}})}),s.jsxs(aA,{children:[n.initstock-n.currentStock," /"," ",n.initstock," 구매됨"]})]}),s.jsxs(lA,{children:[s.jsxs(cA,{children:[s.jsx(uA,{children:"수량"}),s.jsx(dA,{type:"number",min:"1",value:i,onChange:b})]}),s.jsxs(fA,{children:[s.jsx(pA,{disabled:h,onClick:y,children:"구매하기"}),s.jsx(hA,{onClick:()=>w5(n.id),children:"찜하기"})]})]})]})]}),s.jsx(S5,{productId:t,initReviews:n.reviews})]})})})},U5=c.div` + width: 90%; + max-width: 1200px; + margin: 0 auto; + padding: 20px; +`,B5=c.div` + display: flex; + gap: 40px; + margin-bottom: 40px; +`,W5=c.div` + position: relative; + flex: 1; + @media (min-width: 576px) and (max-width: 767px) { + height: 300px; + width: 300px; + } +`,H5=c.div` + flex: 1; +`,V5=c.img` + width: 100%; + height: 400px; + background-color: #f5f5f5; + object-fit: cover; + @media (min-width: 576px) and (max-width: 767px) { + height: 300px; + width: 300px; + } +`,Q5=c.h2` + font-size: 24px; + font-weight: bold; + margin-bottom: 10px; +`,K5=c.div` + position: absolute; + font-size: 20px; + color: #ffaa00; + bottom: 80px; + right: 2%; + + @media (min-width: 768px) and (max-width: 1024px) { + bottom: 80px; + } + @media (min-width: 576px) and (max-width: 767px) { + bottom: 10px; + } +`,G5=c.div` + display: flex; + gap: 10px; + margin-bottom: 20px; + @media (min-width: 576px) and (max-width: 767px) { + flex-direction: column; + } +`,q5=c.div` + font-size: 2.3rem; + color: gray; +`,Y5=c.div` + display: flex; + flex-direction: column; + gap: 4px; +`,J5=c.div` + font-size: 14px; + color: #888; + @media (min-width: 768px) and (max-width: 1024px) { + margin-left: -50%; + } + @media (min-width: 576px) and (max-width: 767px) { + font-size: 12px; + } +`,X5=c.div` + text-decoration: line-through; + color: #999; + font-size: 18px; + @media (min-width: 576px) and (max-width: 767px) { + font-size: 12px; + } +`,Z5=c.div` + font-weight: bold; + color: #ff4d4f; + font-size: 24px; + @media (min-width: 576px) and (max-width: 767px) { + margin-top: -10px; + font-size: 18px; + } +`,eA=c.div` + display: inline-flex; + align-items: center; + background-color: #fff3f3; + border: 1px solid #ffcdd2; + border-radius: 20px; + padding: 8px 16px; + color: #ff4d4f; + font-size: 14px; + font-weight: 600; + &::before { + content: '🏷️'; + margin-right: 8px; + font-size: 16px; + } + @media (min-width: 768px) and (max-width: 1024px) { + width: 220px; + } +`,tA=c.p` + margin-bottom: 30px; + line-height: 1.6; + color: #666; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; + @media (min-width: 576px) and (max-width: 767px) { + -webkit-line-clamp: 2; + } +`,nA=c.div` + font-size: 16px; + color: #ff4d4f; + margin-bottom: 20px; +`,rA=c.div` + margin-bottom: 20px; +`,oA=c.div` + font-size: 16px; + margin-bottom: 5px; + color: #333; +`,iA=c.div` + width: 100%; + height: 10px; + background-color: #ddd; + border-radius: 5px; + overflow: hidden; +`,sA=c.div` + height: 100%; + background-color: #4caf50; + transition: width 0.3s ease; +`,aA=c.div` + margin-top: 5px; + font-size: 14px; + color: #555; +`,lA=c.div` + display: flex; + flex-direction: column; + gap: 20px; + @media (min-width: 576px) and (max-width: 767px) { + margin-top: -40px; + margin-left: -340px; + } +`,cA=c.div` + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 10px; + width: 120px; + font-size: 16px; + border-radius: 8px; + padding: 10px 15px; +`,uA=c.span` + font-weight: bold; + color: #333; +`,dA=c.input` + width: 40px; + height: 40px; + text-align: center; + font-size: 16px; + padding: 0 10px; + border: 1px solid #ccc; + border-radius: 5px; + background-color: #fff; + transition: border-color 0.3s ease; + + &:focus { + border-color: #4a90e2; + outline: none; + } + + &::placeholder { + color: #aaa; + } +`,fA=c.div` + display: flex; + gap: 10px; +`,pA=c.button` + flex: 2; + padding: 15px; + background-color: ${({disabled:e})=>e?"#d1d5db":"#2563eb"}; + color: ${({disabled:e})=>e?"#9ca3af":"white"}; + border: none; + border-radius: 5px; + cursor: ${({disabled:e})=>e?"not-allowed":"pointer"}; + font-size: 16px; + font-weight: bold; + text-decoration: none; + text-align: center; + pointer-events: ${({disabled:e})=>e?"none":"auto"}; /* 비활성화 시 클릭 불가 */ + + &:hover { + cursor: ${({disabled:e})=>e?"not-allowed":"pointer"}; /* 비활성화 상태에서 hover 시 커서 변경 */ + background-color: ${({disabled:e})=>e?"#d1d5db":"white"}; + color: ${({disabled:e})=>e?"#9ca3af":"#2563eb"}; + border: ${({disabled:e})=>e?"none":"1px solid #2563eb"}; + } +`,hA=c.button` + flex: 1; + padding: 15px; + background-color: white; + color: #2563eb; + border: 1px solid #2563eb; + border-radius: 5px; + cursor: pointer; + font-size: 16px; + font-weight: bold; + &:hover { + cursor: pointer; + background-color: #2563eb; + color: white; + } +`,mA=c.div` + display: inline-flex; + gap: 20px; + width: 100%; +`,gA=c.div` + width: 100%; + padding: 0px 20px; +`,vt={Wrapper:mA,Content:gA},xA=async e=>(await re.post("/api/mypage/verify",e)).data,yA=async e=>(await re.post("/api/mypage/change",e)).data,vA=async e=>(await re.put("/api/mypage/changeneighbor",e)).data,wA=async()=>{const e=await re.get("/api/mypage/orders");return e.status!==204?e.data:[]},bA=async()=>(await re.get("/api/mypage/refund_orders")).data,Lv=async()=>(await re.get("/api/mypage")).data,jA=async()=>(await re.get("/api/mypage/community")).data,CA=async()=>(await re.get("/api/mypage/post")).data,SA=async e=>(await re.delete(`/api/mypage/post/${e}`)).data,kA=async e=>(await re.post("/api/v1/main-payments/cancel",e)).data,PA=async e=>{const t=new FormData;return t.append("profile",e),(await re.put("/api/mypage/editprofile",t,{headers:{"Content-Type":"multipart/form-data"}})).data},Wr=()=>{const e=Ee(),t=nt(),[n,r]=w.useState(null),[o,i]=w.useState(""),a=l=>t.pathname===l;return w.useEffect(()=>{(async()=>{try{const u=await Lv();r(u.profile),i(u.name)}catch(u){console.error("failed",u)}})()},[]),s.jsxs(RA,{children:[s.jsxs(AA,{children:[s.jsx(IA,{src:n||"/images/origin.png",alt:"Profile"}),s.jsxs(DA,{children:[s.jsx(OA,{children:"Hello 👋"}),s.jsx(TA,{children:o})]})]}),s.jsx(EA,{}),s.jsxs(NA,{children:[s.jsxs(ar,{$isActive:a("/mypage/setting"),onClick:()=>e("/mypage/setting"),children:[s.jsx("img",{src:`/images/setting${a("/mypage/setting")?"_on":""}.png`,width:24,height:24,alt:"Icon"}),"설정"]}),s.jsxs(ar,{$isActive:a("/mypage/orderlist"),onClick:()=>e("/mypage/orderlist"),children:[s.jsx("img",{src:`/images/orderlist${a("/mypage/orderlist")?"_on":""}.png`,width:24,height:24,alt:"Icon"}),"주문 내역"]}),s.jsxs(ar,{$isActive:a("/mypage/wishlist"),onClick:()=>e("/mypage/wishlist"),children:[s.jsx("img",{src:`/images/wishlist${a("/mypage/wishlist")?"_on":""}.png`,width:24,height:24,alt:"Icon"}),"찜한 상품"]}),s.jsxs(ar,{$isActive:a("/mypage/location"),onClick:()=>e("/mypage/location"),children:[s.jsx("img",{src:`/images/location${a("/mypage/location")?"_on":""}.png`,width:24,height:24,alt:"Icon"}),"동네인증"]}),s.jsxs(ar,{$isActive:a("/mypage/refund"),onClick:()=>e("/mypage/refund"),children:[s.jsx("img",{src:`/images/refund${a("/mypage/refund")?"_on":""}.png`,width:24,height:24,alt:"Icon"}),"환불계좌 관리"]}),s.jsxs(ar,{$isActive:a("/mypage/notification"),onClick:()=>e("/mypage/notification"),children:[s.jsx("img",{src:`/images/notification${a("/mypage/notification")?"_on":""}.png`,width:24,height:24,alt:"Icon"}),"알림내역"]}),s.jsxs(ar,{$isActive:a("/mypage/myposts"),onClick:()=>e("/mypage/myposts"),children:[s.jsx("img",{src:`/images/myposts${a("/mypage/myposts")?"_on":""}.png`,width:24,height:24,alt:"Icon"}),"나의 게시글"]}),s.jsxs(ar,{$isActive:a("/mypage/chatlist"),onClick:()=>e("/mypage/chatlist"),children:[s.jsx("img",{src:`/images/chatlist${a("/mypage/chatlist")?"_on":""}.png`,width:24,height:24,alt:"Icon"}),"나의 채팅방 목록"]})]})]})},EA=c.div` + width: 100%; + border: 0.5px solid #888; +`,RA=c.div` + width: 260px; + min-width: 260px; + background-color: #fff; + border-radius: 10px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +`,AA=c.div` + display: flex; + align-items: center; + padding: 10px 20px; +`,IA=c.img` + width: 50px; + height: 50px; + border-radius: 50%; + margin-right: 15px; +`,DA=c.div` + display: flex; + flex-direction: column; +`,OA=c.div` + font-size: 14px; + color: #888; +`,TA=c.div` + margin-top: 15px; + font-size: 16px; + font-weight: bold; +`,NA=c.div` + display: flex; + flex-direction: column; + gap: 15px; + padding: 10px 20px; +`,ar=c.div` + display: flex; + align-items: center; + font-size: 14px; + font-weight: 500; + color: ${({$isActive:e})=>e?"#fff":"#333"}; + cursor: pointer; + height: 30px; + gap: 10px; + background-color: ${({$isActive:e})=>e?"#000":"transparent"}; + border-radius: 5px; + padding: 5px 10px; + + &:hover { + background-color: ${({$isActive:e})=>e?"#000":"#f1f1f1"}; + color: ${({$isActive:e})=>e?"#fff":"#000"}; + } +`,LA={addressList:[{id:1,name:"홍길동",address:"경기 성남시 분당구 판교역로 4",phone:"010-0000-0000"}]},_A=[{id:1,name:"Women Textured Handheld Bag",quantity:1,price:"$80.00",status:"환불 처리 중",thumb:""},{id:2,name:"Tailored Cotton Casual Shirt",quantity:1,price:"$40.00",status:"환불 완료",thumb:""}],MA=[{id:1,name:"트렌치코트",quantity:1,price:"148500원",thumb:"/images/trenchcoat.jpeg"},{id:2,name:"싱싱한 사과",quantity:1,price:"3500원",thumb:"/images/apple.png"},{id:3,name:"무선청소기",quantity:1,price:"118500원",thumb:"/images/vacuum.png"},{id:4,name:"목욕 수건",quantity:1,price:"3500원",thumb:"/images/towel.jpeg"}],$A=[{id:1,icon:"bell",title:"{제목} 공동구매 모집이 완료되었습니다.",time:"2024-11-20 13:30"},{id:2,icon:"bell",title:"{제목} 인원 부족으로 모집이 취소되었습니다.",time:"2024-11-19 11:30"},{id:3,icon:"chat",title:"{닉네임}님과 채팅을 시작했습니다.",time:"2024-11-17 15:00"},{id:4,icon:"comment",title:"{닉네임}님이 댓글을 남겼습니다.",time:"2024-11-16 11:10"}],zA=({onClose:e})=>{const[t,n]=w.useState(1),[r,o]=w.useState(""),[i,a]=w.useState(""),[l,u]=w.useState(""),d=async()=>{t===1?(await xA({currentPassword:r}),n(2)):t===2&&(i===l?(await yA({newPassword:i}),e()):alert("비밀번호가 일치하지 않습니다."))};return s.jsx(FA,{onClick:e,children:s.jsx(UA,{onClick:p=>p.stopPropagation(),children:s.jsxs(BA,{children:[t===1&&s.jsxs(s.Fragment,{children:[s.jsx($u,{children:"현재 비밀번호"}),s.jsxs(zu,{children:[s.jsx(Fu,{type:"password",placeholder:"현재 비밀번호를 입력하세요",value:r,onChange:p=>o(p.target.value)}),s.jsx(Jg,{onClick:d,children:"확인"})]})]}),t===2&&s.jsxs(s.Fragment,{children:[s.jsx($u,{children:"변경할 비밀번호"}),s.jsx(zu,{children:s.jsx(Fu,{type:"password",placeholder:"새 비밀번호를 입력하세요",value:i,onChange:p=>a(p.target.value)})}),s.jsx($u,{children:"비밀번호 확인"}),s.jsxs(zu,{children:[s.jsx(Fu,{type:"password",placeholder:"비밀번호를 다시 입력하세요",value:l,onChange:p=>u(p.target.value)}),s.jsx(Jg,{onClick:d,children:"변경"})]})]})]})})})},FA=c.div` + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.7); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,UA=c.div` + background-color: #fff; + width: 400px; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); + z-index: 1001; +`,BA=c.div` + font-size: 16px; + margin-bottom: 20px; +`,$u=c.div` + font-size: 14px; + font-weight: bold; + margin-bottom: 10px; +`,zu=c.div` + display: flex; + gap: 10px; + margin-bottom: 20px; +`,Fu=c.input` + flex: 1; + padding: 10px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 14px; +`,Jg=c.button` + background-color: #000; + color: #fff; + border: none; + padding: 10px 20px; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #333; + } +`,WA=({onClose:e})=>{const t=Ee(),{logout:n}=Uc();return s.jsx(HA,{onClick:e,children:s.jsx(VA,{onClick:r=>r.stopPropagation(),children:s.jsxs(QA,{children:[s.jsx(KA,{children:"로그아웃 하시겠습니까?"}),s.jsx(GA,{onClick:()=>{n(),t("/")},children:"확인"})]})})})},HA=c.div` + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.7); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,VA=c.div` + background-color: #fff; + width: 300px; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); + z-index: 1001; +`,QA=c.div` + font-size: 16px; +`,KA=c.div` + font-size: 14px; + font-weight: bold; + margin-bottom: 10px; +`,GA=c.button` + background-color: #000; + color: #fff; + border: none; + padding: 10px 20px; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #333; + } +`,qA=({onClose:e})=>{const t=Ee();return s.jsx(YA,{onClick:e,children:s.jsx(JA,{onClick:n=>n.stopPropagation(),children:s.jsxs(XA,{children:[s.jsx(ZA,{children:"회원탈퇴 하시겠습니까?"}),s.jsx(eI,{onClick:()=>{t("/")},children:"확인"})]})})})},YA=c.div` + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.7); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,JA=c.div` + background-color: #fff; + width: 300px; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); + z-index: 1001; +`,XA=c.div` + font-size: 16px; +`,ZA=c.div` + font-size: 14px; + font-weight: bold; + margin-bottom: 10px; +`,eI=c.button` + background-color: #000; + color: #fff; + border: none; + padding: 10px 20px; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #333; + } +`;var _v={},Mv={},Bc={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.postcodeScriptUrl=void 0;var t="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";e.postcodeScriptUrl="https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js";var n=function(){var o=null;return function(){var i=0"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(N){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},C(N)}function P(N,O,$){return O in N?Object.defineProperty(N,O,{value:$,enumerable:!0,configurable:!0,writable:!0}):N[O]=$,N}var S=n.default.createElement("p",null,"현재 Daum 우편번호 서비스를 이용할 수 없습니다. 잠시 후 다시 시도해주세요."),R={width:"100%",height:400},I={scriptUrl:r.postcodeScriptUrl,errorMessage:S,autoClose:!0},L=function(N){function O(){var F;f(this,O);for(var se=arguments.length,he=Array(se),oe=0;oe{const[e,t]=w.useState(LA.addressList),[n,r]=w.useState(!1),[o,i]=w.useState(!1),[a,l]=w.useState(!1),[u,d]=w.useState(""),[p,f]=w.useState(""),[h,b]=w.useState(""),[y,x]=w.useState(""),[j,g]=w.useState(""),[m,v]=w.useState(!1),[C,P]=w.useState(null),R=_v.useDaumPostcodePopup("https://t1.daumcdn.net/mapjsapi/bundle/postcode/prod/postcode.v2.js"),I=O=>{d(O.zonecode+" "+O.jibunAddress)},L=()=>{if(p&&h&&y&&j&&u){const O=`${h}-${y}-${j}`;e.push({id:Date.now(),name:p,address:u,phone:O}),f(""),b(""),x(""),g(""),d(""),v(!1)}},B=O=>{var F;const $=(F=O.target.files)==null?void 0:F[0];if($){const se=new FileReader;se.onload=()=>{se.result&&P(se.result.toString())},se.readAsDataURL($)}},N=O=>{t($=>$.filter(F=>F.id!==O))};return w.useEffect(()=>{(async()=>{try{const $=await Lv();P($.profile)}catch($){console.error("failed",$)}})()},[]),s.jsxs(vt.Wrapper,{children:[s.jsx(Wr,{}),s.jsxs(vt.Content,{children:[s.jsxs(AI,{children:[s.jsx("img",{src:C||"/images/origin.png",alt:"Profile",width:80,height:80,onClick:()=>{var O;return(O=document.getElementById("fileInput"))==null?void 0:O.click()},style:{cursor:"pointer"}}),s.jsx(RI,{onClick:async()=>{if(!C){alert("이미지를 먼저 업로드해주세요.");return}try{const O=await fetch(C).then(F=>F.blob()),$=new File([O],"profile.jpg",{type:O.type});await PA($),alert("프로필이 성공적으로 업데이트되었습니다.")}catch(O){alert("프로필 업데이트 중 오류가 발생했습니다."),console.error("API 오류:",O)}},children:"Edit Profile"}),s.jsx("input",{id:"fileInput",type:"file",accept:"image/*",style:{display:"none"},onChange:B})]}),s.jsxs(EI,{children:[s.jsx(Hu,{children:"닉네임 변경"}),s.jsx(PI,{placeholder:"최소 2자 이상 ~ 15자 이내, 띄어쓰기 및 특수문자 사용 불가"}),s.jsx(kI,{children:"변경하기"})]}),s.jsxs(SI,{children:[s.jsx(Hu,{children:"배송지 주소 변경"}),m?s.jsxs(nI,{children:[s.jsxs(oI,{children:[s.jsxs(Wu,{children:[s.jsx(Bu,{children:"이름"}),s.jsx(zv,{placeholder:"이름 입력",value:p,onChange:O=>f(O.target.value)})]}),s.jsxs(Wu,{children:[s.jsx(Bu,{children:"휴대폰 번호"}),s.jsxs(rI,{children:[s.jsx(Uu,{placeholder:"010",value:h,onChange:O=>b(O.target.value),maxLength:3}),s.jsx(Xg,{children:"-"}),s.jsx(Uu,{placeholder:"0000",value:y,onChange:O=>x(O.target.value),maxLength:4}),s.jsx(Xg,{children:"-"}),s.jsx(Uu,{placeholder:"0000",value:j,onChange:O=>g(O.target.value),maxLength:4})]})]})]}),s.jsx(lI,{children:s.jsxs(Wu,{children:[s.jsx(Bu,{children:"주소"}),s.jsxs(aI,{children:[s.jsx(iI,{onClick:()=>{R({onComplete:I})},children:"주소 검색"}),u&&s.jsx(sI,{children:u})]})]})}),s.jsxs(dI,{children:[s.jsx(cI,{onClick:L,children:"완료"}),s.jsx(uI,{onClick:()=>v(!1),children:"취소"})]})]}):s.jsx(CI,{onClick:()=>v(!0),children:"Add New Address"}),s.jsx(pI,{children:e==null?void 0:e.map(O=>s.jsxs(hI,{children:[s.jsxs(mI,{children:[s.jsx(gI,{children:O.name}),s.jsx(xI,{children:O.address}),s.jsx(yI,{children:O.phone})]}),s.jsx(vI,{children:s.jsx(fI,{onClick:()=>N(O.id),children:"Delete"})})]},O.id))})]}),s.jsxs(jI,{children:[s.jsx(Hu,{children:"비밀번호 변경"}),s.jsx(bI,{onClick:()=>{r(!0)},children:"비밀번호 변경하기"})]}),s.jsxs(wI,{children:[s.jsx(Zg,{onClick:()=>{i(!0)},children:"로그아웃"}),s.jsx(Zg,{onClick:()=>{l(!0)},children:"회원탈퇴"})]}),n&&s.jsx(zA,{onClose:()=>{r(!1)}}),o&&s.jsx(WA,{onClose:()=>{i(!1)}}),a&&s.jsx(qA,{onClose:()=>{l(!1)}})]})]})},nI=c.div` + display: flex; + flex-direction: column; + gap: 5px; +`,Xg=c.span` + color: #000; + font-size: 16px; +`,Uu=c.input` + width: 60px; + height: 25px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + padding: 5px 10px; + box-shadow: none; + outline: none; + transition: border-color 0.3s ease; + text-align: center; + + &:focus { + border-color: #000; + } +`,rI=c.div` + display: flex; + align-items: center; + gap: 8px; +`,Bu=c.div` + font-size: 12px; + color: #131118; + margin-top: 15px; + margin-bottom: 5px; +`,Wu=c.div` + display: flex; + flex-direction: column; +`,oI=c.div` + display: flex; + gap: 20px; + align-items: flex-end; +`,iI=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + padding: 5px 15px; + text-align: center; + cursor: pointer; + width: 90px; + height: 25px; + display: flex; + align-items: center; + justify-content: center; +`,sI=c.div` + margin-top: 5px; + font-size: 12px; + color: #555; +`,aI=c.div` + display: flex; + align-items: center; + gap: 15px; +`,lI=c.div``,cI=c.div` + display: inline-flex; + justify-content: center; + background-color: #f1f1f1; + border: 1px solid #ccc; + border-radius: 5px; + padding: 10px 20px; + text-align: center; + cursor: pointer; + flex: 1; + max-width: 175px; + + &:hover { + background-color: #ddd; + } +`,uI=c.div` + display: inline-flex; + justify-content: center; + background-color: #ffeded; + border: 1px solid #f5c6cb; + border-radius: 5px; + padding: 10px 20px; + text-align: center; + cursor: pointer; + color: #d9534f; + flex: 1; + max-width: 175px; + + &:hover { + background-color: #f8d7da; + } +`,dI=c.div` + display: flex; + gap: 10px; + margin-top: 10px; + width: 350px; +`,fI=c.div` + display: inline-flex; + justify-content: center; + background-color: #ffeded; + border: 1px solid #f5c6cb; + border-radius: 5px; + padding: 5px 10px; + cursor: pointer; + color: #d9534f; + + &:hover { + background-color: #f8d7da; + } +`,pI=c.div` + margin-top: 20px; +`,hI=c.div` + display: flex; + justify-content: space-between; + align-items: center; + padding: 10px; + border-bottom: 1px solid #ddd; + border-radius: 5px; + margin-bottom: 10px; +`,mI=c.div` + display: flex; + flex-direction: column; +`,gI=c.div` + font-size: 14px; + font-weight: bold; +`,xI=c.div` + font-size: 12px; + color: #555; + margin-top: 5px; +`,yI=c.div` + font-size: 12px; + color: #555; + margin-top: 5px; +`,vI=c.div` + display: flex; + gap: 10px; + flex-direction: column; +`,Zg=c.div` + margin-top: 20px; + cursor: pointer; +`,wI=c.div` + margin-top: 10px; +`,bI=c.div` + margin-top: 10px; + background-color: #000; + color: #fff; + border-radius: 5px; + padding: 10px 20px; + display: inline-flex; + align-items: center; + justify-content: center; + cursor: pointer; +`,jI=c.div` + margin-top: 30px; +`,CI=c.div` + margin-top: 10px; + background-color: #000; + color: #fff; + border-radius: 5px; + padding: 10px 50px; + display: inline-flex; + align-items: center; + justify-content: center; + cursor: pointer; +`,SI=c.div` + margin-top: 30px; +`,zv=c.input` + width: 150px; + height: 25px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + padding: 5px 10px; + box-shadow: none; + outline: none; + transition: border-color 0.3s ease; + + &:focus { + border-color: #000; + } +`,kI=c.div` + margin-top: 10px; + background-color: #000; + color: #fff; + border-radius: 5px; + padding: 10px 50px; + display: inline-flex; + align-items: center; + justify-content: center; + cursor: pointer; + margin-left: 15px; +`,PI=c(zv)` + width: 350px; +`,Hu=c.div` + font-size: 12px; + color: #131118; +`,EI=c.div` + margin-top: 20px; +`,RI=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + padding: 10px 20px; + display: inline-flex; + align-items: center; + justify-content: center; + cursor: pointer; +`,AI=c.div` + display: inline-flex; + align-items: center; + justify-content: space-between; + width: 100%; +`,II=()=>{const[e,t]=w.useState(!1),[n,r]=w.useState([]),[o,i]=w.useState(""),a=Ee(),l=()=>{t(!0)},u=async()=>{await kA({paymentKey:o,cancelReason:"test"}),t(!1)},d=()=>{t(!1)},p=f=>{switch(f){case"PENDING":return"결제 대기 중";case"AUTH_COMPLETED":return"결제 요청 인증 성공";case"DONE":return"결제 완료";case"FAILED":return"결제 실패";case"CANCELD":return"결제 취소";case"PARTIAL_CANCELED":return"부분 취소";default:return"알 수 없는 상태"}};return w.useEffect(()=>{(async()=>{const h=await wA();r(h)})()},[]),s.jsxs(OI,{children:[s.jsx(TI,{children:n.map((f,h)=>s.jsxs(NI,{children:[s.jsxs(DI,{children:[s.jsx(LI,{children:s.jsx(_I,{})}),s.jsxs(MI,{children:[s.jsx($I,{children:f.productName}),s.jsxs(zI,{children:["Quantity: ",f.quantity]}),s.jsx(FI,{children:p(f.paymentStatus)})]})]}),s.jsxs(UI,{children:[f.price,"원"]}),s.jsxs(BI,{children:[s.jsx(WI,{onClick:()=>{a(`/products/${f.postId}`)},children:"상품 페이지 이동"}),s.jsx(HI,{onClick:()=>{l(),f.payment_key&&i(f.payment_key)},children:"주문 취소/환불"}),f.paymentStatus==="DONE"&&s.jsxs(VI,{children:[s.jsx(QI,{src:"/images/qricon.png",alt:"review icon"}),s.jsx("span",{children:"리뷰 작성하기"})]})]})]},h))}),e&&s.jsx(KI,{children:s.jsxs(GI,{children:[s.jsx(qI,{children:"주문을 취소/환불하시겠습니까?"}),s.jsxs(YI,{children:[s.jsx(Fv,{onClick:u,children:"Yes"}),s.jsx(JI,{onClick:d,children:"No"})]})]})})]})},DI=c.div` + display: inline-flex; + flex-direction: row; + width: 400px; +`,OI=c.div` + width: 100%; + margin: 20px 0; +`,TI=c.div` + display: flex; + flex-direction: column; + gap: 20px; +`,NI=c.div` + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #fff; +`,LI=c.div` + flex-shrink: 0; +`,_I=c.div` + width: 60px; + height: 60px; + background-color: #f0f0f0; + border-radius: 8px; +`,MI=c.div` + margin-left: 20px; +`,$I=c.div` + font-size: 16px; + font-weight: bold; +`,zI=c.div` + font-size: 14px; + color: #555; + margin-top: 4px; +`,FI=c.div` + margin-top: 10px; + font-size: 12px; + font-weight: bold; + color: #000; +`,UI=c.div` + font-size: 16px; + font-weight: bold; +`,BI=c.div` + display: flex; + flex-direction: column; + gap: 10px; +`,WI=c.div` + background: #fff; + color: #131118; + border: 1px solid #131118; + padding: 10px 10px; + border-radius: 8px; + cursor: pointer; + &:hover { + background: #131118; + color: #fff; + } +`,HI=c.div` + background: #fff; + color: #ff7262; + border: 1px solid #ff7262; + padding: 10px 10px; + border-radius: 8px; + cursor: pointer; + display: inline-flex; + justify-content: center; + transition: all 0.3s ease; + + &:hover { + background: #ff7262; + color: #fff; + } +`,VI=c.div` + display: flex; + align-items: center; + gap: 4px; + cursor: pointer; + margin-top: 8px; + + span { + border-bottom: 1px solid #131118; + } +`,QI=c.img` + width: 16px; + height: 16px; +`,KI=c.div` + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,GI=c.div` + background-color: white; + padding: 24px; + border-radius: 8px; + width: 300px; + text-align: center; +`,qI=c.p` + margin-bottom: 20px; + font-size: 16px; +`,YI=c.div` + display: flex; + justify-content: center; + gap: 12px; +`,Fv=c.button` + padding: 8px 24px; + border-radius: 4px; + border: 1px solid #ff7262; + background-color: #fff; + color: #ff7262; + cursor: pointer; + transition: all 0.3s ease; + + &:hover { + background-color: #ff7262; + color: #fff; + } +`,JI=c(Fv)` + border: 1px solid #131118; + color: #131118; + + &:hover { + background-color: #131118; + color: #fff; + } +`,XI=()=>(w.useEffect(()=>{(async()=>{const t=await bA();console.log(t)})()},[]),s.jsx(e6,{children:s.jsx(t6,{children:_A.map(e=>s.jsxs(n6,{children:[s.jsxs(ZI,{children:[s.jsx(r6,{children:s.jsx(o6,{})}),s.jsxs(i6,{children:[s.jsx(s6,{children:e.name}),s.jsxs(a6,{children:["Quantity: ",e.quantity]}),s.jsx(l6,{status:e.status,children:e.status})]})]}),s.jsx(c6,{children:e.price}),s.jsx(d6,{children:s.jsx(u6,{children:"상품 페이지 이동"})})]},e.id))})})),ZI=c.div` + display: inline-flex; + flex-direction: row; + width: 400px; +`,e6=c.div` + width: 100%; + margin: 20px 0; +`,t6=c.div` + display: flex; + flex-direction: column; + gap: 20px; +`,n6=c.div` + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #fff; +`,r6=c.div` + flex-shrink: 0; +`,o6=c.div` + width: 60px; + height: 60px; + background-color: #f0f0f0; + border-radius: 8px; +`,i6=c.div` + margin-left: 20px; +`,s6=c.div` + font-size: 16px; + font-weight: bold; +`,a6=c.div` + font-size: 14px; + color: #555; + margin-top: 4px; +`,l6=c.div` + margin-top: 10px; + font-size: 12px; + font-weight: bold; + color: ${e=>e.status==="환불 처리 중"?"#dc3545":"#007bff"}; +`,c6=c.div` + font-size: 16px; + font-weight: bold; +`,u6=c.div` + background: #fff; + color: #131118; + border: 1px solid #131118; + padding: 10px 10px; + border-radius: 8px; + cursor: pointer; + &:hover { + background-color: #131118; + color: #fff; + } +`,d6=c.div` + display: flex; + flex-direction: column; + gap: 10px; +`,f6=()=>{const[e,t]=w.useState([]),n=Ee();w.useEffect(()=>{(async()=>{try{const i=await jA();t(i)}catch(i){console.error("failed",i)}})()},[]);const r=o=>p6[o]||"알 수 없는 상태";return s.jsx(m6,{children:s.jsx(g6,{children:e.map((o,i)=>s.jsxs(x6,{children:[s.jsxs(h6,{children:[s.jsx(y6,{children:o.imageUrls[0]!==""?s.jsx("img",{src:o.imageUrls[0],width:60,height:60}):s.jsx(v6,{})}),s.jsxs(w6,{children:[s.jsx(b6,{children:o.title}),s.jsxs(j6,{children:["Quantity: ",o.availableNumber]}),s.jsx(C6,{children:r(o.status)})]})]}),s.jsxs(S6,{children:[o.unitAmount,"원"]}),s.jsxs(k6,{children:[s.jsx(P6,{onClick:()=>{n(`/community/post/${o.communityPostId}`)},children:"상품 페이지 이동"}),o.status==="APPROVED"&&s.jsxs(s.Fragment,{children:[s.jsx(I6,{children:"QR 코드 확인"}),s.jsxs(R6,{children:[s.jsx(A6,{src:"/images/qricon.png",alt:"review icon"}),s.jsx("span",{children:"리뷰 작성하기"})]})]}),o.status==="NOT_APPROVED"&&s.jsx(s.Fragment,{children:s.jsx(E6,{children:"주문 취소하기"})})]})]},i))})})},p6={NOT_APPROVED:"승인대기",APPROVED:"승인완료",PAYMENT_STANDBY:"결제 대기",PAYMENT_COMPLETED:"결제 완료",REJECTED:"승인 거절",DELETED:"글 삭제"},h6=c.div` + display: inline-flex; + flex-direction: row; + width: 400px; +`,m6=c.div` + width: 100%; + margin: 20px 0; +`,g6=c.div` + display: flex; + flex-direction: column; + gap: 20px; +`,x6=c.div` + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #fff; +`,y6=c.div` + flex-shrink: 0; +`,v6=c.div` + width: 60px; + height: 60px; + background-color: #f0f0f0; + border-radius: 8px; +`,w6=c.div` + margin-left: 20px; +`,b6=c.div` + font-size: 16px; + font-weight: bold; +`,j6=c.div` + font-size: 14px; + color: #555; + margin-top: 4px; +`,C6=c.div` + margin-top: 10px; + font-size: 12px; + font-weight: bold; + color: #000; +`,S6=c.div` + font-size: 16px; + font-weight: bold; +`,k6=c.div` + display: flex; + flex-direction: column; + gap: 10px; +`,P6=c.div` + background: #fff; + color: #131118; + border: 1px solid #131118; + padding: 10px 10px; + border-radius: 8px; + cursor: pointer; + &:hover { + background-color: #131118; + color: #fff; + } +`,E6=c.div` + background: #fff; + color: #ff7262; + border: 1px solid #ff7262; + padding: 10px 10px; + border-radius: 8px; + cursor: pointer; + display: inline-flex; + justify-content: center; + transition: all 0.3s ease; + + &:hover { + background: #ff7262; + color: #fff; + } +`,R6=c.div` + display: flex; + align-items: center; + gap: 4px; + cursor: pointer; + margin-top: 8px; + + span { + border-bottom: 1px solid #000; + } +`,A6=c.img` + width: 16px; + height: 16px; +`,I6=c.div` + background: #fff; + color: #131118; + border: 1px solid #131118; + padding: 10px 10px; + border-radius: 8px; + cursor: pointer; + display: inline-flex; + justify-content: center; + &:hover { + background: #131118; + color: #fff; + } +`;function D6(){const[e,t]=w.useState("order"),n=()=>{switch(e){case"order":return s.jsx(II,{});case"refund":return s.jsx(XI,{});case"group":return s.jsx(f6,{});default:return null}};return s.jsxs(vt.Wrapper,{children:[s.jsx(Wr,{}),s.jsxs(vt.Content,{children:[s.jsxs(O6,{children:[s.jsx(Vu,{$isActive:e==="order",onClick:()=>t("order"),children:"주문내역"}),s.jsx(Vu,{$isActive:e==="refund",onClick:()=>t("refund"),children:"환불내역"}),s.jsx(Vu,{$isActive:e==="group",onClick:()=>t("group"),children:"공동구매 참여내역"})]}),n()]})]})}const O6=c.div` + display: flex; +`,Vu=c.div` + padding: 10px 20px; + cursor: pointer; + font-size: 16px; + font-weight: ${e=>e.$isActive?"bold":"500"}; + color: ${e=>e.$isActive?"#000":"#555"}; + position: relative; + + &:after { + content: ''; + position: absolute; + bottom: -1px; + left: 0; + right: 0; + height: ${e=>e.$isActive?"2px":"0"}; + background-color: #000; + transition: height 0.3s ease; + } +`;function T6(){const[e,t]=w.useState(MA),n=r=>{t(o=>o.filter(i=>i.id!==r))};return s.jsxs(vt.Wrapper,{children:[s.jsx(Wr,{}),s.jsxs(vt.Content,{children:[s.jsx(L6,{children:"찜한 상품"}),s.jsx(M6,{children:s.jsx($6,{children:e.map(r=>s.jsxs(z6,{children:[s.jsxs(_6,{children:[s.jsx(F6,{children:r.thumb!==""?s.jsx("img",{src:r.thumb,alt:r.name,width:60,height:60}):s.jsx(U6,{})}),s.jsxs(B6,{children:[s.jsx(W6,{children:r.name}),s.jsxs(H6,{children:["수량: ",r.quantity]})]})]}),s.jsx(V6,{children:r.price}),s.jsx(Q6,{children:s.jsx(N6,{src:"/images/wish_on.png",onClick:()=>n(r.id),alt:"찜하기"})})]},r.id))})})]})]})}const N6=c.img` + width: 24px; + height: 24px; + cursor: pointer; + transition: transform 0.2s; + + &:hover { + transform: scale(1.1); + } +`,L6=c.div` + font-size: 16px; + font-weight: bold; +`,_6=c.div` + display: inline-flex; + flex-direction: row; + width: 400px; +`,M6=c.div` + width: 100%; + margin: 20px 0; +`,$6=c.div` + display: flex; + flex-direction: column; + gap: 20px; +`,z6=c.div` + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px; + border: 1px solid #ddd; + border-radius: 8px; + background-color: #fff; +`,F6=c.div` + flex-shrink: 0; +`,U6=c.div` + width: 60px; + height: 60px; + background-color: #f0f0f0; + border-radius: 8px; +`,B6=c.div` + margin-left: 20px; +`,W6=c.div` + font-size: 16px; + font-weight: bold; +`,H6=c.div` + font-size: 14px; + color: #555; + margin-top: 4px; +`,V6=c.div` + font-size: 16px; + font-weight: bold; +`,Q6=c.div` + display: flex; + flex-direction: column; + gap: 10px; +`,K6=e=>new Promise((t,n)=>{if(document.getElementById("kakao-map-script")){t(window.kakao);return}const r=document.createElement("script");r.id="kakao-map-script",r.src=`https://dapi.kakao.com/v2/maps/sdk.js?appkey=${e}&libraries=services&autoload=false`,r.onload=()=>{window.kakao.maps.load(()=>t(window.kakao))},r.onerror=()=>n(new Error("카카오맵 스크립트를 로드할 수 없습니다.")),document.head.appendChild(r)}),Uv=({latitude:e,longitude:t,appKey:n,width:r})=>{const o=w.useRef(null);return w.useEffect(()=>{(async()=>{try{const a=await K6(n);if(!o.current)return;const l={center:new a.maps.LatLng(e,t),level:3},u=new a.maps.Map(o.current,l),d=new a.maps.LatLng(e,t);new a.maps.Marker({position:d}).setMap(u)}catch(a){console.error("카카오맵 초기화 중 오류 발생:",a)}})()},[e,t,n]),s.jsx("div",{ref:o,style:{width:`${r}px`,height:"350px"}})};function G6(){const[e,t]=w.useState(null),[n,r]=w.useState(null),[o,i]=w.useState(!1);return w.useEffect(()=>{navigator.geolocation&&!o&&navigator.geolocation.getCurrentPosition(a=>{const{latitude:l,longitude:u}=a.coords;t({latitude:l,longitude:u}),window.kakao&&new window.kakao.maps.services.Geocoder().coord2RegionCode(u,l,(p,f)=>{var h;if(f===window.kakao.maps.services.Status.OK){const b=((h=p[0])==null?void 0:h.region_3depth_name)||"";r(b),i(!0)}else console.error("주소를 가져오지 못했습니다.")})},a=>{console.error("위치 정보를 가져올 수 없습니다:",a)})},[e]),s.jsxs(vt.Wrapper,{children:[s.jsx(Wr,{}),s.jsxs(vt.Content,{children:[s.jsx(X6,{children:"동네 인증"}),s.jsxs(J6,{children:[e?s.jsx(Uv,{latitude:e.latitude,longitude:e.longitude,appKey:"af7394f12b174cad35e87960ddccf91f",width:600}):s.jsx("p",{children:"위치 정보를 불러오는 중..."}),s.jsxs(Y6,{children:["현재 위치가 내 동네로 설정한 ",n||"00동","에 있습니다."]}),s.jsx(q6,{onClick:async()=>{n&&await vA({newAddress:n})},children:"동네인증 완료하기"})]})]})]})}const q6=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: 445px; + height: 56px; + display: inline-flex; + align-items: center; + justify-content: center; + cursor: pointer; +`,Y6=c.div` + color: #88868c; +`,J6=c.div` + display: inline-flex; + align-items: center; + justify-content: center; + width: 100%; + flex-direction: column; + gap: 20px; +`,X6=c.div` + font-size: 16px; + font-weight: bold; + margin-bottom: 20px; +`;function Z6(){const[e,t]=w.useState(!1),[n,r]=w.useState({bank:"신한은행",owner:"굿바이어",accountNumber:"111-111-111111"}),[o,i]=w.useState(n),a=()=>{i(n),t(!0)},l=()=>{t(!1)},u=()=>{r(o),t(!1)},d=p=>{const{name:f,value:h}=p.target;i(b=>({...b,[f]:h}))};return s.jsxs(vt.Wrapper,{children:[s.jsx(Wr,{}),s.jsxs(vt.Content,{children:[s.jsx(tD,{children:"환불계좌 관리"}),s.jsxs(eD,{children:["계좌는 1개만 등록 가능하며 본인명의 계좌만 등록/변경 가능합니다.",s.jsx("br",{}),"등록된 계좌는 현금결제 주문 취소 시 해당 계좌로 환불 금액이 입금되오니 정확하게 기입해 주시기 바랍니다."]}),s.jsx(nD,{children:s.jsxs(rD,{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx(Qr,{children:"은행명"}),s.jsx(Qr,{children:"예금주"}),s.jsx(Qr,{children:"계좌번호"}),s.jsx(Qr,{children:" "})]})}),s.jsx("tbody",{children:s.jsxs("tr",{children:[s.jsx(Kr,{children:n.bank}),s.jsx(Kr,{children:n.owner}),s.jsx(Kr,{children:n.accountNumber}),s.jsx(Kr,{children:s.jsxs(oD,{children:[s.jsx(iD,{onClick:a,children:"수정"}),s.jsx(sD,{children:"삭제"})]})})]})})]})}),e&&s.jsx(aD,{children:s.jsxs(lD,{children:[s.jsxs(cD,{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx(Qr,{children:"은행명"}),s.jsx(Qr,{children:"예금주"}),s.jsx(Qr,{children:"계좌번호"})]})}),s.jsx("tbody",{children:s.jsxs("tr",{children:[s.jsx(Kr,{children:s.jsx(Qu,{type:"text",name:"bank",value:o.bank,onChange:d})}),s.jsx(Kr,{children:s.jsx(Qu,{type:"text",name:"owner",value:o.owner,onChange:d})}),s.jsx(Kr,{children:s.jsx(Qu,{type:"text",name:"accountNumber",value:o.accountNumber,onChange:d})})]})})]}),s.jsxs(uD,{children:[s.jsx(dD,{onClick:u,children:"등록"}),s.jsx(fD,{onClick:l,children:"취소"})]})]})})]})]})}const eD=c.div` + color: #88868c; + margin-bottom: 20px; +`,tD=c.div` + font-size: 16px; + font-weight: bold; + margin-bottom: 20px; +`,nD=c.div` + width: 100%; + overflow-x: auto; + margin-top: 20px; + border-top: 1px solid #000; + border-bottom: 1px solid #000; +`,rD=c.table` + width: 100%; + border-collapse: collapse; + text-align: left; +`,Qr=c.th` + padding: 12px; + background-color: #f9f9f9; + border-bottom: 1px solid #ddd; + font-size: 14px; + font-weight: bold; + color: #333; + text-align: center; +`,Kr=c.td` + padding: 12px; + border-bottom: 1px solid #ddd; + font-size: 14px; + color: #555; + text-align: center; +`,oD=c.div` + display: flex; + gap: 10px; + justify-content: center; +`,iD=c.button` + padding: 8px 16px; + font-size: 14px; + color: #fff; + background-color: #333; + border: none; + border-radius: 4px; + cursor: pointer; +`,sD=c.button` + padding: 8px 16px; + font-size: 14px; + color: #333; + background-color: #fff; + border: 1px solid #333; + border-radius: 4px; + cursor: pointer; +`,aD=c.div` + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.8); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,lD=c.div` + background: #fff; + padding: 20px; + border-radius: 8px; + width: 500px; + max-width: 90%; + text-align: center; +`,cD=c.table` + width: 100%; + border-collapse: collapse; + margin-bottom: 20px; +`,Qu=c.input` + width: 100%; + padding: 8px; + font-size: 14px; + border: 1px solid #ddd; + border-radius: 4px; +`,uD=c.div` + display: flex; + justify-content: space-evenly; +`,dD=c.button` + padding: 10px 20px; + background-color: #333; + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; +`,fD=c.button` + padding: 10px 20px; + background-color: #fff; + color: #333; + border: 1px solid #333; + border-radius: 4px; + cursor: pointer; +`;function pD(){return s.jsxs(vt.Wrapper,{children:[s.jsx(Wr,{}),s.jsxs(vt.Content,{children:[s.jsx(wD,{children:"알림내역"}),s.jsx(mD,{children:$A.map(e=>s.jsxs(gD,{children:[s.jsxs(hD,{children:[s.jsx(xD,{children:s.jsx("img",{src:"/images/"+e.icon+".png"})}),s.jsx(yD,{children:e.title})]}),s.jsx(vD,{children:e.time})]},e.id))})]})]})}const hD=c.div` + display: inline-flex; + align-items: center; +`,mD=c.div` + border: 1px solid #000; + border-radius: 5px; + padding: 16px; + background: #fff; + height: 450px; +`,gD=c.div` + display: flex; + align-items: center; + padding: 12px 0; + border-bottom: 1px solid #ddd; + justify-content: space-between; + + &:last-child { + border-bottom: none; + } +`,xD=c.div` + font-size: 20px; + margin-right: 12px; + + img { + width: 22px; + height: 22px; + } +`,yD=c.div` + font-size: 14px; + color: #333; + margin-bottom: 4px; + display: inline-flex; + align-items: center; +`,vD=c.div` + font-size: 12px; + color: #000; +`,wD=c.div` + font-size: 16px; + font-weight: bold; + margin-bottom: 20px; +`;function bD(){const e=Ee(),[t,n]=w.useState(!1),[r,o]=w.useState([]),[i,a]=w.useState(""),l=()=>{n(!0)},u=()=>{n(!1)},d=p=>{const f=new Date(p),h=f.getFullYear(),b=String(f.getMonth()+1).padStart(2,"0"),y=String(f.getDate()).padStart(2,"0"),x=String(f.getHours()).padStart(2,"0"),j=String(f.getMinutes()).padStart(2,"0"),g=String(f.getSeconds()).padStart(2,"0");return`${h}-${b}-${y} ${x}:${j}:${g}`};return w.useEffect(()=>{(async()=>{try{const f=await CA();console.log(f),o(f)}catch(f){console.error("failed",f)}})()},[]),s.jsxs(vt.Wrapper,{children:[s.jsx(Wr,{}),s.jsxs(vt.Content,{children:[s.jsx(ED,{children:"나의 게시글"}),s.jsx(jD,{children:s.jsxs(CD,{children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx(Ku,{children:"제목"}),s.jsx(Ku,{children:"날짜"}),s.jsx(Ku,{children:" "})]})}),s.jsx("tbody",{children:r.map((p,f)=>s.jsxs("tr",{children:[s.jsx(Gu,{children:p.title}),s.jsx(Gu,{children:d(p.createdAt)}),s.jsx(Gu,{children:s.jsxs(SD,{children:[s.jsx(kD,{onClick:()=>{e(`/community/post/${p.communityPostId}`)},children:"수정"}),s.jsx(PD,{onClick:()=>{l(),a(p.communityPostId+"")},children:"삭제"})]})})]},f))})]})}),t&&s.jsx(RD,{children:s.jsxs(AD,{children:["삭제하시겠습니까?",s.jsxs(ID,{children:[s.jsx(DD,{onClick:async()=>{n(!1),await SA(i)},children:"예"}),s.jsx(OD,{onClick:u,children:"아니요"})]})]})})]})]})}const jD=c.div` + width: 100%; + overflow-x: auto; + margin-top: 20px; + border-top: 1px solid #000; + border-bottom: 1px solid #000; +`,CD=c.table` + width: 100%; + border-collapse: collapse; + text-align: left; +`,Ku=c.th` + padding: 12px; + background-color: #f9f9f9; + border-bottom: 1px solid #ddd; + font-size: 14px; + font-weight: bold; + color: #333; + text-align: center; +`,Gu=c.td` + padding: 12px; + border-bottom: 1px solid #ddd; + font-size: 14px; + color: #555; + text-align: center; +`,SD=c.div` + display: flex; + gap: 10px; + justify-content: center; +`,kD=c.button` + padding: 8px 16px; + font-size: 14px; + color: #fff; + background-color: #333; + border: none; + border-radius: 4px; + cursor: pointer; +`,PD=c.button` + padding: 8px 16px; + font-size: 14px; + color: #333; + background-color: #fff; + border: 1px solid #333; + border-radius: 4px; + cursor: pointer; +`,ED=c.div` + font-size: 16px; + font-weight: bold; + margin-bottom: 20px; +`,RD=c.div` + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.8); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,AD=c.div` + background: #fff; + padding: 20px; + border-radius: 8px; + width: 250px; + max-width: 90%; + text-align: center; +`,ID=c.div` + margin-top: 30px; + display: flex; + justify-content: space-evenly; +`,DD=c.button` + padding: 10px 20px; + background-color: #333; + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; +`,OD=c.button` + padding: 10px 20px; + background-color: #fff; + color: #333; + border: 1px solid #333; + border-radius: 4px; + cursor: pointer; +`;function TD(){return s.jsxs(vt.Wrapper,{children:[s.jsx(Wr,{}),s.jsx(vt.Content,{children:"asd"})]})}const ND=()=>{const e=Ee(),[t,n]=w.useState(""),[r,o]=w.useState(!0),[i,a]=w.useState(!0),l=d=>{o(d.length>=2&&d.length<=15),a(/^[가-힣ㄱ-ㅎㅏ-ㅣa-zA-Z0-9]+$/.test(d))},u=d=>{const p=d.target.value;n(p),l(p)};return s.jsxs(FD,{children:[s.jsx($D,{children:s.jsx("img",{src:"/images/login5.jpeg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"contain"}})}),s.jsxs(zD,{children:[s.jsxs(MD,{children:["굿바이어스에서 사용할",s.jsx("br",{}),"닉네임을 정해주세요"]}),s.jsx(_D,{placeholder:"닉네임을 입력해주세요",value:t,onChange:u}),s.jsx(ex,{isValid:r,children:"최소 2자 이상 ~ 15자 이내"}),s.jsx(ex,{isValid:i,children:"띄어쓰기 및 특수문자 사용 불가"}),s.jsx(LD,{onClick:async()=>{r&&i?(await V4({nickname:t})).message==="닉네임 중복 확인 완료"?(localStorage.setItem("nickname",t),e("/setprofile")):alert("닉네임이 중복입니다."):alert("닉네임 조건을 만족시켜 주세요.")},children:"Next"})]})]})},ex=c.div` + color: ${({isValid:e})=>e?"#858282":"#EF2626"}; + margin-top: 20px; + font-size: 12px; +`,LD=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 235px; + cursor: pointer; +`,_D=c.input` + width: calc(100% - 42px); + height: 25px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + padding: 5px 10px; + box-shadow: none; + outline: none; + transition: border-color 0.3s ease; + + &:focus { + border-color: #000; + } +`,MD=c.div` + font-size: 30px; + font-weight: 900; + margin-bottom: 20px; +`,$D=c.div` + flex: 6; + background-color: #fff; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,zD=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,FD=c.div` + display: flex; + width: 100%; + height: 100vh; +`,UD=()=>{const e=Ee(),[t,n]=w.useState(null),[r,o]=w.useState(null),i=a=>{var u;const l=(u=a.target.files)==null?void 0:u[0];if(l){const d=new FileReader;d.onload=()=>{n(d.result)},d.readAsDataURL(l),o(l)}};return s.jsxs(YD,{children:[s.jsx(GD,{children:s.jsx("img",{src:"/images/login3.jpg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"contain"}})}),s.jsxs(qD,{children:[s.jsxs(KD,{children:["프로필 사진을",s.jsx("br",{}),"추가해주세요"]}),s.jsxs(WD,{children:[s.jsx(BD,{htmlFor:"file-input",children:s.jsx("img",{src:t||"/images/origin.png",alt:"Profile Preview",width:217,height:217})}),s.jsx("input",{type:"file",id:"file-input",accept:"image/*",onChange:i,style:{display:"none"}}),"사진 추가하기"]}),s.jsx(QD,{onClick:async()=>{await Ug(r),e("/logincomplete")},children:"Next"}),s.jsx(HD,{children:s.jsx(VD,{onClick:async()=>{await Ug(null),e("/logincomplete")},children:"건너뛰기"})})]})]})},BD=c.label` + cursor: pointer; +`,WD=c.div` + display: inline-flex; + justify-content: center; + width: calc(100% - 10px); + flex-direction: column; + align-items: center; + font-size: 12px; + color: #858282; +`,HD=c.div` + display: inline-flex; + justify-content: center; + width: calc(100% - 20px); +`,VD=c.div` + color: #858282; + font-size: 12px; + margin-top: 30px; +`,QD=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 100px; + cursor: pointer; +`,KD=c.div` + font-size: 30px; + font-weight: 900; + margin-bottom: 20px; +`,GD=c.div` + flex: 6; + background-color: #fff; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,qD=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,YD=c.div` + display: flex; + width: 100%; + height: 100vh; +`,JD=()=>{const e=Ee();return s.jsxs(oO,{children:[s.jsx(nO,{children:s.jsx("img",{src:"/images/login-compl.jpg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"contain"}})}),s.jsxs(rO,{children:[s.jsx(tO,{children:"회원가입 완료!"}),s.jsx(ZD,{children:s.jsx("img",{src:"/images/check.png",alt:"check",width:120,height:120})}),s.jsxs(XD,{children:[s.jsx(tx,{children:"굿바이어스에 오신것을 환영합니다."}),s.jsx(tx,{children:"공동구매를 시작해보세요."})]}),s.jsx(eO,{onClick:()=>{e("/")},children:"메인으로 가기"})]})]})},tx=c.div` + color: #302f2f; +`,XD=c.div` + margin-top: 50px; + display: inline-flex; + align-items: center; + justify-content: center; + width: calc(100% - 20px); + flex-direction: column; + gap: 10px; +`,ZD=c.div` + display: inline-flex; + justify-content: center; + width: calc(100% - 10px); + flex-direction: column; + align-items: center; + font-size: 12px; + color: #858282; + margin-top: 50px; +`,eO=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 80px; + cursor: pointer; +`,tO=c.div` + font-size: 30px; + font-weight: 900; + margin-bottom: 20px; +`,nO=c.div` + flex: 6; + background-color: #fff; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,rO=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,oO=c.div` + display: flex; + width: 100%; + height: 100vh; +`,iO=async(e,t)=>{try{const n=`/api/v1/main-payments?postId=${e}`;return(await re.post(n,t)).data.checkoutPageUrl}catch{throw new Error("결제에 실패하였습니다.")}},sO=()=>{const{quantity:e}=Nv(),{id:t}=$i(),n=w.useMemo(()=>!t||isNaN(Number(t))?null:Number(t),[t]);if(!n)return s.jsx("p",{children:"잘못된 상품 ID입니다."});const{data:r,isLoading:o,isError:i}=ma(n);if(!r)return s.jsx("p",{children:"해당 상품을 찾을 수 없습니다."});const[a,l]=w.useState(""),[u,d]=w.useState(""),[p,f]=w.useState(""),[h,b]=w.useState(""),[y,x]=w.useState(""),j=()=>a.trim()?u.trim()?p.trim()?h.trim()?y?!0:(alert("결제 방법을 선택해주세요."),!1):(alert("배송 시 요청사항을 입력해주세요."),!1):(alert("상세 주소를 입력해주세요."),!1):(alert("기본 주소를 입력해주세요."),!1):(alert("수령인을 입력해주세요."),!1),g={productName:r.name,url:r.url,price:r.discountprice*e,quantity:e,payMethod:y,deliveryRequestDTO:{name:a,address:{street:u,detail:p},needed:h}},m=C=>{x(C.target.value)},v=async()=>{if(j())try{const C=await iO(n,g);window.location.href=C}catch(C){alert(`결제에 실패하였습니다 ${C}`)}};return s.jsx(s.Fragment,{children:s.jsx(Ro,{isLoading:o,isError:i,children:s.jsxs(aO,{children:[s.jsxs(qu,{children:[s.jsx(Ju,{children:"주문 상품 정보"}),s.jsxs(Yu,{children:[s.jsxs($f,{children:[s.jsx(cO,{children:r.name}),s.jsxs(uO,{children:[r.discountprice,"원"]})]}),s.jsx($f,{children:s.jsxs(fO,{children:["수량 : ",e]})}),s.jsxs(lO,{children:[s.jsx("span",{children:"합계:"}),s.jsxs(dO,{children:[r.discountprice*e,"원"]})]})]})]}),s.jsxs(qu,{children:[s.jsx(Ju,{children:"배송 정보 확인"}),s.jsxs(Yu,{children:[s.jsx(Xu,{children:s.jsxs(Zu,{children:["수령인",s.jsx(Ga,{children:s.jsx(sh,{type:"text",placeholder:"이름 입력",value:a,onChange:C=>l(C.target.value)})})]})}),s.jsxs(Xu,{children:[s.jsx(Zu,{children:"배송지"}),s.jsx(Ga,{children:s.jsx(pO,{type:"text",placeholder:"기본 주소를 입력해주세요",value:u,onChange:C=>d(C.target.value)})}),s.jsx(Ga,{children:s.jsx(hO,{type:"text",placeholder:"상세 주소를 입력해주세요",value:p,onChange:C=>f(C.target.value)})})]}),s.jsx(Xu,{children:s.jsxs(Zu,{children:["배송 시 요청사항",s.jsx(Ga,{children:s.jsx(mO,{rows:2,placeholder:"요청사항 입력",value:h,onChange:C=>b(C.target.value)})})]})})]})]}),s.jsxs(qu,{children:[s.jsx(Ju,{children:"결제 정보 확인"}),s.jsx(Yu,{children:s.jsx(gO,{children:s.jsxs(xO,{children:[s.jsx(yO,{type:"radio",name:"payment-method",value:"카드",onChange:m}),s.jsx(vO,{children:"카드 결제"})]})})})]}),s.jsxs(wO,{children:[s.jsx(CO,{onClick:()=>{v()},children:"결제하기"}),s.jsx(jO,{to:`/products/${r.id}`,children:"뒤로 가기"})]})]})})})},aO=c.div` + width: 100%; + max-width: 650px; + margin: 0 auto; + padding: 20px; + background-color: #f8fafc; +`,qu=c.div` + margin-bottom: 24px; + background-color: white; + border-radius: 12px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + overflow: hidden; +`,Yu=c.div` + padding: 20px; +`,Ju=c.h2` + font-size: 1.125rem; + font-weight: 600; + color: #1e293b; + padding: 16px; + border-bottom: 1px solid #e2e8f0; + margin: 0; +`,$f=c.div` + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 12px; +`,lO=c($f)` + margin-top: 16px; + padding-top: 16px; + border-top: 1px solid #e2e8f0; + font-weight: 600; + color: #1e293b; +`,cO=c.span` + font-weight: 500; + color: #1e293b; +`,uO=c.span` + color: #1e293b; + font-weight: 500; +`,dO=c.span` + color: #2563eb; + font-weight: 600; + font-size: 1.125rem; +`,fO=c.span` + color: #64748b; + font-size: 0.875rem; +`,Xu=c.div` + margin-bottom: 16px; + + &:last-child { + margin-bottom: 0; + } +`,Zu=c.label` + display: block; + color: #475569; + font-size: 0.875rem; + margin-bottom: 4px; +`,sh=c.input` + width: 100%; + padding: 10px 12px; + margin-top: 4px; + border: 1px solid #e2e8f0; + border-radius: 8px; + font-size: 0.875rem; + transition: all 0.2s; + + &:focus { + outline: none; + border-color: #2563eb; + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); + } + + &::placeholder { + color: #94a3b8; + } +`,Ga=c.div` + display: flex; + gap: 8px; + margin-bottom: 8px; +`,pO=c(sh)` + flex-grow: 1; + cursor: pointer; +`,hO=c(sh)` + margin-top: 8px; +`,mO=c.textarea` + width: 100%; + padding: 10px 12px; + margin-top: 4px; + border: 1px solid #e2e8f0; + border-radius: 8px; + font-size: 0.875rem; + resize: vertical; + min-height: 80px; + transition: all 0.2s; + + &:focus { + outline: none; + border-color: #2563eb; + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); + } + + &::placeholder { + color: #94a3b8; + } +`,gO=c.div` + display: flex; + flex-direction: column; + gap: 12px; +`,xO=c.label` + display: flex; + align-items: center; + cursor: pointer; +`,yO=c.input` + width: 18px; + height: 18px; + margin: 0; + cursor: pointer; + + &:checked { + accent-color: #2563eb; + } +`,vO=c.span` + margin-left: 8px; + color: #1e293b; + font-size: 0.875rem; +`,wO=c.div` + display: flex; + gap: 12px; + margin-top: 32px; +`,bO=c.button` + flex: 1; + padding: 12px; + border-radius: 8px; + font-weight: 600; + font-size: 0.875rem; + cursor: pointer; + transition: all 0.2s; +`,jO=c(An)` + text-decoration: none; /* 링크의 기본 밑줄 제거 */ + display: flex; /* 버튼 스타일 유지 */ + justify-content: center; + align-items: center; + + background-color: white; + border: 1px solid #e2e8f0; + color: #475569; + border-radius: 8px; + padding: 12px; + font-weight: 600; + font-size: 0.875rem; + cursor: pointer; + transition: all 0.2s; + + &:hover { + cursor: pointer; + background-color: #f8fafc; + } +`,CO=c(bO)` + background-color: #2563eb; + border: none; + color: white; + + &:hover { + cursor: pointer; + background-color: #1d4ed8; + } +`,SO=()=>{const{id:e}=$i();if(!e)return s.jsx("p",{children:"상품 번호가 유실되었습니다."});const t=Number(e),n=window.location.search,r=new URLSearchParams(n),o=r.get("orderId"),i=r.get("amount"),{data:a,isLoading:l,isError:u}=ma(t);return a?s.jsx(s.Fragment,{children:s.jsx(Ro,{isLoading:l,isError:u,children:s.jsxs(kO,{children:[s.jsxs(PO,{children:[s.jsx(EO,{children:"결제 완료"}),s.jsx(RO,{children:"주문해주셔서 감사합니다!"}),s.jsxs(AO,{children:[s.jsxs(ed,{children:[s.jsx(td,{children:"상품명"}),s.jsx(nd,{children:a==null?void 0:a.name})]}),s.jsxs(ed,{children:[s.jsx(td,{children:"결제 금액"}),s.jsxs(nd,{children:[i,"원"]})]}),s.jsxs(ed,{children:[s.jsx(td,{children:"주문 번호"}),s.jsx(nd,{children:o})]})]})]}),s.jsxs(IO,{children:[s.jsx(DO,{to:`/orders/${a==null?void 0:a.id}`,children:"주문 내역 보기"}),s.jsx(OO,{to:"/",children:"메인으로 돌아가기"})]})]})})}):s.jsx("p",{children:"해당 상품을 찾을 수 없습니다."})},kO=c.div` + width: 100%; + max-width: 650px; + margin: 0 auto; + padding: 20px; + background-color: #f8fafc; + display: flex; + flex-direction: column; + align-items: center; +`,PO=c.div` + width: 100%; + background-color: white; + border-radius: 12px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + padding: 32px 20px; + text-align: center; + margin-bottom: 24px; +`,EO=c.h1` + font-size: 1.5rem; + font-weight: 700; + color: #1e293b; + margin-bottom: 12px; +`,RO=c.p` + color: #64748b; + font-size: 1rem; + margin-bottom: 24px; +`,AO=c.div` + background-color: #f8fafc; + border-radius: 8px; + padding: 16px; + margin-top: 20px; +`,ed=c.div` + display: flex; + justify-content: space-between; + margin-bottom: 12px; + + &:last-child { + margin-bottom: 0; + } +`,td=c.span` + color: #64748b; + font-size: 0.875rem; +`,nd=c.span` + color: #1e293b; + font-weight: 500; +`,IO=c.div` + display: flex; + gap: 12px; + width: 100%; +`,Bv=c(An)` + flex: 1; + text-decoration: none; + display: flex; + justify-content: center; + align-items: center; + padding: 12px; + border-radius: 8px; + font-weight: 600; + font-size: 0.875rem; + cursor: pointer; + transition: all 0.2s; +`,DO=c(Bv)` + background-color: #2563eb; + border: none; + color: white; + + &:hover { + background-color: #1d4ed8; + } +`,OO=c(Bv)` + background-color: white; + border: 1px solid #e2e8f0; + color: #475569; + + &:hover { + background-color: #f8fafc; + } +`,TO=()=>{const{pathname:e}=nt();return w.useEffect(()=>{window.scrollTo(0,0)},[e]),null},NO=()=>{const e=Ee(),{communityPostId:t}=$i(),[n,r]=w.useState(Rv),[o,i]=w.useState(""),[a,l]=w.useState(""),[u,d]=w.useState(""),[p,f]=w.useState(!1),[h,b]=w.useState("마감 기한 "),[y,x]=w.useState(""),[j,g]=w.useState(""),[m,v]=w.useState([]),[C,P]=w.useState(-1),[S,R]=w.useState(""),[I,L]=w.useState(!1);w.useEffect(()=>{if(!t){alert("유효하지 않은 접근입니다."),e("/mypage/post");return}(async()=>{try{const U=await si(Number(t));if(U)r(U),x(U.title),g(U.description),v(U.imageUrls||[]),i(U.category),l(U.availableNumber.toString()),d(U.totalAmount.toString()),R(U.productUrl),b(B(U.createdAt,U.closeAt));else throw new Error("게시물이 존재하지 않습니다.")}catch(U){console.error("게시글 불러오기 실패:",U),alert("게시글 정보를 불러오는 데 실패했습니다."),e("/mypage/post")}})()},[t,e]);const B=(M,U)=>{const ae=new Date(M),Ke=new Date(U);return`${Math.ceil((Ke.getTime()-ae.getTime())/(1e3*60*60*24))}일`},N=()=>{f(!p)},O=M=>{if(b(M),n){const U=new Date(n.createdAt),ae=parseInt(M.replace(/[^0-9]/g,""),10),Ke=new Date(U);Ke.setDate(U.getDate()+ae),r({...n,closeAt:Ke.toISOString()})}f(!1)},$=async()=>{if(!y||!a||!u||h==="마감 기한"||m.length===0||!S||!j){alert("모든 필수 정보를 입력하세요.");return}if(!be(S)){L(!0);return}if(!n){alert("게시글 정보를 로드하는 데 실패했습니다.");return}const M=parseInt(u.replace(/,/g,""),10),U=parseInt(a,10),ae={...n,title:y,description:j,imageUrls:m,category:o,availableNumber:U,totalAmount:M,unitAmount:Math.floor(M/U),productUrl:S};try{await mE(Number(t),ae),alert("게시글이 성공적으로 수정되었습니다."),e(`/mypage/post/${t}`)}catch(Ke){console.error("게시글 수정 중 오류 발생:",Ke),alert("게시글 수정에 실패했습니다. 다시 시도해주세요.")}},F=M=>{const U=M.target.value.replace(/[^0-9]/g,""),ae=Number(U);U===""||ae<=0?l(""):l(U)},se=M=>{const U=M.target.value.replace(/[^0-9]/g,""),ae=Number(U);U===""||ae<=0?d(""):d(oe(U))},he=()=>{e(`/mypage/post/${t}`)},oe=M=>{const U=M.replace(/\D/g,"");return new Intl.NumberFormat().format(Number(U))},W=u&&a?oe(String(Math.floor(parseInt(u.replace(/,/g,""),10)/parseInt(a,10)))):"자동 계산",H=M=>{if(M.target.files){const U=Array.from(M.target.files).map(ae=>URL.createObjectURL(ae));v(ae=>[...ae,...U]),P(m.length)}},X=()=>{C>=0&&v(M=>{const U=M.filter((ae,Ke)=>Ke!==C);if(U.length>0){const ae=C>=U.length?C-1:C;P(ae)}else P(-1);return U})},ie=()=>{CM+1):C===m.length-1&&P(-1)},ne=()=>{P(C===-1?m.length-1:M=>Math.max(M-1,0))},Ve=M=>{P(M)},be=M=>!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|(\\d{1,3}\\.){3}\\d{1,3})(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(M),Ne=M=>{R(M.target.value),L(!be(M.target.value))},Ce=async()=>{if(!n){alert("삭제할 게시글이 존재하지 않습니다.");return}if(window.confirm("정말 이 게시글을 삭제하시겠습니까?"))try{await Av(Number(t)),alert("게시글이 성공적으로 삭제되었습니다."),e("/mypage/post")}catch(U){console.error("게시글 삭제 중 오류 발생:",U),alert("게시글 삭제에 실패했습니다. 다시 시도해주세요.")}};return s.jsx("div",{children:s.jsx(LO,{children:s.jsxs(_O,{children:[s.jsx(MO,{children:"공구 모집 및 진행"}),s.jsxs($O,{children:[s.jsxs(zO,{children:[s.jsxs(FO,{children:[s.jsxs(UO,{children:[s.jsx(VO,{children:m.length>0&&(C>0||C===-1)&&s.jsx(KO,{onClick:ne,children:s.jsx($c,{size:20})})}),C===-1?s.jsxs(WO,{children:[s.jsx(nh,{size:30}),"이미지 추가",s.jsx("input",{type:"file",multiple:!0,accept:"image/*",onChange:H})]}):s.jsxs(BO,{children:[s.jsx("img",{src:m[C],alt:"이미지 미리보기"}),s.jsx(HO,{onClick:X,children:s.jsx(th,{size:30})})]}),s.jsx(QO,{children:m.length>0&&C!==-1&&s.jsx(GO,{onClick:ie,children:s.jsx(zc,{size:20})})})]}),s.jsx(qO,{children:m.length>0&&s.jsx(YO,{children:m.map((M,U)=>s.jsx("span",{className:C===U?"active":"",onClick:()=>Ve(U)},U))})}),s.jsxs(JO,{children:[s.jsxs(XO,{children:[s.jsx($o,{htmlFor:"urlInput",children:"URL 주소"}),s.jsx(ZO,{id:"urlInput",type:"text",placeholder:"상품 관련 URL 주소를 입력해주세요.",value:S,onChange:Ne,isError:I,spellCheck:!1})]}),I&&s.jsx(eT,{children:"올바른 URL을 입력해주세요."})]})]}),s.jsxs(tT,{children:[s.jsxs(nT,{children:[s.jsxs(ds,{children:[s.jsx($o,{children:"제목"}),s.jsx(rT,{placeholder:"제목을 입력해주세요.",value:y,onChange:M=>x(M.target.value),spellCheck:!1})]}),s.jsxs(oT,{children:[s.jsx(iT,{children:"카테고리 선택"}),s.jsx(sT,{categories:ih,selectedCategory:o,onCategoryChange:M=>i(M)})]})]}),s.jsxs(aT,{children:[s.jsxs(ds,{children:[s.jsx($o,{children:"참여 필요 수량 선택"}),s.jsx(rd,{type:"text",placeholder:"수량 입력",value:a,onChange:F})]}),s.jsxs(ds,{children:[s.jsx($o,{children:"모집 마감 기한 설정"}),s.jsxs(lT,{children:[s.jsxs(cT,{onClick:N,children:[h,s.jsx(Ev,{})]}),p&&s.jsx(uT,{children:Array.from({length:7},(M,U)=>s.jsxs(dT,{onClick:()=>O(`${U+1}일 `),isSelected:h===`${U+1}일 `,children:[U+1,"일"]},U))})]})]}),s.jsxs(fT,{children:[s.jsxs(ds,{children:[s.jsx($o,{children:"총 가격 설정"}),s.jsx(rd,{type:"text",placeholder:"총 가격 입력",value:u,onChange:se})," 원"]}),s.jsxs(ds,{children:[s.jsx($o,{children:"개당 가격"}),s.jsx(rd,{disabled:!0,value:W})," 원"]})]})]})]})]}),s.jsx(pT,{children:s.jsx(hT,{placeholder:"내용을 입력해주세요.",value:j,onChange:M=>g(M.target.value),spellCheck:!1})}),s.jsxs(mT,{children:[s.jsx(od,{onClick:$,children:"확인"}),s.jsx(od,{onClick:he,children:"취소"}),s.jsx(od,{onClick:Ce,children:"삭제"})]})]})]})})})},LO=c.div` + display: flex; + justify-content: center; + padding: 20px; +`,_O=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,MO=c.h1` + font-size: 1.8rem; + font-weight: bold; + margin-bottom: 1.5rem; + text-align: left; +`,$O=c.div` + display: flex; + flex-direction: column; /* 내부 요소를 세로로 정렬 */ + background: #fff; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +`,zO=c.div` + display: flex; /* 가로 정렬 */ + flex-direction: row; /* 기본값이므로 명시적으로 추가 */ + align-items: stretch; /* 양쪽 요소의 높이를 동일하게 */ + justify-content: center; /* 양쪽 여백 균등 배치 */ + gap: 20px; /* 두 컨테이너 사이 간격 */ + margin-bottom: 20px; /* 아래 요소와의 간격 */ +`,FO=c.div` + display: flex; + flex-direction: column; + align-items: center; + width: 490px; + height: 495px; /* 고정된 높이 설정 */ + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px 11px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,UO=c.div` + display: flex; + justify-content: space-between; /* 좌우 버튼 공간 확보 */ + align-items: center; /* 수직 중앙 정렬 */ + width: 100%; + height: 320px; /* 기준 높이 */ + position: relative; /* 자식 요소 위치 기준 */ + overflow: hidden; /* 높이를 벗어난 콘텐츠 숨김 */ +`,BO=c.div` + flex: 1; /* 이미지 영역이 버튼 사이에 위치 */ + display: flex; + align-items: center; + justify-content: center; + width: 400px; + height: 100%; + border: 1px solid #ccc; + border-radius: 10px; + overflow: hidden; /* 콘텐츠가 영역을 벗어나지 않도록 */ + + img { + max-width: 100%; /* 부모 너비를 넘지 않도록 */ + max-height: 100%; /* 부모 높이를 넘지 않도록 */ + object-fit: contain; /* 비율을 유지하며 부모 크기 안에 맞춤 */ + } +`,WO=c.label` + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 1.2rem; + color: #555; + cursor: pointer; + border-radius: 10px; + width: 400px; /* img의 크기와 동일하게 설정 */ + height: 100%; /* img의 높이와 동일하게 설정 */ + background-color: #ececec; /* 요구된 배경색 추가 */ + + input { + display: none; + } +`,HO=c.button` + position: absolute; + top: 0px; + right: 45px; + background: none; + border: none; + padding: 8px; + cursor: pointer; + z-index: 1; +`,VO=c.div` + flex: 0 0 32px; /* 버튼 고정 너비 */ + display: flex; + justify-content: center; + align-items: center; + height: 100%; /* PreviewWrapper의 높이에 맞춤 */ +`,QO=c.div` + flex: 0 0 32px; /* 버튼 고정 너비 */ + display: flex; + justify-content: center; + align-items: center; + height: 100%; /* PreviewWrapper의 높이에 맞춤 */ +`,KO=c.button` + background: none; + border: none; + color: #333; + cursor: pointer; +`,GO=c.button` + background: none; + border: none; + color: #333; + cursor: pointer; +`,qO=c.div` + width: 100%; + height: 54px; /* 높이 설정 */ + display: flex; /* 플렉스 박스로 변경 */ + align-items: center; /* 세로 중앙 정렬 */ + justify-content: center; /* 가로 중앙 정렬 */ +`,YO=c.div` + display: flex; + justify-content: center; + gap: 5px; + + span { + width: 8px; + height: 8px; + border-radius: 50%; + background: #ddd; + cursor: pointer; + } + + span.active { + background: #000; + } +`,JO=c.div` + display: flex; + flex-direction: column; + align-items: flex-start; /* 세로로 가운데 정렬 */ + width: 100%; +`,XO=c.div` + margin-left: 20px; + display: flex; + align-items: center; /* Label과 Url을 같은 높이에 배치 */ + gap: 10px; /* Label과 Url 사이 간격 */ + padding: 10px; + border: none; +`,ZO=c.input` + width: 285px; + flex: 1; + padding: 10px; + background-color: #ececec; + border: 1px solid ${({isError:e})=>e?"red":"#ccc"}; + border-radius: 5px; +`,eT=c.span` + margin-left: 125px; + color: red; + font-size: 0.8rem; + margin-top: 5px; +`,tT=c.div` + display: flex; + flex-direction: column; /* 세로 정렬 */ + align-items: flex-start; /* 왼쪽 정렬 */ + justify-content: space-between; /* 위아래 요소 간격 균등 */ + width: 490px; + height: 495px; /* ImageUploadContainer와 동일한 고정 높이 */ + flex-grow: 1; /* 가로 공간을 균등 분배 */ + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; + box-sizing: border-box; +`,nT=c.div` + display: flex; + flex-direction: column; /* 세로 정렬 */ + gap: 50px; /* 컴포넌트 간 간격 */ + width: 100%; +`,ds=c.div` + display: flex; + flex-direction: row; /* 가로 배치 */ + align-items: center; /* 세로 중앙 정렬 */ + gap: 10px; /* 컴포넌트 간 간격 */ + width: 100%; +`,$o=c.label` + font-size: 1.2rem; + font-weight: bold; + flex-shrink: 0; /* 라벨 크기를 고정 */ + text-align: left; /* 라벨 텍스트 왼쪽 정렬 */ +`,rT=c.input` + width: 80%; + padding: 10px; + background-color: #ececec; + border: 1px solid #ccc; + border-radius: 5px; +`,oT=c.div` + display: flex; + flex-direction: column; /* 라벨과 카테고리를 세로로 배치 */ +`,iT=c.label` + font-size: 1.2rem; + font-weight: bold; + margin-bottom: 10px; /* 라벨과 카테고리 사이 간격 */ +`,sT=c(Fc)` + display: flex; + flex-wrap: wrap; + gap: 8px; + padding: 10px 0; + + div { + padding: 12px !important; /* 강제로 적용 */ + flex: 1 1 calc(25% - 8px); + box-sizing: border-box; + + &:hover { + background-color: #f0f0f0 !important; /* 호버 스타일도 강제 */ + } + + &.active { + font-weight: bold !important; /* 활성 상태 스타일 강제 */ + border-bottom: 2px solid black !important; + } + } +`,aT=c.div` + display: flex; + flex-direction: column; /* 세로 정렬 */ + gap: 20px; /* 컴포넌트 간 간격 */ + width: 100%; +`,rd=c.input` + width: 100px; + padding: 10px 0px; + text-align: center; + background-color: #ececec; + border: 1px solid #ccc; + border-radius: 5px; +`,lT=c.div` + position: relative; +`,cT=c.button` + width: 120px; + padding: 10px; + border: 1px solid #ccc; + border-radius: 5px; + font-weight: bold; + display: flex; + gap: 10px; + justify-content: center; + align-items: center; + box-sizing: border-box; +`,uT=c.div` + position: absolute; + width: 120px; + top: 100%; + left: 0; + right: 0; + font-size: 0.9rem; + border: 1px solid #ccc; + border-radius: 5px; + background: #fff; + z-index: 1000; + box-sizing: border-box; +`,dT=c.div` + padding: 10px; + text-align: center; + cursor: pointer; + background: ${({isSelected:e})=>e?"#f0f0f0":"#fff"}; + font-weight: ${({isSelected:e})=>e?"bold":"normal"}; + + &:hover { + background: #eaeaea; + } +`,fT=c.div` + display: flex; + flex-direction: row; /* 가로 배치 */ + gap: 20px; /* 두 요소 간 간격 */ + width: 100%; /* 부모 컨테이너에 맞게 확장 */ + align-items: center; /* 세로 중앙 정렬 */ +`,pT=c.div` + width: 100%; /* Wrapper 크기는 기존 유지 */ + max-width: 1100px; + margin: 0 auto; + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; /* 내부 여백 */ + margin-bottom: 20px; + box-sizing: border-box; +`,hT=c.textarea` + width: 100%; + height: 460px; /* 고정된 높이 */ + background-color: #ececec; + border: none; /* 테두리 제거 */ + border-radius: 10px; + padding: 20px; + outline: none; /* 포커스 시 외곽선 제거 */ + resize: none; /* 크기 조절 비활성화 */ + font-size: 1rem; /* 텍스트 크기 */ + line-height: 1.5; + color: #333; /* 텍스트 색상 */ + box-sizing: border-box; +`,mT=c.div` + display: flex; + justify-content: flex-end; + gap: 10px; +`,od=c.button` + padding: 10px 20px; + background: #000; + color: #fff; + border: 1px solid #000; + border-radius: 5px; + cursor: pointer; + + &:hover { + background: #333; + } +`;function gT(){const e=Ee(),[t,n]=w.useState(null),[r,o]=w.useState(null),[i,a]=w.useState(!1);return w.useEffect(()=>{navigator.geolocation&&!i&&navigator.geolocation.getCurrentPosition(l=>{const{latitude:u,longitude:d}=l.coords;n({latitude:u,longitude:d}),window.kakao&&new window.kakao.maps.services.Geocoder().coord2RegionCode(d,u,(f,h)=>{var b;if(h===window.kakao.maps.services.Status.OK){const y=((b=f[0])==null?void 0:b.region_3depth_name)||"";o(y),a(!0)}else console.error("주소를 가져오지 못했습니다.")})},l=>{console.error("위치 정보를 가져올 수 없습니다:",l)})},[t]),s.jsxs(ST,{children:[s.jsx(jT,{children:s.jsx("img",{src:"/images/login10.jpg",alt:"Login background",style:{width:"100%",height:"100%",objectFit:"cover"}})}),s.jsxs(CT,{children:[s.jsxs(bT,{children:["우리동네를 인증하고",s.jsx("br",{}),"공동구매를 시작하세요"]}),s.jsx(wT,{children:"위치서비스를 허용해주세요"}),s.jsxs(yT,{children:[t?s.jsx(Uv,{latitude:t.latitude,longitude:t.longitude,appKey:"af7394f12b174cad35e87960ddccf91f",width:400}):s.jsx("p",{children:"위치 정보를 불러오는 중..."}),s.jsxs(xT,{children:["현재 위치가 내 동네로 설정한 ",r||"00동","에 있습니다."]})]}),s.jsx(vT,{onClick:async()=>{r&&((await H4({address:r})).message==="주소 확인 완료"?(localStorage.setItem("address",r),e("/setnickname")):alert("주소를 다시 확인해주세요."))},children:"Next"})]})]})}const xT=c.div` + color: #88868c; +`,yT=c.div` + display: inline-flex; + align-items: center; + justify-content: center; + width: 100%; + flex-direction: column; + gap: 20px; + margin-top: 20px; +`,vT=c.div` + background-color: #000; + color: #fff; + border-radius: 5px; + width: calc(100% - 20px); + height: 35px; + display: inline-flex; + align-items: center; + justify-content: center; + margin-top: 35px; + cursor: pointer; +`,wT=c.div` + font-size: 12px; + font-weight: 500; + margin-top: 10px; +`,bT=c.div` + font-size: 30px; + font-weight: 900; + margin-bottom: 20px; +`,jT=c.div` + flex: 6; + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; +`,CT=c.div` + flex: 4; + background-color: #fff; + display: flex; + align-items: flex-start; + justify-content: center; + flex-direction: column; + padding-left: 20px; +`,ST=c.div` + display: flex; + width: 100%; + height: 100vh; +`,id="http://localhost:8080/api/v1/virtual",Wv=({orderId:e,amount:t,title:n,customerName:r,customerEmail:o,onClose:i,onComplete:a})=>{const[l,u]=w.useState(!1),d=async()=>{u(!0);try{const p=await re.post(`${id}`,{orderId:e,amount:t,orderName:n,customerName:r,customerEmail:o,validHours:12,successUrl:`${id}/success`,failUrl:`${id}/fail`,method:"VIRTUAL_ACCOUNT"},{headers:{Authorization:`Basic ${btoa("토스 시크릿 키:")}`,"Content-Type":"application/json"}});a(p.data)}catch(p){console.error("가상 계좌 발급 실패:",p),alert("가상 계좌 발급에 실패했습니다.")}finally{u(!1)}};return s.jsx(kT,{children:s.jsxs(PT,{children:[s.jsx(ET,{children:"가상 계좌 발급"}),s.jsxs(RT,{children:[s.jsxs("p",{children:["상품명: ",n]}),s.jsxs("p",{children:["결제 금액: ",t.toLocaleString()," 원"]})]}),s.jsxs(AT,{children:[s.jsx(IT,{onClick:d,disabled:l,children:l?"발급 중...":"발급"}),s.jsx(DT,{onClick:i,children:"닫기"})]})]})})},kT=c.div` + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +`,PT=c.div` + background: #fff; + padding: 20px; + border-radius: 10px; + width: 400px; + text-align: center; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); +`,ET=c.h2` + font-size: 1.5rem; + font-weight: bold; + margin-bottom: 20px; +`,RT=c.div` + margin-bottom: 20px; + + p { + margin: 5px 0; + font-size: 1rem; + } +`,AT=c.div` + display: flex; + justify-content: space-between; +`,IT=c.button` + padding: 10px 20px; + font-size: 1rem; + background-color: #007bff; + color: #fff; + border: none; + border-radius: 5px; + cursor: pointer; + + &:disabled { + background-color: #ccc; + cursor: not-allowed; + } + + &:hover:not(:disabled) { + background-color: #0056b3; + } +`,DT=c.button` + padding: 10px 20px; + font-size: 1rem; + background-color: #6c757d; + color: #fff; + border: none; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #5a6268; + } +`,OT=()=>{const e=Ee(),{state:t}=nt(),{post:n,quantity:r}=t||{},[o,i]=w.useState(null),[a,l]=w.useState(!1),[u,d]=w.useState({name:"",address:"",detailaddress:"",request:""});if(!n)return s.jsx("div",{children:"잘못된 접근입니다. 게시물 정보를 찾을 수 없습니다."});const p=()=>l(!1),f=y=>{var x;i(y),l(!1),alert(`가상계좌 발급 완료: ${(x=y.virtualAccount)==null?void 0:x.accountNumber}`)},h=y=>{const{name:x,value:j}=y.target;d({...u,[x]:j})},b=()=>{var y,x;if(!o){alert("먼저 가상계좌를 발급받아야 합니다.");return}e(`/community/post/${n.id}/payment/deposit`,{state:{bankCode:(y=o.virtualAccount)==null?void 0:y.bankCode,accountNumber:(x=o.virtualAccount)==null?void 0:x.accountNumber,totalAmount:r*n.unitAmount,onConfirm:()=>{alert("결제가 완료되었습니다."),e(`/community/post/${n.id}/payment/complete`,{state:{paymentKey:o.paymentKey,orderId:o.orderId,totalAmount:o.totalAmount,title:n.title,unitPrice:n.unitAmount,quantity:r}})}}})};return s.jsxs(TT,{children:[s.jsxs(NT,{children:[s.jsx(LT,{children:s.jsx(nx,{children:"공구 진행 결제(공구 참여자)"})}),s.jsxs(_T,{children:[s.jsxs(sd,{children:[s.jsx(rx,{children:"공구 모집 상품 정보"}),s.jsxs(MT,{children:[s.jsx($T,{children:s.jsx(zT,{children:s.jsx(FT,{children:s.jsx("img",{src:n.imageUrls[0],alt:"이미지"})})})}),s.jsxs(UT,{children:[s.jsxs(qa,{children:[s.jsx(Ya,{children:"제목"}),s.jsx(BT,{children:n.title})]}),s.jsxs(qa,{children:[s.jsx(Ya,{children:"개당 가격"}),n.unitAmount.toLocaleString()," 원"]}),s.jsxs(qa,{children:[s.jsx(Ya,{children:"수량"})," ",s.jsx(WT,{children:r})]}),s.jsxs(qa,{children:[s.jsx(Ya,{children:"결제 금액"})," ",s.jsxs(HT,{children:[(r*n.unitAmount).toLocaleString()," 원"]})]})]})]})]}),s.jsxs(sd,{children:[s.jsx(nx,{children:"배송 정보 확인"}),s.jsxs(QT,{children:[s.jsx(Ja,{placeholder:"이름을 입력하세요.",name:"name",value:u.name,onChange:h}),s.jsx(Ja,{placeholder:"주소를 입력하세요.",name:"address",value:u.address,onChange:h}),s.jsx(Ja,{placeholder:"상세 주소를 입력하세요.",name:"detailaddress",value:u.detailaddress,onChange:h}),s.jsx(Ja,{placeholder:"배송 요청사항을 입력하세요.",name:"request",value:u.request,onChange:h})]})]}),s.jsxs(sd,{children:[s.jsx(rx,{children:"결제 정보 확인"}),s.jsx(VT,{children:s.jsx(KT,{onClick:()=>l(!0),children:"가상계좌 발급"})})]}),s.jsxs(GT,{children:[s.jsx(ox,{onClick:b,children:"결제하기"}),s.jsx(ox,{onClick:()=>e(-1),children:"뒤로가기"})]})]})]}),a&&s.jsx(Wv,{orderId:`order-${Date.now()}`,amount:r*n.unitPrice,title:n.title,customerName:"홍길동",customerEmail:"customer@example.com",onClose:p,onComplete:f})]})},TT=c.div` + display: flex; + justify-content: center; + align-items: center; + padding: 20px; +`,NT=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,LT=c.div` + margin-bottom: 30px; +`,nx=c.h1` + font-size: 1.8rem; + font-weight: bold; + color: #333; +`,_T=c.div` + display: flex; + flex-direction: column; + gap: 20px; + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px 11px; + margin-top: 50px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,sd=c.div` + background-color: #fff; + padding: 20px; + margin: 20px; + border: 1px solid #ccc; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + box-sizing: border-box; +`,rx=c.div` + font-size: 1.6rem; + font-weight: bold; + margin: 15px 20px; + color: #333; +`,MT=c.div` + display: flex; + flex-direction: row; + gap: 20px; +`,$T=c.div` + display: flex; + flex-direction: column; + align-items: center; + width: 490px; + height: 400px; /* 고정된 높이 설정 */ + padding: 20px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,zT=c.div` + display: flex; + justify-content: space-between; /* 좌우 버튼 공간 확보 */ + align-items: center; /* 수직 중앙 정렬 */ + margin: auto 0; + width: 100%; + position: relative; /* 자식 요소 위치 기준 */ + overflow: hidden; /* 높이를 벗어난 콘텐츠 숨김 */ +`,FT=c.div` + flex: 1; /* 이미지 영역이 버튼 사이에 위치 */ + display: flex; + align-items: center; + justify-content: center; + width: 400px; + height: 100%; + border: 1px solid #fff; + border-radius: 10px; + overflow: hidden; /* 콘텐츠가 영역을 벗어나지 않도록 */ + + img { + max-width: 100%; /* 부모 너비를 넘지 않도록 */ + max-height: 100%; /* 부모 높이를 넘지 않도록 */ + object-fit: contain; /* 비율을 유지하며 부모 크기 안에 맞춤 */ + } +`,UT=c.div` + display: flex; + flex-direction: column; + justify-content: space-between; + width: 490px; + height: 400px; /* 고정된 높이 설정 */ + padding: 50px 20px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,qa=c.div` + display: flex; + align-items: center; +`,Ya=c.div` + margin-right: 15px; + font-size: 1.4rem; + font-weight: bold; + flex-shrink: 0; /* 라벨 크기를 고정 */ +`,BT=c.div` + display: -webkit-box; /* Flexbox 기반으로 동작 */ + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; /* 수직 방향 박스 정렬 */ + overflow: hidden; /* 넘치는 텍스트 숨김 */ + text-overflow: ellipsis; /* 넘치는 텍스트에 ... 표시 */ + white-space: normal; /* 줄바꿈 허용 */ + color: #333; /* 텍스트 색상 */ +`,WT=c.div` + display: flex; + gap: 10px; + align-items: center; +`,HT=c.div` + display: flex; + gap: 10px; + align-items: center; +`,VT=c.div` + display: flex; + margin: 50px 0; + justify-content: center; + align-items: center; +`,QT=c.div` + border: 1px solid #ccc; + padding: 20px; + border-radius: 8px; +`,Ja=c.input` + width: 100%; + margin-bottom: 10px; + padding: 10px; + border: 1px solid #ccc; + border-radius: 4px; +`,KT=c.button` + padding: 40px 50px; + font-size: 1.2rem; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #000; + border-radius: 10px; + cursor: pointer; + box-sizing: border-box; + box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1); + + &:hover { + background-color: #e5e5e5; + } +`,GT=c.div` + display: flex; + justify-content: flex-end; + padding: 0 20px; + gap: 20px; +`,ox=c.button` + padding: 10px 20px; + font-size: 16px; + font-weight: bold; + background-color: #000; + color: #fff; + border: none; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #444; + } +`,qT=()=>{const e=Ee(),{state:t}=nt(),{post:n,quantity:r}=t||{},[o,i]=w.useState(null),[a,l]=w.useState(!1);if(!n)return s.jsx("div",{children:"잘못된 접근입니다. 게시물 정보를 찾을 수 없습니다."});const u=()=>l(!1),d=f=>{var h;i(f),l(!1),alert(`가상계좌 발급 완료: ${(h=f.virtualAccount)==null?void 0:h.accountNumber}`)},p=()=>{var f,h;if(!o){alert("먼저 가상계좌를 발급받아야 합니다.");return}e(`/community/post/${n.id}/payment/deposit`,{state:{bankCode:(f=o.virtualAccount)==null?void 0:f.bankCode,accountNumber:(h=o.virtualAccount)==null?void 0:h.accountNumber,totalAmount:r*n.unitAmount,onConfirm:()=>{alert("결제가 완료되었습니다."),e(`/community/post/${n.id}/payment/complete`,{state:{paymentKey:o.paymentKey,orderId:o.orderId,totalAmount:o.totalAmount,title:n.title,unitPrice:n.unitAmount,quantity:r}})}}})};return s.jsxs(YT,{children:[s.jsxs(JT,{children:[s.jsx(XT,{children:s.jsx(ZT,{children:"공구 진행 결제(공구 참여자)"})}),s.jsxs(eN,{children:[s.jsxs(ix,{children:[s.jsx(sx,{children:"공구 모집 상품 정보"}),s.jsxs(tN,{children:[s.jsx(nN,{children:s.jsx(rN,{children:s.jsx(oN,{children:s.jsx("img",{src:n.imageUrls[0],alt:"이미지"})})})}),s.jsxs(iN,{children:[s.jsxs(Xa,{children:[s.jsx(Za,{children:"제목"}),s.jsx(sN,{children:n.title})]}),s.jsxs(Xa,{children:[s.jsx(Za,{children:"개당 가격"}),n.unitAmount.toLocaleString()," 원"]}),s.jsxs(Xa,{children:[s.jsx(Za,{children:"수량"})," ",s.jsx(aN,{children:r})]}),s.jsxs(Xa,{children:[s.jsx(Za,{children:"결제 금액"})," ",s.jsxs(lN,{children:[(r*n.unitAmount).toLocaleString()," 원"]})]})]})]})]}),s.jsxs(ix,{children:[s.jsx(sx,{children:"결제 정보 확인"}),s.jsx(cN,{children:s.jsx(uN,{onClick:()=>l(!0),children:"가상계좌 발급"})})]}),s.jsxs(dN,{children:[s.jsx(ax,{onClick:p,children:"결제하기"}),s.jsx(ax,{onClick:()=>e(-1),children:"뒤로가기"})]})]})]}),a&&s.jsx(Wv,{orderId:`order-${Date.now()}`,amount:r*n.unitPrice,title:n.title,customerName:"홍길동",customerEmail:"customer@example.com",onClose:u,onComplete:d})]})},YT=c.div` + display: flex; + justify-content: center; + align-items: center; + padding: 20px; +`,JT=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,XT=c.div` + margin-bottom: 30px; +`,ZT=c.h1` + font-size: 1.8rem; + font-weight: bold; + color: #333; +`,eN=c.div` + display: flex; + flex-direction: column; + gap: 20px; + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px 11px; + margin-top: 50px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,ix=c.div` + background-color: #fff; + padding: 20px; + margin: 20px; + border: 1px solid #ccc; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + box-sizing: border-box; +`,sx=c.div` + font-size: 1.6rem; + font-weight: bold; + margin: 15px 20px; + color: #333; +`,tN=c.div` + display: flex; + flex-direction: row; + gap: 20px; +`,nN=c.div` + display: flex; + flex-direction: column; + align-items: center; + width: 490px; + height: 400px; /* 고정된 높이 설정 */ + padding: 20px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,rN=c.div` + display: flex; + justify-content: space-between; /* 좌우 버튼 공간 확보 */ + align-items: center; /* 수직 중앙 정렬 */ + margin: auto 0; + width: 100%; + position: relative; /* 자식 요소 위치 기준 */ + overflow: hidden; /* 높이를 벗어난 콘텐츠 숨김 */ +`,oN=c.div` + flex: 1; /* 이미지 영역이 버튼 사이에 위치 */ + display: flex; + align-items: center; + justify-content: center; + width: 400px; + height: 100%; + border: 1px solid #fff; + border-radius: 10px; + overflow: hidden; /* 콘텐츠가 영역을 벗어나지 않도록 */ + + img { + max-width: 100%; /* 부모 너비를 넘지 않도록 */ + max-height: 100%; /* 부모 높이를 넘지 않도록 */ + object-fit: contain; /* 비율을 유지하며 부모 크기 안에 맞춤 */ + } +`,iN=c.div` + display: flex; + flex-direction: column; + justify-content: space-between; + width: 490px; + height: 400px; /* 고정된 높이 설정 */ + padding: 50px 20px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,Xa=c.div` + display: flex; + align-items: center; +`,Za=c.div` + margin-right: 15px; + font-size: 1.4rem; + font-weight: bold; + flex-shrink: 0; /* 라벨 크기를 고정 */ +`,sN=c.div` + display: -webkit-box; /* Flexbox 기반으로 동작 */ + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; /* 수직 방향 박스 정렬 */ + overflow: hidden; /* 넘치는 텍스트 숨김 */ + text-overflow: ellipsis; /* 넘치는 텍스트에 ... 표시 */ + white-space: normal; /* 줄바꿈 허용 */ + color: #333; /* 텍스트 색상 */ +`,aN=c.div` + display: flex; + gap: 10px; + align-items: center; +`,lN=c.div` + display: flex; + gap: 10px; + align-items: center; +`,cN=c.div` + display: flex; + margin: 50px 0; + justify-content: center; + align-items: center; +`,uN=c.button` + padding: 40px 50px; + font-size: 1.2rem; + font-weight: bold; + background-color: #f5f5f5; + border: 1px solid #000; + border-radius: 10px; + cursor: pointer; + box-sizing: border-box; + box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1); + + &:hover { + background-color: #e5e5e5; + } +`,dN=c.div` + display: flex; + justify-content: flex-end; + padding: 0 20px; + gap: 20px; +`,ax=c.button` + padding: 10px 20px; + font-size: 16px; + font-weight: bold; + background-color: #000; + color: #fff; + border: none; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #444; + } +`,fN=async e=>{try{return(await re.get(`/api/v1/virtual/update-payment/${e}`)).data}catch(t){throw console.error("결제 상태 확인 실패:",t),new Error("결제 상태 확인에 실패했습니다.")}},pN=async e=>{try{return(await re.post("/chat",{postId:e})).data}catch(t){throw console.error("채팅방 생성 오류:",t),new Error("채팅방을 생성할 수 없습니다.")}},hN=async()=>{try{return(await re.get("/admin/chatlist")).data}catch(e){throw console.error("채팅방 목록 조회 오류:",e),new Error("채팅방 목록을 불러올 수 없습니다.")}},mN=async e=>{try{return(await re.get(`/chat/${e}/messages`)).data}catch(t){throw console.error("채팅 메시지 조회 오류:",t),new Error("채팅 메시지를 조회할 수 없습니다.")}},gN=async e=>{try{return(await re.delete(`/chat/${e}`)).data}catch(t){throw console.error("채팅방 삭제 오류:",t),new Error("채팅방을 삭제할 수 없습니다.")}},xN=({chatRoomId:e,chatMembers:t,webSocketService:n,isAdmin:r=!1})=>{const[o,i]=w.useState([]),[a,l]=w.useState(""),u=w.useRef(null),d="user-00001";w.useEffect(()=>{(async()=>{try{const j=await mN(e),g={senderId:"system",content:`${t.map(v=>p(v)).join(", ")}님이 입장하셨습니다.`,timestamp:null};i([g,{senderId:"system",content:` +안내사항: 환불 및 이탈 관련 정책 + 1. 환불 및 수령 시간/위치 조율 + - 공구 진행 중(최종 승인 이후)인 채팅방에서 + 수령 위치 및 시간을 조율합니다. + - 이탈자가 발생하거나 환불 요청이 있을 경우, + 이탈자는 채팅방에서 환불 의사를 명확히 + 표시해야 하며, 모든 참여 인원이 동의한 + 경우에 한해 환불이 진행됩니다. + 2. 환불 및 비용 부담 + - 환불 진행 시, 전체 환불 처리 및 해당 인원에 + 대한 신고 접수가 이루어지며, 이로 인해 + 발생하는 모든 비용(공구 물품 반송 등)은 + 이탈자 본인이 전액 부담합니다. + 3. 이탈자에 대한 페널티 제도 + - 이탈 행위가 반복될 경우, 아래와 같은 + 경고 시스템이 적용됩니다. + - 1회 경고: 계정 일주일 정지 + - 3회 경고: 계정 한 달 정지 + - 5회 경고: 계정 영구 정지 + + 💡 주의: 본 안내사항을 숙지하지 않아 발생하는 + 불이익은 본인에게 책임이 있습니다. + +공구 진행에 차질이 없도록 적극적인 협조 +부탁드립니다. 😊`,timestamp:null},...j])}catch(j){console.error("Failed to fetch messages:",j)}})()},[e,t]);const p=x=>x==="system"?"":x===d?"나":x;w.useEffect(()=>{const x=j=>{i(g=>[...g,j])};return n.connect(()=>{n.subscribe(`/sub/message/${e}`,j=>{const g=JSON.parse(j.body);x(g)}),console.log("WebSocket connected to room")},()=>console.log("WebSocket disconnected"),()=>console.error("WebSocket connection error")),()=>{n.unsubscribe(`/sub/message/${e}`),n.close()}},[e,n]),w.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[o]);const f=()=>{if(!a.trim())return;const x={senderId:r?"system":d,content:r?`[관리자 메시지] ${a.trim()}`:a.trim(),timestamp:new Date().toISOString()};n.send(`/pub/message/${e}`,JSON.stringify(x)),i(j=>[...j,x]),l("")},h=x=>new Date(x).toLocaleDateString("ko-KR",{year:"numeric",month:"2-digit",day:"2-digit",weekday:"short"}),y=(x=>{const j=[];let g="";for(const m of x){const v=m.timestamp?h(m.timestamp):null;v&&v!==g&&(j.push({type:"date",content:v,senderId:"system",timestamp:null}),g=v),j.push(m)}return j})(o);return s.jsxs(yN,{children:[s.jsxs(vN,{children:[y.map((x,j)=>{var m;const g=x.senderId==="system"&&((m=x.content)==null?void 0:m.includes("안내사항: 환불 및 이탈 관련 정책"));return x.type==="date"?s.jsx(wN,{children:x.content},`date-${j}`):s.jsxs(bN,{isCurrentUser:x.senderId===d,isSystemMessage:x.senderId==="system",children:[s.jsx(jN,{children:x.senderId==="system"?"":p(x.senderId)}),s.jsx(CN,{isCurrentUser:x.senderId===d,isGroupNotice:g,isSystemMessage:x.senderId==="system",children:x.content}),x.timestamp&&x.senderId!=="system"&&s.jsx(SN,{children:new Date(x.timestamp).toLocaleTimeString()})]},j)}),s.jsx("div",{ref:u})]}),s.jsxs(kN,{children:[s.jsx(PN,{type:"text",value:a,onChange:x=>l(x.target.value),placeholder:"메시지를 입력하세요.",onKeyDown:x=>x.key==="Enter"&&f()}),s.jsx(EN,{onClick:f,disabled:!a.trim(),children:s.jsx(iE,{})})]})]})},yN=c.div` + display: flex; + flex-direction: column; + height: 100%; + max-height: 600px; + border: 1px solid #ccc; + border-radius: 8px; + overflow: hidden; + background-color: #fff; +`,vN=c.div` + flex: 1; + padding: 16px; + overflow-y: auto; + background-color: #f9f9f9; +`,wN=c.div` + text-align: center; + margin: 10px 0; + font-size: 0.9rem; + color: #888; + font-weight: bold; +`,bN=c.div` + display: flex; + flex-direction: column; + align-items: ${({isCurrentUser:e,isSystemMessage:t})=>t?"center":e?"flex-end":"flex-start"}; + margin-bottom: 12px; +`,jN=c.div` + font-size: 0.9rem; + font-weight: bold; + color: #333; + margin-bottom: 4px; +`,CN=c.div` + max-width: 70%; + background-color: ${({isCurrentUser:e,isGroupNotice:t,isSystemMessage:n})=>t||n?"#cecece":e?"#d9f9d9":"#e9e9e9"}; + color: #333; + padding: 10px; + border-radius: 12px; + word-wrap: break-word; + font-size: 1rem; + white-space: pre-wrap; /* 줄바꿈 유지 */ + text-align: ${({isGroupNotice:e})=>e?"left":"inherit"}; +`,SN=c.div` + font-size: 0.8rem; + color: #888; + margin-top: 4px; +`,kN=c.div` + display: flex; + padding: 12px; + border-top: 1px solid #ccc; + background-color: #fff; +`,PN=c.input` + flex: 1; + padding: 10px; + font-size: 1rem; + border: 1px solid #ccc; + border-radius: 8px; + outline: none; + margin-right: 8px; +`,EN=c.button` + padding: 10px 16px; + font-size: 1rem; + font-weight: bold; + color: #fff; + background-color: #4caf50; + border: none; + border-radius: 8px; + cursor: pointer; + + &:hover { + background-color: #45a049; + } + + &:disabled { + background-color: #ccc; + cursor: not-allowed; + } +`,Hv=({isOpen:e,onClose:t,chatRoomId:n,chatRoomTitle:r,isAdminPage:o=!1})=>{const i=Ee(),a=nt(),l=o||a.pathname==="/admin/chat";w.useEffect(()=>{e?i(`?roomId=${n}`,{replace:!0}):i(-1)},[e,n,i]);const u=async()=>{try{const p=new URLSearchParams(window.location.search).get("roomId");p&&(await gN(parseInt(p)),alert("채팅방이 성공적으로 삭제되었습니다."),t())}catch(d){console.error("채팅방 삭제 실패:",d),alert("채팅방을 삭제할 수 없습니다.")}};return e?s.jsx(RN,{children:s.jsxs(AN,{children:[s.jsxs(IN,{children:[s.jsx(DN,{children:r}),s.jsxs(ON,{children:[l&&s.jsx(TN,{onClick:u,children:s.jsx(oE,{})}),s.jsx(NN,{onClick:t,children:"×"})]})]}),s.jsx(LN,{children:s.jsx(xN,{chatRoomId:parseInt(n,10),chatMembers:[],webSocketService:Zs,isAdmin:o})})]})}):null},RN=c.div` + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 9999; +`,AN=c.div` + width: 90%; + max-width: 600px; + background-color: #fff; + border-radius: 10px; + overflow: hidden; + display: flex; + flex-direction: column; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +`,IN=c.div` + padding: 16px; + background-color: #f7f7f7; + border-bottom: 1px solid #ddd; + display: flex; + justify-content: space-between; + align-items: center; +`,DN=c.h2` + font-size: 18px; + font-weight: bold; + color: #333; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + text-overflow: ellipsis; +`,ON=c.div` + display: flex; + gap: 8px; +`,TN=c.button` + background: none; + border: none; + padding: 6px 12px; + cursor: pointer; + color: #666; + + &:hover { + color: #333; + } +`,NN=c.button` + background: none; + border: none; + font-size: 20px; + cursor: pointer; + color: #666; + + &:hover { + color: #333; + } +`,LN=c.div` + flex: 1; + padding: 16px; + overflow-y: auto; +`,_N=()=>{const e=Ee(),n=nt().state;if(!n||!n.communityPostId||!n.quantity)return s.jsx("div",{children:"잘못된 접근입니다."});const{communityPostId:r,quantity:o}=n,[i,a]=w.useState(null),[l,u]=w.useState(null),[d,p]=w.useState("WAITING_FOR_DEPOSIT"),[f,h]=w.useState(!1),[b,y]=w.useState(null);w.useEffect(()=>{const m=async()=>{try{const C=await fN(r);a(C),C.status==="DONE"&&p("DONE")}catch(C){console.error("결제 상태 조회 오류:",C),alert("결제 상태를 확인할 수 없습니다.")}},v=async()=>{try{const C=await si(Number(r));u({title:C.title,unitAmount:C.unitAmount})}catch(C){console.error("게시물 정보 조회 오류:",C),alert("게시물 정보를 가져올 수 없습니다.")}};m(),v()},[r]);const x=async()=>{try{const m=await pN(parseInt(r));y(m)}catch(m){console.error("채팅방 생성 오류:",m),alert("채팅방을 생성할 수 없습니다.")}},j=async()=>{b||await x(),h(!0)},g=()=>h(!1);return!i||!l?s.jsx("div",{children:"로딩 중..."}):s.jsxs(MN,{children:[d==="WAITING_FOR_DEPOSIT"?s.jsx(s.Fragment,{children:s.jsx(lx,{children:"결제 상태를 확인 중입니다..."})}):s.jsxs(s.Fragment,{children:[s.jsx(lx,{children:"결제가 정상적으로 완료되었습니다."}),s.jsxs($N,{children:[s.jsxs("p",{children:["주문 ID: ",i.orderId]}),s.jsxs("p",{children:["상품명: ",l.title]}),s.jsxs("p",{children:["개당 가격: ",l.unitAmount.toLocaleString()," 원"]}),s.jsxs("p",{children:["수량: ",o]}),s.jsxs("p",{children:["결제 금액: ",i.totalAmount.toLocaleString()," 원"]})]})]}),s.jsxs(zN,{children:[s.jsx(cx,{onClick:j,children:"채팅방 열기"}),s.jsx(cx,{onClick:()=>e("/mypage/orderlist"),children:"주문내역 보기"})]}),b&&s.jsx(Hv,{isOpen:f,onClose:g,chatRoomId:b.id.toString(),chatRoomTitle:b.roomName,webSocketService:Zs,isAdminPage:!1})]})},MN=c.div` + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 20px; + height: 100vh; + text-align: center; +`,lx=c.h1` + font-size: 2rem; + font-weight: bold; + color: #333; + margin-bottom: 20px; +`,$N=c.div` + display: flex; + flex-direction: column; + align-items: center; + gap: 10px; + margin-bottom: 20px; +`,zN=c.div` + display: flex; + gap: 20px; + margin-top: 20px; +`,cx=c.button` + padding: 10px 20px; + font-size: 1rem; + font-weight: bold; + color: #fff; + background-color: #000; + border: none; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #444; + } +`,FN=[{id:"NOT_APPROVED",name:"작성글 게시 승인 대기 목록"},{id:"REPORTED",name:"신고 접수 된 글 목록"}],UN=async e=>{try{return(await re.get("/admin/post",{params:{category:e}})).data}catch(t){throw console.error("Failed to fetch admin posts:",t),t}},BN=()=>{var a;const t=((a=nt().state)==null?void 0:a.selectedCategory)||"NOT_APPROVED",[n,r]=w.useState(t),[o,i]=w.useState([]);return w.useEffect(()=>{(async()=>{try{const u=await UN(n);i(n==="NOT_APPROVED"?u.filter(d=>d.status==="NOT_APPROVED"||d.status==="REJECTED"):u)}catch(u){console.error("Failed to fetch posts:",u)}})()},[n]),s.jsx("div",{children:s.jsx(WN,{children:s.jsxs(HN,{children:[s.jsx(QN,{children:"관리자 페이지"}),s.jsx(VN,{children:s.jsxs(KN,{children:[" ",s.jsx(Fc,{categories:FN,selectedCategory:n,onCategoryChange:l=>r(l),title:"게시글 관리"})]})}),s.jsx(Iv,{posts:o,selectedCategory:n,hideWriteButton:!0})]})})})},WN=c.div` + display: flex; + justify-content: center; + padding: 20px; +`,HN=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,VN=c.div` + display: flex; + align-items: center; /* 세로 가운데 정렬 */ + justify-content: flex-start; + margin-bottom: 20px; +`,QN=c.h1` + font-size: 1.8rem; + font-weight: bold; + margin-bottom: 1.5rem; + text-align: left; +`,KN=c.div` + display: flex; + justify-content: flex-end; + margin-left: 50px; +`,GN=()=>{const e=nt(),t=Ee(),{postId:n}=e.state||{},[r,o]=w.useState(null),[i,a]=w.useState(0);w.useEffect(()=>{(async()=>{if(!n){t("/admin/posts");return}try{const b=await si(n);o(b)}catch(b){console.error("Failed to fetch post details:",b)}})()},[n,t]);const l=()=>{r&&a(h=>(h+1)%r.imageUrls.length)},u=()=>{r&&a(h=>(h-1+r.imageUrls.length)%r.imageUrls.length)},d=h=>{a(h)},p=async()=>{if(r)try{await sc(n,"APPROVED"),alert("게시물이 승인되었습니다."),t("/admin/post")}catch(h){console.error("Failed to approve post:",h),alert("승인 처리 중 오류가 발생했습니다.")}},f=async()=>{if(r)try{await sc(n,"REJECTED"),alert("게시물이 거절 처리되었습니다."),t("/admin/post")}catch(h){console.error("Failed to reject post:",h),alert("거절 처리 중 오류가 발생했습니다.")}};return r?s.jsx(qN,{children:s.jsxs(YN,{children:[s.jsxs(JN,{children:[s.jsx(XN,{children:"작성글 게시 승인 대기"}),s.jsx(ZN,{children:s.jsx(eL,{onClick:()=>t(-1),children:s.jsx(eh,{size:24})})})]}),s.jsxs(tL,{children:[s.jsxs(nL,{children:[s.jsxs(rL,{children:[s.jsxs(oL,{children:[s.jsx(sL,{children:r.imageUrls.length>1&&i>0&&s.jsx(lL,{onClick:u,children:s.jsx($c,{size:20})})}),s.jsx(iL,{children:s.jsx("img",{src:r.imageUrls[i],alt:`이미지 ${i+1}`})}),s.jsx(aL,{children:r.imageUrls.length>1&&i1&&s.jsx(dL,{children:r.imageUrls.map((h,b)=>s.jsx("span",{className:i===b?"active":"",onClick:()=>d(b)},b))})}),s.jsx(fL,{children:s.jsxs(pL,{children:[s.jsx(zn,{htmlFor:"urlInput",children:"URL 주소"}),s.jsx(hL,{children:r.productUrl})]})})]}),s.jsx(mL,{children:s.jsxs(gL,{children:[s.jsxs(zo,{children:[s.jsx(zn,{children:"제목"}),s.jsx(xL,{children:r.title})]}),s.jsxs(el,{children:[s.jsxs(yL,{children:[s.jsx(zn,{children:"작성자"}),s.jsx(vL,{children:r.nickname})]}),s.jsxs(wL,{children:[s.jsx(zn,{children:"작성일"})," ",new Date(r.createdAt).toLocaleString()]})]}),s.jsxs(el,{children:[s.jsxs(zo,{children:[s.jsx(zn,{children:"카테고리"})," ",r.category]}),s.jsxs(zo,{children:[s.jsx(zn,{children:"참여 현황"})," ",r.currentQuantity," / ",r.availableNumber]})]}),s.jsx(el,{children:s.jsxs(zo,{children:[s.jsx(zn,{children:"모집 마감 기간"})," ",r.period,"일"]})}),s.jsxs(el,{children:[s.jsxs(zo,{children:[s.jsx(zn,{children:"총 가격"})," ",r.totalAmount.toLocaleString()," ","원"]}),s.jsxs(zo,{children:[s.jsx(zn,{children:"개당 가격"})," ",r.unitAmount.toLocaleString()," ","원"]})]})]})})]}),s.jsx(bL,{children:s.jsx(jL,{readOnly:!0,value:r.description})}),s.jsxs(CL,{children:[s.jsx(SL,{onClick:p,children:"승인"}),s.jsx(kL,{onClick:f,children:"거절"})]})]})]})}):s.jsx("div",{children:"Loading..."})},qN=c.div` + padding: 20px; + display: flex; + flex-direction: column; + align-items: center; +`,YN=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,JN=c.div` + display: flex; + flex-direction: column; /* Title과 HeaderWrapper를 세로로 배치 */ + gap: 10px; /* Title과 HeaderWrapper 사이 간격 */ + margin-bottom: 1.5rem; +`,XN=c.h1` + font-size: 1.8rem; + font-weight: bold; + text-align: left; + margin: 0; /* Title의 기본 마진 제거 */ +`,ZN=c.div` + width: 1000px; + margin: 30px auto 0; + display: flex; + justify-content: space-between; + align-items: center; +`,eL=c.button` + background: none; + border: none; + cursor: pointer; +`,tL=c.div` + display: flex; + flex-direction: column; + background: #fff; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +`,nL=c.div` + display: flex; /* 가로 정렬 */ + flex-direction: row; /* 기본값이므로 명시적으로 추가 */ + align-items: stretch; /* 양쪽 요소의 높이를 동일하게 */ + justify-content: center; /* 양쪽 여백 균등 배치 */ + gap: 20px; /* 두 컨테이너 사이 간격 */ + margin-bottom: 20px; /* 아래 요소와의 간격 */ +`,rL=c.div` + display: flex; + flex-direction: column; + align-items: center; + width: 490px; + height: 470px; /* 고정된 높이 설정 */ + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px 11px; + position: relative; + box-sizing: border-box; /* 패딩과 보더 포함한 크기 계산 */ +`,oL=c.div` + display: flex; + justify-content: space-between; /* 좌우 버튼 공간 확보 */ + align-items: center; /* 수직 중앙 정렬 */ + width: 100%; + height: 320px; /* 기준 높이 */ + position: relative; /* 자식 요소 위치 기준 */ + overflow: hidden; /* 높이를 벗어난 콘텐츠 숨김 */ +`,iL=c.div` + flex: 1; /* 이미지 영역이 버튼 사이에 위치 */ + display: flex; + align-items: center; + justify-content: center; + width: 400px; + height: 100%; + border: 1px solid #ccc; + border-radius: 10px; + overflow: hidden; /* 콘텐츠가 영역을 벗어나지 않도록 */ + + img { + max-width: 100%; /* 부모 너비를 넘지 않도록 */ + max-height: 100%; /* 부모 높이를 넘지 않도록 */ + object-fit: contain; /* 비율을 유지하며 부모 크기 안에 맞춤 */ + } +`,sL=c.div` + flex: 0 0 32px; /* 버튼 고정 너비 */ + display: flex; + justify-content: center; + align-items: center; + height: 100%; /* PreviewWrapper의 높이에 맞춤 */ +`,aL=c.div` + flex: 0 0 32px; /* 버튼 고정 너비 */ + display: flex; + justify-content: center; + align-items: center; + height: 100%; /* PreviewWrapper의 높이에 맞춤 */ +`,lL=c.button` + background: none; + border: none; + color: #333; + cursor: pointer; +`,cL=c.button` + background: none; + border: none; + color: #333; + cursor: pointer; +`,uL=c.div` + width: 100%; + height: 54px; /* 높이 설정 */ + display: flex; /* 플렉스 박스로 변경 */ + align-items: center; /* 세로 중앙 정렬 */ + justify-content: center; /* 가로 중앙 정렬 */ +`,dL=c.div` + display: flex; + justify-content: center; + gap: 5px; + + span { + width: 8px; + height: 8px; + border-radius: 50%; + background: #ddd; + cursor: pointer; + } + + span.active { + background: #000; + } +`,fL=c.div` + display: flex; + flex-direction: column; + align-items: flex-start; /* 세로로 가운데 정렬 */ + width: 100%; +`,pL=c.div` + margin-left: 20px; + display: flex; + align-items: center; /* Label과 Url을 같은 높이에 배치 */ + gap: 10px; /* Label과 Url 사이 간격 */ + padding: 10px; + border: none; +`,hL=c.div` + width: 285px; + flex: 1; + padding: 10px; + border: none; + border-radius: 5px; +`,mL=c.div` + display: flex; + flex-direction: column; /* 세로 정렬 */ + align-items: flex-start; /* 왼쪽 정렬 */ + justify-content: space-between; /* 위아래 요소 간격 균등 */ + width: 490px; + max-width: 490px; /* 최대 너비 고정 */ + height: 470px; /* ImageUploadContainer와 동일한 고정 높이 */ + flex-grow: 1; /* 가로 공간을 균등 분배 */ + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; + box-sizing: border-box; +`,gL=c.div` + display: flex; + flex-direction: column; + gap: 20px; /* 컴포넌트 간 간격 */ + width: 100%; +`,zo=c.div` + display: flex; + flex-direction: column; + font-size: 1rem; +`,zn=c.label` + font-size: 1.2rem; + font-weight: bold; + margin-bottom: 4px; /* Label과 텍스트 사이 간격 */ +`,xL=c.span` + display: -webkit-box; /* Flexbox 기반으로 동작 */ + -webkit-line-clamp: 2; /* 두 줄까지만 표시 */ + -webkit-box-orient: vertical; /* 수직 방향 박스 정렬 */ + overflow: hidden; /* 넘치는 텍스트 숨김 */ + text-overflow: ellipsis; /* 넘치는 텍스트에 ... 표시 */ + white-space: normal; /* 줄바꿈 허용 */ + color: #333; /* 텍스트 색상 */ +`,el=c.div` + display: flex; /* 한 줄로 배치 */ + align-items: center; /* 세로 가운데 정렬 */ + justify-content: space-between; /* 양쪽 여백 균등 배치 */ + width: 100%; /* 부모 컨테이너 너비 */ + + & > div { + flex: 1; /* 내부 요소들이 동일한 크기로 영역 나눔 */ + } +`,yL=c.div` + display: flex; /* 가로 배치 */ + flex-direction: column; /* 내부 요소가 한 줄씩 배치되도록 */ + gap: 5px; /* 내부 요소 간 간격 */ +`,vL=c.div` + display: flex; /* 한 줄로 배치 */ + align-items: center; /* 세로로 가운데 정렬 */ + font-size: 1rem; /* 텍스트 크기 설정 */ +`,wL=c.div` + display: flex; /* 가로 배치 */ + flex-direction: column; /* 내부 요소가 한 줄씩 배치되도록 */ + gap: 5px; /* 내부 요소 간 간격 */ +`,bL=c.div` + width: 100%; + max-width: 1000px; + margin: 0 auto; + border: 1px solid #ccc; + border-radius: 10px; + padding: 20px; + margin-bottom: 20px; + box-sizing: border-box; +`,jL=c.textarea` + width: 100%; + height: 460px; /* 고정된 높이 */ + border: none; /* 테두리 제거 */ + border-radius: 10px; + padding: 20px; + outline: none; /* 포커스 시 외곽선 제거 */ + resize: none; /* 크기 조절 비활성화 */ + font-size: 1rem; /* 텍스트 크기 */ + line-height: 1.5; + color: #333; /* 텍스트 색상 */ + box-sizing: border-box; +`,CL=c.div` + display: flex; + justify-content: flex-end; + margin-top: 20px; + gap: 10px; +`,SL=c.button` + padding: 10px 20px; + background-color: #000; + color: white; + font-size: 1rem; + font-weight: bold; + border: none; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #484848; + } +`,kL=c.button` + padding: 10px 20px; + background-color: #ff0000; + color: white; + font-size: 1rem; + font-weight: bold; + border: none; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #ff1e1b; + } +`,PL=()=>{const{id:e}=$i();if(!e)return s.jsx("p",{children:"상품 번호가 유실되었습니다."});const t=Number(e),n=window.location.search,o=new URLSearchParams(n).get("amount"),{data:i,isLoading:a,isError:l}=ma(t);return i?s.jsx(s.Fragment,{children:s.jsx(Ro,{isLoading:a,isError:l,children:s.jsxs(EL,{children:[s.jsxs(RL,{children:[s.jsx(AL,{children:"결제 실패"}),s.jsx(IL,{children:"죄송합니다. 결제에 실패하였습니다."}),s.jsxs(DL,{children:[s.jsxs(ux,{children:[s.jsx(dx,{children:"상품명"}),s.jsx(fx,{children:i==null?void 0:i.name})]}),s.jsxs(ux,{children:[s.jsx(dx,{children:"결제 금액"}),s.jsxs(fx,{children:[o," 원"]})]})]})]}),s.jsxs(OL,{children:[s.jsx(TL,{to:`/products/${t}`,children:"다시 시도하기"}),s.jsx(NL,{to:"/",children:"메인으로 돌아가기"})]})]})})}):s.jsx("p",{children:"해당 상품을 찾을 수 없습니다."})},EL=c.div` + width: 100%; + max-width: 650px; + margin: 0 auto; + padding: 20px; + background-color: #f8fafc; + display: flex; + flex-direction: column; + align-items: center; +`,RL=c.div` + width: 100%; + background-color: white; + border-radius: 12px; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + padding: 32px 20px; + text-align: center; + margin-bottom: 24px; +`,AL=c.h1` + font-size: 1.5rem; + font-weight: 700; + color: #1e293b; + margin-bottom: 12px; +`,IL=c.p` + color: #64748b; + font-size: 1rem; + margin-bottom: 24px; +`,DL=c.div` + background-color: #f8fafc; + border-radius: 8px; + padding: 16px; + margin-top: 20px; +`,ux=c.div` + display: flex; + justify-content: space-between; + margin-bottom: 12px; + + &:last-child { + margin-bottom: 0; + } +`,dx=c.span` + color: #64748b; + font-size: 0.875rem; +`,fx=c.span` + color: #1e293b; + font-weight: 500; +`,OL=c.div` + display: flex; + gap: 12px; + width: 100%; +`,Vv=c(An)` + flex: 1; + text-decoration: none; + display: flex; + justify-content: center; + align-items: center; + padding: 12px; + border-radius: 8px; + font-weight: 600; + font-size: 0.875rem; + cursor: pointer; + transition: all 0.2s; +`,TL=c(Vv)` + background-color: #2563eb; + border: none; + color: white; + + &:hover { + background-color: #1d4ed8; + } +`,NL=c(Vv)` + background-color: white; + border: 1px solid #e2e8f0; + color: #475569; + + &:hover { + background-color: #f8fafc; + } +`,ad=12,LL=()=>{var x;const e=Ee(),t=nt(),[n,r]=w.useState([]),[o,i]=w.useState(1),[a,l]=w.useState(!1),d=new URLSearchParams(t.search).get("roomId"),p=Math.ceil(n.length/ad);w.useEffect(()=>{(async()=>{try{const g=await hN();r(g)}catch(g){console.error("Failed to fetch chat rooms:",g)}})()},[]);const f=(o-1)*ad,h=n.slice(f,f+ad),b=()=>{l(!0)},y=()=>{l(!1),e(-1)};return s.jsx(_L,{children:s.jsxs(ML,{children:[s.jsxs($L,{children:[s.jsx(zL,{children:"채팅방 관리"}),s.jsx(FL,{children:s.jsx(UL,{onClick:()=>e(-1),children:s.jsx(eh,{size:24})})})]}),s.jsxs(BL,{children:[s.jsx(WL,{children:h.map(j=>s.jsxs(HL,{onClick:b,children:[s.jsx(VL,{children:j.roomName}),s.jsxs(QL,{children:["참여자: ",j.chatMembers.join(", ")]})]},j.postId))}),s.jsx(oh,{currentPage:o,totalPages:p,onPageChange:j=>i(j)}),a&&d&&s.jsx(Hv,{chatRoomId:d,chatRoomTitle:((x=n.find(j=>j.postId.toString()===d))==null?void 0:x.roomName)||"",isOpen:a,onClose:y,webSocketService:Zs,isAdminPage:!0})]})]})})},_L=c.div` + padding: 20px; + display: flex; + flex-direction: column; + align-items: center; +`,ML=c.div` + width: 100%; + max-width: 1120px; + margin: 0 auto; +`,$L=c.div` + display: flex; + flex-direction: column; /* Title과 HeaderWrapper를 세로로 배치 */ + gap: 10px; /* Title과 HeaderWrapper 사이 간격 */ + margin-bottom: 1.5rem; +`,zL=c.h1` + font-size: 1.8rem; + font-weight: bold; + text-align: left; + margin: 0; /* Title의 기본 마진 제거 */ +`,FL=c.div` + width: 1000px; + margin: 30px auto 0; + display: flex; + justify-content: space-between; + align-items: center; +`,UL=c.button` + background: none; + border: none; + cursor: pointer; +`,BL=c.div` + display: flex; + flex-direction: column; + background: #fff; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +`,WL=c.div` + display: flex; + flex-wrap: wrap; + gap: 20px; + justify-content: flex-start; +`,HL=c.div` + background: #f9f9f9; + border: 1px solid #ddd; + border-radius: 10px; + padding: 20px; + width: 300px; + cursor: pointer; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + + &:hover { + background: #f1f1f1; + } +`,VL=c.h3` + font-size: 18px; + margin-bottom: 10px; +`,QL=c.p` + font-size: 14px; + color: #666; +`,KL=e=>({"004":"KB국민은행","045":"MG새마을금고","034":"광주은행","011":"NH농협은행","003":"IBK기업은행","088":"신한은행","020":"우리은행","007":"수협은행"})[e]||"알 수 없는 은행",GL=()=>{const e=nt(),t=Ee(),n=e.state;if(!n)return s.jsx("div",{children:"잘못된 접근입니다."});const{bankCode:r,accountNumber:o,totalAmount:i,onConfirm:a,communityPostId:l}=n,[u,d]=w.useState(""),[p,f]=w.useState(""),[h,b]=w.useState("");w.useEffect(()=>{d(KL(r))},[r]);const y=j=>{f(j.target.value),b("")},x=()=>{const j=Number(p);if(j!==i){b(`입금 금액이 정확하지 않습니다. 총 금액: ${i.toLocaleString()} 원`);return}a(j),t(`/community/post/${l}/payment/complete`,{state:{communityPostId:l}})};return s.jsx(qL,{children:s.jsxs(YL,{children:[s.jsx(JL,{children:"입금 정보 확인"}),s.jsxs(XL,{children:[s.jsxs(ld,{children:[s.jsx(cd,{children:"은행명:"}),s.jsx(ud,{children:u})]}),s.jsxs(ld,{children:[s.jsx(cd,{children:"계좌 번호:"}),s.jsx(ud,{children:o})]}),s.jsxs(ld,{children:[s.jsx(cd,{children:"결제 금액:"}),s.jsxs(ud,{children:[i.toLocaleString()," 원"]})]})]}),s.jsxs(ZL,{children:[s.jsx(e_,{type:"number",placeholder:"입금 금액을 입력하세요",value:p,onChange:y}),h&&s.jsx(t_,{children:h})]}),s.jsx(n_,{children:s.jsx(r_,{onClick:x,children:"확인"})})]})})},qL=c.div` + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + background-color: #f8f9fa; +`,YL=c.div` + background: #fff; + padding: 30px; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + max-width: 400px; + width: 100%; +`,JL=c.h1` + font-size: 1.5rem; + font-weight: bold; + text-align: center; + margin-bottom: 20px; +`,XL=c.div` + margin-bottom: 20px; +`,ld=c.div` + display: flex; + justify-content: space-between; + margin-bottom: 10px; +`,cd=c.span` + font-weight: bold; + color: #333; +`,ud=c.span` + color: #555; +`,ZL=c.div` + margin-bottom: 20px; +`,e_=c.input` + width: 100%; + padding: 10px; + font-size: 1rem; + border: 1px solid #ccc; + border-radius: 5px; +`,t_=c.p` + color: red; + font-size: 0.9rem; + margin-top: 10px; +`,n_=c.div` + display: flex; + justify-content: center; +`,r_=c.button` + padding: 10px 20px; + font-size: 1rem; + font-weight: bold; + color: #fff; + background-color: #007bff; + border: none; + border-radius: 5px; + cursor: pointer; + + &:hover { + background-color: #0056b3; + } +`,fs=({children:e})=>{const{isLoggedIn:t}=Uc();return t?s.jsx(s.Fragment,{children:e}):s.jsx(FC,{to:"/signin"})},o_=qC([{path:"/",element:s.jsxs(s.Fragment,{children:[s.jsx(F4,{}),s.jsx(TO,{}),s.jsx(rh,{})]}),errorElement:s.jsx(uS,{}),children:[{path:"/",element:s.jsx(lE,{})},{path:"/products",element:s.jsx(fs,{children:s.jsx(y5,{})})},{path:"/products/:id",element:s.jsx(fs,{children:s.jsx(F5,{})})},{path:"/products/payment/:id",element:s.jsx(sO,{})},{path:"/products/payment-success/:id",element:s.jsx(SO,{})},{path:"/products/payment-fail/:id",element:s.jsx(PL,{})},{path:"/community/post",element:s.jsx(fs,{children:s.jsx(BE,{})})},{path:"/community/post/create",element:s.jsx(KE,{})},{path:"/community/post/:communityPostId",element:s.jsx(I3,{})},{path:"/mypage/post/:communityPostId/edit",element:s.jsx(NO,{})},{path:"/community/post/:communityPostId/payment/author",element:s.jsx(OT,{})},{path:"/community/post/:communityPostId/payment/participant",element:s.jsx(qT,{})},{path:"/community/post/:communityPostId/payment/deposit",element:s.jsx(GL,{})},{path:"/community/post/:communityPostId/payment/complete",element:s.jsx(_N,{})},{path:"/admin/post",element:s.jsx(fs,{children:s.jsx(BN,{})})},{path:"/admin/post/approve/:communityPostId",element:s.jsx(GN,{})},{path:"/admin/chatlist",element:s.jsxs(fs,{children:[" ",s.jsx(LL,{})]})},{path:"/mypage",children:[{path:"setting",element:s.jsx(tI,{})},{path:"orderlist",element:s.jsx(D6,{})},{path:"wishlist",element:s.jsx(T6,{})},{path:"location",element:s.jsx(G6,{})},{path:"refund",element:s.jsx(Z6,{})},{path:"notification",element:s.jsx(pD,{})},{path:"myposts",element:s.jsx(bD,{})},{path:"chatlist",element:s.jsx(TD,{})}]}]},{path:"/signin",element:s.jsx(q4,{})},{path:"/signup",element:s.jsx(rR,{})},{path:"/findpassword",element:s.jsx(dR,{})},{path:"/resetpassword",element:s.jsx(kR,{})},{path:"/termsandservice",element:s.jsx($R,{})},{path:"/setlocation",element:s.jsx(gT,{})},{path:"/setnickname",element:s.jsx(ND,{})},{path:"/setprofile",element:s.jsx(UD,{})},{path:"/logincomplete",element:s.jsx(JD,{})},{path:"*",element:s.jsx(dS,{})}],{future:{v7_relativeSplatPath:!0,v7_fetcherPersist:!0,v7_normalizeFormMethod:!0,v7_partialHydration:!0,v7_skipActionErrorRevalidation:!0}}),i_=f2` + body { + margin: 0; + font-family: 'Arial', sans-serif; + background-color: #fff; + } +`,s_=new z2({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});My(document.getElementById("root")).render(s.jsx(H2,{client:s_,children:s.jsx(E4,{children:s.jsxs(z5,{children:[s.jsx(i_,{}),s.jsx(oS,{router:o_,future:{v7_startTransition:!0}})]})})})); diff --git a/dist/favicon.ico b/dist/favicon.ico new file mode 100644 index 0000000..a11777c Binary files /dev/null and b/dist/favicon.ico differ diff --git a/dist/images/apple.png b/dist/images/apple.png new file mode 100644 index 0000000..1bbfea1 Binary files /dev/null and b/dist/images/apple.png differ diff --git a/dist/images/arrow-left.png b/dist/images/arrow-left.png new file mode 100644 index 0000000..47d0738 Binary files /dev/null and b/dist/images/arrow-left.png differ diff --git a/dist/images/bell.png b/dist/images/bell.png new file mode 100644 index 0000000..5b9d300 Binary files /dev/null and b/dist/images/bell.png differ diff --git a/dist/images/chat.png b/dist/images/chat.png new file mode 100644 index 0000000..b68e78f Binary files /dev/null and b/dist/images/chat.png differ diff --git a/dist/images/chatlist.png b/dist/images/chatlist.png new file mode 100644 index 0000000..7ed1873 Binary files /dev/null and b/dist/images/chatlist.png differ diff --git a/dist/images/chatlist_on.png b/dist/images/chatlist_on.png new file mode 100644 index 0000000..f8a8e4e Binary files /dev/null and b/dist/images/chatlist_on.png differ diff --git a/dist/images/check.png b/dist/images/check.png new file mode 100644 index 0000000..808b5d2 Binary files /dev/null and b/dist/images/check.png differ diff --git a/dist/images/comment.png b/dist/images/comment.png new file mode 100644 index 0000000..feaf990 Binary files /dev/null and b/dist/images/comment.png differ diff --git a/dist/images/location.png b/dist/images/location.png new file mode 100644 index 0000000..46c06ca Binary files /dev/null and b/dist/images/location.png differ diff --git a/dist/images/location_on.png b/dist/images/location_on.png new file mode 100644 index 0000000..8fbeebb Binary files /dev/null and b/dist/images/location_on.png differ diff --git a/dist/images/login-compl.jpg b/dist/images/login-compl.jpg new file mode 100644 index 0000000..68137ed Binary files /dev/null and b/dist/images/login-compl.jpg differ diff --git a/dist/images/login1.jpg b/dist/images/login1.jpg new file mode 100644 index 0000000..a4abfeb Binary files /dev/null and b/dist/images/login1.jpg differ diff --git a/dist/images/login10.jpg b/dist/images/login10.jpg new file mode 100644 index 0000000..85889c6 Binary files /dev/null and b/dist/images/login10.jpg differ diff --git a/dist/images/login11.jpg b/dist/images/login11.jpg new file mode 100644 index 0000000..1b2907c Binary files /dev/null and b/dist/images/login11.jpg differ diff --git a/dist/images/login2.jpg b/dist/images/login2.jpg new file mode 100644 index 0000000..4303a1e Binary files /dev/null and b/dist/images/login2.jpg differ diff --git a/dist/images/login3.jpg b/dist/images/login3.jpg new file mode 100644 index 0000000..1a12d54 Binary files /dev/null and b/dist/images/login3.jpg differ diff --git a/dist/images/login4.jpg b/dist/images/login4.jpg new file mode 100644 index 0000000..bdc880f Binary files /dev/null and b/dist/images/login4.jpg differ diff --git a/dist/images/login5.jpeg b/dist/images/login5.jpeg new file mode 100644 index 0000000..e6556e8 Binary files /dev/null and b/dist/images/login5.jpeg differ diff --git a/dist/images/login6.jpg b/dist/images/login6.jpg new file mode 100644 index 0000000..f4de47c Binary files /dev/null and b/dist/images/login6.jpg differ diff --git a/dist/images/login7.jpg b/dist/images/login7.jpg new file mode 100644 index 0000000..aa165b7 Binary files /dev/null and b/dist/images/login7.jpg differ diff --git a/dist/images/login8.jpeg b/dist/images/login8.jpeg new file mode 100644 index 0000000..b0b75de Binary files /dev/null and b/dist/images/login8.jpeg differ diff --git a/dist/images/login9.jpg b/dist/images/login9.jpg new file mode 100644 index 0000000..b834031 Binary files /dev/null and b/dist/images/login9.jpg differ diff --git a/dist/images/myposts.png b/dist/images/myposts.png new file mode 100644 index 0000000..471ad32 Binary files /dev/null and b/dist/images/myposts.png differ diff --git a/dist/images/myposts_on.png b/dist/images/myposts_on.png new file mode 100644 index 0000000..7922abc Binary files /dev/null and b/dist/images/myposts_on.png differ diff --git a/dist/images/mypostscheck.png b/dist/images/mypostscheck.png new file mode 100644 index 0000000..dd6359e Binary files /dev/null and b/dist/images/mypostscheck.png differ diff --git a/dist/images/mypostscheck_on.png b/dist/images/mypostscheck_on.png new file mode 100644 index 0000000..c4a019b Binary files /dev/null and b/dist/images/mypostscheck_on.png differ diff --git a/dist/images/naverlogo.png b/dist/images/naverlogo.png new file mode 100644 index 0000000..842781b Binary files /dev/null and b/dist/images/naverlogo.png differ diff --git a/dist/images/notification.png b/dist/images/notification.png new file mode 100644 index 0000000..5b9d300 Binary files /dev/null and b/dist/images/notification.png differ diff --git a/dist/images/notification_on.png b/dist/images/notification_on.png new file mode 100644 index 0000000..56971b8 Binary files /dev/null and b/dist/images/notification_on.png differ diff --git a/dist/images/orderlist.png b/dist/images/orderlist.png new file mode 100644 index 0000000..44a6933 Binary files /dev/null and b/dist/images/orderlist.png differ diff --git a/dist/images/orderlist_on.png b/dist/images/orderlist_on.png new file mode 100644 index 0000000..cf4f968 Binary files /dev/null and b/dist/images/orderlist_on.png differ diff --git a/dist/images/origin.png b/dist/images/origin.png new file mode 100644 index 0000000..47a8ffd Binary files /dev/null and b/dist/images/origin.png differ diff --git a/dist/images/qricon.png b/dist/images/qricon.png new file mode 100644 index 0000000..d8f8a0c Binary files /dev/null and b/dist/images/qricon.png differ diff --git a/dist/images/refund.png b/dist/images/refund.png new file mode 100644 index 0000000..f149ad0 Binary files /dev/null and b/dist/images/refund.png differ diff --git a/dist/images/refund_on.png b/dist/images/refund_on.png new file mode 100644 index 0000000..02b845e Binary files /dev/null and b/dist/images/refund_on.png differ diff --git a/dist/images/search.png b/dist/images/search.png new file mode 100644 index 0000000..b8b9098 Binary files /dev/null and b/dist/images/search.png differ diff --git a/dist/images/setting.png b/dist/images/setting.png new file mode 100644 index 0000000..4429479 Binary files /dev/null and b/dist/images/setting.png differ diff --git a/dist/images/setting_on.png b/dist/images/setting_on.png new file mode 100644 index 0000000..5f66f68 Binary files /dev/null and b/dist/images/setting_on.png differ diff --git a/dist/images/towel.jpeg b/dist/images/towel.jpeg new file mode 100644 index 0000000..ea7acc9 Binary files /dev/null and b/dist/images/towel.jpeg differ diff --git a/dist/images/trenchcoat.jpeg b/dist/images/trenchcoat.jpeg new file mode 100644 index 0000000..090b1b7 Binary files /dev/null and b/dist/images/trenchcoat.jpeg differ diff --git a/dist/images/vacuum.png b/dist/images/vacuum.png new file mode 100644 index 0000000..2a20f41 Binary files /dev/null and b/dist/images/vacuum.png differ diff --git a/dist/images/wish.png b/dist/images/wish.png new file mode 100644 index 0000000..3aada00 Binary files /dev/null and b/dist/images/wish.png differ diff --git a/dist/images/wish_on.png b/dist/images/wish_on.png new file mode 100644 index 0000000..ae74dd9 Binary files /dev/null and b/dist/images/wish_on.png differ diff --git a/dist/images/wishlist.png b/dist/images/wishlist.png new file mode 100644 index 0000000..98abf30 Binary files /dev/null and b/dist/images/wishlist.png differ diff --git a/dist/images/wishlist_on.png b/dist/images/wishlist_on.png new file mode 100644 index 0000000..8a18d81 Binary files /dev/null and b/dist/images/wishlist_on.png differ diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..04aee9c --- /dev/null +++ b/dist/index.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + Good-Buy-Us + + + +
+ + diff --git a/dist/logo192.png b/dist/logo192.png new file mode 100644 index 0000000..fc44b0a Binary files /dev/null and b/dist/logo192.png differ diff --git a/dist/logo512.png b/dist/logo512.png new file mode 100644 index 0000000..a4e47a6 Binary files /dev/null and b/dist/logo512.png differ diff --git a/dist/manifest.json b/dist/manifest.json new file mode 100644 index 0000000..080d6c7 --- /dev/null +++ b/dist/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/dist/robots.txt b/dist/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/dist/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/public/images/apple.png b/public/images/apple.png new file mode 100644 index 0000000..1bbfea1 Binary files /dev/null and b/public/images/apple.png differ diff --git a/public/images/towel.jpeg b/public/images/towel.jpeg new file mode 100644 index 0000000..ea7acc9 Binary files /dev/null and b/public/images/towel.jpeg differ diff --git a/public/images/trenchcoat.jpeg b/public/images/trenchcoat.jpeg new file mode 100644 index 0000000..090b1b7 Binary files /dev/null and b/public/images/trenchcoat.jpeg differ diff --git a/public/images/vacuum.png b/public/images/vacuum.png new file mode 100644 index 0000000..2a20f41 Binary files /dev/null and b/public/images/vacuum.png differ diff --git a/src/api/mypageApi.ts b/src/api/mypageApi.ts index 9f0f803..745a51c 100644 --- a/src/api/mypageApi.ts +++ b/src/api/mypageApi.ts @@ -1,35 +1,138 @@ import axiosInstance from './axiosInstance'; +export type MyPostType = { + availableNumber: number; + category: string; + closeAt: null; + communityPostId: number; + createdAt: string; + description: string; + imageUrls: string[]; + nickname: string; + paymentDeadline: null; + period: number; + productUrl: string; + status: string; + title: string; + totalAmount: number; + unitAmount: number; + userId: number; +}; + +export type GroupPurchaseType = { + communityPostId: number; + title: string; + totalAmount: number; + description: string; + productUrl: string; + category: string; + availableNumber: number; + createdAt: string; + period: number; + closeAt: null; + unitAmount: number; + imageUrls: string[]; + status: string; + userId: number; + nickname: string; + paymentDeadline: null; +}; + export type OrderType = { - delivery: null | string; + productName: string; + price: number; orderDate: string; paymentStatus: string; payment_key: null | string; - price: number; - productName: string; quantity: number; + delivery: null | string; + postId: number; + url: string; }; export const postPasswordVerify = async (body: { currentPassword: string }) => { - const response = await axiosInstance.post(`/mypage/verfiy`, body); + const response = await axiosInstance.post(`/api/mypage/verify`, body); return response.data; }; export const postPasswordChange = async (body: { newPassword: string }) => { - const response = await axiosInstance.post(`/mypage/change`, body); + const response = await axiosInstance.post(`/api/mypage/change`, body); return response.data; }; -export const postLocationChange = async (body: { newAddress: string }) => { - const response = await axiosInstance.post(`/mypage/changeneighbor`, body); +export const putLocationChange = async (body: { newAddress: string }) => { + const response = await axiosInstance.put(`/api/mypage/changeneighbor`, body); return response.data; }; export const getOrderList = async () => { - const response = await axiosInstance.get(`/mypage/orders`); + const response = await axiosInstance.get(`/api/mypage/orders`); + + if (response.status !== 204) { + return response.data; + } else { + return []; + } +}; + +export const getRefundList = async () => { + const response = await axiosInstance.get(`/api/mypage/refund_orders`); + + return response.data; +}; + +export const getUser = async () => { + const response = await axiosInstance.get(`/api/mypage`); + + return response.data; +}; + +export const getCommunity = async () => { + const response = await axiosInstance.get(`/api/mypage/community`); + + return response.data; +}; + +export const getMyPostList = async () => { + const response = await axiosInstance.get(`/api/mypage/post`); + + return response.data; +}; + +export const deleteMyPost = async (id: string) => { + const response = await axiosInstance.delete(`/api/mypage/post/${id}`); + + return response.data; +}; + +export const postProductCancel = async (body: { + paymentKey: string; + cancelReason: string; +}) => { + const response = await axiosInstance.post( + `/api/v1/main-payments/cancel`, + body + ); + + return response.data; +}; + +export const putEditProfile = async (file: File) => { + const formData = new FormData(); + + formData.append('profile', file); + const response = await axiosInstance.put( + `/api/mypage/editprofile`, + formData, + { + headers: { + 'Content-Type': 'multipart/form-data', + }, + } + ); return response.data; }; diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx index 24dd802..65bad33 100644 --- a/src/components/common/Header.tsx +++ b/src/components/common/Header.tsx @@ -1,24 +1,15 @@ -import React, { useEffect, useState } from 'react'; +import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; -// import cart from '../../assets/icons/icon.png'; +import cart from '../../assets/icons/icon.png'; import logo from '../../assets/icons/goodbuyus-logo.svg'; import menu from '../../assets/icons/menu.svg'; +import { useAuth } from '../../context/AuthContext'; + const Header = () => { - const [isLoggedIn, setIsLoggedIn] = useState(false); - const [isAdmin, setIsAdmin] = useState(false); - const [isUser, setIsUser] = useState(false); + const { isLoggedIn, isAdmin, logout } = useAuth(); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); - useEffect(() => { - const token = localStorage.getItem('token'); - const userRole = localStorage.getItem('role'); - - setIsLoggedIn(!!token); - setIsAdmin(userRole === 'ROLE_ADMIN'); - setIsUser(userRole === 'ROLE_USER'); - }, []); - const toggleMobileMenu = () => { setIsMobileMenuOpen(!isMobileMenuOpen); }; @@ -26,7 +17,7 @@ const Header = () => { const handleCommunityClick = ( e: React.MouseEvent ) => { - if (!isUser && !isAdmin) { + if (!isLoggedIn || !isAdmin) { e.preventDefault(); alert('로그인 후 이용할 수 있는 페이지입니다.'); setIsMobileMenuOpen(!isMobileMenuOpen); @@ -71,12 +62,14 @@ const Header = () => { - - {isAdmin ? 'Admin Page' : 'My Page'} - + {isLoggedIn && ( + + {isAdmin ? 'Admin Page' : 'My Page'} + + )} {isAdmin && ( @@ -98,22 +91,16 @@ const Header = () => { ) : ( <> - { - localStorage.removeItem('role'); - localStorage.removeItem('token'); - setIsLoggedIn(false); - }} - > + LogOut - {/* + 장바구니 아이콘 - */} + )}{' '} @@ -300,7 +287,7 @@ const Login = styled.li` text-decoration: none; display: block; text-align: center; - margin-top: 4px; + margin-top: 5px; font-weight: bold; } @@ -329,11 +316,11 @@ const LogOut = styled.li` padding: 0px 10px; a { + font-size: 15px; color: white; text-decoration: none; display: block; text-align: center; - margin-top: 1px; font-weight: bold; } @@ -370,16 +357,17 @@ const StyledLink = styled(Link)` } `; -// const CartIcon = styled.div` -// img { -// width: 20px; -// height: 20px; -// } - -// @media (min-width: 576px) and (max-width: 767px) { -// img { -// width: 25px; -// height: 25px; -// } -// } -// `; +const CartIcon = styled.div` + img { + margin-top: -4px; + width: 22px; + height: 22px; + } + + @media (min-width: 576px) and (max-width: 767px) { + img { + width: 25px; + height: 25px; + } + } +`; diff --git a/src/components/pages/HomePage/CategoryProduct.tsx b/src/components/pages/HomePage/CategoryProduct.tsx index b799e03..4eeebe6 100644 --- a/src/components/pages/HomePage/CategoryProduct.tsx +++ b/src/components/pages/HomePage/CategoryProduct.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useMemo, useState } from 'react'; import styled from 'styled-components'; import StarRating from '../../common/StarRating'; import DEFAULT_IMG from '../../../assets/icons/default-featured-image.png.jpg'; @@ -42,24 +42,19 @@ const CategoryProduct: React.FC = ({ setSelectedCategory(category); setIsExpanded(false); }; - - const filtered = products.filter((product: Product) => - product.category.toLowerCase().includes(selectedCategory.toLowerCase()) + const filtered = useMemo( + () => + products?.filter((product) => + product.category.toLowerCase().includes(selectedCategory.toLowerCase()) + ) || [], + [selectedCategory, products] ); - const getRandomProducts = (products: Product[]): Product[] => { - const shuffled = [...products].sort(() => 0.5 - Math.random()); // Shuffle the array + const displayedProducts = useMemo(() => { + const shuffled = [...filtered].sort(() => 0.5 - Math.random()); return shuffled.slice(0, 8); - }; - - const displayedProducts = useMemo( - () => getRandomProducts(filtered), - [filtered] - ); + }, [filtered]); - useEffect(() => { - //fetch상품 - }, [selectedCategory]); return ( diff --git a/src/components/pages/HomePage/HomePage.tsx b/src/components/pages/HomePage/HomePage.tsx index 418adef..b75a667 100644 --- a/src/components/pages/HomePage/HomePage.tsx +++ b/src/components/pages/HomePage/HomePage.tsx @@ -4,13 +4,17 @@ import RecommendProduct from './RecommendProduct'; import PopularProduct from './PopularProduct'; import CategoryProduct from './CategoryProduct'; import ScrollToTopButton from '../../common/ScrollToTopButton'; -import { categories } from '../../../mocks/products'; + import { QueryHandler, useProductsQuery } from '../../../hooks/useGetProduct'; import { Link } from 'react-router-dom'; +import { categories } from './model/categories'; const HomePage: React.FC = () => { const { data: products, isLoading, isError } = useProductsQuery(); - const popularProduct = products?.sort( + const availableProduct = products?.filter( + (p) => p.available === true && new Date(p.deadline) > new Date() + ); + const popularProduct = availableProduct?.sort( (a, b) => b.currentStock - a.currentStock )[0]; @@ -30,12 +34,15 @@ const HomePage: React.FC = () => { - + - + diff --git a/src/components/pages/HomePage/model/categories.ts b/src/components/pages/HomePage/model/categories.ts new file mode 100644 index 0000000..90ccd8e --- /dev/null +++ b/src/components/pages/HomePage/model/categories.ts @@ -0,0 +1 @@ +export const categories = ['FOOD', 'LIFESTYLE', 'FASHION']; diff --git a/src/components/pages/HomePage/model/productSchema.ts b/src/components/pages/HomePage/model/productSchema.ts index 35376d1..565c43a 100644 --- a/src/components/pages/HomePage/model/productSchema.ts +++ b/src/components/pages/HomePage/model/productSchema.ts @@ -1,6 +1,7 @@ interface Review { - review: string; + content: string; rating: number; + using: boolean; } export interface Product { diff --git a/src/components/pages/Payment/PaymentFailPage.tsx b/src/components/pages/Payment/PaymentFailPage.tsx index cb0f8fb..3ec5481 100644 --- a/src/components/pages/Payment/PaymentFailPage.tsx +++ b/src/components/pages/Payment/PaymentFailPage.tsx @@ -1,8 +1,7 @@ import React from 'react'; import { Link, useParams } from 'react-router-dom'; import styled from 'styled-components'; -// import { QueryHandler, useProductQuery } from '../../../hooks/useGetProduct'; -import { products } from '../../../mocks/products'; +import { QueryHandler, useProductQuery } from '../../../hooks/useGetProduct'; const PaymentFailPage = () => { const { id } = useParams(); @@ -10,39 +9,43 @@ const PaymentFailPage = () => { return

상품 번호가 유실되었습니다.

; } const productId = Number(id); - // const { data: product, isLoading, isError } = useProductQuery(productId); - const product = products.filter((p) => p.id === productId)[0]; - console.log(product); + const queryString = window.location.search; + const urlParams = new URLSearchParams(queryString); + const amount = urlParams.get('amount'); + const { data: product, isLoading, isError } = useProductQuery(productId); + if (!product) { return

해당 상품을 찾을 수 없습니다.

; } return ( <> - {/* */} - - - 결제 실패 - 죄송합니다. 결제에 실패하였습니다. - - - - - {product?.name} - - - - {product?.discountprice} 원 - - - - - - 다시 시도하기 - 메인으로 돌아가기 - - - {/* */} + + + + 결제 실패 + 죄송합니다. 결제에 실패하였습니다. + + + + + {product?.name} + + + + {amount} 원 + + + + + + + 다시 시도하기 + + 메인으로 돌아가기 + + + ); }; diff --git a/src/components/pages/Payment/PaymentForm.tsx b/src/components/pages/Payment/PaymentForm.tsx index cf52959..9b85f73 100644 --- a/src/components/pages/Payment/PaymentForm.tsx +++ b/src/components/pages/Payment/PaymentForm.tsx @@ -1,14 +1,12 @@ import React, { useMemo, useState } from 'react'; -import { Link, useLocation, useParams } from 'react-router-dom'; +import { Link, useParams } from 'react-router-dom'; import styled from 'styled-components'; import { handlePayment } from './api/paymentApi'; import { QueryHandler, useProductQuery } from '../../../hooks/useGetProduct'; +import { useQuantity } from '../../../context/QuantityContext'; const PaymentForm = () => { - // URL 쿼리 스트링을 통한 데이터 수신 - const location = useLocation(); - const productData = location.state; - + const { quantity } = useQuantity(); const { id } = useParams(); const productId = useMemo(() => { if (!id || isNaN(Number(id))) { @@ -58,8 +56,8 @@ const PaymentForm = () => { const payload = { productName: product.name, url: product.url, - price: product.discountprice * productData.amount, - quantity: productData.amount, + price: product.discountprice * quantity, + quantity: quantity, payMethod: payment, deliveryRequestDTO: { name: userName, @@ -79,12 +77,12 @@ const PaymentForm = () => { } try { const paymentResult = await handlePayment(productId, payload); - window.location.href = paymentResult; } catch (e) { alert(`결제에 실패하였습니다 ${e}`); } }; + return ( <> @@ -97,13 +95,11 @@ const PaymentForm = () => { {product.discountprice}원 - {productData.amount} + 수량 : {quantity} 합계: - - {product.discountprice * productData.amount}원 - + {product.discountprice * quantity}원 diff --git a/src/components/pages/Payment/PaymentSuccessPage.tsx b/src/components/pages/Payment/PaymentSuccessPage.tsx index d940e14..37b438c 100644 --- a/src/components/pages/Payment/PaymentSuccessPage.tsx +++ b/src/components/pages/Payment/PaymentSuccessPage.tsx @@ -9,6 +9,11 @@ const PaymentSuccessPage = () => { return

상품 번호가 유실되었습니다.

; } const productId = Number(id); + const queryString = window.location.search; + const urlParams = new URLSearchParams(queryString); + const orderId = urlParams.get('orderId'); + const amount = urlParams.get('amount'); + const { data: product, isLoading, isError } = useProductQuery(productId); if (!product) { @@ -29,7 +34,11 @@ const PaymentSuccessPage = () => { - {product?.discountprice.toLocaleString()} + {amount}원 + + + + {orderId} diff --git a/src/components/pages/Payment/api/paymentApi.ts b/src/components/pages/Payment/api/paymentApi.ts index 78376c8..d8259a8 100644 --- a/src/components/pages/Payment/api/paymentApi.ts +++ b/src/components/pages/Payment/api/paymentApi.ts @@ -25,8 +25,7 @@ export const handlePayment = async ( const URL = `/api/v1/main-payments?postId=${productId}`; const response = await axiosInstance.post(URL, payload); return response.data.checkoutPageUrl; - } catch (error) { - console.error(error); + } catch { throw new Error('결제에 실패하였습니다.'); } }; diff --git a/src/components/pages/ProductDetailPage/CommentComponent.tsx b/src/components/pages/ProductDetailPage/CommentComponent.tsx index 5b6813c..118f4f3 100644 --- a/src/components/pages/ProductDetailPage/CommentComponent.tsx +++ b/src/components/pages/ProductDetailPage/CommentComponent.tsx @@ -3,26 +3,50 @@ import styled from 'styled-components'; import { addComment, deleteComment, editComment } from './api/commentApi'; interface CommentProps { - reviews: Array<{ review: string; rating: number }>; + initReviews: Array<{ content: string; rating: number; using: boolean }>; productId: number; } -const CommentComponent: React.FC = ({ reviews, productId }) => { +const CommentComponent: React.FC = ({ + initReviews, + productId, +}) => { + const [reviews, setReviews] = useState(initReviews); const [newComment, setNewComment] = useState(''); const [newCommentStar, setNewCommentStar] = useState(5); const [visibleCount, setVisibleCount] = useState(10); const [editingId, setEditingId] = useState(null); const [editingText, setEditingText] = useState(''); const [editingRating, setEditingRating] = useState(5); + const activeReviewsWithIndex = reviews + .map((review, index) => ({ ...review, originalIndex: index })) + .filter((review) => review.using === true); const handleShowMore = () => { setVisibleCount((prevCount) => prevCount + 10); }; - const handleCommentSubmit = (e: React.FormEvent) => { + const handleCommentSubmit = async (e: React.FormEvent) => { e.preventDefault(); - addComment(productId, { review: newComment, rating: newCommentStar }); - setNewComment(''); + try { + await addComment(productId, { + content: newComment, + rate: newCommentStar, + }); + + setReviews((prevReviews) => [ + ...prevReviews, + { + content: newComment, + rating: newCommentStar, + using: true, + }, + ]); + setNewComment(''); + setNewCommentStar(5); + } catch { + alert('현재 댓글을 작성할 수 없는 상태입니다.'); + } }; const handleEditComment = ( @@ -35,14 +59,30 @@ const CommentComponent: React.FC = ({ reviews, productId }) => { setEditingRating(rating); }; - const handleUpdateComment = async (commentId: number) => { - await editComment(commentId, { - review: editingText, - rating: editingRating, - }); - setEditingId(null); - setEditingText(''); - setEditingRating(5); + const handleUpdateComment = async (activeIndex: number) => { + try { + const originalIndex = activeReviewsWithIndex[activeIndex].originalIndex; + const reviewId = originalIndex + 1; + + await editComment(reviewId, { + content: editingText, + rate: editingRating, + }); + + setReviews((prevReviews) => + prevReviews.map((review, index) => + index === originalIndex + ? { ...review, content: editingText, rating: editingRating } + : review + ) + ); + + setEditingId(null); + setEditingText(''); + setEditingRating(5); + } catch { + alert('현재 댓글을 수정할 수 없는 상태입니다.'); + } }; const handleCancelEdit = () => { @@ -51,8 +91,21 @@ const CommentComponent: React.FC = ({ reviews, productId }) => { setEditingRating(5); }; - const handleDeleteComment = (commentId: number) => { - deleteComment(commentId); + const handleDeleteComment = async (activeIndex: number) => { + try { + const originalIndex = activeReviewsWithIndex[activeIndex].originalIndex; + const reviewId = originalIndex + 1; + + await deleteComment(reviewId); + + setReviews((prevReviews) => + prevReviews.map((review, index) => + index === originalIndex ? { ...review, using: false } : review + ) + ); + } catch { + alert('현재 댓글을 삭제할 수 없는 상태입니다.'); + } }; return ( @@ -78,61 +131,69 @@ const CommentComponent: React.FC = ({ reviews, productId }) => {
- {reviews.slice(0, visibleCount).map((review, index) => ( - - {editingId === index ? ( - - setEditingText(e.target.value)} - /> - setEditingRating(Number(e.target.value))} - > - {[1, 2, 3, 4, 5].map((num) => ( - - ))} - - - handleUpdateComment(index)} - color="primary" - > - 저장 - - - 취소 - - - - ) : ( - <> - - {review.review} - {'⭐'.repeat(review.rating)} - - - - handleEditComment(index, review.review, review.rating) - } + {activeReviewsWithIndex + .slice(0, visibleCount) + .map((review, activeIndex) => ( + + {editingId === activeIndex ? ( + + setEditingText(e.target.value)} + /> + setEditingRating(Number(e.target.value))} > - 수정 - - handleDeleteComment(index)}> - 삭제 - - - - )} - - ))} + {[1, 2, 3, 4, 5].map((num) => ( + + ))} + + + handleUpdateComment(activeIndex)} + color="primary" + > + 저장 + + + 취소 + + + + ) : ( + <> + + {review.content} + {'⭐'.repeat(review.rating)} + + + + handleEditComment( + activeIndex, + review.content, + review.rating + ) + } + > + 수정 + + handleDeleteComment(activeIndex)} + > + 삭제 + + + + )} + + ))} - {visibleCount < reviews.length && ( + {visibleCount < activeReviewsWithIndex.length && ( 더보기 )} diff --git a/src/components/pages/ProductDetailPage/ProductDetail.tsx b/src/components/pages/ProductDetailPage/ProductDetail.tsx index bb61823..16dad50 100644 --- a/src/components/pages/ProductDetailPage/ProductDetail.tsx +++ b/src/components/pages/ProductDetailPage/ProductDetail.tsx @@ -7,6 +7,7 @@ import { addWishList } from './api/wishApi'; import { QueryHandler, useProductQuery } from '../../../hooks/useGetProduct'; import DEFAULT_IMG from '../../../assets/icons/default-featured-image.png.jpg'; import CommentComponent from './CommentComponent'; +import { useQuantity } from '../../../context/QuantityContext'; const ProductDetail: React.FC = () => { const { id } = useParams(); @@ -20,13 +21,12 @@ const ProductDetail: React.FC = () => { } const { data: product, isLoading, isError } = useProductQuery(productId || 0); - const [quantity, setQuantity] = useState(1); + const { quantity, setQuantity } = useQuantity(); const [remainingTime, setRemainingTime] = useState(''); const navigate = useNavigate(); const isOutOfStock = product ? product.now >= product.currentStock : false; const isDeadlinePassed = remainingTime === '마감되었습니다.'; const isButtonDisabled = isOutOfStock || isDeadlinePassed; - useEffect(() => { if (!product) return; @@ -61,8 +61,8 @@ const ProductDetail: React.FC = () => { }; const handleSubmit = async () => { - const res = await submitOrder(productId, quantity); - navigate(`/products/payment/${productId}`, { state: res }); + await submitOrder(productId, quantity); + navigate(`/products/payment/${productId}`); }; if (!product) { @@ -152,7 +152,10 @@ const ProductDetail: React.FC = () => { - + diff --git a/src/components/pages/ProductDetailPage/api/CommentApi.ts b/src/components/pages/ProductDetailPage/api/CommentApi.ts index afe1728..4b1eebe 100644 --- a/src/components/pages/ProductDetailPage/api/CommentApi.ts +++ b/src/components/pages/ProductDetailPage/api/CommentApi.ts @@ -1,38 +1,23 @@ import axiosInstance from '../../../../api/axiosInstance'; export interface Review { - review: string; - rating: number; + content: string; + rate: number; } export const addComment = async (productId: number, payload: Review) => { - try { - const URL = `goodbuyUs/product/${productId}`; - const response = await axiosInstance.post(URL, payload); - console.log(response); - return response.data; - } catch { - throw new Error('댓글 작성에 실패하였습니다.'); - } + const URL = `/api/review/${productId}`; + const response = await axiosInstance.post(URL, payload); + return response; }; export const editComment = async (reviewId: number, payload: Review) => { - try { - const URL = `goodbuyUs/product/${reviewId}`; - const response = await axiosInstance.put(URL, payload); - console.log(response); - return response.data; - } catch { - throw new Error('댓글 수정에 실패하였습니다.'); - } + const URL = `/api/review/update/${reviewId}`; + const response = await axiosInstance.put(URL, payload); + return response; }; export const deleteComment = async (reviewId: number) => { - try { - const URL = `goodbuyUs/remove/${reviewId}`; - const response = await axiosInstance.put(URL); - console.log(response); - return response.data; - } catch { - throw new Error('댓글 삭제에 실패하였습니다.'); - } + const URL = `/api/review/remove/${reviewId}`; + const response = await axiosInstance.put(URL); + return response; }; diff --git a/src/components/pages/ProductDetailPage/api/productDetailApi.ts b/src/components/pages/ProductDetailPage/api/productDetailApi.ts index 6887063..513432c 100644 --- a/src/components/pages/ProductDetailPage/api/productDetailApi.ts +++ b/src/components/pages/ProductDetailPage/api/productDetailApi.ts @@ -4,7 +4,7 @@ import { Product } from '../../HomePage/model/productSchema'; export const getProductbyId = async (productId: number): Promise => { try { const URL = `/goodbuyUs/product?postid=${productId}`; - const response = await axiosInstance.post(URL); + const response = await axiosInstance.get(URL); return response.data; } catch { throw new Error('상품 정보를 가져오는 데 실패했습니다.'); diff --git a/src/components/pages/ProductDetailPage/api/submitApi.ts b/src/components/pages/ProductDetailPage/api/submitApi.ts index 67f35db..688b0be 100644 --- a/src/components/pages/ProductDetailPage/api/submitApi.ts +++ b/src/components/pages/ProductDetailPage/api/submitApi.ts @@ -14,7 +14,7 @@ export const submitOrder = async ( amount: number ): Promise => { try { - const URL = `/goodbuyUs/orders?postId=${productId}`; + const URL = `/api/v1/orders?postId=${productId}`; const response = await axiosInstance.post(URL, { amount }); return response.data; } catch { diff --git a/src/components/pages/ProductPage/ProductComponent.tsx b/src/components/pages/ProductPage/ProductComponent.tsx index e6f4028..956292a 100644 --- a/src/components/pages/ProductPage/ProductComponent.tsx +++ b/src/components/pages/ProductPage/ProductComponent.tsx @@ -26,8 +26,12 @@ const ProductComponent: React.FC = ({ const startIndex = (currentPage - 1) * PRODUCT_PER_PAGE; const filteredProducts = selectedText === '마감 상품' - ? products.filter((p) => p.available === false) - : products.filter((p) => p.available === true); + ? products.filter( + (p) => p.available === false && new Date(p.deadline) < new Date() + ) + : products.filter( + (p) => p.available === true && new Date(p.deadline) > new Date() + ); const totalPages = Math.ceil(filteredProducts.length / PRODUCT_PER_PAGE); diff --git a/src/components/pages/ProductPage/ProductPage.tsx b/src/components/pages/ProductPage/ProductPage.tsx index ae5aa13..7203bdb 100644 --- a/src/components/pages/ProductPage/ProductPage.tsx +++ b/src/components/pages/ProductPage/ProductPage.tsx @@ -5,6 +5,7 @@ import styled from 'styled-components'; import { useLocation } from 'react-router-dom'; import { Product } from '../HomePage/model/productSchema'; import { QueryHandler, useProductsQuery } from '../../../hooks/useGetProduct'; +import ScrollToTopButton from '../../common/ScrollToTopButton'; const ProductPage = () => { const { data: products, isLoading, isError } = useProductsQuery(); diff --git a/src/components/pages/login/FindPasswordPage.tsx b/src/components/pages/login/FindPasswordPage.tsx index b772097..db21f40 100644 --- a/src/components/pages/login/FindPasswordPage.tsx +++ b/src/components/pages/login/FindPasswordPage.tsx @@ -50,7 +50,13 @@ const FindPasswordPage = () => { { setShowModal(true); - await postFindPassword({ email: email }); + const response = await postFindPassword({ email: email }); + if ( + response.message === + '비밀번호 재설정 링크가 이메일로 전송되었습니다.' + ) { + navigate('/resetpassword'); + } }} > 확인 diff --git a/src/components/pages/login/ResetPasswordPage.tsx b/src/components/pages/login/ResetPasswordPage.tsx index bb256ea..b6b9ec5 100644 --- a/src/components/pages/login/ResetPasswordPage.tsx +++ b/src/components/pages/login/ResetPasswordPage.tsx @@ -2,16 +2,20 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { styled } from 'styled-components'; import { postResetPassword } from '../../../api/loginApi'; +import { useLocation } from 'react-router-dom'; const ResetPasswordPage = () => { const navigate = useNavigate(); + const location = useLocation(); const [password, setPassword] = useState(''); const [confirmPassword, setConfirmPassword] = useState(''); const [showModal, setShowModal] = useState(false); + const queryParams = new URLSearchParams(location.search); + const token = queryParams.get('token'); const handleConfirm = async () => { - if (password === confirmPassword && password.length >= 8) { - await postResetPassword({ newPassword: password }, '1'); + if (password === confirmPassword && password.length >= 8 && token) { + await postResetPassword({ newPassword: password }, token); setShowModal(true); } else { alert('비밀번호가 일치하지 않거나 유효하지 않습니다.'); diff --git a/src/components/pages/login/SignInPage.tsx b/src/components/pages/login/SignInPage.tsx index 0428f2f..92c8426 100644 --- a/src/components/pages/login/SignInPage.tsx +++ b/src/components/pages/login/SignInPage.tsx @@ -2,12 +2,13 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { styled } from 'styled-components'; import { postSignIn } from '../../../api/loginApi'; +import { useAuth } from '../../../context/AuthContext'; const SignInPage = () => { const navigate = useNavigate(); const [email, setEmail] = useState(''); const [pw, setPw] = useState(''); - + const { login } = useAuth(); return ( @@ -47,7 +48,7 @@ const SignInPage = () => { password: pw, }); if (response.status === 200) { - localStorage.setItem('role', response.data.roles); + login(); navigate('/'); } else { alert('틀렸습니다.'); diff --git a/src/components/pages/login/SignUpPage.tsx b/src/components/pages/login/SignUpPage.tsx index 89c73d0..001b500 100644 --- a/src/components/pages/login/SignUpPage.tsx +++ b/src/components/pages/login/SignUpPage.tsx @@ -95,11 +95,33 @@ function SignUpPage() { > Signup + + { + navigate('/signin'); + }} + > + 로그인하기 + + ); } +const AuthButton = styled.div` + font-size: 13px; + font-weight: 400; + cursor: pointer; +`; + +const AuthButtonWrapper = styled.div` + margin-top: 35px; + width: calc(100% - 20px); + display: inline-flex; + justify-content: center; +`; + const LoginButton = styled.div` background-color: #000; color: #fff; diff --git a/src/components/pages/myPage/LocationPage.tsx b/src/components/pages/myPage/LocationPage.tsx index 7863b53..822ad11 100644 --- a/src/components/pages/myPage/LocationPage.tsx +++ b/src/components/pages/myPage/LocationPage.tsx @@ -3,7 +3,7 @@ import Sidemenu from './SideMenu'; import GS from './GS'; import KakaoMap from '../../common/KakaoMap'; import styled from 'styled-components'; -import { postLocationChange } from '../../../api/mypageApi'; +import { putLocationChange } from '../../../api/mypageApi'; function LocationPage() { const [location, setLocation] = useState<{ @@ -68,7 +68,7 @@ function LocationPage() { { if (region) { - await postLocationChange({ newAddress: region }); + await putLocationChange({ newAddress: region }); } }} > diff --git a/src/components/pages/myPage/Modal/LogoutModal.tsx b/src/components/pages/myPage/Modal/LogoutModal.tsx index 4ab8b62..34fb4d9 100644 --- a/src/components/pages/myPage/Modal/LogoutModal.tsx +++ b/src/components/pages/myPage/Modal/LogoutModal.tsx @@ -1,9 +1,11 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; import { styled } from 'styled-components'; +import { useAuth } from '../../../../context/AuthContext'; const LogoutModal = ({ onClose }: { onClose: () => void }) => { const navigate = useNavigate(); + const { logout } = useAuth(); return ( void }) => { 로그아웃 하시겠습니까?