1import{_ as m,h as p,i,a as _,j as b,y as g,k as e,l as h,t as r,v,aI as y,D as f}from"./index-DFml-R5b.js";import{r as k}from"./UserProfilePanel-B5Q_F1hE.js";import{E as n}from"./index-BNhYrLC0.js";import"./el-form-item-Dy6gyuzi.js";import"./castArray-BRYzdRb4.js";import"./_initCloneObject-D6C9_oIB.js";/* empty css */import"./copyText-C4a2Bjd3.js";import"./el-table-column-DL3IUxWR.js";import"./el-scrollbar-CJnmOxI2.js";/* empty css */import"./GitHubLogin-BKF7ey7B.js";import"./encrypt-BUDYPa_s.js";import"./date-BjT26n3o.js";import"./wechat-CEt1Q7qo.js";const x={class:"min-h-[60vh] flex items-center justify-center"},w={class:"max-w-md w-full"},$={class:"redeem-card rounded-2xl p-10"},C={class:"space-y-4"},B={for:"cardCode",class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"},I=["placeholder","disabled"],K=["disabled"],M={class:"mt-6 text-xs text-gray-500 dark:text-gray-400"},R={class:"font-medium mb-2"},z={class:"list-decimal list-inside space-y-1 ml-4"},D={class:"mt-4 p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg border border-blue-200 dark:border-blue-800"},E={class:"text-blue-700 dark:text-blue-300 text-xs"},S={__name:"KeyCodeRedemption",setup(T){const{t:d}=p(),s=i(""),o=i(!1),c=_(),l=async()=>{if(!s.value.trim()){n.warning(d("redeem_warning"));return}o.value=!0;try{const t={key:s.value,userId:c.id};await k(t),n.success(d("redeem_success")),s.value=""}catch(t){console.log(t)}finally{o.value=!1}};return(t,a)=>(g(),b("div",x,[e("div",w,[e("div",$,[e("div",C,[e("div",null,[e("label",B,r(t.$t("redeem_card_code")),1),h(e("input",{id:"cardCode","onUpdate:modelValue":a[0]||(a[0]=u=>s.value=u),type:"text",placeholder:t.$t("redeem_card_code"),class:"w-full px-3 py-2.5 border border-gray-300 dark:border-gray-600 rounded-lg focus:ring-2 focus:ring-black dark:focus:ring-white focus:border-transparent bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 text-sm",disabled:o.value,onKeyup:y(l,["enter"])},null,40,I),[[v,s.value,void 0,{trim:!0}]])]),e("button",{onClick:l,disabled:o.value,class:"w-full px-4 py-2.5 bg-black dark:bg-white text-white dark:text-black rounded-lg font-medium hover:bg-gray-800 dark:hover:bg-gray-200 transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed"},r(o.value?t.$t("redeem_in_progress"):t.$t("redeem_button_text")),9,K)]),e("div",M,[e("h3",R,r(t.$t("instructions_title")),1),e("ol",z,[e("li",null,r(t.$t("instructions_list_first")),1),e("li",null,r(t.$t("instructions_list_second")),1),e("li",null,r(t.$t("instructions_list_third")),1),e("li",null,r(t.$t("instructions_list_fourth")),1)]),e("div",D,[e("p",E,[a[1]||(a[1]=e("svg",{class:"w-4 h-4 inline mr-1",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z","clip-rule":"evenodd"})],-1)),f(" "+r(t.$t("redemptionRecordTip")),1)])])])])])]))}},X=m(S,[["__scopeId","data-v-41724076"]]);export{X 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.