PageSourceSearch

https://popga.co.kr/_next/static/chunks/8993.a9d258ca68b8963d.js

js popga.co.kr collected 2026-09-24 12:25:24 UTC 68,704 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d435f448-2c57-4f4f-b93a-93905f7b79d8",e._sentryDebugIdIdentifier="sentry-dbid-d435f448-2c57-4f4f-b93a-93905f7b79d8")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8993],{31472:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=i.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:"m9 18 6-6-6-6"})))}},90143:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},e),n||(n=i.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12.5 3.333V1.667m0 1.666V5m0-1.667H8.75m-6.25 5v7.5c0 .92.746 1.667 1.667 1.667h11.666c.92 0 1.667-.746 1.667-1.667v-7.5zM2.5 8.333V5c0-.92.746-1.667 1.667-1.667h1.666M5.833 1.667V5M17.5 8.333V5c0-.92-.746-1.667-1.667-1.667h-.416"})))}},17732:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},e),n||(n=i.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10m-.997-6 7.07-7.071-1.413-1.414-5.657 5.657-2.829-2.829-1.414 1.414z"})))}},8781:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=i.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 21h18M12.222 5.828 15.05 3 20 7.95l-2.828 2.828m-4.95-4.95-5.607 5.607a1 1 0 0 0-.293.707v4.536h4.536a1 1 0 0 0 .707-.293l5.607-5.607m-4.95-4.95 4.95 4.95"})))}},62373:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},e),n||(n=i.createElement("path",{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10m-1-7v2h2v-2zm0-8v6h2V7z"})))}},42548:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),n||(n=i.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"m6 12.667-3.474 1.158a.4.4 0 0 1-.526-.38V3.622a.4.4 0 0 1 .274-.38L6 2m0 10.667L10 14m-4-1.333V2m4 12 3.726-1.242a.4.4 0 0 0 .274-.38V2.555a.4.4 0 0 0-.527-.38L10 3.334M10 14V3.333m0 0L6 2"})))}},39483:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),n||(n=i.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M20 13v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6M12 15V3m0 0L8.5 6.5M12 3l3.5 3.5"})))}},54936:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 37 40"},e),n||(n=i.createElement("path",{d:"M17.387 1.637c1.147-2.036 4.079-2.036 5.226 0l4.013 7.119a3 3 0 0 0 2.02 1.468l8.01 1.616c2.292.462 3.198 3.25 1.616 4.971l-5.53 6.016a3 3 0 0 0-.772 2.375l.938 8.118c.268 2.322-2.104 4.045-4.229 3.072l-7.43-3.4a3 3 0 0 0-2.497 0l-7.431 3.4c-2.125.973-4.497-.75-4.229-3.072l.938-8.118a3 3 0 0 0-.771-2.375l-5.531-6.016c-1.582-1.72-.676-4.509 1.615-4.971l8.01-1.616a3 3 0 0 0 2.02-1.468z"})))}},2744:function(e,t,a){"use strict";var n,i=a(94746);function s(){return(s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}t.Z=function(e){return i.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 28 28"},e),n||(n=i.createElement("path",{fill:"currentColor",d:"M15.414 3.677a1.574 1.574 0 0 0-2.824 0L9.928 9.07l-5.952.866a1.575 1.575 0 0 0-.875 2.687L7.41 16.82l-1.017 5.927a1.575 1.575 0 0 0 2.285 1.66l5.322-2.8.844.445a2.625 2.625 0 0 1 1.781-4.553 2.625 2.625 0 1 1 0-5.25 2.625 2.625 0 0 1 0-5.25h.429zm1.211 5.073a.875.875 0 0 0 0 1.75h8.75a.875.875 0 1 0 0-1.75zm0 5.25a.875.875 0 0 0 0 1.75h8.75a.875.875 0 1 0 0-1.75zm0 5.25a.875.875 0 0 0 0 1.75h8.75a.875.875 0 1 0 0-1.75z"})))}},48993:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eY}});var n,i=a(57437),s=a(7651),l=a(39799),r=a(20917),o=a(45406);a(96566);var d=a(61736),c=a(48185),u=a(62516),p=a(85262),f=a(29827),m=a(71096),x=a.n(m);a(49400);var h=a(20418),v=a(99376),g=a(2265),b=a(30166),y=a(77248),w=a(51558),j=a(11092),N=a(44769),k=a(30755),C=a(21220),D=a(75278),A=a(92065),E=a(31585),M=a(74291),O=a(64585),R=a(96488),T=a(12381),S=a(32693),z=a(86117);function P(e){let{isOpen:t,onOpenChange:a}=e,n=(0,v.useRouter)(),{data:s}=(0,O.Ce)({recommendationType:"REVIEWABLE"},t),l=(null!=s?s:[]).slice(0,3),r=()=>{(0,R.K)(),a(!1)};return(0,i.jsx)(M.Vq,{open:t,onOpenChange:e=>{e||r()},children:(0,i.jsxs)(M.cZ,{hideClose:!0,onCloseAutoFocus:e=>{e.preventDefault(),(0,R.K)()},className:"flex max-h-[82dvh] w-full max-w-[90dvw] flex-col gap-5 rounded-xl p-0 sm:max-w-[354px]",children:[(0,i.jsxs)(M.fK,{className:"shrink-0 px-4 pt-5",children:[(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)(M.$N,{className:"flex-1 text-center text-xl",children:"추가할 팝업을 선택해 주세요"}),(0,i.jsx)(T.z,{variant:"ghost",size:"icon","aria-label":"닫기",onClick:r,className:"shrink-0",children:(0,i.jsx)(S.default,{className:"size-6 text-slate-700"})})]}),(0,i.jsx)(M.Be,{hidden:!0,children:"팝업을 선택하여 찜 목록에 추가해 주세요."})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-4 overflow-y-auto px-3 pb-3",children:[(0,i.jsx)("div",{className:"flex flex-col gap-2",children:l.map(e=>{var t;return(0,i.jsx)(z.Z,{thumbnail:null===(t=e.file)||void 0===t?void 0:t.path,title:e.title,periodType:e.periodType,area:e.area,onClick:()=>{r(),n.push(h.Z.POPUP_DETAIL(e.id))}},e.id)})}),(0,i.jsx)(T.z,{variant:"solid",size:"cta",onClick:()=>{r(),n.push(h.Z.POPUP_LIST_TABS.RECOMMENDED)},children:"더 많은 팝업 탐색하기"})]})]})})}var I=a(96996),Z=a(31472);function Y(e){let{dateRange:t,onPrevWeek:a,onNextWeek:n}=e,s=x()(t.startDate),l=x()(t.endDate);return(0,i.jsxs)("div",{className:"flex items-center justify-center gap-24 px-4 py-2",children:[(0,i.jsx)("button",{type:"button","aria-label":"Previous Week",onClick:a,className:"flex h-10 w-10 items-center justify-center rounded-full",children:(0,i.jsx)(I.Z,{width:24,height:24})}),(0,i.jsxs)("div",{className:"text-base leading-[1.4] font-semibold whitespace-nowrap text-slate-800",children:[s.format("M/D")," - ",l.format("M/D")]}),(0,i.jsx)("button",{type:"button","aria-label":"Next Week",onClick:n,className:"flex h-10 w-10 items-center justify-center rounded-full",children:(0,i.jsx)(Z.Z,{width:24,height:24})})]})}var L=a(93448);function _(e){let{dayNumber:t,dayOfMonth:a,dayOfWeek:n,onClickDayHeader:s,isSelected:l,isToday:r}=e;return(0,i.jsxs)("button",{type:"button",id:"btn-history-calendar-day",className:"flex cursor-pointer flex-col items-center gap-[5px] transition-colors",onClick:e=>{e.preventDefault(),e.stopPropagation(),s(n)},children:[(0,i.jsx)("span",{className:(0,L.cn)("text-xs leading-6 font-medium",r?"text-primary":"text-slate-700"),
1children:t}),(0,i.jsx)("div",{className:"flex size-10 items-center justify-center",children:(0,i.jsx)("div",{className:(0,L.cn)("flex items-center justify-center text-xs font-semibold text-slate-700",l||r?"size-8 rounded-[6px]":"size-10 rounded-full",l&&"bg-slate-700 text-slate-50",!l&&r&&"bg-slate-100"),children:a})})]})}var V=a(27512);let B={DESC:"DESC",ADD_BUTTON:"ADD_BUTTON",WARNING:"WARNING"};function W(e,t){let a=x()(e.startDate).subtract(1,"day").format(V.zT.YYYYMMDD),n=x()(e.endDate).add(2,"day").format(V.zT.YYYYMMDD);return Array.from({length:t},(e,t)=>({id:"default-add-button-".concat(t+1),title:B.ADD_BUTTON,start:a,end:n,display:"block",classNames:["add-button-event"]}))}function q(e,t){var a,n,i,s;let l=e.title===B.DESC||e.title===B.WARNING,r=t.title===B.DESC||t.title===B.WARNING;return l&&!r?-1:r&&!l||e.title===B.ADD_BUTTON&&t.title!==B.ADD_BUTTON?1:t.title===B.ADD_BUTTON&&e.title!==B.ADD_BUTTON?-1:(null!==(i=null===(a=e.extendedProps)||void 0===a?void 0:a._index)&&void 0!==i?i:0)-(null!==(s=null===(n=t.extendedProps)||void 0===n?void 0:n._index)&&void 0!==s?s:0)}var K=a(94746);function U(){return(U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}var F=function(e){return K.createElement("svg",U({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 36 36"},e),n||(n=K.createElement("path",{fill:"currentColor",d:"M18 1.875c8.906 0 16.125 7.22 16.125 16.125S26.905 34.125 18 34.125 1.875 26.905 1.875 18 9.095 1.875 18 1.875m0 9c-.621 0-1.125.504-1.125 1.125v4.875H12a1.125 1.125 0 0 0 0 2.25h4.875V24a1.125 1.125 0 0 0 2.25 0v-4.875H24a1.125 1.125 0 0 0 0-2.25h-4.875V12c0-.621-.504-1.125-1.125-1.125"})))},Q=a(98714),G=a(17732),H=a(62373);function $(e){let{eventInfo:t,onAddButtonClick:a}=e,{event:n}=t;if(n.title===B.DESC)return(0,i.jsxs)("div",{className:"border-primary bg-primary/15 flex h-[34px] w-full items-center gap-1.5 border-b px-2.5",children:[(0,i.jsx)(Q.default,{width:18,height:18,className:"text-primary shrink-0"}),(0,i.jsx)("span",{className:"text-primary text-sm font-medium whitespace-nowrap",children:"찜한 팝업이 여기에 표시 돼요"})]});if(n.title===B.WARNING)return(0,i.jsxs)("div",{className:"flex h-[68px] w-full items-start gap-1.5 border-b border-amber-500 bg-amber-400/10 px-2.5 py-3.5",children:[(0,i.jsx)(H.Z,{width:18,height:18,className:"shrink-0 text-amber-500"}),(0,i.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,i.jsx)("span",{className:"text-sm leading-[1.3] font-medium text-amber-500",children:"진행중인 팝업 일정이 없어요"}),(0,i.jsx)("span",{className:"text-sm leading-[1.3] font-medium text-amber-500",children:"다른 날짜를 확인하거나 새로운 팝업을 찾아보세요"})]})]});if(n.title===B.ADD_BUTTON)return(0,i.jsxs)("button",{type:"button",id:"btn-add-pick-popup",className:"flex h-8.5 w-full items-center justify-start gap-1.5 rounded-none border-b border-slate-400 bg-slate-300/40 px-2.5 text-sm font-medium text-slate-700",onClick:e=>{e.stopPropagation(),null==a||a()},children:[(0,i.jsx)(F,{width:18,height:18,className:"shrink-0 text-slate-700"}),(0,i.jsx)("span",{children:"찜한 팝업을 추가하세요"})]});let s=n.extendedProps,l=s.isVisited;return(0,i.jsxs)("div",{className:(0,L.cn)("flex h-[34px] w-full items-center gap-1.5 border-b px-2.5 text-sm leading-[1.3] font-medium text-slate-700 transition-colors",l?"border-blue-400 bg-blue-50":"border-primary bg-primary/15"),children:[l?(0,i.jsx)(G.Z,{width:18,height:18,className:"shrink-0 text-blue-500"}):(0,i.jsx)(Q.default,{width:18,height:18,className:"text-primary shrink-0"}),(0,i.jsx)("div",{className:"truncate text-left",children:s.spotTitle})]})}var X=a(68245),J=a(41462),ee=a(74154),et=a(74394),ea=a(8665),en=a(3637),ei=a(69622),es=a(13699),el=a(14317),er=a(90143),eo=a(72766),ed=a(30413);let ec={sm:{width:71,height:48,className:"h-12 w-auto"},lg:{width:147,height:100,className:"h-[100px] w-auto"}};function eu(e){let{size:t="sm",className:a}=e,{width:n,height:s,className:l}=ec[t];return(0,i.jsx)("div",{className:(0,L.cn)("shrink-0",a),children:(0,i.jsx)(ea.default,{src:"/common/visited-stamp.webp",alt:"방문 완료",width:n,height:s,className:l})})}var ep=a(87306),ef=a(42548),em=a(39483),ex=a(8781),eh=a(95671);function ev(e){let{id:t,disabled:a=!1,onClick:n,className:s="",dataSearchMapType:l,dataSection:r,dataAction:o,children:d}=e;return(0,i.jsx)("button",{id:t,type:"button",disabled:a,onClick:e=>{e.preventDefault(),e.stopPropagation(),n(e)},className:(0,L.cn)("flex flex-1 items-center justify-center gap-1 whitespace-nowrap py-2 text-xs font-medium text-slate-500 transition-colors hover:text-slate-700 disabled:text-slate-300 disabled:hover:text-slate-300",s),"data-search-map-type":l,"data-section":r,"data-action":o,children:d})}function eg(e){let{pick:t,isBeforeOpen:a,disabledActions:n,onClickDirections:s,onClickVisited:l,onClickReview:r,onClickUnpick:o,onClickShare:d}=e,c=(0,ep.Z)();return(0,i.jsxs)("div",{className:"flex items-center justify-center gap-5 px-3 pb-1.5",children:[(0,i.jsxs)(ev,{id:"btn-naver-search-road",dataSearchMapType:"legacy-naver",onClick:s,children:[(0,i.jsx)(ef.Z,{className:"size-4 text-slate-400"}),"길찾기"]}),(0,i.jsx)("div",{className:"h-3 w-px bg-slate-200"}),(0,i.jsxs)(ev,{id:"btn-share",onClick:()=>null==d?void 0:d(t),children:[(0,i.jsx)(em.Z,{className:"size-4 text-slate-400"}),"공유"]}),(0,i.jsx)("div",{className:"h-3 w-px bg-slate-200"}),(0,i.jsx)(eb,{pick:t,isBeforeOpen:a,disabledActions:n,onClickVisited:l,onClickReview:r}),(0,i.jsx)("div",{className:"h-3 w-px bg-slate-200"}),(0,i.jsxs)(ev,{id:"btn-history-mypick-unpick",disabled:n,onClick:e=>o(e,t.id),dataSection:c,dataAction:"unpick",children:[(0,i.jsx)(Q.default,{className:"text-primary size-4"}),"찜"]})]})}function eb(e){let{pick:t,isBeforeOpen:a,disabledActions:n,onClickVisited:s,onClickReview:l}=e;return t.isVisited?t.userReview?(0,i.jsx)(ev,{id:"btn-history-mypick-review-view",onClick:()=>l(t.id,t.spotId,t.userReview.reviewId),children:(0,i.jsx)(eh.Z,{value:t.userReview.score,maxWidth:70,activeFillColor:"#62748E",readOnly:!0})}):(0,i.jsxs)(ev,{id:"btn-history-mypick-review-write",disabled:n,onClick:()=>l(t.id,t.spotId,null),className:"text-primary hover:text-primary/80",children:[(0,i.jsx)(ex.Z,{className:"text-primary [&>path:last-child]:fill-primary/15 size-4"}),"후기 남기기"]}):(0,i.jsxs)(ev,{id:"btn-history-mypick-visited",disabled:n||a,onClick:()=>s(t.pickId,t.spotId),children:[(0,i.jsx)(G.Z,{className:"size-4 text-slate-300"}),"방문 완료"]})}function ey(e){var t,a,n,s;let{pick:l,onClickVisited:r,onClickReview:o,onClickUnpick:d,onClickShare:c,disabledActions:u=!1}=e,{openPopupDetail:p}=(0,ed.Z)(),{handleClickGetDirections:f}=(0,eo.Z)({lat:null!==(n=l.latitude)&&void 0!==n?n:0,lng:null!==(s=l.longitude)&&void 0!==s?s:0,name:l.spotTitle,spotId:l.spotId}),m=(0,ei.Z)(l.spotOpenDate,l.spotCloseDate),h="ENDED"===m,v=x()(l.spotOpenDate).isSame(x()(),"day")&&"ENDED"!==m;return(0,i.jsxs)("div",{className:"relative overflow-hidden rounded-[6px] border border-slate-200 bg-white",children:[l.isVisited&&(0,i.jsx)(eu,{className:"pointer-events-none absolute top-2 right-2.5 z-10"}),(0,i.jsxs)("button",{id:"btn-history-mypick-item",type:"button",className:"flex w-full items-start gap-3 p-3 text-left",onClick:()=>p(l.spotId),"data-spot-id":l.spotId,children:[(0,i.jsxs)("div",{className:"relative size-18 shrink-0",children:[(null===(t=l.file)||void 0===t?void 0:t.path)?(0,i.jsx)(ea.default,{src:l.file.path,alt:l.spotTitle,width:72,height:72,quality:60,placeholder:"blur",blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAECAIAAADETxJQAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAMUlEQVR4nGPIrOzOqWhbuHYvw7yNBxK9w/7/+s+g7xSiJaG+eeN
1BBgY2UUev6LKyZgByfxCvAnvQuAAAAABJRU5ErkJggg==",className:"size-full rounded-[6px] object-cover object-center"}):(0,i.jsx)(et.Z,{className:"size-full rounded-[6px]"}),h&&(0,i.jsx)("div",{className:"absolute inset-0 flex items-center justify-center rounded-[6px] bg-gradient-to-b from-black/[0.14] to-black/70",children:(0,i.jsxs)("p",{className:"text-center text-xs leading-normal font-bold text-white",children:["종료된",(0,i.jsx)("br",{}),"팝업입니다"]})})]}),(0,i.jsxs)("div",{className:"flex h-18 min-w-0 flex-1 flex-col items-start justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[l.spotCategory&&(0,i.jsx)(en.Z,{variant:"default",label:l.spotCategory}),v?(0,i.jsx)(en.Z,{variant:"open-today"}):(0,i.jsx)(en.Z,{variant:es.Nh[m],size:"compact"})]}),(0,i.jsx)("p",{className:(0,L.cn)("line-clamp-1 w-full text-base leading-[1.3] font-semibold",h?"text-slate-400":"text-slate-700"),children:l.spotTitle}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)(el.default,{className:"size-4 shrink-0 text-slate-400"}),(0,i.jsx)("span",{className:(0,L.cn)("text-xs leading-[1.3] font-medium",h?"text-slate-400":"text-slate-500"),children:null===(a=l.spotArea)||void 0===a?void 0:a.region2Depth})]}),(0,i.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,i.jsx)(er.Z,{className:"size-4 shrink-0 text-slate-400"}),(0,i.jsxs)("span",{className:(0,L.cn)("text-xs leading-[1.3] font-medium",h?"text-slate-400":"text-slate-500"),children:[x()(l.spotOpenDate).format("YY. MM. DD"),l.spotCloseDate&&" - ".concat(x()(l.spotCloseDate).format("MM. DD"))]})]})]})]})]}),(0,i.jsx)(eg,{pick:l,isBeforeOpen:"READY"===m,disabledActions:u,onClickDirections:f,onClickVisited:r,onClickReview:o,onClickUnpick:d,onClickShare:c})]})}var ew=a(35174),ej=a(46494);function eN(e){let{page:t,totalPages:a,onPageChange:n}=e,s=(0,ej.k)(t,a);return(0,i.jsx)(ew.tl,{className:"py-3",children:(0,i.jsxs)(ew.ng,{children:[(0,i.jsx)(ew.nt,{children:(0,i.jsx)(ew.dN,{disabled:t<=1,onClick:()=>n(t-1)})}),s.map((e,a)=>(0,i.jsx)(ew.nt,{children:"..."===e?(0,i.jsx)(ew.Dj,{}):(0,i.jsx)(ew.kN,{isActive:t===e,onClick:()=>n(e),children:e})},"..."===e?"ellipsis-".concat(a):e)),(0,i.jsx)(ew.nt,{children:(0,i.jsx)(ew.$0,{disabled:t>=a,onClick:()=>n(t+1)})})]})})}function ek(){return(0,i.jsxs)("div",{className:"flex min-h-17 w-full items-start gap-1.5 border-b border-amber-500 bg-amber-400/10 px-2.5 py-3.5",children:[(0,i.jsx)(H.Z,{width:18,height:18,className:"shrink-0 text-amber-500"}),(0,i.jsxs)("div",{className:"flex flex-col gap-1 text-sm leading-[1.3] font-medium text-amber-500",children:[(0,i.jsx)("span",{children:"비로그인 상태에서는 찜 목록이 사라질 수 있어요"}),(0,i.jsx)("span",{children:"로그인 하면 모든 기기에서 찜 목록을 볼 수 있어요"})]})]})}let eC=(0,g.forwardRef)((e,t)=>{let{segment:a,filter:n,onFilterChange:s,visitedOnly:l,onVisitedOnlyChange:r,eventsToShow:o,selectedDate:d,onClickVisited:c,onClickReview:u,onClickUnpick:p,onClickShare:f,disabledActions:m,isLoading:x,showGuestPickNotice:h,page:v,totalPages:b,totalElements:y,onPageChange:w}=e,[j,N]=(0,g.useState)(null);(0,g.useEffect)(()=>{if(null===j)return;let e=window.setTimeout(()=>{N(e=>e===j?null:e)},700);return()=>{window.clearTimeout(e)}},[j]);let k=(0,g.useCallback)((e,t)=>{N(t),setTimeout(()=>{p(e,t)},500)},[p]),C=d?d.locale("ko").format(V.zT.MMDD_KR_DAY):null;return 0===o.length&&"calendar"===a?(0,i.jsxs)("div",{className:"flex flex-col gap-3",ref:t,children:[C&&(0,i.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,i.jsx)("span",{className:"h-3.5 w-0.5 bg-slate-300"}),(0,i.jsx)("span",{className:"text-sm leading-[1.3] font-semibold text-slate-600",children:C}),(0,i.jsxs)("span",{className:"text-sm leading-[1.3] font-medium text-slate-400",children:[o.length,"개"]})]}),h&&(0,i.jsx)(ek,{}),(0,i.jsx)("div",{className:"flex flex-col items-center gap-1 py-8 text-center",children:(0,i.jsx)("p",{className:"text-sm text-slate-400",children:"찜한 팝업이 없어요"})})]}):(0,i.jsxs)("div",{className:"flex flex-col gap-3",ref:t,children:["calendar"===a&&C&&(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"h-3.5 w-0.5 bg-slate-700"}),(0,i.jsx)("span",{className:"text-sm leading-[1.3] font-semibold text-slate-600",children:C}),(0,i.jsxs)("span",{className:"text-sm leading-[1.3] font-medium text-slate-400",children:[o.length,"개"]})]}),"picks"===a&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("div",{className:"flex items-center gap-2",children:ee.P.map(e=>{let{value:t,label:a}=e;return(0,i.jsx)("button",{id:"btn-history-mypick-past-filter",type:"button",onClick:()=>s(t),className:(0,L.cn)("rounded-full px-3.5 py-2 text-sm leading-[1.3] font-normal transition-colors",n===t?"bg-slate-800 text-white":"border border-slate-300 bg-white text-slate-700"),
1children:a},t)})}),(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsxs)("span",{className:"text-xs text-slate-600",children:[y,"개"]}),(0,i.jsxs)("div",{className:"flex items-center gap-1 text-xs text-slate-600",children:[(0,i.jsx)(X.X,{id:"btn-history-mypick-visited-filter",checked:l,onCheckedChange:e=>r(!0===e),showIndicator:!0,className:"data-[state=checked]:text-primary h-4 w-4 rounded-full border-0 text-slate-300",indicatorClassName:"h-4 w-4"}),(0,i.jsx)("button",{type:"button",className:"cursor-pointer",onClick:()=>r(!l),children:"방문한 팝업만"})]})]})]}),h&&(0,i.jsx)(ek,{}),(0,i.jsx)("div",{className:"flex flex-col gap-2.5",children:o.map(e=>(0,i.jsx)("div",{className:(0,L.cn)("transition-all duration-500 ease-out",j===e.id?"-mb-2.5 max-h-0 translate-x-full overflow-hidden opacity-0":"max-h-75"),children:(0,i.jsx)(ey,{pick:e,onClickVisited:(t,a)=>{var n,i;return c(t,a,e.spotTitle,null!==(i=null===(n=e.file)||void 0===n?void 0:n.path)&&void 0!==i?i:void 0,!!e.userReview)},onClickReview:(e,t,a)=>u(e,t,a),onClickUnpick:(e,t)=>k(e,t),onClickShare:f,disabledActions:m})},e.id))}),"picks"===a&&b>1&&(0,i.jsx)(eN,{page:v,totalPages:b,onPageChange:w}),x?(0,i.jsx)("div",{className:"flex justify-center py-8",children:(0,i.jsx)(J.Z,{})}):0===o.length&&(0,i.jsx)("div",{className:"flex flex-col items-center gap-1 py-8 text-center",children:(0,i.jsx)("p",{className:"text-sm text-slate-400",children:"조건에 맞는 팝업이 없어요"})})]})});eC.displayName="PickEventList";var eD=a(3453);let eA=[{id:"calendar",label:"주간 팝업 일정",Icon:er.Z},{id:"picks",label:"내가 찜한 팝업",Icon:eD.default,ActiveIcon:Q.default}];function eE(e){let{value:t,onChange:a}=e;return(0,i.jsx)("div",{className:"flex gap-1 rounded-[6px] bg-slate-200 p-1",children:eA.map(e=>{let n=t===e.id,s=n&&"ActiveIcon"in e?e.ActiveIcon:e.Icon;return(0,i.jsxs)("button",{id:"btn-history-mypick-view-toggle",type:"button",onClick:()=>a(e.id),className:(0,L.cn)("flex flex-1 items-center justify-center gap-1 rounded-[4px] py-1.5 pr-4 pl-3.5 text-xs leading-[1.3] font-medium transition-all",n?"bg-white text-slate-800 shadow-[0px_2px_8px_-4px_rgba(0,0,0,0.2)]":"text-slate-500"),children:[(0,i.jsx)(s,{className:(0,L.cn)("size-4",n&&"ActiveIcon"in e&&"text-primary")}),e.label]},e.id)})})}
1let eM={open:!1,step:"confirm",spotId:null,pickId:null,spotTitle:null,spotThumbnail:null},eO={2:"rookie",5:"mania"};function eR(e){let{open:t,onConfirmReview:a,onSkipReview:n,onClose:s}=e;return(0,i.jsx)(M.Vq,{open:t,onOpenChange:e=>!e&&s(),children:(0,i.jsxs)(M.cZ,{hideClose:!0,className:"mx-auto max-w-[328px] rounded-2xl border-0 p-0",children:[(0,i.jsxs)(M.fK,{className:"items-center gap-6 py-6",children:[(0,i.jsxs)(M.$N,{className:"text-center text-xl leading-[1.5] font-semibold text-slate-800",children:["팝업 방문 완료!",(0,i.jsx)("br",{}),"스탬프를 획득했어요"]}),(0,i.jsx)(eu,{size:"lg",className:"ml-[45px]"}),(0,i.jsx)(M.Be,{className:"text-center text-base leading-[1.3] text-slate-500",children:"오늘의 경험을 기록으로 완성할까요?"})]}),(0,i.jsxs)("div",{className:"flex gap-2.5 px-4 pb-5",children:[(0,i.jsx)(T.z,{id:"btn-history-mypick-visited-skip",variant:"ghost",className:"h-14 w-[110px] shrink-0 text-base leading-[1.3] font-medium text-slate-500 underline",onClick:n,children:"나중에"}),(0,i.jsx)(T.z,{id:"btn-history-mypick-visited-review",className:"bg-primary hover:bg-primary/90 h-14 flex-1 rounded-[6px] text-base leading-[1.3] font-medium text-white",onClick:a,children:"후기 남기기"})]})]})})}var eT=a(94730),eS=a(18416),ez=a(2744);let eP={rookie:{title:"팝업 루키",description:["3개만 더 모으면","다음 타이틀이에요!"]},mania:{title:"팝업 매니아",description:["이번 달 정복 완료!","당신의 기록을 응원해요"]}};function eI(e){let{open:t,onClose:a,variant:n}=e,{title:s,description:l}=eP[n],r="".concat(x()().year(),"년 ").concat(x()().month()+1,"월");return(0,i.jsx)(M.Vq,{open:t,onOpenChange:e=>!e&&a(),children:(0,i.jsxs)(M.PK,{children:[(0,i.jsx)(M.t9,{className:"max-w-mobile inset-auto top-1/2 left-1/2 h-full w-full -translate-x-1/2 -translate-y-1/2 overflow-hidden backdrop-blur-[3px] duration-300 [background:var(--bg-achievement-modal)] sm:h-[80vh] sm:rounded-3xl"}),(0,i.jsxs)(eT.VY,{className:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 z-dialog [pointer-events:auto!important] fixed top-1/2 left-1/2 flex w-auto max-w-none -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center gap-0 border-0 bg-transparent p-0 shadow-none duration-300 ease-out",children:[(0,i.jsxs)(M.TX,{children:[(0,i.jsxs)(M.$N,{children:[s," 타이틀 획득"]}),(0,i.jsx)(M.Be,{children:l.join(" ")})]}),(0,i.jsxs)("div",{className:"flex w-[318px] flex-col items-center gap-12",children:[(0,i.jsxs)("div",{className:"flex flex-col items-center gap-[38px]",children:[(0,i.jsx)("div",{className:"bg-primary rounded-full px-3.5 py-2",children:(0,i.jsx)("p",{className:"text-sm leading-[1.3] font-semibold text-white",children:r})}),(0,i.jsxs)("div",{className:"flex flex-col items-center text-center text-white",children:[(0,i.jsx)("p",{className:"font-paperozi text-[26px] leading-[1.25] font-light",children:"타이틀 획득!"}),(0,i.jsx)("p",{className:"font-paperozi text-[38px] leading-[1.25] font-medium",children:s})]})]}),(0,i.jsxs)("div",{className:"animate-in zoom-in-50 relative duration-300 ease-out",children:[(0,i.jsxs)("div",{className:"relative flex size-[121px] items-center justify-center rounded-full border-4 border-[#9593ff] bg-[#f7f7fe]",children:["mania"===n?(0,i.jsx)(eS.default,{className:"text-primary absolute top-[22px] size-[66px]"}):(0,i.jsx)(ez.Z,{className:"text-primary absolute top-[22px] size-[60px]"}),(0,i.jsx)("div",{className:"bg-primary absolute top-[calc(50%+49px)] left-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full px-[17px] py-1.5",children:(0,i.jsx)("p",{className:"text-[20px] leading-[1.3] font-medium whitespace-nowrap text-white",children:s})})]}),(0,i.jsx)(ea.default,{src:"/common/web/public/images/stamp/deco-top-left.svg",alt:"",width:26,height:25,className:"pointer-events-none absolute -top-3 -left-5"}),(0,i.jsx)(ea.default,{src:"/common/web/public/images/stamp/deco-bottom-right.svg",alt:"",width:26,height:25,className:"pointer-events-none absolute -right-8 -bottom-6"})]}),(0,i.jsxs)("div",{className:"flex flex-col items-center gap-12",children:[(0,i.jsx)("div",{className:"text-center text-base leading-[1.4] font-normal text-white",children:l.map(e=>(0,i.jsx)("p",{children:e},e))}),(0,i.jsx)("button",{type:"button",onClick:a,"aria-label":"닫기",className:"flex size-[46px] items-center justify-center rounded-full bg-white/20",children:(0,i.jsx)(S.default,{className:"size-6 text-white"})})]})]})]})]})})}let eZ=(0,b.default)(()=>a.e(2498).then(a.bind(a,62498)),{loadableGenerated:{webpack:()=>[62498]},ssr:!1});function eY(){var e,t,a,n,m,b,M,O,R,T,S,z,I,Z,L,K,U,F;let Q=(0,f.useQueryClient)(),{isAuthenticated:G}=(0,y.Z)((0,k.N)(e=>({isAuthenticated:e.isAuthenticated}))),H=(0,w.Z)(e=>e.hasHydrated),{showLoginModal:X}=(0,j.Z)(),J=(0,v.useRouter)(),ee=(0,v.usePathname)(),et=(0,v.useSearchParams)(),[ea,en]=(0,g.useState)("calendar"),[ei,es]=(0,g.useState)(E.R.ALL),[el,er]=(0,g.useState)(!1),[eo,ed]=(0,g.useState)(1),[ec,eu]=(0,g.useState)(!1),{modalState:ep,handleMarkVisited:ef,handleSkipReview:em,handleGoToReview:ex,handleReviewModalClose:eh,closeModal:ev,achievementModal:eg,closeAchievementModal:eb}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onVisitSuccess:t}=e,a=(0,f.useQueryClient)(),n=(0,y.Z)(e=>e.isAuthenticated),{showLoginModal:i}
1=(0,j.Z)(),{mutate:s,isPending:l}=(0,r.NT)(),[o,d]=(0,g.useState)(eM),[c,u]=(0,g.useState)(null),p=(0,g.useCallback)(e=>{let t=t=>t.pickId===e?{...t,isVisited:!0,visitedAt:new Date().toISOString()}:t;a.setQueriesData({queryKey:["picks-list"]},e=>{var a;return(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.content)?{...e,data:{...e.data,content:e.data.content.map(t)}}:e}),a.setQueriesData({queryKey:["picks-calendar"]},e=>e?{...e,data:{...e.data,content:e.data.content.map(t)}}:e)},[a]),m=(0,g.useCallback)((e,n)=>{var i,l;p(e);let r=["review","activity-stats"],o=null!==(l=null===(i=a.getQueryData(r))||void 0===i?void 0:i.monthlyVisitedCount)&&void 0!==l?l:0;s({spotId:n},{onSuccess:()=>{let n=o+1,i=a.getQueryData(r);if(i){var s;a.setQueryData(r,{...i,visitCount:(null!==(s=i.visitCount)&&void 0!==s?s:0)+1,monthlyVisitedCount:n})}null==t||t(e);let l=eO[n];l?u({open:!0,variant:l}):(0,C.qC)("방문 완료 스탬프를 ".concat(n,"개 모았어요!"),{duration:2e3,variant:"dark-blur"})},onError:()=>{a.invalidateQueries({queryKey:["picks-list"]}),a.invalidateQueries({queryKey:["picks-calendar"]})}})},[s,a,t,p]),x=(0,g.useCallback)((e,t,s,l,r)=>{var o,c;if(!1===n){(0,C.qC)("로그인하고 다녀온 팝업 스탬프를 모아보세요",{duration:2e3,variant:"dark-blur",action:{id:"btn-history-mypick-visited-login",label:"로그인",onClick:()=>i("history")}});return}!0===n&&(m(e,t),!r&&(eO[(null!==(c=null===(o=a.getQueryData(["review","activity-stats"]))||void 0===o?void 0:o.monthlyVisitedCount)&&void 0!==c?c:0)+1]||d({open:!0,step:"confirm",spotId:t,pickId:e,spotTitle:null!=s?s:null,spotThumbnail:null!=l?l:null})))},[n,a,m,i]),h=(0,g.useCallback)(()=>{d(eM)},[]),v=(0,g.useCallback)(()=>{h()},[h]),b=(0,g.useCallback)(()=>{d(e=>({...e,step:"review"}))},[]),w=(0,g.useCallback)(()=>{h()},[h]),N=(0,g.useCallback)(()=>{h()},[h]),k=(0,g.useCallback)(()=>{u(null)},[]);return(0,g.useMemo)(()=>({modalState:o,handleMarkVisited:x,handleSkipReview:v,handleGoToReview:b,handleReviewComplete:w,handleReviewModalClose:N,closeModal:h,isPending:l,achievementModal:c,closeAchievementModal:k}),[o,x,v,b,w,N,h,l,c,k])}(),ey=(0,g.useRef)(null),{handleTogglePick:ew,isPending:ej}=(0,o.V)({skipLoginCheck:!0,suppressRemoveToast:!0,onRemoveSuccess:(e,t)=>{let a=e=>{var a;return(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.content)?{...e,data:{...e.data,content:e.data.content.filter(e=>e.spotId!==t),...e.data.page&&{page:{...e.data.page,totalElements:Math.max(0,e.data.page.totalElements-1)}}}}:e};Q.setQueriesData({queryKey:["picks-list"]},a),Q.setQueriesData({queryKey:["picks-calendar"]},a),(0,C.qC)("찜이 삭제되었습니다",{duration:4e3,variant:"dark-blur",action:{id:"btn-history-mypick-unpick-undo",label:"되돌리기",onClick:()=>{ey.current({preventDefault:()=>{},stopPropagation:()=>{}},t,null)}}})},onAddSuccess:()=>{Q.invalidateQueries({queryKey:["picks-list"]}),Q.invalidateQueries({queryKey:["picks-calendar"]})}});(0,g.useEffect)(()=>{ey.current=ew},[ew]);let[eN,ek]=(0,g.useState)(null),[eD,eA]=(0,g.useState)(null),[eT,eS]=(0,g.useState)(null),ez=(0,g.useCallback)(()=>{ex(),ep.spotId&&ek(ep.spotId)},[ex,ep.spotId]),{share:eP}=(0,N.Z)(),eY=(0,g.useCallback)(e=>{eP({title:e.spotTitle,url:"".concat(window.location.origin).concat(h.Z.POPUP_DETAIL(e.spotId)),spotId:e.spotId})},[eP]),{dateRange:eL,updateDateRange:e_}=function(){let[e,t]=(0,g.useState)({startDate:x()(V.c3).day(1).format(V.zT.YYYYMMDD),endDate:x()(V.c3).day(7).format(V.zT.YYYYMMDD)}),a=(0,g.useCallback)(e=>{t({startDate:e.day(1).format(V.zT.YYYYMMDD),endDate:e.day(7).format(V.zT.YYYYMMDD)})},[]);return{dateRange:e,setDateRange:t,updateDateRange:a}}(),{selectedDayOfWeek:eV,handleDaySelection:eB,resetSelectedDay:eW}=function(){let[e,t]=(0,g.useState)(x()().day()),a=(0,g.useCallback)(a=>{e===a?t(null):t(a)},[e]),n=(0,g.useCallback)(()=>{t(null)},[]);return{selectedDayOfWeek:e,setSelectedDayOfWeek:t,handleDaySelection:a,resetSelectedDay:n}}(),{selectedEventsRef:eq,scrollToSelectedList:eK}=function(){let e=(0,g.useRef)(null),t=(0,g.useCallback)(()=>{let t=setTimeout(()=>{e.current&&e.current.scrollIntoView({behavior:"smooth"})},300);return()=>clearTimeout(t)},[]);return{selectedEventsRef:e,scrollToSelectedList:t}}(),{calendarRef:eU,handlePrevWeek:eF,handleNextWeek:eQ}=function(e){let{updateDateRange:t,resetSelectedDay:a}=e,n=(0,g.useRef)(null),i=(0,g.useCallback)(()=>
1{if(n.current){let e=n.current.getApi();e.prev(),t(x()(e.getDate())),a()}},[t,a]),s=(0,g.useCallback)(()=>{if(n.current){let e=n.current.getApi();e.next(),t(x()(e.getDate())),a()}},[t,a]);return{calendarRef:n,handlePrevWeek:i,handleNextWeek:s}}({updateDateRange:e_,resetSelectedDay:eW}),{data:eG}=(0,r.L8)({startDate:eL.startDate,endDate:eL.endDate,size:1e3},!0===G),{data:eH}=(0,r.b8)(!0===G),{data:e$}=(0,s.k6)({startDate:eL.startDate,endDate:eL.endDate,size:1e3},!1===G&&H),eX=(0,g.useMemo)(()=>({size:20,page:eo-1,runStatus:ei,...el?{visitedOnly:!0}:{}}),[eo,ei,el]),{data:eJ,isFetching:e0}=(0,r.ki)(eX,!0===G&&"picks"===ea),{data:e1,isFetching:e2}=(0,s.Iz)(eX,!1===G&&H&&"picks"===ea&&!el),{data:e5}=(0,s.Iz)({page:0,size:1,runStatus:E.R.ALL},!1===G&&H);(0,g.useEffect)(()=>{ed(1)},[ei,el]),(0,g.useEffect)(()=>{if("picks"!==et.get("segment"))return;let e=et.get("filter"),t="1"===et.get("visited");en("picks"),es(null!=e?e:E.R.ALL),er(t),ed(1),J.replace(ee,{scroll:!1}),eK()},[et,ee,J,eK]);let e4=(0,g.useCallback)(()=>{let e=x()(eL.startDate).add(1,"week"),t=x()(eL.startDate).subtract(1,"week"),a={startDate:e.format("YYYY-MM-DD"),endDate:e.add(6,"day").format("YYYY-MM-DD"),size:1e3},n=l.Z["picks-calendar"](a);Q.prefetchQuery({queryKey:n.queryKey,queryFn:n.queryFn});let i={startDate:t.format("YYYY-MM-DD"),endDate:t.add(6,"day").format("YYYY-MM-DD"),size:1e3},s=l.Z["picks-calendar"](i);Q.prefetchQuery({queryKey:s.queryKey,queryFn:s.queryFn})},[eL.startDate,Q]);(0,g.useEffect)(()=>{!0===G&&eG&&e4()},[G,eG,e4]);let e7=(0,g.useMemo)(()=>{var e;return(null==eG?void 0:null===(e=eG.data)||void 0===e?void 0:e.content)||[]},[null==eG?void 0:null===(e=eG.data)||void 0===e?void 0:e.content]),e6=!0===G?(null!==(L=null==eH?void 0:eH.pickCount)&&void 0!==L?L:0)>0:(null!==(K=null==e5?void 0:null===(a=e5.data)||void 0===a?void 0:null===(t=a.page)||void 0===t?void 0:t.totalElements)&&void 0!==K?K:0)>0,e3=(0,g.useMemo)(()=>{var e,t;return null!==(t=null==e1?void 0:null===(e=e1.data)||void 0===e?void 0:e.content)&&void 0!==t?t:[]},[null==e1?void 0:null===(n=e1.data)||void 0===n?void 0:n.content]),e8=null!==(U=null==e1?void 0:null===(b=e1.data)||void 0===b?void 0:null===(m=b.page)||void 0===m?void 0:m.totalPages)&&void 0!==U?U:1,e9=null!==(F=null==e1?void 0:null===(O=e1.data)||void 0===O?void 0:null===(M=O.page)||void 0===M?void 0:M.totalElements)&&void 0!==F?F:0,te=(0,g.useMemo)(()=>{var e,t;return!0===G?e7:null!==(t=null==e$?void 0:null===(e=e$.data)||void 0===e?void 0:e.content)&&void 0!==t?t:[]},[e7,null==e$?void 0:null===(R=e$.data)||void 0===R?void 0:R.content,G]),tt=(0,g.useMemo)(()=>{if(!0===G){var e,t;return null!==(t=null==eJ?void 0:null===(e=eJ.data)||void 0===e?void 0:e.content)&&void 0!==t?t:[]}return el?[]:e3},[e3,G,null==eJ?void 0:null===(T=eJ.data)||void 0===T?void 0:T.content,el]),ta=(0,g.useMemo)(()=>{if(!0===G){var e,t,a;return null!==(a=null==eJ?void 0:null===(t=eJ.data)||void 0===t?void 0:null===(e=t.page)||void 0===e?void 0:e.totalPages)&&void 0!==a?a:1}return el?1:e8},[e8,G,null==eJ?void 0:null===(z=eJ.data)||void 0===z?void 0:null===(S=z.page)||void 0===S?void 0:S.totalPages,el]),tn=(0,g.useMemo)(()=>{if(!0===G){var e,t,a;return null!==(a=null==eJ?void 0:null===(t=eJ.data)||void 0===t?void 0:null===(e=t.page)||void 0===e?void 0:e.totalElements)&&void 0!==a?a:0}return el?0:e9},[e9,G,null==eJ?void 0:null===(Z=eJ.data)||void 0===Z?void 0:null===(I=Z.page)||void 0===I?void 0:I.totalElements,el]),ti=(0,g.useMemo)(()=>!1===G&&("calendar"===ea?te.length>0:"picks"===ea&&!el&&tn>0),[te.length,G,tn,ea,el]),ts=(0,g.useCallback)((e,t)=>{var a;let n=null!==(a=te.find(e=>e.id===t))&&void 0!==a?a:tt.find(e=>e.id===t);n&&ew(e,n.spotId,t)},[te,tt,ew]),tl=(0,g.useCallback)((e,t,a)=>{if(a){eA(a);return}ek(t)},[]),tr=(0,g.useCallback)(e=>{eA(null),eS(e)},[]),to=(0,g.useCallback)((e,t,a,n,i)=>{ef(e,t,a,n,i)},[ef]),td=(0,g.useCallback)(e=>{eB(e),eK()},[eB,eK]),tc=(0,g.useMemo)(()=>(function(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e||[];return 0===n.length?a?[function(e){let t=x()(e.startDate).subtract(1,"day").format(V.zT.YYYYMMDD),a=x()(e.endDate).add(2,"day").format(V.zT.YYYYMMDD);return{id:"default-warning",title:B.WARNING,start:t,end:a,display:"block",classNames:["warning-event"]}}(t),...W(t,1)]:[function(e){let t=x()(e.startDate).subtract(1,"day").format(V.zT.YYYYMMDD),a=x()(e.endDate).add(2,"day").format(V.zT.YYYYMMDD);return{id:"default-desc",title:B.DESC,start:t,end:a,display:"block",classNames:["desc-event"]}}(t),...W(t,4)]:n.map((e,t)=>({id:"event-".concat(e.id),title:e.spotTitle,start:x()(e.spotOpenDate).toDate(),end:e.spotCloseDate?x()(e.spotCloseDate).add(1,"day").toDate():x()().add(50,"year").toDate(),display:"block",classNames:["popup-event"],extendedProps:{...e,_index:t}}))})(te,eL,e6),[te,eL,e6]),tu=(0,g.useMemo)(()=>"picks"===ea?tt:te?null===eV?te:te.filter(e=>{let t=x()(eL.startDate).day(0===eV?7:eV),a=x()(e.spotOpenDate);if(!e.spotCloseDate)return!t.isBefore(a,"day");let n=x()(e.spotCloseDate);return!t.isBefore(a,"day")&&!t.isAfter(n,"day")}):[],[ea,tt,te,eV,eL]),tp=(0,g.useMemo)(()=>"calendar"!==ea||null===eV?null:x()(eL.startDate).day(0===eV?7:eV),[ea,eV,eL.startDate]),tf=(0,g.useCallback)(e=>(0,i.jsx)($,{eventInfo:e,onAddButtonClick:()=>{!0===G?eu(!0):X("history")}}),[G,X]),tm=(0,g.useCallback)(e=>{let t=e.text,a=e.date.getDate(),n=e.date.getDay(),s=x()(e.date).isSame(x()(),"day");return(0,i.jsx)(_,{dayNumber:t,dayOfMonth:a,dayOfWeek:n,onClickDayHeader:td,isSelected:eV===n,isToday:s})},[eV,td]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(eE,{value:ea,onChange:en}),"calendar"===ea&&(0,i.jsxs)("div",{className:"h-full rounded-md border border-slate-200 bg-white px-2.5 py-5",children:[(0,i.jsx)(Y,{dateRange:eL,onPrevWeek:eF,onNextWeek:eQ}),(0,i.jsx)(p.Z,{ref:eU,themeSystem:"standard",plugins:[c.Z,u.ZP],initialView:"dayGridWeek",events:tc,firstDay:1,fixedWeekCount:!1,contentHeight:"auto",locale:d.Z,headerToolbar:!1,displayEventTime:!0,eventContent:tf,dayHeaderFormat:{weekday:"short"},dayHeaderContent:tm,dayCellClassNames:e=>eV===e.date.getDay()?"fc-day-selected":"",showNonCurrentDates:!1,titleFormat:{month:"numeric",day:"numeric"},eventOrder:q,eventOrderStrict:!0})]}),(0,i.jsx)(eC,{ref:eq,segment:ea,filter:ei,onFilterChange:es,visitedOnly:el,onVisitedOnlyChange:er,eventsToShow:tu,selectedDate:tp,onClickVisited:to,onClickReview:tl,onClickUnpick:ts,onClickShare:eY,disabledActions:ej,isLoading:"picks"===ea&&(!0===G?e0:e2),showGuestPickNotice:ti,page:eo,totalPages:ta,totalElements:tn,onPageChange:ed})]}),(0,i.jsx)(P,{isOpen:ec,onOpenChange:eu}),(0,i.jsx)(eR,{open:ep.open&&"confirm"===ep.step,onConfirmReview:ez,onSkipReview:em,onClose:ev}),(0,i.jsx)(D.Z,{spotId:null!=eN?eN:0,open:!!eN,isSignedInUser:!0===G,
1showTrigger:!1,setOpen:e=>{e||(ek(null),eh())}}),null!==eD&&(0,i.jsx)(A.default,{open:!0,reviewId:String(eD),hideViewAllReview:!0,onOpenChange:e=>{e||eA(null)},onClickModify:tr}),null!==eT&&(0,i.jsx)(eZ,{reviewId:eT,open:!0,setOpen:e=>{e||eS(null)}}),eg&&(0,i.jsx)(eI,{open:eg.open,variant:eg.variant,onClose:eb})]})}},74154:function(e,t,a){"use strict";a.d(t,{P:function(){return s},b:function(){return i}});var n=a(31585);let i=5,s=[{value:n.R.ALL,label:"전체"},{value:n.R.IN_PROGRESS,label:"예정\xb7운영"},{value:n.R.ENDED,label:"종료"}]},74394:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var n=a(57437),i=a(81718),s=a(8665);function l(e){let{className:t=""}=e;return(0,n.jsx)(s.default,{alt:"기본이미지",src:i.uF,width:200,height:140,priority:!0,className:"border-black-100 size-full rounded border object-cover object-center ".concat(t)})}},8665:function(e,t,a){"use strict";var n=a(57437),i=a(81718),s=a(33145),l=a(2265);let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.uF;if(!(null==e?void 0:e.trim()))return t;let a=e.toString();if(a.startsWith("https://")||a.startsWith("http://")||a.startsWith("blob:"))return a;let n="https://cdn.popga.co.kr";return n.endsWith("/")||a.startsWith("/")?n.concat(a):"".concat(n,"/").concat(a)},o=(0,l.memo)(function(e){let{src:t,defaultImage:a=i.uF,unoptimized:o=!0,...d}=e,[c,u]=(0,l.useState)(!1),p=c?a:r(t,a);return(0,l.useEffect)(()=>{u(!1)},[t]),(0,n.jsx)(s.default,{...d,src:p,onError:()=>{u(!0)},unoptimized:o,quality:d.quality||90})});t.default=o},92065:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return r}});var n=a(57437),i=a(2265),s=a(74291),l=a(94947);function r(e){let{open:t,onOpenChange:a,reviewId:r,hideViewAllReview:o=!1,onClickModify:d,showSpotActions:c=!1}=e,u=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{t?u.current||(window.history.pushState({modal:!0},""),u.current=!0):u.current=!1;let e=()=>{t&&(a(!1),u.current=!1)};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[t,a]),(0,n.jsx)(s.Vq,{open:t,onOpenChange:e=>{a(e)},children:(0,n.jsxs)(s.cZ,{hideClose:!0,className:"lg:data-[state=closed]:slide-out-to-left-0 lg:data-[state=closed]:slide-out-to-top-0 lg:data-[state=open]:slide-in-from-left-0 lg:data-[state=open]:slide-in-from-top-0 h-full max-h-[100dvh] w-full overflow-hidden overflow-y-auto bg-white p-0 md:max-h-[80dvh] lg:-right-[43px] lg:left-[43px] lg:mx-auto lg:h-auto lg:min-h-[410px] lg:w-fit lg:max-w-[750px] lg:min-w-[440px] lg:translate-x-0 lg:translate-y-[-50%] lg:rounded-lg lg:duration-0",onEscapeKeyDown:e=>{e.preventDefault(),a(!1)},children:[(0,n.jsxs)(s.fK,{className:"hidden",hidden:!0,children:[(0,n.jsx)(s.$N,{hidden:!0,className:"text-xl font-bold",children:"후기 상세 모달"}),(0,n.jsx)(s.Be,{hidden:!0,className:"text-black-900 text-base whitespace-pre-line",children:"후기 상세페이지 모달 입니다."})]}),(0,n.jsx)(l.default,{reviewId:r,onClose:()=>a(!1),hideViewAllReview:o,onClickModify:d,showSpotActions:c})]})})}},95671:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var n=a(57437),i=a(9522),s=a(54936);a(45671);var l=a(2265);function r(e){let{value:t,maxWidth:a=230,readOnly:r,onChange:o,activeFillColor:d="hsl(var(--primary))",inactiveFillColor:c="#CAD5E2"}=e,[u,p]=(0,l.useState)(!1),f=(0,l.useMemo)(()=>({itemShapes:(0,n.jsx)(s.Z,{}),activeFillColor:d,inactiveFillColor:c}),[d,c]);return((0,l.useEffect)(()=>{let e=requestAnimationFrame(()=>{p(!0)});return()=>cancelAnimationFrame(e)},[]),u)?(0,n.jsx)("div",{className:"flex flex-row items-center justify-center transition-opacity duration-200",style:{opacity:u?1:0,minHeight:10},children:(0,n.jsx)(i.iG,{id:"select-star-ratings-".concat(t),style:{maxWidth:a,width:a},itemStyles:f,value:t,onChange:o,spaceBetween:"none",readOnly:r})}):null}},75278:function(e,t,a){"use strict";a.d(t,{Z:function(){return D}});var n=a(57437),i=a(2265),s=a(64585),l=a(25379),r=a(27512),o=a(11092),d=a(29827),c=a(21220),u=a(98881),p=a(39799),f=a(95671),m=a(30767),x=a(12381);function h(e){let{open:t,onClickConfirm:a}=e;return(0,n.jsx)(m.aR,{open:t,children:(0,n.jsxs)(m._T,{className:"sm:max-w-mobile max-w-[90dvw] rounded-xl border-0 p-4 pt-6",children:[(0,n.jsxs)(m.fY,{children:[(0,n.jsx)(m.f$,{children:"이미 후기를 작성했어요"}),(0,n.jsx)(m.yT,{hidden:!0,children:"후기를 이미 작성한 팝업"})]}),(0,n.jsx)("p",{className:"text-center text-xs whitespace-pre-line",children:"하나의 플레이스 당 1번만 작성이 가능해요\n다른 곳도 후기를 남겨주세요 :)"}),(0,n.jsx)(m.xo,{children:(0,n.jsx)(m.OL,{asChild:!0,children:(0,n.jsx)(x.z,{id:"btn-confirm",type:"button",className:"bg-primary hover:bg-primary/85 h-auto w-full rounded-lg border-0 py-3.5 text-base font-semibold hover:text-white",onClick:a,children:"확인"})})})]})})}
1var v=a(74301),g=a(94825),b=a(74291),y=a(20418),w=a(30413),j=a(99376),N=a(8665);let k="/common/history-review-celebrate.webp";function C(e){let{open:t,isFirstReview:a,reviewCount:i,spotId:s,onOpenChange:l}=e,r=(0,j.useRouter)(),{openPopupDetail:o}=(0,w.Z)(),d=e=>{e.preventDefault(),e.stopPropagation(),l(!1)};return a?(0,n.jsx)(b.Vq,{open:t,onOpenChange:l,children:(0,n.jsxs)(b.cZ,{hideClose:!0,className:"max-w-[90dvw] gap-0 rounded-2xl p-0 sm:max-w-[356px]",children:[(0,n.jsxs)(b.fK,{className:"flex flex-col items-center gap-6 px-4 py-6",children:[(0,n.jsx)(b.$N,{className:"text-xl font-semibold text-slate-800",children:"이 팝업의 첫 후기에요!"}),(0,n.jsx)(N.default,{alt:"후기 작성 성공",src:k,width:159,height:156}),(0,n.jsx)(b.Be,{className:"text-center text-base leading-normal font-normal text-slate-500",children:"이 후기가 누군가의 선택에 도움이 돼요"})]}),(0,n.jsxs)(b.cN,{className:"flex flex-row items-start px-4 pb-5",children:[(0,n.jsx)(x.z,{id:"btn-close-result-review",variant:"ghost",className:"h-14 w-27.5 shrink-0 text-base font-medium text-slate-500 underline",onClick:d,children:"닫기"}),(0,n.jsx)(x.z,{id:"btn-go-to-popup",className:"bg-primary hover:bg-primary/90 h-14 w-full rounded-md text-base font-medium text-white",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!1),o(s)},children:"등록된 후기 확인하기"})]})]})}):(0,n.jsx)(b.Vq,{open:t,onOpenChange:l,children:(0,n.jsxs)(b.cZ,{hideClose:!0,className:"max-w-[90dvw] gap-0 rounded-2xl p-0 shadow-[0px_0px_20px_0px_rgba(18,18,18,0.4)] sm:max-w-89",children:[(0,n.jsxs)(b.fK,{className:"flex flex-col items-center gap-6 px-4 py-6",children:[(0,n.jsxs)(b.$N,{className:"text-center text-xl font-semibold text-slate-800",children:["축하해요! 나의"," ",(0,n.jsxs)("span",{className:"text-primary",children:[i,"번째"]})," 후기에요!"]}),(0,n.jsx)(N.default,{alt:"후기 히스토리",src:k,width:200,height:140}),(0,n.jsxs)(b.Be,{className:"text-center text-base leading-normal font-normal text-slate-500",children:["팝업 후기가 정상적으로 등록되었어요.",(0,n.jsx)("br",{}),"나의 후기 히스토리를 확인해 보세요."]})]}),(0,n.jsxs)(b.cN,{className:"flex flex-row items-start gap-2.5 px-4 pb-5",children:[(0,n.jsx)(x.z,{id:"btn-close-result-review",variant:"ghost",className:"h-14 w-27.5 shrink-0 text-base font-medium text-slate-500 underline",onClick:d,children:"닫기"}),(0,n.jsx)(x.z,{id:"btn-go-to-review-history",className:"bg-primary hover:bg-primary/90 h-14 flex-1 rounded-md text-base font-medium text-white",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!1),r.push(y.Z.HISTORY_MYPICKS_REVIEW)},children:"후기 히스토리 확인하기"})]})]})})}function D(e){var t,a,m,x,b,y,w,j,N,k,D,A,E,M,O,R;let{spotId:T,open:S,isSignedInUser:z,disabled:P=!1,showTrigger:I=!0,setOpen:Z}=e,Y=(0,d.useQueryClient)(),{showLoginModal:L}=(0,o.Z)(),_=(0,g.Z)(),[V,B]=(0,i.useState)(!1),[W,q]=(0,i.useState)(null),{data:K,isPending:U}=(0,s.L2)(Number(T),S),{data:F,isPending:Q}=(0,l.PB)(S&&z),{mutate:G}=(0,l.nJ)(),{mutate:H}=(0,l.Yy)(),[$,X]=(0,i.useState)(void 0),[J,ee]=(0,i.useState)(!1),et=(0,i.useRef)(S),ea=(0,i.useRef)(void 0),en=(0,i.useRef)(!1),ei=(0,i.useRef)(0),es=(0,i.useCallback)(()=>{ei.current+=1,ea.current=void 0,en.current=!1,ee(!1),X(void 0)},[]),el=(0,i.useCallback)(e=>{et.current=e,Z(e)},[Z]),er=e=>{H($,{onSuccess:()=>{el(!1),es(),_.resetForm()}}),e.preventDefault()},{resetForm:eo}=_;(0,i.useEffect)(()=>{et.current=S},[S]),(0,i.useEffect)(()=>{if(!S){eo(),es();return}if(!z){L("review"),el(!1);return}if(ea.current||en.current)return;let e=ei.current+1;ei.current=e,en.current=!0,ee(!0),G({spotId:Number(T)},{onSuccess:t=>{var a,n;if(ei.current===e&&et.current){if(en.current=!1,ee(!1),t.result.code===r.Ci.ALREADY_EXISTS_SPOT_REVIEW){B(!0);return}ea.current=null===(a=t.data)||void 0===a?void 0:a.id,X(null===(n=t.data)||void 0===n?void 0:n.id)}},onError:()=>{ei.current===e&&(en.current=!1,ee(!1))}})},[G,T,S,z,L,el,eo,es]);let ed=S&&z&&(J||!$);return(0,n.jsxs)(n.Fragment,{children:[I&&(0,n.jsx)("div",{className:P?"pointer-events-none opacity-50":"",children:(0,n.jsx)(f.Z,{value:0,onChange:e=>{_.setRating(e),el(!0)},maxWidth:200})}),(0,n.jsx)(v.Z,{open:S,onOpenChange:el,idPrefix:"write",topTitle:"MY 후기 작성",spot:{thumbnail:null==K?void 0:null===(a=K.data.data.files)||void 0===a?void 0:null===(t=a[0])||void 0===t?void 0:t.path,title:null!==(k=null==K?void 0:K.data.data.title)&&void 0!==k?k:"",periodType:null!==(D=null==K?void 0:K.data.data.periodType)&&void 0!==D?D:"IN_PROGRESS",category:null!==(A=null==K?void 0:null===(x=K.data.data.categories)||void 0===x?void 0:null===(m=x[0])||void 0===m?void 0:m.name)&&void 0!==A?A:void 0,area:null!==(E=null===(b=(null==K?void 0:null===(w=K.data)||void 0===w?void 0:null===(y=w.data)||void 0===y?void 0:y.roadAddress)||(null==K?void 0:null===(N=K.data)||void 0===N?void 0:null===(j=N.data)||void 0===j?void 0:j.address))||void 0===b?void 0:b.split(" ")[1])&&void 0!==E?E:""},rating:_.rating,onRatingChange:_.setRating,reviewText:_.reviewText,isInvalid:_.isInvalid,onChangeReviewText:_.handleOnChangeReviewText,setIsFocused:_.setIsFocused,previews:_.previews,isLoading:_.isLoading,itemId:null!=$?$:0,setPreviews:_.setPreviews,setServerPaths:_.setServerPaths,setIsLoading:_.setIsLoading,openErrorAlert:_.openErrorAlert,setOpenErrorAlert:_.setOpenErrorAlert,onClickRemoveFile:e=>{let t=_.previews.find(t=>
1t.id===e);(null==t?void 0:t.path.startsWith("blob:"))&&URL.revokeObjectURL(t.path);let a=_.previews.filter(t=>t.id!==e);_.setPreviews([...a]),_.setServerPaths(t=>{let a=new Map(t);return a.delete(e),a})},metrics:null!=F?F:[],selectedMetricIds:_.selectedMetricIds,onSelectMetric:_.handleOnSelectMetric,isButtonDisable:_.isButtonDisable,onClickSubmit:e=>{if(e.preventDefault(),!$)return;let t=Array.from(_.serverPaths.values());if((0,u.RK)(t,$)){(0,c.qC)("이미지를 다시 첨부한 뒤 등록해 주세요.",{variant:"destructive",duration:2e3});return}_.updateReview({id:$,params:{score:_.rating,content:_.reviewText,selectedMetricIds:_.selectedMetricIds,files:t.map(e=>({path:e})),deletedFileIds:[]}},{onSuccess:e=>{el(!1),es(),q({isFirstReview:e.isFirstReview,reviewCount:e.reviewCount,spotId:T}),Y.invalidateQueries({queryKey:["spot-reviews"]}),Y.invalidateQueries({queryKey:["review"]}),Y.invalidateQueries({queryKey:["picks-list"]}),Y.invalidateQueries({queryKey:["picks-calendar"]}),Y.setQueryData(p.a["mypage-summary"](),e=>e?{...e,review:{...e.review,writableCount:Math.max(0,e.review.writableCount-1)}}:e),Y.setQueryData(p.a["mypage-review-targets"](),e=>e?e.filter(e=>e.spotId!==T):e)},onError:()=>{(0,c.qC)("후기 등록에 실패했습니다. 잠시 후 다시 시도해 주세요.",{variant:"destructive",duration:2e3})}})},onClickClose:_.handleOnClickClose,onClickExit:er,openEditingReviewAlert:_.openEditingReviewAlert,setOpenEditingReviewAlert:_.setOpenEditingReviewAlert,isDataLoading:U||Q||ed}),(0,n.jsx)(h,{open:V,onClickConfirm:e=>{e.preventDefault(),B(!1),er(e)}}),(0,n.jsx)(C,{open:null!==W,isFirstReview:null!==(M=null==W?void 0:W.isFirstReview)&&void 0!==M&&M,reviewCount:null!==(O=null==W?void 0:W.reviewCount)&&void 0!==O?O:0,spotId:null!==(R=null==W?void 0:W.spotId)&&void 0!==R?R:0,onOpenChange:e=>{e||q(null)}})]})}},41462:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var n=a(57437),i=a(93448);function s(){let{className:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,n.jsx)("div",{className:(0,i.cn)("spinner size-14 animate-spin rounded-full",e)})}},30767:function(e,t,a){"use strict";a.d(t,{OL:function(){return g},_T:function(){return f},aR:function(){return d},f$:function(){return h},fY:function(){return m},le:function(){return b},vW:function(){return c},xo:function(){return x},yT:function(){return v}});var n=a(57437),i=a(2265),s=a(40671),l=a(93448),r=a(12381),o=a(96488);let d=s.fC,c=s.xz,u=s.h_,p=i.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,n.jsx)(s.aV,{className:(0,l.cn)("bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 z-popover [pointer-events:auto!important] fixed inset-0",a),...i,ref:t})});p.displayName=s.aV.displayName;let f=i.forwardRef((e,t)=>{let{className:a,overlayClassName:i,...r}=e;return(0,n.jsxs)(u,{children:[(0,n.jsx)(p,{className:i}),(0,n.jsx)(s.VY,{ref:t,className:(0,l.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 z-select [pointer-events:auto!important] fixed top-[50%] left-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-5 border p-6 shadow-lg duration-300 ease-in-out",a),...r,onCloseAutoFocus:e=>{e.preventDefault(),(0,o.K)()}})]})});f.displayName=s.VY.displayName;let m=e=>{let{className:t,...a}=e;return(0,n.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-5 text-center",t),...a})};m.displayName="AlertDialogHeader";let x=e=>{let{className:t,...a}=e;return(0,n.jsx)("div",{className:(0,l.cn)("flex flex-row items-center gap-2",t),...a})};x.displayName="AlertDialogFooter";let h=i.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,n.jsx)(s.Dx,{ref:t,className:(0,l.cn)("text-sm font-semibold",a),...i})});h.displayName=s.Dx.displayName;let v=i.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,n.jsx)(s.dk,{ref:t,className:(0,l.cn)("text-black-900 text-xs",a),...i})});v.displayName=s.dk.displayName;let g=i.forwardRef((e,t)=>
1{let{className:a,...i}=e;return(0,n.jsx)(s.aU,{ref:t,className:(0,l.cn)((0,r.d)(),a),...i})});g.displayName=s.aU.displayName;let b=i.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,n.jsx)(s.$j,{ref:t,className:(0,l.cn)((0,r.d)({variant:"outline"}),"mt-2 sm:mt-0",a),...i})});b.displayName=s.$j.displayName},12381:function(e,t,a){"use strict";a.d(t,{d:function(){return o},z:function(){return d}});var n=a(57437),i=a(2265),s=a(98482),l=a(77712),r=a(93448);let o=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-base font-normal ring-offset-background transition-colors focus-visible:outline-hidden disabled:pointer-events-none box-border",{variants:{variant:{default:"bg-black-800 text-primary-foreground hover:bg-black-800/90 border border-transparent disabled:opacity-50",solid:"bg-primary text-primary-foreground font-semibold hover:bg-primary/90 border border-transparent disabled:rounded-lg disabled:border disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400 disabled:opacity-100 disabled:font-medium",destructive:"bg-destructive text-destructive-foreground hover:bg-primary/5 border border-transparent disabled:opacity-50","primary-outline":"border border-primary text-primary bg-background hover:bg-accent disabled:opacity-50",outline:"border border-slate-300 bg-white text-slate-500 font-medium hover:bg-slate-50 disabled:bg-slate-200 disabled:text-slate-400",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 border border-transparent disabled:opacity-50",ghost:"hover:bg-accent hover:text-accent-foreground border border-transparent disabled:opacity-50",link:"text-primary underline-offset-2 hover:underline border border-transparent disabled:opacity-50",cancel:"text-slate-500 font-medium underline underline-offset-4 border border-transparent hover:text-slate-700 disabled:opacity-50"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10",cta:"size-full rounded-lg py-4.5"}},defaultVariants:{variant:"default",size:"default"}}),d=i.forwardRef((e,t)=>{let{className:a,variant:i,size:l,asChild:d=!1,...c}=e,u=d?s.g7:"button";return(0,n.jsx)(u,{className:(0,r.cn)(o({variant:i,size:l,className:a})),ref:t,...c})});d.displayName="Button"},68245:function(e,t,a){"use strict";a.d(t,{X:function(){return o}});var n=a(57437),i=a(2265),s=a(9270),l=a(17732),r=a(93448);let o=i.forwardRef((e,t)=>{let{className:a,showIndicator:i,indicatorClassName:o,...d}=e;return(0,n.jsx)(s.fC,{ref:t,className:(0,r.cn)("peer border-primary data-[state=checked]:fill-black-200 flex h-6 w-6 shrink-0 items-center justify-center rounded-sm border focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",a),...d,children:(0,n.jsx)(s.z$,{className:"flex flex-col items-center text-current",forceMount:i,children:(0,n.jsx)(l.Z,{className:(0,r.cn)("size-6",o)})})})});o.displayName=s.fC.displayName},35174:function(e,t,a){"use strict";a.d(t,{$0:function(){return f},Dj:function(){return m},dN:function(){return p},kN:function(){return u},ng:function(){return d},nt:function(){return c},tl:function(){return o}});var n=a(57437),i=a(2265),s=a(96996),l=a(31472),r=a(93448);function o(e){let{className:t,...a}=e;return(0,n.jsx)("nav",{role:"navigation","aria-label":"pagination",className:(0,r.cn)("mx-auto flex w-full justify-center",t),...a})}let d=i.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,n.jsx)("ul",{ref:t,className:(0,r.cn)("flex items-center gap-[11px]",a),...i})});d.displayName="PaginationContent";let c=i.forwardRef((e,t)=>{let{className:a,...i}=e;return(0,n.jsx)("li",{ref:t,className:(0,r.cn)("",a),...i})});function u(e){let{className:t,isActive:a,...i}=e;return(0,n.jsx)("button",{type:"button","aria-current":a?"page":void 0,className:(0,r.cn)("flex size-9 cursor-pointer items-center justify-center rounded-md text-sm leading-normal font-normal transition-colors disabled:cursor-not-allowed disabled:opacity-30",a?"bg-slate-600 text-white":"border border-slate-300 bg-white text-slate-700 hover:bg-slate-50",t),...i})}function p(e){let{className:t,...a}=e;return(0,n.jsx)("button",{type:"button","aria-label":"이전 페이지",className:(0,r.cn)("flex size-9 cursor-pointer items-center justify-center rounded-md bg-slate-200 text-slate-700 transition-colors hover:bg-slate-300 disabled:cursor-not-allowed disabled:opacity-30",t),...a,children:(0,n.jsx)(s.Z,{className:"size-6"})})}function f(e){let{className:t,...a}=e;return(0,n.jsx)("button",{type:"button","aria-label":"다음 페이지",className:(0,r.cn)("flex size-9 cursor-pointer items-center justify-center rounded-md bg-slate-200 text-slate-700 transition-colors hover:bg-slate-300 disabled:cursor-not-allowed disabled:opacity-30",t),...a,children:(0,n.jsx)(l.Z,{className:"size-6"})})}function m(e){let{className:t,...a}=e;
1return(0,n.jsxs)("span",{"aria-hidden":!0,className:(0,r.cn)("flex size-9 items-center justify-center text-slate-400",t),...a,children:[(0,n.jsx)("span",{className:"text-sm",children:"..."}),(0,n.jsx)("span",{className:"sr-only",children:"More pages"})]})}c.displayName="PaginationItem"},98857:function(e,t,a){"use strict";a.d(t,{N:function(){return l}});var n=a(2265),i=a(27512),s=a(28682);let l=()=>{let[e,t]=(0,n.useState)({deviceType:"other",osName:"",isLoading:!0,isPc:!1,isMobile:!1,isTablet:!1,isWeb:!1,platform:void 0});(0,n.useEffect)(()=>{(()=>{try{let e;let{deviceType:a,osName:n,isPc:i,isMobile:s,isTablet:l}=function(){if("undefined"==typeof navigator)return{deviceType:"other",osName:"",isPc:!1,isMobile:!1,isTablet:!1};let e=navigator.userAgent,t="number"==typeof navigator.maxTouchPoints?navigator.maxTouchPoints:0,a=/iPad/.test(e)||/Macintosh/.test(e)&&t>1,n=/iPhone|iPod/.test(e),i=a||n,s=/Android/.test(e),l=s&&!/Mobile/.test(e),r="";i?r="iOS":s?r="Android":/Windows/.test(e)?r="Windows":/Mac OS X|Macintosh/.test(e)?r="macOS":/Linux|X11/.test(e)&&(r="Linux");let o=i||s,d="other";return i?d="ios":s?d="android":o||(d="pc"),{deviceType:d,osName:r,isPc:"pc"===d,isMobile:o,isTablet:a||l}}(),r=!0;{let{deviceInfo:t}=window;e=null==t?void 0:t.platform,r=!t}t({deviceType:a,osName:n,isLoading:!1,isPc:i,isMobile:s,isTablet:l,isWeb:r,platform:e})}catch(e){t(e=>({...e,isLoading:!1}))}})()},[]);let a=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.Ry.APPLE_NEW,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Ry.GOOGLE,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"https://popga.co.kr";switch(e.deviceType){case"ios":return t;case"android":return a;default:return n}},l=(0,n.useCallback)(()=>{switch((0,s.oh)()){case"android":window.location.href=i.Ry.GOOGLE;break;case"ios":window.location.href=i.Ry.APPLE_NEW;break;default:e.isWeb&&(window.location.href="https://popga.co.kr")}},[e.isWeb]);return{...e,getStoreUrl:a,redirectToStore:(e,t,n)=>{window.location.href=a(e,t,n)},onClickDownloadMobileApp:l}}},11092:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var n=a(2265),i=a(77248),s=a(30755),l=a(94014);function r(){let{openLoginModal:e,closeLoginModal:t}=(0,i.Z)((0,s.N)(e=>({openLoginModal:e.openLoginModal,closeLoginModal:e.closeLoginModal})));return{showLoginModal:(0,n.useCallback)(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";{let e=window.location.pathname+window.location.search;(0,l.setOriginReferer)(e)}e(t)},[e]),hideLoginModal:(0,n.useCallback)(()=>{t()},[t])}}},72766:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var n=a(2265),i=a(98857),s=a(29844),l=a(24284);function r(e){let{lat:t,lng:a,name:r,spotId:o}=e,{isWeb:d,deviceType:c,isMobile:u,isTablet:p}=(0,i.N)(),{mutate:f}=(0,s.im)(),m=(0,n.useCallback)(e=>"nmap://route?dlat=".concat(t,"&dlng=").concat(a,"&dname=").concat(e,"&appname=popga"),[t,a]),x=(0,n.useCallback)(e=>"https://map.naver.com/p?title=".concat(e,"&lat=").concat(t,"&lng=").concat(a),[t,a]),h=(0,n.useCallback)((e,t)=>{(0,l.XY)(m(e),x(e),t)},[m,x]),v=(0,n.useCallback)(e=>h(e,5e3),[h]),g=(0,n.useCallback)(e=>h(e,3e3),[h]),b=(0,n.useCallback)(e=>{let t=x(e);window.open(t,"_blank")},[x]),y=(0,n.useCallback)(()=>{var e;let t=JSON.stringify({type:"open-naver-map",payload:{url:m(encodeURIComponent(r))}});null===(e=window.ReactNativeWebView)||void 0===e||e.postMessage(t)},[m,r]);return{handleClickGetDirections:(0,n.useCallback)(()=>{if(f(o),!d){y();return}let e=encodeURIComponent(r);if(u||p)switch(c){case"android":v(e);break;case"ios":g(e);break;default:b(e)}else b(e)},[d,u,p,c,r,y,v,g,b,f,o])}}},87306:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var n=a(77248);function i(){let e=(0,n.Z)(e=>e.isAuthenticated);return!1===e?"guest":!0===e?"member":void 0}},30413:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var n=a(99376),i=a(20418),s=a(98857);function l(){let e=(0,n.useRouter)(),{isMobile:t}=(0,s.N)();return{openPopupDetail:(a,n)=>{n&&n(),t?e.push(i.Z.POPUP_DETAIL(a)):window.open(i.Z.POPUP_DETAIL(a),"_blank","noopener")}}}},44769:function(e,t,a){"use strict";var n=a(2265),i=a(77248),s=a(65206),l=a(21220),r=a(29844),o=a(98857);t.Z=function(){let{deviceInfo:e}=(0,i.Z)(),{isWeb:t}
1=(0,o.N)(),[a,d]=(0,n.useState)({open:!1,shareUrl:""}),{mutate:c}=(0,r.Mq)(),u=(0,n.useCallback)(async e=>{await navigator.clipboard.writeText(e),(0,l.qC)("링크가 복사되었습니다.",{duration:2e3})},[]),p=(0,n.useCallback)(e=>{d({open:!0,shareUrl:e})},[]),f=(0,n.useCallback)(()=>{d({open:!1,shareUrl:""})},[]);return{share:(0,n.useCallback)(async a=>{let{title:n,text:i,url:l,spotId:r}=a;r&&c(r);try{if(!/android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())){u(l);return}let a=!t&&/android/i.test(navigator.userAgent.toLowerCase());if(a&&e&&(0,s.K_)(e.appVersion,"2.0.9")){p(l);return}if(a&&window.ReactNativeWebView){var o;null===(o=window.ReactNativeWebView)||void 0===o||o.postMessage(JSON.stringify({event:"social_share",payload:{title:"".concat(n," | 팝가 "),text:null!=i?i:"",url:l}}))}else navigator.share?await navigator.share({title:"".concat(n," | 팝가 "),text:null!=i?i:"",url:l}):u(l)}catch(e){console.log(e)}},[t,e,u,p,c]),shareModal:a,closeUpdateModal:f}}},29844:function(e,t,a){"use strict";a.d(t,{JO:function(){return h},im:function(){return m},Mq:function(){return x}});var n=a(21770),i=a(77429),s=a(44950),l=a(90773);async function r(e,t){if(Number.isNaN(e))return;let a=(0,l.LA)(await (0,s.ZP)()),n=await (0,i.Z)(),r={"Content-Type":"application/json",...a,...n&&{Authorization:"Bearer ".concat(n)}};try{await fetch("".concat("https://api.popga.co.kr/user","/v1/logs/spots/").concat(e).concat(t),{method:"POST",headers:r})}catch(e){}}async function o(e){await r(e,"/directions")}async function d(e){await r(e,"/share")}async function c(e){if(Number.isNaN(e))return;let t=(0,l.LA)(await (0,s.ZP)()),a=await (0,i.Z)(),n={"Content-Type":"application/json",...t,...a&&{Authorization:"Bearer ".concat(a)}};try{await fetch("".concat("https://api.popga.co.kr/user","/v1/logs/magazines/").concat(e),{method:"POST",headers:n})}catch(e){}}var u=()=>({mutationFn:e=>o(e)}),p=()=>({mutationFn:e=>d(e)}),f=()=>({mutationFn:e=>c(e)});function m(){return(0,n.useMutation)(u())}function x(){return(0,n.useMutation)(p())}function h(){return(0,n.useMutation)(f())}},96488:function(e,t,a){"use strict";a.d(t,{K:function(){return n}});let n=()=>{"none"===document.body.style.pointerEvents&&(document.body.style.pointerEvents="")}},24284:function(e,t,a){"use strict";a.d(t,{Mi:function(){return i},N3:function(){return n},XY:function(){return s}});let n="popga_previous_url";function i(e){let{router:t,fallbackPath:a,previousUrl:i}=e,s=window.history.length>1,l=void 0!==i?i:sessionStorage.getItem(n),r=window.location.origin;if(!s||!l){t.replace(a);return}try{if(new URL(l).origin!==r){t.replace(a);return}}catch(e){t.replace(a);return}t.back()}function s(e,t,a){let n=!1,i=()=>{document.hidden&&(n=!0)};document.addEventListener("visibilitychange",i),window.location.href=e,setTimeout(()=>{document.removeEventListener("visibilitychange",i),n||window.open(t,"_blank")},a)}},46494:function(e,t,a){"use strict";function n(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let a=[];if(e<=4){for(let e=1;e<=5;e+=1)a.push(e);a.push("...",t)}else if(e>=t-3){a.push(1,"...");for(let e=t-4;e<=t;e+=1)a.push(e)}else{a.push(1,"...");for(let t=e-1;t<=e+1;t+=1)a.push(t);a.push("...",t)}return a}a.d(t,{k:function(){return n}})},69622:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var n=a(71096),i=a.n(n);function s(e,t){let a=i()().startOf("day"),n=i()(e).startOf("day");if(a.isBefore(n))return"READY";if(t){let e=i()(t).startOf("day");if(a.isAfter(e))return"ENDED"}return"IN_PROGRESS"}},65206:function(e,t,a){"use strict";a.d(t,{K_:function(){return s}});let n=e=>e.split(".").map(e=>parseInt(e,10)||0),i=(e,t)=>{let a=n(e),i=n(t),s=Math.max(a.length,i.length);for(let e=0;e<s;e++){let t=a[e]||0,n=i[e]||0;if(t<n)return -1;if(t>n)return 1}return 0},s=(e,t)=>0>i(e,t)},96566:function(){}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.