PageSourceSearch

https://bidinfo-jh5xivtz.manus.space/assets/Alerts-DMNI1q1U.js

js bidinfo-jh5xivtz.manus.space collected 2026-10-03 05:00:17 UTC 75,617 bytes, 47 lines download raw bytes

vendor: 5,162 bytes, lines 1-41
1import{c as T,r as m,j as e,P as Y,a as M,u as U,b as ze,d as ae,e as le,f as _e,g as Te,t as f,h as y,B as F,i as A,L as re,k as v,l as Re,S as X,C as Ke,T as Ie,m as w,D as Le,n as $e,o as Oe,p as Be,q as Ue,I as R,s as Fe,v as Ve,w as H,x as q,y as Q,z as Z,A as _,E as He,F as qe,G as Qe,H as Ze,J as Ge,K as We,M as J,X as Ye,N as ce,R as Xe,W as Je,O as et,Q as tt,U as st,V as at,Y as ne,Z as lt,_ as rt,$ as ct,a0 as oe,a1 as ie,a2 as nt,a3 as $,a4 as ot,a5 as it,a6 as dt,a7 as xt,a8 as mt}from"./index-BeDaSDdk.js";import{C as D,a as E}from"./card-BLMfwRof.js";import{B as gt}from"./building-2-CEqy7hf5.js";import{R as pt}from"./refresh-cw-D4nG6-Ud.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ut=T("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
7 * @license lucide-react v0.453.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const ht=T("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
12 * @license lucide-react v0.453.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const ft=T("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/**
17 * @license lucide-react v0.453.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const bt=T("MapPinned",[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]]);/**
22 * @license lucide-react v0.453.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const de=T("MessageCircleMore",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]]);/**
27 * @license lucide-react v0.453.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const xe=T("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
32 * @license lucide-react v0.453.0 - ISC
33 *
34 * This source code is licensed under the ISC license.
35 * See the LICENSE file in the root directory of this source tree.
36 */const At=T("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
37 * @license lucide-react v0.453.0 - ISC
38 *
39 * This source code is licensed under the ISC license.
40 * See the LICENSE file in the root directory of this source tree.
41 */const jt=T("Unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);var Nt="Label",me=m.forwardRef((t,s)=>e.jsx(Y.label,{...t,ref:s,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));me.displayName=Nt;var vt=me;function S({className:t,...s}){return e.jsx(vt,{"data-loc":"client/src/components/ui/label.tsx:11","data-slot":"label",className:M("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}var V="Switch",[yt]=ae(V),[Mt,Pt]=yt(V),ge=m.forwardRef((t,s)=>{const{__scopeSwitch:r,name:c,checked:a,defaultChecked:x,required:i,disabled:u,value:o="on",onCheckedChange:n,form:g,...h}=t,[b,p]=m.useState(null),P=U(s,l=>p(l)),k=m.useRef(!1),C=b?g||!!b.closest("form"):!0,[j,d]=ze({prop:a,defaultProp:x??!1,onChange:n,caller:V});return e.jsxs(Mt,{scope:r,checked:j,disabled:u,children:[e.jsx(Y.button,{type:"button",role:"switch","aria-checked":j,"aria-required":i,"data-state":fe(j),"data-disabled":u?"":void 0,disabled:u,value:o,...h,ref:P,onClick:le(t.onClick,l=>{d(N=>
41!N),C&&(k.current=l.isPropagationStopped(),k.current||l.stopPropagation())})}),C&&e.jsx(he,{control:b,bubbles:!k.current,name:c,value:o,checked:j,required:i,disabled:u,form:g,style:{transform:"translateX(-100%)"}})]})});ge.displayName=V;var pe="SwitchThumb",ue=m.forwardRef((t,s)=>{const{__scopeSwitch:r,...c}=t,a=Pt(pe,r);return e.jsx(Y.span,{"data-state":fe(a.checked),"data-disabled":a.disabled?"":void 0,...c,ref:s})});ue.displayName=pe;var wt="SwitchBubbleInput",he=m.forwardRef(({__scopeSwitch:t,control:s,checked:r,bubbles:c=!0,...a},x)=>{const i=m.useRef(null),u=U(i,x),o=_e(r),n=Te(s);return m.useEffect(()=>{const g=i.current;if(!g)return;const h=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(h,"checked").set;if(o!==r&&p){const P=new Event("click",{bubbles:c});p.call(g,r),g.dispatchEvent(P)}},[o,r,c]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:u,style:{...a.style,...n,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});he.displayName=wt;function fe(t){return t?"checked":"unchecked"}var kt=ge,Ct=ue;function G({className:t,...s}){return e.jsx(kt,{"data-loc":"client/src/components/ui/switch.tsx:11","data-slot":"switch",className:M("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(Ct,{"data-loc":"client/src/components/ui/switch.tsx:19","data-slot":"switch-thumb",className:M("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const O={bid:"입찰",award:"낙찰"},B={construction:"공사",service:"용역",goods:"물품"},St={name:"",recordTypes:["bid"],businessTypes:["construction"],industryCodes:[],regionKeys:[],categoryKeys:[],purchaser:null,amountMin:null,amountMax:null,includeUnknownAmount:!1,correctionMode:"all",urgentOnly:!1,agreementMode:"all",includeKeywords:[],excludeKeywords:[],keywordMode:"any"};function I(t){y.error(t instanceof Error?t.message:"요청을 처리하지 못했습니다.")}function Dt(t){return{name:t.name,recordTypes:t.recordTypes,businessTypes:t.businessTypes,industryCodes:t.industryCodes,regionKeys:t.regionKeys,categoryKeys:t.categoryKeys,purchaser:t.purchaser,amountMin:t.amountMin,amountMax:t.amountMax,includeUnknownAmount:t.includeUnknownAmount,correctionMode:t.correctionMode,urgentOnly:t.urgentOnly,agreementMode:t.agreementMode,includeKeywords:t.includeKeywords,excludeKeywords:t.excludeKeywords,keywordMode:t.keywordMode}}function W(t,s){return t.includes(s)?t.filter(r=>r!==s):[...t,s]}function ee(t){if(!t)return null;const s=Number(t);return Number.isFinite(s)?`${new Intl.NumberFormat("ko-KR").format(s)}원`:t}function Et({profile:t}){const s=[t.recordTypes.map(a=>O[a]).join("·"),t.businessTypes.map(a=>B[a]).join("·"),t.regionKeys.length?`지역 ${t.regionKeys.length}`:null,t.industryCodes.length?`업종 ${t.industryCodes.length}`:null,t.categoryKeys.length?`분류 ${t.categoryKeys.length}`:null,t.urgentOnly?"긴급만":null,t.agreementMode==="required"?"협정 필요":t.agreementMode==="notRequired"?"협정 불필요":null].filter(Boolean),r=ee(t.amountMin),c=ee(t.amountMax);return e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:121",className:"grid gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:122",className:"flex flex-wrap gap-1.5",children:s.map(a=>e.jsx(v,{"data-loc":"client/src/components/AlertProfileManager.tsx:124",variant:"secondary",className:"bg-slate-100 font-bold text-slate-700",children:a},a))}),(t.includeKeywords.length>0||t.excludeKeywords.length>0||r||c||t.purchaser)&&e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:128",className:"grid gap-1 text-xs leading-5 text-slate-500",children:[t.includeKeywords.length>0&&e.jsxs("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:129",children:[e.jsx("strong",{"data-loc":"client/src/components/AlertProfileManager.tsx:129",className:"text-slate-700",children:"포함"})," ",t.includeKeywords.join(t.keywordMode==="all"?" + ":" · ")]}),t.excludeKeywords.length>0&&e.jsxs("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:130",children:[e.jsx("strong",{"data-loc":"client/src/components/AlertProfileManager.tsx:130",className:"text-slate-700",children:"제외"})," ",t.excludeKeywords.join(" · ")]}),(r||c)&&e.jsxs("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:131",children:[e.jsx("strong",{"data-loc":"client/src/components/AlertProfileManager.tsx:131",className:"text-slate-700",children:"금액"})," ",r??"제한 없음"," ~ ",c??"제한 없음"]}),t.purchaser&&e.jsxs("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:132",children:[e.jsx("strong",{"data-loc":"client/src/components/AlertProfileManager.tsx:132",className:"text-slate-700",children:"발주처"})," ",t.purchaser]})]})]})}function te({icon:t,title:s,options:r,selected:c,onChange:a,searchable:x=!1,search:i,onSearchChange:u,loading:o}){return e.jsxs(qe,{"data-loc":"client/src/components/AlertProfileManager.tsx:163",children:[e.jsx(Qe,{"data-loc":"client/src/components/AlertProfileManager.tsx:164",asChild:!0,children:e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:165",type:"button",variant:"outline",className:"h-12 w-full justify-between rounded-xl border-slate-300 bg-white px-4 font-extrabold",children:[e.jsxs("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:166",className:"flex items-center gap-2",children:[e.jsx(t,{"data-loc":"client/src/components/AlertProfileManager.tsx:166",className:"size-4 text-[#1559d6]"}),s]}),e.jsxs("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:167",className:"flex items-center gap-2 text-xs text-slate-500",children:[c.length?`${c.length}개`:"전체",e.jsx(Ze,{"data-loc":"client/src/components/AlertProfileManager.tsx:167",className:"size-4"})]})]})}),e.jsxs(Ge,{"data-loc":"client/src/components/AlertProfileManager.tsx:170",align:"start",className:"w-[min(calc(100vw-2rem),420p
41x)] rounded-2xl border-slate-200 p-0 shadow-[0_20px_60px_rgba(15,40,80,.2)]",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:171",className:"border-b border-slate-200 p-3",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:172",className:"flex items-center justify-between gap-3",children:[e.jsxs("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:173",className:"font-black text-slate-900",children:[s," 선택"]}),c.length>0&&e.jsx(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:174",type:"button",variant:"ghost",size:"sm",onClick:()=>a([]),className:"h-8 text-xs",children:"전체 해제"})]}),x&&e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:177",className:"relative mt-2",children:[e.jsx(We,{"data-loc":"client/src/components/AlertProfileManager.tsx:178",className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-slate-400"}),e.jsx(R,{"data-loc":"client/src/components/AlertProfileManager.tsx:179",value:i??"",onChange:n=>u?.(n.target.value),placeholder:"이름 또는 코드 검색",className:"h-10 rounded-lg pl-9"})]})]}),e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:183",className:"max-h-72 overflow-y-auto p-2",children:o?e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:185",className:"flex items-center justify-center py-10 text-sm text-slate-500",children:[e.jsx(w,{"data-loc":"client/src/components/AlertProfileManager.tsx:185",className:"mr-2 size-4 animate-spin"})," 불러오는 중"]}):r.length?r.map(n=>{const g=c.includes(n.value);return e.jsxs("button",{"data-loc":"client/src/components/AlertProfileManager.tsx:189",type:"button","aria-pressed":g,onClick:()=>a(W(c,n.value)),className:`flex min-h-11 w-full items-center gap-3 rounded-xl px-3 py-2 text-left transition ${g?"bg-blue-50 text-blue-950":"hover:bg-slate-50"}`,children:[e.jsx("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:196",className:`flex size-5 shrink-0 items-center justify-center rounded-md border ${g?"border-blue-600 bg-blue-600 text-white":"border-slate-300 text-transparent"}`,children:e.jsx(J,{"data-loc":"client/src/components/AlertProfileManager.tsx:196",className:"size-3.5"})}),e.jsxs("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:197",className:"min-w-0 flex-1",children:[e.jsx("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:197",className:"block truncate text-sm font-bold",children:n.label}),n.detail&&e.jsx("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:197",className:"block truncate text-[11px] text-slate-400",children:n.detail})]})]},n.value)}):e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:200",className:"px-3 py-10 text-center text-sm text-slate-500",children:"선택 가능한 항목이 없습니다."})})]})]})}function se({label:t,values:s,onChange:r,placeholder:c,tone:a}){const[x,i]=m.useState(""),u=()=>{const o=x.normalize("NFKC").replace(/\s+/g," ").trim();if(!(!o||s.length>=5)){if(s.some(n=>n.toLocaleLowerCase("ko-KR")===o.toLocaleLowerCase("ko-KR"))){y.error("이미 등록한 단어입니다.");return}r([...s,o]),i("")}};return e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:232",className:"grid gap-2",children:[e.jsxs(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:233",className:"font-black text-slate-700",children:[t," ",e.jsxs("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:233",className:"font-medium text-slate-400",children:[s.length,"/5"]})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:234",className:"flex gap-2",children:[e.jsx(R,{"data-loc":"client/src/components/AlertProfileManager.tsx:235",value:x,onChange:o=>i(o.target.value),onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),u())},maxLength:60,placeholder:c,className:"h-11 rounded-xl"}),e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:243",type:"button",variant:"outline",onClick:u,disabled:!x.trim()||s.length>=5,className:"h-11 rounded-xl bg-white",children:[e.jsx(xe,{"data-loc":"client/src/components/AlertProfileManager.tsx:243",className:"size-4"})," 추가"]})]}),s.length>0&&e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:246",className:"flex flex-wrap gap-1.5",children:s.map(o=>e.jsxs(v,{"data-loc":"client/src/components/AlertProfileManager.tsx:248",className:a==="include"?"gap-1 bg-blue-50 text-blue-800":"gap-1 bg-rose-50 text-rose-800",children:[o,e.jsx("button",{"data-loc":"client/src/components/AlertProfileManager.tsx:250",type:"button",onClick:()=>r(s.filter(n=>n!==o)),"aria-label":`${o} 삭제`,className:"rounded-full p-0.5 hover:bg-black/5",children:e.jsx(Ye,{"data-loc":"client/src/components/AlertProfileManager.tsx:250",className:"size-3"})})]},o))})]})}function zt({open:t,profile:s,onOpenChange:r,onSaved:c}){const[a,x]=m.useState(()=>s?Dt(s):St),[i,u]=m.useState(""),o=m.useMemo(()=>({recordTypes:a.recordTypes,businessTypes:a.businessTypes,industrySearch:i||void 0}),[a.recordTypes,a.businessTypes,i]),n=f.alerts.filterOptions.useQuery(o,{enabled:t,retry:!1}),g=m.useMemo(()=>({profile:a,limit:3}),[a]),h=f.alerts.previewProfile.useQuery(g,{enabled:!1,retry:!1}),b=f.alerts.saveProfile.useMutation({onSuccess:async()=>{await c(),y.success(s?"알림 조건을 수정했습니다.":"알림 조건을 저장했습니다."),r(!1)},onError:I}),p=(l,N)=>{x(Ee=>({...Ee,[l]:N}))},P=l=>{const N=W(a.recordTypes,l);N.length&&p("recordTypes",N)},k=l=>{const N=W(a.businessTypes,l);N.length&&p("businessTypes",N)},C=a.recordTypes.length>0&&a.businessTypes.length>
410,j=(n.data?.industries??[]).map(l=>({value:l.code,label:`${l.name} (${l.code})`,detail:[l.categoryName,`${l.noticeCount}건`].filter(Boolean).join(" · ")})),d=(n.data?.regions??[]).map(l=>({value:l.key,label:l.label,detail:`${l.noticeCount}건`}));return e.jsx(Le,{"data-loc":"client/src/components/AlertProfileManager.tsx:315",open:t,onOpenChange:r,children:e.jsxs($e,{"data-loc":"client/src/components/AlertProfileManager.tsx:316",className:"max-h-[92vh] max-w-5xl overflow-y-auto rounded-2xl p-0 sm:rounded-3xl",children:[e.jsxs(Oe,{"data-loc":"client/src/components/AlertProfileManager.tsx:317",className:"border-b border-slate-200 bg-[#0b2b59] px-5 py-5 text-left text-white sm:px-7",children:[e.jsx(Be,{"data-loc":"client/src/components/AlertProfileManager.tsx:318",className:"text-xl font-black text-white",children:s?"알림 조건 수정":"새 알림 조건 만들기"}),e.jsx(Ue,{"data-loc":"client/src/components/AlertProfileManager.tsx:319",className:"text-slate-300",children:"선택한 조건을 모두 만족하는 새 공고만 매일 오전 9시 10분에 보냅니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:322",className:"grid gap-6 px-5 py-6 sm:px-7",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:323",className:"rounded-2xl border border-blue-200 bg-blue-50 px-4 py-4 text-sm leading-6 text-blue-950 sm:px-5",children:[e.jsx("strong",{"data-loc":"client/src/components/AlertProfileManager.tsx:324",className:"block font-black",children:"알림 대상 시간"}),"전일 오전 9시 이후부터 당일 오전 8시 59분까지 게시된 입찰·낙찰 정보를 조건 카드별로 확인합니다."]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:327",className:"grid gap-2",children:[e.jsxs(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:328",htmlFor:"alert-profile-name",className:"font-black text-slate-800",children:["조건 이름 ",e.jsx("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:328",className:"font-medium text-slate-400",children:"(선택)"})]}),e.jsx(R,{"data-loc":"client/src/components/AlertProfileManager.tsx:329",id:"alert-profile-name",value:a.name??"",maxLength:40,onChange:l=>p("name",l.target.value),placeholder:"비워두면 첫 키워드·분류로 자동 생성",className:"h-12 rounded-xl"}),e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:330",className:"text-xs leading-5 text-slate-500",children:"키워드 1개나 공고분류 1개만 선택해도 저장할 수 있습니다."})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:333",className:"grid gap-4 rounded-2xl border border-slate-200 bg-slate-50/70 p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:334",className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:335",children:[e.jsx(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:336",className:"mb-2 block font-black text-slate-800",children:"정보 종류"}),e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:337",className:"grid grid-cols-2 gap-2",children:Object.keys(O).map(l=>e.jsx("button",{"data-loc":"client/src/components/AlertProfileManager.tsx:339",type:"button","aria-pressed":a.recordTypes.includes(l),onClick:()=>P(l),className:`h-12 rounded-xl border text-sm font-black transition ${a.recordTypes.includes(l)?"border-blue-600 bg-blue-600 text-white shadow-sm":"border-slate-300 bg-white text-slate-700"}`,children:O[l]},l))})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:343",children:[e.jsx(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:344",className:"mb-2 block font-black text-slate-800",children:"업무 종류"}),e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:345",className:"grid grid-cols-3 gap-2",children:Object.keys(B).map(l=>e.jsx("button",{"data-loc":"client/src/components/AlertProfileManager.tsx:347",type:"button","aria-pressed":a.businessTypes.includes(l),onClick:()=>k(l),className:`h-12 rounded-xl border text-sm font-black transition ${a.businessTypes.includes(l)?"border-[#0c3f91] bg-[#0c3f91] text-white shadow-sm":"border-slate-300 bg-white text-slate-700"}`,children:B[l]},l))})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:352",className:"grid gap-3 sm:grid-cols-2",children:[e.jsx(te,{"data-loc":"client/src/components/AlertProfileManager.tsx:353",icon:gt,title:"업종",options:j,selected:a.industryCodes??[],onChange:l=>p("industryCodes",l),searchable:!0,search:i,onSearchChange:u,loading:n.isLoading}),e.jsx(te,{"data-loc":"client/src/components/AlertProfileManager.tsx:354",icon:bt,title:"지역",options:d,selected:a.regionKeys??[],onChange:l=>p("regionKeys",l),loading:n.isLoading})]}),e.jsx(Fe,{"data-loc":"client/src/components/AlertProfileManager.tsx:356",recordTypes:a.recordTypes,selectedKeys:a.categoryKeys??[],onChange:l=>p("categoryKeys",l)})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:363",className:"grid gap-4 roun
41ded-2xl border border-slate-200 p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:364",className:"flex items-center gap-2",children:[e.jsx(Ve,{"data-loc":"client/src/components/AlertProfileManager.tsx:364",className:"size-5 text-[#1559d6]"}),e.jsx("h3",{"data-loc":"client/src/components/AlertProfileManager.tsx:364",className:"font-black text-slate-950",children:"실무 필터"})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:365",className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:366",className:"grid gap-2",children:[e.jsx(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:366",className:"font-black text-slate-700",children:"발주처"}),e.jsx(R,{"data-loc":"client/src/components/AlertProfileManager.tsx:366",value:a.purchaser??"",onChange:l=>p("purchaser",l.target.value||null),placeholder:"예: 서울특별시교육청",className:"h-11 rounded-xl"})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:367",className:"grid gap-2",children:[e.jsx(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:367",className:"font-black text-slate-700",children:"정정공고"}),e.jsxs(H,{"data-loc":"client/src/components/AlertProfileManager.tsx:367",value:a.correctionMode??"all",onValueChange:l=>p("correctionMode",l),children:[e.jsx(q,{"data-loc":"client/src/components/AlertProfileManager.tsx:367",className:"h-11 rounded-xl",children:e.jsx(Q,{"data-loc":"client/src/components/AlertProfileManager.tsx:367"})}),e.jsxs(Z,{"data-loc":"client/src/components/AlertProfileManager.tsx:367",children:[e.jsx(_,{"data-loc":"client/src/components/AlertProfileManager.tsx:367",value:"all",children:"전체"}),e.jsx(_,{"data-loc":"client/src/components/AlertProfileManager.tsx:367",value:"exclude",children:"정정공고 제외"}),e.jsx(_,{"data-loc":"client/src/components/AlertProfileManager.tsx:367",value:"only",children:"정정공고만"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:368",className:"grid gap-2",children:[e.jsx(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:368",className:"font-black text-slate-700",children:"최소 금액"}),e.jsx(R,{"data-loc":"client/src/components/AlertProfileManager.tsx:368",inputMode:"numeric",value:a.amountMin??"",onChange:l=>p("amountMin",l.target.value.replace(/\D/g,"")||null),placeholder:"예: 10000000",className:"h-11 rounded-xl"})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:369",className:"grid gap-2",children:[e.jsx(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:369",className:"font-black text-slate-700",children:"최대 금액"}),e.jsx(R,{"data-loc":"client/src/components/AlertProfileManager.tsx:369",inputMode:"numeric",value:a.amountMax??"",onChange:l=>p("amountMax",l.target.value.replace(/\D/g,"")||null),placeholder:"예: 300000000",className:"h-11 rounded-xl"})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:370",className:"grid gap-2",children:[e.jsx(S,{"data-loc":"client/src/components/AlertProfileManager.tsx:370",className:"font-black text-slate-700",children:"협정 여부"}),e.jsxs(H,{"data-loc":"client/src/components/AlertProfileManager.tsx:370",value:a.agreementMode??"all",onValueChange:l=>p("agreementMode",l),children:[e.jsx(q,{"data-loc":"client/src/components/AlertProfileManager.tsx:370",className:"h-11 rounded-xl",children:e.jsx(Q,{"data-loc":"client/src/components/AlertProfileManager.tsx:370"})}),e.jsxs(Z,{"data-loc":"client/src/components/AlertProfileManager.tsx:370",children:[e.jsx(_,{"data-loc":"client/src/components/AlertProfileManager.tsx:370",value:"all",children:"전체"}),e.jsx(_,{"data-loc":"client/src/components/AlertProfileManager.tsx:370",value:"required",children:"협정 필요"}),e.jsx(_,{"data-loc":"client/src/components/AlertProfileManager.tsx:370",value:"notRequired",children:"협정 불필요"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:371",className:"grid gap-3 rounded-xl border border-slate-200 bg-slate-50 p-3",children:[e.jsxs("label",{"data-loc":"client/src/components/AlertProfileManager.tsx:372",className:"flex items-center justify-between gap-3 text-sm font-bold text-slate-700",children:["긴급공고만",e.jsx(G,{"data-loc":"client/src/components/AlertProfileManager.tsx:372",checked:a.urgentOnly??!1,onCheckedChange:l=>p("urgentOnly",l)})]}),e.jsxs("label",{"data-loc":"client/src/components/AlertProfileManager.tsx:373",className:"flex items-center justify-between gap-3 text-sm font-bold text-slate-700",children:["금액 미공개 포함",e.jsx(G,{"data-loc":"client/src/components/AlertProfileManager.tsx:373",checked:a.includeUnknownAmount??!1,onCheckedChange:l=>p("includeUnknownAmount",l)})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:378",className:"grid gap-4 roun
41ded-2xl border border-slate-200 p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:379",className:"flex flex-col justify-between gap-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:380",children:[e.jsx("h3",{"data-loc":"client/src/components/AlertProfileManager.tsx:380",className:"font-black text-slate-950",children:"포함·제외 키워드"}),e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:380",className:"mt-1 text-xs text-slate-500",children:"키워드가 없어도 선택한 필터만으로 저장할 수 있습니다."})]}),e.jsxs(H,{"data-loc":"client/src/components/AlertProfileManager.tsx:381",value:a.keywordMode??"any",onValueChange:l=>p("keywordMode",l),children:[e.jsx(q,{"data-loc":"client/src/components/AlertProfileManager.tsx:381",className:"h-10 w-full rounded-xl sm:w-44",children:e.jsx(Q,{"data-loc":"client/src/components/AlertProfileManager.tsx:381"})}),e.jsxs(Z,{"data-loc":"client/src/components/AlertProfileManager.tsx:381",children:[e.jsx(_,{"data-loc":"client/src/components/AlertProfileManager.tsx:381",value:"any",children:"포함 단어 중 하나"}),e.jsx(_,{"data-loc":"client/src/components/AlertProfileManager.tsx:381",value:"all",children:"포함 단어 모두"})]})]})]}),e.jsx(se,{"data-loc":"client/src/components/AlertProfileManager.tsx:383",label:"포함 키워드",values:a.includeKeywords??[],onChange:l=>p("includeKeywords",l),placeholder:"예: 방수",tone:"include"}),e.jsx(se,{"data-loc":"client/src/components/AlertProfileManager.tsx:384",label:"제외 키워드",values:a.excludeKeywords??[],onChange:l=>p("excludeKeywords",l),placeholder:"예: 설계용역",tone:"exclude"})]}),h.data&&e.jsx(D,{"data-loc":"client/src/components/AlertProfileManager.tsx:388",className:"border-blue-200 bg-blue-50/50 shadow-none",children:e.jsxs(E,{"data-loc":"client/src/components/AlertProfileManager.tsx:389",className:"p-4 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:390",className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:390",children:[e.jsxs("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:390",className:"text-xs font-black text-blue-700",children:[h.data.date," 기준"]}),e.jsxs("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:390",className:"mt-1 text-lg font-black text-slate-950",children:["예상 ",h.data.total,"건"]})]}),e.jsx(v,{"data-loc":"client/src/components/AlertProfileManager.tsx:390",className:"bg-blue-600 text-white",children:"상위 3건"})]}),e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:391",className:"mt-4 grid gap-2",children:h.data.matches.length?h.data.matches.map(({item:l,reasons:N})=>e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:393",className:"rounded-xl border border-blue-100 bg-white p-3",children:[e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:393",className:"line-clamp-2 text-sm font-black text-slate-900",children:l.title}),e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:393",className:"mt-1 text-xs text-slate-500",children:N.join(" · ")})]},l.noticeKey)):e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:394",className:"rounded-xl border border-dashed border-blue-200 bg-white px-4 py-6 text-center text-sm text-slate-500",children:"조건에 맞는 공고가 없습니다. 지역·금액·키워드를 넓혀보세요."})})]})})]}),e.jsxs(He,{"data-loc":"client/src/components/AlertProfileManager.tsx:401",className:"sticky bottom-0 border-t border-slate-200 bg-white px-5 py-4 sm:px-7",children:[e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:402",type:"button",variant:"outline",onClick:()=>void h.refetch(),disabled:!C||h.isFetching,className:"h-11 rounded-xl bg-white font-black",children:[h.isFetching?e.jsx(w,{"data-loc":"client/src/components/AlertProfileManager.tsx:402",className:"animate-spin"}):e.jsx(ht,{"data-loc":"client/src/components/AlertProfileManager.tsx:402",className:"size-4"})," 결과 미리보기"]}),e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:403",type:"button",onClick:()=>b.mutate({profileId:s?.id,profile:a}),disabled:!C||b.isPending,className:"h-11 rounded-xl bg-[#1559d6] font-black hover:bg-[#104bb8]",children:[b.isPending?e.jsx(w,{"data-loc":"client/src/components/AlertProfileManager.tsx:403",className:"animate-spin"}):e.jsx(At,{"data-loc":"client/src/components/AlertProfileManager.tsx:403",className:"size-4"})," 조건 저장"]})]})]})})}function _t({profiles:t,maxProfiles:s,onChanged:r}){const[c,a]=m.useState(!1),[x,i]=m.useState(null),u=f.useUtils(),o=m.useMemo(()=>{const d=new URLSearchParams(window.location.search),l=Number(d.get("profileId")),N=d.get("date")??void 0;return{profileId:Number.isInteger(l)&&l>0?l:0,date:/^\d{4}-\d{2}-\d{2}$/.test(N??"")?N:void 0,limit:100}},[]),n=f.alerts.profileResults.useQuery(o,{enabled:o.profileId>0,retry:!1}),g=f.alerts.toggleProfile.useMutation({onSuccess:r,onError:I}),h=f.alerts.duplicateProfile.useMutation({onSuccess:async()=>
41{await r(),y.success("알림 조건을 복제했습니다. 복제본은 꺼진 상태입니다.")},onError:I}),b=f.alerts.deleteProfile.useMutation({onSuccess:async()=>{await r(),y.success("알림 조건을 삭제했습니다.")},onError:I}),p=f.alerts.testProfile.useMutation({onSuccess:()=>y.success("조건 카드 기준으로 텔레그램 테스트 메시지를 보냈습니다."),onError:I}),P=()=>{i(null),a(!0)},k=d=>{i(d),a(!0)},C=async()=>{await Promise.all([r(),u.alerts.filterOptions.invalidate()])},j=t.find(d=>d.id===o.profileId);return e.jsxs(e.Fragment,{children:[e.jsxs(D,{"data-loc":"client/src/components/AlertProfileManager.tsx:460",className:"overflow-hidden border-slate-200 shadow-[0_14px_45px_rgba(17,43,86,.07)]",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:461",className:"flex flex-col justify-between gap-4 border-b border-slate-100 px-5 py-5 sm:flex-row sm:items-center sm:px-7",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:462",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:463",className:"flex size-10 items-center justify-center rounded-xl bg-[#eaf2ff] text-[#1559d6]",children:e.jsx(F,{"data-loc":"client/src/components/AlertProfileManager.tsx:463",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:464",children:[e.jsx("h2",{"data-loc":"client/src/components/AlertProfileManager.tsx:464",className:"text-xl font-black tracking-tight",children:"맞춤 알림 조건"}),e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:464",className:"text-sm text-slate-500",children:"목록의 공고분류·실무필터·키워드를 함께 저장합니다."})]})]}),e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:466",type:"button",onClick:P,disabled:t.length>=s,className:"h-11 rounded-xl bg-[#1559d6] font-black hover:bg-[#104bb8]",children:[e.jsx(xe,{"data-loc":"client/src/components/AlertProfileManager.tsx:466",className:"size-4"})," 새 조건 만들기"]})]}),e.jsxs(E,{"data-loc":"client/src/components/AlertProfileManager.tsx:468",className:"grid gap-4 p-5 sm:p-7",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:469",className:"flex items-center justify-between gap-3 rounded-xl bg-slate-50 px-4 py-3 text-sm",children:[e.jsx("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:469",className:"font-bold text-slate-600",children:"저장한 조건"}),e.jsxs("strong",{"data-loc":"client/src/components/AlertProfileManager.tsx:469",className:"text-[#1559d6]",children:[t.length,"/",s]})]}),t.length?t.map(d=>e.jsxs("article",{"data-loc":"client/src/components/AlertProfileManager.tsx:473",className:`rounded-2xl border p-4 transition sm:p-5 ${d.enabled?"border-blue-200 bg-white shadow-[0_8px_30px_rgba(21,89,214,.06)]":"border-slate-200 bg-slate-50 opacity-80"}`,children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:474",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:475",className:"min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:475",className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{"data-loc":"client/src/components/AlertProfileManager.tsx:475",className:"truncate text-lg font-black text-slate-950",children:d.name}),d.legacyKeywordId&&e.jsx(v,{"data-loc":"client/src/components/AlertProfileManager.tsx:475",variant:"outline",className:"border-emerald-200 bg-emerald-50 text-emerald-700",children:"기존 키워드 이전"})]}),e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:475",className:"mt-1 text-xs font-bold text-slate-400",children:"전일 09시~당일 08시59분 · 오전 9시10분 발송"})]}),e.jsx(G,{"data-loc":"client/src/components/AlertProfileManager.tsx:476",checked:d.enabled,onCheckedChange:l=>g.mutate({profileId:d.id,enabled:l}),"aria-label":`${d.name} 알림 켜기 또는 끄기`})]}),e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:478",className:"mt-4",children:e.jsx(Et,{"data-loc":"client/src/components/AlertProfileManager.tsx:478",profile:d})}),e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:479",className:"mt-4 grid grid-cols-2 gap-2 border-t border-slate-100 pt-4 sm:grid-cols-4",children:[e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:480",type:"button",variant:"outline",onClick:()=>k(d),className:"h-10 rounded-xl bg-white text-xs font-black",children:[e.jsx(Re,{"data-loc":"client/src/components/AlertProfileManager.tsx:480",className:"size-3.5"})," 편집"]}),e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:481",type:"button",variant:"outline",onClick:()=>p.mutate({profileId:d.id}),disabled:p.isPending,className:"h-10 rounded-xl bg-white text-xs font-black",children:[e.jsx(X,{"data-loc":"client/src/components/AlertProfileManager.tsx:481",className:"size-3.5"})," 테스트"]}),e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:482",type:"button",variant:"outline",onClick:()=>h.mutate({profileId:d.id}),disabled:t.length>=s||h.isPending,className:"h-10 rounded-xl bg-white text-xs font-black",children:[e.jsx(Ke,{"data-loc":"client/src/components/AlertProfileManager.tsx:482",className:"size-3.5"})," 복제"]}),e.jsxs(A,{"data-loc":"client/src/components/AlertProfileManager.tsx:483",type:"button",variant:"outline",onClick:()=>{window.confirm(`‘${d.name}’ 조건을 삭제할까요?`)&&b.mutate({profileId:d.id})},disabled:b.isPending,className:"h-10 rounded-xl border-rose-200 bg-white text-xs font-black text-rose-700 hover:bg-rose-50",children:[e.jsx(Ie,{"data-loc":"client/src/components/AlertProfileManager.tsx:483",className:"size-3.5"})," 삭제"]})]})]},d.id)):e.jsxs("button",{"data-loc":"client/src/components/AlertProfileManager.tsx:471",type:"button",onClick:P,className:"rounded-2xl border border-dashed border-blue-300 bg-blue-50/50 px-5 py-10 text-center transition hover:bg-blue-50",children:[e.jsx(re,{"data-loc":"client/src/components/AlertProfileManager.tsx:471",className:"mx-auto 
41size-8 text-blue-500"}),e.jsx("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:471",className:"mt-3 block font-black text-slate-900",children:"첫 맞춤 알림 조건을 만들어 보세요."}),e.jsx("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:471",className:"mt-1 block text-sm text-slate-500",children:"입찰·낙찰과 공사·용역·물품부터 세부 조건까지 한 번에 고릅니다."})]})]}),c&&e.jsx(zt,{"data-loc":"client/src/components/AlertProfileManager.tsx:489",open:c,profile:x,onOpenChange:a,onSaved:C},x?.id??"new")]}),o.profileId>0&&e.jsxs(D,{"data-loc":"client/src/components/AlertProfileManager.tsx:499",id:"profile-results",className:"scroll-mt-24 border-blue-200 shadow-[0_14px_45px_rgba(17,43,86,.07)]",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:500",className:"flex flex-col justify-between gap-3 border-b border-blue-100 bg-blue-50/70 px-5 py-5 sm:flex-row sm:items-center sm:px-7",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:501",children:[e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:502",className:"text-xs font-black text-blue-700",children:"텔레그램 전체 ê²°ê³¼ · 전일 09시~당일 08시59분"}),e.jsx("h2",{"data-loc":"client/src/components/AlertProfileManager.tsx:503",className:"mt-1 text-xl font-black text-slate-950",children:j?.name??"맞춤 알림"})]}),n.data&&e.jsxs(v,{"data-loc":"client/src/components/AlertProfileManager.tsx:505",className:"w-fit bg-blue-600 text-white",children:[n.data.date," · ",n.data.total,"ê±´"]})]}),e.jsx(E,{"data-loc":"client/src/components/AlertProfileManager.tsx:507",className:"p-5 sm:p-7",children:n.isLoading?e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:509",className:"flex items-center justify-center py-12 text-sm font-bold text-slate-500",children:[e.jsx(w,{"data-loc":"client/src/components/AlertProfileManager.tsx:509",className:"mr-2 size-5 animate-spin text-blue-600"})," 결과를 불러오는 중입니다."]}):n.error?e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:511",className:"rounded-xl border border-rose-200 bg-rose-50 px-4 py-6 text-center text-sm font-bold text-rose-700",children:n.error.message}):n.data?.matches.length?e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:513",className:"grid gap-3",children:n.data.matches.map(({item:d,reasons:l})=>e.jsxs("a",{"data-loc":"client/src/components/AlertProfileManager.tsx:515",href:`/notice/${encodeURIComponent(d.noticeKey)}`,className:"rounded-2xl border border-slate-200 bg-white p-4 transition hover:border-blue-300 hover:bg-blue-50/30 sm:p-5",children:[e.jsxs("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:516",className:"flex flex-wrap items-center gap-2 text-xs font-black",children:[e.jsxs(v,{"data-loc":"client/src/components/AlertProfileManager.tsx:516",variant:"outline",className:"border-blue-200 bg-blue-50 text-blue-800",children:[O[d.recordType]," · ",B[d.businessType]]}),e.jsx("span",{"data-loc":"client/src/components/AlertProfileManager.tsx:516",className:"text-slate-400",children:l.join(" · ")})]}),e.jsx("h3",{"data-loc":"client/src/components/AlertProfileManager.tsx:517",className:"mt-2 line-clamp-2 font-black leading-6 text-slate-950",children:d.title}),e.jsx("p",{"data-loc":"client/src/components/AlertProfileManager.tsx:518",className:"mt-2 text-sm text-slate-500",children:d.recordType==="award"?d.winnerName??d.purchaser??"낙찰업체 미제공":d.purchaser??d.demandAgency??"발주처 미제공"})]},d.noticeKey))}):e.jsx("div",{"data-loc":"client/src/components/AlertProfileManager.tsx:523",className:"rounded-xl border border-dashed border-slate-300 bg-slate-50 px-4 py-8 text-center text-sm text-slate-500",children:"해당 발송 시간에 ì¡°ê±´ê
41³¼ 일치하는 공고가 없습니다."})})]})]})}var be="AlertDialog",[Tt]=ae(be,[ce]),z=ce(),Ae=t=>{const{__scopeAlertDialog:s,...r}=t,c=z(s);return e.jsx(Xe,{...c,...r,modal:!0})};Ae.displayName=be;var Rt="AlertDialogTrigger",Kt=m.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...c}=t,a=z(r);return e.jsx(ct,{...a,...c,ref:s})});Kt.displayName=Rt;var It="AlertDialogPortal",je=t=>{const{__scopeAlertDialog:s,...r}=t,c=z(s);return e.jsx(lt,{...c,...r})};je.displayName=It;var Lt="AlertDialogOverlay",Ne=m.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...c}=t,a=z(r);return e.jsx(rt,{...a,...c,ref:s})});Ne.displayName=Lt;var K="AlertDialogContent",[$t,Ot]=Tt(K),Bt=tt("AlertDialogContent"),ve=m.forwardRef((t,s)=>{const{__scopeAlertDialog:r,children:c,...a}=t,x=z(r),i=m.useRef(null),u=U(s,i),o=m.useRef(null);return e.jsx(Je,{contentName:K,titleName:ye,docsSlug:"alert-dialog",children:e.jsx($t,{scope:r,cancelRef:o,children:e.jsxs(et,{role:"alertdialog",...x,...a,ref:u,onOpenAutoFocus:le(a.onOpenAutoFocus,n=>{n.preventDefault(),o.current?.focus({preventScroll:!0})}),onPointerDownOutside:n=>n.preventDefault(),onInteractOutside:n=>n.preventDefault(),children:[e.jsx(Bt,{children:c}),e.jsx(Ft,{contentRef:i})]})})})});ve.displayName=K;var ye="AlertDialogTitle",Me=m.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...c}=t,a=z(r);return e.jsx(st,{...a,...c,ref:s})});Me.displayName=ye;var Pe="AlertDialogDescription",we=m.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...c}=t,a=z(r);return e.jsx(at,{...a,...c,ref:s})});we.displayName=Pe;var Ut="AlertDialogAction",ke=m.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...c}=t,a=z(r);return e.jsx(ne,{...a,...c,ref:s})});ke.displayName=Ut;var Ce="AlertDialogCancel",Se=m.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...c}
41=t,{cancelRef:a}=Ot(Ce,r),x=z(r),i=U(s,a);return e.jsx(ne,{...x,...c,ref:i})});Se.displayName=Ce;var Ft=({contentRef:t})=>{const s=`\`${K}\` requires a description for the component to be accessible for screen reader users.
42
43You can add a description to the \`${K}\` by passing a \`${Pe}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
44
45Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${K}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
46
47For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(s)},[s,t]),null},Vt=Ae,Ht=je,qt=Ne,Qt=ve,Zt=ke,Gt=Se,Wt=Me,Yt=we;function Xt({...t}){return e.jsx(Vt,{"data-loc":"client/src/components/ui/alert-dialog.tsx:10","data-slot":"alert-dialog",...t})}function Jt({...t}){return e.jsx(Ht,{"data-loc":"client/src/components/ui/alert-dialog.tsx:25","data-slot":"alert-dialog-portal",...t})}function es({className:t,...s}){return e.jsx(qt,{"data-loc":"client/src/components/ui/alert-dialog.tsx:34","data-slot":"alert-dialog-overlay",className:M("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s})}function ts({className:t,...s}){return e.jsxs(Jt,{"data-loc":"client/src/components/ui/alert-dialog.tsx:50",children:[e.jsx(es,{"data-loc":"client/src/components/ui/alert-dialog.tsx:51"}),e.jsx(Qt,{"data-loc":"client/src/components/ui/alert-dialog.tsx:52","data-slot":"alert-dialog-content",className:M("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...s})]})}function ss({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:69","data-slot":"alert-dialog-header",className:M("flex flex-col gap-2 text-center sm:text-left",t),...s})}function as({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:82","data-slot":"alert-dialog-footer",className:M("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...s})}function ls({className:t,...s}){return e.jsx(Wt,{"data-loc":"client/src/components/ui/alert-dialog.tsx:98","data-slot":"alert-dialog-title",className:M("text-lg font-semibold",t),...s})}function rs({className:t,...s}){return e.jsx(Yt,{"data-loc":"client/src/components/ui/alert-dialog.tsx:111","data-slot":"alert-dialog-description",className:M("text-muted-foreground text-sm",t),...s})}function cs({className:t,...s}){return e.jsx(Zt,{"data-loc":"client/src/components/ui/alert-dialog.tsx:124",className:M(oe(),t),...s})}function ns({className:t,...s}){return e.jsx(Gt,{"data-loc":"client/src/components/ui/alert-dialog.tsx:136",className:M(oe({variant:"outline"}),t),...s})}function os(t){return t?new Intl.DateTimeFormat("ko-KR",{dateStyle:"medium",timeStyle:"short",timeZone:"Asia/Seoul"}).format(new Date(t)):"아직 없음"}function L(t){y.error(t instanceof Error?t.message:"요청을 처리하지 못했습니다.")}const is=[{icon:de,number:"1",title:"텔레그램 연결",description:"계정·비밀번호 없이 시작 버튼 한 번"},{icon:re,number:"2",title:"맞춤 조건 3개 저장",description:"공고분류·실무필터·키워드를 함께 선택"},{icon:F,number:"3",title:"매일 오전 9시 10분 수신",description:"전일 09시~당일 08시59분 공고 발송"}];function De({connected:t}){return e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:75",className:"grid gap-px border border-[#d8d2c6] bg-[#d8d2c6] md:grid-cols-3",children:is.map(({icon:s,number:r,title:c,description:a},x)=>{const i=t||x===0;return e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:79",className:`flex items-center gap-4 border-0 p-4 shadow-none ${i?"bg-[#fffefa]":"bg-[#f7f4ed]"}`,children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:85",className:`flex size-11 shrink-0 items-center justify-center border ${i?"border-[#edc5b8] bg-[#fff3ed] text-[#b54f35]":"border-[#d8d2c6] bg-[#fffefa] text-slate-500"}`,children:t&&x===0?e.jsx(J,{"data-loc":"client/src/pages/Alerts.tsx:90",className:"size-5"}):e.jsx(s,{"data-loc":"client/src/pages/Alerts.tsx:90",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:92",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:93",className:"text-xs font-black text-[#b54f35]",children:[r,"단계"]}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:94",className:"font-black text-[#102a43]",children:c}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:95",className:"mt-0.5 text-sm text-slate-500",children:a})]})]},r)})})}function ds({onConnected:t}){const s=f.alerts.createPairing.useMutation({onError:L}),r=f.alerts.pollPairing.useMutation({onError:L}),c=m.useRef(!1),a=s.data,x=a?.code,i=!!(a&&a.expiresAt<=Date.now())||r.data?.status==="expired";m.useEffect(()=>{if(!x||i||c.current)return;let o=!1,n=!1;const g=async()=>
47{if(!(n||o||c.current)){n=!0;try{const b=await r.mutateAsync({code:x});!o&&b.status==="connected"&&(c.current=!0,y.success(b.connection.restored?"기존 맞춤 조건과 알림 설정을 복원했습니다.":"텔레그램 연결을 완료했습니다."),await t())}catch{}finally{n=!1}}};g();const h=window.setInterval(()=>void g(),2500);return()=>{o=!0,window.clearInterval(h)}},[i,x]);const u=()=>{c.current=!1,r.reset(),s.mutate()};return e.jsxs(D,{"data-loc":"client/src/pages/Alerts.tsx:151",className:"overflow-hidden rounded-none border-[#d8d2c6] bg-[#fffefa] shadow-none",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:152",className:"border-b border-[#d8d2c6] bg-[#ece7dc] px-6 py-5 sm:px-8",children:e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:153",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:154",className:"flex size-11 items-center justify-center border border-[#edc5b8] bg-[#fff3ed] text-[#b54f35]",children:e.jsx(X,{"data-loc":"client/src/pages/Alerts.tsx:155",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:157",children:[e.jsx("h2",{"data-loc":"client/src/pages/Alerts.tsx:158",className:"text-xl font-black tracking-tight text-[#102a43]",children:"텔레그램으로 본인 확인"}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:159",className:"text-sm text-slate-500",children:"구글·페이스북 로그인과 별도 회원가입은 사용하지 않습니다."})]})]})}),e.jsx(E,{"data-loc":"client/src/pages/Alerts.tsx:163",className:"p-6 sm:p-8",children:!a||i?e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:165",className:"grid gap-5",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:166",className:"border border-[#edc5b8] bg-[#fff3ed] p-5",children:e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:167",className:"flex gap-3",children:[e.jsx(xt,{"data-loc":"client/src/pages/Alerts.tsx:168",className:"mt-0.5 size-6 shrink-0 text-[#b54f35]"}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:169",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:170",className:"font-black text-[#102a43]",children:"한 번 연결하면 이 기기에서 자동 유지됩니다."}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:171",className:"mt-1 text-sm leading-6 text-slate-600",children:"다른 휴대전화나 PC에서는 같은 텔레그램으로 다시 확인하면 기존 맞춤 조건과 알림 설정을 그대로 불러옵니다."})]})]})}),e.jsxs(A,{"data-loc":"client/src/pages/Alerts.tsx:177",onClick:u,disabled:s.isPending,className:"h-14 rounded-none bg-[#df6d4b] text-base font-black text-white shadow-none hover:bg-[#b54f35]",children:[s.isPending?e.jsx(w,{"data-loc":"client/src/pages/Alerts.tsx:182",className:"animate-spin"}):e.jsx(de,{"data-loc":"client/src/pages/Alerts.tsx:182"}),i?"새 연결 코드 받기":"텔레그램 연결 시작"]})]}):e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:187",className:"grid gap-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:188",className:"grid gap-3 border border-[#d8d2c6] bg-[#f7f4ed] p-5 sm:grid-cols-[1fr_auto] sm:items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:189",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:190",className:"text-xs font-black uppercase tracking-[0.12em] text-slate-400",children:"연결할 봇"}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:191",className:"mt-1 text-lg font-black text-slate-950",children:["@",a.bot.username]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:192",className:"mt-2 font-mono text-sm font-bold text-[#b54f35]",children:["연결 코드 ",a.code]})]}),e.jsx(A,{"data-loc":"client/src/pages/Alerts.tsx:194",asChild:!0,className:"h-12 rounded-none bg-[#df6d4b] px-5 font-black hover:bg-[#b54f35]",children:e.jsxs("a",{"data-loc":"client/src/pages/Alerts.tsx:195",href:a.connectUrl,target:"_blank",rel:"noreferrer",children:["텔레그램 열기 ",e.jsx(mt,{"data-loc":"client/src/pages/Alerts.tsx:196",className:"size-4"})]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:200",className:"flex items-start gap-3 border border-amber-300 bg-amber-50 p-4 text-sm text-amber-950",children:[e.jsx(ut,{"data-loc":"client/src/pages/Alerts.tsx:201",className:"mt-0.5 size-5 shrink-0 text-amber-600"}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:202",children:["텔레그램에서 ",e.jsx("strong",{"data-loc":"client/src/pages/Alerts.tsx:203",children:"시작"}),"을 누르세요. 이 화면이 자동으로 연결을 확인하며, 코드는 10분 뒤 만료됩니다."]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:206",className:"flex items-center justify-center gap-2 py-2 text-sm font-bold text-slate-500",role:"status",children:[e.jsx(w,{"data-loc":"client/src/pages/Alerts.tsx:207",className:"size-4 animate-spin text-[#b54f35]"})," 텔레그램 확인을 기다리는 중입니다."]})]})})]})}function xs(){const{user:t,logout:s}=ie(),r=f.useUtils(),c=f.alerts.overview.useQuery(void 0,{retry:!1}),[a,x]=m.useState(!1),i=async()=>r.alerts.overview.invalidate(),u=f.alerts.testTelegram.useMutation({onSuccess:()=>y.success("텔레그램으로 연결 확인 메시지를 보냈습니다."),onError:L}),o=f.alerts.unsubscribe.useMutation({onSuccess:async()=>{x(!1),await i(),y.success("알림 신청을 해지했습니다. 조건과 발송 이력은 보존됩니다.")},onError:L}),n=f.alerts.resubscribe.useMutation({onSuccess:async()=>{await i(),y.success("알림을 다시 신청했습니다.")},onError:L});if(c.isLoading||!c.data)return e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:245",className:"flex min-h-[420px] items-center justify-center",children:e.jsx(w,{"data-loc":"client/src/pages/Alerts.tsx:246",className:"size-8 animate-spin text-[#1559d6]"})});const{connection:g,deliveries:h,profiles:b,maxProfiles:p,schedule:P,senderName:k,activeSubscribers:C}=c.data;return e.jsxs(e.Fragment,{children:[e.jsx("section",{"data-loc":"client/src/pages/Alerts.tsx:254",className:"hero-grid relative overflow-hidden border-b border-[#20445d] text-white",children:e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:255",className:"container relative py-12 sm:py-16",children:e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:256",className:"flex flex-col justify-between gap-8 lg:flex-row lg:items-end",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:257",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:258",className:"mb-4 flex items-center gap-2 border-l-2 border-[#f8c0af] pl-3 text-[11px] font-black tracking-[.14em] text-[#f8c0af]",children:[e.jsx($,{"data-loc":"client/src/pages/Alerts.tsx:259",className:"size-4"})," 텔레그램 연결 완료"]}),e.jsxs("h1",{"data-loc":"client/src/pages/Alerts.tsx:261",className:"text-3xl font-black tracking-[-0.04em] sm:text-5xl",children:[t?.name??g.displayName??"사용자","님,",e.jsx("br",{"data-loc":"client/src/pages/Alerts.tsx:263"}),"입찰·낙찰 소식을 먼저 받으세요."]}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:265",className:"mt-5 max-w-2xl text-base leading-7 text-white/72 sm:text-lg",children:"전일 오전 9시 이후부터 당일 오전 8시 59분까지 게시된 입찰·낙찰 정보를 저장한 조건별로 찾아 매일 오전 9시 10분 텔레그램으로 전달합니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:269",className:"grid grid-cols-2 gap-px border border-white/15 bg-white/15 sm:grid-cols-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:270",className:"bg-[#101c39]/85 px-4 py-4 sm:px-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:271",className:"text-2xl font-black",children:[b.length,"/",p]}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:272",className:"mt-1 text-xs font-bold text-blue-200/70",children:"맞춤 조건"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:274",className:"bg-[#101c39]/85 px-4 py-4 sm:px-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:275",className:"text-2xl font-black",children:[C.toLocaleStr
47ing("ko-KR"),"명"]}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:276",className:"mt-1 text-xs font-bold text-blue-200/70",children:"알림 신청자"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:278",className:"bg-[#101c39]/85 px-4 py-4 sm:px-5",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:279",className:"text-2xl font-black",children:g.alertsEnabled?"사용 중":"해지됨"}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:280",className:"mt-1 text-xs font-bold text-blue-200/70",children:"알림"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:282",className:"bg-[#101c39]/85 px-4 py-4 sm:px-5",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:283",className:"text-2xl font-black",children:"09:10"}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:284",className:"mt-1 text-xs font-bold text-blue-200/70",children:"매일 발송"})]})]})]})})}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:291",className:"container py-10 sm:py-14",children:[e.jsx(De,{"data-loc":"client/src/pages/Alerts.tsx:292",connected:!0}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:293",className:"mt-8 grid gap-6 xl:grid-cols-[1.18fr_.82fr]",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:294",className:"space-y-6",children:[e.jsx(_t,{"data-loc":"client/src/pages/Alerts.tsx:295",profiles:b,maxProfiles:p,onChanged:i}),e.jsxs(D,{"data-loc":"client/src/pages/Alerts.tsx:297",className:"border-slate-200 shadow-[0_14px_45px_rgba(17,43,86,.07)]",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:298",className:"border-b border-[#d8d2c6] px-6 py-5 sm:px-7",children:e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:299",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:300",className:"flex size-10 items-center justify-center rounded-xl bg-emerald-50 text-emerald-600",children:e.jsx(dt,{"data-loc":"client/src/pages/Alerts.tsx:301",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:303",children:[e.jsx("h2",{"data-loc":"client/src/pages/Alerts.tsx:304",className:"text-xl font-black tracking-tight",children:"발송 순서"}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:305",className:"text-sm text-slate-500",children:"저장된 과거 자료는 지우지 않고 날짜별로 계속 보존합니다."})]})]})}),e.jsx(E,{"data-loc":"client/src/pages/Alerts.tsx:309",className:"p-6 sm:p-7",children:e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:310",className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:311",className:"rounded-2xl border border-slate-200 bg-slate-50 p-5",children:[e.jsx(v,{"data-loc":"client/src/pages/Alerts.tsx:312",className:"bg-[#1559d6] text-white",children:"오전 9시"}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:313",className:"mt-3 font-black text-slate-950",children:"발송 직전 나라장터 갱신"}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:314",className:"mt-1 text-sm leading-6 text-slate-500",children:"전일 오전 9시 이후부터 당일 오전 8시 59분까지 게시된 공사·물품·용역 입찰·낙찰 데이터를 누적합니다."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:316",className:"rounded-2xl border border-slate-200 bg-slate-50 p-5",children:[e.jsx(v,{"data-loc":"client/src/pages/Alerts.tsx:317",className:"bg-emerald-600 text-white",children:"오전 9시 10분"}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:318",className:"mt-3 font-black text-slate-950",children:"ì¡°ê±´ 카드별 텔레그램 발송"}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:319",className:"mt-1 text-sm leading-6 text-slate-500",children:"같은 24시간 범위의 새 공고를 ì¡°ê±´ 카드별 메시지와 공무계산기 링크로 보냅니다."})]})]})})]})]}),e.jsxs("aside",{"data-loc":"client/src/pages/Alerts.tsx:326",className:"space-y-6",children:[e.jsx(D,{"data-loc":"client/src/pages/Alerts.tsx:327",className:"border-slate-200 shadow-[0_14px_45px_rgba(17,43,86,.07)]",children:e.jsxs(E,{"data-loc":"client/src/pages/Alerts.tsx:328",className:"p-6 sm:p-7",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:329",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:330",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:331",className:"flex size-11 items-center justify-center rounded-full bg-emerald-500 text-white",children:e.jsx(J,{"data-loc":"client/src/pages/Alerts.tsx:332",className:"size-6"})}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:334",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:335",className:"font-black text-slate-950",children:g.displayName??"텔레그램"}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:336",className:`text-sm ${g.alertsEnabled?"text-emerald-700":"text-slate-500"}`,children:g.alertsEnabled?"알림 신청 중":"알림 해지됨"})]})]}),e.jsx(v,{"data-loc":"client/src/pages/Alerts.tsx:341",className:g.alertsEnabled?"bg-emerald-100 text-emerald-800":"bg-slate-100 text-slate-600",children:g.alertsEnabled?"수신 중":"해지"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:345",className:"mt-5 grid gap-2 rounded-2xl bg-slate-50 p-4 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:346",className:"flex justify-between gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/Alerts.tsx:346",className:"text-slate-500",children:"발송명"}),e.jsx("strong",{"data-loc":"client/src/pages/Alerts.tsx:346",children:k})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:347",className:"flex justify-between gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/Alerts.tsx:347",className:"text-slate-500",children:"최근 발송"}),e.jsx("strong",{"data-loc":"client/src/pages/Alerts.tsx:347",children:os(g.lastSentAt)})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:348",className:"flex justify-between gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/Alerts.tsx:348",className:"text-slate-500",children:"운영 일정"}),e.jsx("strong",{"data-loc":"client/src/pages/Alerts.tsx:348",children:P?.enabled?"정상":"확인 중"})]})]}),g.alertsEnabled?e.jsxs(e.Fragment,{children:[e.jsxs(A,{"data-loc":"client/src/pages/Alerts.tsx:352",variant:"outline",onClick:()=>u.mutate(),disabled:u.isPending,className:"mt-4 h-11 w-full rounded-xl border-slate-300 bg-white font-black",children:[u.isPending?e.jsx(w,{"data-loc":"client/src/pages/Alerts.tsx:358",className:"animate-spin"}):e.jsx(X,{"data-loc":"client/src/pages/Alerts.tsx:358",className:"size-4"}),"연결 확인 메시지 받기"]}),e.jsx(A,{"data-loc":"client/src/pages/Alerts.tsx:361",variant:"outline",onClick:()=>x(!0),className:"mt-2 h-11 w-full rounded-xl border-red-200 bg-white font-black text-red-700 hover:bg-red-50 hover:text-red-800",children:"알림 신청 해지"})]}):e.jsxs(A,{"data-loc":"client/src/pages/Alerts.tsx:370",onClick:()=>n.mutate(),disabled:n.isPending,className:"mt-4 h-12 w-full rounded-xl bg-[#1559d6] font-black hover:bg-[#104bb8]",children:[n.isPending?e.jsx(w,{"data-loc":"client/src/pages/Alerts.tsx:375",className:"animate-spin"}):e.jsx(F,{"data-loc":"client/src/pages/Alerts.tsx:375",className:"size-4"}),"알림 다시 신청"]}),e.jsxs(A,{"data-loc":"client/src/pages/Alerts.tsx:379",variant:"ghost",onClick:()=>void s(),className:"mt-2 h-10 w-full text-slate-500 hover:bg-slate-100 hover:text-slate-800",children:[e.jsx(jt,{"data-loc":"client/src/pages/Alerts.tsx:384",className:"size-4"})," 이 기기의 자동 연결 해제"]}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:386",className:"mt-2 text-center text-xs leading-5 text-slate-400",children:"맞춤 ì¡°ê±´ê
47³¼ 발송 이력은 보존되어 텔레그램 재확인 후 복원됩니다."}),e.jsx(Xt,{"data-loc":"client/src/pages/Alerts.tsx:387",open:a,onOpenChange:x,children:e.jsxs(ts,{"data-loc":"client/src/pages/Alerts.tsx:388",children:[e.jsxs(ss,{"data-loc":"client/src/pages/Alerts.tsx:389",children:[e.jsx(ls,{"data-loc":"client/src/pages/Alerts.tsx:390",children:"알림 신청을 해지할까요?"}),e.jsx(rs,{"data-loc":"client/src/pages/Alerts.tsx:391",children:"텔레그램 연결과 저장한 ì¡°ê±´ 카드, 과거 발송 이력은 삭제하지 않습니다. 해지 후에도 이 화면에서 언제든 다시 신청할 수 있습니다."})]}),e.jsxs(as,{"data-loc":"client/src/pages/Alerts.tsx:395",children:[e.jsx(ns,{"data-loc":"client/src/pages/Alerts.tsx:396",children:"계속 받기"}),e.jsx(cs,{"data-loc":"client/src/pages/Alerts.tsx:397",onClick:()=>o.mutate(),disabled:o.isPending,className:"bg-red-600 text-white hover:bg-red-700",children:o.isPending?"처리 중":"알림 해지"})]})]})})]})}),e.jsxs(D,{"data-loc":"client/src/pages/Alerts.tsx:410",className:"border-slate-200 shadow-[0_14px_45px_rgba(17,43,86,.07)]",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:411",className:"border-b border-[#d8d2c6] px-6 py-5",children:[e.jsx("h2",{"data-loc":"client/src/pages/Alerts.tsx:412",className:"font-black text-slate-950",children:"최근 발송 ê²°ê³¼"}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:413",className:"mt-1 text-sm text-slate-500",children:"최근 매칭 공고를 확인합니다."})]}),e.jsx(E,{"data-loc":"client/src/pages/Alerts.tsx:415",className:"p-5",children:h.length?e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:421",className:"grid gap-3",children:h.slice(0,8).map(j=>e.jsxs("a",{"data-loc":"client/src/pages/Alerts.tsx:423",href:j.sourceUrl??"https://www.g2b.go.kr/",target:"_blank",rel:"noreferrer",className:"rounded-xl border border-slate-200 p-4 transition hover:border-blue-300 hover:bg-blue-50/40",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:430",className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx(v,{"data-loc":"client/src/pages/Alerts.tsx:431",variant:"secondary",className:"bg-slate-100 text-slate-600",children:j.keyword}),e.jsx("span",{"data-loc":"client/src/pages/Alerts.tsx:432",className:"font-bold text-slate-400",children:j.deliveryDate})]}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:434",className:"mt-2 line-clamp-2 text-sm font-black leading-5 text-slate-900",children:j.title})]},j.id))}):e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:417",className:"rounded-2xl border border-dashed border-slate-300 bg-slate-50 px-4 py-8 text-center text-sm leading-6 text-slate-500",children:["아직 발송 이력이 없습니다.",e.jsx("br",{"data-loc":"client/src/pages/Alerts.tsx:418"}),"맞춤 조건을 저장하면 다음 오전 9시부터 확인합니다."]})})]})]})]})]})]})}function hs(){const{isAuthenticated:t,loading:s,refresh:r}=ie(),c=f.useUtils(),a=f.alerts.subscriberCount.useQuery(void 0,{retry:!1}),i=!!f.alerts.overview.useQuery(void 0,{enabled:t,retry:!1}).data?.connection,u=async()=>{await r(),await c.alerts.overview.invalidate()};return e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:464",className:"app-shell min-h-screen text-slate-950",children:[e.jsx(nt,{"data-loc":"client/src/pages/Alerts.tsx:465"}),s?e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:467",className:"flex min-h-[70vh] items-center justify-center",children:e.jsx(w,{"data-loc":"client/src/pages/Alerts.tsx:468",className:"size-8 animate-spin text-[#1559d6]"})}):i?e.jsx(xs,{"data-loc":"client/src/pages/Alerts.tsx:471"}):e.jsxs("main",{"data-loc":"client/src/pages/Alerts.tsx:473",children:[e.jsx("section",{"data-loc":"client/src/pages/Alerts.tsx:474",className:"hero-grid relative overflow-hidden border-b border-[#20445d] px-4 py-16 text-white sm:py-20",children:e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:475",className:"relative mx-auto max-w-4xl text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:476",className:"mx-auto mb-6 flex size-16 items-center justify-center border border-white/20 bg-[#df6d4b] shadow-none",children:e.jsx(F,{"data-loc":"client/src/pages/Alerts.tsx:477",className:"size-8"})}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:479",className:"mb-5 flex flex-wrap justify-center gap-2",children:[e.jsx(v,{"data-loc":"client/src/pages/Alerts.tsx:480",className:"rounded-none border-white/15 bg-white/10 px-3 py-1 text-white",children:"텔레그램 전용 · 입찰·낙찰 맞춤 알림"}),e.jsxs(v,{"data-loc":"client/src/pages/Alerts.tsx:481",className:"rounded-none border-emerald-300/25 bg-emerald-400/15 px-3 py-1 text-emerald-100",children:["현재 ",(a.data?.activeSubscribers??0).toLocaleStr
47ing("ko-KR"),"명 신청 중"]})]}),e.jsxs("h1",{"data-loc":"client/src/pages/Alerts.tsx:485",className:"text-balance text-4xl font-black tracking-[-0.04em] sm:text-5xl",children:["원하는 조건의 입찰·낙찰만",e.jsx("br",{"data-loc":"client/src/pages/Alerts.tsx:486"}),"매일 오전 9시 10분에 받으세요"]}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:488",className:"mx-auto mt-6 max-w-2xl text-base leading-7 text-white/80 sm:text-lg sm:leading-8",children:"전일 오전 9시 이후부터 당일 오전 8시 59분까지 게시된 공고를 조건별로 보내드립니다. 키워드나 공고분류 하나만 선택해도 최대 3개의 조건 카드로 저장할 수 있습니다."})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:494",className:"container py-10 sm:py-14",children:[e.jsx(De,{"data-loc":"client/src/pages/Alerts.tsx:495",connected:!1}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:496",className:"mx-auto mt-8 grid max-w-5xl gap-6 lg:grid-cols-[1.2fr_.8fr]",children:[e.jsx(ds,{"data-loc":"client/src/pages/Alerts.tsx:497",onConnected:u}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:498",className:"space-y-6",children:[e.jsx(D,{"data-loc":"client/src/pages/Alerts.tsx:499",className:"rounded-none border-[#d8d2c6] bg-[#fffefa] shadow-none",children:e.jsxs(E,{"data-loc":"client/src/pages/Alerts.tsx:500",className:"p-6 sm:p-7",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:501",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:502",className:"flex size-11 items-center justify-center border border-[#edc5b8] bg-[#fff3ed] text-[#b54f35]",children:e.jsx(ft,{"data-loc":"client/src/pages/Alerts.tsx:503",className:"size-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:505",children:[e.jsx("h2",{"data-loc":"client/src/pages/Alerts.tsx:506",className:"font-black text-slate-950",children:"연결 정보 보호"}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:507",className:"text-sm text-slate-500",children:"텔레그램 채팅 확인에만 사용합니다."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:510",className:"mt-5 grid gap-4 text-sm leading-6 text-slate-600",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:511",className:"flex gap-3",children:[e.jsx($,{"data-loc":"client/src/pages/Alerts.tsx:511",className:"mt-0.5 size-5 shrink-0 text-emerald-600"}),"10분 만료 일회용 코드로 연결합니다."]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:512",className:"flex gap-3",children:[e.jsx($,{"data-loc":"client/src/pages/Alerts.tsx:512",className:"mt-0.5 size-5 shrink-0 text-emerald-600"}),"같은 기기는 1년간 자동으로 유지합니다."]}),e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:513",className:"flex gap-3",children:[e.jsx($,{"data-loc":"client/src/pages/Alerts.tsx:513",className:"mt-0.5 size-5 shrink-0 text-emerald-600"}),"다른 기기는 같은 텔레그램 확인으로 복원합니다."]})]})]})}),e.jsx(D,{"data-loc":"client/src/pages/Alerts.tsx:517",className:"rounded-none border-[#20445d] bg-[#102a43] text-white shadow-none",children:e.jsxs(E,{"data-loc":"client/src/pages/Alerts.tsx:518",className:"p-6 sm:p-7",children:[e.jsxs("div",{"data-loc":"client/src/pages/Alerts.tsx:519",className:"flex items-center gap-2 text-sm font-black text-[#f8c0af]",children:[e.jsx(ot,{"data-loc":"client/src/pages/Alerts.tsx:519",className:"size-4"})," 공무계산기 입찰·낙찰정보"]}),e.jsxs("p",{"data-loc":"client/src/pages/Alerts.tsx:520",className:"mt-3 text-lg font-black leading-7",children:["오전 9시 자료 갱신 후",e.jsx("br",{"data-loc":"client/src/pages/Alerts.tsx:520"}),"오전 9시 10분 맞춤 결과를 보냅니다."]}),e.jsx("p",{"data-loc":"client/src/pages/Alerts.tsx:521",className:"mt-3 text-sm leading-6 text-white/70",children:"전일 09:00 이상~당일 09:00 미만 자료를 조건별로 확인하며, 공무계산기 목록과 상세 URL로 이동합니다."})]})})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Alerts.tsx:526",className:"mt-8 text-center",children:e.jsx(A,{"data-loc":"client/src/pages/Alerts.tsx:527",asChild:!0,variant:"ghost",className:"text-slate-500",children:e.jsxs(it,{"data-loc":"client/src/pages/Alerts.tsx:528",href:"/",children:[e.jsx(pt,{"data-loc":"client/src/pages/Alerts.tsx:528",className:"size-4"})," 입찰·낙찰 목록으로 돌아가기"]})})})]})]})]})}export{hs as default};

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