vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Give every landscape a second and third hue
df894c4f529477af69f50f52662bb7517843c3c9 · Keenan Nemetz · 8d ago · parent 51381592
Give every landscape a second and third hue A mark was one palette hue in shades of itself, so a field of avatars was seven colours in seven degrees of darkness. That is not enough for an avatar to tell people apart. The sky is still the account's tone, but the hills now take other tones from the same seven, chosen from a name-seeded shuffle and never the sky's own hue. Each hill is shaded toward the palette's darkest ground rather than toward black, which darkens it and ties different hues into one landscape. Every mark therefore carries at least two hues, and most carry three plus the disc. The seven grounds moved to :root so the bundle reads the palette from vole.css instead of carrying a second copy of it. A tone class now just points at one. Colour sets go from 21 per theme to 7 skies x (30 two-hill orders + 120 three-hill orders) x 3 discs = 3,150, before ridge, radius and disc position vary them further. keenan, which was clay and four shades of clay, is now clay with an olive hill, a slate hill and a moon.
server/web/static/dicebear-avatars.min.js +1−1
| @@ -14,7 +14,7 @@ | |||
| 14 | 14 | * | |
| 15 | 15 | * Then run `vole workflow run verify` so the licence inventory is checked. */ | |
| 16 | 16 | ||
| 17 | "use strict";(()=>{function g(t){return t.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function k(t){var e,r,i,n,a,o,d;let l=(e=t.meta)===null||e===void 0?void 0:e.title,s=(r=t.meta)===null||r===void 0?void 0:r.creator,u=(i=t.meta)===null||i===void 0?void 0:i.source,c=(a=(n=t.meta)===null||n===void 0?void 0:n.license)===null||a===void 0?void 0:a.url,m=F(t);return!l&&!s&&!u&&!c&&!m?"":'<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description>'+(l?`<dc:title>${g(l)}</dc:title>`:"")+(s?`<dc:creator>${g(s)}</dc:creator>`:"")+(u?`<dc:source xsi:type="dcterms:URI">${g((d=(o=t.meta)===null||o===void 0?void 0:o.source)!==null&&d!==void 0?d:"")}</dc:source>`:"")+(c?`<dcterms:license xsi:type="dcterms:URI">${g(c)}</dcterms:license>`:"")+(m?`<dc:rights>${g(m)}</dc:rights>`:"")+"</rdf:Description></rdf:RDF></metadata>"}function F(t){var e,r,i,n,a,o,d,l,s,u,c,m,x,y,f;let p=!((e=t.meta)===null||e===void 0)&&e.title?`\u201E${(r=t.meta)===null||r===void 0?void 0:r.title}\u201D`:"Design",E=`\u201E${(n=(i=t.meta)===null||i===void 0?void 0:i.creator)!==null&&n!==void 0?n:"Unknown"}\u201D`;!((a=t.meta)===null||a===void 0)&&a.source&&(p+=` (${t.meta.source})`);let $="";return((d=(o=t.meta)===null||o===void 0?void 0:o.license)===null||d===void 0?void 0:d.name)!=="MIT"&&((l=t.meta)===null||l===void 0?void 0:l.creator)!=="DiceBear"&&(!((s=t.meta)===null||s===void 0)&&s.title)&&($+="Remix of "),$+=`${p} by ${E}`,!((c=(u=t.meta)===null||u===void 0?void 0:u.license)===null||c===void 0)&&c.name&&($+=`, licensed under \u201E${(x=(m=t.meta)===null||m===void 0?void 0:m.license)===null||x===void 0?void 0:x.name}\u201D`,!((f=(y=t.meta)===null||y===void 0?void 0:y.license)===null||f===void 0)&&f.url&&($+=` (${t.meta.license.url})`)),$}function S(t){return t^=t<<13,t^=t>>17,t^=t<<5,t}function O(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r)|0,e=S(e);return e}function h(t=""){t=t.toString();let e=O(t)||1,r=()=>e=S(e),i=(n,a)=>Math.floor((r()- -2147483648)/4294967295*(a+1-n)+n);return{seed:t,next:r,bool(n=50){return i(1,100)<=n},integer(n,a){return i(n,a)},pick(n,a){var o;return n.length===0?(r(),a):(o=n[i(0,n.length-1)])!==null&&o!==void 0?o:a},shuffle(n){let a=h(r().toString()),o=[...n];for(let d=o.length-1;d>0;d--){let l=a.integer(0,d);[o[d],o[l]]=[o[l],o[d]]}return o},string(n,a="abcdefghijklmnopqrstuvwxyz1234567890"){let o=h(r().toString()),d="";for(let l=0;l<n;l++)d+=a[o.integer(0,a.length-1)];return d}}}function v(t){let e=t.attributes.viewBox.split(" "),r=parseInt(e[0]),i=parseInt(e[1]),n=parseInt(e[2]),a=parseInt(e[3]);return{x:r,y:i,width:n,height:a}}function C(t,e,r,i,n){let{width:a,height:o,x:d,y:l}=v(t),s=`<rect fill="${e}" width="${a}" height="${o}" x="${d}" y="${l}" />`;switch(i){case"solid":return s+t.body;case"gradientLinear":return`<rect fill="url(#backgroundLinear)" width="${a}" height="${o}" x="${d}" y="${l}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${n} 0.5 0.5)"><stop stop-color="${e}"/><stop offset="1" stop-color="${r}"/></linearGradient></defs>`+t.body}}function A(t,e){let{width:r,height:i,x:n,y:a}=v(t),o=e?(e-100)/100:0,d=(r/2+n)*o*-1,l=(i/2+a)*o*-1;return`<g transform="translate(${d} ${l}) scale(${e/100})">${t.body}</g>`}function I(t,e,r){let i=v(t),n=(i.width+i.x*2)*((e??0)/100),a=(i.height+i.y*2)*((r??0)/100);return`<g transform="translate(${n} ${a})">${t.body}</g>`}function M(t,e){let{width:r,height:i,x:n,y:a}=v(t);return`<g transform="rotate(${e}, ${r/2+n}, ${i/2+a})">${t.body}</g>`}function B(t){let{width:e,x:r}=v(t);return`<g transform="scale(-1 1) translate(${e*-1-r*2} 0)">${t.body}</g>`}function R(t,e){let{width:r,height:i,x:n,y:a}=v(t),o=e?r*e/100:0,d=e?i*e/100:0;return`<mask id="viewboxMask"><rect width="${r}" height="${i}" rx="${o}" ry="${d}" x="${n}" y="${a}" fill="#fff" /></mask><g mask="url(#viewboxMask)">${t.body}</g>`}function U(t){let e={xmlns:"http://www.w3.org/2000/svg",...t.attributes};return Object.keys(e).map(r=>`${g(r)}="${g(e[r])}"`).join(" ")}function j(t){let e=h(Math.random().toString()),r={};return t.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(i,n,a,o)=>(r[a]=r[a]||e.string(8),`${n}${r[a]}${o}`))}var z={type:"object",$schema:"http://json-schema.org/draft-07/schema#",properties:{seed:{type:"string"},flip:{type:"boolean",default:!1},rotate:{type:"integer",minimum:0,maximum:360,default:0},scale:{type:"integer",minimum:0,maximum:200,default:100},radius:{type:"integer",minimum:0,maximum:50,default:0},size:{type:"integer",minimum:1},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"}},backgroundType:{type:"array",items:{type:"string",enum:["solid","gradientLinear"]},default:["solid"]},backgroundRotation:{type:"array",items:{type:"integer",minimum:-360,maximum:360},default:[0,360]},translateX:{type:"integer",minimum:-100,maximum:100,default:0},translateY:{type:"integer",minimum:-100,maximum:100,default:0},clip:{type:"boolean",default:!0},randomizeIds:{type:"boolean",default:!1}}};function L(t){var e;let r={},i=(e=t.properties)!==null&&e!==void 0?e:{};return Object.keys(i).forEach(n=>{let a=i[n];typeof a=="object"&&a.default!==void 0&&(Array.isArray(a.default)?r[n]=[...a.default]:typeof a.default=="object"?r[n]={...a.default}:r[n]=a.default)}),r}function T(t,e){var r;let i={...L(z),...L((r=t.schema)!==null&&r!==void 0?r:{}),...e};return JSON.parse(JSON.stringify(i))}function X(t){return t==="transparent"?t:`#${t}`}function D(t,e,r){var i;let n=t.shuffle(e);n.length<=1||e.length==2&&r=="gradientLinear"?(n=e,t.next()):n=t.shuffle(e),n.length===0&&(n=["transparent"]);let a=n[0],o=(i=n[1])!==null&&i!==void 0?i:n[0];return{primary:X(a),secondary:X(o)}}function N(t,e={}){var r,i,n,a,o;e=T(t,e);let d=h(e.seed),l=t.create({prng:d,options:e}),s=d.pick((r=e.backgroundType)!==null&&r!==void 0?r:[],"solid"),{primary:u,secondary:c}=D(d,(i=e.backgroundColor)!==null&&i!==void 0?i:[],s),m=d.integer(!((n=e.backgroundRotation)===null||n===void 0)&&n.length?Math.min(...e.backgroundRotation):0,!((a=e.backgroundRotation)===null||a===void 0)&&a.length?Math.max(...e.backgroundRotation):0);e.size&&(l.attributes.width=e.size.toString(),l.attributes.height=e.size.toString()),e.scale!==void 0&&e.scale!==100&&(l.body=A(l,e.scale)),e.flip&&(l.body=B(l)),e.rotate&&(l.body=M(l,e.rotate)),(e.translateX||e.translateY)&&(l.body=I(l,e.translateX,e.translateY)),u!=="transparent"&&c!=="transparent"&&(l.body=C(l,u,c,s,m)),(e.radius||e.clip)&&(l.body=R(l,(o=e.radius)!==null&&o!==void 0?o:0)),e.randomizeIds&&(l.body=j(l));let x=U(l),y=k(t),f=`<svg ${x}>${y}${l.body}</svg>`;return{toString:()=>f,toJson:()=>{var p;return{svg:f,extra:{primaryBackgroundColor:u,secondaryBackgroundColor:c,backgroundType:s,backgroundRotation:m,...(p=l.extra)===null||p===void 0?void 0:p.call(l)}}},toDataUri:()=>`data:image/svg+xml;utf8,${encodeURIComponent(f)}`}}var w=["f0e6d2","dbbc7f","e69875"],Y=["f0e6d2","e7e8ea","cdd6d5"],P=[.34,.5,.62],J=(t,e)=>{let r=parseInt(t,16),i=n=>Math.round(n*(1-e)).toString(16).padStart(2,"0");return i(r>>16&255)+i(r>>8&255)+i(r&255)},G={meta:{title:"Landscape",source:"https://github.com/rodent-software/vole",creator:"Vole",license:{name:"Apache-2.0",url:"https://www.apache.org/licenses/LICENSE-2.0"}},schema:{type:"object",properties:{skyColor:{type:"array",items:{type:"string"},default:["6b7561"]},discColor:{type:"array",items:{type:"string"},default:w},hillCount:{type:"array",items:{type:"integer",minimum:2,maximum:3},default:[2,3]}}},create({prng:t,options:e}){let r=t.pick(e.skyColor??["6b7561"],"6b7561"),i=e.discColor??w,n=t.pick(e.hillCount??[2,3],2),a=[`<rect width="100" height="100" fill="#${r}"/>`];a.push(`<circle cx="${t.integer(16,84)}" cy="${t.integer(18,32)}" r="${t.integer(6,10)}" fill="#${t.pick(i)}"/>`);for(let o=0;o<n;o++){let d=t.integer(70,130),l=t.integer(40,66)-o*t.integer(5,10);a.push(`<circle cx="${t.integer(-20,120)}" cy="${100+d-l}" r="${d}" fill="#${J(r,P[o])}"/>`)}return{attributes:{viewBox:"0 0 100 100"},body:a.join("")}}},H=t=>{let e=(getComputedStyle(t).backgroundColor.match(/\d+/g)||[]).map(Number);return e.length<3?"":e.slice(0,3).map(r=>r.toString(16).padStart(2,"0")).join("")},K=()=>(document.documentElement.getAttribute("data-theme")||"").includes("dark"),q=t=>{if(t.querySelector("svg"))return;let e=t.getAttribute("data-avatar");if(!e)return;let r=H(t),i=N(G,{seed:e,size:40,clip:!1,backgroundColor:[],skyColor:r?[r]:void 0,discColor:K()?Y:w,hillCount:[2,3]}).toString();t.innerHTML=i.replace(/<metadata[\s\S]*?<\/metadata>/g,"")};window.VoleAvatars={render:q,renderAll(t){t.querySelectorAll("[data-avatar]").forEach(q)}};})(); | ||
| 17 | "use strict";(()=>{function g(t){return t.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function _(t){var e,r,i,n,a,o,l;let d=(e=t.meta)===null||e===void 0?void 0:e.title,s=(r=t.meta)===null||r===void 0?void 0:r.creator,c=(i=t.meta)===null||i===void 0?void 0:i.source,u=(a=(n=t.meta)===null||n===void 0?void 0:n.license)===null||a===void 0?void 0:a.url,m=F(t);return!d&&!s&&!c&&!u&&!m?"":'<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description>'+(d?`<dc:title>${g(d)}</dc:title>`:"")+(s?`<dc:creator>${g(s)}</dc:creator>`:"")+(c?`<dc:source xsi:type="dcterms:URI">${g((l=(o=t.meta)===null||o===void 0?void 0:o.source)!==null&&l!==void 0?l:"")}</dc:source>`:"")+(u?`<dcterms:license xsi:type="dcterms:URI">${g(u)}</dcterms:license>`:"")+(m?`<dc:rights>${g(m)}</dc:rights>`:"")+"</rdf:Description></rdf:RDF></metadata>"}function F(t){var e,r,i,n,a,o,l,d,s,c,u,m,x,y,f;let p=!((e=t.meta)===null||e===void 0)&&e.title?`\u201E${(r=t.meta)===null||r===void 0?void 0:r.title}\u201D`:"Design",q=`\u201E${(n=(i=t.meta)===null||i===void 0?void 0:i.creator)!==null&&n!==void 0?n:"Unknown"}\u201D`;!((a=t.meta)===null||a===void 0)&&a.source&&(p+=` (${t.meta.source})`);let $="";return((l=(o=t.meta)===null||o===void 0?void 0:o.license)===null||l===void 0?void 0:l.name)!=="MIT"&&((d=t.meta)===null||d===void 0?void 0:d.creator)!=="DiceBear"&&(!((s=t.meta)===null||s===void 0)&&s.title)&&($+="Remix of "),$+=`${p} by ${q}`,!((u=(c=t.meta)===null||c===void 0?void 0:c.license)===null||u===void 0)&&u.name&&($+=`, licensed under \u201E${(x=(m=t.meta)===null||m===void 0?void 0:m.license)===null||x===void 0?void 0:x.name}\u201D`,!((f=(y=t.meta)===null||y===void 0?void 0:y.license)===null||f===void 0)&&f.url&&($+=` (${t.meta.license.url})`)),$}function C(t){return t^=t<<13,t^=t>>17,t^=t<<5,t}function O(t){let e=0;for(let r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r)|0,e=C(e);return e}function h(t=""){t=t.toString();let e=O(t)||1,r=()=>e=C(e),i=(n,a)=>Math.floor((r()- -2147483648)/4294967295*(a+1-n)+n);return{seed:t,next:r,bool(n=50){return i(1,100)<=n},integer(n,a){return i(n,a)},pick(n,a){var o;return n.length===0?(r(),a):(o=n[i(0,n.length-1)])!==null&&o!==void 0?o:a},shuffle(n){let a=h(r().toString()),o=[...n];for(let l=o.length-1;l>0;l--){let d=a.integer(0,l);[o[l],o[d]]=[o[d],o[l]]}return o},string(n,a="abcdefghijklmnopqrstuvwxyz1234567890"){let o=h(r().toString()),l="";for(let d=0;d<n;d++)l+=a[o.integer(0,a.length-1)];return l}}}function v(t){let e=t.attributes.viewBox.split(" "),r=parseInt(e[0]),i=parseInt(e[1]),n=parseInt(e[2]),a=parseInt(e[3]);return{x:r,y:i,width:n,height:a}}function I(t,e,r,i,n){let{width:a,height:o,x:l,y:d}=v(t),s=`<rect fill="${e}" width="${a}" height="${o}" x="${l}" y="${d}" />`;switch(i){case"solid":return s+t.body;case"gradientLinear":return`<rect fill="url(#backgroundLinear)" width="${a}" height="${o}" x="${l}" y="${d}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${n} 0.5 0.5)"><stop stop-color="${e}"/><stop offset="1" stop-color="${r}"/></linearGradient></defs>`+t.body}}function A(t,e){let{width:r,height:i,x:n,y:a}=v(t),o=e?(e-100)/100:0,l=(r/2+n)*o*-1,d=(i/2+a)*o*-1;return`<g transform="translate(${l} ${d}) scale(${e/100})">${t.body}</g>`}function M(t,e,r){let i=v(t),n=(i.width+i.x*2)*((e??0)/100),a=(i.height+i.y*2)*((r??0)/100);return`<g transform="translate(${n} ${a})">${t.body}</g>`}function j(t,e){let{width:r,height:i,x:n,y:a}=v(t);return`<g transform="rotate(${e}, ${r/2+n}, ${i/2+a})">${t.body}</g>`}function B(t){let{width:e,x:r}=v(t);return`<g transform="scale(-1 1) translate(${e*-1-r*2} 0)">${t.body}</g>`}function R(t,e){let{width:r,height:i,x:n,y:a}=v(t),o=e?r*e/100:0,l=e?i*e/100:0;return`<mask id="viewboxMask"><rect width="${r}" height="${i}" rx="${o}" ry="${l}" x="${n}" y="${a}" fill="#fff" /></mask><g mask="url(#viewboxMask)">${t.body}</g>`}function U(t){let e={xmlns:"http://www.w3.org/2000/svg",...t.attributes};return Object.keys(e).map(r=>`${g(r)}="${g(e[r])}"`).join(" ")}function z(t){let e=h(Math.random().toString()),r={};return t.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(i,n,a,o)=>(r[a]=r[a]||e.string(8),`${n}${r[a]}${o}`))}var L={type:"object",$schema:"http://json-schema.org/draft-07/schema#",properties:{seed:{type:"string"},flip:{type:"boolean",default:!1},rotate:{type:"integer",minimum:0,maximum:360,default:0},scale:{type:"integer",minimum:0,maximum:200,default:100},radius:{type:"integer",minimum:0,maximum:50,default:0},size:{type:"integer",minimum:1},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"}},backgroundType:{type:"array",items:{type:"string",enum:["solid","gradientLinear"]},default:["solid"]},backgroundRotation:{type:"array",items:{type:"integer",minimum:-360,maximum:360},default:[0,360]},translateX:{type:"integer",minimum:-100,maximum:100,default:0},translateY:{type:"integer",minimum:-100,maximum:100,default:0},clip:{type:"boolean",default:!0},randomizeIds:{type:"boolean",default:!1}}};function T(t){var e;let r={},i=(e=t.properties)!==null&&e!==void 0?e:{};return Object.keys(i).forEach(n=>{let a=i[n];typeof a=="object"&&a.default!==void 0&&(Array.isArray(a.default)?r[n]=[...a.default]:typeof a.default=="object"?r[n]={...a.default}:r[n]=a.default)}),r}function X(t,e){var r;let i={...T(L),...T((r=t.schema)!==null&&r!==void 0?r:{}),...e};return JSON.parse(JSON.stringify(i))}function D(t){return t==="transparent"?t:`#${t}`}function N(t,e,r){var i;let n=t.shuffle(e);n.length<=1||e.length==2&&r=="gradientLinear"?(n=e,t.next()):n=t.shuffle(e),n.length===0&&(n=["transparent"]);let a=n[0],o=(i=n[1])!==null&&i!==void 0?i:n[0];return{primary:D(a),secondary:D(o)}}function E(t,e={}){var r,i,n,a,o;e=X(t,e);let l=h(e.seed),d=t.create({prng:l,options:e}),s=l.pick((r=e.backgroundType)!==null&&r!==void 0?r:[],"solid"),{primary:c,secondary:u}=N(l,(i=e.backgroundColor)!==null&&i!==void 0?i:[],s),m=l.integer(!((n=e.backgroundRotation)===null||n===void 0)&&n.length?Math.min(...e.backgroundRotation):0,!((a=e.backgroundRotation)===null||a===void 0)&&a.length?Math.max(...e.backgroundRotation):0);e.size&&(d.attributes.width=e.size.toString(),d.attributes.height=e.size.toString()),e.scale!==void 0&&e.scale!==100&&(d.body=A(d,e.scale)),e.flip&&(d.body=B(d)),e.rotate&&(d.body=j(d,e.rotate)),(e.translateX||e.translateY)&&(d.body=M(d,e.translateX,e.translateY)),c!=="transparent"&&u!=="transparent"&&(d.body=I(d,c,u,s,m)),(e.radius||e.clip)&&(d.body=R(d,(o=e.radius)!==null&&o!==void 0?o:0)),e.randomizeIds&&(d.body=z(d));let x=U(d),y=_(t),f=`<svg ${x}>${y}${d.body}</svg>`;return{toString:()=>f,toJson:()=>{var p;return{svg:f,extra:{primaryBackgroundColor:c,secondaryBackgroundColor:u,backgroundType:s,backgroundRotation:m,...(p=d.extra)===null||p===void 0?void 0:p.call(d)}}},toDataUri:()=>`data:image/svg+xml;utf8,${encodeURIComponent(f)}`}}var k=["f0e6d2","dbbc7f","e69875"],Y=["f0e6d2","e7e8ea","cdd6d5"],J=[.4,.56,.68],G="272e33",H=(t,e)=>{let r=parseInt(t,16),i=parseInt(G,16),n=a=>{let o=r>>a&255,l=i>>a&255;return Math.round(o+(l-o)*e).toString(16).padStart(2,"0")};return n(16)+n(8)+n(0)},K={meta:{title:"Landscape",source:"https://github.com/rodent-software/vole",creator:"Vole",license:{name:"Apache-2.0",url:"https://www.apache.org/licenses/LICENSE-2.0"}},schema:{type:"object",properties:{skyColor:{type:"array",items:{type:"string"},default:["6b7561"]},palette:{type:"array",items:{type:"string"},default:[]},discColor:{type:"array",items:{type:"string"},default:k},hillCount:{type:"array",items:{type:"integer",minimum:2,maximum:3},default:[2,3]}}},create({prng:t,options:e}){let r=t.pick(e.skyColor??["6b7561"],"6b7561"),i=e.discColor??k,n=t.pick(e.hillCount??[2,3],2),a=[`<rect width="100" height="100" fill="#${r}"/>`],o=(e.palette??[]).filter(l=>l&&l!==r);for(let l=o.length-1;l>0;l--){let d=t.integer(0,l);[o[l],o[d]]=[o[d],o[l]]}a.push(`<circle cx="${t.integer(16,84)}" cy="${t.integer(18,32)}" r="${t.integer(6,10)}" fill="#${t.pick(i)}"/>`);for(let l=0;l<n;l++){let d=t.integer(70,130),s=t.integer(40,66)-l*t.integer(5,10),c=o.length?o[l%o.length]:r;a.push(`<circle cx="${t.integer(-20,120)}" cy="${100+d-s}" r="${d}" fill="#${H(c,J[l])}"/>`)}return{attributes:{viewBox:"0 0 100 100"},body:a.join("")}}},Q=t=>{let e=(getComputedStyle(t).backgroundColor.match(/\d+/g)||[]).map(Number);return e.length<3?"":e.slice(0,3).map(r=>r.toString(16).padStart(2,"0")).join("")},b,W=()=>{if(b)return b;let t=getComputedStyle(document.documentElement);b=[];for(let e=1;e<=7;e++){let r=t.getPropertyValue(`--av-c${e}`).trim();/^#[0-9a-f]{6}$/i.test(r)&&b.push(r.slice(1))}return b},Z=()=>(document.documentElement.getAttribute("data-theme")||"").includes("dark"),V=t=>{if(t.querySelector("svg"))return;let e=t.getAttribute("data-avatar");if(!e)return;let r=Q(t),i=E(K,{seed:e,size:40,clip:!1,backgroundColor:[],skyColor:r?[r]:void 0,palette:W(),discColor:Z()?Y:k,hillCount:[2,3]}).toString();t.innerHTML=i.replace(/<metadata[\s\S]*?<\/metadata>/g,"")};window.VoleAvatars={render:V,renderAll(t){t.querySelectorAll("[data-avatar]").forEach(V)}};})(); | ||
| 18 | 18 | /*! Vole avatars: a landscape drawn by DiceBear core 9.3.1. | |
| 19 | 19 | * | |
| 20 | 20 | * DiceBear is MIT (see server/web/static/dicebear.LICENSE); the Landscape style | |