PageSourceSearch

https://rplay.live/js/Biw1_6KoE2.js

js rplay.live collected 2026-09-24 23:45:02 UTC 102,766 bytes, 3 lines download raw bytes

1import{$ as T,A as Ne,J as l,L as N,Ot as De,S as ne,St as _,Tt as u,W as Re,Z as v,_ as c,bt as h,f as A,g as xt,gt as w,h as t,o as b,ot as g,tt as xe,v as i,vt as te,x as U,yt as V}from"./nsli55b8SS.js";import{N as bt,a as Te,gt as O}from"./5U5qqtKLFM.js";import{t as Ge}from"./CqPkPHku8T.js";import{t as yt}from"./BCVZVYygP0.js";import{t as ft}from"./CFHHUrstqh2.js";import{t as je}from"./BfN9mppESB2.js";import"./C71WaYUVpl.js";import{t as ht}from"./C6lEqFO3zf.js";import{t as _t}from"./ro-uQt9n3o.js";Ne();var be=[],we=p=>{if(!Array.isArray(p)||p.length===0)return be;const e={count:"회",day:"일",days:"일",person:"명",people:"명",item:"개",items:"개",coin:"코인",credit:"크레딧"};return p.map(C=>({value:String(C.value||C.key||C.progressType||"").trim(),label:String(C.label||C.name||C.value||"").trim(),unit:String(C.unit||e[C.unitCode]||C.unitCode||"").trim(),description:String(C.description||C.goalLabel||"").trim(),valueKind:String(C.valueKind||"number").trim(),supportsAggregationStartAt:C.supportsAggregationStartAt===!0,requiresActionEventName:C.requiresActionEventName===!0})).filter(C=>C.value)},Le={ko:"",en:"",jp:"",zh:"","zh-Hant":"",es:""},Ct=p=>{if(!p)return"";const e=new Date(p);return Number.isFinite(e.getTime())?new Date(e.getTime()-e.getTimezoneOffset()*60*1e3).toISOString().slice(0,16):""},kt=p=>({name:p?.name||"",multiLangName:{...Le,...p?.multiLangName||{}},multiLangDescription:{...Le,...p?.multiLangDescription||{}},active:p?.active??!0,isEvent:p?.isEvent===!0,progressType:p?.progressType||"",targetValue:p?.targetValue??1,aggregationStartAt:Ct(p?.aggregationStartAt),actionEventName:p?.actionEventName||""}),Tt={name:"AdminAchievementEditPopup",components:{MultiLangInput:je},props:{data:{type:Object,default:null}},emits:["close-popup"],setup(p,{emit:e}){const C=A(()=>p.data?.achievement||null),a=A(()=>!!C.value?._id),y=v(kt(C.value)),S=v(!1),E=v(!1),m=v(we(p.data?.progressTypes)),I=A(()=>Array.isArray(p.data?.actionTypes)?p.data.actionTypes.filter(x=>x?.value&&x.value!=="achievement"):[]),n=A(()=>m.value.find(x=>x.value===y.value.progressType)),f=A(()=>n.value?n.value.valueKind==="boolean"?`${n.value.label} 완료`:`${n.value.label} ${y.value.targetValue||0}${n.value.unit}`:""),o=A(()=>{const x=[];if(y.value.name.trim()||x.push("내부 이름을 입력해주세요."),y.value.progressType?n.value||x.push("선택한 진행도 종류 정보를 불러오지 못했습니다. 다시 시도해주세요."):x.push("진행도 종류를 선택해주세요."),(!Number.isInteger(y.value.targetValue)||y.value.targetValue<=0)&&x.push("목표값은 1 이상의 정수로 입력해주세요."),n.value?.valueKind==="boolean"&&y.value.targetValue!==1&&x.push("완료 여부 기준의 목표값은 1이어야 합니다."),y.value.aggregationStartAt&&!Number.isFinite(new Date(y.value.aggregationStartAt).getTime())&&x.push("올바른 집계 시작일을 입력해주세요."),n.value?.requiresActionEventName){const P=y.value.actionEventName.trim();P?P.length>120?x.push("행동 코드는 120자 이하로 입력해주세요."):/^[a-z0-9_:-]+$/.test(P)?P==="achievement"&&x.push("achievement는 행동 코드로 사용할 수 없습니다."):x.push("행동 코드는 소문자, 숫자, _, :, - 문자만 사용할 수 있습니다."):x.push("행동 코드를 입력해주세요.")}return x}),M=async()=>{E.value=!0;try{const{data:x}=await O.adminGetAchievementProgressTypes();m.value=we(x?.progressTypes)}catch{m.value.length===0&&(m.value=be)}finally{E.value=!1}},R=async()=>{if(!o.value.length){S.value=!0;try{const x={name:y.value.name.trim(),multiLangName:y.value.multiLangName,multiLangDescription:y.value.multiLangDescription,active:y.value.active,isEvent:y.value.isEvent,progressType:y.value.progressType,targetValue:y.value.targetValue,aggregationStartAt:n.value.supportsAggregationStartAt&&y.value.aggregationStartAt?new Date(y.value.aggregationStartAt).toISOString():null,actionEventName:n.value.requiresActionEventName?y.value.actionEventName.trim():null},P=a.value?await O.adminUpdateAchievement(C.value._id,x):await O.adminCreateAchievement(x);if(!P.data?.success){alert("저장 실패: "+(P.data?.error||"Unknown error"));return}await p.data?.onSaved?.(),e("close-popup")}catch(x){alert("저장 실패: "+(x.response?.data?.error||x.message))}finally{S.value=!1}}};return _(()=>n.value?.valueKind,x=>{x==="boolean"&&(y.value.targetValue=1)}),_(()=>n.value?.supportsAggregationStartAt,x=>{!x&&(!y.value.progressType||n.value)&&(y.value.aggregationStartAt="")},{immediate:!0}),_(()=>y.value.progressType,()=>{n.value&&(n.value.requiresActionEventName||(y.value.actionEventName=""))}),Re(()=>{m.value.length===0&&M()}),{form:y,isEditing:a,isSaving:S,isLoadingProgressTypes:E,progressTypes:m,actionTypes:I,selectedProgressType:n,progressSummary:f,validationErrors:o,save:R}}},wt={class:"w-full"},At={class:"mb-6"},Ut={class:"text-md leading-standard text-content-primary"},Pt={class:"flex flex-col gap-4"},Et={class:"rounded-8px border border-border-strong p-4"},Ot={class:"mb-3 flex flex-col gap-component-sm-tight"},Vt={class:"mb-3"},St={class:"rounded-8px border border-border-strong p-4"},It={class:"grid gap-3 md:grid-cols-[1fr_160px]"},Mt={class:"flex flex-col gap-component-sm-tight"},Dt=["value"],Lt={class:"flex flex-col gap-component-sm-tight"},Ft={class:"flex items-center gap-2"},Nt=["disabled"],Rt={class:"shrink-0 text-xs leading-standard text-content-secondary"},Gt={key:0,class:"rounded-8px mt-3 bg-accent-default/minimal p-3"},jt={class:"text-xs font-weight-medium leading-standard text-accent-default"},Bt={class:"mt-1 text-xs leading-standard text-content-secondary"},Ht={key:1,class:"mt-3 grid gap-3 md:grid-cols-2"},zt={class:"flex flex-col gap-component-sm-tight"},Kt={id:"achievement-action-event-names"},Yt=["value"],Wt={class:"mt-3 flex flex-col gap-component-sm-tight"},qt=["disabled"],Qt={key:0,class:"text-xs leading-standard text-content-secondary"},Zt={key:1,class:"text-xs leading-standard text-content-secondary"},Jt={key:2,class:"text-xs leading-standard text-content-secondary"},Xt={key:2,class:"mt-2 text-xs leading-standard text-content-secondary"},$t={class:"grid gap-4 md:grid-cols-2"},ea={class:"rounded-8px flex items-center gap-2 border border-border-strong p-4"},ta={class:"rounded-8px flex items-center gap-2 border border-border-strong p-4"},aa={key:0,class:"rounded-8px mt-4 border border-status-danger-foreground
1/disabled bg-status-danger-foreground/minimal p-3"},na={class:"list-disc pl-5 text-xs leading-standard text-status-danger-foreground"},ra={class:"mt-6 flex justify-end gap-2"},oa=["disabled"],sa=["disabled"];function la(p,e,C,a,y,S){const E=xe("MultiLangInput");return l(),i("div",wt,[t("div",At,[t("h2",Ut,g(a.isEditing?"업적 쿼리 수정":"새 업적 쿼리 등록"),1),e[9]||(e[9]=t("p",{class:"mt-1 text-xs leading-standard text-content-secondary"}," 진행도 종류와 목표값만 설정하면 조회 방식과 단위는 자동으로 적용됩니다. 표시 이미지는 연결된 쿠폰 이미지를 사용합니다. ",-1))]),t("div",Pt,[t("section",Et,[e[13]||(e[13]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"기본 정보",-1)),t("label",Ot,[e[10]||(e[10]=t("span",{class:"text-xs leading-standard text-content-secondary"}," 내부 이름 * ",-1)),u(t("input",{class:"rounded-8px outline-none border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary placeholder:text-content-secondary focus:border-accent-default",type:"text","onUpdate:modelValue":e[0]||(e[0]=m=>a.form.name=m),placeholder:"관리용 이름 (예: 첫 채팅 10회)"},null,512),[[h,a.form.name]])]),t("div",Vt,[e[11]||(e[11]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"}," 다국어 이름 ",-1)),ne(E,{langs:a.form.multiLangName,placeholder:{ko:"채팅 입문자",en:"Chat Starter",jp:"チャット入門者",zh:"聊天新手","zh-Hant":"聊天新手"}},null,8,["langs"])]),t("div",null,[e[12]||(e[12]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"}," 다국어 설명 ",-1)),ne(E,{type:"textarea",langs:a.form.multiLangDescription,rows:2,placeholder:{ko:"AI 채팅을 10회 이용해보세요.",en:"Send 10 AI chat messages.",jp:"AIチャットを10回利用してください。",zh:"完成10次AI聊天。","zh-Hant":"完成10次AI聊天。"}},null,8,["langs"])])]),t("section",St,[e[20]||(e[20]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"진행도 설정",-1)),t("div",It,[t("label",Mt,[e[15]||(e[15]=t("span",{class:"text-xs leading-standard text-content-secondary"}," 진행도 종류 * ",-1)),u(t("select",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":e[1]||(e[1]=m=>a.form.progressType=m)},[e[14]||(e[14]=t("option",{value:""},"종류를 선택하세요",-1)),(l(!0),i(b,null,T(a.progressTypes,m=>(l(),i("option",{key:m.value,value:m.value},g(m.label),9,Dt))),128))],512),[[V,a.form.progressType]])]),t("label",Lt,[e[16]||(e[16]=t("span",{class:"text-xs leading-standard text-content-secondary"}," 목표값 * ",-1)),t("div",Ft,[u(t("input",{class:"rounded-8px min-w-0 flex-1 border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":e[2]||(e[2]=m=>a.form.targetValue=m),min:"1",step:"1",disabled:a.selectedProgressType?.valueKind==="boolean"},null,8,Nt),[[h,a.form.targetValue,void 0,{number:!0}]]),t("span",Rt,g(a.selectedProgressType?.unit||""),1)])])]),a.selectedProgressType?(l(),i("div",Gt,[t("div",jt,g(a.progressSummary),1),t("p",Bt,g(a.selectedProgressType.description),1)])):c("",!0),a.selectedProgressType?.requiresActionEventName?(l(),i("div",Ht,[t("label",zt,[e[17]||(e[17]=t("span",{class:"text-xs leading-standard text-content-secondary"}," 행동 코드 * ",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":e[3]||(e[3]=m=>a.form.actionEventName=m),maxlength:"120",list:"achievement-action-event-names",placeholder:"예: send_chat_message"},null,512),[[h,a.form.actionEventName]]),t("datalist",Kt,[(l(!0),i(b,null,T(a.actionTypes,m=>(l(),i("option",{key:m.value,value:m.value},g(m.label),9,Yt))),128))]),e[18]||(e[18]=t("span",{class:"text-xs leading-standard text-content-secondary"}," 소문자, 숫자, _, :, - 문자만 사용할 수 있습니다. ",-1))])])):c("",!0),t("label",Wt,[e[19]||(e[19]=t("span",{class:"text-xs leading-standard text-content-secondary"}," 집계 시작일 (선택) ",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary disabled:cursor-not-allowed disabled:opacity-disabled",type:"datetime-local","onUpdate:modelValue":e[4]||(e[4]=m=>a.form.aggregationStartAt=m),disabled:!a.selectedProgressType?.supp
1ortsAggregationStartAt},null,8,qt),[[h,a.form.aggregationStartAt]]),a.selectedProgressType?.supportsAggregationStartAt?(l(),i("span",Qt," 입력하면 해당 시각 이후 데이터만 집계하고, 비워두면 전체 기간을 누적으로 집계합니다. ")):a.selectedProgressType?(l(),i("span",Zt," 이 진행도 종류는 집계 시작일을 지원하지 않습니다. ")):(l(),i("span",Jt," 진행도 종류를 선택하면 지원 여부를 확인할 수 있습니다. "))]),a.isLoadingProgressTypes?(l(),i("p",Xt," 진행도 종류를 불러오는 중입니다. ")):c("",!0)]),t("div",$t,[t("label",ea,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[5]||(e[5]=m=>a.form.isEvent=m)},null,512),[[w,a.form.isEvent]]),e[21]||(e[21]=t("div",null,[t("div",{class:"text-xs font-weight-medium leading-standard text-content-primary"}," 이벤트 업적 "),t("div",{class:"text-xs leading-standard text-content-secondary"}," 이벤트 업적으로 표시하며, 수령 전에는 상단에 노출합니다. ")],-1))]),t("label",ta,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[6]||(e[6]=m=>a.form.active=m)},null,512),[[w,a.form.active]]),e[22]||(e[22]=t("div",null,[t("div",{class:"text-xs font-weight-medium leading-standard text-content-primary"}," 활성화 "),t("div",{class:"text-xs leading-standard text-content-secondary"}," 활성 쿼리만 사용자 업적 탭과 쿠폰 보상 연결에 사용됩니다. ")],-1))])])]),a.validationErrors.length?(l(),i("div",aa,[t("ul",na,[(l(!0),i(b,null,T(a.validationErrors,m=>(l(),i("li",{key:m},g(m),1))),128))])])):c("",!0),t("div",ra,[t("button",{class:"rounded-8px border border-border-strong px-4 py-2 text-content-primary hover:bg-surface-interactive",disabled:a.isSaving,onClick:e[7]||(e[7]=m=>p.$emit("close-popup"))}," 취소 ",8,oa),t("button",{class:"rounded-8px bg-accent-default px-4 py-2 text-accent-content hover:opacity-strong disabled:opacity-disabled",disabled:a.isSaving||a.validationErrors.length>0,onClick:e[8]||(e[8]=(...m)=>a.save&&a.save(...m))},g(a.isSaving?"저장 중...":a.isEditing?"수정":"등록"),9,sa)])])}var ia=Ge(Tt,[["render",la]]);Ne();var da=[{id:"all",label:"전체"},{id:"signup",label:"가입/프로필"},{id:"login",label:"로그인/출석"},{id:"payment",label:"결제/충전"},{id:"content",label:"콘텐츠"},{id:"social",label:"소셜"},{id:"creator",label:"크리에이터"},{id:"livestream",label:"라이브"},{id:"aichat",label:"AI채팅"},{id:"videocall",label:"영상통화"},{id:"game",label:"게임/가챠"},{id:"event",label:"이벤트"},{id:"achievement",label:"업적"},{id:"utility",label:"범용"}],ae=[{value:"complete_signup",label:"회원가입 완료",category:"signup"},{value:"complete_creator_registration",label:"크리에이터 등록",category:"signup"},{value:"upload_avatar",label:"프로필 이미지 업로드",category:"signup"},{value:"first_avatar",label:"첫 프로필 이미지",category:"signup"},{value:"update_bio",label:"자기소개 수정",category:"signup"},{value:"set_custom_url",label:"커스텀 URL 설정",category:"signup"},{value:"verify_phone",label:"휴대폰 인증",category:"signup"},{value:"enable_2fa",label:"2단계 인증 활성화",category:"signup"},{value:"get_user",label:"페이지 방문 (getUser)",category:"login"},{value:"daily_login",label:"일일 로그인",category:"login"},{value:"birthday_login",label:"생일 로그인",category:"login"},{value:"seasonal_login",label:"시즌 이벤트 로그인",category:"login"},{value:"enable_push_notifications",label:"푸시 알림 활성화",category:"login"},{value:"rplay_app_install",label:"알플레이 앱 설치",category:"login"},{value:"story_engine_app_install",label:"스토리엔진 앱 설치",category:"login"},{value:"romantic_play_app_install",label:"로맨틱플레이 앱 설치",category:"login"},{value:"login_streak_milestone",label:"연속 로그인 마일스톤",category:"login",isMilestone:!0,milestoneDescription:"연속 로그인 일수",milestoneUnit:"일",milestoneEx
1ample:"7, 30, 100, 365"},{value:"return_after_inactive",label:"휴면 복귀",category:"login",isMilestone:!0,milestoneDescription:"휴면 후 복귀 일수",milestoneUnit:"일",milestoneExample:"7, 30, 90"},{value:"complete_coin_charge",label:"코인 충전 완료",category:"payment"},{value:"complete_credit_charge",label:"크레딧 충전 완료",category:"payment"},{value:"complete_paid_subscription_web",label:"구독 결제 완료",category:"payment"},{value:"first_game_purchase",label:"첫 게임 구매",category:"payment"},{value:"refer_friend",label:"친구 추천",category:"payment"},{value:"no_coin_payments_yet",label:"코인 미결제 유저",category:"payment"},{value:"no_credit_payments_yet",label:"크레딧 미결제 유저",category:"payment"},{value:"watch_video_complete",label:"영상 시청 완료",category:"content"},{value:"first_video_watched",label:"첫 영상 시청",category:"content"},{value:"listen_audio_complete",label:"오디오 청취 완료",category:"content"},{value:"first_audio_listened",label:"첫 오디오 청취",category:"content"},{value:"download_content",label:"콘텐츠 다운로드",category:"content"},{value:"create_playlist",label:"플레이리스트 생성",category:"content"},{value:"add_to_playlist",label:"플레이리스트에 추가",category:"content"},{value:"watch_video_progress",label:"영상 재생 진행률",category:"content",isMilestone:!0,milestoneDescription:"영상 재생 진행률",milestoneUnit:"%",milestoneExample:"25, 50, 75, 95"},{value:"listen_audio_progress",label:"오디오 재생 진행률",category:"content",isMilestone:!0,milestoneDescription:"오디오 재생 진행률",milestoneUnit:"%",milestoneExample:"25, 50, 75, 95"},{value:"follow_creator",label:"크리에이터 팔로우",category:"social"},{value:"first_follow",label:"첫 팔로우",category:"social"},{value:"receive_follow",label:"팔로워 획득",category:"social"},{value:"like_content",label:"콘텐츠 좋아요",category:"social"},{value:"first_like",label:"첫 좋아요",category:"social"},{value:"receive_like",label:"좋아요 획득",category:"social"},{value:"post_comment",label:"댓글 작성",category:"social"},{value:"first_comment",label:"첫 댓글",category:"social"},{value:"receive_comment",label:"댓글 획득",category:"social"},{value:"follower_milestone",label:"팔로워 마일스톤",category:"social",isMilestone:!0,milestoneDescription:"총 팔로워 수",milestoneUnit:"명",milestoneExample:"100, 1000, 10000"},{value:"publish_content",label:"콘텐츠 발행",category:"creator"},{value:"first_publish",label:"첫 콘텐츠 발행",category:"creator"},{value:"subscriber_milestone",label:"구독자 마일스톤",category:"creator",isMilestone:!0,milestoneDescription:"유료 구독자 수",milestoneUnit:"명",milestoneExample:"1, 10, 100, 1000"},{value:"sale_milestone",label:"판매 마일스톤",category:"creator",isMilestone:!0,milestoneDescription:"총 판매 건수",milestoneUnit:"건",milestoneExample:"1, 10, 100, 1000"},{value:"revenue_milestone",label:"수익 마일스톤",category:"creator",isMilestone:!0,milestoneDescription:"총 수익",milestoneUnit:"원",milestoneExample:"10000, 100000, 1000000"},{value:"start_livestream",label:"라이브 시작",category:"livestream"},{value:"first_livestream",label:"첫 라이브",category:"livestream"},{value:"end_livestream",label:"라이브 종료",category:"livestream"},{value:"send_donation",label:"후원 보내기",category:"livestream"},{value:"receive_donation",label:"후원 받기",category:"livestream"},{value:"first_donation_sent",label:"첫 후원 보내기",category:"livestream"},{value:"first_donation_received",label:"첫 후원 받기",category:"livestream"},{value:"watch_livestream_duration",label:"라이브 시청 시간",category:"livestream",isMilestone:!0,milestoneDescription:"라이브 시청 시간",milestoneUnit:"분",milestoneExample:"30, 60, 120"},{value:"viewer_milestone",label:"동시 시청자 마일스톤",category:"livestream",isMilestone:!0,milestoneDescription:"동시 시청자 수",milestoneUnit:"명",milestoneEx
1ample:"100, 1000, 10000"},{value:"create_custom_persona",label:"커스텀 페르소나 생성",category:"aichat"},{value:"first_custom_persona",label:"첫 페르소나 생성",category:"aichat"},{value:"complete_story_ending",label:"스토리 엔딩 도달",category:"aichat"},{value:"achievement_unlocked",label:"스토리챗 업적 해제 (기존)",category:"aichat"},{value:"complete_coin_spend_chat",label:"채팅 코인 사용",category:"aichat"},{value:"out_of_credits",label:"크레딧 부족 (채팅 시도)",category:"aichat"},{value:"chatroom_milestone",label:"채팅방 생성 마일스톤",category:"aichat",isMilestone:!0,milestoneDescription:"생성한 채팅방 수",milestoneUnit:"개",milestoneExample:"1, 10, 50"},{value:"message_milestone",label:"메시지 마일스톤",category:"aichat",isMilestone:!0,milestoneDescription:"총 메시지 발송 수",milestoneUnit:"개",milestoneExample:"100, 1000, 10000"},{value:"change_default_aichat_model",label:"AI 챗 모델 기본 설정 변경",category:"aichat",isMilestone:!0,milestoneDescription:"변경 대상 AI 모델 타입",milestoneUnit:"",milestoneExample:"claude-4.5-sonnet, gemini-2.5-flash"},{value:"start_video_call",label:"영상통화 시작",category:"videocall"},{value:"first_video_call",label:"첫 영상통화",category:"videocall"},{value:"join_video_call",label:"영상통화 참여",category:"videocall"},{value:"complete_paid_call",label:"유료 통화 완료",category:"videocall"},{value:"first_paid_call",label:"첫 유료 통화",category:"videocall"},{value:"call_duration_milestone",label:"통화 시간 마일스톤",category:"videocall",isMilestone:!0,milestoneDescription:"통화 시간",milestoneUnit:"분",milestoneExample:"30, 60"},{value:"play_gacha",label:"가챠 플레이",category:"game"},{value:"first_gacha",label:"첫 가챠",category:"game"},{value:"gacha_win_rare",label:"레어 당첨",category:"game"},{value:"gacha_win_legendary",label:"레전더리 당첨",category:"game"},{value:"spend_ingame_currency",label:"게임 내 화폐 사용",category:"game"},{value:"save_game_progress",label:"게임 저장",category:"game"},{value:"complete_game",label:"게임 완료",category:"game"},{value:"participate_event",label:"이벤트 참여",category:"game"},{value:"ingame_spend_milestone",label:"게임 내 지출 마일스톤",category:"game",isMilestone:!0,milestoneDescription:"게임 내 누적 지출액",milestoneUnit:"코인",milestoneExample:"100, 500, 1000, 5000"},{value:"board_event_reward",label:"보드 이벤트 보상",category:"event"},{value:"achievement",label:"업적 달성",category:"achievement"},{value:"click_button",label:"버튼 클릭 (범용)",category:"utility",isMilestone:!0,milestoneDescription:"버튼 코드 (숫자 또는 문자열)",milestoneUnit:"",milestoneExample:"signup_banner, promo_header, 1001"},{value:"funnel_step_reached",label:"퍼널 단계 도달",category:"utility",isMilestone:!0,milestoneDescription:"퍼널 스텝 코드 (문자열)",milestoneUnit:"",milestoneExample:"landing, signup_complete, payment_success"}].map(p=>({...p,label:_t[p.value]||p.label})),ca=["rplay","romplay","storyengine","melo"],ua=["ko","en","jp","zh","zh-Hant","es"],Be="rplay",ve=[{value:Be,label:"RPlay 앱"},{value:"story-engine",label:"StoryEngine 앱"},{value:"romantic-play",label:"RomanticPlay 앱"}],ga=[{value:"coins",label:"코인",icon:"🪙"},{value:"credits",label:"크레딧",icon:"💎"},{value:"subscription_days",label:"구독권",icon:"⭐"},{value:"discount_percent",label:"할인",icon:"🏷️"},{value:"inventory_item",label:"아이템",icon:"🎁"},{value:"badge",label:"뱃지",icon:"🏅"},{value:"coin-discount",label:"코인 상품 할인 (패시브)",icon:"🪙🏷️"},{value:"credit-discount",label:"크레딧 상품 할인 (패시브)",icon:"💎🏷️"},{value:"model-discount",label:"AI 모델 비용 할인 (패시브)",icon:"🤖🏷️"},{value:"story-chat-bonus-limit-exempt",label:"스토리챗 보너스 일일 한도 해제 (패시브)",icon:"🎟️"}],ma=[{value:"type_bonus",label:"보너스 코인"},{value:"type_krw",label:"KRW 코인"},{value:"type_jpy",label:"JPY 코인"},{value:"type_usd",label:"USD 코인"},{value:"type_iap",label:"IAP 코인"}],va=[{value:"type_bonus",label:"보너스 크레딧"},{value:"type_krw",label:"KRW 크레딧"},{value:"type_jpy",label:"JPY 크레딧"},{value:"type_usd",label:"USD 크레딧"}
1],Fe=Object.entries(ht).filter(([p])=>p!=="deepseek-character-only").map(([p,e])=>({type:p,name:e.name})),pe=()=>({name:"",imageUrl:"",multiLangName:{ko:"",en:"",jp:"",zh:"","zh-Hant":"",es:""},multiLangDescription:{ko:"",en:"",jp:"",zh:"","zh-Hant":"",es:""},active:!0,isPassive:!1,invisible:!1,adminOnly:!1,revokeOnly:!1,triggerConditions:{action:null,minAmount:null,maxAmount:null,platforms:[],langs:[],clientAppType:null,validFrom:null,validUntil:null,userRegisteredAfter:null,hasCreditPayment:null,hasCoinPayment:null,userHasTags:[],contentOids:[],creatorOids:[],customConditionCode:null,milestoneThresholds:[],achievementOids:[],blockIfUserHasTemplates:[],refererCodes:[],refererCodesMatchMode:"exact"},effects:[],maxUsesPerUser:1,globalMaxUses:null,couponValidityDays:30,couponExpiryDate:null,revokeTemplateOids:[],exclusionGroup:null}),pa={name:"AdminCouponTemplateEditPopup",components:{AdminAchievementEditPopup:ia,BadgeDisplay:ft,MultiLangInput:je},props:{data:{type:Object,default:null}},emits:["close-popup"],setup(p,{emit:e}){const C=yt.methods._tr,a=A(()=>p.data?.template||null),y=[{id:"basic",label:"기본 정보"},{id:"triggers",label:"트리거 조건"},{id:"effects",label:"보상 효과"},{id:"limits",label:"제한 설정"},{id:"achievementQueries",label:"업적 쿼리"}],S=v("basic"),E=v(!1),m=v("all"),I=v(null),n=v(!1),f=v(""),o=v(pe()),M=v(!1),R=v(!1),x=v(!1),P=v(!1),K=v(!1),Y=v(!1),W=v(!1),G=v(!1),q=v(!1),Q=v(!1),j=v(!1),B=v(!0),Z=v(!1),L=v(!1),re=v("days"),He=A({get(){const r=o.value.couponExpiryDate;if(!r)return"";const s=new Date(r),d=k=>String(k).padStart(2,"0");return`${s.getFullYear()}-${d(s.getMonth()+1)}-${d(s.getDate())}T${d(s.getHours())}:${d(s.getMinutes())}`},set(r){o.value.couponExpiryDate=r?new Date(r).toISOString():null}}),oe=v(""),se=v(""),le=v("");v("");const ie=v(""),J=v([]),de=v([]),H=v(be),z=v(!1),ce=v(!1),ye=v(0),X=v(null);let ue=0;const fe=v([]);v(Fe);const Ae=A(()=>!!a.value?._id),ze=A(()=>m.value==="all"?ae:ae.filter(r=>r.category===m.value)),he=A(()=>o.value.triggerConditions.action?ae.find(r=>r.value===o.value.triggerConditions.action):null),D=A({get:()=>o.value.triggerConditions.achievementOids[0]||"",set:r=>{o.value.triggerConditions.achievementOids=r?[r]:[]}}),F=A(()=>de.value.find(r=>r._id===D.value)),ge=A(()=>H.value.find(r=>r.value===F.value?.progressType)),Ue=r=>H.value.find(s=>s.value===r),Pe=r=>{const s=Ue(r.progressType);return s?.valueKind==="boolean"?`${s.label} 완료`:r.progressType==="action_event_count"?`${r.actionEventName||"행동 미지정"} ${r.targetValue}${s?.unit||"회"}`:`${s?.label||r.progressType} ${r.targetValue}${s?.unit||""}`},_e=r=>{const s=r.rewardCoupon;return o.value.active!==!1&&(r.rewardConfigurationError!=null||!!s?._id&&s._id!==a.value?._id)},Ke=r=>{const s=Ue(r.progressType),d=r.multiLangName?.ko||r.name,k=r.active===!1?" (비활성 — 현재 연결)":"",$=r.rewardConfigurationError?" (활성 쿠폰 중복 연결 오류)":_e(r)?` (이미 ${r.rewardCoupon.name||"다른 쿠폰"} 연결)`:"";return s?.valueKind==="boolean"?`${d} — ${s.label} 완료${k}${$}`:`${d} — ${Pe(r)}${k}${$}`},me=async()=>{const r=++ue;z.value=!0;try{const[d,k]=await Promise.all([O.adminSearchAchievements({status:"all",limit:500,offset:0}),O.adminGetAchievementProgressTypes()]),$=Array.isArray(d.data?.achievements)?d.data.achievements:[],ee=[...$],pt=Number(d.data?.total)||ee.length;for(;ee.length<pt&&$.length===500;){const{data:Ie}=await O.adminSearchAchievements({status:"all",limit:500,offset:ee.length}),Me=Array.isArray(Ie?.achievements)?Ie.achievements:[];if(Me.length===0)break;ee.push(...Me)}if(r!==ue)return;de.value=ee,H.value=we(k.data?.progressTypes)}catch{if(r!==ue)return;H.value.length===0&&(H.value=be)}finally{r===ue&&(z.value=!1)}},Ee=()=>{ce.value=!1,X.value=null},Ye=()=>{X.value=null,ye.value+=1,ce.value=!0},We=async r=>{try{const{data:s}=await O.adminGetAchievement(r._id);if(!s?.success||!s.achievement)throw new Error(s?.error||"업적 쿼리를 찾을 수 없습니다.");X.value=s.achievement,ye.value+=1,ce.value=!0}catch(s){alert("업적 쿼리 조회 실패: "+(s.response?.data?.error||s.message))}},qe=async()=>{await me()},Qe=async r=>{const s=r.rewardCoupon?`
2
3연결된 쿠폰: ${r.rewardCoupon.name}`:"";if(confirm(`업적 쿼리 "${r.name}"을(를) 삭제하시겠습니까?${s}`))try{const{data:d}=await O.adminDeleteAchievement(r._id);if(!d?.success)throw new Error(d?.error||"Unknown error");D.value===r._id&&(D.value=""),X.value?._id===r._id&&Ee(),await me()}catch(d){alert("업적 쿼리 삭제 실패: "+(d.response?.data?.error||d.message))}},Ze=async()=>{try{const r=await O.adminGetCouponTemplates();r.data?.templates&&(J.value=r.data.templates)}catch{}},Je=async()=>{try{fe.value=(await O.adminGetBadges(!0)).data?.badges||[]}catch{}},Xe=A(()=>fe.value.filter(r=>r.enabled!==!1)),Ce=r=>{const s=String(r||"").trim().toLowerCase();return s&&fe.value.find(d=>d.key===s)||null},$e=A(()=>{const r=a.value?._id;return J.value.filter(s=>s._id!==r)}),et=r=>{const s=o.value.revokeTemplateOids,d=s.indexOf(r);d>=0?s.splice(d,1):s.push(r)},tt=r=>{const s=J.value.find(d=>d._id===r);return s?s.name:r},at=A(()=>{const r=a.value?._id;return J.value.filter(s=>s._id!==r)}),nt=r=>{const s=o.value.triggerConditions.blockIfUserHasTemplates,d=s.indexOf(r);d>=0?s.splice(d,1):s.push(r)};Re(()=>{if(Ze(),Je(),a.value){const r=a.value;o.value={name:r.name||"",imageUrl:r.imageUrl||"",multiLangName:{...pe().multiLangName,...r.multiLangName},multiLangDescription:{...pe().multiLangDescription,...r.multiLangDescription},active:r.active??!0,isPassive:r.isPassive??!1,invisible:r.invisible??!1,adminOnly:r.adminOnly??!1,revokeOnly:r.revokeOnly??!1,triggerConditions:{...pe().triggerConditions,...r.triggerConditions,action:Array.isArray(r.triggerConditions?.actions)?r.triggerConditions.actions[0]||null:r.triggerConditions?.action||null,platforms:[...r.triggerConditions?.platforms||[]],langs:[...r.triggerConditions?.langs||[]],clientAppType:r.triggerConditions?.clientAppType||null,hasCreditPayment:typeof r.triggerConditions?.hasCreditPayment=="boolean"?r.triggerConditions.hasCreditPayment:null,hasCoinPayment:typeof r.triggerConditions?.hasCoinPayment=="boolean"?r.triggerConditions.hasCoinPayment:null,contentOids:[...r.triggerConditions?.contentOids||[]],creatorOids:[...r.triggerConditions?.creatorOids||[]],userHasTags:[...r.triggerConditions?.userHasTags||[]],milestoneThresholds:[...r.triggerConditions?.milestoneThresholds||[]],achievementOids:[...r.triggerConditions?.achievementOids||[]].slice(0,1),blockIfUserHasTemplates:[...r.triggerConditions?.blockIfUserHasTemplates||[]],refererCodes:[...r.triggerConditions?.refererCodes||[]]},effects:(r.effects||[]).map(d=>({...d})),maxUsesPerUser:r.maxUsesPerUser!=null?r.maxUsesPerUser:null,globalMaxUses:r.globalMaxUses??null,couponValidityDays:r.couponValidityDays??30,couponExpiryDate:r.couponExpiryDate||null,revokeTemplateOids:[...r.revokeTemplateOids||[]],exclusionGroup:r.exclusionGroup||null};const s=o.value.triggerConditions;M.value=s.minAmount!=null||s.maxAmount!=null,R.value=s.platforms.length>0,x.value=ve.some(({value:d})=>
3d===s.clientAppType),P.value=s.validFrom!=null||s.validUntil!=null,K.value=s.userRegisteredAfter!=null,Y.value=typeof s.hasCreditPayment=="boolean",W.value=typeof s.hasCoinPayment=="boolean",G.value=s.contentOids.length>0||s.creatorOids.length>0,q.value=s.customConditionCode!=null&&s.customConditionCode!=="",Q.value=s.blockIfUserHasTemplates.length>0,j.value=(s.refererCodes||[]).length>0,B.value=o.value.maxUsesPerUser!=null,Z.value=o.value.globalMaxUses!=null,re.value=o.value.couponExpiryDate?"date":"days",L.value=o.value.revokeTemplateOids.length>0||o.value.exclusionGroup!=null,s.validFrom&&(o.value.triggerConditions.validFrom=ke(s.validFrom)),s.validUntil&&(o.value.triggerConditions.validUntil=ke(s.validUntil)),s.userRegisteredAfter&&(o.value.triggerConditions.userRegisteredAfter=ke(s.userRegisteredAfter)),oe.value=s.contentOids.join(", "),se.value=s.creatorOids.join(", "),le.value=(s.milestoneThresholds||[]).join(", "),ie.value=(s.refererCodes||[]).join(", "),o.value.triggerConditions.refererCodesMatchMode=s.refererCodesMatchMode||"exact",o.value.imageUrl&&(f.value=o.value.imageUrl)}});const ke=r=>r?new Date(r).toISOString().slice(0,16):"";_(S,r=>{r==="achievementQueries"&&!z.value&&me()}),_(()=>o.value.triggerConditions.action,r=>{if(r||(x.value=!1),r!=="achievement"){o.value.triggerConditions.achievementOids=[];return}B.value=!0,Z.value=!1,M.value=!1,K.value=!1,Y.value=!1,W.value=!1,G.value=!1,q.value=!1,Q.value=!1,j.value=!1,L.value=!1,o.value.maxUsesPerUser=1,o.value.globalMaxUses=null,o.value.revokeTemplateOids=[],o.value.exclusionGroup=null,o.value.isPassive=!1,o.value.invisible=!1,o.value.revokeOnly=!1,o.value.triggerConditions.userHasTags=[],de.value.length===0&&!z.value&&me()}),_(ge,r=>{o.value.triggerConditions.action==="achievement"&&F.value&&r&&!r.supportsAggregationStartAt&&(P.value=!1)}),_(M,r=>{r||(o.value.triggerConditions.minAmount=null,o.value.triggerConditions.maxAmount=null)}),_(R,r=>{r||(o.value.triggerConditions.platforms=[])}),_(x,r=>{if(!r){o.value.triggerConditions.clientAppType=null;return}ve.some(({value:s})=>s===o.value.triggerConditions.clientAppType)||(o.value.triggerConditions.clientAppType=Be)}),_(P,r=>{r||(o.value.triggerConditions.validFrom=null,o.value.triggerConditions.validUntil=null)}),_(K,r=>{r||(o.value.triggerConditions.userRegisteredAfter=null)}),_(Y,r=>{r?typeof o.value.triggerConditions.hasCreditPayment!="boolean"&&(o.value.triggerConditions.hasCreditPayment=!1):o.value.triggerConditions.hasCreditPayment=null}),_(W,r=>{r?typeof o.value.triggerConditions.hasCoinPayment!="boolean"&&(o.value.triggerConditions.hasCoinPayment=!1):o.value.triggerConditions.hasCoinPayment=null}),_(G,r=>{r||(o.value.triggerConditions.contentOids=[],o.value.triggerConditions.creatorOids=[],oe.value="",se.value="")}),_(q,r=>{r||(o.value.triggerConditions.customConditionCode=null)}),_(Q,r=>{r||(o.value.triggerConditions.blockIfUserHasTemplates=[])}),_(j,r=>{r||(o.value.triggerConditions.refererCodes=[],ie.value="")}),_(B,r=>{if(o.value.triggerConditions.action==="achievement"&&!r){B.value=!0,o.value.maxUsesPerUser=1;return}r?o.value.maxUsesPerUser=o.value.maxUsesPerUser||1:o.value.maxUsesPerUser=null}),_(Z,r=>{r||(o.value.globalMaxUses=null)}),_(L,r=>{r||(o.value.revokeTemplateOids=[],o.value.exclusionGroup=null)}),_(()=>o.value.revokeOnly,r=>{r&&(L.value=!0,o.value.effects=[])}),_(oe,r=>{o.value.triggerConditions.contentOids=r.split(",").map(s=>s.trim()).filter(s=>s.length>0)}),_(se,r=>{o.value.triggerConditions.creatorOids=r.split(",").map(s=>s.trim()).filter(s=>s.length>0)}),_(le,r=>{const s=o.value.triggerConditions.action;s==="click_button"||s==="change_default_aichat_model"||s==="funnel_step_reached"?o.value.triggerConditions.milestoneThresholds=r.split(",").map(d=>d.trim()).filter(d=>d.length>0):o.value.triggerConditions.milestoneThresholds=r.split(",").map(d=>parseInt(d.trim(),10)).filter(d=>!isNaN(d)&&d>0)}),_(ie,r=>{o.value.triggerConditions.refererCodes=r.split(",").map(s=>s.trim()).filter(s=>s.length>0)}),_(()=>o.value.triggerConditions.action,r=>{ae.find(s=>s.value===r)?.isMilestone||(o.value.triggerConditions.milestoneThresholds=[],le.value="")}
3);const rt=r=>{const s=o.value.triggerConditions.platforms,d=s.indexOf(r);d>=0?s.splice(d,1):s.push(r)},ot=()=>{o.value.effects.push({effectType:"",coinType:"type_bonus",creditType:"type_bonus",amount:null,itemTemplate:null,badgeKey:"",productNamePattern:"",discountPercent:null,targetModel:""})},st=r=>{o.value.effects.splice(r,1)},lt=r=>{r.effectType==="coins"?r.coinType=r.coinType||"type_bonus":r.effectType==="credits"?r.creditType=r.creditType||"type_bonus":r.effectType==="model-discount"?(r.targetModel=r.targetModel||"",r.discountPercent=r.discountPercent||null):r.effectType==="badge"?r.badgeKey=r.badgeKey||"":r.effectType==="story-chat-bonus-limit-exempt"&&(o.value.isPassive=!0)},it=r=>{if(!r.effectType)return"(선택 안됨)";switch(r.effectType){case"coins":return`+${r.amount||0} 코인`;case"credits":return`+${r.amount||0} 크레딧`;case"subscription_days":return`+${r.amount||0}일 구독`;case"discount_percent":return`${r.amount||0}% 할인`;case"inventory_item":return"아이템 지급";case"badge":{const s=Ce(r.badgeKey);return s?`뱃지 지급: ${s.name}`:`뱃지 지급: ${r.badgeKey||"(선택 안됨)"}`}case"coin-discount":return`코인 ${r.discountPercent||0}% 할인 (${r.productNamePattern||"*"})`;case"credit-discount":return`크레딧 ${r.discountPercent||0}% 할인 (${r.productNamePattern||"*"})`;case"model-discount":return`${Fe.find(s=>s.type===r.targetModel)?.name||r.targetModel||"모든 모델"} ${r.discountPercent||0}% 할인`;case"story-chat-bonus-limit-exempt":return"스토리챗 보너스 일일 한도 해제";default:return r.effectType}},dt=r=>{r.target.style.display="none"},ct=["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"],ut=()=>{I.value?.click()},Oe=async r=>{if(!r||!ct.includes(r.type)){alert("지원하지 않는 파일 형식입니다. PNG, JPG, GIF, WebP, SVG 파일만 업로드할 수 있습니다.");return}let s;try{s=URL.createObjectURL(r),f.value=s}catch{}n.value=!0;try{const d=`coupon-images/${`${Date.now()}_${r.name.replace(/[^a-zA-Z0-9._-]/g,"_")}`}`,k=(await Te.getUploadUrl({key:d,filetype:r.type,access:"public"})).data;await Te.upload(k,r,r.type),o.value.imageUrl=Te.publicObjectUrl(d),f.value=o.value.imageUrl}catch(d){alert("이미지 업로드에 실패했습니다: "+d.message),f.value=""}finally{if(n.value=!1,s)try{URL.revokeObjectURL(s)}catch{}}},gt=r=>{const s=r.target.files?.[0];s&&Oe(s),I.value&&(I.value.value="")},mt=r=>{const s=r.dataTransfer?.files?.[0];s&&Oe(s)},vt=()=>{o.value.imageUrl="",f.value=""};_(()=>o.value.imageUrl,r=>{n.value||(f.value=r||"")});const Ve=A(()=>{const r=[];o.value.name.trim()||r.push("내부 이름을 입력해주세요"),o.value.triggerConditions.action||r.push("트리거 액션을 선택해주세요"),x.value&&!ve.some(({value:s})=>s===o.value.triggerConditions.clientAppType)&&r.push("유효한 클라이언트 앱을 선택해주세요"),o.value.triggerConditions.action==="achievement"&&!D.value&&r.push("연결할 업적을 선택해주세요"),o.value.triggerConditions.action==="achievement"&&D.value&&!z.value&&!F.value&&r.push("연결된 업적 쿼리를 찾을 수 없습니다"),o.value.triggerConditions.action==="achievement"&&F.value?.active===!1&&r.push("활성 업적을 선택해주세요"),o.value.triggerConditions.action==="achievement"&&F.value&&_e(F.value)&&r.push("이미 다른 쿠폰에 연결된 업적입니다"),o.value.triggerConditions.action==="achievement"&&(o.value.isPassive||o.value.invisible||o.value.revokeOnly)&&r.push("업적 보상은 인벤토리에서 직접 사용하는 공개 쿠폰이어야 합니다"),o.value.triggerConditions.action==="achievement"&&P.value&&ge.value&&!ge.value.supportsAggregationStartAt&&r.push("선택한 업적 진행도는 유효 기간 조건을 지원하지 않습니다"),he.value?.isMilestone&&o.value.triggerConditions.milestoneThresholds.length===0&&r.push("마일스톤 임계값을 입력해주세요");for(let s=0;s<o.value.effects.length;s++){const d=o.value.effects[s];if(d.effectType||r.push(`효과 #${s+1}: 효과 유형을 선택해주세요`),["coins","credits","subscription_days","discount_percent"].includes(d.effectType)&&(!d.amount||d.amount<=0)&&r.push(`효과 #${s+1}: 수량을 입력해주세요`),["coin-discount","credit-discount"].includes(d.effectType)&&(d.productNamePattern?.trim()||r.push(`효과 #${s+1}: 상품명 패턴을 입력해주세요`),(!d.discountPercent||d.discountPercent<=0||d.discountPercent>100)&&r.push(`효과 #${s+1}: 할인율을 1~100 사이로 입력해주세요`)),d.effectType==="badge"){const k=Ce(d.badgeKey);(!k||k.enabled===!1)&&r.push(`효과 #${s+1}: 활성 뱃지를 선택해주세요`)}d.effectType==="model-discount"&&((!d.discountPercent||d.discountPercent<=0||d.discountPercent>100)&&r.push(`효과 #${s+1}: AI 모델 할인율을 1~100 사이로 입력해주세요.`),d.targetModel||r.push(`효과 #${s+1}: 어떤 모델에 할인을 적용할지 선택해주세요.`)),d.effectType==="story-chat-bonus-limit-exempt"&&o.value.isPassive!==!0&&r.push(`효과 #${s+1}: 스토리챗 보너스 일일 한도 해제는 패시브 쿠폰이어야 합니다.`)}return r}),Se=A(()=>Ve.value.length===0);return{tr:C,tabs:y,activeTab:S,isSaving:E,selectedCategory:m,form:o,useAmountFilter:M,usePlatformFilter:R,useClientAppFilter:x,useTimeWindow:P,useUserRegisteredAfter:K,useCreditPaymentFilter:Y,useCoinPaymentFilter:W,useContentFilter:G,useCustomCondition:q,useBlockIfUserHas:Q,useRefererFilter:j,usePerUserLimit:B,useGlobalMaxUses:Z,useExclusion:L,couponExpiryMo
3de:re,couponExpiryDateLocal:He,contentOidsText:oe,creatorOidsText:se,refererCodesText:ie,milestoneThresholdsText:le,isEditing:Ae,isValid:Se,validationErrors:Ve,filteredActions:ze,selectedActionInfo:he,availableAchievements:de,achievementProgressTypes:H,isLoadingAchievements:z,achievementEditorOpen:ce,achievementEditorKey:ye,editingAchievement:X,selectedAchievementOid:D,selectedAchievement:F,selectedAchievementProgressType:ge,isAchievementLinkedElsewhere:_e,formatAchievementGoal:Pe,formatAchievementSummary:Ke,formatDateTime:bt,closeAchievementEditor:Ee,openAchievementCreateEditor:Ye,openAchievementEditEditor:We,handleAchievementSaved:qe,deleteAchievement:Qe,ACTION_CATEGORIES:da,SUPPORTED_ACTIONS:ae,PLATFORMS:ca,LANGUAGES:ua,CLIENT_APP_TYPES:ve,EFFECT_TYPES:ga,enabledBadges:Xe,COIN_TYPES:ma,CREDIT_TYPES:va,togglePlatform:rt,addEffect:ot,removeEffect:st,onEffectTypeChange:lt,formatEffectPreview:it,onImageError:dt,allTemplates:J,availableTemplatesForRevoke:$e,availableTemplatesForBlock:at,toggleRevokeTemplate:et,toggleBlockTemplate:nt,getTemplateName:tt,getSelectedBadge:Ce,imageFileInput:I,imageUploading:n,imagePreviewUrl:f,triggerImageInput:ut,onImageFileChange:gt,onImageDrop:mt,clearImage:vt,save:async()=>{if(Se.value){E.value=!0;try{const r={name:o.value.name.trim(),imageUrl:o.value.imageUrl.trim()||null,multiLangName:o.value.multiLangName,multiLangDescription:o.value.multiLangDescription,active:o.value.active,isPassive:o.value.triggerConditions.action==="achievement"?!1:o.value.isPassive,invisible:o.value.triggerConditions.action==="achievement"?!1:o.value.invisible,adminOnly:o.value.adminOnly,revokeOnly:o.value.triggerConditions.action==="achievement"?!1:o.value.revokeOnly,triggerConditions:{actions:o.value.triggerConditions.action?[o.value.triggerConditions.action]:[],minAmount:M.value?o.value.triggerConditions.minAmount:null,maxAmount:M.value?o.value.triggerConditions.maxAmount:null,platforms:R.value?o.value.triggerConditions.platforms:[],langs:o.value.triggerConditions.langs,clientAppType:x.value?o.value.triggerConditions.clientAppType:null,validFrom:P.value&&o.value.triggerConditions.validFrom?new Date(o.value.triggerConditions.validFrom).toISOString():null,validUntil:P.value&&o.value.triggerConditions.validUntil?new Date(o.value.triggerConditions.validUntil).toISOString():null,userRegisteredAfter:K.value&&o.value.triggerConditions.userRegisteredAfter?new Date(o.value.triggerConditions.userRegisteredAfter).toISOString():null,hasCreditPayment:Y.value?o.value.triggerConditions.hasCreditPayment:null,hasCoinPayment:W.value?o.value.triggerConditions.hasCoinPayment:null,userHasTags:o.value.triggerConditions.userHasTags,contentOids:G.value?o.value.triggerConditions.contentOids:[],creatorOids:G.value?o.value.triggerConditions.creatorOids:[],customConditionCode:q.value?o.value.triggerConditions.customConditionCode:null,milestoneThresholds:he.value?.isMilestone?o.value.triggerConditions.milestoneThresholds:[],achievementOids:o.value.triggerConditions.action==="achievement"&&D.value?[D.value]:[],blockIfUserHasTemplates:Q.value?o.value.triggerConditions.blockIfUserHasTemplates:[],refererCodes:j.value?o.value.triggerConditions.refererCodes:[],refererCodesMatchMode:j.value?o.value.triggerConditions.refererCodesMatchMode:"exact"},effects:o.value.effects.map(d=>{const k={effectType:d.effectType};return d.effectType==="coins"?(k.coinType=d.coinType,k.amount=d.amount):d.effectType==="credits"?(k.creditType=d.creditType,k.amount=d.amount):["subscription_days","discount_percent"].includes(d.effectType)?k.amount=d.amount:d.effectType==="inventory_item"?k.itemTemplate=d.itemTemplate:d.effectType==="badge"?k.badgeKey=String(d.badgeKey||"").trim().toLowerCase():["coin-discount","credit-discount"].includes(d.effectType)?(k.productNamePattern=d.productNamePattern,k.discountPercent=d.discountPercent):d.effectType==="model-discount"&&(k.targetModel=d.targetModel,k.discountPercent=d.discountPercent),k}),maxUsesPerUser:o.value.triggerConditions.action==="achievement"?1:B.value?o.value.maxUsesPerUser:null,globalMaxUses:o.value.triggerConditions.action==="achievement"?null:Z.value?o.value.globalMaxUses:null,couponValidityDays:re.value==="days"?o.value.couponValidityDays:null,couponExpiryDate:re.value==="date"?o.value.couponExpiryDate:null,revokeTemplateOids:o.value.triggerConditions.action==="achievement"?[]:L.value?o.value.revokeTemplateOids:[],exclusionGroup:o.value.triggerConditions.action==="achievement"?null:L.value&&o.value.exclusionGroup?.trim()||null};let s;Ae.value?s=await O.adminUpdateCouponTemplate(a.value._id,r):s=await O.adminCreateCouponTemplate(r),s.data.success?(p.data?.onSaved&&p.data.onSaved(s.data.template),e("close-popup")):alert("저장 실패: "+(s.data.error||"Unknown error"))}catch(r){alert("저장 실패: "+r.message)}finally{E.value=!1}}}}}},xa={class:"changed-popup-inner mb-10 w-full max-w-3xl"},ba={class:"changed-popup-header"},ya={class:"renewal-popup-body"},fa={class:"mb-6"},ha={class:"text-md leading-standard text-content-primary"},_a={class:"rounded-8px mb-4 flex gap-1 bg-surface-interactive p-1"},Ca=["onClick"],ka={class:"flex flex-col gap-4"},Ta={key:0,class:"rounded-8px border border-border-strong p-4"},wa={class:"mb-3 flex flex-col gap-component-sm-tight"},Aa={class:"mb-3 flex flex-col gap-component-sm-tight"},Ua={class:"flex items-start gap-3"},Pa={key:0,class:"animate-pulse text-xs leading-standard text-accent-default"},Ea=["src"],Oa={key:2,class:"flex flex-col items-center gap-1 text-content-secondary"},Va={class:"flex flex-1 flex-col gap-component-sm-tight"},Sa={class:"flex gap-component-sm-tight"},Ia={class:"mb-3"},Ma={class:"rounded-8px border border-border-strong p-4"},Da={class:"mb-3 flex flex-wrap gap-component-sm-tight"},La=["onClick"],Fa={class:"rounded-8px max-h-[300px] overflow-y-auto border border-border-strong bg-surface-interactive"},Na=["value","onUpdate:modelValue"],Ra={class:"flex-1"},Ga={class:"flex items-center gap-2"},ja={class:"text-xs leading-standard text-content-primary"},Ba={key:0,class:"rounded-sm bg-status-caution-emphasis/very-low px-component-sm-tight py-component-3xs text-xs leading-standard text-status-caution-content"},Ha={class:"font-mono text-xs leading-standard"},za={key:0,class:"mt-1 text-xs leading-standard text-accent-default"},Ka={key:0,class:"rounded-8px mt-3 bg-accent-default/minimal p-3"},Ya={class:"text-xs leading-standard font-weight-medium text-accent-default"},Wa={class:"font-mono mt-1 block rounded-sm bg-surface-canvas/faint px-2 py-1 text-xs leading-standard text-content-primary"},qa={key:0,class:"mt-2"},Qa={class:"mt-1 text-xs leading-standard text-content-primary"},Za={class:"mt-1 text-xs leading-standard text-content-secondary"},Ja={key:1,class:"rounded-8px mt-2 border border-status-caution-emphasis/disabled bg-status-caution-emphasis/minimal p-2 text-xs leading-standard text-status-caution-content"},Xa={key:0,class:"rounded-8px border border-accent-default/disabled bg-accent-default/minimal p-4"},$a=["disabled"],en={value:""},tn=["value","disabled"],an={key:0,class:"mt-2 text-xs leading-standard text-status-caution-content"},nn={key:1,class:"rounded-8px border border-status-caution-emphasis/disabled bg-status-caution-emphasis/minimal p-4"},rn={class:"mb-3 text-xs leading-standard text-content-secondary"},on=["placeholder"],sn={class:"mt-component-sm-tight text-xs leading-standard text-content-secondary"},ln={class:"rounded-8px border border-border-strong p-4"},dn={key:0,class:"mb-4"},cn={class:"mb-component-sm-tight flex items-center gap-2"},un={key:0,class:"ml-6 flex flex-wrap items-center gap-2"},gn={class:"mb-4"},mn={class:"mb-component-sm-tight flex items-center gap-2"},vn={class:"text-xs leading-standard text-content-primary"}
vendor: 8,103 bytes, line 3
3,pn={key:0,class:"ml-6 flex flex-wrap gap-2"},xn=["checked","onChange"],bn={class:"mb-4"},yn={class:"flex flex-wrap gap-3"},fn=["value"],hn={key:1,class:"mb-4"},_n={class:"mb-component-sm-tight flex items-center gap-2"},Cn={key:0,class:"ml-6"},kn=["value"],Tn={key:2,class:"mb-4"},wn={class:"mb-component-sm-tight flex items-center gap-2"},An=["disabled"],Un={key:0,class:"ml-6 flex flex-wrap items-center gap-2"},Pn={key:1,class:"ml-6 mt-component-sm-tight text-xs leading-standard text-status-caution-content"},En={class:"mb-4"},On={class:"mb-component-sm-tight flex items-center gap-2"},Vn={key:0,class:"ml-6 flex items-center gap-2"},Sn={class:"mb-4"},In={class:"mb-component-sm-tight flex items-center gap-2"},Mn={key:0,class:"ml-6 flex items-center gap-2"},Dn={class:"mb-4"},Ln={class:"mb-component-sm-tight flex items-center gap-2"},Fn={key:0,class:"ml-6 flex items-center gap-2"},Nn={class:"mb-4"},Rn={class:"mb-component-sm-tight flex items-center gap-2"},Gn={key:0,class:"ml-6 flex flex-col gap-2"},jn={class:"flex flex-col gap-1"},Bn={class:"flex flex-col gap-1"},Hn={class:"mb-4"},zn={class:"mb-component-sm-tight flex items-center gap-2"},Kn={key:0,class:"ml-6 flex flex-col gap-2"},Yn={class:"flex flex-col gap-1"},Wn={class:"mt-1 flex items-center gap-4"},qn={class:"flex items-center gap-1"},Qn={class:"flex items-center gap-1"},Zn={class:"mb-4"},Jn={class:"mb-component-sm-tight flex items-center gap-2"},Xn={key:0,class:"ml-6 flex flex-col gap-2"},$n={key:0,class:"mb-1 flex flex-wrap gap-component-sm-tight"},er=["onClick"],tr={class:"rounded-8px max-h-[200px] overflow-y-auto border border-border-strong bg-surface-interactive"},ar={key:0,class:"p-3 text-center text-xs leading-standard text-content-secondary"},nr=["checked","onChange"],rr={class:"flex-1"},or={class:"text-xs leading-standard text-content-primary"},sr={class:"flex items-center gap-component-sm-tight"},lr={class:"font-mono text-xs leading-standard"},ir={key:0,class:"rounded-sm bg-status-form-error-soft/very-low px-component-sm-tight py-component-hairline text-xs leading-standard text-status-danger-foreground"},dr={class:"mb-component-sm-tight flex items-center gap-2"},cr={key:0,class:"ml-6"},ur={key:2,class:"rounded-8px border border-border-strong p-4"},gr={class:"mb-4 flex items-start justify-between gap-3"},mr={key:0,class:"rounded-8px bg-surface-interactive px-4 py-8 text-center text-xs leading-standard text-content-secondary"},vr={key:1,class:"rounded-8px bg-surface-interactive px-4 py-8 text-center text-xs leading-standard text-content-secondary"},pr={key:2,class:"rounded-8px max-h-[520px] overflow-y-auto border border-border-strong"},xr=["src"],br={key:1,class:"flex h-40px w-40px shrink-0 items-center justify-center rounded-sm bg-surface-interactive"},yr={class:"min-w-0 flex-1"},fr={class:"flex flex-wrap items-center gap-2"},hr={class:"truncate text-xs leading-standard font-weight-medium text-content-primary"},_r={key:0,class:"rounded-pill bg-accent-default/minimal px-2 py-component-3xs text-xs leading-standard text-accent-default"},Cr={key:1,class:"rounded-pill bg-status-caution-emphasis/very-low px-2 py-component-3xs text-xs leading-standard text-status-caution-content"},kr={class:"mt-1 text-xs leading-standard text-content-secondary"},Tr={class:"mt-1 text-xs leading-standard text-content-secondary"},wr={key:0,class:"mt-1 text-xs leading-standard text-status-danger-foreground"},Ar={key:1,class:"mt-1 text-xs leading-standard text-content-secondary"},Ur={class:"flex shrink-0 gap-3"},Pr=["onClick"],Er=["onClick"],Or={key:3,class:"mt-5 border-t border-border-strong pt-5"},Vr={key:0,class:"rounded-8px border border-status-warning-emphasis/disabled bg-status-warning-emphasis/minimal p-4 text-center"},Sr={class:"rounded-8px border border-border-strong p-4"},Ir={class:"mb-3 flex items-center justify-between"},Mr=["disabled"],Dr={key:0,class:"rounded-8px bg-surface-interactive p-6 text-center text-content-secondary"},Lr={key:1,class:"flex flex-col gap-3"},Fr={class:"mb-2 flex items-center justify-between"},Nr={class:"text-xs leading-standard font-weight-medium text-content-primary"},Rr=["onClick"],Gr={class:"flex flex-wrap gap-2"},jr=["onUpdate:modelValue","onChange"],Br=["value"],Hr=["onUpdate:modelValue"],zr=["value"],Kr=["onUpdate:modelValue"],Yr={key:1,class:"flex w-full flex-col gap-2"},Wr={class:"flex items-center gap-2"},qr=["onUpdate:modelValue"],Qr=["onUpdate:modelValue"],Zr={id:"aiModelsList"},Jr=["value"],Xr=["onUpdate:modelValue"],$r=["value"],eo=["onUpdate:modelValue"],to=["onUpdate:modelValue"],ao=["onUpdate:modelValue"],no=["onUpdate:modelValue"],ro={key:6,class:"flex w-full flex-col gap-2"},oo=["onUpdate:modelValue"],so=["value"],lo={key:0,class:"rounded-8px flex items-center gap-2 border border-border-strong bg-surface-raised px-3 py-2"},io={class:"text-xs leading-standard text-content-secondary"},co={key:7,class:"flex w-full flex-col gap-2"},uo={class:"flex flex-col gap-1"},go=["onUpdate:modelValue","placeholder"],mo={class:"flex items-center gap-2"},vo=["onUpdate:modelValue"],po={class:"rounded-8px border border-border-strong p-4"},xo={class:"mb-4 flex flex-col gap-component-sm-tight"},bo={class:"flex items-center gap-2 text-xs leading-standard text-content-secondary"},yo=["disabled"],fo={key:0,class:"flex items-center gap-2"},ho=["disabled"],_o={key:1,class:"text-xs leading-standard text-accent-default"},Co={key:2,class:"text-xs leading-standard text-content-secondary"},ko={key:3,class:"text-xs leading-standard text-status-caution-content"},To={key:0,class:"mb-4 flex flex-col gap-component-sm-tight"},wo={class:"flex items-center gap-2 text-xs leading-standard text-content-secondary"},Ao={key:0,class:"flex items-center gap-2"},Uo={class:"flex flex-col gap-component-sm-tight"},Po={class:"flex items-center gap-2 mb-component-sm-tight"},Eo={class:"flex cursor-pointer items-center gap-1"},Oo={class:"flex cursor-pointer items-center gap-1 ml-3"},Vo={key:0,class:"flex items-center gap-2"},So={key:1,class:"flex items-center gap-2"},Io={class:"rounded-8px border border-border-strong p-4"},Mo={class:"flex flex-col gap-3"},Do={class:"flex cursor-pointer items-center gap-2"},Lo={class:"flex cursor-pointer items-center gap-2"},Fo={class:"text-xs leading-standard text-status-caution-content"},No={class:"rounded-8px border border-commerce-reward/disabled bg-commerce-reward/minimal p-4"},Ro={class:"flex flex-col gap-3"},Go={class:"flex cursor-pointer items-center gap-2"},jo=["disabled"],Bo={class:"flex cursor-pointer items-center gap-2"},Ho=["disabled"],zo={key:0,class:"text-xs leading-standard text-accent-default"},Ko={key:1,class:"text-xs leading-standard text-commerce-reward-content"},Yo={class:"rounded-8px border border-status-form-error-soft/disabled bg-status-form-error-soft/minimal p-4"},Wo={class:"flex cursor-pointer items-center gap-2"},qo=["disabled"],Qo={class:"rounded-8px border border-status-warning-emphasis/disabled bg-status-warning-emphasis/minimal p-4"},Zo={class:"mb-3 flex cursor-pointer items-center gap-2"},Jo=["disabled"],Xo={key:0,class:"flex flex-col gap-4"},$o={class:"flex flex-col gap-component-sm-tight"},es={class:"flex flex-col gap-component-sm-tight"},ts={key:0,class:"mb-2 flex flex-wrap gap-component-sm-tight"},as=["onClick"],ns={class:"rounded-8px max-h-[200px] overflow-y-auto border border-border-strong bg-surface-interactive"},rs={key:0,class:"p-3 text-center text-xs leading-standard text-content-secondary"},os=["checked","onChange"],ss={class:"flex-1"},ls={class:"text-xs leading-standard text-content-primary"},is={class:"flex items-center gap-component-sm-tight"},ds={class:"font-mono text-xs leading-standard"},cs={key:0,class:"rounded-sm bg-status-warning-emphasis/very-low px-component-sm-tight py-component-hairline text-xs leading-standard text-status-warning-foreground"},us={key:1,class:"rounded-sm bg-status-form-error-soft/very-low px-component-sm-tight py-component-hairline text-xs leading-standard text-status-danger-foreground"},gs={key:0,class:"rounded-8px mt-4 border border-border-strong bg-surface-interactive p-3"},ms={class:"flex items-center gap-3"}
3,vs=["src"],ps={key:1,class:"rounded-8px flex h-48px w-48px items-center justify-center bg-action-primary-disabled text-xl leading-tight"},xs={class:"flex-1"},bs={class:"font-weight-medium text-content-primary"},ys={class:"text-xs leading-standard text-content-secondary"},fs={key:0,class:"mt-1 text-xs leading-standard text-accent-default"},hs={class:"flex flex-col items-end gap-component-3xs"},_s={key:0,class:"text-xs leading-standard text-content-secondary"},Cs={key:1,class:"rounded-8px mt-3 bg-status-form-error-soft/very-low p-3"},ks={class:"list-inside list-disc text-xs leading-standard text-status-danger-foreground"},Ts={key:2,class:"mt-6 flex justify-end"},ws=["disabled"];function As(p,e,C,a,y,S){const E=xe("MultiLangInput"),m=xe("AdminAchievementEditPopup"),I=xe("BadgeDisplay");return l(),i("div",xa,[t("div",ba,[t("button",{class:"w-4 md:w-5",onClick:e[0]||(e[0]=n=>p.$emit("close-popup"))},[...e[56]||(e[56]=[t("img",{class:"block w-full",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAQAAAD9CzEMAAAAyElEQVRYw+2WSwrDMAwFBTlkfqdLakIPaZguCiWNQyzZyqLFb23PgLAfEmlpafnb0BHo1adnVjob/glEnYKZCGwGBYF3IoMSD/DQC4bPpYxih4/6kaoVxfhEMbrjRUQYrxTV+GuFCz5RTO54ERGmo8IVnyrc8YnCH38Yyx34ROGPv11w84i+Xk7UN20Jvtc3bRHeVuZFeF3TVuHzTVuNd1HkO+e8ad3w503riq9QsOr/606xWBavzbx4BetuZ1sdFxO+paXlx/ICYTRfOPrpBZkAAAAASUVORK5CYII=",alt:"cls"},null,-1)])])]),t("div",ya,[t("div",fa,[t("h2",ha,g(a.isEditing?"템플릿 수정":"새 템플릿 생성"),1)]),t("div",_a,[(l(!0),i(b,null,T(a.tabs,n=>(l(),i("button",{class:N(["flex-1 rounded-md px-3 py-2 text-xs leading-standard transition-colors",a.activeTab===n.id?"bg-accent-default text-accent-content":"text-content-secondary hover:text-content-primary"]),key:n.id,onClick:f=>a.activeTab=n.id},g(n.label),11,Ca))),128))]),t("div",ka,[a.activeTab==="basic"?(l(),i("div",Ta,[e[64]||(e[64]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"기본 정보",-1)),t("div",wa,[e[57]||(e[57]=t("label",{class:"text-xs leading-standard text-content-secondary"},"내부 이름 *",-1)),u(t("input",{class:"rounded-8px outline-none border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary placeholder:text-content-secondary focus:border-accent-default",type:"text","onUpdate:modelValue":e[1]||(e[1]=n=>a.form.name=n),placeholder:"관리용 이름 (예: 첫 충전 보너스 2024)"},null,512),[[h,a.form.name]])]),t("div",Aa,[e[61]||(e[61]=t("label",{class:"text-xs leading-standard text-content-secondary"},"이미지",-1)),t("div",Ua,[t("div",{class:"rounded-8px group relative flex h-80px w-80px shrink-0 cursor-pointer items-center justify-center overflow-hidden border border-dashed border-border-strong bg-surface-interactive transition-colors hover:border-accent-default",onClick:e[4]||(e[4]=(...n)=>a.triggerImageInput&&a.triggerImageInput(...n)),onDragover:e[5]||(e[5]=De(()=>{},["prevent"])),onDrop:e[6]||(e[6]=De((...n)=>a.onImageDrop&&a.onImageDrop(...n),["prevent"]))},[a.imageUploading?(l(),i("div",Pa," 업로드중... ")):a.imagePreviewUrl?(l(),i(b,{key:1},[t("img",{class:"h-full w-full object-cover",src:a.imagePreviewUrl,onError:e[2]||(e[2]=(...n)=>a.onImageError&&a.onImageError(...n))},null,40,Ea),e[58]||(e[58]=t("div",{class:"absolute inset-0 flex items-center justify-center bg-surface-canvas/disabled opacity-hidden transition-opacity group-hover:opacity-full"},[t("span",{class:"text-xs leading-standard text-content-primary"},"변경")],-1))],64)):(l(),i("div",Oa,[...e[59]||(e[59]=[t("svg",{class:"h-20px w-20px",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})],-1),t("span",{class:"text-xs leading-standard"},"업로드",-1)])])),t("input",{class:"hidden",type:"file",ref:"imageFileInput",accept:"image/png,image/jpeg,image/gif,image/webp,image/svg+xml",onChange:e[3]||(e[3]=(...n)=>a.onImageFileChange&&a.onImageFileChange(...n))},null,544)],32),t("div",Va,[t("div",Sa,[u(t("input",{class:"rounded-8px outline-none flex-1 border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary placeholder:text-content-secondary focus:border-accent-default",type:"text","onUpdate:modelValue":e[7]||
3(e[7]=n=>a.form.imageUrl=n),placeholder:"직접 URL 입력 또는 이미지를 업로드하세요"},null,512),[[h,a.form.imageUrl]]),a.form.imageUrl?(l(),i("button",{key:0,class:"rounded-8px shrink-0 border border-border-strong px-2 py-2 text-xs leading-standard text-status-danger-foreground hover:bg-status-danger-foreground/minimal",onClick:e[8]||(e[8]=(...n)=>a.clearImage&&a.clearImage(...n))}," 삭제 ")):c("",!0)]),e[60]||(e[60]=t("p",{class:"text-xs leading-standard"}," PNG, JPG, GIF, WebP, SVG 지원. 드래그 앤 드롭 가능. ",-1))])])]),t("div",Ia,[e[62]||(e[62]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"},"다국어 이름",-1)),ne(E,{langs:a.form.multiLangName,placeholder:{ko:"환영 보너스",en:"Welcome Bonus",jp:"ウェルカムボーナス",zh:"欢迎奖励","zh-Hant":"歡迎獎勵"}},null,8,["langs"])]),t("div",null,[e[63]||(e[63]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"},"다국어 설명",-1)),ne(E,{langs:a.form.multiLangDescription,type:"textarea",rows:2,placeholder:{ko:"첫 충전 감사 선물입니다",en:"Thank you for your first charge",jp:"初回チャージありがとうございます",zh:"感谢您的首次充值","zh-Hant":"感謝您的首次儲值"}},null,8,["langs"])])])):c("",!0),a.activeTab==="triggers"?(l(),i(b,{key:1},[t("div",Ma,[e[68]||(e[68]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"트리거 액션 *",-1)),e[69]||(e[69]=t("p",{class:"mb-3 text-xs leading-standard text-content-secondary"}," 어떤 액션이 발생했을 때 액션태그를 발급할지 선택하세요 ",-1)),t("div",Da,[(l(!0),i(b,null,T(a.ACTION_CATEGORIES,n=>(l(),i("button",{class:N(["rounded-pill border px-component-sm-roomy py-1 text-xs leading-standard transition-colors",a.selectedCategory===n.id?"border-accent-default bg-accent-default/very-low text-accent-default":"border-border-strong text-content-secondary hover:text-content-primary"]),key:n.id,onClick:f=>a.selectedCategory=n.id},g(n.label),11,La))),128))]),t("div",Fa,[(l(!0),i(b,null,T(a.filteredActions,n=>(l(),i("label",{class:N(["flex cursor-pointer items-start gap-2 border-b border-border-strong p-3 transition-colors last:border-b-0",a.form.triggerConditions.action===n.value?"bg-accent-default/minimal":"hover:bg-surface-interactive"]),key:n.value},[u(t("input",{class:"accent-accent-default mt-component-3xs h-16px w-16px",name:"triggerAction",type:"radio",value:n.value,"onUpdate:modelValue":f=>a.form.triggerConditions.action=f},null,8,Na),[[te,a.form.triggerConditions.action]]),t("div",Ra,[t("div",Ga,[t("span",ja,g(n.label),1),n.isMilestone?(l(),i("span",Ba," 마일스톤 ")):c("",!0)]),t("code",Ha,g(n.value),1),n.milestoneDescription?(l(),i("div",za," 📊 "+g(n.milestoneDescription),1)):c("",!0)])],2))),128))]),a.selectedActionInfo?(l(),i("div",Ka,[t("div",Ya," 선택된 액션: "+g(a.selectedActionInfo.label),1),t("code",Wa,g(a.selectedActionInfo.value),1),a.selectedActionInfo.isMilestone?(l(),i("div",qa,[e[67]||(e[67]=t("div",{class:"text-xs leading-standard text-status-caution-content"}," ⚡ 이 액션은 마일스톤 액션입니다. 아래에서 임계값을 설정하세요. ",-1)),t("div",Qa,[e[65]||(e[65]=t("strong",null,"milestoneValue 의미:",-1)),U(" "+g(a.selectedActionInfo.milestoneDescription),1)]),t("div",Za,[e[66]||(e[66]=t("strong",null,"단위:",-1)),U(" "+g(a.selectedActionInfo.milestoneUnit),1)])])):c("",!0),a.selectedActionInfo.value==="ingame_spend_milestone"?(l(),i("p",Ja," ⚠️ "+g(a.tr("Game","ingame-spend-milestone-db-required")),1)):c("",!0)])):c("",!0)]),a.form.triggerConditions.action==="achievement"?(l(),i("div",Xa,[e[70]||(e[70]=t("h3",{class:"mb-2 font-weight-bold text-accent-default"}," 업적 쿼리 연결 * ",-1)),e[71]||(e[71]=t("p",{class:"mb-3 text-xs leading-standard text-content-secondary"}," 연결할 업적 쿼리 하나를 선택하세요. 사용자가 해당 업적의 보상 수령 버튼을 누르면 이 쿠폰이 지급됩니다. ",-1)),u(t("select",{class:"rounded-8px w-full border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary disabled:opacity-disabled","onUpdate:modelValue":e[9]||(e[9]=n=>a.selectedAchievementOid=n),disabled:a.isLoadingAchievements||a.availableAchievements.length===0},[t("option",en,g(a.isLoadingAchievements?"업적 쿼리를 불러오는 중입니다":a.availableAchievements.length===0?"등록된 업적 쿼리가 없습니다":"업적 쿼리를 선택해주세요"),1),(l(!0),i(b,null,T(a.availableAchievements,n=>(l(),i("option",{key:n._id,value:n._id,disabled:n.active===!1||a.isAchievementLinkedElsewhere(n)},g(a.formatAchievementSummary(n)),9,tn))),128))],8,$a),[[V,a.selectedAchievementOid]]),a.selectedAchievementOid&&!a.isLoadingAchievements&&!a.selectedAchievement?(l(),i("p",an," 현재 연결된 쿼리를 찾을 수 없습니다. 목록에서 다시 선택해주세요. ")):c("",!0)])):c("",!0),a.selectedActionInfo?.isMilestone?(l(),i("div",nn,[e[74]||(e[74]=t("h3",{class:"mb-2 font-weight-bold text-status-caution-content"}," 마일스톤 임계값 설정 * ",-1)),t("p",rn,[U(g(a.selectedActionInfo.milestoneDescription)+" 값이 아래 임계값에 도달하면 액션태그가 발급됩니다. ",1),e[72]||(e[72]=t("br",null,null,-1)),e[73]||(e[73]=U("각 임계값마ë
3‹¤ 한 번씩 발급됩니다 (중복 발급 방지). ",-1))]),u(t("input",{class:"rounded-8px w-full border border-status-caution-emphasis/disabled bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary placeholder:text-content-secondary",type:"text","onUpdate:modelValue":e[10]||(e[10]=n=>a.milestoneThresholdsText=n),placeholder:a.selectedActionInfo.milestoneExample||"10, 100, 1000"},null,8,on),[[h,a.milestoneThresholdsText]]),t("p",sn," 쉼표로 구분하여 입력 (예: "+g(a.selectedActionInfo.milestoneExample||"10, 100, 1000")+") ",1)])):c("",!0),t("div",ln,[e[102]||(e[102]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"추가 ì¡°ê±´ 필터 (선택)",-1)),a.form.triggerConditions.action!=="achievement"?(l(),i("div",dn,[t("label",cn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[11]||(e[11]=n=>a.useAmountFilter=n)},null,512),[[w,a.useAmountFilter]]),e[75]||(e[75]=t("span",{class:"text-xs leading-standard text-content-primary"},"금액 범위 ì¡°ê±´",-1))]),a.useAmountFilter?(l(),i("div",un,[u(t("input",{class:"rounded-8px w-120px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":e[12]||(e[12]=n=>a.form.triggerConditions.minAmount=n),placeholder:"최소"},null,512),[[h,a.form.triggerConditions.minAmount,void 0,{number:!0}]]),e[76]||(e[76]=t("span",{class:"text-content-secondary"},"~",-1)),u(t("input",{class:"rounded-8px w-120px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":e[13]||(e[13]=n=>a.form.triggerConditions.maxAmount=n),placeholder:"최대"},null,512),[[h,a.form.triggerConditions.maxAmount,void 0,{number:!0}]]),e[77]||(e[77]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(원/엔 등)",-1))])):c("",!0)])):c("",!0),t("div",gn,[t("label",mn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[14]||(e[14]=n=>a.usePlatformFilter=n)},null,512),[[w,a.usePlatformFilter]]),t("span",vn,g(a.tr("Melo","admin-platform-target-label")),1)]),a.usePlatformFilter?(l(),i("div",pn,[(l(!0),i(b,null,T(a.PLATFORMS,n=>(l(),i("label",{class:N(["flex cursor-pointer items-center gap-1 rounded-pill border border-border-strong px-3 py-1 text-xs leading-standard",a.form.triggerConditions.platforms.includes(n)?"border-accent-default bg-accent-default/minimal text-accent-default":"text-content-secondary hover:text-content-primary"]),key:n},[t("input",{class:"hidden",type:"checkbox",checked:a.form.triggerConditions.platforms.includes(n),onChange:f=>a.togglePlatform(n)},null,40,xn),U(" "+g(n==="melo"?a.tr("Melo","platform-name"):n),1)],2))),128))])):c("",!0)]),t("div",bn,[e[78]||(e[78]=t("label",{class:"mb-component-sm-tight block text-xs leading-standard text-content-secondary"}," 언어 타겟 (미선택 = 전체) ",-1)),t("div",yn,[(l(!0),i(b,null,T(a.LANGUAGES,n=>(l(),i("label",{class:"flex items-center gap-1 text-xs leading-standard text-content-primary",key:n},[u(t("input",{class:"accent-accent-default",type:"checkbox",value:n,"onUpdate:modelValue":e[15]||(e[15]=f=>a.form.triggerConditions.langs=f)},null,8,fn),[[w,a.form.triggerConditions.langs]]),U(" "+g(n),1)]))),128))])]),a.form.triggerConditions.action?(l(),i("div",hn,[t("label",_n,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[16]||(e[16]=n=>a.useClientAppFilter=n)},null,512),[[w,a.useClientAppFilter]]),e[79]||(e[79]=t("span",{class:"text-xs leading-standard text-content-primary"}," 접속 클라이언트 ì¡°ê±´ ",-1))]),a.useClientAppFilter?(l(),i("div",Cn,[u(t("select",{class:"rounded-8px mb-2 border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":e[17]||(e[17]=n=>a.form.triggerConditions.clientAppType=n)},[(l(!0),i(b,null,T(a.CLIENT_APP_TYPES,n=>(l(),i("option",{key:n.value,value:n.value},g(n.label),9,kn))),128))],512),[[V,a.form.triggerConditions.clientAppType]]
3)])):c("",!0)])):c("",!0),a.form.triggerConditions.action?(l(),i("div",Tn,[t("label",wn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[18]||(e[18]=n=>a.useTimeWindow=n),disabled:a.form.triggerConditions.action==="achievement"&&a.selectedAchievement&&a.selectedAchievementProgressType&&!a.selectedAchievementProgressType.supportsAggregationStartAt},null,8,An),[[w,a.useTimeWindow]]),e[80]||(e[80]=t("span",{class:"text-xs leading-standard text-content-primary"}," 유효 기간 조건 ",-1))]),a.useTimeWindow?(l(),i("div",Un,[u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"datetime-local","onUpdate:modelValue":e[19]||(e[19]=n=>a.form.triggerConditions.validFrom=n)},null,512),[[h,a.form.triggerConditions.validFrom]]),e[81]||(e[81]=t("span",{class:"text-content-secondary"},"~",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"datetime-local","onUpdate:modelValue":e[20]||(e[20]=n=>a.form.triggerConditions.validUntil=n)},null,512),[[h,a.form.triggerConditions.validUntil]])])):c("",!0),a.form.triggerConditions.action==="achievement"&&a.selectedAchievement&&a.selectedAchievementProgressType&&!a.selectedAchievementProgressType.supportsAggregationStartAt?(l(),i("p",Pn," 선택한 진행도 종류는 유효 기간 조건을 지원하지 않습니다. ")):c("",!0)])):c("",!0),a.form.triggerConditions.action!=="achievement"?(l(),i(b,{key:3},[t("div",En,[t("label",On,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[21]||(e[21]=n=>a.useUserRegisteredAfter=n)},null,512),[[w,a.useUserRegisteredAfter]]),e[82]||(e[82]=t("span",{class:"text-xs leading-standard text-content-primary"},"가입일 조건",-1))]),a.useUserRegisteredAfter?(l(),i("div",Vn,[u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"datetime-local","onUpdate:modelValue":e[22]||(e[22]=n=>a.form.triggerConditions.userRegisteredAfter=n)},null,512),[[h,a.form.triggerConditions.userRegisteredAfter]]),e[83]||(e[83]=t("span",{class:"text-xs leading-standard text-content-secondary"},"이후 가입한 유저만",-1))])):c("",!0)]),t("div",Sn,[t("label",In,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[23]||(e[23]=n=>a.useCreditPaymentFilter=n)},null,512),[[w,a.useCreditPaymentFilter]]),e[84]||(e[84]=t("span",{class:"text-xs leading-standard text-content-primary"},"크레딧 결제 여부",-1))]),a.useCreditPaymentFilter?(l(),i("div",Mn,[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":e[24]||(e[24]=n=>a.form.triggerConditions.hasCreditPayment=n)},[...e[85]||(e[85]=[t("option",{value:!0},"true - 결제한 유저",-1),t("option",{value:!1},"false - 결제 안 한 유저",-1)])],512),[[V,a.form.triggerConditions.hasCreditPayment]])])):c("",!0)]),t("div",Dn,[t("label",Ln,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[25]||(e[25]=n=>a.useCoinPaymentFilter=n)},null,512),[[w,a.useCoinPaymentFilter]]),e[86]||(e[86]=t("span",{class:"text-xs leading-standard text-content-primary"},"코인 결제 여부",-1))]),a.useCoinPaymentFilter?(l(),i("div",Fn,[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":e[26]||(e[26]=n=>a.form.triggerConditions.hasCoinPayment=n)},[...e[87]||(e[87]=[t("option",{value:!0},"true - 결제한 유저",-1),t("option",{value:!1},"false - 결제 안 한 유저",-1)])],512),[[V,a.form.triggerConditions.hasCoinPayment]])])):c("",!0)]),t("div",Nn,[t("label",Rn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[27]||(e[27]=n=>a.useContentFilter=n)},null,512),[[w,a.useContentFilter]]),e[88]||(e[88]=t("span",{class:"text-xs leading-standard text-content-primary"},"특정 콘텐츠/크리에이터 필터",-1))]),a.useContentFilter?(l(),i("div",Gn,[t("div",jn,[e[89]||(e[89]=t("span",{class:"text-xs leading-standard text-content-secondary"},"콘텐츠 OID (쉼표 구분)",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":e[28]||(e[28]=n=>a.contentOidsText=n),placeholder:"507f1f77bcf86cd799439011, 507f1f77bcf86cd799439012"},null,512),[[h,a.contentOidsText]])]),t("div",Bn,[e[90]||(e[90]=t("span",{class:"text-xs leading-standard text-content-secondary"},"크리에이터 OID (쉼표 구분)",-1)),u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":e[29]||(e[29]=n=>a.creatorOidsText=n),placeholder:"507f1f77bcf86cd799439011, 507f1f77bcf86cd799439012"},null,512),[[h,a.creatorOidsText]])])])):c("",!0)]),t("div",Hn,[t("label",zn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[30]||(e[30]=n=>a.useRefererFilter=n)},null,512),[[w,a.useRefererFilter]]),e[91]||(e[91]=t("span",{class:"text-xs leading-standard text-content-primary"},"특정 리퍼러로 가입한 유저만",-1))]),a.useRefererFilter?(l(),i("div",Kn,[e[95]||(e[95]=t("p",{class:"text-xs leading-standard text-content-secondary"}," 아래 리퍼러 코드로 가입한 유저에게만 쿠폰이 발급됩니다. (complete_signup 액션 전용) ",-1)),t("div",Yn,[e[94]||(e[94]=t("span",{class:"text-xs leading-standard text-content-secondary"},"리퍼러 코드 (쉼표 구분)",-1)),u(t("input",{class:"rounded-8px border border-status-success-emphasis/disabled bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":e[31]||(e[31]=n=>a.refererCodesText=n),placeholder:"partner_a, partner_b"},null,512),[[h,a.refererCodesText]]),t("div",Wn,[t("label",qn,[u(t("input",{type:"radio",class:"accent-accent-default",value:"exact","onUpdate:modelValue":e[32]||(e[32]=n=>a.form.triggerConditions.refererCodesMatchMode=n)},null,512),[[te,a.form.triggerConditions.refererCodesMatchMode]]),e[92]||(e[92]=t("span",{class:"text-xs leading-standard text-content-secondary"},"정확히 일치",-1))]),t("label",Qn,[u(t("input",{type:"radio",class:"accent-accent-default",value:"contains","onUpdate:modelValue":e[33]||(e[33]=n=>a.form.triggerConditions.refererCodesMatchMode=n)},null,512),[[te,a.form.triggerConditions.refererCodesMatchMode]]),e[93]||(e[93]=t("span",{class:"text-xs leading-standard text-content-secondary"},"포함 (입력한 코드가 리퍼러에 포함되면 매칭)",-1))])])])])):c("",!0)]),t("div",Zn,[t("label",Jn,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[34]||(e[34]=n=>a.useBlockIfUserHas=n)},null,512),[[w,a.useBlockIfUserHas]]),e[96]||(e[96]=t("span",{class:"text-xs leading-standard text-content-primary"},"특정 쿠폰 보유 시 발급 차단",-1))]),a.useBlockIfUserHas?(l(),i("div",Xn,[e[98]||(e[98]=t("p",{class:"text-xs leading-standard text-content-secondary"}," 유저가 아래 템플릿의 미사용 쿠폰을 보유하고 있으면 이 템플릿의 쿠폰을 발급하지 않습니다. ",-1)),a.form.triggerConditions.blockIfUserHasTemplates.length>0?(l(),i("div",$n,[(l(!0),i(b,null,T(a.form.triggerConditions.blockIfUserHasTemplates,n=>(l(),i("span",{class:"inline-flex items-center gap-1 rounded-pill border border-accent-default/disabled bg-accent-default/very-low px-component-sm-roomy py-1 text-xs leading-standard text-accent-default",key:n},[U(g(a.getTemplateName(n))+" ",1),t("button",{class:"text-accent-default hover:text-status-danger-foreground",onClick:f=>a.toggleBlockTemplate(n)},[...e[97]||(e[97]=[t("svg",{class:"h-12px w-12px",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,er)]))),128))])):c("",!0),t("div",tr,[a.availableTemplatesForBlock.length===0?(l(),i("div",ar," 선택 가능한 템플릿이 없습니다 ")):c("",!0),(l(!0),i(b,null,T(a.availableTemplatesForBlock,n=>(l(),i("label",{class:N(["flex cursor-pointer items-center gap-2 border-b border-border-strong px-3 py-2 transition-colors last:border-b-0",a.form.triggerConditions.blockIfUserHasTemplates.includes(n._id)?"bg-accent-default/minimal":"hover:bg-surface-interactive"]),key:n._id},[t("input",{class:"accent-accent-default h-14px w-14px",type:"checkbox",checked:a.form.triggerConditions.blockIfUserHasTemplates.includes(n._id),onChange:f=>a.toggleBlockTemplate(n._id)},null,40,nr),t("div",rr,[t("div",or,g(n.name),1),t("div",sr,[t("code",lr,g(n._id),1),n.active?c("",!0):(l(),i("span",ir," 비활성 "))])])],2))),128))])])):c("",!0)]),t("div",null,[t("label",dr,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[35]||(e[35]=n=>a.useCustomCondition=n)},null,512),[[w,a.useCustomCondition]]),e[99]||(e[99]=t("span",{class:"text-xs leading-standard text-content-primary"},"커스텀 조건 코드",-1)),e[100]||(e[100]=t("span",{class:"text-xs leading-standard text-status-caution-content"},"(고급)",-1))]),a.useCustomCondition?(l(),i("div",cr,[u(t("textarea",{class:"rounded-8px font-mono w-full border border-border-strong bg-surface-interactive px-3 py-2 text-xs leading-standard text-status-caution-content","onUpdate:modelValue":e[36]||(e[36]=n=>a.form.triggerConditions.customConditionCode=n),rows:"3",placeholder:"context.amount >= 10000 && context.paymentMethod === 'card'"},null,512),[[h,a.form.triggerConditions.customConditionCode]]),e[101]||(e[101]=t("p",{class:"mt-1 text-xs leading-standard text-content-secondary"}," 사용 가능 변수: context (action, userOid, amount, platformType 등) ",-1))])):c("",!0)])],64)):c("",!0)])],64)):c("",!0),a.activeTab==="achievementQueries"?(l(),i("div",ur,[t("div",gr,[e[103]||(e[103]=t("div",null,[t("h3",{class:"font-weight-bold text-content-primary"}," 업적 쿼리 목록 "),t("p",{class:"mt-1 text-xs leading-standard text-content-secondary"}," 등록된 업적 쿼리를 조회하고 새로 등록하거나 수정·삭제할 수 있습니다. ")],-1)),t("button",{class:"rounded-8px shrink-0 bg-accent-default px-3 py-2 text-xs leading-standard font-weight-medium text-accent-content hover:opacity-strong",onClick:e[37]||(e[37]=(...n)=>a.openAchievementCreateEditor&&a.openAchievementCreateEditor(...n))}," + 새 쿼리 등록 ")]),a.isLoadingAchievements&&a.availableAchievements.length===0?(l(),i("div",mr," 업적 쿼리를 불러오는 중입니다. ")):a.availableAchievements.length===0?(l(),i("div",vr," 등록된 업적 쿼리가 없습니다. ")):(l(),i("div",pr,[(l(!0),i(b,null,T(a.availableAchievements,n=>(l(),i("div",{key:n._id,class:"flex items-center gap-3 border-b border-border-strong p-3 last:border-b-0"},[n.rewardCoupon?.imageUrl?(l(),i("img",{key:0,class:"h-40px w-40px shrink-0 rounded-sm object-cover",src:n.rewardCoupon.imageUrl,alt:""}
3,null,8,xr)):(l(),i("div",br," 🏆 ")),t("div",yr,[t("div",fr,[t("span",hr,g(n.multiLangName?.ko||n.name),1),t("span",{class:N(["rounded-pill px-2 py-component-3xs text-xs leading-standard",n.active?"bg-status-success-emphasis/very-low text-status-success-foreground":"bg-surface-inverse-disabled/very-low text-content-secondary"])},g(n.active?"활성":"비활성"),3),n.isEvent?(l(),i("span",_r," 이벤트 ")):c("",!0),n.rewardCoupon?.adminOnly?(l(),i("span",Cr," 관리자전용 ")):c("",!0)]),t("div",kr,g(a.formatAchievementGoal(n)),1),t("div",Tr," 집계: "+g(n.aggregationStartAt?`${a.formatDateTime(n.aggregationStartAt)}부터`:"전체 누적"),1),n.rewardConfigurationError?(l(),i("div",wr," 활성 쿠폰이 여러 개 연결되어 있습니다. ")):n.rewardCoupon?(l(),i("div",Ar," 연결 쿠폰: "+g(n.rewardCoupon.name),1)):c("",!0)]),t("div",Ur,[t("button",{class:"text-xs leading-standard text-content-secondary hover:text-accent-default",onClick:f=>a.openAchievementEditEditor(n)}," 수정 ",8,Pr),t("button",{class:"text-xs leading-standard text-content-secondary hover:text-status-danger-foreground",onClick:f=>a.deleteAchievement(n)}," 삭제 ",8,Er)])]))),128))])),a.achievementEditorOpen?(l(),i("div",Or,[(l(),xt(m,{key:a.achievementEditorKey,data:{achievement:a.editingAchievement,progressTypes:a.achievementProgressTypes,actionTypes:a.SUPPORTED_ACTIONS,onSaved:a.handleAchievementSaved},onClosePopup:a.closeAchievementEditor},null,8,["data","onClosePopup"]))])):c("",!0)])):c("",!0),a.activeTab==="effects"?(l(),i(b,{key:3},[a.form.revokeOnly?(l(),i("div",Vr,[...e[104]||(e[104]=[t("div",{class:"text-xs leading-standard font-weight-bold text-status-warning-foreground"}," 회수 전용 템플릿 (revokeOnly) ",-1),t("p",{class:"mt-1 text-xs leading-standard text-content-secondary"},[U(" 이 템플릿은 인벤토리 아이템을 생성하지 않으므로 보상 효과가 적용되지 않습니다."),t("br"),U("제한 설정 탭에서 배타적 액션태그 설정을 확인하세요. ")],-1)])])):c("",!0),t("div",Sr,[t("div",Ir,[e[105]||(e[105]=t("h3",{class:"font-weight-bold text-content-primary"},"보상 효과",-1)),t("button",{class:"rounded-8px bg-accent-default px-3 py-component-sm-tight text-xs leading-standard text-accent-content hover:opacity-strong disabled:opacity-faint",disabled:a.form.revokeOnly,onClick:e[38]||(e[38]=(...n)=>a.addEffect&&a.addEffect(...n))}," + 효과 추가 ",8,Mr)]),e[115]||(e[115]=t("p",{class:"mb-3 text-xs leading-standard text-content-secondary"}," 액션태그 사용 시 유저가 받을 보상을 설정하세요 (선택사항, 복수 설정 가능) ",-1)),a.form.effects.length===0?(l(),i("div",Dr," 효과를 추가해주세요 ")):(l(),i("div",Lr,[(l(!0),i(b,null,T(a.form.effects,(n,f)=>(l(),i("div",{class:"rounded-8px border border-border-strong bg-surface-interactive p-3",key:f},[t("div",Fr,[t("span",Nr,"효과 #"+g(f+1),1),t("button",{class:"text-content-secondary hover:text-status-danger-foreground",title:"삭제",onClick:o=>a.removeEffect(f)},[...e[106]||(e[106]=[t("svg",{class:"h-16px w-16px",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,Rr)]),t("div",Gr,[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":o=>n.effectType=o,onChange:o=>a.onEffectTypeChange(n)},[e[107]||(e[107]=t("option",{value:""},"효과 유형 선택",-1)),(l(!0),i(b,null,T(a.EFFECT_TYPES,o=>(l(),i("option",{key:o.value,value:o.value},g(o.icon)+" "+g(o.label),9,Br))),128))],40,jr),[[V,n.effectType]]),n.effectType==="coins"?(l(),i(b,{key:0},[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":o=>n.coinType=o},[(l(!0),i(b,null,T(a.COIN_TYPES,o=>(l(),i("option",{key:o.value,value:o.value},g(o.label),9,zr))),128))],8,Hr),[[V,n.coinType]]),u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.amount=o,placeholder:"수량"},null,8,Kr),[[h,n.amount,void 0,{number:!0}]])],64)):c("",!0),n.effectType==="model-discount"?(l(),i("div",Yr,[t("div",Wr,[u(t("input",{type:"number","onUpdate:modelValue":o=>n.discountPercent=o,min:"1",max:"100",class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",placeholder:"할인율"},null,8,qr),[[h,n.discountPercent,void 0,{number:!0}]]),e[108]||(e[108]=t("span",{class:"text-xs leading-standard text-content-secondary"},"% 할인",-1))]),u(t("input",{type:"text","onUpdate:modelValue":o=>n.targetModel=o,list:"aiModelsList",class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary placeholder:text-content-secondary",placeholder:"AI 모델 입력 (예: claude-4.5-sonnet)"},null,8,Qr),[[h,n.targetModel]]),t("datalist",Zr,[(l(!0),i(b,null,T(p.aiModelsList,o=>(l(),i("option",{key:o.type,value:o.type},g(o.name),9,Jr))),128))])])):c("",!0),n.effectType==="credits"?(l(),i(b,{key:2},[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":o=>n.creditType=o},[(l(!0),i(b,null,T(a.CREDIT_TYPES,o=>(l(),i("option",{key:o.value,value:o.value},g(o.label),9,$r))),128))],8,Xr),[[V,n.creditType]]),u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.amount=o,placeholder:"수량"},null,8,eo),[[h,n.amount,void 0,{number:!0}]])],64)):c("",!0),n.effectType==="subscription_days"?(l(),i(b,{key:3},[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.amount=o,placeholder:"일수"},null,8,to),[[h,n.amount,void 0,{number:!0}
3]]),e[109]||(e[109]=t("span",{class:"self-center text-xs leading-standard text-content-secondary"},"일",-1))],64)):c("",!0),n.effectType==="discount_percent"?(l(),i(b,{key:4},[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.amount=o,placeholder:"할인율",min:"1",max:"100"},null,8,ao),[[h,n.amount,void 0,{number:!0}]]),e[110]||(e[110]=t("span",{class:"self-center text-xs leading-standard text-content-secondary"},"%",-1))],64)):c("",!0),n.effectType==="inventory_item"?u((l(),i("input",{key:5,class:"rounded-8px flex-1 border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":o=>n.itemTemplate=o,placeholder:"아이템 템플릿 OID 또는 JSON"},null,8,no)),[[h,n.itemTemplate]]):c("",!0),n.effectType==="badge"?(l(),i("div",ro,[u(t("select",{class:"rounded-8px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary","onUpdate:modelValue":o=>n.badgeKey=o},[e[111]||(e[111]=t("option",{value:""},"뱃지 선택",-1)),(l(!0),i(b,null,T(a.enabledBadges,o=>(l(),i("option",{key:o.key,value:o.key},g(o.name)+" ("+g(o.key)+") ",9,so))),128))],8,oo),[[V,n.badgeKey]]),a.getSelectedBadge(n.badgeKey)?(l(),i("div",lo,[ne(I,{badge:a.getSelectedBadge(n.badgeKey),mode:"compact",size:20},null,8,["badge"]),t("code",io,g(n.badgeKey),1)])):c("",!0)])):c("",!0),n.effectType==="coin-discount"||n.effectType==="credit-discount"?(l(),i("div",co,[t("div",uo,[e[112]||(e[112]=t("span",{class:"text-xs leading-standard text-content-secondary"},"상품명 패턴 (와일드카드 지원)",-1)),u(t("input",{class:"rounded-8px font-mono border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"text","onUpdate:modelValue":o=>n.productNamePattern=o,placeholder:n.effectType==="coin-discount"?"b*_v2 (예: b50_v2, b100_v2...)":"credits-*-v2 (예: credits-600-v2...)"},null,8,go),[[h,n.productNamePattern]]),e[113]||(e[113]=t("span",{class:"text-xs leading-standard"},"* = 모든 문자, ? = 한 문자. 예: b*_v2, credits-*-v2",-1))]),t("div",mo,[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-raised px-3 py-2 text-xs leading-standard text-content-primary",type:"number","onUpdate:modelValue":o=>n.discountPercent=o,placeholder:"할인율",min:"1",max:"100"},null,8,vo),[[h,n.discountPercent,void 0,{number:!0}]]),e[114]||(e[114]=t("span",{class:"text-xs leading-standard text-content-secondary"},"% 할인",-1))])])):c("",!0)])]))),128))]))])],64)):c("",!0),a.activeTab==="limits"?(l(),i(b,{key:4},[t("div",po,[e[125]||(e[125]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"발급 제한",-1)),t("div",xo,[t("label",bo,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[39]||(e[39]=n=>a.usePerUserLimit=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,yo),[[w,a.usePerUserLimit]]),e[116]||(e[116]=U(" 유저당 발급 횟수 제한 ",-1))]),a.usePerUserLimit?(l(),i("div",fo,[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary",type:"number","onUpdate:modelValue":e[40]||(e[40]=n=>a.form.maxUsesPerUser=n),min:"1",disabled:a.form.triggerConditions.action==="achievement"},null,8,ho),[[h,a.form.maxUsesPerUser,void 0,{number:!0}]]),e[117]||(e[117]=t("span",{class:"text-xs leading-standard text-content-secondary"},"회",-1))])):c("",!0),a.form.triggerConditions.action==="achievement"?(l(),i("p",_o," 업적 보상은 사용자당 1회만 발급됩니다. ")):a.usePerUserLimit?c("",!0):(l(),i("p",Co," 무제한 — 액션 발생 시 매번 발급됩니다 ")),a.usePerUserLimit&&a.selectedActionInfo?.isMilestone?(l(),i("p",ko," ⚠️ 마일스톤 액션의 경우 각 임계값마다 1회씩 발급됩니다 ")):c("",!0)]),a.form.triggerConditions.action!=="achievement"?(l(),i("div",To,[t("label",wo,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[41]||(e[41]=n=>a.useGlobalMaxUses=n)},null,512),[[w,a.useGlobalMaxUses]]),e[118]||(e[118]=U(" 전체 발급 수량 제한 ",-1))]),a.useGlobalMaxUses?(l(),i("div",Ao,[u(t("input",{class:"rounded-8px w-120px border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary",type:"number","onUpdate:modelValue":e[42]||(e[42]=n=>a.form.globalMaxUses=n),min:"1"},null,512),[[h,a.form.globalMaxUses,void 0,{number:!0}]]),e[119]||(e[119]=t("span",{class:"text-xs leading-standard text-content-secondary"},"개 (전체 유저 합계)",-1))])):c("",!0)])):c("",!0),t("div",Uo,[e[124]||(e[124]=t("label",{class:"text-xs leading-standard text-content-secondary"},"발급된 액션태그 유효 기간",-1)),t("div",Po,[t("label",Eo,[u(t("input",{type:"radio",class:"accent-accent-default",value:"days","onUpdate:modelValue":e[43]||(e[43]=n=>
3a.couponExpiryMode=n)},null,512),[[te,a.couponExpiryMode]]),e[120]||(e[120]=t("span",{class:"text-xs leading-standard text-content-primary"},"기간 (일수)",-1))]),t("label",Oo,[u(t("input",{type:"radio",class:"accent-accent-default",value:"date","onUpdate:modelValue":e[44]||(e[44]=n=>a.couponExpiryMode=n)},null,512),[[te,a.couponExpiryMode]]),e[121]||(e[121]=t("span",{class:"text-xs leading-standard text-content-primary"},"만료 날짜",-1))])]),a.couponExpiryMode==="days"?(l(),i("div",Vo,[u(t("input",{class:"rounded-8px w-100px border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary",type:"number","onUpdate:modelValue":e[45]||(e[45]=n=>a.form.couponValidityDays=n),min:"1"},null,512),[[h,a.form.couponValidityDays,void 0,{number:!0}]]),e[122]||(e[122]=t("span",{class:"text-xs leading-standard text-content-secondary"},"일 (발급일로부터)",-1))])):(l(),i("div",So,[u(t("input",{class:"rounded-8px border border-border-strong bg-surface-interactive px-3 py-2 text-content-primary",type:"datetime-local","onUpdate:modelValue":e[46]||(e[46]=n=>a.couponExpiryDateLocal=n)},null,512),[[h,a.couponExpiryDateLocal]]),e[123]||(e[123]=t("span",{class:"text-xs leading-standard text-content-secondary"},"에 만료",-1))]))])]),t("div",Io,[e[129]||(e[129]=t("h3",{class:"mb-3 font-weight-bold text-content-primary"},"상태",-1)),t("div",Mo,[t("label",Do,[u(t("input",{class:"accent-accent-default h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[47]||(e[47]=n=>a.form.active=n)},null,512),[[w,a.form.active]]),e[126]||(e[126]=t("span",{class:"text-xs leading-standard text-content-primary"},"활성화",-1)),e[127]||(e[127]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(비활성화 시 액션태그가 발급되지 않음)",-1))]),t("label",Lo,[u(t("input",{class:"accent-status-caution-content h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[48]||(e[48]=n=>a.form.adminOnly=n)},null,512),[[w,a.form.adminOnly]]),e[128]||(e[128]=t("span",{class:"text-xs leading-standard text-content-primary"},"관리자 전용",-1)),t("span",Fo,g(a.form.triggerConditions.action==="achievement"?"(관리자 계정만 업적 노출·보상 수령 가능 - 내부 테스트용)":"(관리자 계정만 액션태그 발급 가능 - 내부 테스트용)"),1)])])]),t("div",No,[e[134]||(e[134]=t("h3",{class:"mb-3 font-weight-bold text-status-reward-content-strong"},"패시브 액션태그 설정",-1)),t("div",Ro,[t("label",Go,[u(t("input",{class:"accent-status-reward-content-strong h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[49]||(e[49]=n=>a.form.isPassive=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,jo),[[w,a.form.isPassive]]),e[130]||(e[130]=t("span",{class:"text-xs leading-standard text-content-primary"},"패시브 액션태그",-1)),e[131]||(e[131]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(자동 적용 - 유저가 수동 사용 불가)",-1))]),t("label",Bo,[u(t("input",{class:"accent-status-reward-content-strong h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[50]||(e[50]=n=>a.form.invisible=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,Ho),[[w,a.form.invisible]]),e[132]||(e[132]=t("span",{class:"text-xs leading-standard text-content-primary"},"인벤토리 숨김",-1)),e[133]||(e[133]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(유저의 인벤토리 목록에 표시하지 않음)",-1))]),a.form.triggerConditions.action==="achievement"?(l(),i("p",zo," 업적 보상은 인벤토리에서 직접 사용하는 공개 쿠폰으로 고정됩니다. ")):a.form.isPassive?(l(),i("p",Ko," 패시브 액션태그는 유저 로그인 시 자동으로 로드되어 결제/구매 시 자동 적용됩니다. coin-discount / credit-discount 효과와 함께 사용하세요. ")):c("",!0)])]),t("div",Yo,[e[136]||(e[136]=t("h3",{class:"mb-3 font-weight-bold text-status-danger-foreground"},"회수 전용 모드",-1)),t("label",Wo,[u(t("input",{class:"accent-status-danger-foreground h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[51]||
3(e[51]=n=>a.form.revokeOnly=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,qo),[[w,a.form.revokeOnly]]),e[135]||(e[135]=t("span",{class:"text-xs leading-standard text-content-primary"},"회수 전용 (revokeOnly)",-1))]),e[137]||(e[137]=t("p",{class:"mt-2 text-xs leading-standard text-content-secondary"},[U(" 인벤토리 아이템을 생성하지 않고 배타적 액션태그 회수만 실행합니다."),t("br"),U(" 아래 배타적 액션태그 설정과 함께 사용하세요. ")],-1))]),t("div",Qo,[e[145]||(e[145]=t("h3",{class:"mb-3 font-weight-bold text-status-warning-foreground"},"배타적 액션태그 설정",-1)),t("label",Zo,[u(t("input",{class:"accent-status-warning-foreground h-16px w-16px",type:"checkbox","onUpdate:modelValue":e[52]||(e[52]=n=>a.useExclusion=n),disabled:a.form.triggerConditions.action==="achievement"},null,8,Jo),[[w,a.useExclusion]]),e[138]||(e[138]=t("span",{class:"text-xs leading-standard text-content-primary"},"배타적 액션태그 사용",-1)),e[139]||(e[139]=t("span",{class:"text-xs leading-standard text-content-secondary"},"(발급 시 다른 액션태그를 자동 회수)",-1))]),a.useExclusion?(l(),i("div",Xo,[t("div",$o,[e[140]||(e[140]=t("label",{class:"text-xs leading-standard text-status-warning-content-subtle"},"배타 그룹 (exclusionGroup)",-1)),u(t("input",{class:"rounded-8px font-mono outline-none border border-status-warning-emphasis/disabled bg-surface-interactive px-3 py-2 text-xs leading-standard text-content-primary placeholder:text-content-secondary focus:border-status-warning-foreground",type:"text","onUpdate:modelValue":e[53]||(e[53]=n=>a.form.exclusionGroup=n),placeholder:"예: welcome-bonus, first-charge-promo"},null,512),[[h,a.form.exclusionGroup]]),e[141]||(e[141]=t("p",{class:"text-xs leading-standard text-content-secondary"},[U(" 같은 그룹명을 가진 템플릿끼리 상호 배타 — 유저당 그룹 내 1개만 유지됩니다. "),t("br"),U("영문, 숫자, 하이픈, 언더스코어만 사용 가능 (예: welcome-bonus) ")],-1))]),t("div",es,[e[143]||(e[143]=t("label",{class:"text-xs leading-standard text-status-warning-content-subtle"},"발급 시 회수할 템플릿 (revokeTemplateOids)",-1)),e[144]||(e[144]=t("p",{class:"mb-1 text-xs leading-standard text-content-secondary"}," 이 액션태그 발급 시 유저가 보유한 아래 템플릿의 미사용 액션태그를 자동 회수합니다. ",-1)),a.form.revokeTemplateOids.length>0?(l(),i("div",ts,[(l(!0),i(b,null,T(a.form.revokeTemplateOids,n=>(l(),i("span",{class:"inline-flex items-center gap-1 rounded-pill border border-status-warning-emphasis/disabled bg-status-warning-emphasis/very-low px-component-sm-roomy py-1 text-xs leading-standard text-status-warning-content-subtle",key:n},[U(g(a.getTemplateName(n))+" ",1),t("button",{class:"text-status-warning-foreground hover:text-status-danger-foreground",onClick:f=>a.toggleRevokeTemplate(n)},[...e[142]||(e[142]=[t("svg",{class:"h-12px w-12px",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,as)]))),128))])):c("",!0),t("div",ns,[a.availableTemplatesForRevoke.length===0?(l(),i("div",rs," 선택 가능한 템플릿이 없습니다 ")):c("",!0),(l(!0),i(b,null,T(a.availableTemplatesForRevoke,n=>(l(),i("label",{class:N(["flex cursor-pointer items-center gap-2 border-b border-border-strong px-3 py-2 transition-colors last:border-b-0",a.form.revokeTemplateOids.includes(n._id)?"bg-status-warning-emphasis/minimal":"hover:bg-surface-interactive"]),key:n._id},[t("input",{class:"accent-status-warning-foreground h-14px w-14px",type:"checkbox",checked:a.form.revokeTemplateOids.includes(n._id),onChange:f=>a.toggleRevokeTemplate(n._id)},null,40,os),t("div",ss,[t("div",ls,g(n.name),1),t("div",is,[t("code",ds,g(n._id),1),n.exclusionGroup?(l(),i("span",cs,g(n.exclusionGroup),1)):c("",!0),n.active?c("",!0):(l(),i("span",us," 비활성 "))])])],2))),128))])])])):c("",!0)])],64)):c("",!0)]),a.activeTab!=="achievementQueries"?(l(),i("div",gs,[e[146]||(e[146]=t("h4",{class:"mb-2 text-xs leading-standard font-weight-bold text-content-secondary"},"미리보기",-1)),t("div",ms,[a.imagePreviewUrl?(l(),i("img",{key:0,class:"rounded-8px h-48px w-48px object-cover",src:a.imagePreviewUrl,onError:e[54]||(e[54]=(...n)=>a.onImageError&&a.onImageError(...n))},null,40,vs)):(l(),i("div",ps," 🎁 ")),t("div",xs,[t("div",bs,g(a.form.multiLangName.ko||a.form.name||"(이름 없음)"),1),t("div",ys,g(a.form.multiLangDescription.ko||"(설명 없음)"),1),a.form.triggerConditions.action?(l(),i("div",fs," 트리거: "+g(a.form.triggerConditions.action),1)):c("",!0)]),t("div",hs,[(l(!0),i(b,null,T(a.form.effects.slice(0,2),
3(n,f)=>(l(),i("div",{class:"text-xs leading-standard text-status-success-foreground",key:f},g(a.formatEffectPreview(n)),1))),128)),a.form.effects.length>2?(l(),i("div",_s," +"+g(a.form.effects.length-2)+" more ",1)):c("",!0)])])])):c("",!0),a.activeTab!=="achievementQueries"&&a.validationErrors.length>0?(l(),i("div",Cs,[e[147]||(e[147]=t("div",{class:"mb-1 text-xs leading-standard font-weight-bold text-status-danger-foreground"},"입력 오류",-1)),t("ul",ks,[(l(!0),i(b,null,T(a.validationErrors,(n,f)=>(l(),i("li",{key:f},g(n),1))),128))])])):c("",!0),a.activeTab!=="achievementQueries"?(l(),i("div",Ts,[t("button",{class:"rounded-8px bg-accent-default px-4 py-2 text-accent-content hover:opacity-strong disabled:opacity-disabled",disabled:a.isSaving||!a.isValid||a.form.triggerConditions.action==="achievement"&&a.isLoadingAchievements,onClick:e[55]||(e[55]=(...n)=>a.save&&a.save(...n))},g(a.isSaving?"저장 중...":a.isEditing?"수정":"생성"),9,ws)])):c("",!0)])])}var Ns=Ge(pa,[["render",As]]);export{Ns 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.