@ignaciocabeza/bitface 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-SFAUE3EN.js +1 -0
- package/dist/index.cjs +1 -1133
- package/dist/index.js +1 -23
- package/dist/react.cjs +1 -1155
- package/dist/react.js +1 -86
- package/dist/vue.cjs +1 -1165
- package/dist/vue.js +1 -103
- package/package.json +1 -1
- package/dist/chunk-SCBE5EEX.js +0 -1099
- package/dist/chunk-SCBE5EEX.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/react.cjs.map +0 -1
- package/dist/react.js.map +0 -1
- package/dist/vue.cjs.map +0 -1
- package/dist/vue.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d={light:"#FDDCB5",medium:"#E8B88A",tan:"#D19A6A",brown:"#A0673C",dark:"#6B4226",pale:"#FFF0E0"},O={"#FDDCB5":"#E5C49D","#E8B88A":"#CFA072","#D19A6A":"#B98252","#A0673C":"#885524","#6B4226":"#533010","#FFF0E0":"#E7D8C8"},y={black:"#1A1A2E",brown:"#6B3A2A",blonde:"#E8C84A",red:"#B83A1E",gray:"#9E9E9E",white:"#E8E8E8",auburn:"#8B3A1A",strawberry:"#D4713A",platinum:"#E8E0D0",pink:"#E8559E",blue:"#3A6BD5",purple:"#6B3A8B",teal:"#2A9E8B"},m={brown:"#5C3A1E",blue:"#3A7BD5",green:"#3A9D5C",gray:"#7A7A7A"},G=/^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;function u(e,t){return G.test(e)?e:t}function M(e){return e?d[e]??u(e,d.medium):d.medium}function w(e){return O[e]??I(e,30)}function x(e){return e?y[e]??u(e,y.black):y.black}function S(e){return e?m[e]??u(e,m.brown):m.brown}function I(e,t){let o=parseInt(e.replace("#",""),16),s=Math.max(0,(o>>16)-t),r=Math.max(0,(o>>8&255)-t),i=Math.max(0,(o&255)-t);return`#${(s<<16|r<<8|i).toString(16).padStart(6,"0").toUpperCase()}`}var N={round:{pixels:[[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0]],slotMap:{1:"skin",2:"skinShadow"},offsetX:0,offsetY:3},oval:{pixels:[[0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0]],slotMap:{1:"skin",2:"skinShadow"},offsetX:0,offsetY:3},square:{pixels:[[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[0,1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,1,1,1,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0]],slotMap:{1:"skin",2:"skinShadow"},offsetX:0,offsetY:3}},k=N;var j={big:{pixels:[[1,1,0,0,0,0,1,1],[1,2,1,0,0,1,2,1],[1,2,3,0,0,1,2,3],[1,1,0,0,0,0,1,1]],slotMap:{1:"white",2:"eyes",3:"pupil"},offsetX:4,offsetY:7},small:{pixels:[[0,2,0,0,0,0,2,0],[0,3,0,0,0,0,3,0]],slotMap:{2:"eyes",3:"pupil"},offsetX:4,offsetY:8},narrow:{pixels:[[1,2,3,0,0,1,2,3]],slotMap:{1:"white",2:"eyes",3:"pupil"},offsetX:4,offsetY:8},round:{pixels:[[0,1,0,0,0,0,1,0],[1,2,1,0,0,1,2,1],[1,2,3,0,0,1,2,3],[0,1,0,0,0,0,1,0]],slotMap:{1:"white",2:"eyes",3:"pupil"},offsetX:4,offsetY:7},wink:{pixels:[[1,1,0,0,0,0,0,0],[1,2,1,0,0,0,0,0],[1,2,3,0,0,3,3,3],[1,1,0,0,0,0,0,0]],slotMap:{1:"white",2:"eyes",3:"pupil"},offsetX:4,offsetY:7},happy:{pixels:[[0,3,3,0,0,0,3,3],[3,0,0,0,0,3,0,0]],slotMap:{3:"pupil"},offsetX:4,offsetY:8},angry:{pixels:[[1,1,0,0,0,0,1,1],[1,2,3,0,0,3,2,1],[0,1,1,0,0,1,1,0]],slotMap:{1:"white",2:"eyes",3:"pupil"},offsetX:4,offsetY:7},dots:{pixels:[[0,0,3,0,0,0,0,3]],slotMap:{3:"pupil"},offsetX:4,offsetY:9},sleepy:{pixels:[[1,1,0,0,0,0,1,1],[3,3,0,0,0,0,3,3]],slotMap:{1:"white",3:"pupil"},offsetX:4,offsetY:8},cross:{pixels:[[3,0,3,0,0,3,0,3],[0,3,0,0,0,0,3,0],[3,0,3,0,0,3,0,3]],slotMap:{3:"pupil"},offsetX:4,offsetY:7},heart:{pixels:[[2,0,2,0,0,2,0,2],[2,2,2,0,0,2,2,2],[0,2,0,0,0,0,2,0]],slotMap:{2:"eyes"},offsetX:4,offsetY:7}},b=j;var H={thick:{pixels:[[1,1,1,0,0,1,1,1],[1,1,1,0,0,1,1,1]],slotMap:{1:"hair"},offsetX:4,offsetY:6},thin:{pixels:[[1,1,1,0,0,1,1,1]],slotMap:{1:"hair"},offsetX:4,offsetY:6},arched:{pixels:[[0,1,1,0,0,0,1,1],[1,0,0,0,0,1,0,0]],slotMap:{1:"hair"},offsetX:4,offsetY:5},angry:{pixels:[[1,0,0,0,0,0,0,1],[0,1,1,0,0,1,1,0]],slotMap:{1:"hair"},offsetX:4,offsetY:5},worried:{pixels:[[0,0,1,0,0,1,0,0],[0,1,0,0,0,0,1,0]],slotMap:{1:"hair"},offsetX:4,offsetY:5},unibrow:{pixels:[[1,1,1,1,1,1,1,1],[1,1,0,0,0,0,1,1]],slotMap:{1:"hair"},offsetX:4,offsetY:5},none:{pixels:[],slotMap:{},offsetX:0,offsetY:0}},P=H;var q={smile:{pixels:[[1,0,0,0,0,1],[0,1,1,1,1,0]],slotMap:{1:"mouth"},offsetX:5,offsetY:12},frown:{pixels:[[0,1,1,1,1,0],[1,0,0,0,0,1]],slotMap:{1:"mouth"},offsetX:5,offsetY:12},open:{pixels:[[0,1,1,1,1,0],[1,1,1,1,1,1],[0,1,1,1,1,0]],slotMap:{1:"mouth"},offsetX:5,offsetY:11},flat:{pixels:[[1,1,1,1,1,1]],slotMap:{1:"mouth"},offsetX:5,offsetY:12},teeth:{pixels:[[0,1,1,1,1,0],[0,2,2,2,2,0],[0,1,1,1,1,0]],slotMap:{1:"mouth",2:"white"},offsetX:5,offsetY:11},smirk:{pixels:[[0,0,0,0,1,0],[0,1,1,1,0,0]],slotMap:{1:"mouth"},offsetX:5,offsetY:12},grin:{pixels:[[0,1,1,1,1,1,1,0],[0,1,2,2,2,2,1,0],[0,0,1,1,1,1,0,0]],slotMap:{1:"mouth",2:"white"},offsetX:4,offsetY:11},tongue:{pixels:[[0,1,1,1,1,0],[0,0,1,1,0,0],[0,0,0,1,0,0]],slotMap:{1:"mouth"},offsetX:5,offsetY:12},oh:{pixels:[[0,1,1,0],[1,0,0,1],[0,1,1,0]],slotMap:{1:"mouth"},offsetX:6,offsetY:11}},A=q;var L={small:{pixels:[[0,1,0],[1,0,1]],slotMap:{1:"skinShadow"},offsetX:7,offsetY:10},pointy:{pixels:[[0,1,0],[0,1,0],[1,0,1]],slotMap:{1:"skinShadow"},offsetX:7,offsetY:9},wide:{pixels:[[0,1,1,0],[1,0,0,1],[1,0,0,1]],slotMap:{1:"skinShadow"},offsetX:6,offsetY:9},button:{pixels:[[1,1]],slotMap:{1:"skinShadow"},offsetX:7,offsetY:10},long:{pixels:[[0,1,0],[0,1,0],[0,1,0],[1,0,1]],slotMap:{1:"skinShadow"},offsetX:7,offsetY:8},snub:{pixels:[[0,1],[1,1]],slotMap:{1:"skinShadow"},offsetX:7,offsetY:10}},E=L;var z={small:{pixels:[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]],slotMap:{1:"skin",2:"skinShadow"},offsetX:0,offsetY:8},big:{pixels:[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]],slotMap:{1:"skin",2:"skinShadow"},offsetX:0,offsetY:7},pointed:{pixels:[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]],slotMap:{1:"skin",2:"skinShadow"},offsetX:0,offsetY:5},elf:{pixels:[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1],[1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1],[1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]],slotMap:{1:"skin",2:"skinShadow"},offsetX:0,offsetY:4},none:{pixels:[],slotMap:{},offsetX:0,offsetY:0}},F=z;var V={short:{pixels:[[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,2,2,0,0,0,0,0,0,0,0,2,2,1,0]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:2},long:{pixels:[[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,1,2,0,0,0,0,0,0,0,0,2,1,1,0],[0,1,2,0,0,0,0,0,0,0,0,0,0,2,1,0],[0,1,2,0,0,0,0,0,0,0,0,0,0,2,1,0],[0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0],[0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0],[0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0],[0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0],[0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0],[0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:2},curly:{pixels:[[0,0,0,1,0,1,1,1,1,1,1,0,1,0,0,0],[0,0,1,0,1,1,1,1,1,1,1,1,0,1,0,0],[0,1,0,1,1,1,1,1,1,1,1,1,1,0,1,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1],[1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1],[0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0],[1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1],[0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:1},mohawk:{pixels:[[0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,2,1,1,1,1,2,0,0,0,0,0]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:0},bald:{pixels:[],slotMap:{},offsetX:0,offsetY:0},ponytail:{pixels:[[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,2,2,0,0,0,0,0,0,0,0,2,1,1,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1],[0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:2},spiky:{pixels:[[0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0],[0,0,0,1,0,1,0,1,1,0,1,0,1,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,2,2,0,0,0,0,0,0,0,0,2,2,1,0]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:0},bob:{pixels:[[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,1,2,0,0,0,0,0,0,0,0,2,1,1,0],[0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0],[0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0],[0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0],[0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:2},afro:{pixels:[[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,2,0,0,0,0,0,0,0,0,2,1,1,1],[1,1,2,0,0,0,0,0,0,0,0,0,0,2,1,1],[1,2,0,0,0,0,0,0,0,0,0,0,0,0,2,1],[1,2,0,0,0,0,0,0,0,0,0,0,0,0,2,1]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:0},bangs:{pixels:[[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0],[0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,2,0,0,0,0,2,1,1,0]],slotMap:{1:"hair",2:"hairShadow"},offsetX:0,offsetY:2}},v=V;var U={stubble:{pixels:[[0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0],[0,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0]],slotMap:{1:"hair"},offsetX:0,offsetY:13},goatee:{pixels:[[0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0]],slotMap:{1:"hair"},offsetX:0,offsetY:13},full:{pixels:[[0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0],[0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0]],slotMap:{1:"hair"},offsetX:0,offsetY:11},mustache:{pixels:[[0,0,1,1,0,0,1,1,0,0],[0,1,0,0,1,1,0,0,1,0]],slotMap:{1:"hair"},offsetX:3,offsetY:11},handlebar:{pixels:[[0,0,1,1,0,0,0,0,1,1,0,0],[0,1,0,0,1,1,1,1,0,0,1,0],[1,0,0,0,0,0,0,0,0,0,0,1]],slotMap:{1:"hair"},offsetX:2,offsetY:11},none:{pixels:[],slotMap:{},offsetX:0,offsetY:0}},R=U;var W={glasses:{pixels:[[0,0,1,1,1,1,0,0,1,1,1,1,0,0],[1,1,1,3,3,1,1,1,1,3,3,1,1,1],[0,0,1,1,1,1,0,0,1,1,1,1,0,0]],slotMap:{1:"accessoryPrimary",3:"lens"},offsetX:1,offsetY:7},sunglasses:{pixels:[[0,0,1,1,1,1,1,1,1,1,1,1,0,0],[1,1,1,2,2,1,1,1,1,2,2,1,1,1],[0,0,1,1,1,1,0,0,1,1,1,1,0,0]],slotMap:{1:"accessoryPrimary",2:"accessorySecondary"},offsetX:1,offsetY:7},hat:{pixels:[[0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0],[0,1,2,2,2,2,2,2,2,2,2,2,2,2,1,0]],slotMap:{1:"accessoryPrimary",2:"accessorySecondary"},offsetX:0,offsetY:0},headband:{pixels:[[0,0,1,1,1,1,1,2,1,1,1,1,1,1,0,0]],slotMap:{1:"accessoryPrimary",2:"accessorySecondary"},offsetX:0,offsetY:5},earrings:{pixels:[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]],slotMap:{1:"accessoryPrimary"},offsetX:0,offsetY:11},none:{pixels:[],slotMap:{},offsetX:0,offsetY:0}},B=W;var Y={faceShape:k,eyes:b,eyebrows:P,mouth:A,nose:E,ears:F,hair:v,beard:R,accessories:B};function X(e,t){return Y[e]?.[t]}function f(e){let t=Y[e];return t?Object.keys(t):[]}function D(){return Object.keys(Y)}var h=16;function Z(e){let t=M(e.skinColor),o=w(t),s=x(e.hairColor),r=S(e.eyeColor);return{skin:t,skinShadow:o,hair:s,hairShadow:T(s,25),eyes:r,pupil:"#111111",white:"#FFFFFF",mouth:"#C75050",accessoryPrimary:"#333333",accessorySecondary:"#1A1A1A",lens:"#87CEEB"}}function T(e,t){let o=parseInt(e.replace("#",""),16),s=Math.max(0,(o>>16)-t),r=Math.max(0,(o>>8&255)-t),i=Math.max(0,(o&255)-t);return`#${(s<<16|r<<8|i).toString(16).padStart(6,"0")}`}function K(e,t,o){for(let s=0;s<t.pixels.length;s++){let r=t.pixels[s];for(let i=0;i<r.length;i++){let l=r[i];if(l===0)continue;let p=t.slotMap[l];if(!p)continue;let a=o[p];if(!a)continue;let g=t.offsetX+i,c=t.offsetY+s;g>=0&&g<h&&c>=0&&c<h&&(e[c][g]=a)}}}var J=[{category:"faceShape",configKey:"faceShape"},{category:"ears",configKey:"ears"},{category:"nose",configKey:"nose"},{category:"mouth",configKey:"mouth"},{category:"eyes",configKey:"eyes"},{category:"eyebrows",configKey:"eyebrows"},{category:"hair",configKey:"hair"},{category:"beard",configKey:"beard"},{category:"accessories",configKey:"accessories"}];function _(e){let t=Array.from({length:h},()=>Array.from({length:h},()=>null)),o=Z(e);for(let s of J){let r=e[s.configKey];if(!r||r==="none")continue;let i=X(s.category,r);i&&K(t,i,o)}return t}function $(e,t,o,s,r){let i=Array.from({length:h},()=>Array.from({length:h},()=>null)),l=M(o),p={skin:l,skinShadow:w(l),hair:x(s),hairShadow:T(x(s),25),eyes:S(r),pupil:"#111111",white:"#FFFFFF",mouth:"#C75050",accessoryPrimary:"#333333",accessorySecondary:"#1A1A1A",lens:"#87CEEB"},a=X(e,t);return a&&K(i,a,p),i}function C(e,t){let o=e.length,s=o>0?e[0].length:0,r=t??"#87CEEB",i=r==="transparent"?"transparent":u(r,"#87CEEB"),l=[];i!=="transparent"&&l.push(`<rect width="${s}" height="${o}" fill="${i}"/>`);for(let p=0;p<o;p++){let a=0;for(;a<s;){let g=e[p][a];if(g===null){a++;continue}let c=1;for(;a+c<s&&e[p][a+c]===g;)c++;l.push(`<rect x="${a}" y="${p}" width="${c}" height="1" fill="${g}"/>`),a+=c}}return[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${s} ${o}" shape-rendering="crispEdges">`,...l,"</svg>"].join("")}function n(e){return e[Math.floor(Math.random()*e.length)]}function Q(){return{faceShape:n(f("faceShape")),eyes:n(f("eyes")),eyebrows:n(f("eyebrows")),mouth:n(f("mouth")),nose:n(f("nose")),ears:n(f("ears")),hair:n(f("hair")),beard:n(f("beard")),accessories:n(f("accessories")),skinColor:n(Object.keys(d)),hairColor:n(Object.keys(y)),eyeColor:n(Object.keys(m))}}function F1(e){let t=e??Q(),o=_(t);return C(o,t.backgroundColor)}function v1(){let e={};for(let t of D())e[t]=f(t);return e}function R1(e,t,o,s,r){let i=$(e,t,o,s,r);return C(i)}var e1={idle:{name:"idle",frames:[{duration:3e3,overrides:{}},{duration:150,overrides:{eyes:"happy"}},{duration:150,overrides:{}}]},talk:{name:"talk",frames:[{duration:200,overrides:{mouth:"smile"}},{duration:200,overrides:{mouth:"open"}},{duration:200,overrides:{mouth:"flat"}},{duration:200,overrides:{mouth:"open"}},{duration:300,overrides:{mouth:"smile"}}]},blink:{name:"blink",frames:[{duration:2500,overrides:{}},{duration:100,overrides:{eyes:"narrow"}},{duration:100,overrides:{eyes:"happy"}},{duration:100,overrides:{eyes:"narrow"}},{duration:200,overrides:{}}]},emote:{name:"emote",frames:[{duration:500,overrides:{}},{duration:400,overrides:{eyebrows:"arched",mouth:"open"}},{duration:400,overrides:{eyebrows:"arched",mouth:"smile"}},{duration:300,overrides:{}}]}};function D1(){return Object.keys(e1)}export{d as a,y as b,m as c,Q as d,F1 as e,v1 as f,R1 as g,e1 as h,D1 as i};
|