PageSourceSearch

https://pastefy.app/assets/PasswordGeneratorTool-p5c5b2Gu.js

js pastefy.app collected 2026-10-03 23:30:18 UTC 4,219 bytes, 2 lines download raw bytes

1import{d as B,B as L,T as n,C as M,m as N,k as P,c as k,o as v,w as V,b as o,e as h,h as s,A as p,F as S,f as j,a,t as r,D as _,p as u}from"./index-xKWWSADt.js";import{s as w}from"./index-BfcXxai5.js";import{s as C}from"./index-DvbCKLgR.js";import{s as D}from"./index-Bdpm6lSX.js";import{_ as F}from"./UtilityShell.vue_vue_type_script_setup_true_lang-K8NhCHei.js";import{_ as R}from"./UtilityResultActions.vue_vue_type_script_setup_true_lang-DJqNeZG2.js";import"./index-DL0wjmqn.js";import"./index-CK3j_cSe.js";import"./current-paste-CHW51_lb.js";import"./index-kcS3oj_O.js";const E={class:"text-sm font-medium"},q={class:"text-sm font-medium"},z={class:"flex items-center gap-2 text-sm"},H={class:"flex items-center gap-2 text-sm"},I={class:"flex items-center gap-2 text-sm"},J={class:"flex items-center gap-2 text-sm"},K={class:"flex items-center gap-2 text-sm"},O={key:1,class:"grid gap-3"},Q={class:"mb-2 flex items-center justify-between gap-3"},W={class:"font-medium"},X={class:"block break-all text-sm"},de=B({__name:"PasswordGeneratorTool",setup(Y){const T=L(),c=n("pastefy-utility-password-count",4),f=n("pastefy-utility-password-length",20),i=n("pastefy-utility-password-uppercase",!0),d=n("pastefy-utility-password-lowercase",!0),m=n("pastefy-utility-password-numbers",!0),y=n("pastefy-utility-password-symbols",!0),b=n("pastefy-utility-password-ambiguous",!0),g=M([]),G=()=>{let e="";return i.value&&(e+="ABCDEFGHJKLMNPQRSTUVWXYZ"),d.value&&(e+="abcdefghijkmnopqrstuvwxyz"),m.value&&(e+="23456789"),y.value&&(e+="!@#$%^&*()-_=+[]{};:,.?"),b.value||(i.value&&(e+="IO"),d.value&&(e+="l"),m.value&&(e+="01")),e},U=(e,l)=>{const t=new Uint32Array(l);return window.crypto.getRandomValues(t),Array.from(t,x=>e[x%e.length]).join("")},$=()=>{const e=G();if(!e){g.value=[];return}const l=Math.max(1,Math.min(c.value||1,25)),t=Math.max(8,Math.min(f.value||20,128));g.value=Array.from({length:l},()=>U(e,t))};N([c,f,i,d,m,y,b],$,{immediate:!0});const A=P(()=>g.value.join(`
2`));return(e,l)=>(v(),k(F,null,{controls:V(()=>[a("label",E,r(e.$t("utility.passwordGeneratorTool.count")),1),o(s(C),{modelValue:s(c),"onUpdate:modelValue":l[0]||(l[0]=t=>u(c)?c.value=t:null),min:1,max:25,fluid:""},null,8,["modelValue"]),a("label",q,r(e.$t("utility.passwordGeneratorTool.length")),1),o(s(C),{modelValue:s(f),"onUpdate:modelValue":l[1]||(l[1]=t=>u(f)?f.value=t:null),min:8,max:128,fluid:""},null,8,["modelValue"]),a("label",z,[o(s(w),{modelValue:s(i),"onUpdate:modelValue":l[2]||(l[2]=t=>u(i)?i.value=t:null),binary:""},null,8,["modelValue"]),p(" "+r(e.$t("utility.passwordGeneratorTool.uppercaseLetters")),1)]),a("label",H,[o(s(w),{modelValue:s(d),"onUpdate:modelValue":l[3]||(l[3]=t=>u(d)?d.value=t:null),binary:""},null,8,["modelValue"]),p(" "+r(e.$t("utility.passwordGeneratorTool.lowercaseLetters")),1)]),a("label",I,[o(s(w),{modelValue:s(m),"onUpdate:modelValue":l[4]||(l[4]=t=>u(m)?m.value=t:null),binary:""},null,8,["modelValue"]),p(" "+r(e.$t("utility.passwordGeneratorTool.numbers")),1)]),a("label",J,[o(s(w),{modelValue:s(y),"onUpdate:modelValue":l[5]||(l[5]=t=>u(y)?y.value=t:null),binary:""},null,8,["modelValue"]),p(" "+r(e.$t("utility.passwordGeneratorTool.symbols")),1)]),a("label",K,[o(s(w),{modelValue:s(b),"onUpdate:modelValue":l[6]||(l[6]=t=>u(b)?b.value=t:null),binary:""},null,8,["modelValue"]),p(" "+r(e.$t("utility.passwordGeneratorTool.excludeAmbiguousCharacters")),1)]),a("div",null,[o(s(_),{onClick:l[7]||(l[7]=t=>$()),label:e.$t("utility.passwordGeneratorTool.generateAgain"),icon:"ti ti-refresh",severity:"contrast",outlined:""},null,8,["label"])])]),result:V(()=>[g.value.length?(v(),h("div",O,[(v(!0),h(S,null,j(g.value,(t,x)=>(v(),h("div",{key:t,class:"rounded-xl border border-neutral-200 bg-white p-4 dark:border-neutral-700 dark:bg-neutral-900"},[a("div",Q,[a("span",W,"Password "+r(x+1),1),o(s(_),{onClick:Z=>s(T).copy(t),icon:"ti ti-copy",severity:"contrast",text:""},null,8,["onClick"])]),a("code",X,r(t),1)]))),128))])):(v(),k(s(D),{key:0,severity:"warn"},{default:V(()=>l[8]||(l[8]=[p(" Select at least one character group to generate passwords. ")])),_:1}))]),footer:V(()=>[o(R,{result:A.value,"file-name":"generated-passwords.txt"},null,8,["result"])]),_:1}))}});
2export{de 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.