@pop-ui/core 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.umd.cjs CHANGED
@@ -1,6 +1,6 @@
1
- (function(D,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("@mantine/core"),require("@mantine/dates"),require("@pop-ui/foundation"),require("dayjs"),require("dayjs/locale/ko.js"),require("react"),require("dayjs/plugin/customParseFormat.js"),require("@dnd-kit/core"),require("@dnd-kit/sortable"),require("@mantine/dropzone"),require("react-easy-crop"),require("@dnd-kit/utilities"),require("lottie-react"),require("@mantine/notifications")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","@mantine/dates","@pop-ui/foundation","dayjs","dayjs/locale/ko.js","react","dayjs/plugin/customParseFormat.js","@dnd-kit/core","@dnd-kit/sortable","@mantine/dropzone","react-easy-crop","@dnd-kit/utilities","lottie-react","@mantine/notifications"],s):(D=typeof globalThis<"u"?globalThis:D||self,s(D.Core={},D.jsxRuntime,D.MantineCore,D.dates,D.foundation,D.dayjs,null,D.React,D.customParseFormat,D.core$1,D.sortable,D.dropzone,D.Cropper,D.utilities,D.Lottie,D.notifications))})(this,function(D,s,P,me,f,Y,pr,h,nt,ee,te,he,ot,Be,at,le){"use strict";const st={sm:14,md:16,lg:18},V={Button:"styles-module__Button___7ywU9",Button__Inner:"styles-module__Button__Inner___s7vuY",Button__Label:"styles-module__Button__Label___xnZNh",Button__Section:"styles-module__Button__Section___7GPRl",Button__Loader:"styles-module__Button__Loader___AZg1v","Button--Small":"styles-module__Button--Small___9VzCE","Button--Medium":"styles-module__Button--Medium___35lhd","Button--Large":"styles-module__Button--Large___fbUio","Button--Primary":"styles-module__Button--Primary___1ZKgs",Button__Disabled:"styles-module__Button__Disabled___NUWy8","Button--PrimaryLine":"styles-module__Button--PrimaryLine___76iyF","Button--Basic":"styles-module__Button--Basic___sWKzj","Button--Warning":"styles-module__Button--Warning___8gZ6-","Button--Setting":"styles-module__Button--Setting___KNjZA","Button--Danger":"styles-module__Button--Danger___m9tbm","Button--Ghost":"styles-module__Button--Ghost___-zzS-"},fe={inner:V.Button__Inner,label:V.Button__Label,section:V.Button__Section,loader:V.Button__Loader},lt={sm:V["Button--Small"],md:V["Button--Medium"],lg:V["Button--Large"]},it={primary:V["Button--Primary"],primaryLine:V["Button--PrimaryLine"],basic:V["Button--Basic"],danger:V["Button--Danger"],setting:V["Button--Setting"],warning:V["Button--Warning"],ghost:V["Button--Ghost"]},ct=(...e)=>e.filter(Boolean).join(" ")||void 0,_t=e=>{const r=(n,t)=>{const o=Object.keys(n).reduce((l,a)=>{const i=a,c=[n[i],t[i]].filter(Boolean).join(" ");return c&&(l[i]=c),l},{});return Object.keys(t).forEach(l=>{const a=l;!(a in n)&&t[a]&&(o[a]=t[a])}),o};return typeof e=="function"?(n,t,o)=>r(fe,e(n,t,o)):typeof e=="object"&&e!==null&&!Array.isArray(e)?r(fe,e):fe};function ie({children:e,size:r="md",variant:n="primary",type:t="button",isLoading:o=!1,loading:l=!1,hideLabelOnLoading:a=!0,disabled:i=!1,className:c,classNames:m,loaderProps:u,..._}){const p=st[r],d=o||l,g=i||d;return s.jsxs(P.Button,{type:t,unstyled:!0,className:ct(V.Button,i?V.Button__Disabled:"",lt[r],it[n],c),classNames:_t(m),disabled:g,..._,children:[d&&s.jsx(P.Loader,{color:"currentColor",size:p,...u}),s.jsx("span",{className:V.Button__Label,children:d&&a?null:e})]})}const ge={"Checkbox--Small":"styles-module__Checkbox--Small___VZGlw","Checkbox--Medium":"styles-module__Checkbox--Medium___Vwpa3","Checkbox--Large":"styles-module__Checkbox--Large___ybTGE"},dt={sm:ge["Checkbox--Small"],md:ge["Checkbox--Medium"],lg:ge["Checkbox--Large"]},ut={sm:18,md:24,lg:32},pt=({size:e="md",...r})=>{const n=dt[e],t=ut[e];return s.jsx(P.Checkbox,{className:n,size:e,styles:{inner:{width:t,height:t}},...r})},K={CalendarDatePicker__Wrapper:"styles-module__CalendarDatePicker__Wrapper___n4ux3",CalendarDatePicker__DayContent:"styles-module__CalendarDatePicker__DayContent___2xr8Q",CalendarDatePicker__DayLabel:"styles-module__CalendarDatePicker__DayLabel___-4E1W",CalendarDatePicker__TodayIndicator:"styles-module__CalendarDatePicker__TodayIndicator___ij6hs",CalendarDatePicker__Day:"styles-module__CalendarDatePicker__Day___eYyiw",CalendarDatePicker__Header:"styles-module__CalendarDatePicker__Header___hGYbK",CalendarDatePicker__HeaderLevel:"styles-module__CalendarDatePicker__HeaderLevel___yuhOQ",CalendarDatePicker__HeaderControl:"styles-module__CalendarDatePicker__HeaderControl___gz5tC",CalendarDatePicker__HeaderControlIcon:"styles-module__CalendarDatePicker__HeaderControlIcon___OVuQp",CalendarDatePicker__Month:"styles-module__CalendarDatePicker__Month___8-Nvy",CalendarDatePicker__MonthRow:"styles-module__CalendarDatePicker__MonthRow___PihZV",CalendarDatePicker__MonthCell:"styles-module__CalendarDatePicker__MonthCell___bEPui",CalendarDatePicker__WeekdaysRow:"styles-module__CalendarDatePicker__WeekdaysRow___lbdgy",CalendarDatePicker__Weekday:"styles-module__CalendarDatePicker__Weekday___-Seq9"},mt=({excludedDays:e=[],excludedDates:r=[]})=>{const n=[],t=[];for(const a of r)typeof a=="string"?n.push(a):t.push(a);const o=n.map(a=>Y(a)).filter(a=>a.isValid()).map(a=>a.format("YYYY-MM-DD")),l=t.map(([a,i])=>[Y(a),Y(i)]).filter(([a,i])=>a.isValid()&&i.isValid());return a=>{const i=Y(a);if(!i.isValid())return!1;if(Array.isArray(e)&&e.includes(i.day())||o.includes(i.format("YYYY-MM-DD")))return!0;for(const[c,m]of l)if((i.isSame(c,"day")||i.isAfter(c,"day"))&&(i.isSame(m,"day")||i.isBefore(m,"day")))return!0;return!1}},ht=(e,r,n,t)=>{const o=Y(e),l=Y(r);for(const a of n)if(Array.isArray(a)){const i=Y(a[0]),c=Y(a[1]);if(!i.isValid()||!c.isValid())continue;if(!(l.isBefore(i,"day")||o.isAfter(c,"day")))return!0}for(const a of n)if(typeof a=="string"){const i=Y(a);if(!i.isValid())continue;if((i.isSame(o,"day")||i.isAfter(o,"day"))&&(i.isSame(l,"day")||i.isBefore(l,"day")))return!0}if(t.length>0){let a=o;for(;a.isBefore(l,"day")||a.isSame(l,"day");){if(t.includes(a.day()))return!0;a=a.add(1,"day")}}return!1},ne=(e="default")=>{switch(e){case"range":return[null,null];case"multiple":return[];default:return null}},Le=(e="default",r)=>r==null?ne(e):e==="range"?Array.isArray(r)?r:ne("range"):e==="multiple"?Array.isArray(r)?r:ne("multiple"):Array.isArray(r)?r[0]??null:r,ve=({type:e,externalValue:r,internalValue:n})=>r!==void 0?Le(e,r):n!==void 0?Le(e,n):ne(e),ye=(e,r)=>{const n=(t,o)=>{const l=Object.keys(t).reduce((a,i)=>{const c=i,m=t[c],u=o[c],_=[m,u].filter(Boolean).join(" ");return _&&(a[c]=_),a},{});return Object.keys(o).forEach(a=>{const i=a,c=o[i];!(i in t)&&c&&(l[i]=c)}),l};return typeof r=="function"?(t,o,l)=>n(e,r(t,o,l)):typeof r=="object"&&r!==null&&!Array.isArray(r)?n(e,r):e},ft=e=>{if(e==null)return null;if(Array.isArray(e)){for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(n instanceof Date)return Y(n).format("YYYY-MM-DD")}return null}return e instanceof Date?Y(e).format("YYYY-MM-DD"):null},gt={levelsGroup:K.CalendarDatePicker__Wrapper,calendarHeader:K.CalendarDatePicker__Header,calendarHeaderLevel:K.CalendarDatePicker__HeaderLevel,calendarHeaderControl:K.CalendarDatePicker__HeaderControl,calendarHeaderControlIcon:K.CalendarDatePicker__HeaderControlIcon,month:K.CalendarDatePicker__Month,monthCell:K.CalendarDatePicker__MonthCell,day:K.CalendarDatePicker__Day,monthRow:K.CalendarDatePicker__MonthRow,weekdaysRow:K.CalendarDatePicker__WeekdaysRow,weekday:K.CalendarDatePicker__Weekday},Ee=({excludedDates:e=[],excludedDays:r=[],type:n="default",value:t,onChange:o,highlightToday:l=!1,...a})=>{const{classNames:i,date:c,defaultDate:m,onDateChange:u,getDayProps:_,...p}=a,[d,g]=h.useState(()=>t??ne(n)),[y,C]=h.useState(()=>c||m||(ft(t??ne(n))??new Date)),k=h.useMemo(()=>mt({excludedDays:r,excludedDates:e}),[r,e]),x=h.useCallback(S=>{c===void 0&&C(S),u?.(S)},[c,u]),b=S=>{if(n==="range"&&Array.isArray(S)&&S.length===2){const[N,F]=S;if(N&&F&&ht(N,F,e,r)){const w=ne("range");g(w),o?.(w);return}}g(S),o?.(S)},W=ve({type:n,externalValue:t,internalValue:d}),O=h.useCallback(S=>{const N=Y(S).date(),w=Y(S).isSame(Y(),"day")&&l;return s.jsxs("span",{className:K.CalendarDatePicker__DayContent,children:[s.jsx("span",{className:K.CalendarDatePicker__DayLabel,children:N}),w&&s.jsx("span",{className:K.CalendarDatePicker__TodayIndicator,children:"오늘"})]})},[l]),j=ye(gt,i),Z=c??y,E=Y(Z??new Date).format("YYYY-MM"),I=h.useCallback(S=>{const N=_?.(S)??{},F=Y(S).format("YYYY-MM")!==E;return{...N,onClick:w=>{N.onClick?.(w),F&&x(S)}}},[E,_,x]);return s.jsx(me.DatePicker,{locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 M월",maxLevel:"month",type:n,previousIcon:s.jsx(f.IconChevronLeft,{}),nextIcon:s.jsx(f.IconChevronRight,{}),...p,size:"lg",onChange:b,weekendDays:[0],highlightToday:l,classNames:j,defaultDate:c===void 0?m:void 0,date:Z,onDateChange:x,getDayProps:I,value:W,excludeDate:k,renderDay:O})},T={DatePickerBase:"styles-module__DatePickerBase___yJlGe",DatePickerRoot:"styles-module__DatePickerRoot___HG6Zb","DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM",DatePicker__Wrapper:"styles-module__DatePicker__Wrapper___7X5ke",DatePicker__Input:"styles-module__DatePicker__Input___sTaqF",DatePicker__Placeholder:"styles-module__DatePicker__Placeholder___PZnzX",DatePicker__Section:"styles-module__DatePicker__Section___waCJM",DatePicker__Icon:"styles-module__DatePicker__Icon___fceRx",DatePicker__Dropdown:"styles-module__DatePicker__Dropdown___Iy9KE",DatePicker__DropdownArrow:"styles-module__DatePicker__DropdownArrow___zeIIm",DatePicker__Root:"styles-module__DatePicker__Root___2Q8qm",DatePicker__LevelsGroup:"styles-module__DatePicker__LevelsGroup___lrWsl",DatePicker__CalendarHeader:"styles-module__DatePicker__CalendarHeader___VI-Of",DatePicker__CalendarHeaderLevel:"styles-module__DatePicker__CalendarHeaderLevel___F4DtE",DatePicker__CalendarHeaderControl:"styles-module__DatePicker__CalendarHeaderControl___72yIl",DatePicker__CalendarHeaderControlIcon:"styles-module__DatePicker__CalendarHeaderControlIcon___CnQei",DatePicker__Month:"styles-module__DatePicker__Month___W7LuG",DatePicker__WeekdaysRow:"styles-module__DatePicker__WeekdaysRow___4NdYk",DatePicker__Weekday:"styles-module__DatePicker__Weekday___tL-rR",DatePicker__MonthRow:"styles-module__DatePicker__MonthRow___NSs67",DatePicker__MonthCell:"styles-module__DatePicker__MonthCell___iGYhy",DatePicker__Day:"styles-module__DatePicker__Day___7LDrl",DatePicker__TimeWrapper:"styles-module__DatePicker__TimeWrapper___BlHZZ",DatePicker__TimeInput:"styles-module__DatePicker__TimeInput___Acg-L",DatePicker__SubmitButton:"styles-module__DatePicker__SubmitButton___6DvfS"};Y.extend(nt);const yt={wrapper:T.DatePicker__Wrapper,input:T.DatePicker__Input,section:T.DatePicker__Section,placeholder:T.DatePicker__Placeholder,datePickerRoot:T.DatePicker__Root,levelsGroup:T.DatePicker__LevelsGroup,calendarHeader:T.DatePicker__CalendarHeader,calendarHeaderLevel:T.DatePicker__CalendarHeaderLevel,calendarHeaderControl:T.DatePicker__CalendarHeaderControl,calendarHeaderControlIcon:T.DatePicker__CalendarHeaderControlIcon,month:T.DatePicker__Month,weekdaysRow:T.DatePicker__WeekdaysRow,weekday:T.DatePicker__Weekday,monthRow:T.DatePicker__MonthRow,monthCell:T.DatePicker__MonthCell,day:T.DatePicker__Day,timeWrapper:T.DatePicker__TimeWrapper,timeInput:T.DatePicker__TimeInput,submitButton:T.DatePicker__SubmitButton},kt={dropdown:T.DatePicker__Dropdown,arrow:T.DatePicker__DropdownArrow},Ae=(...e)=>e.filter(Boolean).join(" ")||void 0,_e=e=>{if(e==null)return null;if(e instanceof Date)return e;if(typeof e=="string"&&e){const r=e.split("-").map(Number);if(r.length===3&&r[0]&&r[1]&&r[2])return new Date(r[0],r[1]-1,r[2])}return null},Ct=({size:e="md",type:r="default",withTime:n,className:t,popoverProps:o,rightSection:l,rightSectionWidth:a,value:i,defaultValue:c,onChange:m,placeholder:u,disabled:_,minDate:p,maxDate:d,displayValueFormat:g="YYYY년 MM월 DD일",valueFormat:y,excludedDates:C,excludedDays:k,highlightToday:x})=>{const b=y??(n?"YYYY-MM-DD HH:mm":"YYYY-MM-DD"),[W,O]=h.useState(!1),[j,Z]=h.useState(()=>f.parseDateValue(i??c,r,b)??ne(r));let E=T["DatePicker--Medium"],I=18,S=42;e==="sm"?(E=T["DatePicker--Small"],I=14,S=34):e==="lg"&&(E=T["DatePicker--Large"],I=24,S=50);const N=ye(kt,o?.classNames),F=l??s.jsx("span",{"aria-hidden":"true",className:T.DatePicker__Icon,children:s.jsx(f.IconCalendar,{size:I})});if(n){const B=M=>{if(!M)return null;const $=Y(M,b,!0);return $.isValid()?$.toDate():null},H=i!==void 0,q=H?B(i):null,v=B(c);return s.jsx(me.DateTimePicker,{className:Ae(T.DatePickerBase,T.DatePickerRoot,E,t),classNames:ye(yt,void 0),size:e,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:F,rightSectionWidth:a??S,popoverProps:{offset:8,position:"bottom-start",withArrow:!0,arrowSize:10,arrowOffset:20,...o,classNames:N},value:H?q:void 0,defaultValue:H?void 0:v,onChange:M=>{m?.(M?Y(M).format(b):null)},placeholder:u,disabled:_,minDate:p,maxDate:d})}const w=i!=null?f.parseDateValue(i,r,b):void 0,A=ve({type:r,externalValue:w,internalValue:j}),z=f.formatDateDisplay(A,r,g),L=B=>{let H;if(r==="range"&&Array.isArray(B)){const q=B;H=[_e(q[0]??null),_e(q[1]??null)]}else r==="multiple"&&Array.isArray(B)?H=B.map(q=>_e(q)).filter(q=>q!==null):H=_e(B);Z(H),m?.(f.toValueString(H,r,b)),r==="default"&&H!=null&&O(!1),r==="range"&&Array.isArray(H)&&H[0]&&H[1]&&O(!1)};return s.jsx("div",{className:Ae(T.DatePickerBase,T.DatePickerRoot,E,t),children:s.jsxs(P.Popover,{opened:W,onClose:()=>O(!1),offset:8,position:"bottom-start",withArrow:!0,arrowSize:10,arrowOffset:20,...o,classNames:N,children:[s.jsx(P.Popover.Target,{children:s.jsx("div",{className:T.DatePicker__Wrapper,"data-expanded":W?!0:void 0,"data-disabled":_?!0:void 0,children:s.jsx(P.Input,{component:"button",type:"button",classNames:{input:T.DatePicker__Input,section:T.DatePicker__Section},onClick:()=>!_&&O(B=>!B),disabled:_,rightSection:F,rightSectionWidth:a??S,"data-expanded":W?!0:void 0,"data-disabled":_?!0:void 0,children:z?s.jsx("span",{children:z}):s.jsx("span",{className:T.DatePicker__Placeholder,children:u})})})}),s.jsx(P.Popover.Dropdown,{children:s.jsx(Ee,{type:r,value:A,onChange:L,excludedDates:C,excludedDays:k,highlightToday:x,minDate:p,maxDate:d})})]})})},J={"Dropdown--LeftLabel":"styles-module__Dropdown--LeftLabel___SFObq","Dropdown--TopLabel":"styles-module__Dropdown--TopLabel___-lPhr","Dropdown__Label--Small":"styles-module__Dropdown__Label--Small___xbzOR","Dropdown__Label--Medium":"styles-module__Dropdown__Label--Medium___YtJ2-","Dropdown__Label--Large":"styles-module__Dropdown__Label--Large___sCiJv","Dropdown__Tooltip--Small":"styles-module__Dropdown__Tooltip--Small___rkmaO","Dropdown__Tooltip--Medium":"styles-module__Dropdown__Tooltip--Medium___JTfzy","Dropdown__Tooltip--Large":"styles-module__Dropdown__Tooltip--Large___W-sUq","Dropdown--Small":"styles-module__Dropdown--Small___dRIK7","Dropdown--Medium":"styles-module__Dropdown--Medium___-HZoU","Dropdown--Large":"styles-module__Dropdown--Large___BvV3M",Dropdown__Description:"styles-module__Dropdown__Description___OQ8bF",Dropdown__ErrorMsg:"styles-module__Dropdown__ErrorMsg___xTP0Y"},Dt=({label:e,labelPosition:r="top",size:n="md",required:t,tooltip:o,tooltipPosition:l="top",errorMsg:a,description:i,...c})=>{const[m,u]=h.useState(!1);let _=J["Dropdown__Label--Medium"],p=J["Dropdown--Medium"],d=J["Dropdown__Tooltip--Medium"],g=18;return n==="sm"?(_=J["Dropdown__Label--Small"],p=J["Dropdown--Small"],d=J["Dropdown__Tooltip--Small"],g=14):n==="lg"&&(_=J["Dropdown__Label--Large"],p=J["Dropdown--Large"],d=J["Dropdown__Tooltip--Large"],g=24),s.jsxs("div",{className:r==="top"?J["Dropdown--TopLabel"]:J["Dropdown--LeftLabel"],children:[s.jsxs("div",{children:[e&&s.jsx(P.Input.Label,{required:t,className:_,children:e}),o&&s.jsx(P.Tooltip,{label:o,position:l,children:s.jsx("div",{className:d,children:s.jsx(f.IconInfoCircle,{size:n==="sm"?14:n==="lg"?20:16})})})]}),s.jsxs("div",{children:[s.jsx(P.Select,{...c,size:n,error:a,className:p,rightSection:m?s.jsx(f.IconChevronUp,{size:g}):s.jsx(f.IconChevronDown,{size:g}),onDropdownOpen:()=>u(!0),onDropdownClose:()=>u(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:f.ColorGray100,color:f.ColorBlack}}}}}),i&&s.jsx(P.Input.Description,{className:J.Dropdown__Description,children:i}),a&&s.jsx(P.Input.Error,{className:J.Dropdown__ErrorMsg,children:a})]})]})};function de(){return crypto.randomUUID()}function Pt(e,r,n){const t=[...e],[o]=t.splice(r,1);return t.splice(n,0,o),t}function xt(e,r,n){return n!=null&&e.length>=n?0:r!=null&&e.length<r?r-e.length:1}function St(e,r,n){return e.map(t=>{const o=t.position;return o==null?t:o===r?{...t,position:n}:r<n&&o>r&&o<=n?{...t,position:o-1}:r>n&&o>=n&&o<r?{...t,position:o+1}:t})}function Mt(e,r,n){const t=[...r].sort((i,c)=>i.name.localeCompare(c.name)),o=n!=null?n-e.length:1/0,a=t.slice(0,o).map(i=>({id:de(),file:i,url:URL.createObjectURL(i)}));return[...e,...a]}function Tt(e,r){const n=e.find(t=>t.id===r);return n?.url?.startsWith("blob:")&&URL.revokeObjectURL(n.url),e.filter(t=>t.id!==r)}function Ne(e,r,n){return e.map(t=>t.id!==r?t:(t.url?.startsWith("blob:")&&URL.revokeObjectURL(t.url),{...t,file:n,url:URL.createObjectURL(n)}))}function bt(e,r,n){return Ne(e,r,n)}function It(e,r,n){const t={id:de(),file:r,url:URL.createObjectURL(r),position:n};return[...e,t]}function wt(e){for(const r of e)r.url?.startsWith("blob:")&&URL.revokeObjectURL(r.url)}const Fe=({size:e="md",width:r,withCloseButton:n=!1,...t})=>{let o=768;return e==="xs"?o=360:e==="sm"?o=544:e==="lg"?o=1e3:e==="xl"&&(o=1200),s.jsx(P.Modal,{size:r||o,styles:{content:{borderRadius:"12px"},title:{fontSize:"16px",fontWeight:"700",lineHeight:"150%",color:f.ColorGray900},header:{padding:"16px"},body:{paddingLeft:"0px",paddingRight:"0px"}},withCloseButton:n,closeButtonProps:{icon:s.jsx(f.IconX,{size:18,color:f.ColorGray600})},...t})};async function Bt(e,r){const n=e.url??"";if(!n)return null;const t=await new Promise((i,c)=>{const m=new Image;m.crossOrigin="anonymous",m.onload=()=>i(m),m.onerror=c,m.src=n}),o=document.createElement("canvas");o.width=r.width,o.height=r.height;const l=o.getContext("2d");if(!l)return null;l.drawImage(t,r.x,r.y,r.width,r.height,0,0,r.width,r.height);const a=e.file?.name??e.url?.split("/").pop()??"image";return new Promise((i,c)=>{o.toBlob(m=>{m?i(new File([m],`cropped_${a}`,{type:"image/jpeg"})):c(new Error("Failed to create blob"))},"image/jpeg")})}function Lt({item:e,isOpen:r,aspect:n=1,onClose:t,onSubmit:o}){const[l,a]=h.useState({x:0,y:0}),[i,c]=h.useState(1),[m,u]=h.useState(null),[_,p]=h.useState(!1),d=async()=>{if(!(!m||!e)){p(!0);try{const g=await Bt(e,m);g&&o(g)}finally{p(!1)}}};return s.jsx(Fe,{opened:r&&!!e,onClose:t,size:"md",title:"이미지 수정",withCloseButton:!0,children:s.jsxs(P.Stack,{children:[s.jsx("div",{style:{position:"relative",height:320,background:f.ColorWhite},children:s.jsx(ot,{image:e?.url??"",crop:l,zoom:i,aspect:n,minZoom:.5,maxZoom:10,objectFit:"cover",onCropChange:a,onZoomChange:c,onCropComplete:(g,y)=>u(y),style:{containerStyle:{backgroundColor:f.ColorWhite}}})}),s.jsxs(P.Group,{justify:"flex-end",style:{padding:"0 16px"},children:[s.jsx(ie,{variant:"basic",onClick:t,children:"취소"}),s.jsx(ie,{variant:"primary",isLoading:_,onClick:d,children:"적용하기"})]})]})},e?.id)}const ae={Container:"styles-module__Container___ZyeJM",TileImage:"styles-module__TileImage___6aKmW",EditButton:"styles-module__EditButton___1Xyg9",PlaceholderText:"styles-module__PlaceholderText___nhLhy",PlaceholderTextError:"styles-module__PlaceholderTextError___jYZ8j"},Q={TileContainer:"styles-module__TileContainer___5-y01",DeleteButton:"styles-module__DeleteButton___0zsXm",Tile:"styles-module__Tile___3Cezo",TileDragOver:"styles-module__TileDragOver___e7GXF",LoadingOverlay:"styles-module__LoadingOverlay___4CyDQ",ActionBar:"styles-module__ActionBar___mJYpe",DragHandle:"styles-module__DragHandle___lzKhb",LinkButton:"styles-module__LinkButton___bISyz",DropzoneOuter:"styles-module__DropzoneOuter___BIO2N",Placeholder:"styles-module__Placeholder___q30Yw",PlaceholderError:"styles-module__PlaceholderError___fCOYe"};function ue({width:e,height:r,isError:n,isLoading:t,accept:o,multiple:l,onDrop:a,children:i}){return s.jsx("div",{className:Q.DropzoneOuter,children:s.jsx(he.Dropzone,{onDrop:a,accept:o,multiple:l,disabled:t,className:n?Q.PlaceholderError:Q.Placeholder,style:{width:e,height:r},children:i})})}const vt=e=>{const{isSorting:r,wasDragging:n}=e;return r||n?!1:te.defaultAnimateLayoutChanges(e)};function Oe({id:e,children:r}){const{setNodeRef:n,transform:t,transition:o,isOver:l}=te.useSortable({id:e,animateLayoutChanges:vt});return s.jsx("div",{ref:n,style:{transform:Be.CSS.Transform.toString(t),transition:o,opacity:l?.7:1},children:r})}function $e({id:e,totalCount:r,width:n,height:t,readOnly:o,isLoading:l,itemIsLoading:a,canDelete:i,hasLink:c,linkUrl:m,onLinkClick:u,onDelete:_,deleteAriaLabel:p="삭제",actionBarExtra:d,onTileClick:g,onFileDrop:y,children:C}){const[k,x]=h.useState(!1),b=L=>{!y||o||l||a||L.preventDefault()},W=L=>{!y||o||l||a||(L.preventDefault(),x(!0))},O=L=>{L.currentTarget.contains(L.relatedTarget)||x(!1)},j=L=>{if(L.preventDefault(),x(!1),!y||o||l||a)return;const B=L.dataTransfer.files[0];B&&y(B)},Z=L=>{const{isSorting:B,wasDragging:H}=L;return B||H?!1:te.defaultAnimateLayoutChanges(L)},{attributes:E,listeners:I,setNodeRef:S,transform:N,transition:F,isDragging:w}=te.useSortable({id:e,disabled:o,animateLayoutChanges:Z}),A=!o&&r>1||c&&!!m&&!!u||!!d,z=o||l||a||!g?"default":"pointer";return s.jsxs("div",{ref:S,className:Q.TileContainer,style:{transform:Be.CSS.Transform.toString(N),transition:F,opacity:w?.4:1},children:[!o&&i&&!l&&s.jsx("button",{type:"button",className:Q.DeleteButton,onClick:_,"aria-label":p,children:s.jsx(f.IconXCircle,{size:24})}),s.jsxs("div",{className:`${Q.Tile}${k?` ${Q.TileDragOver}`:""}`,style:{width:n,height:t,cursor:z},onClick:()=>!o&&!l&&!a&&g?.(),onDragOver:b,onDragEnter:W,onDragLeave:O,onDrop:j,children:[C,(l||a)&&s.jsx("div",{className:Q.LoadingOverlay,children:s.jsx(P.Loader,{size:n/6,color:f.ColorAqua500})})]}),A&&s.jsxs("div",{className:Q.ActionBar,children:[!o&&r>1&&s.jsx("button",{type:"button",className:Q.DragHandle,...E,...I,"aria-label":"드래그로 순서 변경",children:s.jsx(f.IconDragMenu,{size:20,color:f.ColorGray600})}),c&&m&&u&&s.jsx("button",{type:"button",className:Q.LinkButton,onClick:u,children:"링크"}),d]})]})}function Et({items:e,onReorder:r}){return{sensors:ee.useSensors(ee.useSensor(ee.PointerSensor,{activationConstraint:{distance:8}}),ee.useSensor(ee.KeyboardSensor,{coordinateGetter:te.sortableKeyboardCoordinates})),handleDragEnd:o=>{const{active:l,over:a}=o;if(!a||l.id===a.id)return;const i=e.findIndex(m=>m.id===l.id),c=e.findIndex(m=>m.id===a.id);i!==-1&&c!==-1&&r(i,c)}}}const ke="__slot-";function ze({value:e,length:r,minLength:n,maxLength:t,onChange:o}){const l=r??n,a=r??t,i=l!=null&&a!=null&&l===a,c=i?0:xt(e,l,a),m=i?Array.from({length:a},(C,k)=>`${ke}${k}`):[],u=i?m:e.map(C=>C.id),{sensors:_,handleDragEnd:p}=Et({items:e,onReorder:(C,k)=>{const x=Pt(e,C,k),b=e[C];o?.(x,{action:"reorder",itemId:b.id,index:k,previousIndex:C,nextIndex:k})}});return{isPositionMode:i,resolvedMinLength:l,resolvedMaxLength:a,placeholderCount:c,slotIds:m,sortableItems:u,sensors:_,handleDragEnd:i?C=>{const{active:k,over:x}=C;if(!x||k.id===x.id)return;const b=Number(String(k.id).replace(ke,"")),W=Number(String(x.id).replace(ke,"")),O=e.find(Z=>Z.position===b);if(!O)return;const j=St(e,b,W);o?.(j,{action:"reorder",itemId:O.id,index:W,previousIndex:b,nextIndex:W})}:p,getMetaIndex:C=>{const k=e.find(x=>x.id===C);return i&&k?k.position??0:e.findIndex(x=>x.id===C)}}}function At(e){return e?e.join(","):"image/*"}function He({item:e,sortableId:r,index:n,totalCount:t,width:o,height:l,accept:a,canDelete:i,hasLink:c,hasEdit:m,readOnly:u,isLoading:_,onLinkClick:p,onDelete:d,onReplace:g,onEdit:y}){const C=h.useRef(null);return s.jsxs($e,{id:r??e.id,totalCount:t,width:o,height:l,readOnly:u,isLoading:_,itemIsLoading:e.isLoading,canDelete:i,hasLink:c,linkUrl:e.url,onLinkClick:p?()=>p(e):void 0,onDelete:()=>d(e.id),deleteAriaLabel:"이미지 삭제",onTileClick:()=>C.current?.click(),onFileDrop:k=>{if(a){if(!a.includes(k.type))return}else if(!k.type.startsWith("image/"))return;g(e.id,k)},actionBarExtra:!u&&m?s.jsx(ie,{variant:"basic",size:"sm","aria-label":"이미지 편집",className:ae.EditButton,onClick:()=>y(e),children:"편집"}):void 0,children:[s.jsx("input",{ref:C,type:"file",accept:At(a),style:{display:"none"},onChange:k=>{const x=k.target.files?.[0];x&&g(e.id,x),k.target.value=""}}),s.jsx("img",{src:e.url,alt:e.file?.name??`이미지 ${n+1}`,className:ae.TileImage})]})}const Nt=({value:e=[],onChange:r,accept:n,length:t,width:o=160,height:l=200,placeholder:a="이미지를 넣어주세요",hasIcon:i=!0,hasLink:c=!1,onLinkClick:m,hasEdit:u=!1,canDelete:_=!0,minLength:p,maxLength:d,errorMsg:g,isLoading:y,readOnly:C,gap:k=8})=>{const{isPositionMode:x,resolvedMaxLength:b,placeholderCount:W,slotIds:O,sortableItems:j,sensors:Z,handleDragEnd:E,getMetaIndex:I}=ze({value:e,length:t,minLength:p,maxLength:d,onChange:r}),S=!!g,[N,F]=h.useState(null),w=h.useRef(e);h.useEffect(()=>{w.current=e},[e]),h.useEffect(()=>()=>wt(w.current),[]);const A=v=>{if(C)return;const M=e.length,$=Mt(e,v,b);$.length!==M&&r?.($,{action:"create",itemId:$[M].id,index:M})},z=(v,M)=>{if(C)return;const $=M[0];if(!$)return;const X=It(e,$,v);r?.(X,{action:"create",itemId:X[X.length-1].id,index:v})},L=v=>{if(C)return;const M=I(v),$=Tt(e,v);r?.($,{action:"delete",itemId:v,index:M})},B=(v,M)=>{if(C)return;const $=I(v),X=Ne(e,v,M);r?.(X,{action:"replace",itemId:v,index:$})},H=v=>{if(!N)return;const M=N.id,$=I(M),X=bt(e,M,v);F(null),r?.(X,{action:"crop",itemId:M,index:$})},q=v=>{const M=typeof a=="function"?a(v):a;return typeof M!="string"?M:M.split(`
2
- `).map(($,X)=>s.jsx("span",{children:$},X))};return s.jsxs("div",{children:[s.jsx(ee.DndContext,{sensors:Z,collisionDetection:ee.closestCenter,onDragEnd:E,children:s.jsx(te.SortableContext,{items:j,strategy:te.rectSortingStrategy,children:s.jsx("div",{className:ae.Container,style:{gap:k},children:x?Array.from({length:b},(v,M)=>{const $=O[M],X=e.find(we=>we.position===M);return X?s.jsx(He,{item:X,sortableId:$,index:M,totalCount:b,width:o,height:l,accept:n,canDelete:_,hasLink:c,hasEdit:u,readOnly:C??!1,isLoading:y,onLinkClick:m,onDelete:L,onReplace:B,onEdit:F},$):!C&&s.jsx(Oe,{id:$,children:s.jsxs(ue,{onDrop:we=>z(M,we),accept:n??he.IMAGE_MIME_TYPE,multiple:!1,isLoading:y,isError:S,width:o,height:l,children:[i&&s.jsx(f.IconPhoto,{size:36,color:S?f.ColorRed700:f.ColorAqua700}),a&&s.jsx("div",{className:`${ae.PlaceholderText}${S?` ${ae.PlaceholderTextError}`:""}`,children:q(M)})]})},$)}):s.jsxs(s.Fragment,{children:[e.map((v,M)=>s.jsx(He,{item:v,index:M,totalCount:e.length,width:o,height:l,accept:n,canDelete:_,hasLink:c,hasEdit:u,readOnly:C??!1,isLoading:y,onLinkClick:m,onDelete:L,onReplace:B,onEdit:F},v.id)),!C&&Array.from({length:W},(v,M)=>s.jsxs(ue,{onDrop:A,accept:n??he.IMAGE_MIME_TYPE,multiple:b!==1,isLoading:y,isError:S,width:o,height:l,children:[i&&s.jsx(f.IconPhoto,{size:36,color:S?f.ColorRed700:f.ColorAqua700}),a&&s.jsx("div",{className:`${ae.PlaceholderText}${S?` ${ae.PlaceholderTextError}`:""}`,children:q(M)})]},`placeholder-${M}`))]})})})}),S&&s.jsx(P.Input.Error,{mt:8,children:g}),u&&s.jsx(Lt,{item:N,isOpen:!!N,onClose:()=>F(null),onSubmit:H})]})};function We(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const r=e;return"v"in r&&"fr"in r&&"ip"in r&&"op"in r&&"w"in r&&"h"in r&&"layers"in r&&Array.isArray(r.layers)}function Ce(e){return new Promise(r=>{const n=new FileReader;n.onload=t=>{try{const o=JSON.parse(t.target?.result);r(We(o)?o:null)}catch{r(null)}},n.onerror=()=>r(null),n.readAsText(e)})}function Ft(e,r,n){const t=[...r].sort((i,c)=>i.name.localeCompare(c.name)),o=n!=null?n-e.length:1/0,a=t.slice(0,o).map(i=>({id:de(),file:i}));return[...e,...a]}function Ot(e,r){return e.filter(n=>n.id!==r)}function $t(e,r,n){const t={id:de(),file:r,position:n};return[...e,t]}const se={Container:"styles-module__Container___cJqG-",Empty:"styles-module__Empty___gexrS",PlaceholderText:"styles-module__PlaceholderText___x2ya0",PlaceholderTextError:"styles-module__PlaceholderTextError___i8VXv"},pe={Toast:"styles-module__Toast___ZqZzU",Toast__Icon:"styles-module__Toast__Icon___PWXSy",Toast__Body:"styles-module__Toast__Body___wezPs",Toast__Message:"styles-module__Toast__Message___NFsgm"},Ye=e=>typeof e=="string"?{message:e}:e,Ze=(e,r)=>{const{autoClose:n,icon:t,message:o}=Ye(e);return{id:r,message:s.jsx("div",{className:pe.Toast__Message,children:o}),icon:t,autoClose:n,classNames:{root:pe.Toast,body:pe.Toast__Body,icon:pe.Toast__Icon},withCloseButton:!1,withBorder:!1}},oe=e=>{const r=Ye(e);le.notifications.show(Ze(e,r.id))};oe.update=(e,r)=>{le.notifications.update(Ze(r,e))},oe.hide=e=>{le.notifications.hide(e)},oe.clean=()=>{le.notifications.clean()};const Ve={"application/json":[".json"]};function Ue({item:e,sortableId:r,totalCount:n,width:t,height:o,readOnly:l,isLoading:a,canDelete:i,hasLink:c,onLinkClick:m,onDelete:u}){const p=!e.animationData&&!!(e.file||e.url)?`${e.id}|${e.file?`${e.file.name}:${e.file.size}`:e.url??""}`:"",[d,g]=h.useState({key:"",data:null}),y=e.animationData??(d.key===p?d.data:null),C=!!p&&d.key!==p;return h.useEffect(()=>{if(!p)return;let k=!1;return(e.file?Ce(e.file):fetch(e.url).then(b=>b.json()).then(b=>We(b)?b:null)).then(b=>{k||g({key:p,data:b})}).catch(()=>{k||g({key:p,data:null})}),()=>{k=!0}},[p,e.file,e.url]),s.jsx($e,{id:r??e.id,totalCount:n,width:t,height:o,readOnly:l,isLoading:a,itemIsLoading:e.isLoading||C,canDelete:i,hasLink:c,linkUrl:e.url,onLinkClick:m?()=>m(e):void 0,onDelete:()=>u(e.id),deleteAriaLabel:"Lottie 삭제",children:y?s.jsx(at,{animationData:y,loop:!0,autoplay:!0,style:{width:t,height:o,display:"block"}}):s.jsx("div",{className:se.Empty,style:{width:t,height:o}})})}const zt=({value:e=[],onChange:r,width:n=160,height:t=200,placeholder:o="Lottie JSON 파일을 넣어주세요",hasIcon:l=!0,hasLink:a=!1,onLinkClick:i,length:c,minLength:m,maxLength:u,errorMsg:_,isLoading:p,readOnly:d,gap:g=8,canDelete:y=!0})=>{const{isPositionMode:C,resolvedMaxLength:k,placeholderCount:x,slotIds:b,sortableItems:W,sensors:O,handleDragEnd:j,getMetaIndex:Z}=ze({value:e,length:c,minLength:m,maxLength:u,onChange:r}),E=!!_,I=async w=>{if(d)return;const A=[...w].sort((v,M)=>v.name.localeCompare(M.name)),z=await Promise.all(A.map(Ce));let L=0;const B=A.filter((v,M)=>z[M]!==null?!0:(L++,!1));if(L>0&&oe({id:"invalid-lottie-files",message:L===1?"유효하지 않은 Lottie JSON 파일입니다":`${L}개의 파일이 유효하지 않은 Lottie JSON입니다`}),B.length===0)return;const H=e.length,q=Ft(e,B,k);q.length!==H&&r?.(q,{action:"create",itemId:q[H].id,index:H})},S=async(w,A)=>{if(d)return;const z=A[0];if(!z)return;if(!await Ce(z)){oe({id:"invalid-lottie-files",message:"유효하지 않은 Lottie JSON 파일입니다"});return}const B=$t(e,z,w);r?.(B,{action:"create",itemId:B[B.length-1].id,index:w})},N=w=>{if(d)return;const A=Z(w),z=Ot(e,w);r?.(z,{action:"delete",itemId:w,index:A})},F=w=>{const A=typeof o=="function"?o(w):o;return typeof A!="string"?A:A.split(`
3
- `).map((z,L)=>s.jsx("span",{children:z},L))};return s.jsxs("div",{children:[s.jsx(ee.DndContext,{sensors:O,collisionDetection:ee.closestCenter,onDragEnd:j,children:s.jsx(te.SortableContext,{items:W,strategy:te.rectSortingStrategy,children:s.jsx("div",{className:se.Container,style:{gap:g},children:C?Array.from({length:k},(w,A)=>{const z=b[A],L=e.find(B=>B.position===A);return L?s.jsx(Ue,{item:L,sortableId:z,totalCount:k,width:n,height:t,readOnly:d??!1,isLoading:p,canDelete:y,hasLink:a,onLinkClick:i,onDelete:N},z):!d&&s.jsx(Oe,{id:z,children:s.jsxs(ue,{onDrop:B=>S(A,B),accept:Ve,multiple:!1,isLoading:p,isError:E,width:n,height:t,children:[l&&s.jsx(f.IconPhoto,{size:36,color:E?f.ColorRed700:f.ColorAqua700}),o&&s.jsx("div",{className:`${se.PlaceholderText}${E?` ${se.PlaceholderTextError}`:""}`,children:F(A)})]})},z)}):s.jsxs(s.Fragment,{children:[e.map(w=>s.jsx(Ue,{item:w,totalCount:e.length,width:n,height:t,readOnly:d??!1,isLoading:p,canDelete:y,hasLink:a,onLinkClick:i,onDelete:N},w.id)),!d&&Array.from({length:x},(w,A)=>s.jsxs(ue,{onDrop:I,accept:Ve,multiple:k!==1,isLoading:p,isError:E,width:n,height:t,children:[l&&s.jsx(f.IconPhoto,{size:36,color:E?f.ColorRed700:f.ColorAqua700}),o&&s.jsx("div",{className:`${se.PlaceholderText}${E?` ${se.PlaceholderTextError}`:""}`,children:F(A)})]},`placeholder-${A}`))]})})})}),E&&s.jsx(P.Input.Error,{mt:8,children:_})]})},ce={Pagination:"style-module__Pagination___xcR-Q",Pagination__PageIndex:"style-module__Pagination__PageIndex___50SZJ","Pagination__PageIndex--Active":"style-module__Pagination__PageIndex--Active___mSIwS",Pagination__Arrow:"style-module__Pagination__Arrow___74vp3"},Ht=({currentPageIdx:e,rowsPerPage:r,totalLength:n,paginationSize:t,onPageChange:o,...l})=>{const[a,i]=h.useState(e),c=r||50,m=n||1,u=t||5;h.useEffect(()=>{i(e)},[e]);const _=()=>{o&&o(a-(a%u+1)),i(d=>d-(d%u+1))},p=()=>{o&&o(a+u-a%u),i(d=>d+u-d%u)};return s.jsxs("div",{...l,className:ce.Pagination,children:[a>=u?s.jsx("button",{className:ce.Pagination__Arrow,onClick:_,children:s.jsx(f.IconChevronLeft,{size:20})}):null,new Array(u).fill(0).map((d,g)=>{const y=Math.floor(a/u)*u+g+1;if(!(y>Math.ceil(m/c)))return s.jsx("button",{className:a===y-1?ce["Pagination__PageIndex--Active"]:ce.Pagination__PageIndex,onClick:()=>{i(y-1),o&&o(y-1)},children:y},`pagination_${g}`)}),Math.floor(a/u)*u+u<Math.ceil(m/c)?s.jsx("button",{className:ce.Pagination__Arrow,onClick:p,children:s.jsx(f.IconChevronRight,{size:20})}):null]})},De={"Radio--Small":"styles-module__Radio--Small___izWI2","Radio--Medium":"styles-module__Radio--Medium___dwZfV","Radio--Large":"styles-module__Radio--Large___1gLra"},Wt={sm:De["Radio--Small"],md:De["Radio--Medium"],lg:De["Radio--Large"]},Yt={sm:18,md:24,lg:32},Zt=({size:e="md",...r})=>{const n=Wt[e],t=Yt[e];return s.jsx(P.Radio,{className:n,size:e,styles:{inner:{width:t,height:t}},...r})},G={"SearchBar--LeftLabel":"styles-module__SearchBar--LeftLabel___CeYTM","SearchBar--TopLabel":"styles-module__SearchBar--TopLabel___spN3I","SearchBar__Label--Small":"styles-module__SearchBar__Label--Small___zS1L2","SearchBar__Label--Medium":"styles-module__SearchBar__Label--Medium___Fk0Ao","SearchBar__Label--Large":"styles-module__SearchBar__Label--Large___xTOYL","SearchBar__Tooltip--Small":"styles-module__SearchBar__Tooltip--Small___YhmEr","SearchBar__Tooltip--Medium":"styles-module__SearchBar__Tooltip--Medium___4JhOv","SearchBar__Tooltip--Large":"styles-module__SearchBar__Tooltip--Large___IEoPv",SearchBar__Wrapper:"styles-module__SearchBar__Wrapper___oq49s","SearchBar--Small":"styles-module__SearchBar--Small___SY9CN","SearchBar--Medium":"styles-module__SearchBar--Medium___vLP08","SearchBar--Large":"styles-module__SearchBar--Large___JHfHP",SearchBar__Description:"styles-module__SearchBar__Description___vucS-",SearchBar__ErrorMsg:"styles-module__SearchBar__ErrorMsg___TOeoy",SearchBar__ClearButton:"styles-module__SearchBar__ClearButton___S-y4P"},Vt=({label:e,labelPosition:r="top",size:n="md",required:t,tooltip:o,tooltipPosition:l="top",errorMsg:a,description:i,onChange:c,onClear:m,...u})=>{const[_,p]=h.useState(0);let d=G["SearchBar__Label--Medium"],g=G["SearchBar--Medium"],y=G["SearchBar__Tooltip--Medium"];n==="sm"?(d=G["SearchBar__Label--Small"],g=G["SearchBar--Small"],y=G["SearchBar__Tooltip--Small"]):n==="lg"&&(d=G["SearchBar__Label--Large"],g=G["SearchBar--Large"],y=G["SearchBar__Tooltip--Large"]);const C=h.useCallback(k=>{c&&(p(k?.length),c(k))},[c]);return s.jsxs("div",{className:r==="top"?G["SearchBar--TopLabel"]:G["SearchBar--LeftLabel"],children:[s.jsxs("div",{children:[e&&s.jsx(P.Input.Label,{required:t,className:d,children:e}),o&&s.jsx(P.Tooltip,{label:o,position:l,children:s.jsx("div",{className:y,children:s.jsx(f.IconInfoCircle,{size:n==="sm"?14:n==="lg"?20:16})})})]}),s.jsxs("div",{children:[s.jsx("div",{className:G.SearchBar__Wrapper,children:s.jsx(P.Autocomplete,{...u,size:n,error:a,className:g,onChange:C,leftSection:s.jsx(f.IconSearch,{size:n==="sm"?16:n==="lg"?24:20}),rightSection:m&&_>0?s.jsx("div",{className:G.SearchBar__ClearButton,onClick:m,children:s.jsx(f.IconX,{size:n==="sm"?16:n==="lg"?24:20})}):void 0})}),i&&s.jsx(P.Input.Description,{className:G.SearchBar__Description,children:i}),a&&s.jsx(P.Input.Error,{className:G.SearchBar__ErrorMsg,children:a})]})]})},Pe={"SegmentButton--Small":"styles-module__SegmentButton--Small___o0Y3t","SegmentButton--Medium":"styles-module__SegmentButton--Medium___EgCJm","SegmentButton--Large":"styles-module__SegmentButton--Large___Ym86C"},Ut=({size:e="md",radius:r=f.BorderRadius150,...n})=>{let t=Pe["SegmentButton--Medium"];return e==="sm"?t=Pe["SegmentButton--Small"]:e==="lg"&&(t=Pe["SegmentButton--Large"]),s.jsx(P.SegmentedControl,{className:t,size:e,radius:r,withItemsBorders:!1,...n})},je={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},jt=({tabList:e=[],containerPaddingTop:r,...n})=>s.jsxs(P.Tabs,{...n,children:[s.jsx(P.Tabs.List,{className:je.Tab__TitleList,children:e?.map((t,o)=>s.jsxs(P.Tabs.Tab,{value:t.value,leftSection:t.icon,children:[t.title,s.jsx("div",{className:je.Tab__BorderBottom})]},`tab_${o}`))}),e?.map((t,o)=>s.jsx(P.Tabs.Panel,{value:t.value,pt:r,children:t.body},`tab_panel_${o}`))]}),U={"TextField--LeftLabel":"styles-module__TextField--LeftLabel___hiNn3","TextField--TopLabel":"styles-module__TextField--TopLabel___V2otc","TextField__Label--Small":"styles-module__TextField__Label--Small___NkKKA","TextField__Label--Medium":"styles-module__TextField__Label--Medium___IoJd-","TextField__Label--Large":"styles-module__TextField__Label--Large___GMy74","TextField__Tooltip--Small":"styles-module__TextField__Tooltip--Small___GmQHE","TextField__Tooltip--Medium":"styles-module__TextField__Tooltip--Medium___5P3nA","TextField__Tooltip--Large":"styles-module__TextField__Tooltip--Large___YSCfu",TextField__Wrapper:"styles-module__TextField__Wrapper___u6p5Z",TextField__TextCounter:"styles-module__TextField__TextCounter___u1jM5","TextField--Textarea":"styles-module__TextField--Textarea___C2DL5","TextField--Small":"styles-module__TextField--Small___iuH4t","TextField--Medium":"styles-module__TextField--Medium___snYod","TextField--Large":"styles-module__TextField--Large___JoSYk",TextField__Description:"styles-module__TextField__Description___J-kXP",TextField__ErrorMsg:"styles-module__TextField__ErrorMsg___fa6f6",TextField__ClearButton:"styles-module__TextField__ClearButton___bB5Ew"},Gt=e=>typeof e=="string"?e.length:typeof e=="number"?String(e).length:Array.isArray(e)?e.join("").length:0,qt=e=>{const{label:r,labelPosition:n="top",size:t="md",required:o,tooltip:l,tooltipPosition:a="top",errorMsg:i,description:c,textarea:m=!1,maxTextCount:u,onChange:_,onClear:p,...d}=e,g="minRows"in e?e.minRows:void 0,{value:y,defaultValue:C,...k}=d,x=y!==void 0,[b,W]=h.useState(String(y??C??"")),O=x?y:b,j=Gt(O);let Z=U["TextField__Label--Medium"],E=U["TextField--Medium"],I=U["TextField__Tooltip--Medium"];t==="sm"?(Z=U["TextField__Label--Small"],E=U["TextField--Small"],I=U["TextField__Tooltip--Small"]):t==="lg"&&(Z=U["TextField__Label--Large"],E=U["TextField--Large"],I=U["TextField__Tooltip--Large"]);const S=h.useCallback(F=>{const w=F.currentTarget.value;u&&w.length>u||(x||W(w),_&&_(F))},[x,u,_]),N=h.useCallback(()=>{x||W(""),p?.()},[x,p]);return s.jsxs("div",{className:n==="top"?U["TextField--TopLabel"]:U["TextField--LeftLabel"],children:[s.jsxs("div",{children:[r&&s.jsx(P.Input.Label,{required:o,className:Z,children:r}),l&&s.jsx(P.Tooltip,{label:l,position:a,children:s.jsx("div",{className:I,children:s.jsx(f.IconInfoCircle,{size:t==="sm"?14:t==="lg"?20:16})})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:U.TextField__Wrapper,children:[m?s.jsx(P.Textarea,{className:U["TextField--Textarea"],size:t,minRows:g,error:i,onChange:S,value:O,...k}):s.jsx(P.Input,{className:E,error:i,onChange:S,value:O,rightSection:p&&j>0?s.jsx("button",{type:"button",className:U.TextField__ClearButton,"aria-label":"입력 내용 지우기",onClick:N,children:s.jsx(f.IconX,{size:t==="sm"?16:t==="lg"?24:20})}):void 0,...k}),u&&u>0&&s.jsx("span",{className:U.TextField__TextCounter,children:`${j}/${u}`})]}),c&&s.jsx(P.Input.Description,{className:U.TextField__Description,children:c}),i&&s.jsx(P.Input.Error,{className:U.TextField__ErrorMsg,children:i})]})]})},xe={"TimePicker--Small":"styles-module__TimePicker--Small___nHQa1","TimePicker--Medium":"styles-module__TimePicker--Medium___E9-rF","TimePicker--Large":"styles-module__TimePicker--Large___I0M7V"},Kt=({size:e="md",...r})=>{const n=h.useRef(null);let t=xe["TimePicker--Medium"],o=18;return e==="sm"?(t=xe["TimePicker--Small"],o=14):e==="lg"&&(t=xe["TimePicker--Large"],o=24),s.jsx(me.TimeInput,{ref:n,className:t,size:e,...r,rightSection:s.jsx(P.ActionIcon,{bg:"transparent",onClick:()=>{n.current?.showPicker?.()},children:s.jsx(f.IconClock,{size:o})})})},Se={"Toggle--Small":"styles-module__Toggle--Small___sOjUd","Toggle--Medium":"styles-module__Toggle--Medium___yIb8v","Toggle--Large":"styles-module__Toggle--Large___ZOJj1"},Jt=({size:e="md",labelPosition:r="right",disabled:n,onChange:t,...o})=>{const[l,a]=h.useState(o?.checked||!1);let i=Se["Toggle--Medium"],c=50;e==="sm"?(i=Se["Toggle--Small"],c=38):e==="lg"&&(i=Se["Toggle--Large"],c=67);const m=h.useCallback(u=>{t&&t(u),a(u?.target?.checked)},[t]);return s.jsx(P.Switch,{className:i,size:e,labelPosition:r,disabled:n,onChange:m,styles:()=>({track:{backgroundColor:!n&&l?`${f.ColorAqua500} !important`:void 0,borderColor:!n&&l?`${f.ColorAqua500} !important`:void 0,width:c}}),...o})},Me={Tooltip__Body:"styles-module__Tooltip__Body___i1OTG",Tooltip__Title:"styles-module__Tooltip__Title___E0LoV",Tooltip__Content:"styles-module__Tooltip__Content___lU5gr"},Xt=({title:e,content:r,maw:n=280,multiline:t=!0,...o})=>s.jsx(P.Tooltip,{...o,maw:n,multiline:t,label:s.jsxs("div",{className:Me.Tooltip__Body,children:[e&&s.jsx("span",{className:Me.Tooltip__Title,children:e}),s.jsx("span",{className:Me.Tooltip__Content,children:r})]})}),Qt=e=>{const{name:r,icon:n}=e;return`
1
+ (function(D,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("@mantine/core"),require("@mantine/dates"),require("@pop-ui/foundation"),require("dayjs"),require("dayjs/locale/ko.js"),require("react"),require("dayjs/plugin/customParseFormat.js"),require("@dnd-kit/core"),require("@dnd-kit/sortable"),require("@mantine/dropzone"),require("react-easy-crop"),require("@dnd-kit/utilities"),require("lottie-react"),require("@mantine/notifications")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@mantine/core","@mantine/dates","@pop-ui/foundation","dayjs","dayjs/locale/ko.js","react","dayjs/plugin/customParseFormat.js","@dnd-kit/core","@dnd-kit/sortable","@mantine/dropzone","react-easy-crop","@dnd-kit/utilities","lottie-react","@mantine/notifications"],s):(D=typeof globalThis<"u"?globalThis:D||self,s(D.Core={},D.jsxRuntime,D.MantineCore,D.dates,D.foundation,D.dayjs,null,D.React,D.customParseFormat,D.core$1,D.sortable,D.dropzone,D.Cropper,D.utilities,D.Lottie,D.notifications))})(this,function(D,s,P,me,h,Y,fr,f,nt,ee,te,fe,ot,Be,at,le){"use strict";const st={sm:14,md:16,lg:18},V={Button:"styles-module__Button___7ywU9",Button__Inner:"styles-module__Button__Inner___s7vuY",Button__Label:"styles-module__Button__Label___xnZNh",Button__Section:"styles-module__Button__Section___7GPRl",Button__Loader:"styles-module__Button__Loader___AZg1v","Button--Small":"styles-module__Button--Small___9VzCE","Button--Medium":"styles-module__Button--Medium___35lhd","Button--Large":"styles-module__Button--Large___fbUio","Button--Primary":"styles-module__Button--Primary___1ZKgs",Button__Disabled:"styles-module__Button__Disabled___NUWy8","Button--PrimaryLine":"styles-module__Button--PrimaryLine___76iyF","Button--Basic":"styles-module__Button--Basic___sWKzj","Button--Warning":"styles-module__Button--Warning___8gZ6-","Button--Setting":"styles-module__Button--Setting___KNjZA","Button--Danger":"styles-module__Button--Danger___m9tbm","Button--Ghost":"styles-module__Button--Ghost___-zzS-"},he={inner:V.Button__Inner,label:V.Button__Label,section:V.Button__Section,loader:V.Button__Loader},lt={sm:V["Button--Small"],md:V["Button--Medium"],lg:V["Button--Large"]},it={primary:V["Button--Primary"],primaryLine:V["Button--PrimaryLine"],basic:V["Button--Basic"],danger:V["Button--Danger"],setting:V["Button--Setting"],warning:V["Button--Warning"],ghost:V["Button--Ghost"]},ct=(...e)=>e.filter(Boolean).join(" ")||void 0,_t=e=>{const r=(n,t)=>{const o=Object.keys(n).reduce((l,a)=>{const i=a,c=[n[i],t[i]].filter(Boolean).join(" ");return c&&(l[i]=c),l},{});return Object.keys(t).forEach(l=>{const a=l;!(a in n)&&t[a]&&(o[a]=t[a])}),o};return typeof e=="function"?(n,t,o)=>r(he,e(n,t,o)):typeof e=="object"&&e!==null&&!Array.isArray(e)?r(he,e):he};function ie({children:e,size:r="md",variant:n="primary",type:t="button",isLoading:o=!1,loading:l=!1,hideLabelOnLoading:a=!0,disabled:i=!1,className:c,classNames:m,loaderProps:p,..._}){const u=st[r],d=o||l,g=i||d;return s.jsxs(P.Button,{type:t,unstyled:!0,className:ct(V.Button,i?V.Button__Disabled:"",lt[r],it[n],c),classNames:_t(m),disabled:g,..._,children:[d&&s.jsx(P.Loader,{color:"currentColor",size:u,...p}),s.jsx("span",{className:V.Button__Label,children:d&&a?null:e})]})}const ge={"Checkbox--Small":"styles-module__Checkbox--Small___VZGlw","Checkbox--Medium":"styles-module__Checkbox--Medium___Vwpa3","Checkbox--Large":"styles-module__Checkbox--Large___ybTGE"},dt={sm:ge["Checkbox--Small"],md:ge["Checkbox--Medium"],lg:ge["Checkbox--Large"]},ut={sm:18,md:24,lg:32},pt=({size:e="md",...r})=>{const n=dt[e],t=ut[e];return s.jsx(P.Checkbox,{className:n,size:e,styles:{inner:{width:t,height:t}},...r})},K={CalendarDatePicker__Wrapper:"styles-module__CalendarDatePicker__Wrapper___n4ux3",CalendarDatePicker__DayContent:"styles-module__CalendarDatePicker__DayContent___2xr8Q",CalendarDatePicker__DayLabel:"styles-module__CalendarDatePicker__DayLabel___-4E1W",CalendarDatePicker__TodayIndicator:"styles-module__CalendarDatePicker__TodayIndicator___ij6hs",CalendarDatePicker__Day:"styles-module__CalendarDatePicker__Day___eYyiw",CalendarDatePicker__Header:"styles-module__CalendarDatePicker__Header___hGYbK",CalendarDatePicker__HeaderLevel:"styles-module__CalendarDatePicker__HeaderLevel___yuhOQ",CalendarDatePicker__HeaderControl:"styles-module__CalendarDatePicker__HeaderControl___gz5tC",CalendarDatePicker__HeaderControlIcon:"styles-module__CalendarDatePicker__HeaderControlIcon___OVuQp",CalendarDatePicker__Month:"styles-module__CalendarDatePicker__Month___8-Nvy",CalendarDatePicker__MonthRow:"styles-module__CalendarDatePicker__MonthRow___PihZV",CalendarDatePicker__MonthCell:"styles-module__CalendarDatePicker__MonthCell___bEPui",CalendarDatePicker__WeekdaysRow:"styles-module__CalendarDatePicker__WeekdaysRow___lbdgy",CalendarDatePicker__Weekday:"styles-module__CalendarDatePicker__Weekday___-Seq9"},mt=({excludedDays:e=[],excludedDates:r=[]})=>{const n=[],t=[];for(const a of r)typeof a=="string"?n.push(a):t.push(a);const o=n.map(a=>Y(a)).filter(a=>a.isValid()).map(a=>a.format("YYYY-MM-DD")),l=t.map(([a,i])=>[Y(a),Y(i)]).filter(([a,i])=>a.isValid()&&i.isValid());return a=>{const i=Y(a);if(!i.isValid())return!1;if(Array.isArray(e)&&e.includes(i.day())||o.includes(i.format("YYYY-MM-DD")))return!0;for(const[c,m]of l)if((i.isSame(c,"day")||i.isAfter(c,"day"))&&(i.isSame(m,"day")||i.isBefore(m,"day")))return!0;return!1}},ft=(e,r,n,t)=>{const o=Y(e),l=Y(r);for(const a of n)if(Array.isArray(a)){const i=Y(a[0]),c=Y(a[1]);if(!i.isValid()||!c.isValid())continue;if(!(l.isBefore(i,"day")||o.isAfter(c,"day")))return!0}for(const a of n)if(typeof a=="string"){const i=Y(a);if(!i.isValid())continue;if((i.isSame(o,"day")||i.isAfter(o,"day"))&&(i.isSame(l,"day")||i.isBefore(l,"day")))return!0}if(t.length>0){let a=o;for(;a.isBefore(l,"day")||a.isSame(l,"day");){if(t.includes(a.day()))return!0;a=a.add(1,"day")}}return!1},ne=(e="default")=>{switch(e){case"range":return[null,null];case"multiple":return[];default:return null}},Le=(e="default",r)=>r==null?ne(e):e==="range"?Array.isArray(r)?r:ne("range"):e==="multiple"?Array.isArray(r)?r:ne("multiple"):Array.isArray(r)?r[0]??null:r,ve=({type:e,externalValue:r,internalValue:n})=>r!==void 0?Le(e,r):n!==void 0?Le(e,n):ne(e),ye=(e,r)=>{const n=(t,o)=>{const l=Object.keys(t).reduce((a,i)=>{const c=i,m=t[c],p=o[c],_=[m,p].filter(Boolean).join(" ");return _&&(a[c]=_),a},{});return Object.keys(o).forEach(a=>{const i=a,c=o[i];!(i in t)&&c&&(l[i]=c)}),l};return typeof r=="function"?(t,o,l)=>n(e,r(t,o,l)):typeof r=="object"&&r!==null&&!Array.isArray(r)?n(e,r):e},ht=e=>{if(e==null)return null;if(Array.isArray(e)){for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(n instanceof Date)return Y(n).format("YYYY-MM-DD")}return null}return e instanceof Date?Y(e).format("YYYY-MM-DD"):null},gt={levelsGroup:K.CalendarDatePicker__Wrapper,calendarHeader:K.CalendarDatePicker__Header,calendarHeaderLevel:K.CalendarDatePicker__HeaderLevel,calendarHeaderControl:K.CalendarDatePicker__HeaderControl,calendarHeaderControlIcon:K.CalendarDatePicker__HeaderControlIcon,month:K.CalendarDatePicker__Month,monthCell:K.CalendarDatePicker__MonthCell,day:K.CalendarDatePicker__Day,monthRow:K.CalendarDatePicker__MonthRow,weekdaysRow:K.CalendarDatePicker__WeekdaysRow,weekday:K.CalendarDatePicker__Weekday},Ee=({excludedDates:e=[],excludedDays:r=[],type:n="default",value:t,onChange:o,highlightToday:l=!1,...a})=>{const{classNames:i,date:c,defaultDate:m,onDateChange:p,getDayProps:_,...u}=a,[d,g]=f.useState(()=>t??ne(n)),[y,C]=f.useState(()=>c||m||(ht(t??ne(n))??new Date)),k=f.useMemo(()=>mt({excludedDays:r,excludedDates:e}),[r,e]),x=f.useCallback(S=>{c===void 0&&C(S),p?.(S)},[c,p]),b=S=>{if(n==="range"&&Array.isArray(S)&&S.length===2){const[N,F]=S;if(N&&F&&ft(N,F,e,r)){const w=ne("range");g(w),o?.(w);return}}g(S),o?.(S)},W=ve({type:n,externalValue:t,internalValue:d}),O=f.useCallback(S=>{const N=Y(S).date(),w=Y(S).isSame(Y(),"day")&&l;return s.jsxs("span",{className:K.CalendarDatePicker__DayContent,children:[s.jsx("span",{className:K.CalendarDatePicker__DayLabel,children:N}),w&&s.jsx("span",{className:K.CalendarDatePicker__TodayIndicator,children:"오늘"})]})},[l]),j=ye(gt,i),Z=c??y,E=Y(Z??new Date).format("YYYY-MM"),I=f.useCallback(S=>{const N=_?.(S)??{},F=Y(S).format("YYYY-MM")!==E;return{...N,onClick:w=>{N.onClick?.(w),F&&x(S)}}},[E,_,x]);return s.jsx(me.DatePicker,{locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 M월",maxLevel:"month",type:n,previousIcon:s.jsx(h.IconChevronLeft,{}),nextIcon:s.jsx(h.IconChevronRight,{}),...u,size:"lg",onChange:b,weekendDays:[0],highlightToday:l,classNames:j,defaultDate:c===void 0?m:void 0,date:Z,onDateChange:x,getDayProps:I,value:W,excludeDate:k,renderDay:O})},T={DatePickerBase:"styles-module__DatePickerBase___yJlGe",DatePickerRoot:"styles-module__DatePickerRoot___HG6Zb","DatePicker--Small":"styles-module__DatePicker--Small___m8asv","DatePicker--Medium":"styles-module__DatePicker--Medium___Po2-B","DatePicker--Large":"styles-module__DatePicker--Large___oQ6EM",DatePicker__Wrapper:"styles-module__DatePicker__Wrapper___7X5ke",DatePicker__Input:"styles-module__DatePicker__Input___sTaqF",DatePicker__Placeholder:"styles-module__DatePicker__Placeholder___PZnzX",DatePicker__Section:"styles-module__DatePicker__Section___waCJM",DatePicker__Icon:"styles-module__DatePicker__Icon___fceRx",DatePicker__Dropdown:"styles-module__DatePicker__Dropdown___Iy9KE",DatePicker__DropdownArrow:"styles-module__DatePicker__DropdownArrow___zeIIm",DatePicker__Root:"styles-module__DatePicker__Root___2Q8qm",DatePicker__LevelsGroup:"styles-module__DatePicker__LevelsGroup___lrWsl",DatePicker__CalendarHeader:"styles-module__DatePicker__CalendarHeader___VI-Of",DatePicker__CalendarHeaderLevel:"styles-module__DatePicker__CalendarHeaderLevel___F4DtE",DatePicker__CalendarHeaderControl:"styles-module__DatePicker__CalendarHeaderControl___72yIl",DatePicker__CalendarHeaderControlIcon:"styles-module__DatePicker__CalendarHeaderControlIcon___CnQei",DatePicker__Month:"styles-module__DatePicker__Month___W7LuG",DatePicker__WeekdaysRow:"styles-module__DatePicker__WeekdaysRow___4NdYk",DatePicker__Weekday:"styles-module__DatePicker__Weekday___tL-rR",DatePicker__MonthRow:"styles-module__DatePicker__MonthRow___NSs67",DatePicker__MonthCell:"styles-module__DatePicker__MonthCell___iGYhy",DatePicker__Day:"styles-module__DatePicker__Day___7LDrl",DatePicker__TimeWrapper:"styles-module__DatePicker__TimeWrapper___BlHZZ",DatePicker__TimeInput:"styles-module__DatePicker__TimeInput___Acg-L",DatePicker__SubmitButton:"styles-module__DatePicker__SubmitButton___6DvfS"};Y.extend(nt);const yt={wrapper:T.DatePicker__Wrapper,input:T.DatePicker__Input,section:T.DatePicker__Section,placeholder:T.DatePicker__Placeholder,datePickerRoot:T.DatePicker__Root,levelsGroup:T.DatePicker__LevelsGroup,calendarHeader:T.DatePicker__CalendarHeader,calendarHeaderLevel:T.DatePicker__CalendarHeaderLevel,calendarHeaderControl:T.DatePicker__CalendarHeaderControl,calendarHeaderControlIcon:T.DatePicker__CalendarHeaderControlIcon,month:T.DatePicker__Month,weekdaysRow:T.DatePicker__WeekdaysRow,weekday:T.DatePicker__Weekday,monthRow:T.DatePicker__MonthRow,monthCell:T.DatePicker__MonthCell,day:T.DatePicker__Day,timeWrapper:T.DatePicker__TimeWrapper,timeInput:T.DatePicker__TimeInput,submitButton:T.DatePicker__SubmitButton},kt={dropdown:T.DatePicker__Dropdown,arrow:T.DatePicker__DropdownArrow},Ae=(...e)=>e.filter(Boolean).join(" ")||void 0,_e=e=>{if(e==null)return null;if(e instanceof Date)return e;if(typeof e=="string"&&e){const r=e.split("-").map(Number);if(r.length===3&&r[0]&&r[1]&&r[2])return new Date(r[0],r[1]-1,r[2])}return null},Ct=({size:e="md",type:r="default",withTime:n,className:t,popoverProps:o,rightSection:l,rightSectionWidth:a,value:i,defaultValue:c,onChange:m,placeholder:p,disabled:_,minDate:u,maxDate:d,displayValueFormat:g="YYYY년 MM월 DD일",valueFormat:y,excludedDates:C,excludedDays:k,highlightToday:x})=>{const b=y??(n?"YYYY-MM-DD HH:mm":"YYYY-MM-DD"),[W,O]=f.useState(!1),[j,Z]=f.useState(()=>h.parseDateValue(i??c,r,b)??ne(r));let E=T["DatePicker--Medium"],I=18,S=42;e==="sm"?(E=T["DatePicker--Small"],I=14,S=34):e==="lg"&&(E=T["DatePicker--Large"],I=24,S=50);const N=ye(kt,o?.classNames),F=l??s.jsx("span",{"aria-hidden":"true",className:T.DatePicker__Icon,children:s.jsx(h.IconCalendar,{size:I})});if(n){const B=M=>{if(!M)return null;const $=Y(M,b,!0);return $.isValid()?$.toDate():null},H=i!==void 0,q=H?B(i):null,v=B(c);return s.jsx(me.DateTimePicker,{className:Ae(T.DatePickerBase,T.DatePickerRoot,E,t),classNames:ye(yt,void 0),size:e,locale:"ko",firstDayOfWeek:0,monthLabelFormat:"YYYY년 MM월",valueFormat:"YYYY-MM-DD | a hh:mm",rightSection:F,rightSectionWidth:a??S,popoverProps:{offset:8,position:"bottom-start",withArrow:!0,arrowSize:10,arrowOffset:20,...o,classNames:N},value:H?q:void 0,defaultValue:H?void 0:v,onChange:M=>{m?.(M?Y(M).format(b):null)},placeholder:p,disabled:_,minDate:u,maxDate:d})}const w=i!=null?h.parseDateValue(i,r,b):void 0,A=ve({type:r,externalValue:w,internalValue:j}),z=h.formatDateDisplay(A,r,g),L=B=>{let H;if(r==="range"&&Array.isArray(B)){const q=B;H=[_e(q[0]??null),_e(q[1]??null)]}else r==="multiple"&&Array.isArray(B)?H=B.map(q=>_e(q)).filter(q=>q!==null):H=_e(B);Z(H),m?.(h.toValueString(H,r,b)),r==="default"&&H!=null&&O(!1),r==="range"&&Array.isArray(H)&&H[0]&&H[1]&&O(!1)};return s.jsx("div",{className:Ae(T.DatePickerBase,T.DatePickerRoot,E,t),children:s.jsxs(P.Popover,{opened:W,onClose:()=>O(!1),offset:8,position:"bottom-start",withArrow:!0,arrowSize:10,arrowOffset:20,...o,classNames:N,children:[s.jsx(P.Popover.Target,{children:s.jsx("div",{className:T.DatePicker__Wrapper,"data-expanded":W?!0:void 0,"data-disabled":_?!0:void 0,children:s.jsx(P.Input,{component:"button",type:"button",classNames:{input:T.DatePicker__Input,section:T.DatePicker__Section},onClick:()=>!_&&O(B=>!B),disabled:_,rightSection:F,rightSectionWidth:a??S,"data-expanded":W?!0:void 0,"data-disabled":_?!0:void 0,children:z?s.jsx("span",{children:z}):s.jsx("span",{className:T.DatePicker__Placeholder,children:p})})})}),s.jsx(P.Popover.Dropdown,{children:s.jsx(Ee,{type:r,value:A,onChange:L,excludedDates:C,excludedDays:k,highlightToday:x,minDate:u,maxDate:d})})]})})},J={"Dropdown--LeftLabel":"styles-module__Dropdown--LeftLabel___SFObq","Dropdown--TopLabel":"styles-module__Dropdown--TopLabel___-lPhr","Dropdown__Label--Small":"styles-module__Dropdown__Label--Small___xbzOR","Dropdown__Label--Medium":"styles-module__Dropdown__Label--Medium___YtJ2-","Dropdown__Label--Large":"styles-module__Dropdown__Label--Large___sCiJv","Dropdown__Tooltip--Small":"styles-module__Dropdown__Tooltip--Small___rkmaO","Dropdown__Tooltip--Medium":"styles-module__Dropdown__Tooltip--Medium___JTfzy","Dropdown__Tooltip--Large":"styles-module__Dropdown__Tooltip--Large___W-sUq","Dropdown--Small":"styles-module__Dropdown--Small___dRIK7","Dropdown--Medium":"styles-module__Dropdown--Medium___-HZoU","Dropdown--Large":"styles-module__Dropdown--Large___BvV3M",Dropdown__Description:"styles-module__Dropdown__Description___OQ8bF",Dropdown__ErrorMsg:"styles-module__Dropdown__ErrorMsg___xTP0Y"},Dt=({label:e,labelPosition:r="top",size:n="md",required:t,tooltip:o,tooltipPosition:l="top",errorMsg:a,description:i,...c})=>{const[m,p]=f.useState(!1);let _=J["Dropdown__Label--Medium"],u=J["Dropdown--Medium"],d=J["Dropdown__Tooltip--Medium"],g=18;return n==="sm"?(_=J["Dropdown__Label--Small"],u=J["Dropdown--Small"],d=J["Dropdown__Tooltip--Small"],g=14):n==="lg"&&(_=J["Dropdown__Label--Large"],u=J["Dropdown--Large"],d=J["Dropdown__Tooltip--Large"],g=24),s.jsxs("div",{className:r==="top"?J["Dropdown--TopLabel"]:J["Dropdown--LeftLabel"],children:[s.jsxs("div",{children:[e&&s.jsx(P.Input.Label,{required:t,className:_,children:e}),o&&s.jsx(P.Tooltip,{label:o,position:l,children:s.jsx("div",{className:d,children:s.jsx(h.IconInfoCircle,{size:n==="sm"?14:n==="lg"?20:16})})})]}),s.jsxs("div",{children:[s.jsx(P.Select,{...c,size:n,error:a,className:u,rightSection:m?s.jsx(h.IconChevronUp,{size:g}):s.jsx(h.IconChevronDown,{size:g}),onDropdownOpen:()=>p(!0),onDropdownClose:()=>p(!1),styles:{option:{"&[data-selected]":{"&, &:hover":{backgroundColor:h.ColorGray100,color:h.ColorBlack}}}}}),i&&s.jsx(P.Input.Description,{className:J.Dropdown__Description,children:i}),a&&s.jsx(P.Input.Error,{className:J.Dropdown__ErrorMsg,children:a})]})]})};function de(){return crypto.randomUUID()}function Pt(e,r,n){const t=[...e],[o]=t.splice(r,1);return t.splice(n,0,o),t}function xt(e,r,n){return n!=null&&e.length>=n?0:r!=null&&e.length<r?r-e.length:1}function St(e,r,n){return e.map(t=>{const o=t.position;return o==null?t:o===r?{...t,position:n}:r<n&&o>r&&o<=n?{...t,position:o-1}:r>n&&o>=n&&o<r?{...t,position:o+1}:t})}function Mt(e,r,n){const t=[...r].sort((i,c)=>i.name.localeCompare(c.name)),o=n!=null?n-e.length:1/0,a=t.slice(0,o).map(i=>({id:de(),file:i,url:URL.createObjectURL(i)}));return[...e,...a]}function Tt(e,r){const n=e.find(t=>t.id===r);return n?.url?.startsWith("blob:")&&URL.revokeObjectURL(n.url),e.filter(t=>t.id!==r)}function Ne(e,r,n){return e.map(t=>t.id!==r?t:(t.url?.startsWith("blob:")&&URL.revokeObjectURL(t.url),{...t,file:n,url:URL.createObjectURL(n)}))}function bt(e,r,n){return Ne(e,r,n)}function It(e,r,n){const t={id:de(),file:r,url:URL.createObjectURL(r),position:n};return[...e,t]}function wt(e){for(const r of e)r.url?.startsWith("blob:")&&URL.revokeObjectURL(r.url)}const Bt=e=>({...e?{}:{content:{borderRadius:"12px"}},title:{fontSize:"16px",fontWeight:"700",lineHeight:"150%",color:h.ColorGray900},header:{padding:"16px"},body:{paddingInline:0}}),Lt=(e,r)=>{if(typeof e=="function")return e;const n=Bt(r),t={...n,...e};return Object.keys(n).forEach(o=>{t[o]={...n[o],...e?.[o]}}),t},Fe=({size:e="md",width:r,withCloseButton:n=!1,fullScreen:t=!1,styles:o,...l})=>{let a=768;return e==="xs"?a=360:e==="sm"?a=544:e==="lg"?a=1e3:e==="xl"&&(a=1200),s.jsx(P.Modal,{size:r||a,fullScreen:t,styles:Lt(o,t),withCloseButton:n,closeButtonProps:{icon:s.jsx(h.IconX,{size:18,color:h.ColorGray600})},...l})};async function vt(e,r){const n=e.url??"";if(!n)return null;const t=await new Promise((i,c)=>{const m=new Image;m.crossOrigin="anonymous",m.onload=()=>i(m),m.onerror=c,m.src=n}),o=document.createElement("canvas");o.width=r.width,o.height=r.height;const l=o.getContext("2d");if(!l)return null;l.drawImage(t,r.x,r.y,r.width,r.height,0,0,r.width,r.height);const a=e.file?.name??e.url?.split("/").pop()??"image";return new Promise((i,c)=>{o.toBlob(m=>{m?i(new File([m],`cropped_${a}`,{type:"image/jpeg"})):c(new Error("Failed to create blob"))},"image/jpeg")})}function Et({item:e,isOpen:r,aspect:n=1,onClose:t,onSubmit:o}){const[l,a]=f.useState({x:0,y:0}),[i,c]=f.useState(1),[m,p]=f.useState(null),[_,u]=f.useState(!1),d=async()=>{if(!(!m||!e)){u(!0);try{const g=await vt(e,m);g&&o(g)}finally{u(!1)}}};return s.jsx(Fe,{opened:r&&!!e,onClose:t,size:"md",title:"이미지 수정",withCloseButton:!0,children:s.jsxs(P.Stack,{children:[s.jsx("div",{style:{position:"relative",height:320,background:h.ColorWhite},children:s.jsx(ot,{image:e?.url??"",crop:l,zoom:i,aspect:n,minZoom:.5,maxZoom:10,objectFit:"cover",onCropChange:a,onZoomChange:c,onCropComplete:(g,y)=>p(y),style:{containerStyle:{backgroundColor:h.ColorWhite}}})}),s.jsxs(P.Group,{justify:"flex-end",style:{padding:"0 16px"},children:[s.jsx(ie,{variant:"basic",onClick:t,children:"취소"}),s.jsx(ie,{variant:"primary",isLoading:_,onClick:d,children:"적용하기"})]})]})},e?.id)}const ae={Container:"styles-module__Container___ZyeJM",TileImage:"styles-module__TileImage___6aKmW",EditButton:"styles-module__EditButton___1Xyg9",PlaceholderText:"styles-module__PlaceholderText___nhLhy",PlaceholderTextError:"styles-module__PlaceholderTextError___jYZ8j"},Q={TileContainer:"styles-module__TileContainer___5-y01",DeleteButton:"styles-module__DeleteButton___0zsXm",Tile:"styles-module__Tile___3Cezo",TileDragOver:"styles-module__TileDragOver___e7GXF",LoadingOverlay:"styles-module__LoadingOverlay___4CyDQ",ActionBar:"styles-module__ActionBar___mJYpe",DragHandle:"styles-module__DragHandle___lzKhb",LinkButton:"styles-module__LinkButton___bISyz",DropzoneOuter:"styles-module__DropzoneOuter___BIO2N",Placeholder:"styles-module__Placeholder___q30Yw",PlaceholderError:"styles-module__PlaceholderError___fCOYe"};function ue({width:e,height:r,isError:n,isLoading:t,accept:o,multiple:l,onDrop:a,children:i}){return s.jsx("div",{className:Q.DropzoneOuter,children:s.jsx(fe.Dropzone,{onDrop:a,accept:o,multiple:l,disabled:t,className:n?Q.PlaceholderError:Q.Placeholder,style:{width:e,height:r},children:i})})}const At=e=>{const{isSorting:r,wasDragging:n}=e;return r||n?!1:te.defaultAnimateLayoutChanges(e)};function Oe({id:e,children:r}){const{setNodeRef:n,transform:t,transition:o,isOver:l}=te.useSortable({id:e,animateLayoutChanges:At});return s.jsx("div",{ref:n,style:{transform:Be.CSS.Transform.toString(t),transition:o,opacity:l?.7:1},children:r})}function $e({id:e,totalCount:r,width:n,height:t,readOnly:o,isLoading:l,itemIsLoading:a,canDelete:i,hasLink:c,linkUrl:m,onLinkClick:p,onDelete:_,deleteAriaLabel:u="삭제",actionBarExtra:d,onTileClick:g,onFileDrop:y,children:C}){const[k,x]=f.useState(!1),b=L=>{!y||o||l||a||L.preventDefault()},W=L=>{!y||o||l||a||(L.preventDefault(),x(!0))},O=L=>{L.currentTarget.contains(L.relatedTarget)||x(!1)},j=L=>{if(L.preventDefault(),x(!1),!y||o||l||a)return;const B=L.dataTransfer.files[0];B&&y(B)},Z=L=>{const{isSorting:B,wasDragging:H}=L;return B||H?!1:te.defaultAnimateLayoutChanges(L)},{attributes:E,listeners:I,setNodeRef:S,transform:N,transition:F,isDragging:w}=te.useSortable({id:e,disabled:o,animateLayoutChanges:Z}),A=!o&&r>1||c&&!!m&&!!p||!!d,z=o||l||a||!g?"default":"pointer";return s.jsxs("div",{ref:S,className:Q.TileContainer,style:{transform:Be.CSS.Transform.toString(N),transition:F,opacity:w?.4:1},children:[!o&&i&&!l&&s.jsx("button",{type:"button",className:Q.DeleteButton,onClick:_,"aria-label":u,children:s.jsx(h.IconXCircle,{size:24})}),s.jsxs("div",{className:`${Q.Tile}${k?` ${Q.TileDragOver}`:""}`,style:{width:n,height:t,cursor:z},onClick:()=>!o&&!l&&!a&&g?.(),onDragOver:b,onDragEnter:W,onDragLeave:O,onDrop:j,children:[C,(l||a)&&s.jsx("div",{className:Q.LoadingOverlay,children:s.jsx(P.Loader,{size:n/6,color:h.ColorAqua500})})]}),A&&s.jsxs("div",{className:Q.ActionBar,children:[!o&&r>1&&s.jsx("button",{type:"button",className:Q.DragHandle,...E,...I,"aria-label":"드래그로 순서 변경",children:s.jsx(h.IconDragMenu,{size:20,color:h.ColorGray600})}),c&&m&&p&&s.jsx("button",{type:"button",className:Q.LinkButton,onClick:p,children:"링크"}),d]})]})}function Nt({items:e,onReorder:r}){return{sensors:ee.useSensors(ee.useSensor(ee.PointerSensor,{activationConstraint:{distance:8}}),ee.useSensor(ee.KeyboardSensor,{coordinateGetter:te.sortableKeyboardCoordinates})),handleDragEnd:o=>{const{active:l,over:a}=o;if(!a||l.id===a.id)return;const i=e.findIndex(m=>m.id===l.id),c=e.findIndex(m=>m.id===a.id);i!==-1&&c!==-1&&r(i,c)}}}const ke="__slot-";function ze({value:e,length:r,minLength:n,maxLength:t,onChange:o}){const l=r??n,a=r??t,i=l!=null&&a!=null&&l===a,c=i?0:xt(e,l,a),m=i?Array.from({length:a},(C,k)=>`${ke}${k}`):[],p=i?m:e.map(C=>C.id),{sensors:_,handleDragEnd:u}=Nt({items:e,onReorder:(C,k)=>{const x=Pt(e,C,k),b=e[C];o?.(x,{action:"reorder",itemId:b.id,index:k,previousIndex:C,nextIndex:k})}});return{isPositionMode:i,resolvedMinLength:l,resolvedMaxLength:a,placeholderCount:c,slotIds:m,sortableItems:p,sensors:_,handleDragEnd:i?C=>{const{active:k,over:x}=C;if(!x||k.id===x.id)return;const b=Number(String(k.id).replace(ke,"")),W=Number(String(x.id).replace(ke,"")),O=e.find(Z=>Z.position===b);if(!O)return;const j=St(e,b,W);o?.(j,{action:"reorder",itemId:O.id,index:W,previousIndex:b,nextIndex:W})}:u,getMetaIndex:C=>{const k=e.find(x=>x.id===C);return i&&k?k.position??0:e.findIndex(x=>x.id===C)}}}function Ft(e){return e?e.join(","):"image/*"}function He({item:e,sortableId:r,index:n,totalCount:t,width:o,height:l,accept:a,canDelete:i,hasLink:c,hasEdit:m,readOnly:p,isLoading:_,onLinkClick:u,onDelete:d,onReplace:g,onEdit:y}){const C=f.useRef(null);return s.jsxs($e,{id:r??e.id,totalCount:t,width:o,height:l,readOnly:p,isLoading:_,itemIsLoading:e.isLoading,canDelete:i,hasLink:c,linkUrl:e.url,onLinkClick:u?()=>u(e):void 0,onDelete:()=>d(e.id),deleteAriaLabel:"이미지 삭제",onTileClick:()=>C.current?.click(),onFileDrop:k=>{if(a){if(!a.includes(k.type))return}else if(!k.type.startsWith("image/"))return;g(e.id,k)},actionBarExtra:!p&&m?s.jsx(ie,{variant:"basic",size:"sm","aria-label":"이미지 편집",className:ae.EditButton,onClick:()=>y(e),children:"편집"}):void 0,children:[s.jsx("input",{ref:C,type:"file",accept:Ft(a),style:{display:"none"},onChange:k=>{const x=k.target.files?.[0];x&&g(e.id,x),k.target.value=""}}),s.jsx("img",{src:e.url,alt:e.file?.name??`이미지 ${n+1}`,className:ae.TileImage})]})}const Ot=({value:e=[],onChange:r,accept:n,length:t,width:o=160,height:l=200,placeholder:a="이미지를 넣어주세요",hasIcon:i=!0,hasLink:c=!1,onLinkClick:m,hasEdit:p=!1,canDelete:_=!0,minLength:u,maxLength:d,errorMsg:g,isLoading:y,readOnly:C,gap:k=8})=>{const{isPositionMode:x,resolvedMaxLength:b,placeholderCount:W,slotIds:O,sortableItems:j,sensors:Z,handleDragEnd:E,getMetaIndex:I}=ze({value:e,length:t,minLength:u,maxLength:d,onChange:r}),S=!!g,[N,F]=f.useState(null),w=f.useRef(e);f.useEffect(()=>{w.current=e},[e]),f.useEffect(()=>()=>wt(w.current),[]);const A=v=>{if(C)return;const M=e.length,$=Mt(e,v,b);$.length!==M&&r?.($,{action:"create",itemId:$[M].id,index:M})},z=(v,M)=>{if(C)return;const $=M[0];if(!$)return;const X=It(e,$,v);r?.(X,{action:"create",itemId:X[X.length-1].id,index:v})},L=v=>{if(C)return;const M=I(v),$=Tt(e,v);r?.($,{action:"delete",itemId:v,index:M})},B=(v,M)=>{if(C)return;const $=I(v),X=Ne(e,v,M);r?.(X,{action:"replace",itemId:v,index:$})},H=v=>{if(!N)return;const M=N.id,$=I(M),X=bt(e,M,v);F(null),r?.(X,{action:"crop",itemId:M,index:$})},q=v=>{const M=typeof a=="function"?a(v):a;return typeof M!="string"?M:M.split(`
2
+ `).map(($,X)=>s.jsx("span",{children:$},X))};return s.jsxs("div",{children:[s.jsx(ee.DndContext,{sensors:Z,collisionDetection:ee.closestCenter,onDragEnd:E,children:s.jsx(te.SortableContext,{items:j,strategy:te.rectSortingStrategy,children:s.jsx("div",{className:ae.Container,style:{gap:k},children:x?Array.from({length:b},(v,M)=>{const $=O[M],X=e.find(we=>we.position===M);return X?s.jsx(He,{item:X,sortableId:$,index:M,totalCount:b,width:o,height:l,accept:n,canDelete:_,hasLink:c,hasEdit:p,readOnly:C??!1,isLoading:y,onLinkClick:m,onDelete:L,onReplace:B,onEdit:F},$):!C&&s.jsx(Oe,{id:$,children:s.jsxs(ue,{onDrop:we=>z(M,we),accept:n??fe.IMAGE_MIME_TYPE,multiple:!1,isLoading:y,isError:S,width:o,height:l,children:[i&&s.jsx(h.IconPhoto,{size:36,color:S?h.ColorRed700:h.ColorAqua700}),a&&s.jsx("div",{className:`${ae.PlaceholderText}${S?` ${ae.PlaceholderTextError}`:""}`,children:q(M)})]})},$)}):s.jsxs(s.Fragment,{children:[e.map((v,M)=>s.jsx(He,{item:v,index:M,totalCount:e.length,width:o,height:l,accept:n,canDelete:_,hasLink:c,hasEdit:p,readOnly:C??!1,isLoading:y,onLinkClick:m,onDelete:L,onReplace:B,onEdit:F},v.id)),!C&&Array.from({length:W},(v,M)=>s.jsxs(ue,{onDrop:A,accept:n??fe.IMAGE_MIME_TYPE,multiple:b!==1,isLoading:y,isError:S,width:o,height:l,children:[i&&s.jsx(h.IconPhoto,{size:36,color:S?h.ColorRed700:h.ColorAqua700}),a&&s.jsx("div",{className:`${ae.PlaceholderText}${S?` ${ae.PlaceholderTextError}`:""}`,children:q(M)})]},`placeholder-${M}`))]})})})}),S&&s.jsx(P.Input.Error,{mt:8,children:g}),p&&s.jsx(Et,{item:N,isOpen:!!N,onClose:()=>F(null),onSubmit:H})]})};function We(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const r=e;return"v"in r&&"fr"in r&&"ip"in r&&"op"in r&&"w"in r&&"h"in r&&"layers"in r&&Array.isArray(r.layers)}function Ce(e){return new Promise(r=>{const n=new FileReader;n.onload=t=>{try{const o=JSON.parse(t.target?.result);r(We(o)?o:null)}catch{r(null)}},n.onerror=()=>r(null),n.readAsText(e)})}function $t(e,r,n){const t=[...r].sort((i,c)=>i.name.localeCompare(c.name)),o=n!=null?n-e.length:1/0,a=t.slice(0,o).map(i=>({id:de(),file:i}));return[...e,...a]}function zt(e,r){return e.filter(n=>n.id!==r)}function Ht(e,r,n){const t={id:de(),file:r,position:n};return[...e,t]}const se={Container:"styles-module__Container___cJqG-",Empty:"styles-module__Empty___gexrS",PlaceholderText:"styles-module__PlaceholderText___x2ya0",PlaceholderTextError:"styles-module__PlaceholderTextError___i8VXv"},pe={Toast:"styles-module__Toast___ZqZzU",Toast__Icon:"styles-module__Toast__Icon___PWXSy",Toast__Body:"styles-module__Toast__Body___wezPs",Toast__Message:"styles-module__Toast__Message___NFsgm"},Ye=e=>typeof e=="string"?{message:e}:e,Ze=(e,r)=>{const{autoClose:n,icon:t,message:o}=Ye(e);return{id:r,message:s.jsx("div",{className:pe.Toast__Message,children:o}),icon:t,autoClose:n,classNames:{root:pe.Toast,body:pe.Toast__Body,icon:pe.Toast__Icon},withCloseButton:!1,withBorder:!1}},oe=e=>{const r=Ye(e);le.notifications.show(Ze(e,r.id))};oe.update=(e,r)=>{le.notifications.update(Ze(r,e))},oe.hide=e=>{le.notifications.hide(e)},oe.clean=()=>{le.notifications.clean()};const Ve={"application/json":[".json"]};function Ue({item:e,sortableId:r,totalCount:n,width:t,height:o,readOnly:l,isLoading:a,canDelete:i,hasLink:c,onLinkClick:m,onDelete:p}){const u=!e.animationData&&!!(e.file||e.url)?`${e.id}|${e.file?`${e.file.name}:${e.file.size}`:e.url??""}`:"",[d,g]=f.useState({key:"",data:null}),y=e.animationData??(d.key===u?d.data:null),C=!!u&&d.key!==u;return f.useEffect(()=>{if(!u)return;let k=!1;return(e.file?Ce(e.file):fetch(e.url).then(b=>b.json()).then(b=>We(b)?b:null)).then(b=>{k||g({key:u,data:b})}).catch(()=>{k||g({key:u,data:null})}),()=>{k=!0}},[u,e.file,e.url]),s.jsx($e,{id:r??e.id,totalCount:n,width:t,height:o,readOnly:l,isLoading:a,itemIsLoading:e.isLoading||C,canDelete:i,hasLink:c,linkUrl:e.url,onLinkClick:m?()=>m(e):void 0,onDelete:()=>p(e.id),deleteAriaLabel:"Lottie 삭제",children:y?s.jsx(at,{animationData:y,loop:!0,autoplay:!0,style:{width:t,height:o,display:"block"}}):s.jsx("div",{className:se.Empty,style:{width:t,height:o}})})}const Wt=({value:e=[],onChange:r,width:n=160,height:t=200,placeholder:o="Lottie JSON 파일을 넣어주세요",hasIcon:l=!0,hasLink:a=!1,onLinkClick:i,length:c,minLength:m,maxLength:p,errorMsg:_,isLoading:u,readOnly:d,gap:g=8,canDelete:y=!0})=>{const{isPositionMode:C,resolvedMaxLength:k,placeholderCount:x,slotIds:b,sortableItems:W,sensors:O,handleDragEnd:j,getMetaIndex:Z}=ze({value:e,length:c,minLength:m,maxLength:p,onChange:r}),E=!!_,I=async w=>{if(d)return;const A=[...w].sort((v,M)=>v.name.localeCompare(M.name)),z=await Promise.all(A.map(Ce));let L=0;const B=A.filter((v,M)=>z[M]!==null?!0:(L++,!1));if(L>0&&oe({id:"invalid-lottie-files",message:L===1?"유효하지 않은 Lottie JSON 파일입니다":`${L}개의 파일이 유효하지 않은 Lottie JSON입니다`}),B.length===0)return;const H=e.length,q=$t(e,B,k);q.length!==H&&r?.(q,{action:"create",itemId:q[H].id,index:H})},S=async(w,A)=>{if(d)return;const z=A[0];if(!z)return;if(!await Ce(z)){oe({id:"invalid-lottie-files",message:"유효하지 않은 Lottie JSON 파일입니다"});return}const B=Ht(e,z,w);r?.(B,{action:"create",itemId:B[B.length-1].id,index:w})},N=w=>{if(d)return;const A=Z(w),z=zt(e,w);r?.(z,{action:"delete",itemId:w,index:A})},F=w=>{const A=typeof o=="function"?o(w):o;return typeof A!="string"?A:A.split(`
3
+ `).map((z,L)=>s.jsx("span",{children:z},L))};return s.jsxs("div",{children:[s.jsx(ee.DndContext,{sensors:O,collisionDetection:ee.closestCenter,onDragEnd:j,children:s.jsx(te.SortableContext,{items:W,strategy:te.rectSortingStrategy,children:s.jsx("div",{className:se.Container,style:{gap:g},children:C?Array.from({length:k},(w,A)=>{const z=b[A],L=e.find(B=>B.position===A);return L?s.jsx(Ue,{item:L,sortableId:z,totalCount:k,width:n,height:t,readOnly:d??!1,isLoading:u,canDelete:y,hasLink:a,onLinkClick:i,onDelete:N},z):!d&&s.jsx(Oe,{id:z,children:s.jsxs(ue,{onDrop:B=>S(A,B),accept:Ve,multiple:!1,isLoading:u,isError:E,width:n,height:t,children:[l&&s.jsx(h.IconPhoto,{size:36,color:E?h.ColorRed700:h.ColorAqua700}),o&&s.jsx("div",{className:`${se.PlaceholderText}${E?` ${se.PlaceholderTextError}`:""}`,children:F(A)})]})},z)}):s.jsxs(s.Fragment,{children:[e.map(w=>s.jsx(Ue,{item:w,totalCount:e.length,width:n,height:t,readOnly:d??!1,isLoading:u,canDelete:y,hasLink:a,onLinkClick:i,onDelete:N},w.id)),!d&&Array.from({length:x},(w,A)=>s.jsxs(ue,{onDrop:I,accept:Ve,multiple:k!==1,isLoading:u,isError:E,width:n,height:t,children:[l&&s.jsx(h.IconPhoto,{size:36,color:E?h.ColorRed700:h.ColorAqua700}),o&&s.jsx("div",{className:`${se.PlaceholderText}${E?` ${se.PlaceholderTextError}`:""}`,children:F(A)})]},`placeholder-${A}`))]})})})}),E&&s.jsx(P.Input.Error,{mt:8,children:_})]})},ce={Pagination:"style-module__Pagination___xcR-Q",Pagination__PageIndex:"style-module__Pagination__PageIndex___50SZJ","Pagination__PageIndex--Active":"style-module__Pagination__PageIndex--Active___mSIwS",Pagination__Arrow:"style-module__Pagination__Arrow___74vp3"},Yt=({currentPageIdx:e,rowsPerPage:r,totalLength:n,paginationSize:t,onPageChange:o,...l})=>{const[a,i]=f.useState(e),c=r||50,m=n||1,p=t||5;f.useEffect(()=>{i(e)},[e]);const _=()=>{o&&o(a-(a%p+1)),i(d=>d-(d%p+1))},u=()=>{o&&o(a+p-a%p),i(d=>d+p-d%p)};return s.jsxs("div",{...l,className:ce.Pagination,children:[a>=p?s.jsx("button",{className:ce.Pagination__Arrow,onClick:_,children:s.jsx(h.IconChevronLeft,{size:20})}):null,new Array(p).fill(0).map((d,g)=>{const y=Math.floor(a/p)*p+g+1;if(!(y>Math.ceil(m/c)))return s.jsx("button",{className:a===y-1?ce["Pagination__PageIndex--Active"]:ce.Pagination__PageIndex,onClick:()=>{i(y-1),o&&o(y-1)},children:y},`pagination_${g}`)}),Math.floor(a/p)*p+p<Math.ceil(m/c)?s.jsx("button",{className:ce.Pagination__Arrow,onClick:u,children:s.jsx(h.IconChevronRight,{size:20})}):null]})},De={"Radio--Small":"styles-module__Radio--Small___izWI2","Radio--Medium":"styles-module__Radio--Medium___dwZfV","Radio--Large":"styles-module__Radio--Large___1gLra"},Zt={sm:De["Radio--Small"],md:De["Radio--Medium"],lg:De["Radio--Large"]},Vt={sm:18,md:24,lg:32},Ut=({size:e="md",...r})=>{const n=Zt[e],t=Vt[e];return s.jsx(P.Radio,{className:n,size:e,styles:{inner:{width:t,height:t}},...r})},G={"SearchBar--LeftLabel":"styles-module__SearchBar--LeftLabel___CeYTM","SearchBar--TopLabel":"styles-module__SearchBar--TopLabel___spN3I","SearchBar__Label--Small":"styles-module__SearchBar__Label--Small___zS1L2","SearchBar__Label--Medium":"styles-module__SearchBar__Label--Medium___Fk0Ao","SearchBar__Label--Large":"styles-module__SearchBar__Label--Large___xTOYL","SearchBar__Tooltip--Small":"styles-module__SearchBar__Tooltip--Small___YhmEr","SearchBar__Tooltip--Medium":"styles-module__SearchBar__Tooltip--Medium___4JhOv","SearchBar__Tooltip--Large":"styles-module__SearchBar__Tooltip--Large___IEoPv",SearchBar__Wrapper:"styles-module__SearchBar__Wrapper___oq49s","SearchBar--Small":"styles-module__SearchBar--Small___SY9CN","SearchBar--Medium":"styles-module__SearchBar--Medium___vLP08","SearchBar--Large":"styles-module__SearchBar--Large___JHfHP",SearchBar__Description:"styles-module__SearchBar__Description___vucS-",SearchBar__ErrorMsg:"styles-module__SearchBar__ErrorMsg___TOeoy",SearchBar__ClearButton:"styles-module__SearchBar__ClearButton___S-y4P"},jt=({label:e,labelPosition:r="top",size:n="md",required:t,tooltip:o,tooltipPosition:l="top",errorMsg:a,description:i,onChange:c,onClear:m,...p})=>{const[_,u]=f.useState(0);let d=G["SearchBar__Label--Medium"],g=G["SearchBar--Medium"],y=G["SearchBar__Tooltip--Medium"];n==="sm"?(d=G["SearchBar__Label--Small"],g=G["SearchBar--Small"],y=G["SearchBar__Tooltip--Small"]):n==="lg"&&(d=G["SearchBar__Label--Large"],g=G["SearchBar--Large"],y=G["SearchBar__Tooltip--Large"]);const C=f.useCallback(k=>{c&&(u(k?.length),c(k))},[c]);return s.jsxs("div",{className:r==="top"?G["SearchBar--TopLabel"]:G["SearchBar--LeftLabel"],children:[s.jsxs("div",{children:[e&&s.jsx(P.Input.Label,{required:t,className:d,children:e}),o&&s.jsx(P.Tooltip,{label:o,position:l,children:s.jsx("div",{className:y,children:s.jsx(h.IconInfoCircle,{size:n==="sm"?14:n==="lg"?20:16})})})]}),s.jsxs("div",{children:[s.jsx("div",{className:G.SearchBar__Wrapper,children:s.jsx(P.Autocomplete,{...p,size:n,error:a,className:g,onChange:C,leftSection:s.jsx(h.IconSearch,{size:n==="sm"?16:n==="lg"?24:20}),rightSection:m&&_>0?s.jsx("div",{className:G.SearchBar__ClearButton,onClick:m,children:s.jsx(h.IconX,{size:n==="sm"?16:n==="lg"?24:20})}):void 0})}),i&&s.jsx(P.Input.Description,{className:G.SearchBar__Description,children:i}),a&&s.jsx(P.Input.Error,{className:G.SearchBar__ErrorMsg,children:a})]})]})},Pe={"SegmentButton--Small":"styles-module__SegmentButton--Small___o0Y3t","SegmentButton--Medium":"styles-module__SegmentButton--Medium___EgCJm","SegmentButton--Large":"styles-module__SegmentButton--Large___Ym86C"},Gt=({size:e="md",radius:r=h.BorderRadius150,...n})=>{let t=Pe["SegmentButton--Medium"];return e==="sm"?t=Pe["SegmentButton--Small"]:e==="lg"&&(t=Pe["SegmentButton--Large"]),s.jsx(P.SegmentedControl,{className:t,size:e,radius:r,withItemsBorders:!1,...n})},je={Tab__TitleList:"styles-module__Tab__TitleList___urHWH",Tab__BorderBottom:"styles-module__Tab__BorderBottom___eMTpl"},qt=({tabList:e=[],containerPaddingTop:r,...n})=>s.jsxs(P.Tabs,{...n,children:[s.jsx(P.Tabs.List,{className:je.Tab__TitleList,children:e?.map((t,o)=>s.jsxs(P.Tabs.Tab,{value:t.value,leftSection:t.icon,children:[t.title,s.jsx("div",{className:je.Tab__BorderBottom})]},`tab_${o}`))}),e?.map((t,o)=>s.jsx(P.Tabs.Panel,{value:t.value,pt:r,children:t.body},`tab_panel_${o}`))]}),U={"TextField--LeftLabel":"styles-module__TextField--LeftLabel___hiNn3","TextField--TopLabel":"styles-module__TextField--TopLabel___V2otc","TextField__Label--Small":"styles-module__TextField__Label--Small___NkKKA","TextField__Label--Medium":"styles-module__TextField__Label--Medium___IoJd-","TextField__Label--Large":"styles-module__TextField__Label--Large___GMy74","TextField__Tooltip--Small":"styles-module__TextField__Tooltip--Small___GmQHE","TextField__Tooltip--Medium":"styles-module__TextField__Tooltip--Medium___5P3nA","TextField__Tooltip--Large":"styles-module__TextField__Tooltip--Large___YSCfu",TextField__Wrapper:"styles-module__TextField__Wrapper___u6p5Z",TextField__TextCounter:"styles-module__TextField__TextCounter___u1jM5","TextField--Textarea":"styles-module__TextField--Textarea___C2DL5","TextField--Small":"styles-module__TextField--Small___iuH4t","TextField--Medium":"styles-module__TextField--Medium___snYod","TextField--Large":"styles-module__TextField--Large___JoSYk",TextField__Description:"styles-module__TextField__Description___J-kXP",TextField__ErrorMsg:"styles-module__TextField__ErrorMsg___fa6f6",TextField__ClearButton:"styles-module__TextField__ClearButton___bB5Ew"},Kt=e=>typeof e=="string"?e.length:typeof e=="number"?String(e).length:Array.isArray(e)?e.join("").length:0,Jt=e=>{const{label:r,labelPosition:n="top",size:t="md",required:o,tooltip:l,tooltipPosition:a="top",errorMsg:i,description:c,textarea:m=!1,maxTextCount:p,onChange:_,onClear:u,...d}=e,g="minRows"in e?e.minRows:void 0,{value:y,defaultValue:C,...k}=d,x=y!==void 0,[b,W]=f.useState(String(y??C??"")),O=x?y:b,j=Kt(O);let Z=U["TextField__Label--Medium"],E=U["TextField--Medium"],I=U["TextField__Tooltip--Medium"];t==="sm"?(Z=U["TextField__Label--Small"],E=U["TextField--Small"],I=U["TextField__Tooltip--Small"]):t==="lg"&&(Z=U["TextField__Label--Large"],E=U["TextField--Large"],I=U["TextField__Tooltip--Large"]);const S=f.useCallback(F=>{const w=F.currentTarget.value;p&&w.length>p||(x||W(w),_&&_(F))},[x,p,_]),N=f.useCallback(()=>{x||W(""),u?.()},[x,u]);return s.jsxs("div",{className:n==="top"?U["TextField--TopLabel"]:U["TextField--LeftLabel"],children:[s.jsxs("div",{children:[r&&s.jsx(P.Input.Label,{required:o,className:Z,children:r}),l&&s.jsx(P.Tooltip,{label:l,position:a,children:s.jsx("div",{className:I,children:s.jsx(h.IconInfoCircle,{size:t==="sm"?14:t==="lg"?20:16})})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:U.TextField__Wrapper,children:[m?s.jsx(P.Textarea,{className:U["TextField--Textarea"],size:t,minRows:g,error:i,onChange:S,value:O,...k}):s.jsx(P.Input,{className:E,error:i,onChange:S,value:O,rightSection:u&&j>0?s.jsx("button",{type:"button",className:U.TextField__ClearButton,"aria-label":"입력 내용 지우기",onClick:N,children:s.jsx(h.IconX,{size:t==="sm"?16:t==="lg"?24:20})}):void 0,...k}),p&&p>0&&s.jsx("span",{className:U.TextField__TextCounter,children:`${j}/${p}`})]}),c&&s.jsx(P.Input.Description,{className:U.TextField__Description,children:c}),i&&s.jsx(P.Input.Error,{className:U.TextField__ErrorMsg,children:i})]})]})},xe={"TimePicker--Small":"styles-module__TimePicker--Small___nHQa1","TimePicker--Medium":"styles-module__TimePicker--Medium___E9-rF","TimePicker--Large":"styles-module__TimePicker--Large___I0M7V"},Xt=({size:e="md",...r})=>{const n=f.useRef(null);let t=xe["TimePicker--Medium"],o=18;return e==="sm"?(t=xe["TimePicker--Small"],o=14):e==="lg"&&(t=xe["TimePicker--Large"],o=24),s.jsx(me.TimeInput,{ref:n,className:t,size:e,...r,rightSection:s.jsx(P.ActionIcon,{bg:"transparent",onClick:()=>{n.current?.showPicker?.()},children:s.jsx(h.IconClock,{size:o})})})},Se={"Toggle--Small":"styles-module__Toggle--Small___sOjUd","Toggle--Medium":"styles-module__Toggle--Medium___yIb8v","Toggle--Large":"styles-module__Toggle--Large___ZOJj1"},Qt=({size:e="md",labelPosition:r="right",disabled:n,checked:t,defaultChecked:o,onChange:l,...a})=>{const i=t!==void 0,[c,m]=f.useState(o??!1),p=i?t:c;let _=Se["Toggle--Medium"],u=50;e==="sm"?(_=Se["Toggle--Small"],u=38):e==="lg"&&(_=Se["Toggle--Large"],u=67);const d=f.useCallback(g=>{l&&l(g),i||m(g?.target?.checked)},[i,l]);return s.jsx(P.Switch,{className:_,size:e,labelPosition:r,disabled:n,checked:t,defaultChecked:o,onChange:d,styles:()=>({track:{backgroundColor:!n&&p?`${h.ColorAqua500} !important`:void 0,borderColor:!n&&p?`${h.ColorAqua500} !important`:void 0,width:u}}),...a})},Me={Tooltip__Body:"styles-module__Tooltip__Body___i1OTG",Tooltip__Title:"styles-module__Tooltip__Title___E0LoV",Tooltip__Content:"styles-module__Tooltip__Content___lU5gr"},Rt=({title:e,content:r,maw:n=280,multiline:t=!0,...o})=>s.jsx(P.Tooltip,{...o,maw:n,multiline:t,label:s.jsxs("div",{className:Me.Tooltip__Body,children:[e&&s.jsx("span",{className:Me.Tooltip__Title,children:e}),s.jsx("span",{className:Me.Tooltip__Content,children:r})]})}),er=e=>{const{name:r,icon:n}=e;return`
4
4
  <div class="pin-marker">
5
5
  ${n?`<img src="${n}" alt="${r}" width="40" height="40" />`:`
6
6
  <svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -12,7 +12,7 @@
12
12
  `}
13
13
  <div class="pin-marker-name">${r}</div>
14
14
  </div>
15
- `},Rt=e=>{const{discountRate:r,price:n,originalPrice:t,category:o,active:l,title:a}=e;return`
15
+ `},tr=e=>{const{discountRate:r,price:n,originalPrice:t,category:o,active:l,title:a}=e;return`
16
16
  <div class="popdeal-marker" active="${!!l}">
17
17
  <div class="popdeal-marker-section">
18
18
  <div class="popdeal-marker-section-header">
@@ -26,12 +26,12 @@
26
26
  </div>
27
27
  </div>
28
28
  </div>
29
- `},er=e=>{const{title:r,icon:n}=e;return`
29
+ `},rr=e=>{const{title:r,icon:n}=e;return`
30
30
  <div class="pi-marker">
31
31
  ${n?`<img class="pi-marker-icon" src="${n}" alt="" width="32px" height="32px" />`:""}
32
32
  <span class="pi-marker-text">${r}</span>
33
33
  </div>
34
- `},tr=e=>{const{title:r,icon:n,address:t}=e;return`
34
+ `},nr=e=>{const{title:r,icon:n,address:t}=e;return`
35
35
  <div class="pi-expanded-marker">
36
36
  ${n?`<img class="pi-expanded-marker-icon" src="${n}" alt="" width="32px" height="32px" />`:""}
37
37
  <div class="pi-expanded-marker-content">
@@ -39,11 +39,11 @@
39
39
  ${t?`<div class="pi-expanded-marker-address">${t}</div>`:""}
40
40
  </div>
41
41
  </div>
42
- `},rr=e=>`
42
+ `},or=e=>`
43
43
  <div class="cluster-marker">
44
44
  <span class="cluster-marker-text">${e.count}</span>
45
45
  </div>
46
- `,Te=e=>{switch(e.type){case"pin":return Qt(e);case"popdeal":return Rt(e);case"pi":return er(e);case"pi-expanded":return tr(e);case"cluster":return rr(e);default:return""}},Ge=`
46
+ `,Te=e=>{switch(e.type){case"pin":return er(e);case"popdeal":return tr(e);case"pi":return rr(e);case"pi-expanded":return nr(e);case"cluster":return or(e);default:return""}},Ge=`
47
47
  /* Common marker styles */
48
48
  [class$="marker"] {
49
49
  user-select: none;
@@ -318,8 +318,8 @@
318
318
  background: #00C4C4;
319
319
  transform: translate(-50%) rotate(45deg);
320
320
  }
321
- `,qe=h.createContext(null),Ke="naver-map-script",nr=(e,r)=>new Promise((n,t)=>{if(typeof window<"u"&&window.naver?.maps){n();return}const o=document.getElementById(Ke);if(o){o.addEventListener("load",()=>n()),o.addEventListener("error",()=>t(new Error("Failed to load Naver Map script")));return}const l=document.createElement("script");l.id=Ke,l.src=`https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=${e}&language=${r}`,l.async=!0,l.onload=()=>{n()},l.onerror=()=>{t(new Error("Failed to load Naver Map script"))},document.head.appendChild(l)}),Je=({clientId:e,language:r="ko",children:n})=>{const[t,o]=h.useState(null),[l,a]=h.useState({}),[i,c]=h.useState(null);h.useEffect(()=>{typeof window>"u"||nr(e,r).then(()=>{window.naver&&o(window.naver)}).catch(u=>{console.error("Naver Map script loading failed:",u),c(u)})},[e,r]);const m=h.useCallback((u,_)=>{const p=t||(typeof window<"u"?window.naver:null);if(!p||(!t&&window.naver&&o(window.naver),!u.current))return null;const d=u.current;if(!d.isConnected)return null;try{const g={center:new p.maps.LatLng(37.5665,126.978),zoom:11,maxZoom:20,minZoom:11,mapTypeControl:!1,scaleControl:!1,logoControl:!1,mapDataControl:!1,zoomControl:!1,..._},y=new p.maps.Map(d,g);return a(C=>{const k=d.getAttribute("id")||"default";return{...C,[k]:y}}),y}catch(g){return console.error("Map creation error:",g),null}},[t]);return i&&console.error("NaverMapProvider error:",i),s.jsx(qe.Provider,{value:{naver:t,createMap:m,maps:l},children:n})},be=()=>{const e=h.useContext(qe);if(!e)throw new Error("useNaverMap must be used within NaverMapProvider");return e};function Xe(e){const r=function(t){this.DEFAULT_OPTIONS={map:null,markers:[],disableClickZoom:!0,minClusterSize:2,maxZoom:13,gridSize:100,icons:[],indexGenerator:[10,100,200,500,1e3],averageCenter:!1,stylingFunction:function(){}},this._clusters=[],this._mapRelations=null,this._markerRelations=[],this.setOptions(e.maps.Util.extend({},this.DEFAULT_OPTIONS,t),!0),this.setMap(t.map||null)};e.maps.Util.ClassExtend(r,e.maps.OverlayView,{onAdd:function(){const t=this.getMap();this._mapRelations=e.maps.Event.addListener(t,"idle",e.maps.Util.bind(this._onIdle,this)),this.getMarkers().length>0&&(this._createClusters(),this._updateClusters())},draw:e.maps.Util.noop,onRemove:function(){e.maps.Event.removeListener(this._mapRelation),this._clearClusters(),this._geoTree=null,this._mapRelation=null},setOptions:function(t){const o=this;if(typeof t=="string"){const l=t,a=arguments[1];o.set(l,a)}else{const l=arguments[1];e.maps.Util.forEach(t,function(a,i){i!=="map"&&o.set(i,a)}),t.map&&!l&&o.setMap(t.map)}},getOptions:function(t){const o=this,l={};return t!==void 0?o.get(t):(e.maps.Util.forEach(o.DEFAULT_OPTIONS,function(a,i){l[i]=o.get(i)}),l)},getMinClusterSize:function(){return this.getOptions("minClusterSize")},setMinClusterSize:function(t){this.setOptions("minClusterSize",t)},getMaxZoom:function(){return this.getOptions("maxZoom")},setMaxZoom:function(t){this.setOptions("maxZoom",t)},getGridSize:function(){return this.getOptions("gridSize")},setGridSize:function(t){this.setOptions("gridSize",t)},getIndexGenerator:function(){return this.getOptions("indexGenerator")},setIndexGenerator:function(t){this.setOptions("indexGenerator",t)},getMarkers:function(){return this.getOptions("markers")},setMarkers:function(t){this.setOptions("markers",t)},getIcons:function(){return this.getOptions("icons")},setIcons:function(t){this.setOptions("icons",t)},getStylingFunction:function(){return this.getOptions("stylingFunction")},setStylingFunction:function(t){this.setOptions("stylingFunction",t)},getDisableClickZoom:function(){return this.getOptions("disableClickZoom")},setDisableClickZoom:function(t){this.setOptions("disableClickZoom",t)},getAverageCenter:function(){return this.getOptions("averageCenter")},setAverageCenter:function(t){this.setOptions("averageCenter",t)},changed:function(t,o){if(this.getMap())switch(t){case"marker":case"minClusterSize":case"gridSize":case"averageCenter":this._redraw();break;case"indexGenerator":case"icons":this._clusters.forEach(function(a){a.updateIcon()});break;case"maxZoom":this._clusters.forEach(function(a){a.getCount()>1&&a.checkByZoomAndMinClusterSize()});break;case"stylingFunction":this._clusters.forEach(function(a){a.updateCount()});break;case"disableClickZoom":let l="enableClickZoom";o&&(l="disableClickZoom"),this._clusters.forEach(function(a){a[l]()});break}},_createClusters:function(){const t=this.getMap();if(!t)return;const o=t.getBounds(),l=this.getMarkers();for(let a=0,i=l.length;a<i;a++){const c=l[a],m=c.getPosition();if(!o.hasLatLng(m))continue;this._getClosestCluster(m).addMarker(c),this._markerRelations.push(e.maps.Event.addListener(c,"dragend",e.maps.Util.bind(this._onDragEnd,this)))}},_updateClusters:function(){const t=this._clusters;for(let o=0,l=t.length;o<l;o++)t[o].updateCluster()},_clearClusters:function(){const t=this._clusters;for(let o=0,l=t.length;o<l;o++)t[o].destroy();e.maps.Event.removeListener(this._markerRelations),this._markerRelations=[],this._clusters=[]},_redraw:function(){this._clearClusters(),this._createClusters(),this._updateClusters()},_getClosestCluster:function(t){const o=this.getProjection(),l=this._clusters;let a=null,i=1/0;for(let c=0,m=l.length;c<m;c++){const u=l[c],_=u.getCenter();if(u.isInBounds(t)){const p=o.getDistance(_,t);p<i&&(i=p,a=u)}}return a||(a=new n(this),this._clusters.push(a)),a},_onIdle:function(){this._redraw()},_onDragEnd:function(){this._redraw()}});const n=function(t){this._clusterCenter=null,this._clusterBounds=null,this._clusterMarker=null,this._relation=null,this._clusterMember=[],this._markerClusters=t};return n.prototype={constructor:n,addMarker:function(t){if(!this._isMember(t)){if(!this._clusterCenter){const o=t.getPosition();this._clusterCenter=o,this._clusterBounds=this._calcBounds(o)}this._clusterMember.push(t)}},destroy:function(){e.maps.Event.removeListener(this._relation);const t=this._clusterMember;for(let o=0,l=t.length;o<l;o++)t[o].setMap(null);this._clusterMarker.setMap(null),this._clusterMarker=null,this._clusterCenter=null,this._clusterBounds=null,this._relation=null,this._clusterMember=[]},getCenter:function(){return this._clusterCenter},getBounds:function(){return this._clusterBounds},getCount:function(){return this._clusterMember.length},getClusterMember:function(){return this._clusterMember},isInBounds:function(t){return this._clusterBounds&&this._clusterBounds.hasLatLng(t)},enableClickZoom:function(){if(this._relation)return;const t=this._markerClusters.getMap();this._relation=e.maps.Event.addListener(this._clusterMarker,"click",e.maps.Util.bind(function(o){t.morph(o.coord,t.getZoom()+1)},this))},disableClickZoom:function(){this._relation&&(e.maps.Event.removeListener(this._relation),this._relation=null)},updateCluster:function(){if(!this._clusterMarker){let t;this._markerClusters.getAverageCenter()?t=this._calcAverageCenter(this._clusterMember):t=this._clusterCenter,this._clusterMarker=new e.maps.Marker({position:t,map:this._markerClusters.getMap()}),this._markerClusters.getDisableClickZoom()||this.enableClickZoom()}this.updateIcon(),this.updateCount(),this.checkByZoomAndMinClusterSize()},checkByZoomAndMinClusterSize:function(){const t=this._markerClusters,o=t.getMinClusterSize(),l=t.getMaxZoom(),a=t.getMap().getZoom();this.getCount()<o?this._showMember():(this._hideMember(),l<=a&&this._showMember())},updateCount:function(){const t=this._markerClusters.getStylingFunction();t&&t(this._clusterMarker,this.getCount())},updateIcon:function(){const t=this.getCount();let o=this._getIndex(t);const l=this._markerClusters.getIcons();o=Math.max(o,0),o=Math.min(o,l.length-1),this._clusterMarker.setIcon(l[o])},_showMember:function(){const t=this._markerClusters.getMap(),o=this._clusterMarker,l=this._clusterMember;for(let a=0,i=l.length;a<i;a++)l[a].setMap(t);o&&o.setMap(null)},_hideMember:function(){const t=this._markerClusters.getMap(),o=this._clusterMarker,l=this._clusterMember;for(let a=0,i=l.length;a<i;a++)l[a].setMap(null);o&&!o.getMap()&&o.setMap(t)},_calcBounds:function(t){const o=this._markerClusters.getMap(),l=new e.maps.LatLngBounds(t.clone(),t.clone()),a=o.getBounds(),i=o.getProjection(),c=i.fromCoordToOffset(a.getNE()),m=i.fromCoordToOffset(a.getSW()),u=i.fromCoordToOffset(l.getNE()),_=i.fromCoordToOffset(l.getSW()),p=this._markerClusters.getGridSize()/2;u.add(p,-p),_.add(-p,p);const d=Math.min(c.x,u.x),g=Math.max(c.y,u.y),y=Math.max(m.x,_.x),C=Math.min(m.y,_.y),k=i.fromOffsetToCoord(new e.maps.Point(d,g)),x=i.fromOffsetToCoord(new e.maps.Point(y,C));return new e.maps.LatLngBounds(x,k)},_getIndex:function(t){const o=this._markerClusters.getIndexGenerator();if(e.maps.Util.isFunction(o))return o(t);if(e.maps.Util.isArray(o)){let l=0;for(let a=0,i=o.length;a<i;a++){const c=o[a];if(t<c)break;l++}return l}return 0},_isMember:function(t){return this._clusterMember.indexOf(t)!==-1},_calcAverageCenter:function(t){const o=t.length,l=[0,0];for(let a=0;a<o;a++)l[0]+=t[a].position.x,l[1]+=t[a].position.y;return l[0]/=o,l[1]/=o,new e.maps.Point(l[0],l[1])}},r}const Qe=e=>{const{naver:r}=be(),[n,t]=h.useState([]),o=h.useRef(new Map),l=h.useRef(null),a=h.useCallback(_=>{if(!e||!r)return null;const p=Te(_),d=new r.maps.Marker({..._,position:new r.maps.LatLng(_.position.latitude,_.position.longitude),map:e,icon:{content:p}});return _.onClick&&r.maps.Event.addListener(d,"click",()=>{_.onClick(_.id)}),t(g=>[...g,d]),o.current.set(_.id,{marker:d,data:_}),d},[e,r]),i=h.useCallback((_,p)=>{const d=o.current.get(_);if(!d||!r)return;const{marker:g,data:y}=d,C={...y,...p},k=g.getElement();if(k){const x=k.querySelector(".popdeal-marker");x&&"active"in p&&x.setAttribute("active",String(!!p.active))}o.current.set(_,{marker:g,data:C})},[r]),c=h.useCallback(()=>{n.forEach(_=>{_&&_.setMap(null)}),t([]),o.current.clear(),l.current&&(l.current.setMap(null),l.current=null)},[n]),m=h.useCallback(_=>{!e||!r||e.panTo(new r.maps.LatLng(_.latitude,_.longitude))},[e,r]),u=h.useCallback(_=>{if(!e||!r||_.length===0)return;const p=new r.maps.LatLngBounds(new r.maps.LatLng(_[0].latitude,_[0].longitude),new r.maps.LatLng(_[0].latitude,_[0].longitude));_.forEach(d=>{p.extend(new r.maps.LatLng(d.latitude,d.longitude))}),e.fitBounds(p)},[e,r]);return h.useEffect(()=>{if(!r||!e||n.length===0)return;const _=Xe(r),d={content:Te({type:"cluster",count:0}),size:new r.maps.Size(96,96),anchor:new r.maps.Point(20,20)},g=new _({minClusterSize:2,maxZoom:17,map:e,markers:n,disableClickZoom:!1,gridSize:120,icons:[d],indexGenerator:[10,100,200,500,1e3],averageCenter:!1,stylingFunction:(y,C)=>{if(y&&typeof y.getElement=="function"){const k=y.getElement().querySelector(".cluster-marker-text");k&&(k.textContent=String(C))}}});return l.current=g,()=>{g.setMap(null)}},[r,e,n]),{addMarker:a,updateMarker:i,clearMarkers:c,panTo:m,fitBounds:u}},Ie=({options:e,onLoad:r})=>{const n=h.useRef(null),t=h.useRef(null),{createMap:o}=be(),[l,a]=h.useState(null),i=Qe(l),{width:c="100%",height:m="100%",...u}=e||{},_=h.useMemo(()=>u,[JSON.stringify(u)]);return h.useEffect(()=>{if(typeof document>"u"||document.getElementById("pop-ui-map-marker-styles"))return;const d=document.createElement("style");return d.id="pop-ui-map-marker-styles",d.textContent=Ge,document.head.appendChild(d),t.current=d,()=>{}},[]),h.useEffect(()=>{let p=null,d=null;if(l&&(l.destroy(),a(null)),n.current&&n.current.isConnected){const g=()=>n.current&&n.current.isConnected&&(p=o(n,_),p)?(a(p),!0):!1;if(!g()){let y=0;const C=50;d=setInterval(()=>{y++,(g()||y>=C)&&d&&(clearInterval(d),d=null)},100)}return()=>{d&&clearInterval(d),p&&(p.destroy(),p=null)}}return()=>{d&&clearInterval(d),p&&(p.destroy(),p=null)}},[o,_]),h.useEffect(()=>{l&&r&&r({map:l,...i})},[l,r,i]),s.jsx("div",{ref:n,style:{width:typeof c=="number"?`${c}px`:c,height:typeof m=="number"?`${m}px`:m}})};Ie.displayName="Map";const or="위치 정보를 불러오는 데 실패했어요.",ar="위치 서비스 권한과 네트워크 상태를 확인해주세요.",sr=({isActive:e=!1,errorMessage:r=or,errorDescription:n=ar})=>{const[t,o]=h.useState(!1),[l,a]=h.useState(!1),[i,c]=h.useState(null),m=h.useRef(!1);return h.useEffect(()=>{if(e&&typeof navigator<"u"&&"geolocation"in navigator){if(m.current)return;m.current=!0,requestAnimationFrame(()=>{o(!0)});const u={enableHighAccuracy:!0,timeout:1e4,maximumAge:0};navigator.geolocation.getCurrentPosition(_=>{c({latitude:_.coords.latitude,longitude:_.coords.longitude}),o(!1),a(!1),m.current=!1},_=>{c(null),console.error("Geolocation error:",_),oe({message:`${r} ${n}`}),o(!1),a(!0),m.current=!1},u)}},[e,r,n]),{position:i,isLoading:t,isError:l}},Re=(e="light")=>{const r=[];return Object.entries(f.colors).forEach(([n,t])=>{Object.entries(t).forEach(([o,l])=>{const a=f.getCSSVariableName(n,o);r.push(`${a}: ${l};`)})}),r.join(`
322
- `)},lr=(e="light")=>{const r=document.getElementById("pop-ui-theme-vars");r&&r.remove();const n=document.createElement("style");n.id="pop-ui-theme-vars",n.textContent=`
321
+ `,qe=f.createContext(null),Ke="naver-map-script",ar=(e,r)=>new Promise((n,t)=>{if(typeof window<"u"&&window.naver?.maps){n();return}const o=document.getElementById(Ke);if(o){o.addEventListener("load",()=>n()),o.addEventListener("error",()=>t(new Error("Failed to load Naver Map script")));return}const l=document.createElement("script");l.id=Ke,l.src=`https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=${e}&language=${r}`,l.async=!0,l.onload=()=>{n()},l.onerror=()=>{t(new Error("Failed to load Naver Map script"))},document.head.appendChild(l)}),Je=({clientId:e,language:r="ko",children:n})=>{const[t,o]=f.useState(null),[l,a]=f.useState({}),[i,c]=f.useState(null);f.useEffect(()=>{typeof window>"u"||ar(e,r).then(()=>{window.naver&&o(window.naver)}).catch(p=>{console.error("Naver Map script loading failed:",p),c(p)})},[e,r]);const m=f.useCallback((p,_)=>{const u=t||(typeof window<"u"?window.naver:null);if(!u||(!t&&window.naver&&o(window.naver),!p.current))return null;const d=p.current;if(!d.isConnected)return null;try{const g={center:new u.maps.LatLng(37.5665,126.978),zoom:11,maxZoom:20,minZoom:11,mapTypeControl:!1,scaleControl:!1,logoControl:!1,mapDataControl:!1,zoomControl:!1,..._},y=new u.maps.Map(d,g);return a(C=>{const k=d.getAttribute("id")||"default";return{...C,[k]:y}}),y}catch(g){return console.error("Map creation error:",g),null}},[t]);return i&&console.error("NaverMapProvider error:",i),s.jsx(qe.Provider,{value:{naver:t,createMap:m,maps:l},children:n})},be=()=>{const e=f.useContext(qe);if(!e)throw new Error("useNaverMap must be used within NaverMapProvider");return e};function Xe(e){const r=function(t){this.DEFAULT_OPTIONS={map:null,markers:[],disableClickZoom:!0,minClusterSize:2,maxZoom:13,gridSize:100,icons:[],indexGenerator:[10,100,200,500,1e3],averageCenter:!1,stylingFunction:function(){}},this._clusters=[],this._mapRelations=null,this._markerRelations=[],this.setOptions(e.maps.Util.extend({},this.DEFAULT_OPTIONS,t),!0),this.setMap(t.map||null)};e.maps.Util.ClassExtend(r,e.maps.OverlayView,{onAdd:function(){const t=this.getMap();this._mapRelations=e.maps.Event.addListener(t,"idle",e.maps.Util.bind(this._onIdle,this)),this.getMarkers().length>0&&(this._createClusters(),this._updateClusters())},draw:e.maps.Util.noop,onRemove:function(){e.maps.Event.removeListener(this._mapRelation),this._clearClusters(),this._geoTree=null,this._mapRelation=null},setOptions:function(t){const o=this;if(typeof t=="string"){const l=t,a=arguments[1];o.set(l,a)}else{const l=arguments[1];e.maps.Util.forEach(t,function(a,i){i!=="map"&&o.set(i,a)}),t.map&&!l&&o.setMap(t.map)}},getOptions:function(t){const o=this,l={};return t!==void 0?o.get(t):(e.maps.Util.forEach(o.DEFAULT_OPTIONS,function(a,i){l[i]=o.get(i)}),l)},getMinClusterSize:function(){return this.getOptions("minClusterSize")},setMinClusterSize:function(t){this.setOptions("minClusterSize",t)},getMaxZoom:function(){return this.getOptions("maxZoom")},setMaxZoom:function(t){this.setOptions("maxZoom",t)},getGridSize:function(){return this.getOptions("gridSize")},setGridSize:function(t){this.setOptions("gridSize",t)},getIndexGenerator:function(){return this.getOptions("indexGenerator")},setIndexGenerator:function(t){this.setOptions("indexGenerator",t)},getMarkers:function(){return this.getOptions("markers")},setMarkers:function(t){this.setOptions("markers",t)},getIcons:function(){return this.getOptions("icons")},setIcons:function(t){this.setOptions("icons",t)},getStylingFunction:function(){return this.getOptions("stylingFunction")},setStylingFunction:function(t){this.setOptions("stylingFunction",t)},getDisableClickZoom:function(){return this.getOptions("disableClickZoom")},setDisableClickZoom:function(t){this.setOptions("disableClickZoom",t)},getAverageCenter:function(){return this.getOptions("averageCenter")},setAverageCenter:function(t){this.setOptions("averageCenter",t)},changed:function(t,o){if(this.getMap())switch(t){case"marker":case"minClusterSize":case"gridSize":case"averageCenter":this._redraw();break;case"indexGenerator":case"icons":this._clusters.forEach(function(a){a.updateIcon()});break;case"maxZoom":this._clusters.forEach(function(a){a.getCount()>1&&a.checkByZoomAndMinClusterSize()});break;case"stylingFunction":this._clusters.forEach(function(a){a.updateCount()});break;case"disableClickZoom":let l="enableClickZoom";o&&(l="disableClickZoom"),this._clusters.forEach(function(a){a[l]()});break}},_createClusters:function(){const t=this.getMap();if(!t)return;const o=t.getBounds(),l=this.getMarkers();for(let a=0,i=l.length;a<i;a++){const c=l[a],m=c.getPosition();if(!o.hasLatLng(m))continue;this._getClosestCluster(m).addMarker(c),this._markerRelations.push(e.maps.Event.addListener(c,"dragend",e.maps.Util.bind(this._onDragEnd,this)))}},_updateClusters:function(){const t=this._clusters;for(let o=0,l=t.length;o<l;o++)t[o].updateCluster()},_clearClusters:function(){const t=this._clusters;for(let o=0,l=t.length;o<l;o++)t[o].destroy();e.maps.Event.removeListener(this._markerRelations),this._markerRelations=[],this._clusters=[]},_redraw:function(){this._clearClusters(),this._createClusters(),this._updateClusters()},_getClosestCluster:function(t){const o=this.getProjection(),l=this._clusters;let a=null,i=1/0;for(let c=0,m=l.length;c<m;c++){const p=l[c],_=p.getCenter();if(p.isInBounds(t)){const u=o.getDistance(_,t);u<i&&(i=u,a=p)}}return a||(a=new n(this),this._clusters.push(a)),a},_onIdle:function(){this._redraw()},_onDragEnd:function(){this._redraw()}});const n=function(t){this._clusterCenter=null,this._clusterBounds=null,this._clusterMarker=null,this._relation=null,this._clusterMember=[],this._markerClusters=t};return n.prototype={constructor:n,addMarker:function(t){if(!this._isMember(t)){if(!this._clusterCenter){const o=t.getPosition();this._clusterCenter=o,this._clusterBounds=this._calcBounds(o)}this._clusterMember.push(t)}},destroy:function(){e.maps.Event.removeListener(this._relation);const t=this._clusterMember;for(let o=0,l=t.length;o<l;o++)t[o].setMap(null);this._clusterMarker.setMap(null),this._clusterMarker=null,this._clusterCenter=null,this._clusterBounds=null,this._relation=null,this._clusterMember=[]},getCenter:function(){return this._clusterCenter},getBounds:function(){return this._clusterBounds},getCount:function(){return this._clusterMember.length},getClusterMember:function(){return this._clusterMember},isInBounds:function(t){return this._clusterBounds&&this._clusterBounds.hasLatLng(t)},enableClickZoom:function(){if(this._relation)return;const t=this._markerClusters.getMap();this._relation=e.maps.Event.addListener(this._clusterMarker,"click",e.maps.Util.bind(function(o){t.morph(o.coord,t.getZoom()+1)},this))},disableClickZoom:function(){this._relation&&(e.maps.Event.removeListener(this._relation),this._relation=null)},updateCluster:function(){if(!this._clusterMarker){let t;this._markerClusters.getAverageCenter()?t=this._calcAverageCenter(this._clusterMember):t=this._clusterCenter,this._clusterMarker=new e.maps.Marker({position:t,map:this._markerClusters.getMap()}),this._markerClusters.getDisableClickZoom()||this.enableClickZoom()}this.updateIcon(),this.updateCount(),this.checkByZoomAndMinClusterSize()},checkByZoomAndMinClusterSize:function(){const t=this._markerClusters,o=t.getMinClusterSize(),l=t.getMaxZoom(),a=t.getMap().getZoom();this.getCount()<o?this._showMember():(this._hideMember(),l<=a&&this._showMember())},updateCount:function(){const t=this._markerClusters.getStylingFunction();t&&t(this._clusterMarker,this.getCount())},updateIcon:function(){const t=this.getCount();let o=this._getIndex(t);const l=this._markerClusters.getIcons();o=Math.max(o,0),o=Math.min(o,l.length-1),this._clusterMarker.setIcon(l[o])},_showMember:function(){const t=this._markerClusters.getMap(),o=this._clusterMarker,l=this._clusterMember;for(let a=0,i=l.length;a<i;a++)l[a].setMap(t);o&&o.setMap(null)},_hideMember:function(){const t=this._markerClusters.getMap(),o=this._clusterMarker,l=this._clusterMember;for(let a=0,i=l.length;a<i;a++)l[a].setMap(null);o&&!o.getMap()&&o.setMap(t)},_calcBounds:function(t){const o=this._markerClusters.getMap(),l=new e.maps.LatLngBounds(t.clone(),t.clone()),a=o.getBounds(),i=o.getProjection(),c=i.fromCoordToOffset(a.getNE()),m=i.fromCoordToOffset(a.getSW()),p=i.fromCoordToOffset(l.getNE()),_=i.fromCoordToOffset(l.getSW()),u=this._markerClusters.getGridSize()/2;p.add(u,-u),_.add(-u,u);const d=Math.min(c.x,p.x),g=Math.max(c.y,p.y),y=Math.max(m.x,_.x),C=Math.min(m.y,_.y),k=i.fromOffsetToCoord(new e.maps.Point(d,g)),x=i.fromOffsetToCoord(new e.maps.Point(y,C));return new e.maps.LatLngBounds(x,k)},_getIndex:function(t){const o=this._markerClusters.getIndexGenerator();if(e.maps.Util.isFunction(o))return o(t);if(e.maps.Util.isArray(o)){let l=0;for(let a=0,i=o.length;a<i;a++){const c=o[a];if(t<c)break;l++}return l}return 0},_isMember:function(t){return this._clusterMember.indexOf(t)!==-1},_calcAverageCenter:function(t){const o=t.length,l=[0,0];for(let a=0;a<o;a++)l[0]+=t[a].position.x,l[1]+=t[a].position.y;return l[0]/=o,l[1]/=o,new e.maps.Point(l[0],l[1])}},r}const Qe=e=>{const{naver:r}=be(),[n,t]=f.useState([]),o=f.useRef(new Map),l=f.useRef(null),a=f.useCallback(_=>{if(!e||!r)return null;const u=Te(_),d=new r.maps.Marker({..._,position:new r.maps.LatLng(_.position.latitude,_.position.longitude),map:e,icon:{content:u}});return _.onClick&&r.maps.Event.addListener(d,"click",()=>{_.onClick(_.id)}),t(g=>[...g,d]),o.current.set(_.id,{marker:d,data:_}),d},[e,r]),i=f.useCallback((_,u)=>{const d=o.current.get(_);if(!d||!r)return;const{marker:g,data:y}=d,C={...y,...u},k=g.getElement();if(k){const x=k.querySelector(".popdeal-marker");x&&"active"in u&&x.setAttribute("active",String(!!u.active))}o.current.set(_,{marker:g,data:C})},[r]),c=f.useCallback(()=>{n.forEach(_=>{_&&_.setMap(null)}),t([]),o.current.clear(),l.current&&(l.current.setMap(null),l.current=null)},[n]),m=f.useCallback(_=>{!e||!r||e.panTo(new r.maps.LatLng(_.latitude,_.longitude))},[e,r]),p=f.useCallback(_=>{if(!e||!r||_.length===0)return;const u=new r.maps.LatLngBounds(new r.maps.LatLng(_[0].latitude,_[0].longitude),new r.maps.LatLng(_[0].latitude,_[0].longitude));_.forEach(d=>{u.extend(new r.maps.LatLng(d.latitude,d.longitude))}),e.fitBounds(u)},[e,r]);return f.useEffect(()=>{if(!r||!e||n.length===0)return;const _=Xe(r),d={content:Te({type:"cluster",count:0}),size:new r.maps.Size(96,96),anchor:new r.maps.Point(20,20)},g=new _({minClusterSize:2,maxZoom:17,map:e,markers:n,disableClickZoom:!1,gridSize:120,icons:[d],indexGenerator:[10,100,200,500,1e3],averageCenter:!1,stylingFunction:(y,C)=>{if(y&&typeof y.getElement=="function"){const k=y.getElement().querySelector(".cluster-marker-text");k&&(k.textContent=String(C))}}});return l.current=g,()=>{g.setMap(null)}},[r,e,n]),{addMarker:a,updateMarker:i,clearMarkers:c,panTo:m,fitBounds:p}},Ie=({options:e,onLoad:r})=>{const n=f.useRef(null),t=f.useRef(null),{createMap:o}=be(),[l,a]=f.useState(null),i=Qe(l),{width:c="100%",height:m="100%",...p}=e||{},_=f.useMemo(()=>p,[JSON.stringify(p)]);return f.useEffect(()=>{if(typeof document>"u"||document.getElementById("pop-ui-map-marker-styles"))return;const d=document.createElement("style");return d.id="pop-ui-map-marker-styles",d.textContent=Ge,document.head.appendChild(d),t.current=d,()=>{}},[]),f.useEffect(()=>{let u=null,d=null;if(l&&(l.destroy(),a(null)),n.current&&n.current.isConnected){const g=()=>n.current&&n.current.isConnected&&(u=o(n,_),u)?(a(u),!0):!1;if(!g()){let y=0;const C=50;d=setInterval(()=>{y++,(g()||y>=C)&&d&&(clearInterval(d),d=null)},100)}return()=>{d&&clearInterval(d),u&&(u.destroy(),u=null)}}return()=>{d&&clearInterval(d),u&&(u.destroy(),u=null)}},[o,_]),f.useEffect(()=>{l&&r&&r({map:l,...i})},[l,r,i]),s.jsx("div",{ref:n,style:{width:typeof c=="number"?`${c}px`:c,height:typeof m=="number"?`${m}px`:m}})};Ie.displayName="Map";const sr="위치 정보를 불러오는 데 실패했어요.",lr="위치 서비스 권한과 네트워크 상태를 확인해주세요.",ir=({isActive:e=!1,errorMessage:r=sr,errorDescription:n=lr})=>{const[t,o]=f.useState(!1),[l,a]=f.useState(!1),[i,c]=f.useState(null),m=f.useRef(!1);return f.useEffect(()=>{if(e&&typeof navigator<"u"&&"geolocation"in navigator){if(m.current)return;m.current=!0,requestAnimationFrame(()=>{o(!0)});const p={enableHighAccuracy:!0,timeout:1e4,maximumAge:0};navigator.geolocation.getCurrentPosition(_=>{c({latitude:_.coords.latitude,longitude:_.coords.longitude}),o(!1),a(!1),m.current=!1},_=>{c(null),console.error("Geolocation error:",_),oe({message:`${r} ${n}`}),o(!1),a(!0),m.current=!1},p)}},[e,r,n]),{position:i,isLoading:t,isError:l}},Re=(e="light")=>{const r=[];return Object.entries(h.colors).forEach(([n,t])=>{Object.entries(t).forEach(([o,l])=>{const a=h.getCSSVariableName(n,o);r.push(`${a}: ${l};`)})}),r.join(`
322
+ `)},cr=(e="light")=>{const r=document.getElementById("pop-ui-theme-vars");r&&r.remove();const n=document.createElement("style");n.id="pop-ui-theme-vars",n.textContent=`
323
323
  :root {
324
324
  ${Re("light")}
325
325
  }
@@ -327,4 +327,4 @@
327
327
  [data-theme="dark"] {
328
328
  ${Re("dark")}
329
329
  }
330
- `,document.head.appendChild(n)},re=e=>{const r=f.colors[e],n=Object.keys(r).sort((o,l)=>Number(o)-Number(l));return[f.getCSSVariableRef(e,n[0]||n[n.length-1]),f.getCSSVariableRef(e,n[1]||n[n.length-1]),f.getCSSVariableRef(e,n[2]||n[n.length-1]),f.getCSSVariableRef(e,n[3]||n[n.length-1]),f.getCSSVariableRef(e,n[4]||n[n.length-1]),f.getCSSVariableRef(e,n[5]||n[n.length-1]),f.getCSSVariableRef(e,n[6]||n[n.length-1]),f.getCSSVariableRef(e,n[7]||n[n.length-1]),f.getCSSVariableRef(e,n[8]||n[n.length-1]),f.getCSSVariableRef(e,n[9]||n[n.length-1])]},ir=P.createTheme({colors:{gray:re("gray"),aqua:re("aqua"),red:re("red"),orange:re("orange"),yellow:re("yellow"),green:re("green"),blue:re("blue"),purple:re("purple"),grape:re("grape")},primaryColor:"aqua",primaryShade:5,fontFamily:'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}),et=h.createContext(void 0),tt=h.createContext({}),cr=({children:e,defaultTheme:r="light",naverClientId:n,notificationPosition:t="bottom-center",notificationLimit:o=5,notificationAutoClose:l,notificationZIndex:a})=>{const[i,c]=h.useState(r);h.useEffect(()=>{lr(i),document.documentElement.setAttribute("data-theme",i)},[i]);const m=()=>{c(u=>u==="light"?"dark":"light")};return s.jsx(et.Provider,{value:{theme:i,setTheme:c,toggleTheme:m},children:s.jsx(tt.Provider,{value:{naverClientId:n},children:s.jsxs(P.MantineProvider,{theme:ir,children:[s.jsx(le.Notifications,{position:t,limit:o,autoClose:l,zIndex:a}),e]})})})},_r=()=>{const e=h.useContext(et);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e},rt=()=>h.useContext(tt),R={MapInfo:"styles-module__MapInfo___scB-5",MapInfo__NoClientId:"styles-module__MapInfo__NoClientId___YBM4o",MapInfo__Preview:"styles-module__MapInfo__Preview___FJbQN",MapInfo__ExpandButton:"styles-module__MapInfo__ExpandButton___8KySg",MapInfo__AddressBar:"styles-module__MapInfo__AddressBar___mKkK6",MapInfo__AddressContent:"styles-module__MapInfo__AddressContent___XG1Uz",MapInfo__Address:"styles-module__MapInfo__Address___iXO6N",MapInfo__DirectionLink:"styles-module__MapInfo__DirectionLink___eGnf-",MapInfo__DirectionButton:"styles-module__MapInfo__DirectionButton___gTWpj"},dr=60,ur=({location:e,marker:r,direction:n,toast:t,naverClientId:o,onExpandRequest:l,onClick:a,height:i=200})=>{const c=rt(),m=o||c.naverClientId,{title:u,address:_,latitude:p,longitude:d}=e,g=n?.label??"길찾기",y=t?.addressCopied??"주소 복사 완료",[C,k]=h.useState(null),x=i-dr,b=h.useCallback(I=>{I&&I.map&&k(I)},[]),W=h.useCallback(()=>{l?.()},[l]),O=h.useCallback((I,S,N)=>{if(I&&I.map&&p&&d)try{I.addMarker(S),N?.()}catch(F){console.error("Error creating map marker:",F)}},[p,d]),j=h.useCallback((I,S)=>{I&&I.map&&p&&d&&(I.clearMarkers(),O(I,{id:`location-marker-${u}`,type:S,position:{latitude:p,longitude:d},title:u,icon:r?.imageUrl,address:_},()=>{I.panTo({latitude:p,longitude:d})}))},[p,d,u,r?.imageUrl,_,O]);h.useEffect(()=>{p&&d&&C&&j(C,"pi")},[C,p,d,j]),h.useEffect(()=>()=>{k(null)},[]);const Z=h.useCallback(()=>{typeof navigator<"u"&&navigator.clipboard&&(navigator.clipboard.writeText(_),oe(y))},[_,y]),E=h.useMemo(()=>n?.url?n.url:`https://map.naver.com/p/search/${encodeURIComponent(u)}`,[n?.url,u]);return m?s.jsxs("div",{className:R.MapInfo,style:{height:i},onClick:a,children:[s.jsx(Je,{clientId:m,children:s.jsxs("div",{className:R.MapInfo__Preview,onClick:W,children:[s.jsx(Ie,{onLoad:b,options:{width:"100%",height:`${x}px`,center:{lat:p,lng:d},zoom:15,minZoom:15,maxZoom:15,draggable:!1,keyboardShortcuts:!1,mapTypeControl:!1,scaleControl:!1,logoControl:!1,mapDataControl:!1,zoomControl:!1}}),l&&s.jsx("div",{className:R.MapInfo__ExpandButton,children:s.jsx(f.IconMap,{color:f.ColorGray800,size:18})})]})}),s.jsxs("div",{className:R.MapInfo__AddressBar,children:[s.jsxs("div",{className:R.MapInfo__AddressContent,children:[s.jsx(f.IconMapMarker,{color:f.ColorAqua500,size:24,variant:"filled"}),s.jsx("span",{className:R.MapInfo__Address,onClick:Z,role:"button",tabIndex:0,onKeyDown:I=>I.key==="Enter"&&Z(),children:_})]}),s.jsx("a",{className:R.MapInfo__DirectionLink,href:E,target:"_blank",rel:"noreferrer",children:s.jsx(ie,{variant:"basic",size:"sm",className:R.MapInfo__DirectionButton,children:g})})]})]}):s.jsx("div",{className:R.MapInfo,style:{height:i},children:s.jsx("div",{className:R.MapInfo__NoClientId,children:"naverClientId가 필요합니다. PopUIProvider 또는 props로 전달해주세요."})})};D.Button=ie,D.CalendarDatePicker=Ee,D.Checkbox=pt,D.DatePicker=Ct,D.Dropdown=Dt,D.ImageInput=Nt,D.LottieInput=zt,D.Map=Ie,D.MapInfo=ur,D.Modal=Fe,D.NaverMapProvider=Je,D.Pagination=Ht,D.PopUiProvider=cr,D.Radio=Zt,D.SearchBar=Vt,D.SegmentButton=Ut,D.Tab=jt,D.TextField=qt,D.TimePicker=Kt,D.Toggle=Jt,D.Tooltip=Xt,D.getMarkerHTML=Te,D.makeMarkerClustering=Xe,D.markerStyles=Ge,D.toast=oe,D.useLocation=sr,D.useMap=Qe,D.useNaverMap=be,D.usePopUIConfig=rt,D.useTheme=_r,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
330
+ `,document.head.appendChild(n)},re=e=>{const r=h.colors[e],n=Object.keys(r).sort((o,l)=>Number(o)-Number(l));return[h.getCSSVariableRef(e,n[0]||n[n.length-1]),h.getCSSVariableRef(e,n[1]||n[n.length-1]),h.getCSSVariableRef(e,n[2]||n[n.length-1]),h.getCSSVariableRef(e,n[3]||n[n.length-1]),h.getCSSVariableRef(e,n[4]||n[n.length-1]),h.getCSSVariableRef(e,n[5]||n[n.length-1]),h.getCSSVariableRef(e,n[6]||n[n.length-1]),h.getCSSVariableRef(e,n[7]||n[n.length-1]),h.getCSSVariableRef(e,n[8]||n[n.length-1]),h.getCSSVariableRef(e,n[9]||n[n.length-1])]},_r=P.createTheme({colors:{gray:re("gray"),aqua:re("aqua"),red:re("red"),orange:re("orange"),yellow:re("yellow"),green:re("green"),blue:re("blue"),purple:re("purple"),grape:re("grape")},primaryColor:"aqua",primaryShade:5,fontFamily:'Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'}),et=f.createContext(void 0),tt=f.createContext({}),dr=({children:e,defaultTheme:r="light",naverClientId:n,notificationPosition:t="bottom-center",notificationLimit:o=5,notificationAutoClose:l,notificationZIndex:a})=>{const[i,c]=f.useState(r);f.useEffect(()=>{cr(i),document.documentElement.setAttribute("data-theme",i)},[i]);const m=()=>{c(p=>p==="light"?"dark":"light")};return s.jsx(et.Provider,{value:{theme:i,setTheme:c,toggleTheme:m},children:s.jsx(tt.Provider,{value:{naverClientId:n},children:s.jsxs(P.MantineProvider,{theme:_r,children:[s.jsx(le.Notifications,{position:t,limit:o,autoClose:l,zIndex:a}),e]})})})},ur=()=>{const e=f.useContext(et);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e},rt=()=>f.useContext(tt),R={MapInfo:"styles-module__MapInfo___scB-5",MapInfo__NoClientId:"styles-module__MapInfo__NoClientId___YBM4o",MapInfo__Preview:"styles-module__MapInfo__Preview___FJbQN",MapInfo__ExpandButton:"styles-module__MapInfo__ExpandButton___8KySg",MapInfo__AddressBar:"styles-module__MapInfo__AddressBar___mKkK6",MapInfo__AddressContent:"styles-module__MapInfo__AddressContent___XG1Uz",MapInfo__Address:"styles-module__MapInfo__Address___iXO6N",MapInfo__DirectionLink:"styles-module__MapInfo__DirectionLink___eGnf-",MapInfo__DirectionButton:"styles-module__MapInfo__DirectionButton___gTWpj"},pr=60,mr=({location:e,marker:r,direction:n,toast:t,naverClientId:o,onExpandRequest:l,onClick:a,height:i=200})=>{const c=rt(),m=o||c.naverClientId,{title:p,address:_,latitude:u,longitude:d}=e,g=n?.label??"길찾기",y=t?.addressCopied??"주소 복사 완료",[C,k]=f.useState(null),x=i-pr,b=f.useCallback(I=>{I&&I.map&&k(I)},[]),W=f.useCallback(()=>{l?.()},[l]),O=f.useCallback((I,S,N)=>{if(I&&I.map&&u&&d)try{I.addMarker(S),N?.()}catch(F){console.error("Error creating map marker:",F)}},[u,d]),j=f.useCallback((I,S)=>{I&&I.map&&u&&d&&(I.clearMarkers(),O(I,{id:`location-marker-${p}`,type:S,position:{latitude:u,longitude:d},title:p,icon:r?.imageUrl,address:_},()=>{I.panTo({latitude:u,longitude:d})}))},[u,d,p,r?.imageUrl,_,O]);f.useEffect(()=>{u&&d&&C&&j(C,"pi")},[C,u,d,j]),f.useEffect(()=>()=>{k(null)},[]);const Z=f.useCallback(()=>{typeof navigator<"u"&&navigator.clipboard&&(navigator.clipboard.writeText(_),oe(y))},[_,y]),E=f.useMemo(()=>n?.url?n.url:`https://map.naver.com/p/search/${encodeURIComponent(p)}`,[n?.url,p]);return m?s.jsxs("div",{className:R.MapInfo,style:{height:i},onClick:a,children:[s.jsx(Je,{clientId:m,children:s.jsxs("div",{className:R.MapInfo__Preview,onClick:W,children:[s.jsx(Ie,{onLoad:b,options:{width:"100%",height:`${x}px`,center:{lat:u,lng:d},zoom:15,minZoom:15,maxZoom:15,draggable:!1,keyboardShortcuts:!1,mapTypeControl:!1,scaleControl:!1,logoControl:!1,mapDataControl:!1,zoomControl:!1}}),l&&s.jsx("div",{className:R.MapInfo__ExpandButton,children:s.jsx(h.IconMap,{color:h.ColorGray800,size:18})})]})}),s.jsxs("div",{className:R.MapInfo__AddressBar,children:[s.jsxs("div",{className:R.MapInfo__AddressContent,children:[s.jsx(h.IconMapMarker,{color:h.ColorAqua500,size:24,variant:"filled"}),s.jsx("span",{className:R.MapInfo__Address,onClick:Z,role:"button",tabIndex:0,onKeyDown:I=>I.key==="Enter"&&Z(),children:_})]}),s.jsx("a",{className:R.MapInfo__DirectionLink,href:E,target:"_blank",rel:"noreferrer",children:s.jsx(ie,{variant:"basic",size:"sm",className:R.MapInfo__DirectionButton,children:g})})]})]}):s.jsx("div",{className:R.MapInfo,style:{height:i},children:s.jsx("div",{className:R.MapInfo__NoClientId,children:"naverClientId가 필요합니다. PopUIProvider 또는 props로 전달해주세요."})})};D.Button=ie,D.CalendarDatePicker=Ee,D.Checkbox=pt,D.DatePicker=Ct,D.Dropdown=Dt,D.ImageInput=Ot,D.LottieInput=Wt,D.Map=Ie,D.MapInfo=mr,D.Modal=Fe,D.NaverMapProvider=Je,D.Pagination=Yt,D.PopUiProvider=dr,D.Radio=Ut,D.SearchBar=jt,D.SegmentButton=Gt,D.Tab=qt,D.TextField=Jt,D.TimePicker=Xt,D.Toggle=Qt,D.Tooltip=Rt,D.getMarkerHTML=Te,D.makeMarkerClustering=Xe,D.markerStyles=Ge,D.toast=oe,D.useLocation=ir,D.useMap=Qe,D.useNaverMap=be,D.usePopUIConfig=rt,D.useTheme=ur,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
@@ -50,7 +50,7 @@ export declare interface IBaseMarkerData {
50
50
  onClick?: (id: string) => void;
51
51
  }
52
52
 
53
- declare interface IButtonProps extends Omit<ButtonProps, 'variant' | 'styles'> {
53
+ export declare interface IButtonProps extends Omit<ButtonProps, 'variant' | 'styles'> {
54
54
  type?: 'button' | 'submit' | 'reset';
55
55
  onClick?: MouseEventHandler<HTMLButtonElement>;
56
56
  size?: TButtonSize;
@@ -91,7 +91,7 @@ export declare interface ICalendarDatePickerProps extends Omit<DatePickerProps,
91
91
  excludedDays?: TDayOfWeek[];
92
92
  }
93
93
 
94
- declare interface ICheckboxProps extends CheckboxProps {
94
+ export declare interface ICheckboxProps extends CheckboxProps {
95
95
  size?: 'sm' | 'md' | 'lg';
96
96
  }
97
97
 
@@ -119,7 +119,7 @@ export declare interface ICoord {
119
119
  longitude: number;
120
120
  }
121
121
 
122
- declare interface IDatePickerProps {
122
+ export declare interface IDatePickerProps {
123
123
  size?: 'sm' | 'md' | 'lg';
124
124
  type?: TDateDisplayType;
125
125
  withTime?: boolean;
@@ -145,7 +145,7 @@ declare interface IDatePickerProps {
145
145
  rightSectionWidth?: number;
146
146
  }
147
147
 
148
- declare interface IDropdownProps extends SelectProps {
148
+ export declare interface IDropdownProps extends SelectProps {
149
149
  label?: string;
150
150
  labelPosition?: 'top' | 'left';
151
151
  size?: 'sm' | 'md' | 'lg';
@@ -305,7 +305,7 @@ export declare interface IMapToast {
305
305
  addressCopied?: string;
306
306
  }
307
307
 
308
- declare interface IModalProps extends ModalProps {
308
+ export declare interface IModalProps extends ModalProps {
309
309
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
310
310
  width?: number;
311
311
  }
@@ -322,7 +322,7 @@ export declare interface INaverMapProviderProps {
322
322
  children: React.ReactNode;
323
323
  }
324
324
 
325
- declare interface IPaginationProps extends HTMLAttributes<HTMLDivElement> {
325
+ export declare interface IPaginationProps extends HTMLAttributes<HTMLDivElement> {
326
326
  currentPageIdx: number;
327
327
  rowsPerPage?: number;
328
328
  totalLength?: number;
@@ -372,11 +372,11 @@ export declare interface IPopUiProviderProps {
372
372
  notificationZIndex?: number;
373
373
  }
374
374
 
375
- declare interface IRadioProps extends RadioProps {
375
+ export declare interface IRadioProps extends RadioProps {
376
376
  size?: 'sm' | 'md' | 'lg';
377
377
  }
378
378
 
379
- declare interface ISearchBarProps extends AutocompleteProps {
379
+ export declare interface ISearchBarProps extends AutocompleteProps {
380
380
  label?: string;
381
381
  labelPosition?: 'top' | 'left';
382
382
  size?: 'sm' | 'md' | 'lg';
@@ -388,12 +388,12 @@ declare interface ISearchBarProps extends AutocompleteProps {
388
388
  onClear?: () => void;
389
389
  }
390
390
 
391
- declare interface ISegmentButtonProps extends SegmentedControlProps {
391
+ export declare interface ISegmentButtonProps extends SegmentedControlProps {
392
392
  size?: 'sm' | 'md' | 'lg';
393
393
  radius?: number | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
394
394
  }
395
395
 
396
- declare interface ITabProps extends TabsProps {
396
+ export declare interface ITabProps extends TabsProps {
397
397
  tabList: {
398
398
  title: string;
399
399
  value: string;
@@ -409,11 +409,11 @@ declare interface IThemeContextValue {
409
409
  toggleTheme: () => void;
410
410
  }
411
411
 
412
- declare interface ITimePickerProps extends TimeInputProps {
412
+ export declare interface ITimePickerProps extends TimeInputProps {
413
413
  size?: 'sm' | 'md' | 'lg';
414
414
  }
415
415
 
416
- declare interface IToastOptions {
416
+ export declare interface IToastOptions {
417
417
  message: string;
418
418
  id?: string;
419
419
  icon?: ReactNode;
@@ -427,14 +427,14 @@ declare interface IToastRuntime {
427
427
  clean: () => void;
428
428
  }
429
429
 
430
- declare interface IToggleProps extends SwitchProps {
430
+ export declare interface IToggleProps extends SwitchProps {
431
431
  size?: 'sm' | 'md' | 'lg';
432
432
  labelPosition: 'left' | 'right';
433
433
  disabled?: boolean;
434
434
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
435
435
  }
436
436
 
437
- declare interface ITooltipProps extends Omit<TooltipProps, 'label'> {
437
+ export declare interface ITooltipProps extends Omit<TooltipProps, 'label'> {
438
438
  title?: string;
439
439
  content: string;
440
440
  }
@@ -466,7 +466,7 @@ export declare const MapInfo: ({ location, marker, direction, toast: toastConfig
466
466
 
467
467
  export declare const markerStyles = "\n /* Common marker styles */\n [class$=\"marker\"] {\n user-select: none;\n }\n\n /* Pin Marker */\n .pin-marker {\n position: relative;\n z-index: 10;\n transform: translate(-50%, -100%);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n }\n\n .pin-marker-name {\n min-width: max-content;\n color: #1A1A1A;\n text-align: center;\n font-weight: 700;\n font-size: 14px;\n line-height: 1.4;\n text-shadow:\n -2px -2px 0 white,\n 2px -2px 0 white,\n -2px 2px 0 white,\n 2px 2px 0 white;\n }\n\n /* Popdeal Marker */\n .popdeal-marker {\n transform: translate(-50%, -100%);\n padding: 10px 16px;\n width: fit-content;\n max-width: 210px;\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 4px;\n transition: border-color 0.2s ease-in-out;\n word-break: keep-all;\n background: white;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);\n border-radius: 12px;\n color: #3D3D3D;\n }\n\n .popdeal-marker:hover {\n z-index: 10;\n filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.12));\n }\n\n .popdeal-marker::after {\n content: \"\";\n display: block;\n width: 12px;\n height: 12px;\n position: absolute;\n bottom: -7px;\n left: 50%;\n right: 50%;\n background: white;\n transform: translate(-50%) rotate(45deg);\n }\n\n .popdeal-marker[active=\"true\"] {\n z-index: 10;\n border: 2px solid #00C4C4;\n }\n\n .popdeal-marker[active=\"true\"]::after {\n border-right: 2px solid #00C4C4;\n border-bottom: 2px solid #00C4C4;\n }\n\n .popdeal-marker[active=\"false\"] {\n border: 1px solid #F5F5F5;\n }\n\n .popdeal-marker[active=\"false\"]::after {\n border-right: 1px solid #F5F5F5;\n border-bottom: 1px solid #F5F5F5;\n }\n\n .popdeal-marker-section {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 0;\n flex-wrap: nowrap;\n }\n\n .popdeal-marker-section-header {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 4px;\n flex-wrap: nowrap;\n }\n\n .popdeal-marker-section-price {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0 4px;\n flex-wrap: wrap;\n }\n\n .popdeal-marker-title {\n font-weight: 700;\n font-size: 14px;\n text-align: center;\n width: 100%;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .popdeal-marker-discount_rate {\n color: #00C4C4;\n font-weight: 600;\n font-size: 14px;\n }\n\n .popdeal-marker-discounted_price {\n color: #3D3D3D;\n font-weight: 600;\n font-size: 14px;\n }\n\n .popdeal-marker-original_price {\n width: 100%;\n color: #B3B3B3;\n text-align: center;\n font-size: 14px;\n text-decoration: line-through;\n }\n\n .popdeal-marker-category {\n color: #6E6E6E;\n font-weight: 600;\n font-size: 12px;\n }\n\n .popdeal-marker-category::before {\n content: \"|\";\n color: #B3B3B3;\n margin-right: 4px;\n }\n\n /* PI Marker */\n .pi-marker {\n transform: translate(-50%, -50%);\n z-index: 10;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n }\n\n .pi-marker-icon {\n width: 32px;\n height: 32px;\n object-fit: cover;\n border-radius: 50%;\n }\n\n .pi-marker-text {\n position: absolute;\n top: calc(100% + 5px);\n left: 50%;\n transform: translateX(-50%);\n min-width: max-content;\n padding: 4px 8px;\n background: white;\n font-size: 12px;\n border-radius: 99px;\n color: #3D3D3D;\n box-shadow: 0 0.432px 0.864px 0 rgba(0, 0, 0, 0.28);\n }\n\n /* PI Expanded Marker */\n .pi-expanded-marker {\n transform: translate(-50%, -50%);\n z-index: 100;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.12));\n }\n\n .pi-expanded-marker-icon {\n width: 32px;\n height: 32px;\n object-fit: cover;\n border-radius: 50%;\n }\n\n .pi-expanded-marker-content {\n position: absolute;\n bottom: calc(100% + 10px);\n left: 50%;\n transform: translateX(-50%);\n width: max-content;\n max-width: 200px;\n padding: 16px;\n word-break: keep-all;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: white;\n border-radius: 8px;\n }\n\n .pi-expanded-marker-title {\n font-weight: 600;\n font-size: 14px;\n text-align: center;\n color: #1A1A1A;\n }\n\n .pi-expanded-marker-address {\n font-size: 14px;\n color: #6E6E6E;\n width: 100%;\n text-align: center;\n }\n\n /* Cluster Marker */\n .cluster-marker {\n width: fit-content;\n min-width: 52px;\n height: 36px;\n padding: 13px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 12px;\n background: #00C4C4;\n box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);\n transform: translate(-50%, -50%);\n }\n\n .cluster-marker-text {\n font-weight: 700;\n font-size: 15px;\n color: white;\n }\n\n .cluster-marker::after {\n content: \"\";\n display: block;\n width: 12px;\n height: 12px;\n position: absolute;\n bottom: -2px;\n left: 50%;\n right: 50%;\n background: #00C4C4;\n transform: translate(-50%) rotate(45deg);\n }\n";
468
468
 
469
- export declare const Modal: ({ size, width, withCloseButton, ...props }: IModalProps) => JSX.Element;
469
+ export declare const Modal: ({ size, width, withCloseButton, fullScreen, styles, ...props }: IModalProps) => JSX.Element;
470
470
 
471
471
  export declare const NaverMapProvider: ({ clientId, language, children, }: INaverMapProviderProps) => JSX.Element;
472
472
 
@@ -482,9 +482,9 @@ export declare const SegmentButton: ({ size, radius, ...props }: ISegmentButtonP
482
482
 
483
483
  export declare const Tab: ({ tabList, containerPaddingTop, ...props }: ITabProps) => JSX.Element;
484
484
 
485
- declare type TButtonSize = 'sm' | 'md' | 'lg';
485
+ export declare type TButtonSize = 'sm' | 'md' | 'lg';
486
486
 
487
- declare type TButtonVariant = 'primary' | 'primaryLine' | 'basic' | 'danger' | 'setting' | 'warning' | 'ghost';
487
+ export declare type TButtonVariant = 'primary' | 'primaryLine' | 'basic' | 'danger' | 'setting' | 'warning' | 'ghost';
488
488
 
489
489
  export declare type TDayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
490
490
 
@@ -535,11 +535,11 @@ export declare type TMarkerType = 'cluster' | 'popdeal' | 'pin' | 'pi' | 'pi-exp
535
535
  */
536
536
  export declare const toast: IToastRuntime;
537
537
 
538
- export declare const Toggle: ({ size, labelPosition, disabled, onChange, ...props }: IToggleProps) => JSX.Element;
538
+ export declare const Toggle: ({ size, labelPosition, disabled, checked, defaultChecked, onChange, ...props }: IToggleProps) => JSX.Element;
539
539
 
540
540
  export declare const Tooltip: ({ title, content, maw, multiline, ...props }: ITooltipProps) => JSX.Element;
541
541
 
542
- declare type TTextFieldProps = ICommonTextFieldProps & (({
542
+ export declare type TTextFieldProps = ICommonTextFieldProps & (({
543
543
  textarea?: false;
544
544
  } & Omit<InputProps, keyof ICommonTextFieldProps | 'vars'>) | ({
545
545
  textarea: true;
@@ -554,7 +554,7 @@ declare type TTextFieldProps = ICommonTextFieldProps & (({
554
554
  */
555
555
  declare type TThemeMode = 'light' | 'dark';
556
556
 
557
- declare type TToastInput = string | IToastOptions;
557
+ export declare type TToastInput = string | IToastOptions;
558
558
 
559
559
  export declare const useLocation: ({ isActive, errorMessage, errorDescription, }: IUseLocationOptions) => {
560
560
  position: ILocation | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pop-ui/core",
3
3
  "type": "module",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "main": "./dist/core.umd.cjs",
6
6
  "module": "./dist/core.js",
7
7
  "types": "./dist/types/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "@dnd-kit/core": "^6.3.1",
48
48
  "@dnd-kit/sortable": "^10.0.0",
49
49
  "@dnd-kit/utilities": "^3.2.2",
50
- "@pop-ui/foundation": "2.1.0",
50
+ "@pop-ui/foundation": "2.1.1",
51
51
  "dayjs": "^1.11.18",
52
52
  "lottie-react": "^2.4.1",
53
53
  "react-easy-crop": "^5.5.3"