PageSourceSearch

https://cdn.wisgate.ai/wisgate/_nuxt/Blg1ljwY.js

js wisgate.ai collected 2026-10-04 13:25:45 UTC 40,230 bytes, 1 lines download raw bytes

vendor: 4,580 bytes, line 1
1import Ze from"./B1Rf_HE1.js";import{d as We,u as Xe,U as et,a as P,r as b,I as tt,v as st,i as Te,j as m,o as d,k as u,m as r,K as p,N as ae,af as lt,G as at,l as e,p as i,q as h,s as y,F as D,x as N,c as I,E as q,ae as ot,M as k,y as je,e as me,t as it,ag as nt,ah as rt,ai as dt,aj as ut,ak as ct,al as mt}from"./DZ7mik94.js";import oe from"./M164V7hc.js";import F from"./CcjRpxp1.js";import pt from"./COJFURLF.js";import vt from"./B31PNEW8.js";import ie from"./CW7yqrCv.js";import A from"./7yo0LTZ4.js";import xt from"./C_R9b47F.js";import{g as _t}from"./Lmt8mlL8.js";import{e as ft,a as bt}from"./C_HCVPZZ.js";import{g as pe}from"./DXDH8whQ.js";import{_ as ee}from"./BDcM2FMb.js";import{H as ht,a as gt}from"./BacmjrzH.js";import{i as Ne,b as yt,r as _e,d as kt}from"./CIZylvxh.js";import"./CDAiuzJL.js";import"./lugWVUni.js";import"./CFmxRTIl.js";import"./Cu8igjOL.js";import"./Du7nxuHz.js";import"./CnnAWtRi.js";import"./rSTlLCgx.js";import"./BZKu3Cxi.js";import"./B6bz1XqG.js";import"./Cky70c8k.js";import"./B-T_MQ6L.js";import"./v22BJWT9.js";import"./DGpUZ0d1.js";import"./CI_W-t5K.js";import"./CK69QeyS.js";import"./Bngt7IOy.js";import"./uI37vTtg.js";import"./DDY6rDHF.js";import"./CkncaXhN.js";import"./C1qMvYzb.js";import"./BxYReGA1.js";import"./DXgfVhBd.js";import"./CmG3zTr9.js";import"./CrntA7hl.js";import"./mNahu1yw.js";import"./d6--TbHR.js";import"./DPwV76yq.js";import"./1CRgFJIK.js";import"./D7bbJmtS.js";import"./GefESYmt.js";import"./0J-1uiXP.js";import"./Ci2gcBr-.js";import"./Y2uuUinc.js";import"./Dvp_0FNl.js";var wt="[object AsyncFunction]",$t="[object Function]",qt="[object GeneratorFunction]",Ct="[object Proxy]";function Vt(l){if(!Ne(l))return!1;var o=yt(l);return o==$t||o==qt||o==wt||o==Ct}var ve=_e["__core-js_shared__"],De=(function(){var l=/[^.]+$/.exec(ve&&ve.keys&&ve.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})();function zt(l){return!!De&&De in l}var Tt=Function.prototype,jt=Tt.toString;function Dt(l){if(l!=null){try{return jt.call(l)}catch{}try{return l+""}catch{}}return""}var Nt=/[\\^$.*+?()[\]{}|]/g,St=/^\[object .+?Constructor\]$/,It=Function.prototype,Ft=Object.prototype,Ut=It.toString,Et=Ft.hasOwnProperty,Ot=RegExp("^"+Ut.call(Et).replace(Nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ht(l){if(!Ne(l)||zt(l))return!1;var o=Vt(l)?Ot:St;return o.test(Dt(l))}function Mt(l,o){return l?.[o]}function fe(l,o){var n=Mt(l,o);return Ht(n)?n:void 0}function Pt(){}function At(l,o,n,v){for(var C=l.length,T=n+-1;++T<C;)if(o(l[T],T,l))return T;return-1}function Lt(l){return l!==l}function Rt(l,o,n){for(var v=n-1,C=l.length;++v<C;)if(l[v]===o)return v;return-1}function Gt(l,o,n){return o===o?Rt(l,o,n):At(l,Lt,n)}function Kt(l,o){var n=l==null?0:l.length;return!!n&&Gt(l,o,0)>-1}function Bt(l,o){return l===o||l!==l&&o!==o}var te=fe(Object,"create");function Yt(){this.__data__=te?te(null):{},this.size=0}function Jt(l){var o=this.has(l)&&delete this.__data__[l];return this.size-=o?1:0,o}var Qt="__lodash_hash_undefined__",Zt=Object.prototype,Wt=Zt.hasOwnProperty;function Xt(l){var o=this.__data__;if(te){var n=o[l];return n===Qt?void 0:n}return Wt.call(o,l)?o[l]:void 0}var es=Object.prototype,ts=es.hasOwnProperty;function ss(l){var o=this.__data__;return te?o[l]!==void 0:ts.call(o,l)}var ls="__lodash_hash_undefined__";function as(l,o){var n=this.__data__;return this.size+=this.has(l)?0:1,n[l]=te&&o===void 0?ls:o,this}function O(l){var o=-1,n=l==null?0:l.length;for(this.clear();++o<n;){var v=l[o];this.set(v[0],v[1])}}O.prototype.clear=Yt;O.prototype.delete=Jt;O.prototype.get=Xt;O.prototype.has=ss;O.prototype.set=as;function os(){this.__data__=[],this.size=0}function re(l,o){for(var n=l.length;n--;)if(Bt(l[n][0],o))return n;return-1}var is=Array.prototype,ns=is.splice;function rs(l){var o=this.__data__,n=re(o,l);if(n<0)return!1;var v=o.length-1;return n==v?o.pop():ns.call(o,n,1),--this.size,!0}function ds(l){var o=this.__data__,n=re(o,l);return n<0?void 0:o[n][1]}function us(l){return re(this.__data__,l)>-1}function cs(l,o){var n=this.__data__,v=re(n,l);return v<0?(++this.size,n.push([l,o])):n[v][1]=o,this}function L(l){var o=-1,n=l==null?0:l.length;for(this.clear();++o<n;){var v=l[o];this.set(v[0],v[1])}}L.prototype.clear=os;L.prototype.delete=rs;L.prototype.get=ds;L.prototype.has=us;L.prototype.set=cs;var ms=fe(_e,"Map");function ps(){this.size=0,this.__data__={hash:new O,map:new(ms||L),string:new O}}function vs(l){var o=typeof l;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?l!=="__proto__":l===null}function de(l,o){var n=l.__data__;
1return vs(o)?n[typeof o=="string"?"string":"hash"]:n.map}function xs(l){var o=de(this,l).delete(l);return this.size-=o?1:0,o}function _s(l){return de(this,l).get(l)}function fs(l){return de(this,l).has(l)}function bs(l,o){var n=de(this,l),v=n.size;return n.set(l,o),this.size+=n.size==v?0:1,this}function R(l){var o=-1,n=l==null?0:l.length;for(this.clear();++o<n;){var v=l[o];this.set(v[0],v[1])}}R.prototype.clear=ps;R.prototype.delete=xs;R.prototype.get=_s;R.prototype.has=fs;R.prototype.set=bs;var xe=fe(_e,"Set"),hs="__lodash_hash_undefined__";function gs(l){return this.__data__.set(l,hs),this}function ys(l){return this.__data__.has(l)}function ne(l){var o=-1,n=l==null?0:l.length;for(this.__data__=new R;++o<n;)this.add(l[o])}ne.prototype.add=ne.prototype.push=gs;ne.prototype.has=ys;function ks(l,o){return l.has(o)}function Se(l){var o=-1,n=Array(l.size);return l.forEach(function(v){n[++o]=v}),n}var ws=1/0,$s=xe&&1/Se(new xe([,-0]))[1]==ws?function(l){return new xe(l)}:Pt,qs=200;function Cs(l,o,n){var v=-1,C=Kt,T=l.length,S=!0,V=[],g=V;if(T>=qs){var j=$s(l);if(j)return Se(j);S=!1,C=ks,g=new ne}else g=V;e:for(;++v<T;){var z=l[v],w=z;if(z=z!==0?z:0,S&&w===w){for(var H=g.length;H--;)if(g[H]===w)continue e;V.push(z)}else C(g,w,n)||(g!==V&&g.push(w),V.push(z))}return V}function Vs(l){return l&&l.length?Cs(l):[]}const zs={class:"h-full font-sans"},Ts={class:"hidden md:inline"},js={class:"hidden md:flex items-center gap-1.5"},Ds={class:"hidden md:inline"},Ns={class:"flex items-center gap-1.5 group"},Ss={class:"text-xs font-medium text-slate-700"},Is=["onClick"],Fs=["onClick","title"],Us={class:"font-mono text-xs truncate"},Es=["onClick"],Os={key:0,class:"flex flex-wrap gap-1"}
1,Hs={key:0,class:"inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-slate-100 text-slate-500"},Ms={key:1,class:"text-xs text-slate-400"},Ps={key:0,class:"flex items-center gap-1 text-emerald-600 font-medium text-xs"},As={key:1},Ls={class:"flex items-center gap-1.5"},Rs={class:"w-14 bg-slate-100 rounded-full h-1.5 overflow-hidden"},Gs={class:"text-xs text-slate-600 tabular-nums"},Ks={class:"text-xs text-slate-500 tabular-nums"},Bs=["onClick"],Ys={class:"text-center py-16"},Js={class:"text-xl font-bold text-slate-900 mb-2"},Qs={class:"text-slate-500 max-w-md mx-auto mb-8"},Zs={class:"space-y-4 md:space-y-5"},Ws={class:"grid gap-3"},Xs=["onClick"],el={class:"flex items-center gap-1.5 md:gap-2 mb-1"},tl={class:"text-xs md:text-sm font-bold text-slate-800 truncate"},sl={key:1,class:"inline-flex items-center px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-emerald-50 text-emerald-600 shrink-0"},ll={key:2,class:"pi pi-check-circle text-emerald-500 text-sm ml-auto shrink-0"},al={class:"text-[11px] md:text-xs text-slate-400 mb-0.5 pl-5 md:pl-6"},ol={class:"list-disc list-inside text-[10px] md:text-[11px] text-slate-400/70 mb-2.5 md:mb-3 pl-5 md:pl-6 space-y-0.5"},il={class:"flex flex-col gap-1.5 pl-0 md:pl-6"},nl=["onClick"],rl={class:"text-[11px] md:text-xs text-slate-600 font-mono flex-1 truncate"},dl=["onClick"],ul={class:"text-[11px] md:text-xs text-slate-600 font-mono flex-1 truncate"},cl={class:"flex items-center flex-wrap gap-x-2 gap-y-0.5 px-1 mb-2"},ml={class:"text-[11px] text-slate-400 hidden md:inline"},pl={class:"flex items-center gap-1.5 px-1 mb-1.5"},vl={class:"text-[11px] font-semibold text-slate-400 uppercase tracking-wider"},xl={class:"rounded-xl border border-slate-100 bg-slate-50/50 divide-y divide-slate-100"},_l=["onClick"],fl={class:"flex-1 min-w-0"},bl={class:"flex items-center gap-2 md:gap-3"},hl={class:"text-xs font-medium text-slate-600 shrink-0"},gl={class:"text-[11px] md:text-xs text-slate-400 font-mono truncate hidden md:inline"},yl={class:"text-[11px] text-slate-400 font-mono truncate block md:hidden mt-0.5"},kl={class:"flex items-center justify-between gap-2"},wl={class:"text-[11px] text-slate-400 flex items-center gap-1 md:hidden"},$l={class:"flex gap-2 ml-auto"},ql={class:"space-y-5"},Cl={class:"space-y-1.5"},Vl={class:"text-sm font-bold text-slate-700"},zl={class:"rounded-xl bg-slate-50/50 border border-slate-100 p-4 space-y-3"},Tl={class:"flex items-center gap-2.5"},jl={class:"text-sm font-bold text-slate-900"},Dl={class:"flex items-center space-x-3"},Nl={for:"edit_unlimited",class:"text-sm text-slate-600"},Sl={key:0,class:"space-y-2.5"},Il={class:"text-xs font-medium text-slate-500"},Fl={class:"flex items-center gap-2"},Ul={class:"text-xs text-slate-500 tabular-nums font-mono whitespace-nowrap"},El={class:"flex flex-wrap gap-1.5"},Ol=["onClick"],Hl={class:"rounded-xl bg-slate-50/50 border border-slate-100 p-4 space-y-3"},Ml={class:"flex items-center gap-2.5"},Pl={class:"text-sm font-bold text-slate-900"},Al={class:"text-xs text-slate-400"},Ll={class:"max-h-56 overflow-y-auto rounded-lg bg-white border border-slate-100 divide-y divide-slate-100"},Rl={class:"flex items-center gap-1.5 mb-2"},Gl={class:"text-[11px] font-semibold text-slate-400 uppercase tracking-wider"},Kl={class:"grid grid-cols-1 sm:grid-cols-2 gap-1 pl-5"},Bl=["for","title"],Yl={class:"rounded-xl bg-slate-50/50 border border-slate-100 p-4 space-y-3"},Jl={class:"flex items-center gap-2.5"},Ql={class:"text-sm font-bold text-slate-900"},Zl={class:"space-y-1.5"},Wl={class:"text-xs font-medium text-slate-500"},Xl={class:"text-xs text-slate-400"},ea={class:"flex justify-end gap-2.5"},ta={class:"space-y-5"},sa={class:"space-y-1.5"},la={class:"text-sm font-bold text-slate-700"},aa={class:"space-y-1.5"},oa={class:"text-sm font-bold text-slate-700"},ia={key:0,class:"mt-2"},na={class:"rounded-xl bg-slate-50/50 border border-slate-100 p-4 space-y-3"},ra={class:"flex items-center gap-2.5"},da={class:"text-sm font-bold text-slate-900"},ua={class:"flex items-center space-x-3"},ca={for:"create_unlimited",class:"text-sm text-slate-600"},ma={key:0,class:"space-y-2.5"},pa={class:"text-xs font-medium text-slate-500"},va={class:"flex items-center gap-2"},xa={class:"text-xs text-slate-500 tabular-nums font-mono whitespace-nowrap"},_a={class:"flex flex-wrap gap-1.5"},fa=["onClick"],ba={class:"rounded-xl bg-slate-50/50 border border-slate-100 p-4 space-y-3"},ha={class:"flex items-center gap-2.5"},ga={class:"text-sm font-bold text-slate-900"},ya={class:"text-xs text-slate-400"}
1,ka={class:"max-h-56 overflow-y-auto rounded-lg bg-white border border-slate-100 divide-y divide-slate-100"},wa={class:"flex items-center gap-1.5 mb-2"},$a={class:"text-[11px] font-semibold text-slate-400 uppercase tracking-wider"},qa={class:"grid grid-cols-1 sm:grid-cols-2 gap-1 pl-5"},Ca=["for","title"],Va={class:"rounded-xl bg-slate-50/50 border border-slate-100 p-4 space-y-3"},za={class:"flex items-center gap-2.5"},Ta={class:"text-sm font-bold text-slate-900"},ja={class:"space-y-1.5"},Da={class:"text-xs font-medium text-slate-500"},Na={class:"text-xs text-slate-400"},Sa={class:"flex justify-end gap-2.5"},Ia={class:"text-center space-y-4"},Fa={class:"text-sm text-slate-700 font-medium"},Ua={class:"text-xs text-slate-400 mt-1"},Ea={class:"flex justify-end gap-2.5"},Uo=We({__name:"index",setup(l){const{t:o,locale:n}=Xe();et(P(()=>_t(o).hallTokens));const v=P(()=>bt.map(t=>({...t,desc:o(t.descKey),advantages:t.advantagesKeys.map(a=>o(a))}))),C=b(""),T=async(t,a)=>{try{await navigator.clipboard.writeText(t),C.value=a,setTimeout(()=>{C.value=""},2e3)}catch($){console.error("Failed to copy endpoint URL:",$)}},S=b([]),V=b(!1),g=b(""),j=tt(),z=b(!1),w=b("wisgate"),H=P(()=>v.value.find(t=>t.id===w.value)||v.value[0]),G=b(""),K=b(!1),B=b(!1),f=b({is_edit:!1,name:"",remain_quota:5e5,expired_time:-1,unlimited_quota:!1,allow_ips:"",model_limits:""}),Y=b(!1),J=b(!1),ue=b(null),_=b({is_edit:!0,name:"",remain_quota:5e5,expired_time:-1,unlimited_quota:!1,allow_ips:"",model_limits:""}),Q=b(!1),Z=b(!1),ce=b(null),be=b(""),x=b({}),he=b([]);kt(()=>{ct().then(t=>{he.value=Vs(t.map(a=>a))})},300)();const se=b([]),le=b([]),ge=P(()=>{const t={};for(const a of he.value){const $=pe(a),s=$?.name||"Other";t[s]||(t[s]={name:s,svg:$?.svg||"",models:[]}),t[s].models.push(a)}return Object.values(t)}),Ie=P(()=>[{label:o("tokens.never_expires"),value:-1},{label:o("tokens.expiry.1_month"),value:30},{label:o("tokens.expiry.3_months"),value:90},{label:o("tokens.expiry.6_months"),value:180},{label:o("tokens.expiry.1_year"),value:365},{label:o("tokens.expiry.custom"),value:0}]),U=b(-1),W=b(null),ye=P(()=>[{value:5e5,label:"1$"},{value:5e6,label:"10$"},{value:25e6,label:"50$"},{value:5e7,label:"100$"},{value:25e7,label:"500$"},{value:5e8,label:"1000$"}]),Fe=t=>{switch(t){case 1:return o("tokens.active");case 2:return o("tokens.disabled");default:return"Unknown"}},ke=t=>t===-1?o("tokens.never_expires"):new Date(t*1e3).toLocaleString(n.value),we=t=>`$${me(t).toFixed(2)}`,$e=(t,a,$)=>{const s=a+t;return s<=0?0:Math.round(a/s*100)},Ue=t=>t===100?"text-green-500 bg-green-500":t<=10?"text-red-500 bg-red-500":t<=30?"text-orange-500 bg-orange-500":"bg-blue-500",Ee=t=>t.length<=8?t:"sk-"+t.substring(0,4)+"****"+t.substring(t.length-4),X=t=>(t||"").split(",").filter(a=>a.trim()),E=async()=>{try{V.value=!0;const t=g.value?await lt(g.value,{page:1,page_size:9999}):await at({page:1,page_size:9999});t&&Array.isArray(t.items)?S.value=t.items:S.value=[]}catch(t){console.error("Failed to fetch tokens:",t),S.value=[]}finally{V.value=!1}},Oe=()=>{E()},qe=()=>{g.value="",E()},He=async(t,a)=>{try{await navigator.clipboard.writeText(t),it("hall_tokens"),Te().$wisdomAnalytics?.track("api_key_copied",{source:"hall_tokens"}),G.value=a,setTimeout(()=>{G.value===a&&(G.value="")},1500)}catch($){console.error("Failed to copy to clipboard:",$)}},Me=async t=>{try{const a=t.status===1?2:1;await nt({id:t.id,status:a});const $=S.value.findIndex(s=>s.id===t.id);$!==-1&&(S.value[$].status=a),j.add({severity:"success",summary:o("tokens.toast.success"),detail:o(a===1?"tokens.toast.token_enabled":"tokens.toast.token_disabled"),life:3e3})}catch(a){console.error("Failed to toggle token status:",a),j.add({severity:"error",summary:o("tokens.toast.error"),detail:o("tokens.toast.status_failed"),life:3e3})}},Ce=()=>{Pe(),K.value=!0},Pe=()=>{f.value={is_edit:!1,name:"",remain_quota:5e5,expired_time:-1,unlimited_quota:!1,allow_ips:"",model_limits:""},se.value=[],U.value=-1,W.value=null,x.value={}},Ae=()=>(x.value={},f.value.name.trim()||(x.value.name=o("tokens.validation.name_required")),!f.value.unlimited_quota&&(Number(f.value.remain_quota)<=0||isNaN(Number(f.value.remain_quota)))&&(x.value.remain_quota=o("tokens.validation.quota_invali
1d")),f.value.allow_ips&&Ve(f.value.allow_ips),Object.keys(x.value).length===0),Le=()=>(x.value={},_.value.name.trim()||(x.value.name=o("tokens.validation.name_required")),!_.value.unlimited_quota&&(Number(_.value.remain_quota)<=0||isNaN(Number(_.value.remain_quota)))&&(x.value.remain_quota=o("tokens.validation.quota_invalid")),_.value.allow_ips&&Ve(_.value.allow_ips),Object.keys(x.value).length===0),Ve=t=>!0,Re=()=>{if(U.value===-1)f.value.expired_time=-1;else if(U.value===0)W.value&&(f.value.expired_time=Math.floor(W.value.getTime()/1e3));else{const t=new Date,a=new Date(t.getTime()+U.value*24*60*60*1e3);f.value.expired_time=Math.floor(a.getTime()/1e3)}},Ge=()=>{f.value.model_limits=se.value.join(",")},Ke=async()=>{if(Re(),Ge(),!!Ae())try{B.value=!0;const t={...f.value,remain_quota:Number(f.value.remain_quota)};await rt(t),K.value=!1,await E(),j.add({severity:"success",summary:o("tokens.toast.success"),detail:o("tokens.toast.create_success"),life:3e3})}catch(t){console.error("Failed to create token:",t),j.add({severity:"error",summary:o("tokens.toast.error"),detail:t.response?.data?.message||o("tokens.toast.create_failed"),life:5e3})}finally{B.value=!1}},Be=async()=>{if(ue.value&&(_.value.model_limits=le.value.join(","),!!Le()))try{J.value=!0;const t={id:ue.value.id,name:_.value.name,unlimited_quota:_.value.unlimited_quota,remain_quota:Number(_.value.remain_quota),expired_time:_.value.expired_time,allow_ips:_.value.allow_ips,model_limits:_.value.model_limits,model_limits_enabled:_.value.model_limits.length>0};await dt(t),Y.value=!1,await E(),j.add({severity:"success",summary:o("tokens.toast.success"),detail:o("tokens.toast.update_success"),life:3e3})}catch(t){console.error("Edit token error:",t),j.add({severity:"error",summary:o("tokens.toast.error"),detail:t.response?.data?.message||o("tokens.toast.update_failed"),life:5e3})}finally{J.value=!1}},Ye=async()=>{if(ce.value){Z.value=!0;try{await ut(ce.value),j.add({severity:"success",summary:o("tokens.toast.success"),detail:o("tokens.toast.delete_success"),life:3e3}),Q.value=!1,await E()}catch(t){console.error("Delete token error:",t),j.add({severity:"error",summary:o("tokens.toast.error"),detail:t.response?.data?.message||o("tokens.toast.delete_failed"),life:5e3})}finally{Z.value=!1}}},Je=t=>{ue.value=t,_.value={is_edit:!0,name:t.name,remain_quota:t.unlimited_quota?5e5:t.remain_quota,expired_time:t.expired_time,unlimited_quota:t.unlimited_quota,allow_ips:t.allow_ips||"",model_limits:t.model_limits||""},le.value=X(t.model_limits),Y.value=!0,x.value={}},Qe=t=>{ce.value=t.id,be.value=t.name,Q.value=!0};mt();function ze(){window.open("https://docs.wisgate.ai/","_blank")}return st(()=>{Te().$wisdomAnalytics?.trackOnce("api_key_page_viewed"),E()}),(t,a)=>{const $=Ze;return d(),m("div",zs,[u(r(xt)),u(ht,{data:S.value,loading:V.value,total:S.value.length,paginated:!1},{search:p(()=>[u(gt,{searchValue:g.value,"onUpdate:searchValue":a[2]||(a[2]=s=>g.value=s),searchPlaceholder:t.$t("tokens.search_placeholder"),loading:V.value,onSearch:Oe,onReset:qe},{actions:p(()=>[u(r(k),{onClick:E,loading:V.value,size:"small",class:"!size-[30px] md:!size-auto !min-w-0 !p-0 md:!px-3 md:!py-0 md:!h-[34px] !text-xs !font-medium !rounded-lg !bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 inline-flex items-center justify-center"},{default:p(()=>[a[24]||(a[24]=e("i",{class:"pi pi-refresh text-xs md:mr-1.5"},null,-1)),e("span",Ts,i(t.$t("tokens.refresh")),1)]),_:1},8,["loading"]),a[29]||(a[29]=e("div",{class:"w-px h-5 bg-slate-200 mx-1"},null,-1)),u(r(k),{onClick:a[0]||(a[0]=s=>z.value=!0),size:"small",class:"md:!hidden !size-[30px] !min-w-0 !p-0 !rounded-lg !bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 inline-flex items-center justify-center"},{default:p(()=>[...a[25]||(a[25]=[e("i",{class:"pi pi-globe text-xs"},null,-1)])]),_:1}),e("div",js,[u(r(k),{onClick:a[1]||(a[1]=s=>z.value=!0),size:"small",class:"!min-w-0 !px-3 !py-0 !h-[34px] !text-xs !font-medium !rounded-lg !bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 inline-flex items-center justify-center"},{default:p(()=>[a[26]||(a[26]=e("i",{class:"pi pi-globe text-xs mr-1.5"},null,-1)),q(" "+i(t.$t("tokens.endpoints.title")),1)]),_:1}),u(r(k),{onClick:ze,size:"small",class:"!min-w-0 !px-3 !py-0 !h-[34px] !text-xs !font-medium !rounded-lg !bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 inline-flex items-center justify-center"},{default:p(()=>[a[27]||(a[27]=e("i",{class:"pi pi-file text-xs mr-1.5"},null,-1)),q(" "+i(t.$t("tokens.api_ref")),1)]),_:1})]),u(r(k),{onClick:Ce,size:"small",class:"!size-[30px] md:!size-auto !min-w-0 !p-0 md:!px-4 md:!py-0 md:!h-[34px] !text-xs md:!text-sm !font-medium !rounded-lg !bg-slate-800 hover:!bg-slate-700 !text-white !border-0 inline-flex items-center justify-center"},{default:p(()=>[a[28]||(a[28]=e("i",{class:"pi pi-plus text-xs md:mr-1.5"},null,-1)),e("span",Ds,i(t.$t("tokens.create_key")),1)]),_:1})]),_:1},8,["searchValue","searchPlaceholder","loading"])]),empty:p(()=>[e("div",Ys,[a[33]||(a[33]=e("div",{class:"w-20 h-20 bg-slate-50 rounded-full flex items-center justify-center mx-auto mb-6"},[e("i",{class:"pi pi-key text-3xl text-slate-400"})],-1)),e("h3",Js,i(t.$t("tokens.no_keys")),1),e("p",Qs,i(t.$t("tokens.no_keys_desc")),1
1),u(r(k),{onClick:a[3]||(a[3]=s=>g.value?qe():Ce()),label:g.value?t.$t("tokens.clear_search"):t.$t("tokens.create_key"),icon:g.value?"pi pi-times":"pi pi-plus",class:"bg-slate-900 hover:bg-slate-800 text-white font-medium px-6 py-3 rounded-xl"},null,8,["label","icon"])])]),default:p(()=>[u(r(F),{field:"name",header:t.$t("tokens.columns.name"),sortable:"",class:"min-w-32",frozen:"","filter-field":"left"},{body:p(({data:s})=>[e("div",Ns,[e("span",Ss,i(s.name),1),e("button",{onClick:c=>Je(s),class:"text-slate-300 hover:text-slate-500 transition-colors opacity-100 md:opacity-0 md:group-hover:opacity-100"},[...a[30]||(a[30]=[e("i",{class:"pi pi-pencil text-[11px]"},null,-1)])],8,Is)])]),_:1},8,["header"]),u(r(F),{field:"key",header:t.$t("tokens.columns.key"),sortable:"",class:"min-w-48"},{body:p(({data:s})=>[e("button",{onClick:c=>He("sk-"+s.key,s.key),class:h(["inline-flex items-center gap-1.5 px-2 py-1 rounded-md border transition-all max-w-44 group",G.value===s.key?"bg-emerald-50 border-emerald-200 text-emerald-600":"bg-slate-50 border-slate-200 text-slate-600 hover:bg-slate-100 hover:border-slate-300"]),title:"sk-"+s.key},[e("span",Us,i(Ee(s.key)),1),e("i",{class:h(["text-[11px] shrink-0 transition-colors",G.value===s.key?"pi pi-check text-emerald-500":"pi pi-clone text-slate-300 group-hover:text-slate-500"])},null,2)],10,Fs)]),_:1},8,["header"]),u(r(F),{field:"status",header:t.$t("tokens.columns.status"),sortable:"",class:"w-24 min-w-24"},{body:p(({data:s})=>[e("div",{class:"flex items-center gap-1.5 cursor-pointer",onClick:c=>Me(s)},[e("span",{class:h(["inline-block w-7 h-4 rounded-full relative transition-colors",s.status===1?"bg-emerald-500":"bg-slate-300"])},[e("span",{class:h(["absolute top-0.5 w-3 h-3 rounded-full bg-white shadow transition-transform",s.status===1?"left-[14px]":"left-0.5"])},null,2)],2),e("span",{class:h(["text-xs",s.status===1?"text-emerald-600":"text-slate-400"])},i(Fe(s.status)),3)],8,Es)]),_:1},8,["header"]),u(r(F),{field:"model_limits",header:t.$t("tokens.columns.models"),class:"min-w-72"},{body:p(({data:s})=>[X(s.model_limits).length>0?(d(),m("div",Os,[(d(!0),m(D,null,N(X(s.model_limits).slice(0,3),c=>(d(),m("span",{key:c,class:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium bg-slate-50 text-slate-600 border border-slate-200"},[r(pe)(c)?.svg?(d(),I(ee,{key:0,name:r(pe)(c).svg,class:"size-3 shrink-0"},null,8,["name"])):y("",!0),q(" "+i(c),1)]))),128)),X(s.model_limits).length>3?(d(),m("span",Hs," +"+i(X(s.model_limits).length-3),1)):y("",!0)])):(d(),m("span",Ms,i(t.$t("tokens.all_models_hint")),1))]),_:1},8,["header"]),u(r(F),{field:"expired_time",header:t.$t("tokens.columns.expiry"),sortable:"",class:"min-w-44"},{body:p(({data:s})=>[e("span",{class:h(["text-xs tabular-nums",s.expired_time===-1?"text-emerald-600 font-medium":"text-slate-500"])},i(ke(s.expired_time)),3)]),_:1},8,["header"]),u(r(F),{field:"remain_quota",header:t.$t("tokens.columns.quota"),sortable:"",class:"min-w-52"},{body:p(({data:s})=>[s.unlimited_quota?(d(),m("div",Ps,[a[31]||(a[31]=e("i",{class:"pi pi-infinity text-[10px]"},null,-1)),q(" "+i(t.$t("tokens.unlimited")),1)])):(d(),m("div",As,[e("div",Ls,[e("div",Rs,[e("div",{class:h(["h-full rounded-full transition-all duration-500",Ue($e(s.used_quota,s.remain_quota,!1))]),style:ot({width:`${$e(s.used_quota,s.remain_quota,!1)}%`})},null,6)]),e("span",Gs,i(we(s.used_quota))+" / "+i(we(s.remain_quota+s.used_quota)),1)])]))]),_:1},8,["header"]),u(r(F),{field:"accessed_time",header:t.$t("tokens.columns.last_access"),sortable:"",class:"min-w-44"},{body:p(({data:s})=>[e("span",Ks,i(ke(s.accessed_time)),1)]),_:1},8,["header"]),u(r(F),{header:t.$t("tokens.columns.actions"),class:"w-36 min-w-36"},{body:p(({data:s})=>[e("button",{onClick:c=>Qe(s),class:"inline-flex items-center gap-1 px-2 py-1 rounded-md text-xs font-medium text-red-500 hover:bg-red-50 transition-colors"},[a[32]||(a[32]=e("i",{class:"pi pi-trash text-[10px]"},null,-1)),q(" "+i(t.$t("tokens.delete")),1)],8,Bs)]),_:1},8,["header"])]),_:1},8,["data","loading","total"]),u(r(ae),{visible:z.value,"onUpdate:visible":a[5]||(a[5]=s=>z.value=s),modal:"",header:t.$t("tokens.endpoints.title"),class:"w-full max-w-3xl mx-2 md:mx-4",pt:{root:{class:"rounded-2xl overflow-hidden border-0 shadow-2xl"},header:{class:"bg-white !border-b !border-slate-100 !px-4 md:!px-6 !py-3 md:!py-4"},content:{class:"bg-white !px-4 md:!px-6 !py-4 md:!py-5 max-h-[80vh] overflow-y-auto"},footer:{class:"!bg-slate-50 !border-t !border-slate-100 !px-4 md:!px-6 !py-3"},mask:{class:"backdrop-blur-sm bg-slate-900/20"}}},{footer:p(()=>[e("div",kl,[e("p",wl,[a[39]||(a[39]=e("i",{class:"pi pi-info-circle text-[10px]"},null,-1)),q(" "+i(t.$t("tokens.endpoints.copy_includes_host")),1)]),e("div",$l,[u(r(k),{onClick:ze,size:"small",class:"!bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 !rounded-lg !px-3 md:!px-4 !py-2 !text-xs md:!text-sm !font-medium"},{default:p(()=>[a[40]||(a[40]=e("i",{class:"pi pi-file text-xs mr-1.5"},null,-1)),q(" "+i(t.$t("tokens.api_ref")),1)]),_:1}),u(r(k),{label:t.$t("tokens.cancel"),onClick:a[4]||(a[4]=s=>z.value=!1),class:"!bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 !rounded-lg !px-3 md:!px-4 !py-2 !text-xs md:!text-sm !font-medium"},null,8,["label"])])])]),default:p(()=>[e("div",Zs,[e("div",null,[a[36]||(a[36]=e("div",{class:"text-[11px] font-semibold text-slate-400 uppercase tracking-wider px-1 mb-2"}," API Hosts ",-1)),e("div",Ws,[(d(!0),m(D,null,N(v.value,s=>(d(),m("div",{key:s.id,onClick:c=>w.value=s.id,class:h(["rounded-xl border-2 p-3 md:p-4 cursor-pointer transition-all",w.value===s.id?"border-slate-700 bg-slate-50/80":"border-slate-100 hover:border-slate-200 bg-white"])},[e("div",el,[e("i",{class:h(["pi pi-globe text-xs md:text-sm",w.value===s.id?"text-slate-700":"text-slate-400"])},null,2),e("span",tl,i(s.url.replace("https://","")),1),s.id==="wisgate"?(d(),I(ee,{key:0,name:"cloudflare",class:"h-5 aspect-[3/1] shrink-0 opacity-60"})):y("",!0),s.recommended?(d(),m("span",sl,i(t.$t("tokens.endpoints.recommended")),1)):y("",!0),w.value===s.id?(d(),m("i",ll)):y("",!0)]),e("p",al,i(s.desc),1),e("ul",ol,[(d(!0),m(D,null,N(s.advantages,c=>(d(),m("li",{key:c},i(c),1))),128))]),e("div",il,[e("div",{class:h(["group flex items-center gap-2 px-2.5 md:px-3 py-2 rounded-lg border transition-colors",w.value===s.id?"bg-white border-slate-200 hover:bg-slate-50":"bg-slate-50/50 border-slate-100 hover:bg-slate-50"]),onClick:je(c=>T(s.url,s.id+"-base"),["stop"])},[a[34]||(a[34]=e("span",{class:"text-[10px] text-slate-400 font-medium shrink-0 uppercase"},"Base",-1)),e("code",rl,i(s.url),1),e("i",{class:h(["pi text-xs shrink-0 transition-colors",C.value===s.id+"-base"?"pi-check text-green-600":"pi-clone text-slate-300 group-hover:text-slate-500"])},null,2)],10,nl),e("div",{class:h(["group flex items-center gap-2 px-2.5 md:px-3 py-2 rounded-lg border transition-colors",w.value===s.id?"bg-white border-slate-200 hover:bg-slate-50":"bg-slate-50/50 border-slate-100 hover:bg-slate-50"]),onClick:je(c=>T(s.url+"/v1",s.id+"-base-v1"),["stop"])},[a[35]||(a[35]=e("span",{class:"text-[10px] text-slate-400 font-medium shrink-0 uppercase"},"v1",-1)),e("code",ul,i(s.url)+"/v1",1),e("i",{class:h(["pi text-xs shrink-0 transition-colors",C.value===s.id+"-base-v1"?"pi-check text-green-600":"pi-clone text-slate-300 group-hover:text-slate-500"])},null,2)],10,dl)])],10,Xs))),128))])]),e("div",null,[e("div",cl,[a[37]||(a[37]=e("span",{class:"text-[11px] font-semibold text-slate-400 uppercase tracking-wider"},"Endpoints",-1)),a[38]||(a[38]=e("span",{class:"text-[11px] text-slate-300 hidden md:inline"},"—",-1)),e("span",ml,i(t.$t("tokens.endpoints.copy_includes_host")),1)]),(d(!0),m(D,null,N(r(ft),s=>(d(),m("div",{key:s.id,class:"mb-3 last:mb-0"},[e("div",pl,[u(ee,{class:"size-3.5",name:s.logo.toLowerCase()},null,8,["name"]),e("span",vl,i(s.name),1)]),e("div",xl,[(d(!0),m(D,null,N(s.endpoints,(c,M)=>(d(),m("div",{key:c.key,class:h(["group flex items-center gap-2 md:gap-3 px-3 md:px-4 py-2.5 hover:bg-slate-50 transition-colors cursor-pointer",{"rounded-t-xl":M===0,"rounded-b-xl":M===s.endpoints.length-1}]),onClick:Ha=>T(H.value.url+c.path,H.value.id+"-"+c.key)},[e("div",{class:h(["w-1.5 h-1.5 rounded-full shrink-0",s.color])},null,2),e("div",fl,[e("div",bl,[e("span",hl,i(c.name),1),e("code",gl,i(c.path),1)]),e("code",yl,i(c.path),1)]),e("i",{class:h(["pi text-xs shrink-0 transition-colors",C.value===H.value.id+"-"+c.key?"pi-check text-green-600":"pi-clone text-slate-300 group-hover:text-slate-500"])},null,2)],10,_l))),128))])]))),128))])])]),_:1},8,["visible","header"]),u(r(ae),{visible:Y.value,"onUpdate:visible":a[12]||(a[12]=s=>Y.value=s),modal:"",header:t.$t("tokens.edit_title"),class:"w-full max-w-2xl mx-4",closable:!J.value,pt:{root:{class:"rounded-2xl overflow-hidden border-0 shadow-2xl"},header:{class:"bg-white border-b border-slate-100 px-6 py-4"},content:{class:"bg-white px-6 py-6"},footer:{class:"bg-slate-50 border-t border-slate-100 px-6 !py-4"},mask:{class:"backdrop-blur-sm bg-slate-900/20"}}},{footer:p(()=>[e("div",ea,[u(r(k),{label:t.$t("tokens.cancel"),onClick:a[11]||(a[11]=s=>Y.value=!1),disabled:J.value,class:"!bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 !rounded-lg !px-4 !py-2 !text-sm !font-medium"},null,8,["label","disabled"]),u(r(k),{label:t.$t("tokens.save_changes"),onClick:Be,loading:J.value,class:"!bg-slate-900 hover:!bg-slate-800 !text-white !border-0 !rounded-lg !px-5 !py-2 !text-sm !font-medium"},null,8,["label","loading"])])]),default:p(()=>[e("div",ql,[e("div",Cl,[e("label",Vl,i(t.$t("tokens.name_label")),1),u(r(oe),{modelValue:_.value.name,"onUpdate:modelValue":a[6]||(a[6]=s=>_.value.name=s),placeholder:t.$t("tokens.name_placeholder"),class:h(["w-full !rou
1nded-lg !bg-slate-50/80 focus:!bg-white !border-slate-200 focus:!border-slate-300 transition-colors !shadow-none",{"p-invalid":x.value.name}])},null,8,["modelValue","placeholder","class"]),x.value.name?(d(),I(r(A),{key:0,severity:"error",class:"text-sm"},{default:p(()=>[q(i(x.value.name),1)]),_:1})):y("",!0)]),e("div",zl,[e("div",Tl,[a[41]||(a[41]=e("div",{class:"size-8 rounded-lg bg-amber-50 flex items-center justify-center shrink-0"},[e("i",{class:"pi pi-wallet text-amber-500 text-sm"})],-1)),e("h4",jl,i(t.$t("tokens.quota_settings")),1)]),e("div",Dl,[u(r(ie),{modelValue:_.value.unlimited_quota,"onUpdate:modelValue":a[7]||(a[7]=s=>_.value.unlimited_quota=s),inputId:"edit_unlimited",binary:""},null,8,["modelValue"]),e("label",Nl,i(t.$t("tokens.unlimited_quota")),1)]),_.value.unlimited_quota?y("",!0):(d(),m("div",Sl,[e("label",Il,i(t.$t("tokens.quota_amount")),1),e("div",Fl,[u($,{modelValue:_.value.remain_quota,"onUpdate:modelValue":a[8]||(a[8]=s=>_.value.remain_quota=s),min:500,placeholder:"500000",class:h(["flex-1 [&_input]:!rounded-lg [&_input]:!bg-white [&_input]:!border-slate-200 [&_input]:!shadow-none",{"p-invalid":x.value.remain_quota}])},null,8,["modelValue","class"]),e("span",Ul,"$"+i(r(me)(Number(_.value.remain_quota)).toFixed(2)),1)]),e("div",El,[(d(!0),m(D,null,N(ye.value,s=>(d(),m("button",{key:s.value,type:"button",class:h(["px-2.5 py-1 rounded-lg text-xs font-medium border transition-colors",_.value.remain_quota===s.value?"bg-slate-800 text-white border-slate-800":"bg-white text-slate-600 border-slate-200 hover:bg-slate-100 hover:border-slate-300"]),onClick:c=>_.value.remain_quota=s.value},i(s.label),11,Ol))),128))]),x.value.remain_quota?(d(),I(r(A),{key:0,severity:"error",class:"text-sm"},{default:p(()=>[q(i(x.value.remain_quota),1)]),_:1})):y("",!0)]))]),e("div",Hl,[e("div",Ml,[a[42]||(a[42]=e("div",{class:"size-8 rounded-lg bg-blue-50 flex items-center justify-center shrink-0"},[e("i",{class:"pi pi-box text-blue-500 text-sm"})],-1)),e("h4",Pl,i(t.$t("tokens.model_access")),1)]),e("p",Al,i(t.$t("tokens.all_models_hint")),1),e("div",Ll,[(d(!0),m(D,null,N(ge.value,s=>(d(),m("div",{key:s.name,class:"px-3 py-2.5"},[e("div",Rl,[s.svg?(d(),I(ee,{key:0,class:"size-3.5",name:s.svg},null,8,["name"])):y("",!0),e("span",Gl,i(s.name),1)]),e("div",Kl,[(d(!0),m(D,null,N(s.models,c=>(d(),m("div",{key:c,class:"flex items-center py-0.5"},[u(r(ie),{modelValue:le.value,"onUpdate:modelValue":a[9]||(a[9]=M=>le.value=M),inputId:`edit_model_${c}`,value:c,name:"edit_models"},null,8,["modelValue","inputId","value"]),e("label",{for:`edit_model_${c}`,class:"ml-2 text-xs text-slate-600 truncate cursor-pointer",title:c},i(c),9,Bl)]))),128))])]))),128))])]),e("div",Yl,[e("div",Jl,[a[43]||(a[43]=e("div",{class:"size-8 rounded-lg bg-emerald-50 flex items-center justify-center shrink-0"},[e("i",{class:"pi pi-shield text-emerald-500 text-sm"})],-1)),e("h4",Ql,i(t.$t("tokens.security")),1)]),e("div",Zl,[e("label",Wl,i(t.$t("tokens.ip_whitelist")),1),u(r(oe),{modelValue:_.value.allow_ips,"onUpdate:modelValue":a[10]||(a[10]=s=>_.value.allow_ips=s),placeholder:"e.g., 192.168.0.1",class:h(["w-full !rounded-lg !bg-white !border-slate-200 focus:!border-slate-300 transition-colors !shadow-none",{"p-invalid":x.value.allow_ips}])},null,8,["modelValue","class"]),e("small",Xl,i(t.$t("tokens.any_ip_hint")),1),x.value.allow_ips?(d(),I(r(A),{key:0,severity:"error",class:"text-sm"},{default:p(()=>[q(i(x.value.allow_ips),1)]),_:1})):y("",!0)])])])]),_:1},8,["visible","header","closable"]),u(r(ae),{visible:K.value,"onUpdate:visible":a[21]||(a[21]=s=>K.value=s),modal:"",header:t.$t("tokens.create_title"),class:"w-full max-w-2xl mx-4",closable:!B.value,pt:{root:{class:"rounded-2xl overflow-hidden border-0 shadow-2xl"},header:{class:"bg-white border-b border-slate-100 px-6 py-4"},content:{class:"bg-white px-6 py-6"},footer:{class:"bg-slate-50 border-t border-slate-100 px-6 !py-4"},mask:{class:"backdrop-blur-sm bg-slate-900/20"}}},{footer:p(()=>[e("div",Sa,[u(r(k),{label:t.$t("tokens.cancel"),onClick:a[20]||(a[20]=s=>K.value=!1),disabled:B.value,class:"!bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 !rounded-lg !px-4 !py-2 !text-sm !font-medium"},null,8,["label","disabled"]),u(r(k),{label:t.$t("tokens.create_key"),onClick:Ke,loading:B.value,class:"!bg-slate-900 hover:!bg-slate-800 !text-white !border-0 !rounded-lg !px-5 !py-2 !text-sm !font-medium"},null,8,["label","loading"])])]),default:p(()=>[e("div",ta,[e("div",sa,[e("label",la,i(t.$t("tokens.name_label")),1),u(r(oe),{modelValue:f.value.name,"onUpdate:modelValue":a[13]||(a[13]=s=>f.value.name=s),placeholder:t.$t("tokens.name_placeholder"),class:h(["w-full !rou
1nded-lg !bg-slate-50/80 focus:!bg-white !border-slate-200 focus:!border-slate-300 transition-colors !shadow-none",{"p-invalid":x.value.name}])},null,8,["modelValue","placeholder","class"]),x.value.name?(d(),I(r(A),{key:0,severity:"error",class:"text-sm"},{default:p(()=>[q(i(x.value.name),1)]),_:1})):y("",!0)]),e("div",aa,[e("label",oa,i(t.$t("tokens.expiration")),1),u(r(pt),{modelValue:U.value,"onUpdate:modelValue":a[14]||(a[14]=s=>U.value=s),options:Ie.value,optionLabel:"label",optionValue:"value",placeholder:t.$t("tokens.select_expiration"),class:"w-full !rounded-lg"},null,8,["modelValue","options","placeholder"]),U.value===0?(d(),m("div",ia,[u(r(vt),{modelValue:W.value,"onUpdate:modelValue":a[15]||(a[15]=s=>W.value=s),showTime:"",hourFormat:"24",placeholder:t.$t("tokens.select_custom_date"),class:"w-full !text-sm [&_input]:!rounded-lg"},null,8,["modelValue","placeholder"])])):y("",!0)]),e("div",na,[e("div",ra,[a[44]||(a[44]=e("div",{class:"size-8 rounded-lg bg-amber-50 flex items-center justify-center shrink-0"},[e("i",{class:"pi pi-wallet text-amber-500 text-sm"})],-1)),e("h4",da,i(t.$t("tokens.quota_settings")),1)]),e("div",ua,[u(r(ie),{modelValue:f.value.unlimited_quota,"onUpdate:modelValue":a[16]||(a[16]=s=>f.value.unlimited_quota=s),inputId:"create_unlimited",binary:""},null,8,["modelValue"]),e("label",ca,i(t.$t("tokens.unlimited_quota")),1)]),f.value.unlimited_quota?y("",!0):(d(),m("div",ma,[e("label",pa,i(t.$t("tokens.quota_amount")),1),e("div",va,[u($,{modelValue:f.value.remain_quota,"onUpdate:modelValue":a[17]||(a[17]=s=>f.value.remain_quota=s),min:500,placeholder:"500000",class:h(["flex-1 [&_input]:!rounded-lg [&_input]:!bg-white [&_input]:!border-slate-200 [&_input]:!shadow-none",{"p-invalid":x.value.remain_quota}])},null,8,["modelValue","class"]),e("span",xa,"$"+i(r(me)(Number(f.value.remain_quota)).toFixed(2)),1)]),e("div",_a,[(d(!0),m(D,null,N(ye.value,s=>(d(),m("button",{key:s.value,type:"button",class:h(["px-2.5 py-1 rounded-lg text-xs font-medium border transition-colors",f.value.remain_quota===s.value?"bg-slate-800 text-white border-slate-800":"bg-white text-slate-600 border-slate-200 hover:bg-slate-100 hover:border-slate-300"]),onClick:c=>f.value.remain_quota=s.value},i(s.label),11,fa))),128))]),x.value.remain_quota?(d(),I(r(A),{key:0,severity:"error",class:"text-sm"},{default:p(()=>[q(i(x.value.remain_quota),1)]),_:1})):y("",!0)]))]),e("div",ba,[e("div",ha,[a[45]||(a[45]=e("div",{class:"size-8 rounded-lg bg-blue-50 flex items-center justify-center shrink-0"},[e("i",{class:"pi pi-box text-blue-500 text-sm"})],-1)),e("h4",ga,i(t.$t("tokens.model_access")),1)]),e("p",ya,i(t.$t("tokens.all_models_hint")),1),e("div",ka,[(d(!0),m(D,null,N(ge.value,s=>(d(),m("div",{key:s.name,class:"px-3 py-2.5"},[e("div",wa,[s.svg?(d(),I(ee,{key:0,class:"size-3.5",name:s.svg},null,8,["name"])):y("",!0),e("span",$a,i(s.name),1)]),e("div",qa,[(d(!0),m(D,null,N(s.models,c=>(d(),m("div",{key:c,class:"flex items-center py-0.5"},[u(r(ie),{modelValue:se.value,"onUpdate:modelValue":a[18]||(a[18]=M=>se.value=M),inputId:`create_model_${c}`,value:c,name:"create_models"},null,8,["modelValue","inputId","value"]),e("label",{for:`create_model_${c}`,class:"ml-2 text-xs text-slate-600 truncate cursor-pointer",title:c},i(c),9,Ca)]))),128))])]))),128))])]),e("div",Va,[e("div",za,[a[46]||(a[46]=e("div",{class:"size-8 rounded-lg bg-emerald-50 flex items-center justify-center shrink-0"},[e("i",{class:"pi pi-shield text-emerald-500 text-sm"})],-1)),e("h4",Ta,i(t.$t("tokens.security")),1)]),e("div",ja,[e("label",Da,i(t.$t("tokens.ip_whitelist")),1),u(r(oe),{modelValue:f.value.allow_ips,"onUpdate:modelValue":a[19]||(a[19]=s=>f.value.allow_ips=s),placeholder:"e.g., 192.168.0.1",class:h(["w-full !rounded-lg !bg-white !border-slate-200 focus:!border-slate-300 transition-colors !shadow-none",{"p-invalid":x.value.allow_ips}])},null,8,["modelValue","class"]),e("small",Na,i(t.$t("tokens.any_ip_hint")),1),x.value.allow_ips?(d(),I(r(A),{key:0,severity:"error",class:"text-sm"},{default:p(()=>[q(i(x.value.allow_ips),1)]),_:1})):y("",!0)])])])]),_:1},8,["visible","header","closable"]),u(r(ae),{visible:Q.value,"onUpdate:visible":a[23]||(a[23]=s=>Q.value=s),modal:"",header:t.$t("tokens.delete_title"),class:"w-full max-w-md mx-4",closable:!Z.value,pt:{root:{class:"rounded-2xl overflow-hidden border-0 shadow-2xl"},header:{class:"bg-white !border-b !border-slate-100 !px-6 !py-4"},content:{class:"bg-white !px-6 !py-6"},footer:{class:"!bg-slate-50 !border-t !border-slate-100 !px-6 !py-4"},mask:{class:"backdrop-blur-sm bg-slate-900/20"}}},{footer:p(()=>[e("div",Ea,[u(r(k),{label:t.$t("tokens.cancel"),onClick:a[22]||(a[22]=s=>Q.value=!1),disabled:Z.value,class:"!bg-slate-100 hover:!bg-slate-200 !text-slate-600 !border-0 !rounded-lg !px-4 !py-2 !text-sm !font-medium"},null,8,["label","disabled"]),u(r(k),{label:t.$t("tokens.delete"),onClick:Ye,loading:Z.value,class:"!bg-red-600 hover:!bg-red-700 !text-white !border-0 !rounded-lg !px-5 !py-2 !text-sm !font-medium"},null,8,["label","loading"])])]),default:p(()=>[e("div",Ia,[a[47]||(a[47]=e("div",{class:"size-12 rounded-xl bg-red-50 flex items-center justify-center mx-auto"},[e("i",{class:"pi pi-trash text-red-500 text-xl"})],-1)),e("div",null,[e("p",Fa,i(t.$t("tokens.delete_confirm",{name:be.value})),1),e("p",Ua,i(t.$t("tokens.delete_warning")),1)])])]),_:1},8,["visible","header","closable"])])}}});
1export{Uo 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.