"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6842],{59672:function(e,t,n){n.d(t,{Z:function(){return h}});var i=n(57437),o=n(2265),r=n(33145),a=n(88862),d=n(99376),c=n(29918),s=()=>{let[e,t]=(0,o.useState)(null),[n,i]=(0,o.useState)(null),[r,a]=(0,o.useState)(!1),[d,s]=(0,o.useState)(null);return{logoImg:e,mLogoImg:n,loading:r,error:d,fetchLogoImg:(0,o.useCallback)(async e=>{a(!0),s(null);try{let{data:n}=await c.Wg.post("/logoImg",{companyName:e});t(n.logoImg),i(n.mLogoImg)}catch(e){var n,o;s((null===(o=e.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.message)||"Error fetching logo image")}finally{a(!1)}},[])}},l=n(32905),p=n(89723),u=n(43618),f=n(35775);function h(e){var t,n,r,a,c;let{isBoard:h=!1,companyProfilePhoto:y}=e,j=(0,d.useRouter)(),I=(0,d.usePathname)(),C=(0,d.useSearchParams)(),k=null!==(t=null==C?void 0:C.get("store"))&&void 0!==t?t:null,P=null!==(n=null==C?void 0:C.get("storeId"))&&void 0!==n?n:null,Z=null!==(r=null==C?void 0:C.get("id"))&&void 0!==r?r:null,S=null!==(a=null==I?void 0:I.startsWith("/board"))&&void 0!==a&&a;null==I||I.startsWith("/brand");let z=null!==(c=null!=P?P:k)&&void 0!==c?c:null,{logoImg:A,mLogoImg:M,fetchLogoImg:D}=s();(0,u.sJ)(p.Z);let E=(0,f.Z)();(0,o.useEffect)(()=>{k&&D(k)},[D,k]);let L=()=>{window.location.href="/home"};return(0,o.useCallback)(()=>{if(S&&Z){window.location.href="".concat(window.location.origin,"/board/?id=").concat(Z);return}z?j.push("/brand/?storeId=".concat(z),{scroll:!1}):j.push("/brand",{scroll:!1})},[S,Z,z,j]),y||null==E||E.profilePhoto,(0,i.jsxs)(x,{children:[(0,i.jsx)(g,{onClick:L,children:(0,i.jsx)(m,{src:l.Z,alt:"logo",width:40,height:40})}),"/home"!==I&&!(null==I?void 0:I.startsWith("/home/"))&&(0,i.jsx)(b,{children:(0,i.jsx)(v,{onClick:L,children:(0,i.jsx)(w,{storeParam:k,src:l.Z,alt:"mobile logo",width:70,height:40})})})]})}a.zo.div.withConfig({componentId:"sc-a1cd9fb-0"})(["position:relative;width:","px;height:","px;margin-left:18px;opacity:",";transition:opacity 0.3s ease;"],e=>e.width,e=>e.height,e=>e.isLoaded?1:0),a.zo.div.withConfig({componentId:"sc-a1cd9fb-1"})(["position:relative;width:200px;height:40px;overflow:hidden;cursor:pointer;"]);let x=a.zo.div.withConfig({componentId:"sc-a1cd9fb-2"})(["display:flex;align-items:center;gap:0;width:64px;@media (max-width:768px){width:auto;}"]);a.zo.div.withConfig({componentId:"sc-a1cd9fb-3"})(["margin-left:4px;cursor:pointer;display:flex;align-items:center;gap:35px;@media (max-width:768px){gap:7px;}"]);let g=a.zo.div.withConfig({componentId:"sc-a1cd9fb-4"})(["cursor:pointer;"]),m=(0,a.zo)(r.default).withConfig({componentId:"sc-a1cd9fb-5"})(["margin:20px 0 20px 4px;@media (max-width:768px){display:none;}"]);a.zo.div.withConfig({componentId:"sc-a1cd9fb-6"})(["display:flex;align-items:center;cursor:pointer;@media (max-width:768px){display:none;}"]);let b=a.zo.div.withConfig({componentId:"sc-a1cd9fb-7"})(["display:flex;align-items:center;margin:0;gap:0;@media (min-width:768px){display:none;}"]),v=a.zo.div.withConfig({componentId:"sc-a1cd9fb-8"})(["cursor:pointer;"]),w=(0,a.zo)(r.default).withConfig({componentId:"sc-a1cd9fb-9"})(["width:",";height:30px;"],e=>(e.storeParam,"30px"));a.zo.div.withConfig({componentId:"sc-a1cd9fb-10"})(["width:",";display:flex;align-items:center;cursor:pointer;"],e=>e.storeParam?"48px":"0px"),(0,a.zo)(r.default).withConfig({componentId:"sc-a1cd9fb-11"})(["width:35px;height:20px;"]);let y=a.zo.div.withConfig({componentId:"sc-a1cd9fb-12"})(["height:30px;border-left:1px solid black;"]);(0,a.zo)(y).withConfig({componentId:"sc-a1cd9fb-13"})(["height:24px;"])},88454:function(e,t,n){n.d(t,{ZP:function(){return d}});var i=n(57437);n(2265);var o=n(88862);let r=["#4C63D6","#2F9E6E","#C2703D","#B0842A","#3F7FB8","#A34E6C","#5B6B8C","#7A4FBF","#CC4B4B","#2C8E8E","#9B59B6","#C0568C","#4F8A45","#D07C1A","#5D7080","#B0585A"],a=o.ZP.span.withConfig({componentId:"sc-c651c697-0"})(["flex:0 0 auto;box-sizing:border-box;border-radius:50%;background:",";color:#ffffff;display:grid;place-items:center;font-weight:400;letter-spacing:-0.5px;line-height:1;white-space:nowrap;"," "," "," ",""],e=>{let{$bg:t}=e;return t},e=>{let{onClick:t}=e;return t&&(0,o.iv)(["cursor:pointer;"])},e=>{let{$fill:t,$size:n}=e;return t?(0,o.iv)(["width:100%;height:100%;font-size:9.5px;"]):(0,o.iv)(["width:","px;height:","px;font-size:","px;"],n,n,Math.max(8,Math.round(.42*n)))},e=>{let{$bordered:t}=e;return t&&(0,o.iv)(["border:2px solid #fff;"])},e=>{let{$pending:t}=e;return t&&(0,o.iv)(["opacity:0.55;border:2px dashed #b9bac2;"])});function d(e){var t;let{name:n,seed:o,size:d=32,fill:c,pending:s,bordered:l,className:p,title:u,onClick:f}=e;return(0,i.jsx)(a,{$size:d,$bg:function(e){let t=String(null!=e?e:"").trim()||"?",n=0;for(let e=0;e>>0;return r[n%r.length]}(null!=o?o:n),$fill:c,$pending:s,$bordered:l,className:p,title:null!==(t=null!=u?u:n)&&void 0!==t?t:void 0,onClick:f,children:function(e){let t=(null!=e?e:"").trim();return t?(t.length>1?t.slice(1):t).slice(-2):""}(n)})}},55140:function(e,t,n){n.d(t,{Fq:function(){return d},Jv:function(){return c},M9:function(){return p},W2:function(){return o},YE:function(){return s},fx:function(){return l},im:function(){return r},tz:function(){return a}});var i=n(88862);let o=i.ZP.div.withConfig({componentId:"sc-a6be8fbf-0"})(["display:flex;flex-direction:column;overflow:hidden;"]),r=i.ZP.div.withConfig({componentId:"sc-a6be8fbf-1"})(["display:flex;flex-direction:row;overflow:hidden;height:100%;"]),a=i.ZP.div.withConfig({componentId:"sc-a6be8fbf-2"})(["display:flex;flex-direction:column;width:",";height:100%;flex:1;z-index:2;@media (max-width:768px){padding-bottom:66px;}@media (min-width:769px){width:100% !important;}html.su-plugin &{width:100% !important;}"],e=>e.isPoint?"100%":"90%"),d=i.ZP.div.withConfig({componentId:"sc-a6be8fbf-3"})(["display:flex;align-items:center;justify-content:space-between;padding:0 16px;height:56px;background:#fff;border-bottom:1px solid #f0f0f0;position:sticky;top:0;z-index:1200;overflow:visible;contain:unset;@media (max-width:768px){padding:0 12px;display:",";}@media (max-width:360px){padding:0 8px;}"],e=>e.isModal?"none":"flex"),c=i.ZP.div.withConfig({componentId:"sc-a6be8fbf-4"})(["display:flex;flex:1;overflow:hidden;@media (min-width:1025px){overflow:visible;}@media (max-width:768px){flex-direction:column;}"]),s=i.ZP.div.withConfig({componentId:"sc-a6be8fbf-5"})(["flex:0 0 365px;overflow-y:auto;background:#fff;border-right:1px solid #f0f0f0;html.su-plugin &{flex:0 0 243px;}@media (min-width:1025px){position:relative;z-index:100;}&:empty{border-right:none;}@media (max-width:768px){flex:none;width:100%;border-right:none;border-bottom:1px solid #f0f0f0;}"]),l=i.ZP.div.withConfig({componentId:"sc-a6be8fbf-6"})(["flex:1;overflow-y:auto;background-color:white;height:100%;@media (min-width:1025px){position:relative;z-index:0;isolation:isolate;}@media (max-width:768px){height:",";}"],e=>e.isModal?"40%":"100%"),p=i.ZP.div.withConfig({componentId:"sc-a6be8fbf-7"})(["display:flex;flex-direction:column;flex:1;overflow:hidden;@media (min-width:1025px){overflow:visible;> *:first-child{position:relative;z-index:200;}}"]);i.ZP.div.withConfig({componentId:"sc-a6be8fbf-8"})(["position:fixed;left:0;right:0;bottom:0;width:100%;z-index:900;background:#fff;border-top:1px solid #f0f0f0;"])},12474:function(e,t,n){n.d(t,{Z:function(){return eP}});var i=n(57437),o=n(2265),r=n(99376),a=n(82156),d=n(33075),c=n(88862),s=n(39026);function l(e){let{isOpen:t,onClose:n}=e,o=(0,s.eA)(n);return t?(0,i.jsx)(p,{onMouseDown:o.onMouseDown,onClick:o.onClick,children:(0,i.jsxs)(u,{...o.contentProps,onClick:e=>e.stopPropagation(),children:[(0,i.jsx)("h2",{children:"로그인 / 회원가입"}),(0,i.jsx)("button",{onClick:n,children:"닫기"})]})}):null}let p=c.ZP.div.withConfig({componentId:"sc-a4ceb719-0"})(["position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:999;"]),u=c.ZP.div.withConfig({componentId:"sc-a4ceb719-1"})(["background:white;padding:20px;border-radius:10px;min-width:300px;min-height:200px;"]);var f=n(78155),h=n(33145),x=n(43618);let g=e=>{let t=new Date(e),n=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0");return"".concat(n,"-").concat(i,"-").concat(o)};var m=n(86484),b=n(29918);let v=async e=>(await b.et.get("/notification")).data;var w=e=>{let{data:t=[],isLoading:n,isError:i}=(0,m.useQuery)(["notifications",e],()=>v(e),{staleTime:3e4,refetchOnWindowFocus:!0});return{notifications:t,isLoading:n,isError:i}};let y=async e=>(await b.et.post("/notification/".concat(e))).data;var j=()=>{let e=(0,m.useQueryClient)(),{mutate:t,isLoading:n,isError:i}=(0,m.useMutation)(y,{onSuccess:()=>{e.invalidateQueries("notifications")}});return{markAsRead:t,isLoading:n,isError:i}},I=n(7261),C=n(88454),k=n(92385);let P=c.ZP.div.withConfig({componentId:"sc-83bcfe65-0"})(["margin-bottom:14px;"]),Z=c.ZP.div.withConfig({componentId:"sc-83bcfe65-1"})(["display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:800;color:#413d7d;margin-bottom:8px;em{font-style:normal;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#413d7d;color:#fff;font-size:11px;line-height:18px;text-align:center;}"]),S=c.ZP.div.withConfig({componentId:"sc-83bcfe65-2"})(["display:flex;align-items:center;gap:10px;border:1px solid #e2e0f0;border-left:3px solid #413d7d;border-radius:10px;padding:10px 11px;margin-bottom:8px;background:#f6f5fc;"]),z=c.ZP.div.withConfig({componentId:"sc-83bcfe65-3"})(["flex:1;min-width:0;b{display:block;font-size:13px;color:#2f3038;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.st{display:block;font-size:11px;color:#7a7b85;margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"]),A=c.ZP.button.withConfig({componentId:"sc-83bcfe65-4"})(["flex-shrink:0;border:1px solid ",";background:",";color:",";border-radius:7px;padding:6px 10px;font-size:11.5px;font-weight:700;font-family:inherit;cursor:pointer;&:disabled{opacity:0.55;cursor:default;}"],e=>{let{$primary:t}=e;return t?"#413d7d":"#d7d8de"},e=>{let{$primary:t}=e;return t?"#413d7d":"#fff"},e=>{let{$primary:t}=e;return t?"#fff":"#7a7b85"}),M=c.ZP.div.withConfig({componentId:"sc-83bcfe65-5"})(["height:1px;background:#ececf1;margin:12px 0 10px;"]),D=c.ZP.div.withConfig({componentId:"sc-83bcfe65-6"})(["font-size:12.5px;font-weight:800;color:#8a8b94;"]);function E(e){let{onActed:t}=e,n=(0,r.useRouter)(),o=(0,r.useSearchParams)(),{data:a=[]}=(0,k.hj)(),{accept:d,decline:c}=(0,k.PC)();if(0===a.length)return null;let s=e=>{var t;let i=new URLSearchParams(null!==(t=null==o?void 0:o.toString())&&void 0!==t?t:"");e&&(i.set("project",String(e)),i.delete("board"));let r=i.toString();n.push(r?"/board?".concat(r):"/board")};return(0,i.jsxs)(P,{children:[(0,i.jsxs)(Z,{children:["협업 초대 ",(0,i.jsx)("em",{children:a.length})]}),a.map(e=>(0,i.jsxs)(S,{children:[(0,i.jsx)(C.ZP,{name:e.fromName,size:32}),(0,i.jsxs)(z,{children:[(0,i.jsx)("b",{title:e.projectName,children:e.projectName}),(0,i.jsxs)("span",{className:"st",children:[e.fromName,"님이 초대했습니다"]})]}),(0,i.jsx)(A,{type:"button",disabled:c.isLoading,onClick:()=>c.mutate(e.inviteId),children:"거절"}),(0,i.jsx)(A,{type:"button",$primary:!0,disabled:d.isLoading,onClick:()=>d.mutate(e.inviteId,{onSuccess:n=>{s(null==n?void 0:n.projectId),I.Am.success("참여 완료 — ".concat(e.projectName,"\n소유자가 SketchUp에서 저장할 때마다 자동 갱신됩니다.")),null==t||t()}}),children:"승인"})]},e.inviteId)),(0,i.jsx)(M,{}),(0,i.jsx)(D,{children:"제품 소식"})]})}var L=n(89723),Q=n(26163),W=n(73536);let B=e=>(null!=e?e:"").split("**").map((e,t)=>t%2==1?(0,i.jsx)("strong",{children:e},t):(0,i.jsx)(o.Fragment,{children:e},t)),F=(0,o.forwardRef)((e,t)=>{let{isOpen:n,setHasUnreadNotifications:a,onNotificationClick:d,align:c="right"}=e,s=(0,r.useRouter)(),l=(0,x.sJ)(L.Z),{notifications:p,isLoading:u,isError:f}=w(l.isLogin),{markAsRead:h}=j(),m=(0,x.Zl)(Q.Tq),b=(0,x.Zl)(W.Z),[v,y]=(0,o.useState)(new Set);(0,o.useEffect)(()=>{p&&a(p.some(e=>!e.isRead&&!v.has(e.id)))},[p,a,v]);let I=e=>{let t=p[e];l.isLogin?t.isRead||h(t.id):y(e=>new Set(e).add(t.id)),b([]),m(e=>({...e,activeId:{...e.activeId,categories:[],subCategory:""}}));let n=t.redirectUrl;if(n)try{if(/^https?:\/\//i.test(n)){let e=new URL(n);e.origin===window.location.origin||/(^|\.)macodi\.co\.kr$/i.test(e.hostname)?s.push(e.pathname+e.search+e.hash):window.location.href=n}else s.push(n)}catch(e){window.location.href=n}d(e)};return(0,i.jsx)(R,{isOpen:n,$align:c,ref:t,children:(0,i.jsxs)(T,{children:[(0,i.jsx)("h4",{children:"알림"}),l.isLogin&&(0,i.jsx)(E,{onActed:()=>d(-1)}),(0,i.jsxs)("ul",{children:[u&&(0,i.jsx)(Y,{children:"Loading..."}),f&&(0,i.jsx)(K,{children:"알림을 불러오는 중 오류가 발생했습니다."}),!(p.length>0)||u||f?!u&&!f&&(0,i.jsx)(J,{children:"새로운 알림이 없습니다."}):p.map((e,t)=>(0,i.jsxs)(O,{onClick:()=>I(t),children:[!e.isRead&&!v.has(e.id)&&(0,i.jsx)(_,{}),(0,i.jsxs)(U,{children:[!e.img&&(0,i.jsx)($,{children:g(e.createdAt)}),(0,i.jsxs)(N,{children:[e.img&&(0,i.jsx)(H,{src:e.img,alt:"Notification",width:80,height:80}),(0,i.jsx)(q,{children:B(e.content)})]})]})]},e.id))]})]})})});F.displayName="NotificationDropdown";let R=c.ZP.div.withConfig({componentId:"sc-39f4f367-0"})(["position:absolute;top:calc(100% + 6px);"," background-color:white;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,0.1);z-index:999;overflow:hidden;opacity:",";visibility:",";transition:opacity 0.3s ease-in-out,visibility 0.3s ease-in-out;"],e=>{let{$align:t}=e;return"left"===t?"left: 0px;":"right: 0px;"},e=>{let{isOpen:t}=e;return t?1:0},e=>{let{isOpen:t}=e;return t?"visible":"hidden"}),T=c.ZP.div.withConfig({componentId:"sc-39f4f367-1"})(["padding:20px;width:370px;max-height:650px;overflow-y:auto;h4{margin-bottom:15px;font-size:16px;font-weight:bold;color:#333;}ul{list-style-type:none;padding:0;margin:0;}html.su-plugin &{zoom:0.82;}"]),N=c.ZP.div.withConfig({componentId:"sc-39f4f367-2"})(["display:flex;align-items:center;gap:10px;z-index:999;"]),O=c.ZP.li.withConfig({componentId:"sc-39f4f367-3"})(["position:relative;padding:5px;margin-bottom:10px;font-size:14px;color:#333;background-color:#f9f9f9;border-radius:8px;box-shadow:0 2px 5px rgba(0,0,0,0.05);transition:background-color 0.2s ease;cursor:pointer;display:flex;flex-direction:column;align-items:start;&:hover{background-color:#eaeaea;}&:last-child{margin-bottom:0;}"]),_=c.ZP.div.withConfig({componentId:"sc-39f4f367-4"})(["position:absolute;top:8px;right:8px;width:10px;height:10px;background-color:#ff7777;border-radius:50%;"]),U=c.ZP.div.withConfig({componentId:"sc-39f4f367-5"})(["display:flex;flex-direction:column;"]),$=c.ZP.div.withConfig({componentId:"sc-39f4f367-6"})(["font-size:13px;color:#999;margin-bottom:5px;"]),q=c.ZP.div.withConfig({componentId:"sc-39f4f367-7"})(["font-size:15px;color:#333;white-space:pre-line;"]),H=(0,c.ZP)(h.default).withConfig({componentId:"sc-39f4f367-8"})(["border-radius:5px;width:80px;height:80px;object-fit:cover;"]),J=c.ZP.li.withConfig({componentId:"sc-39f4f367-9"})(["padding:12px;font-size:14px;color:#999;text-align:center;"]),Y=c.ZP.li.withConfig({componentId:"sc-39f4f367-10"})(["padding:12px;font-size:14px;color:#999;text-align:center;"]),K=c.ZP.li.withConfig({componentId:"sc-39f4f367-11"})(["padding:12px;font-size:14px;color:#dc3545;text-align:center;"]);var V=n(46076),G={src:"/_next/static/media/bell.4a73301b.svg",height:16,width:16,blurWidth:0,blurHeight:0},X=e=>{let{align:t="right"}=e,[n,r]=(0,x.FV)(V.rl),[a,d]=(0,o.useState)(!1),c=(0,o.useRef)(null),s=(0,o.useRef)(null),l=(0,x.sJ)(L.Z),{data:p=[]}=(0,k.hj)({enabled:l.isLogin}),u=p.length;return(0,o.useEffect)(()=>{if(!n)return;let e=e=>{var t,n;let i=e.target,o=null===(t=s.current)||void 0===t?void 0:t.contains(i),a=null===(n=c.current)||void 0===n?void 0:n.contains(i);o||a||r(!1)};return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[n]),(0,i.jsxs)(ee,{children:[(0,i.jsx)(et,{ref:s,onClick:()=>r(e=>!e),"aria-label":"알림",children:(0,i.jsxs)(en,{children:[(0,i.jsx)(h.default,{src:G,alt:"알림",width:32,height:32}),u>0?(0,i.jsx)(er,{children:u>99?"99+":u}):a&&(0,i.jsx)(eo,{})]})}),(0,i.jsx)(F,{ref:c,isOpen:n,align:t,setHasUnreadNotifications:d,onNotificationClick:()=>r(!1)})]})};let ee=c.ZP.div.withConfig({componentId:"sc-14b20a69-0"})(["position:relative;display:inline-flex;align-items:center;"]),et=c.ZP.div.withConfig({componentId:"sc-14b20a69-1"})(["width:36px;height:36px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:50%;transition:background 0.15s ease;&:hover{background:rgba(65,61,125,0.06);}@media (max-width:768px){width:34px;height:34px;}"]),en=c.ZP.span.withConfig({componentId:"sc-14b20a69-2"})(["position:relative;display:inline-flex;line-height:0;"]),ei=(0,c.F4)(["0%{transform:scale(1);box-shadow:0 0 0 0 rgba(255,77,79,0.5);}70%{transform:scale(1.15);box-shadow:0 0 0 5px rgba(255,77,79,0);}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255,77,79,0);}"]),eo=c.ZP.span.withConfig({componentId:"sc-14b20a69-3"})(["position:absolute;top:-3px;right:-3px;width:8px;height:8px;border-radius:50%;background:#ff4d4f;border:1.5px solid #fff;animation:"," 1.6s ease-in-out infinite;pointer-events:none;"],ei),er=c.ZP.span.withConfig({componentId:"sc-14b20a69-4"})(["position:absolute;top:-7px;right:-8px;min-width:17px;height:17px;padding:0 5px;border-radius:999px;background:#413d7d;color:#fff;border:1.5px solid #fff;font-size:10.5px;font-weight:800;line-height:14px;text-align:center;pointer-events:none;"]);var ea=n(27648),ed=n(35775),ec=n(22739);let es=c.ZP.div.withConfig({componentId:"sc-dc8be84f-0"})(["position:relative;"]),el=c.ZP.button.withConfig({componentId:"sc-dc8be84f-1"})(["background:none;border:none;cursor:pointer;font-size:16px;"]),ep=c.ZP.div.withConfig({componentId:"sc-dc8be84f-2"})(["position:absolute;bottom:calc(100% + 3px);right:0px;opacity:",";visibility:",";transition:opacity 0.3s ease-in-out,visibility 0.3s ease-in-out;z-index:1000;top:50px;"],e=>{let{visible:t}=e;return t?1:0},e=>{let{visible:t}=e;return t?"visible":"hidden"}),eu=c.ZP.div.withConfig({componentId:"sc-dc8be84f-3"})(["background-color:#fff;padding:10px;box-shadow:0px 2px 5px 2px rgba(0,0,0,0.3);display:flex;flex-direction:column;width:170px;border-radius:10px;@media (max-width:768px){margin-right:20px;}html.su-plugin &{width:150px;padding:8px;}"]),ef=c.ZP.div.withConfig({componentId:"sc-dc8be84f-4"})(["text-align:left;padding:8px 12px;cursor:pointer;font-size:14px;font-weight:600;color:",";margin-top:",";&:hover{background-color:#f0f0f0;}html.su-plugin &{font-size:13px;padding:4px 8px;}"],e=>{let{color:t}=e;return t||"inherit"},e=>{let{marginTop:t}=e;return t||"0"});var eh=e=>{let{isMenuVisible:t,onMenuToggle:n}=e,a=o.useRef(null),d=(0,r.useRouter)(),c=(0,ed.Z)(),s=(0,x.Zl)(L.Z),l=async()=>{try{await b.et.post("/company/logout")}catch(e){}localStorage.removeItem("TOKEN"),s({isLogin:!1,isPhoneAuth:!1}),window.location.href="/home"},p=(0,ec.Z)("/login"),u=()=>{p()},f=()=>!!localStorage.getItem("TOKEN");return(0,i.jsxs)(es,{id:"footer",children:[(0,i.jsx)(el,{onClick:n}),(0,i.jsx)(ep,{ref:a,visible:t,children:(0,i.jsxs)(eu,{children:[(0,i.jsx)(ef,{onClick:()=>{n(),d.push(f()?"/edit":"/login")},children:"프로필 수정"}),(0,i.jsx)(ef,{onClick:()=>{n(),d.push(f()?"/point":"/login")},children:"사용내역"}),(0,i.jsx)("a",{href:"/premium/",onClick:e=>{if(e.preventDefault(),n(),"/premium"===window.location.pathname.replace(/\/+$/,"")){window.scrollTo({top:0,behavior:"smooth"});return}d.push("/premium/")},children:(0,i.jsx)(ef,{children:"프리미엄 \xb7 제휴"})}),(0,i.jsx)(ea.default,{href:"/proposal",children:(0,i.jsx)(ef,{onClick:n,children:"협업 문의"})}),(0,i.jsx)(ea.default,{href:"/terms",target:"_blank",children:(0,i.jsx)(ef,{onClick:n,children:"이용약관"})}),(0,i.jsx)(ea.default,{href:"/privacypolicy",target:"_blank",children:(0,i.jsx)(ef,{onClick:n,children:"개인정보처리방침"})}),(0,i.jsx)(ea.default,{href:"https://pf.kakao.com/_xapljG",target:"_blank",children:(0,i.jsx)(ef,{onClick:n,children:"고객센터"})}),c?(0,i.jsx)(ef,{onClick:()=>{l(),n()},color:"#dc3545",marginTop:"10px",children:"로그아웃"}):(0,i.jsx)(ef,{onClick:()=>{u(),n()},color:"#28a745",marginTop:"10px",children:"로그인"})]})})]})},ex={src:"/_next/static/media/login.6ea724a7.svg",height:53,width:53,blurWidth:0,blurHeight:0},eg={src:"/_next/static/media/upper.114a9bf7.svg",height:24,width:24,blurWidth:0,blurHeight:0},em=n(72044);let eb=async()=>{var e,t;let n=localStorage.getItem("TOKEN");return null!==(t=null===(e=(await b.et.get("/boards/new-count",{headers:{Authorization:"Bearer ".concat(n)}})).data)||void 0===e?void 0:e.newCount)&&void 0!==t?t:0};var ev=e=>{var t,n;let i=(0,em.Z)();return(0,m.useQuery)("board-new-count",eb,{enabled:!i&&(null===(t=null==e?void 0:e.enabled)||void 0===t||t),retry:!1,staleTime:0,refetchOnMount:!0,refetchInterval:null!==(n=null==e?void 0:e.refetchInterval)&&void 0!==n?n:5e3,refetchIntervalInBackground:!0,refetchOnWindowFocus:!0})};let ew=c.ZP.div.withConfig({componentId:"sc-4d774bef-0"})(["display:flex;flex-direction:column;gap:10px;position:relative;@media (max-width:768px){margin-top:0px;flex-direction:row;gap:0px;}"]),ey=c.ZP.div.withConfig({componentId:"sc-4d774bef-1"})(["display:flex;gap:7px;position:relative;align-items:center;margin-left:30px;height:100%;@media (max-width:768px){gap:3px;margin-left:0px;}"]);c.ZP.div.withConfig({componentId:"sc-4d774bef-2"})(["display:flex;align-items:center;justify-content:flex-end;margin:0 10px;cursor:pointer;gap:5px;border-radius:8px;border:1px solid #f0f0f0;padding:10px;@media (max-width:768px){width:20px;margin:0px 0px 0px 5px;display:none;}"]),c.ZP.div.withConfig({componentId:"sc-4d774bef-3"})(["position:absolute;top:calc(100% + 5px);right:10px;z-index:2100;opacity:",";transform:",";transition:opacity 0.3s ease,transform 0.3s ease;pointer-events:",";"],e=>e.isOpen?1:0,e=>e.isOpen?"translateY(0)":"translateY(-10px)",e=>e.isOpen?"auto":"none"),c.ZP.div.withConfig({componentId:"sc-4d774bef-4"})(["width:45px;height:45px;position:relative;display:flex;cursor:pointer;align-items:center;justify-content:center;@media (max-width:768px){display:none;}"]);let ej=c.ZP.div.withConfig({componentId:"sc-4d774bef-5"})(["width:35px;height:35px;display:flex;cursor:pointer;align-items:center;justify-content:center;position:relative;@media (max-width:768px){gap:3px;width:75px;}"]),eI=(0,c.ZP)(h.default).withConfig({componentId:"sc-4d774bef-6"})(["width:32px;height:32px;@media (max-width:768px){max-width:30px;}"]),eC=c.ZP.div.withConfig({componentId:"sc-4d774bef-7"})(["display:flex;align-items:center;cursor:pointer;justify-content:center;"]);c.ZP.div.withConfig({componentId:"sc-4d774bef-8"})(["width:32px;height:32px;background-color:#413d7d;border-radius:50%;cursor:pointer;display:flex;justify-content:center;align-items:center;color:white;font-size:13px;font-weight:600;letter-spacing:-0.5px;@media (max-width:768px){width:30px;height:30px;font-size:12px;}"]),c.ZP.div.withConfig({componentId:"sc-4d774bef-9"})(["position:absolute;top:0px;right:0px;width:12px;height:12px;background-color:#ff7777;border-radius:50%;"]),c.ZP.div.withConfig({componentId:"sc-4d774bef-10"})(["font-size:14px;@media (max-width:768px){font-size:12px;display:none;}"]),(0,c.ZP)(h.default).withConfig({componentId:"sc-4d774bef-11"})(["width:15px;height:15px;@media (max-width:768px){width:20px;height:20px;}"]),c.ZP.div.withConfig({componentId:"sc-4d774bef-12"})(["font-weight:600;color:#ff0000;font-size:14px;display:flex;white-space:nowrap;@media (max-width:768px){display:none;}"]),c.ZP.span.withConfig({componentId:"sc-4d774bef-13"})(["color:green;font-weight:600;font-size:14px;white-space:nowrap;@media (max-width:768px){font-size:10px;display:none;}"]);let ek=c.ZP.h1.withConfig({componentId:"sc-4d774bef-14"})(["font-size:12px;color:white;"]);var eP=function(){var e,t;let n=(0,r.useSearchParams)(),c=(null==n?void 0:n.get("store"))||"",s=(0,r.useRouter)(),p=(0,r.usePathname)(),[u,g]=(0,x.FV)(L.Z),[v,w]=(0,o.useState)(!1),y=(0,o.useRef)(null),j=(0,ed.Z)(),I=(0,m.useQueryClient)(),{data:P=0}=ev({enabled:u.isLogin}),{data:Z=[]}=(0,k.hj)({enabled:u.isLogin}),S=Z.length>0;(0,o.useEffect)(()=>(window.__mcdRefreshBoard=()=>{try{I.invalidateQueries("board-new-count"),I.invalidateQueries("boards")}catch(e){}},()=>{try{delete window.__mcdRefreshBoard}catch(e){}}),[I]);let[z,A]=(0,x.FV)(V.kt),M=(0,x.Zl)(V.nl),D=(0,x.sJ)(V.nl);(0,o.useEffect)(()=>{let e=e=>{var t;let n=null!==(t=null==e?void 0:e.detail)&&void 0!==t?t:{},i=Number(null==n?void 0:n.count)||1;A(e=>e+i);let o=Number(null==n?void 0:n.boardId)||0,r=Number(null==n?void 0:n.sceneId)||0;o>0&&M({boardId:o,sceneId:r}),o>0&&I.prefetchQuery(["board-scenes",o],async()=>{let{data:e}=await b.et.get("/board-scene/board/".concat(o));return Array.isArray(e)?e:[]}).then(()=>{let e=I.getQueryData(["board-scenes",o]);(null!=e?e:[]).forEach(e=>{[null==e?void 0:e.background,null==e?void 0:e.enscapeImage,null==e?void 0:e.viewportImage,null==e?void 0:e.idMapUrl].forEach(e=>{e&&"string"==typeof e&&(document.createElement("img").src=e)})})}).catch(()=>{})};return window.addEventListener("macodi:scene-added",e),()=>window.removeEventListener("macodi:scene-added",e)},[A,M,I]);let E=()=>{if(!D||D.boardId<=0)return;A(0);let e=["board=".concat(D.boardId),"view=scene",D.sceneId>0?"scene=".concat(D.sceneId):"","src=scene_badge"].filter(Boolean).join("&");s.push("/board?".concat(e))};(0,o.useEffect)(()=>{localStorage.getItem("TOKEN")&&!u.isLogin&&g({isLogin:!0,isPhoneAuth:!0})},[u.isLogin,g]);let[Q,W]=(0,o.useState)(!1),[B,F]=(0,o.useState)(!1),R=(0,a.Z)("(max-width:768px)"),T=()=>W(e=>!e),N=(0,ec.Z)("/login"),O=()=>{if(!u.isLogin){N();return}if(z>0&&D&&D.boardId>0){E();return}let e=P>0&&!(null==p?void 0:p.startsWith("/board")),t=[c?"store=".concat(c):"",e?"src=badge":""].filter(Boolean),n=t.length?"/board?".concat(t.join("&")):"/board";s.push(n)},_=e=>{let t=e.target,n=y.current&&!y.current.contains(t);if(Q&&n){let e=document.getElementById("footer");e&&!e.contains(t)&&W(!1)}};(0,o.useEffect)(()=>(Q?document.addEventListener("click",_):document.removeEventListener("click",_),()=>{document.removeEventListener("click",_)}),[Q]);let U=null!==(e=null==j?void 0:j.premiumSheets)&&void 0!==e?e:0,$=null!==(t=null==j?void 0:j.freeSheets)&&void 0!==t?t:0,q=!!(null==j?void 0:j.premiumUnlimited)&&!!(null==j?void 0:j.freeSampleAllowed);return(0,i.jsxs)(ew,{children:[(0,i.jsxs)(ey,{children:[!R&&u.isLogin&&j&&(0,i.jsx)(eF,{as:"div",role:"button",tabIndex:0,"aria-label":"내 플랜 \xb7 프리미엄 \xb7 제휴",style:{cursor:"pointer"},onClick:()=>{s.push("/premium")},children:(0,i.jsx)(eR,{children:q?"엔터프라이즈 \xb7 무제한":U>0?"프리미엄 팩 \xb7 잔여 ".concat(U,"장"):"무료 플랜 \xb7 잔여 ".concat($,"장")})}),R&&(u.isLogin?(0,i.jsx)(C.ZP,{name:null==j?void 0:j.name,seed:null==j?void 0:j.id,size:30,onClick:()=>F(!0)}):(0,i.jsx)(eC,{children:(0,i.jsx)(eI,{src:ex,alt:"login",onClick:()=>s.push("/login")})})),!R&&(0,i.jsxs)(i.Fragment,{children:[u.isLogin?(0,i.jsx)(d.Z,{arrow:!0,placement:"bottom",title:(0,i.jsx)(ek,{children:"My 아카이브"}),children:(0,i.jsxs)(eD,{children:[(0,i.jsx)(C.ZP,{name:null==j?void 0:j.name,seed:null==j?void 0:j.id,size:32,onClick:O}),!S||(null==p?void 0:p.startsWith("/board"))?!(P>0)||(null==p?void 0:p.startsWith("/board"))?null:(0,i.jsx)(eL,{"aria-label":"새로 담긴 자재 ".concat(P,"개"),children:P>99?"99+":P}):(0,i.jsx)(eB,{"aria-label":"참여 대기 초대 ".concat(Z.length,"건")}),z>0&&(0,i.jsx)(eW,{role:"button","aria-label":"새로 완성된 투시도 ".concat(z,"개 — 클릭하면 투시도로 이동"),onClick:e=>{e.stopPropagation(),E()},children:z>99?"99+":z})]})}):(0,i.jsx)(eC,{children:(0,i.jsx)(d.Z,{arrow:!0,placement:"bottom",title:(0,i.jsx)(ek,{children:"로그인"}),children:(0,i.jsx)(eI,{src:ex,alt:"login",onClick:O})})}),(0,i.jsx)(X,{align:"right"})]}),!R&&(0,i.jsxs)(ej,{ref:y,children:[Q?(0,i.jsx)(h.default,{src:eg,alt:"upper",onClick:T,width:25,height:25}):(0,i.jsx)(eT,{onClick:T,"aria-label":"메뉴",children:(0,i.jsxs)("svg",{width:"25",height:"25",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,i.jsx)("line",{x1:"4",y1:"7",x2:"20",y2:"7"}),(0,i.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,i.jsx)("line",{x1:"4",y1:"17",x2:"20",y2:"17"})]})}),(0,i.jsx)(eh,{isMenuVisible:Q,onMenuToggle:T})]}),(0,i.jsx)(l,{isOpen:v,onClose:()=>{w(!1)}})]}),B&&(0,i.jsx)(f.Z,{containerWidth:"330px",onClose:()=>F(!1),children:(0,i.jsxs)(eZ,{children:[(0,i.jsx)(eS,{children:"\uD83D\uDCBB 데스크탑에서 이용해 주세요"}),(0,i.jsx)(ez,{children:"아래 기능은 데스크탑(PC)에서 사용할 수 있어요."}),(0,i.jsxs)(eA,{children:[(0,i.jsx)("li",{children:"\uD83D\uDDBC️ 고품질 이미지 다운로드"}),(0,i.jsx)("li",{children:"\uD83D\uDCCB 원클릭 스펙북 다운로드"}),(0,i.jsx)("li",{children:"\uD83D\uDCE6 일괄 실물 샘플 신청"}),(0,i.jsx)("li",{children:"\uD83D\uDD17 제조사 홈페이지 링크 연동"}),(0,i.jsx)("li",{children:"\uD83D\uDDC2️ 계정별 저장 및 프로젝트별 관리"})]}),(0,i.jsx)(eM,{type:"button",onClick:()=>F(!1),children:"확인"})]})})]})};let eZ=c.ZP.div.withConfig({componentId:"sc-4698a7d2-0"})(["padding:8px 6px 4px;text-align:center;"]),eS=c.ZP.h3.withConfig({componentId:"sc-4698a7d2-1"})(["margin:0 0 8px;font-size:17px;font-weight:800;color:#1b1e27;"]),ez=c.ZP.p.withConfig({componentId:"sc-4698a7d2-2"})(["margin:0 0 14px;font-size:13px;line-height:1.5;color:#6e6e73;"]),eA=c.ZP.ul.withConfig({componentId:"sc-4698a7d2-3"})(["list-style:none;margin:0 0 18px;padding:14px;background:#f5f3ff;border:1px solid #ddd6fe;border-radius:10px;display:flex;flex-direction:column;gap:8px;text-align:left;li{font-size:14px;font-weight:600;color:#413d7d;}"]),eM=c.ZP.button.withConfig({componentId:"sc-4698a7d2-4"})(["width:100%;height:44px;border:none;border-radius:10px;background:#413d7d;color:#fff;font-size:14px;font-weight:700;cursor:pointer;&:hover{background:#322e63;}"]),eD=c.ZP.span.withConfig({componentId:"sc-4698a7d2-5"})(["position:relative;display:inline-flex;"]),eE=(0,c.F4)(["0%{transform:scale(1);box-shadow:0 0 0 2px #ffffff,0 0 0 0 rgba(255,77,79,0.55);}70%{transform:scale(1.14);box-shadow:0 0 0 2px #ffffff,0 0 0 9px rgba(255,77,79,0);}100%{transform:scale(1);box-shadow:0 0 0 2px #ffffff,0 0 0 0 rgba(255,77,79,0);}"]),eL=c.ZP.span.withConfig({componentId:"sc-4698a7d2-6"})(["position:absolute;top:-6px;right:-6px;min-width:22px;height:22px;padding:0 6px;box-sizing:border-box;border-radius:999px;background:#ff4d4f;color:#ffffff;font-size:13px;font-weight:800;line-height:22px;text-align:center;box-shadow:0 0 0 2px #ffffff;pointer-events:none;z-index:3;animation:"," 1.4s ease-in-out infinite;html.su-plugin &{min-width:19px;height:19px;font-size:11px;line-height:19px;top:-5px;right:-5px;}"],eE),eQ=(0,c.F4)(["0%{box-shadow:0 0 0 2px #ffffff,0 0 0 0 rgba(44,142,142,0.55);}70%{box-shadow:0 0 0 2px #ffffff,0 0 0 9px rgba(44,142,142,0);}100%{box-shadow:0 0 0 2px #ffffff,0 0 0 0 rgba(44,142,142,0);}"]),eW=c.ZP.span.withConfig({componentId:"sc-4698a7d2-7"})(["position:absolute;top:-6px;left:-6px;min-width:22px;height:22px;padding:0 6px;box-sizing:border-box;border-radius:999px;background:#2c8e8e;color:#ffffff;font-size:13px;font-weight:800;line-height:22px;text-align:center;box-shadow:0 0 0 2px #ffffff;cursor:pointer;pointer-events:auto;z-index:4;animation:"," 1.4s ease-in-out infinite;&:hover{background:#257a7a;}html.su-plugin &{min-width:19px;height:19px;font-size:11px;line-height:19px;top:-5px;left:-5px;}"],eQ),eB=c.ZP.span.withConfig({componentId:"sc-4698a7d2-8"})(["position:absolute;top:-4px;right:-4px;width:12px;height:12px;border-radius:50%;background:#413d7d;box-shadow:0 0 0 2px #ffffff;pointer-events:none;z-index:3;animation:"," 1.4s ease-in-out infinite;"],eE),eF=c.ZP.a.withConfig({componentId:"sc-4698a7d2-9"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;line-height:1.25;text-decoration:none;white-space:nowrap;cursor:pointer;margin-right:2px;"]),eR=c.ZP.span.withConfig({componentId:"sc-4698a7d2-10"})(["font-size:12px;font-weight:700;color:#5b3df5;background:#efeaff;padding:2px 9px;border-radius:999px;letter-spacing:-0.2px;"]),eT=c.ZP.button.withConfig({componentId:"sc-4698a7d2-11"})(["width:35px;height:35px;border:0;background:transparent;display:grid;place-items:center;cursor:pointer;color:#111;padding:0;"])},3169:function(e,t,n){n.d(t,{S:function(){return p},T3:function(){return f},Th:function(){return h},Wt:function(){return u},cp:function(){return x},fW:function(){return d},ow:function(){return a},pW:function(){return c},pg:function(){return l}});var i=n(86484),o=n(7261),r=n(29918);let a="board-projects";async function d(e){let t=new URLSearchParams;null!=e.boardId?t.set("boardId",String(e.boardId)):null!=e.projectId?t.set("projectId",String(e.projectId)):t.set("root","1");let{data:n}=await r.et.get("/board-projects/tree-products?".concat(t.toString()));return Array.isArray(n)?n:[]}function c(e,t){var n;let o=null!=e.boardId?"board:".concat(e.boardId):null!=e.projectId?"project:".concat(e.projectId):"root";return(0,i.useQuery)(["tree-leaves",o],()=>d(e),{enabled:null===(n=null==t?void 0:t.enabled)||void 0===n||n,retry:2,staleTime:0,refetchOnMount:!0,refetchOnWindowFocus:!0})}let s=async()=>{let{data:e}=await r.et.get("/board-projects");return{projects:Array.isArray(null==e?void 0:e.projects)?e.projects:[],rootBoards:Array.isArray(null==e?void 0:e.rootBoards)?e.rootBoards:[]}};function l(e){var t;return(0,i.useQuery)(a,s,{enabled:null===(t=null==e?void 0:e.enabled)||void 0===t||t,retry:!1,staleTime:0,refetchOnMount:!0,refetchInterval:4e3,refetchOnWindowFocus:!0})}function p(){let e=(0,i.useQueryClient)(),t=()=>{e.invalidateQueries(a),e.invalidateQueries("boards"),e.invalidateQueries("tree-leaves")},n=(0,i.useMutation)(e=>r.et.post("/board-projects","string"==typeof e?{name:e}:e),{onSuccess:t}),d=(0,i.useMutation)(e=>r.et.patch("/board-projects/".concat(e.projectId,"/move"),{parentId:e.parentId,...void 0!==e.orderIndex?{orderIndex:e.orderIndex}:{}}),{onSuccess:t,onError:t=>{var n,i;let r=(null==t?void 0:null===(i=t.response)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.message)||"아카이브를 옮기지 못했습니다.";o.Am.error(Array.isArray(r)?r[0]:r,{position:"bottom-center",autoClose:2600}),e.invalidateQueries(a)}}),c=(0,i.useMutation)(e=>r.et.patch("/board-projects/reorder",e),{onSuccess:t}),s=(0,i.useMutation)(e=>r.et.patch("/board-projects/products/area",e),{onSuccess:t}),l=(0,i.useMutation)(e=>r.et.patch("/board-projects/container-reorder",e),{onSuccess:t}),p=(0,i.useMutation)(e=>r.et.patch("/board-projects/".concat(e.projectId),{name:e.name}),{onSuccess:t}),u=(0,i.useMutation)(e=>r.et.delete("/board-projects/".concat(e)),{onSuccess:t}),f=(0,i.useMutation)(e=>r.et.post("/board-projects/".concat(e,"/leave")),{onSuccess:t}),h=(0,i.useMutation)(e=>r.et.post("/board-projects/".concat(e.projectId,"/rooms"),{name:e.name}),{onSuccess:t}),x=(0,i.useMutation)(e=>r.et.patch("/board-projects/rooms/".concat(e.roomId),{name:e.name}),{onSuccess:t}),g=(0,i.useMutation)(e=>r.et.delete("/board-projects/rooms/".concat(e)),{onSuccess:t}),m=(0,i.useMutation)(e=>r.et.patch("/board-projects/boards/".concat(e.boardId,"/move"),{projectId:e.projectId,roomId:e.roomId,...void 0!==e.orderIndex?{orderIndex:e.orderIndex}:{}}),{onSuccess:t}),b=(0,i.useMutation)(e=>r.et.post("/board-projects/products/place",e),{onSuccess:t}),v=(0,i.useMutation)(e=>r.et.patch("/board-projects/products/move",e),{onSuccess:t});return{createProject:n,moveProject:d,reorderProjects:c,reorderContainer:l,updateFolderProductArea:s,renameProject:p,deleteProject:u,leaveProject:f,createRoom:h,renameRoom:x,deleteRoom:g,moveBoard:m,placeProduct:b,moveProduct:v,copyProduct:(0,i.useMutation)(e=>r.et.post("/board-projects/products/copy",e),{onSuccess:t}),reorderProducts:(0,i.useMutation)(e=>r.et.patch("/board-projects/products/reorder",e),{onSuccess:t}),unplaceProduct:(0,i.useMutation)(e=>r.et.delete("/board-projects/products/unplace",{data:e}),{onSuccess:t})}}function u(e){var t;return(0,i.useQuery)("board-shared-boards",async()=>{let{data:e}=await r.et.get("/board-projects/shared-boards");return Array.isArray(e)?e:[]},{enabled:null===(t=null==e?void 0:e.enabled)||void 0===t||t,retry:!1,staleTime:0,refetchInterval:4e3,refetchOnWindowFocus:!0})}function f(e,t){var n,o;return(0,i.useQuery)(["board-project-folder-products",e],async()=>{let{data:t}=await r.et.get("/board-projects/".concat(e,"/products"));return Array.isArray(t)?t:[]},{enabled:!!e&&(null===(n=null==t?void 0:t.enabled)||void 0===n||n),retry:!1,staleTime:0,refetchInterval:4e3,refetchOnWindowFocus:!0,keepPreviousData:null!==(o=null==t?void 0:t.keepPreviousData)&&void 0!==o&&o})}function h(e){var t,n;return(0,i.useQuery)("board-project-root-products",async()=>{let{data:e}=await r.et.get("/board-projects/products/root");return Array.isArray(e)?e:[]},{enabled:null===(t=null==e?void 0:e.enabled)||void 0===t||t,retry:!1,staleTime:0,refetchInterval:4e3,refetchOnWindowFocus:!0,keepPreviousData:null!==(n=null==e?void 0:e.keepPreviousData)&&void 0!==n&&n})}function x(e,t){var n;return(0,i.useQuery)(["board-project-boards",e],async()=>{let{data:t}=await r.et.get("/board-projects/".concat(e,"/boards"));return Array.isArray(t)?t:[]},{enabled:!!e&&(null===(n=null==t?void 0:t.enabled)||void 0===n||n),retry:!1,staleTime:0,refetchInterval:4e3,refetchOnWindowFocus:!0})}},92385:function(e,t,n){n.d(t,{HD:function(){return s},PC:function(){return f},fw:function(){return p},hj:function(){return u},qr:function(){return l}});var i=n(2265),o=n(86484),r=n(29918),a=n(3169);let d=e=>["project-members",e],c="board-invites-incoming";function s(e){return(0,o.useQuery)(d(e),async()=>{let{data:t}=await r.et.get("/board-projects/".concat(e,"/members"));return t},{enabled:!!e,retry:!1,staleTime:0})}function l(e,t){let[n,a]=(0,i.useState)("");return(0,i.useEffect)(()=>{let e=setTimeout(()=>a(t.trim()),220);return()=>clearTimeout(e)},[t]),(0,o.useQuery)(["board-invite-candidates",e,n],async()=>{let{data:t}=await r.et.get("/board-projects/".concat(e,"/invite-candidates"),{params:{q:n}});return Array.isArray(t)?t:[]},{enabled:!!e&&n.length>0,retry:!1,staleTime:1e4,keepPreviousData:!1})}function p(e){let t=(0,o.useQueryClient)(),n=()=>{t.invalidateQueries(d(e)),t.invalidateQueries(a.ow)},i=(0,o.useMutation)(t=>{var n;let i="string"==typeof t?t:t.email,o="string"==typeof t?"editor":null!==(n=t.role)&&void 0!==n?n:"editor";return r.et.post("/board-projects/".concat(e,"/invites"),{email:i,role:o}).then(e=>e.data)},{onSuccess:n}),c=(0,o.useMutation)(t=>r.et.delete("/board-projects/".concat(e,"/invites/").concat(t)),{onSuccess:n}),s=(0,o.useMutation)(t=>r.et.delete("/board-projects/".concat(e,"/members/").concat(t)),{onSuccess:n}),l=async t=>{var n;let{data:i}=await r.et.get("/board-projects/".concat(e,"/invites/").concat(t,"/link"));return null!==(n=null==i?void 0:i.link)&&void 0!==n?n:""};return{setMemberRole:(0,o.useMutation)(t=>r.et.patch("/board-projects/".concat(e,"/members/").concat(t.companyId,"/role"),{role:t.role}),{onSuccess:n}),invite:i,cancelInvite:c,removeMember:s,getLink:l}}function u(e){var t;return(0,o.useQuery)(c,async()=>{let{data:e}=await r.et.get("/board-projects/invites/incoming");return Array.isArray(e)?e:[]},{enabled:null===(t=null==e?void 0:e.enabled)||void 0===t||t,retry:!1,staleTime:0,refetchInterval:15e3,refetchOnWindowFocus:!0})}function f(){let e=(0,o.useQueryClient)(),t=()=>{e.invalidateQueries(c),e.invalidateQueries(a.ow)};return{accept:(0,o.useMutation)(e=>r.et.post("/board-projects/invites/".concat(e,"/accept")).then(e=>e.data),{onSuccess:t}),decline:(0,o.useMutation)(e=>r.et.post("/board-projects/invites/".concat(e,"/decline")),{onSuccess:t}),redeem:(0,o.useMutation)(e=>r.et.post("/board-projects/invites/redeem",{token:e}).then(e=>e.data),{onSuccess:t})}}},58300:function(e,t,n){n.d(t,{MZ:function(){return r},RA:function(){return a},Yk:function(){return o},ax:function(){return i}});let i=["추천순","최신순","조회순","다운로드순","가격↑","가격↓"],o={추천순:"recommended",최신순:"latest",조회순:"most_viewed",다운로드순:"most_downloaded","가격↓":"price_asc","가격↑":"price_desc"},r={구분:{isSelected:!1,content:"구분",activeId:[]},색상:{isSelected:!1,content:"색상",activeId:[]},사용위치:{isSelected:!1,content:"사용위치",activeId:[]},용도:{isSelected:!1,content:"용도",activeId:[]},설계단가:{isSelected:!1,content:"설계단가",activeId:[0,3e6],includeCustomInquiry:!0},사이즈:{isSelected:!1,content:"사이즈",activeId:[]},가로:{isSelected:!1,content:"가로",activeId:[]},세로:{isSelected:!1,content:"세로",activeId:[]},두께:{isSelected:!1,content:"두께",activeId:[]},브랜드:{isSelected:!1,content:"브랜드",activeId:[]},광택:{isSelected:!1,content:"광택",activeId:[]},원산지:{isSelected:!1,content:"원산지",activeId:[]},종류:{isSelected:!1,content:"종류",activeId:[]},시리즈:{isSelected:!1,content:"시리즈",activeId:[]},판매사:{isSelected:!1,content:"판매사",activeId:[]},심리스:{isSelected:!1,content:"심리스",activeId:[]},정렬:{isSelected:!1,content:"정렬",activeId:[]}},a={categories:[],subCategory:"",series:"",store:"",brand:"",maxPrice:"",minPrice:"",size:"",glossiness:"",country:"",color:"",txtSearch:"",price:[0,3e6],isSeamless:!1,location:"",purpose:"",widthDims:[],heightDims:[],depthDims:[],sort:void 0,includeWholesale:!0}},22739:function(e,t,n){var i=n(99376);t.Z=e=>{let t=(0,i.useRouter)(),n=(0,i.useSearchParams)();return()=>{let i=new URLSearchParams,o=null==n?void 0:n.get("store"),r=null==n?void 0:n.get("q");o&&i.append("store",o),r&&i.append("q",r);let a=i.toString()?"?".concat(i.toString()):"";t.push("".concat(e).concat(a))}}},73536:function(e,t,n){let i=(0,n(43618).cn)({key:"activeCategoriesAtom",default:[]});t.Z=i},26163:function(e,t,n){n.d(t,{MZ:function(){return o.MZ},RA:function(){return o.RA},Tq:function(){return a},ot:function(){return r}});var i=n(43618),o=n(58300);let r=(0,i.cn)({key:"filtersAtom",default:o.MZ}),a=(0,i.cn)({key:"filterAtom",default:{activeId:o.RA}})},46076:function(e,t,n){n.d(t,{kt:function(){return r},nl:function(){return a},rl:function(){return o}});var i=n(43618);let o=(0,i.cn)({key:"notificationOpenAtom",default:!1}),r=(0,i.cn)({key:"sceneNewCountAtom",default:0}),a=(0,i.cn)({key:"lastSceneNavAtom",default:null})},32905:function(e,t){t.Z={src:"/_next/static/media/mLogo.df305f50.svg",height:256,width:256,blurWidth:0,blurHeight:0}}}]);