UNPKG

@dicebear/avatars

Version:
33 lines (32 loc) 37.6 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).DiceBear={})}(this,(function(t){"use strict";function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){if(null==t)return{};var r,n,a=function(t,e){if(null==t)return{};var r,n,a={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function s(t){return function(t){if(Array.isArray(t))return t}(t)||f(t)||p(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t){return function(t){if(Array.isArray(t))return h(t)}(t)||f(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function d(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=p(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){c=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw i}}}}function g(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var v=-2147483648,b=2147483647;function m(t){return t^=t<<13,t^=t>>17,t^=t<<5}function y(t){var e,r=function(t){for(var e=0,r=0;r<t.length;r++)e=m(e=(e<<5)-e+t.charCodeAt(r)|0);return e}(t=null!==(e=t)&&void 0!==e?e:v+Math.floor((b-v)*Math.random()).toString())||1,n=function(t,e){return Math.floor(((r=m(r))-v)/(b-v)*(e+1-t)+t)};return{seed:t,bool:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return n(0,100)<t},integer:function(t,e){return n(t,e)},pick:function(t){return t[n(0,t.length-1)]}}}var A=Object.freeze({__proto__:null,create:y}),F=function(){function t(e){a(this,t),c(this,"prng",void 0),c(this,"seed",void 0),this.prng=y(e),this.seed=this.prng.seed}return o(t,[{key:"bool",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return this.prng.bool(t)}},{key:"integer",value:function(t,e){return this.prng.integer(t,e)}},{key:"pickone",value:function(t){return this.prng.pick(t)}}]),t}();var E=function(t){4!==t.length&&5!==t.length||(t=function(t){for(var e="#",r=1;r<t.length;r++){var n=t.charAt(r);e+=n+n}return e}(t));var e=[parseInt(t.substring(1,3),16),parseInt(t.substring(3,5),16),parseInt(t.substring(5,7),16)];if(9===t.length){var r=parseFloat((parseInt(t.substring(7,9),16)/255).toFixed(2));e.push(r)}return e};var w=function(t){var e,r,n=t[0],a=t[1],i=t[2],o=Math.min(n,a,i),c=Math.max(n,a,i),u=c-o;return r=0==c?0:u/c*1e3/10,c==o?e=0:n==c?e=(a-i)/u:a==c?e=2+(i-n)/u:i==c&&(e=4+(n-a)/u),(e=Math.min(60*e,360))<0&&(e+=360),[e,r,c/255*1e3/10]};var C=function(t,e,r){return Math.min(Math.max(t,e),r)};function x(t){var e=Math.round(C(t,0,255)).toString(16);return 1==e.length?"0"+e:e}var j=function(t){var e=4===t.length?x(255*t[3]):"";return"#"+x(t[0])+x(t[1])+x(t[2])+e};var B=function(t){var e=t[0]/60,r=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,i=e-Math.floor(e),o=255*n*(1-r),c=255*n*(1-r*i),u=255*n*(1-r*(1-i));switch(n*=255,a){case 0:return[n,u,o];case 1:return[c,n,o];case 2:return[o,n,u];case 3:return[o,c,n];case 4:return[u,o,n];case 5:return[n,o,c]}},_={amber:{50:"#FFF8E1",100:"#FFECB3",200:"#FFE082",300:"#FFB74D",400:"#FFCA28",500:"#FFC107",600:"#FFB300",700:"#FFA000",800:"#FF8F00",900:"#FF6F00"},blue:{50:"#E3F2FD",100:"#BBDEFB",200:"#90CAF9",300:"#64B5F6",400:"#42A5F5",500:"#2196F3",600:"#1E88E5",700:"#1976D2",800:"#1565C0",900:"#0D47A1"},blueGrey:{50:"#ECEFF1",100:"#CFD8DC",200:"#B0BEC5",300:"#90A4AE",400:"#78909C",500:"#607D8B",600:"#546E7A",700:"#455A64",800:"#37474F",900:"#263238"},brown:{50:"#EFEBE9",100:"#D7CCC8",200:"#BCAAA4",300:"#A1887F",400:"#8D6E63",500:"#795548",600:"#6D4C41",700:"#5D4037",800:"#4E342E",900:"#3E2723"},cyan:{50:"#E0F7FA",100:"#B2EBF2",200:"#80DEEA",300:"#4DD0E1",400:"#26C6DA",500:"#00BCD4",600:"#00ACC1",700:"#0097A7",800:"#00838F",900:"#006064"},deepOrange:{50:"#FBE9E7",100:"#FFCCBC",200:"#FFAB91",300:"#A1887F",400:"#FF7043",500:"#FF5722",600:"#F4511E",700:"#E64A19",800:"#D84315",900:"#BF360C"},deepPurple:{50:"#EDE7F6",100:"#D1C4E9",200:"#B39DDB",300:"#9575CD",400:"#7E57C2",500:"#673AB7",600:"#5E35B1",700:"#512DA8",800:"#4527A0",900:"#311B92"},green:{50:"#E8F5E9",100:"#C8E6C9",200:"#A5D6A7",300:"#81C784",400:"#66BB6A",500:"#4CAF50",600:"#43A047",700:"#388E3C",800:"#2E7D32",900:"#1B5E20"},grey:{50:"#FAFAFA",100:"#F5F5F5",200:"#EEEEEE",300:"#E0E0E0",400:"#BDBDBD",500:"#9E9E9E",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},indigo:{50:"#E8EAF6",100:"#C5CAE9",200:"#9FA8DA",300:"#7986CB",400:"#5C6BC0",500:"#3F51B5",600:"#3949AB",700:"#303F9F",800:"#283593",900:"#1A237E"},lightBlue:{50:"#E1F5FE",100:"#B3E5FC",200:"#81D4FA",300:"#4FC3F7",400:"#29B6F6",500:"#03A9F4",600:"#039BE5",700:"#0288D1",800:"#0277BD",900:"#01579B"},lightGreen:{50:"#F1F8E9",100:"#DCEDC8",200:"#C5E1A5",300:"#AED581",400:"#9CCC65",500:"#8BC34A",600:"#7CB342",700:"#689F38",800:"#558B2F",900:"#33691E"},lime:{50:"#F9FBE7",100:"#F0F4C3",200:"#E6EE9C",300:"#DCE775",400:"#D4E157",500:"#CDDC39",600:"#C0CA33",700:"#AFB42B",800:"#9E9D24",900:"#827717"},orange:{50:"#FFF3E0",100:"#FFE0B2",200:"#FFCC80",300:"#FF8A65",400:"#FFA726",500:"#FF9800",600:"#FB8C00",700:"#F57C00",800:"#EF6C00",900:"#E65100"},pink:{50:"#FCE4EC",100:"#F8BBD0",200:"#F48FB1",300:"#F06292",400:"#EC407A",500:"#E91E63",600:"#D81B60",700:"#C2185B",800:"#AD1457",900:"#880E4F"},purple:{50:"#F3E5F5",100:"#E1BEE7",200:"#CE93D8",300:"#BA68C8",400:"#AB47BC",500:"#9C27B0",600:"#8E24AA",700:"#7B1FA2",800:"#6A1B9A",900:"#4A148C"},red:{50:"#FFEBEE",100:"#FFCDD2",200:"#EF9A9A",300:"#E57373",400:"#EF5350",500:"#F44336",600:"#E53935",700:"#D32F2F",800:"#C62828",900:"#B71C1C"},teal:{50:"#E0F2F1",100:"#B2DFDB",200:"#80CBC4",300:"#4DB6AC",400:"#26A69A",500:"#009688",600:"#00897B",700:"#00796B",800:"#00695C",900:"#004D40"},yellow:{50:"#FFFDE7",100:"#FFF9C4",200:"#FFF59D",300:"#FFF176",400:"#FFEE58",500:"#FFEB3B",600:"#FDD835",700:"#FBC02D",800:"#F9A825",900:"#F57F17"}},O=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#000";if(a(this,t),c(this,"alpha",1),c(this,"color",{}),"#"==e[0])this.hex=e;else{var r=/^(rgb|rgba|hsv)\(([0-9\%\,\.\s]+)\)$/.exec(e.trim());if(!r)throw new Error("Unknown color format: "+e);var n=r[2].split(",").map((function(t){return parseInt(t.trim())}));switch(r[1]){case"rgb":this.rgb=n;break;case"rgba":this.rgba=n;break;case"hsv":this.hsv=n;break;default:throw new Error("Unsupported color format: "+e)}}}return o(t,[{key:"clone",value:function(){return new t("rgb("+this.rgb.join(",")+")")}},{key:"rgb",get:function(){return this.color.rgb=this.color.rgb||(this.color.hex?this.hexToRgb(this.hex):this.hsvToRgb(this.hsv))},set:function(t){if(3!=t.length)throw new Error("An array with a length of 3 is expected.");this.alpha=1,this.color={rgb:t}}},{key:"rgba",get:function(){return[this.rgb[0],this.rgb[1],this.rgb[2],this.alpha]},set:function(t){if(4!=t.length)throw new Error("An array with a length of 3 is expected.");this.rgb=[t[0],t[1],t[2]],this.alpha=t[3]}},{key:"hsv",get:function(){return(this.color.hsv=this.color.hsv||this.rgbToHsv(this.rgb)).slice(0)},set:function(t){if(3!=t.length)throw new Error("An array with a length of 3 is expected.");this.alpha=1,this.color={hsv:t}}},{key:"hex",get:function(){return(this.color.hex=this.color.hex||this.rgbToHex(this.rgb)).slice(0)},set:function(t){this.alpha=1,this.color={hex:t}}},{key:"brighterThan",value:function(t,e){var r=this.hsv,n=t.hsv;return r[2]>=n[2]+e||(r[2]=n[2]+e,r[2]>360&&(r[2]=360),this.hsv=r),this}},{key:"darkerThan",value:function(t,e){var r=this.hsv,n=t.hsv;return r[2]<=n[2]-e||(r[2]=n[2]-e,r[2]<0&&(r[2]=0),this.hsv=r),this}},{key:"brighterOrDarkerThan",value:function(t,e){var r=this.hsv,n=t.hsv;return r[2]<=n[2]?this.darkerThan(t,e):this.brighterThan(t,e)}},{key:"rgbToHex",value:function(t){return j(t)}},{key:"hexToRgb",value:function(t){return E(t).map((function(t){return Math.round(t)}))}},{key:"rgbToHsv",value:function(t){return w(t).map((function(t){return Math.round(t)}))}},{key:"hsvToRgb",value:function(t){return B(t).map((function(t){return Math.round(t)}))}}]),t}();c(O,"collection",_);var k=Object.freeze({__proto__:null,collection:_,default:O}),D=function(t){return null!=t&&"object"===n(t)&&!1===Array.isArray(t)}; /*! * isobject <https://github.com/jonschlinkert/isobject> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ /*! * is-plain-object <https://github.com/jonschlinkert/is-plain-object> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ function S(t){return!0===D(t)&&"[object Object]"===Object.prototype.toString.call(t)}var N={}.toString,M=Array.isArray||function(t){return"[object Array]"==N.call(t)},T=function(t,e){if(null==t)return!1;if("boolean"==typeof t)return!0;if("number"==typeof t)return 0!==t||!0!==e;if(void 0!==t.length)return 0!==t.length;for(var r in t)if(t.hasOwnProperty(r))return!0;return!1},P=function(t,e,r,a,i){if(null===(o=t)||"object"!==n(o)&&"function"!=typeof o||!e)return t;var o;if(e=z(e),r&&(e+="."+z(r)),a&&(e+="."+z(a)),i&&(e+="."+z(i)),e in t)return t[e];for(var c=e.split("."),u=c.length,s=-1;t&&++s<u;){for(var l=c[s];"\\"===l[l.length-1];)l=l.slice(0,-1)+"."+c[++s];t=t[l]}return t};function z(t){return t?Array.isArray(t)?t.join("."):t:""} /*! * has-value <https://github.com/jonschlinkert/has-value> * * Copyright (c) 2014-2016, Jon Schlinkert. * Licensed under the MIT License. */var I=function(t,e,r){return null!=(a=t)&&"object"===n(a)&&!1===M(a)?T(P(t,e),r):T(t,e);var a},R=function(t,e){if(!D(t))throw new TypeError("expected an object.");if(t.hasOwnProperty(e))return delete t[e],!0;if(I(t,e)){for(var r=e.split("."),n=r.pop();r.length&&"\\"===r[r.length-1].slice(-1);)n=r.pop().slice(0,-1)+"."+n;for(;r.length;)t=t[e=r.shift()];return delete t[n]}return!0},q=function t(e,r){if(void 0===e)return{};if(Array.isArray(e)){for(var n=0;n<e.length;n++)e[n]=t(e[n],r);return e}if(!1===S(a=e)||"function"!=typeof(i=a.constructor)||!1===S(o=i.prototype)||!1===o.hasOwnProperty("isPrototypeOf"))return e;var a,i,o;if("string"==typeof r&&(r=[r]),!Array.isArray(r))return e;for(var c=0;c<r.length;c++)R(e,r[c]);for(var u in e)e.hasOwnProperty(u)&&(e[u]=t(e[u],r));return e},V=function(t){return null!=t&&(W(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&W(t.slice(0,0))}(t)||!!t._isBuffer)}; /*! * unset-value <https://github.com/jonschlinkert/unset-value> * * Copyright (c) 2015, 2017, Jon Schlinkert. * Released under the MIT License. */function W(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var U=Object.prototype.toString,$=function(t){if(void 0===t)return"undefined";if(null===t)return"null";if(!0===t||!1===t||t instanceof Boolean)return"boolean";if("string"==typeof t||t instanceof String)return"string";if("number"==typeof t||t instanceof Number)return"number";if("function"==typeof t||t instanceof Function)return"function";if(void 0!==Array.isArray&&Array.isArray(t))return"array";if(t instanceof RegExp)return"regexp";if(t instanceof Date)return"date";var e=U.call(t);return"[object RegExp]"===e?"regexp":"[object Date]"===e?"date":"[object Arguments]"===e?"arguments":"[object Error]"===e?"error":V(t)?"buffer":"[object Set]"===e?"set":"[object WeakSet]"===e?"weakset":"[object Map]"===e?"map":"[object WeakMap]"===e?"weakmap":"[object Symbol]"===e?"symbol":"[object Int8Array]"===e?"int8array":"[object Uint8Array]"===e?"uint8array":"[object Uint8ClampedArray]"===e?"uint8clampedarray":"[object Int16Array]"===e?"int16array":"[object Uint16Array]"===e?"uint16array":"[object Int32Array]"===e?"int32array":"[object Uint32Array]"===e?"uint32array":"[object Float32Array]"===e?"float32array":"[object Float64Array]"===e?"float64array":"object"};function L(t){var e={exports:{}};return t(e,e.exports),e.exports}var H=L((function(t){!function(){function e(t,e){if("function"!=typeof e)return t;var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[e(n,t[n])||n]=t[n]);return r}t.exports?t.exports=e:window.rename=e}()})),Z=function t(e,r){var n=$(e);if("object"!==n&&"array"!==n)throw new Error("expected an object");var a=[];for(var i in"object"===n&&(e=H(e,r),a={}),e)if(e.hasOwnProperty(i)){var o=e[i];"object"===$(o)||"array"===$(o)?a[i]=t(o,r):a[i]=o}return a},X=L((function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}function a(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function i(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),i.prototype.eventNames=function(){var t,n,a=[];if(0===this._eventsCount)return a;for(n in t=this._events)e.call(t,n)&&a.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(t)):a},i.prototype.listeners=function(t,e){var n=r?r+t:t,a=this._events[n];if(e)return!!a;if(!a)return[];if(a.fn)return[a.fn];for(var i=0,o=a.length,c=new Array(o);i<o;i++)c[i]=a[i].fn;return c},i.prototype.emit=function(t,e,n,a,i,o){var c=r?r+t:t;if(!this._events[c])return!1;var u,s,l=this._events[c],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,a),!0;case 5:return l.fn.call(l.context,e,n,a,i),!0;case 6:return l.fn.call(l.context,e,n,a,i,o),!0}for(s=1,u=new Array(f-1);s<f;s++)u[s-1]=arguments[s];l.fn.apply(l.context,u)}else{var p,h=l.length;for(s=0;s<h;s++)switch(l[s].once&&this.removeListener(t,l[s].fn,void 0,!0),f){case 1:l[s].fn.call(l[s].context);break;case 2:l[s].fn.call(l[s].context,e);break;case 3:l[s].fn.call(l[s].context,e,n);break;case 4:l[s].fn.call(l[s].context,e,n,a);break;default:if(!u)for(p=1,u=new Array(f-1);p<f;p++)u[p-1]=arguments[p];l[s].fn.apply(l[s].context,u)}}return!0},i.prototype.on=function(t,e,n){var i=new a(e,n||this),o=r?r+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},i.prototype.once=function(t,e,n){var i=new a(e,n||this,!0),o=r?r+t:t;return this._events[o]?this._events[o].fn?this._events[o]=[this._events[o],i]:this._events[o].push(i):(this._events[o]=i,this._eventsCount++),this},i.prototype.removeListener=function(t,e,a,i){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return 0==--this._eventsCount?this._events=new n:delete this._events[o],this;var c=this._events[o];if(c.fn)c.fn!==e||i&&!c.once||a&&c.context!==a||(0==--this._eventsCount?this._events=new n:delete this._events[o]);else{for(var u=0,s=[],l=c.length;u<l;u++)(c[u].fn!==e||i&&!c[u].once||a&&c[u].context!==a)&&s.push(c[u]);s.length?this._events[o]=1===s.length?s[0]:s:0==--this._eventsCount?this._events=new n:delete this._events[o]}return this},i.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new n:delete this._events[e])):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prototype.setMaxListeners=function(){return this},i.prefixed=r,i.EventEmitter=i,t.exports=i})); /*! * deep-rename-keys <https://github.com/jonschlinkert/deep-rename-keys> * * Copyright (c) 2015 Jon Schlinkert, contributors. * Licensed under the MIT license. */function Y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var G=function(){},J={data:"state-data",cdata:"state-cdata",tagBegin:"state-tag-begin",tagName:"state-tag-name",tagEnd:"state-tag-end",attributeNameStart:"state-attribute-name-start",attributeName:"state-attribute-name",attributeNameEnd:"state-attribute-name-end",attributeValueBegin:"state-attribute-value-begin",attributeValue:"state-attribute-value"},K={lt:"action-lt",gt:"action-gt",space:"action-space",equal:"action-equal",quote:"action-quote",slash:"action-slash",char:"action-char",error:"action-error"},Q={text:"text",openTag:"open-tag",closeTag:"close-tag",attributeName:"attribute-name",attributeValue:"attribute-value"},tt={" ":K.space,"\t":K.space,"\n":K.space,"\r":K.space,"<":K.lt,">":K.gt,'"':K.quote,"'":K.quote,"=":K.equal,"/":K.slash},et=function(t){var e,r,n,a,i,o,c,u,s,l;t=Object.assign({debug:!1},t);var f=new X,p=J.data,h="",d="",g="",v="",b="",m="",y=function(e,r){if("?"!==d[0]&&"!"!==d[0]){var n={type:e,value:r};t.debug&&console.log("emit:",n),f.emit("data",n)}};f.stateMachine=(Y(l={},J.data,(Y(e={},K.lt,(function(){h.trim()&&y(Q.text,h),d="",b=!1,p=J.tagBegin})),Y(e,K.char,(function(t){h+=t})),e)),Y(l,J.cdata,Y({},K.char,(function(t){"]]>"===(h+=t).substr(-3)&&(y(Q.text,h.slice(0,-3)),h="",p=J.data)}))),Y(l,J.tagBegin,(Y(r={},K.space,G),Y(r,K.char,(function(t){d=t,p=J.tagName})),Y(r,K.slash,(function(){d="",b=!0})),r)),Y(l,J.tagName,(Y(n={},K.space,(function(){b?p=J.tagEnd:(p=J.attributeNameStart,y(Q.openTag,d))})),Y(n,K.gt,(function(){y(b?Q.closeTag:Q.openTag,d),h="",p=J.data})),Y(n,K.slash,(function(){p=J.tagEnd,y(Q.openTag,d)})),Y(n,K.char,(function(t){"![CDATA["===(d+=t)&&(p=J.cdata,h="",d="")})),n)),Y(l,J.tagEnd,(Y(a={},K.gt,(function(){y(Q.closeTag,d),h="",p=J.data})),Y(a,K.char,G),a)),Y(l,J.attributeNameStart,(Y(i={},K.char,(function(t){g=t,p=J.attributeName})),Y(i,K.gt,(function(){h="",p=J.data})),Y(i,K.space,G),Y(i,K.slash,(function(){b=!0,p=J.tagEnd})),i)),Y(l,J.attributeName,(Y(o={},K.space,(function(){p=J.attributeNameEnd})),Y(o,K.equal,(function(){y(Q.attributeName,g),p=J.attributeValueBegin})),Y(o,K.gt,(function(){v="",y(Q.attributeName,g),y(Q.attributeValue,v),h="",p=J.data})),Y(o,K.slash,(function(){b=!0,v="",y(Q.attributeName,g),y(Q.attributeValue,v),p=J.tagEnd})),Y(o,K.char,(function(t){g+=t})),o)),Y(l,J.attributeNameEnd,(Y(c={},K.space,G),Y(c,K.equal,(function(){y(Q.attributeName,g),p=J.attributeValueBegin})),Y(c,K.gt,(function(){v="",y(Q.attributeName,g),y(Q.attributeValue,v),h="",p=J.data})),Y(c,K.char,(function(t){v="",y(Q.attributeName,g),y(Q.attributeValue,v),g=t,p=J.attributeName})),c)),Y(l,J.attributeValueBegin,(Y(u={},K.space,G),Y(u,K.quote,(function(t){m=t,v="",p=J.attributeValue})),Y(u,K.gt,(function(){y(Q.attributeValue,v=""),h="",p=J.data})),Y(u,K.char,(function(t){m="",v=t,p=J.attributeValue})),u)),Y(l,J.attributeValue,(Y(s={},K.space,(function(t){m?v+=t:(y(Q.attributeValue,v),p=J.attributeNameStart)})),Y(s,K.quote,(function(t){m===t?(y(Q.attributeValue,v),p=J.attributeNameStart):v+=t})),Y(s,K.gt,(function(t){m?v+=t:(y(Q.attributeValue,v),h="",p=J.data)})),Y(s,K.slash,(function(t){m?v+=t:(y(Q.attributeValue,v),b=!0,p=J.tagEnd)})),Y(s,K.char,(function(t){v+=t})),s)),l);var A=function(e){t.debug&&console.log(p,e);var r=f.stateMachine[p],n=r[function(t){return tt[t]||K.char}(e)]||r[K.error]||r[K.char];n(e)};return f.write=function(t){for(var e=t.length,r=0;r<e;r++)A(t[r])},f},rt=Q,nt={element:"element",text:"text"},at=function(t){return Object.assign({name:"",type:nt.element,value:"",parent:null,attributes:{},children:[]},t)},it=function(t){t=Object.assign({stream:!1,parentNodes:!0,doneEvent:"done",tagPrefix:"tag:",emitTopLevelOnly:!1,debug:!1},t);var e=void 0,r=void 0,n=void 0,a=void 0,i=new X,o=function(o){switch(o.type){case rt.openTag:if(null===n)(n=r).name=o.value;else{var c=at({name:o.value,parent:n});n.children.push(c),n=c}break;case rt.closeTag:var u=n.parent;if(t.parentNodes||(n.parent=null),n.name!==o.value)break;t.stream&&u===r&&(r.children=[],n.parent=null),t.emitTopLevelOnly&&u!==r||(i.emit(t.tagPrefix+n.name,n),i.emit("tag",n.name,n)),n===r&&(e.removeAllListeners("data"),i.emit(t.doneEvent,n),r=null),n=u;break;case rt.text:n&&n.children.push(at({type:nt.text,value:o.value,parent:t.parentNodes?n:null}));break;case rt.attributeName:a=o.value,n.attributes[a]="";break;case rt.attributeValue:n.attributes[a]=o.value}};return i.reset=function(){(e=et({debug:t.debug})).on("data",o),r=at(),n=null,a="",i.parse=e.write},i.reset(),i},ot=function(t,e){e=Object.assign({},e,{stream:!1,tagPrefix:":"});var r=it(e),n=void 0;return r.on("done",(function(t){n=t})),r.parse(t),n},ct=function(t){var e=ot("<root>".concat(t,"</root>"),{parentNodes:!1});if(e.children&&e.children.length>0&&e.children.every((function(t){return"svg"===t.name})))return 1===e.children.length?e.children[0]:e.children;throw Error("nothing to parse")},ut=function(t){return q(t,["parent"])},st=function(t){return Z(t,(function(t){return ft(t)?t:lt(t)}))},lt=function(t){return t.replace(/[-|:]([a-z])/gi,(function(t,e){return e.toUpperCase()}))},ft=function(t){return/^(data|aria)(-\w+)/.test(t)},pt=function(t){if(t){var e=String(t);return/[&<>]/.test(e)?"<![CDATA[".concat(e.replace(/]]>/,"]]]]><![CDATA[>"),"]]>"):e}return""},ht=function(t){return String(t).replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},dt=function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.transformAttr,a=void 0===n?function(t,e,r){return"".concat(t,'="').concat(r(e),'"')}:n,i=r.transformNode,o=void 0===i?function(t){return t}:i,c=r.selfClose,u=void 0===c||c;if(Array.isArray(e))return e.map((function(e){return t(e,{transformAttr:a,selfClose:u,transformNode:o})})).join("");var s=o(e);if("text"===s.type)return pt(s.value);var l="";for(var f in s.attributes){var p=a(f,s.attributes[f],ht,s.name);l+=p?" ".concat(p):""}return s.children&&s.children.length>0||!u?"<".concat(s.name).concat(l,">").concat(t(s.children,{transformAttr:a,transformNode:o,selfClose:u}),"</").concat(s.name,">"):"<".concat(s.name).concat(l,"/>")},gt=function(){function t(){a(this,t)}return o(t,null,[{key:"parse",value:function(t){return"string"==typeof t?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.transformNode,n=void 0===r?function(t){return t}:r,a=e.camelcase,i=void 0!==a&&a,o=function(t){var e;return e=ut(t),e=n(e),i&&(e=st(e)),e};return o(ct(t))}(t):t}},{key:"stringify",value:function(t){return"string"==typeof t?t:dt(t)}}]),t}();function vt(t){return t.replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var bt=Object.freeze({__proto__:null,xml:vt}),mt={type:"object",$schema:"http://json-schema.org/draft-07/schema#",title:"Options",properties:{seed:{title:"Seed",type:"string"},s:{title:"Seed",type:"string"},base64:{title:"Base64",description:"@deprecated use dataUri instead",type:"boolean",default:!1},dataUri:{title:"Data URI",type:"boolean",default:!1},userAgent:{title:"User Agent",description:"@deprecated",type:"string"},flip:{title:"Flip",type:"boolean",default:!1},rotate:{title:"Rotate",type:"integer",minimum:0,maximum:360,default:0},scale:{title:"Scale",type:"integer",minimum:0,maximum:200,default:100},radius:{title:"Radius",type:"integer",minimum:0,maximum:50,default:0},r:{title:"Radius",type:"integer",minimum:0,maximum:50,default:0},width:{title:"Width",description:"@deprecated use size instead",type:"integer",minimum:1},w:{title:"Width",description:"@deprecated use size instead",type:"integer",minimum:1},height:{title:"Height",description:"@deprecated use size instead",type:"integer",minimum:1},h:{title:"Height",description:"@deprecated use size instead",type:"integer",minimum:1},size:{title:"Size",type:"integer",minimum:1},margin:{title:"Margin",description:"@deprecated use scale instead",type:"integer",minimum:0,maximum:25,default:0},m:{title:"Margin",description:"@deprecated use scale instead",type:"integer",minimum:0,maximum:25,default:0},backgroundColor:{title:"Background Color",anyOf:[{type:"string",pattern:"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"},{type:"string",pattern:"^[0-9a-zA-Z]+$"},{type:"array",items:{anyOf:[{type:"string",pattern:"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"},{type:"string",pattern:"^[0-9a-zA-Z]+$"}]}}]},background:{title:"Background Color",anyOf:[{type:"string",pattern:"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"},{type:"string",pattern:"^[0-9a-zA-Z]+$"},{type:"array",items:{anyOf:[{type:"string",pattern:"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"},{type:"string",pattern:"^[0-9a-zA-Z]+$"}]}}],description:"@deprecated use backgroundColor instead"},b:{title:"Background Color",anyOf:[{type:"string",pattern:"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"},{type:"string",pattern:"^[0-9a-zA-Z]+$"},{type:"array",items:{anyOf:[{type:"string",pattern:"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"},{type:"string",pattern:"^[0-9a-zA-Z]+$"}]}}]},translateX:{title:"Translate X%",type:"integer",minimum:-100,maximum:100,default:0},translateY:{title:"Translate Y%",type:"integer",minimum:-100,maximum:100,default:0}},additionalProperties:!1};function yt(t){return t.properties||{}}function At(t){var e={},a=yt(t);return Object.keys(a).forEach((function(t){var i=a[t];"object"===n(i)&&void 0!==i.default&&(Array.isArray(i.default)?e[t]=l(i.default):"object"===n(i.default)?e[t]=r({},i.default):e[t]=i.default)})),e}function Ft(t){var e={},r=yt(t);return Object.keys(r).forEach((function(t){var a=r[t];if("object"===n(a)){var i=a.title;i&&(e[i]=e[i]||[],e[i].push(t))}})),Object.values(e).filter((function(t){return t.length>1})).map((function(t){return t.sort().sort((function(t,e){return t.length===e.length?0:t.length>e.length?1:-1}))}))}function Et(t){var e,r=new Map,n=d(Ft(t));try{for(n.s();!(e=n.n()).done;){var a,i=s(e.value.reverse()),o=i[0],c=d(i.slice(1));try{for(c.s();!(a=c.n()).done;){var u=a.value;r.set(u,o)}}catch(t){c.e(t)}finally{c.f()}}}catch(t){n.e(t)}finally{n.f()}return r}var wt=Object.freeze({__proto__:null,properties:yt,defaults:At,aliases:Ft,aliasesMap:Et});function Ct(t,e){return t[e],u(t,[e].map(g))}var xt=Object.freeze({__proto__:null,omit:Ct});function jt(t,e){var r=[{seed:Math.random().toString(),userAgent:"undefined"!=typeof window&&window.navigator&&window.navigator.userAgent},At(mt),At(t.schema),e],n=Bt(t);return r.forEach((function(t){n=Object.assign(n,Ct(t,"_aliases"))})),n}function Bt(t){var e=new Map([].concat(l(Array.from(Et(mt))),l(Array.from(Et(t.schema)))));return new Proxy({_aliases:e},{get:function(t,e){var r,n=null!==(r=t._aliases.get(e))&&void 0!==r?r:e;return t[n]},set:function(t,e,r){var n,a=null!==(n=t._aliases.get(e))&&void 0!==n?n:e;return t[a]=r,!0},deleteProperty:function(t,e){var r,n=null!==(r=t._aliases.get(e))&&void 0!==r?r:e;return delete t[n],!0}})}var _t=Object.freeze({__proto__:null,merge:jt,createAliasProxy:Bt}),Ot={by:{permits:["Reproduction","Distribution","DerivativeWorks"],requires:["Notice","Attribution"],prohibits:[]},"by-sa":{permits:["Reproduction","Distribution","DerivativeWorks"],requires:["Notice","Attribution","ShareAlike"],prohibits:[]},"by-nd":{permits:["Reproduction","Distribution"],requires:["Notice","Attribution"],prohibits:[]},"by-nc":{permits:["Reproduction","Distribution","DerivativeWorks"],requires:["Notice","Attribution"],prohibits:["CommercialUse"]},"by-nc-sa":{permits:["Reproduction","Distribution","DerivativeWorks"],requires:["Notice","Attribution","ShareAlike"],prohibits:["CommercialUse"]},"by-nc-nd":{permits:["Reproduction","Distribution"],requires:["Notice","Attribution"],prohibits:["CommercialUse"]},zero:{permits:["Reproduction","Distribution","DerivativeWorks"],requires:[],prohibits:[]}};function kt(){return{"xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg"}}function Dt(t){return'\n<metadata>\n<rdf:RDF>\n<cc:Work>\n<dc:format>image/svg+xml</dc:format>\n<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />\n'.concat(St(t),"\n").concat(Nt(t),"\n").concat(Mt(t),"\n").concat(Tt(t),"\n").concat(Pt(t),"\n</cc:Work>\n").concat(It(t),"\n</rdf:RDF>\n</metadata>\n")}function St(t){return t.meta.title?"<dc:title>".concat(t.meta.title,"</dc:title>"):""}function Nt(t){if(t.meta.creator){var e=Array.isArray(t.meta.creator)?t.meta.creator:[t.meta.creator];return"\n<dc:creator>\n".concat(zt(e),"\n</dc:creator>\n")}return""}function Mt(t){return t.meta.source?"<dc:source>".concat(t.meta.source,"</dc:source>"):""}function Tt(t){return t.meta.license?'<cc:license rdf:resource="'.concat(t.meta.license.url,'" />'):""}function Pt(t){if(t.meta.contributor){var e=Array.isArray(t.meta.contributor)?t.meta.contributor:[t.meta.contributor];return"\n<dc:contributor>\n".concat(zt(e),"\n</dc:contributor>\n")}return""}function zt(t){return t.map((function(t){return"\n<cc:Agent>\n<dc:title>".concat(t,"</dc:title>\n</cc:Agent>\n")}))}function It(t){var e,r=null===(e=t.meta.license)||void 0===e?void 0:e.url.match(/^https?:\/\/creativecommons.org\/(?:licenses|publicdomain)\/([a-z\-]+)\/\d.\d\//);if(r){var n=Ot[r[1]];if(n){var a,i="";return n.permits.forEach((function(t){i+='<cc:permits rdf:resource="https://creativecommons.org/ns#'.concat(t,'" />')})),n.requires.forEach((function(t){i+='<cc:requires rdf:resource="https://creativecommons.org/ns#'.concat(t,'" />')})),n.prohibits.forEach((function(t){i+='<cc:prohibits rdf:resource="https://creativecommons.org/ns#'.concat(t,'" />')})),'\n<cc:License rdf:about="'.concat(null===(a=t.meta.license)||void 0===a?void 0:a.url,'">\n').concat(i,"\n</cc:License>\n")}}return""}function Rt(t){var e=t.attributes.viewBox.split(" ");return{x:parseInt(e[0]),y:parseInt(e[1]),width:parseInt(e[2]),height:parseInt(e[3])}}function qt(t,e){var r;return Wt(t,100-2*("number"==typeof e?e:null!==(r=e.margin)&&void 0!==r?r:0))}function Vt(t,e){var r,n=Rt(t),a=n.width,i=n.height,o=n.x,c=n.y,u="string"==typeof e?e:null!==(r=e.backgroundColor)&&void 0!==r?r:"transparent";return'\n<rect fill="'.concat(u,'" width="').concat(a,'" height="').concat(i,'" x="').concat(o,'" y="').concat(c,'" />\n').concat(t.body,"\n")}function Wt(t,e){var r=Rt(t),n=r.width,a=r.height,i=r.x,o=e?(e-100)/100:0,c=(a/2+r.y)*o*-1;return'\n<g transform="translate('.concat((n/2+i)*o*-1," ").concat(c,") scale(").concat(e/100,')">\n').concat(t.body,"\n</g>\n")}function Ut(t,e,r){var n=Rt(t),a=(n.width+2*n.x)*((null!=e?e:0)/100),i=(n.height+2*n.y)*((null!=r?r:0)/100);return'\n<g transform="translate('.concat(a," ").concat(i,')">\n').concat(t.body,"\n</g>\n")}function $t(t,e){var r=Rt(t),n=r.width,a=r.height,i=r.x,o=r.y;return'\n<g transform="rotate('.concat(e,", ").concat(n/2+i,", ").concat(a/2+o,')">\n').concat(t.body,"\n</g>\n")}function Lt(t){var e=Rt(t),r=e.width,n=e.x;return'\n<g transform="scale(-1 1) translate('.concat(-1*r-2*n,' 0)">\n').concat(t.body,"\n</g>\n")}function Ht(t,e){var r=Rt(t),n=r.width,a=r.height,i=r.x,o=r.y,c=e?n*e/100:0,u=e?a*e/100:0;return'\n<mask id="avatarsRadiusMask">\n<rect width="'.concat(n,'" height="').concat(a,'" rx="').concat(c,'" ry="').concat(u,'" x="').concat(i,'" y="').concat(o,'" fill="#fff" />\n</mask>\n<g mask="url(#avatarsRadiusMask)">').concat(t.body,"</g>\n")}function Zt(t){return t=r(r({},{"xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:cc":"http://creativecommons.org/ns#","xmlns:rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","xmlns:svg":"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/svg"}),t),Object.keys(t).map((function(e){return"".concat(vt(e),'="').concat(vt(t[e]),'"')})).join(" ")}function Xt(t){return t.trim().replace(/\n/g," ").replace(/>\s+</g,"><").replace(/\s{2,}/g," ").replace(/<([^\/>]+)><\/[^>]+>/gi,"<$1/>").replace(/\s(\/?>)/g,"$1")}var Yt=Object.freeze({__proto__:null,createGroup:function(t){var e=t.children,r=t.x,n=t.y;return'<g transform="translate('.concat(r,", ").concat(n,')">').concat(e,"</g>")},getXmlnsAttributes:kt,getMetadata:Dt,getMetadataWorkTitle:St,getMetadataWorkCreator:Nt,getMetadataWorkSource:Mt,getMetadataWorkLicense:Tt,getMetadataWorkContributor:Pt,getMetadataWorkAgents:zt,getMetadataLicense:It,getViewBox:Rt,addMargin:qt,addRadius:function(t,e){return void 0===e.radius?t.body:Ht(t,e.radius)},addBackgroundColor:Vt,addScale:Wt,addTranslate:Ut,addRotate:$t,addFlip:Lt,addViewboxMask:Ht,createAttrString:Zt,removeWhitespace:Xt});var Gt=Object.freeze({__proto__:null,createLegacyWrapper:function(t){return function(e,r){var n;r=Object.assign(r,jt(t,r));var a=t.create({prng:y(e.seed),options:r});return"\n<svg ".concat(Zt(a.attributes),">\n").concat(Dt(t),"\n").concat(null!==(n=a.head)&&void 0!==n?n:"","\n").concat(a.body,"\n</svg>\n")}}}),Jt=Object.freeze({__proto__:null,escape:bt,options:_t,prng:A,svg:Yt,style:Gt,schema:wt,helper:xt});function Kt(t){var e,r,n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=y((a=jt(t,a)).seed),o=t.create({prng:i,options:a});if(a.size?(o.attributes.width=a.size.toString(),o.attributes.height=a.size.toString()):(a.width&&(o.attributes.width=a.width.toString()),a.height&&(o.attributes.height=a.height.toString())),void 0!==a.scale&&100!==a.scale?o.body=Wt(o,a.scale):a.margin&&(o.body=qt(o,a)),a.flip&&(o.body=Lt(o)),a.rotate&&(o.body=$t(o,a.rotate)),(a.translateX||a.translateY)&&(o.body=Ut(o,a.translateX,a.translateY)),a.backgroundColor){var c=Array.isArray(a.backgroundColor)?i.pick(a.backgroundColor):a.backgroundColor;o.body=Vt(o,c)}o.body=Ht(o,null!==(e=a.radius)&&void 0!==e?e:0);var u=Boolean(null===(r=o.head)||void 0===r?void 0:r.match(/<metadata([^>]*)>/)),s=Xt("\n<svg ".concat(Zt(o.attributes),">\n").concat(u?"":Dt(t),"\n").concat(null!==(n=o.head)&&void 0!==n?n:"","\n").concat(o.body,"\n</svg>\n"));if(a.dataUri)return"data:image/svg+xml;utf8,".concat(encodeURIComponent(s));if(a.base64){var l=encodeURIComponent(s).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(parseInt("0x".concat(e)))}));return"data:image/svg+xml;base64,".concat(btoa(l))}return s}var Qt=function(){function t(e,r){a(this,t),c(this,"spriteCollection",void 0),c(this,"defaultOptions",void 0),this.spriteCollection=e,this.defaultOptions=r}return o(t,[{key:"create",value:function(t,e){var n=this,a={meta:{},schema:{},create:function(t){var e=t.prng,r=t.options,a=gt.parse(n.spriteCollection(new F(e.seed),r)),i=[],o=[];return a.children.forEach((function(t){n.isBody(t)?o.push(t):i.push(t)})),{attributes:a.attributes,head:i.map((function(t){return gt.stringify(t)})).join(""),body:o.map((function(t){return gt.stringify(t)})).join("")}}};return Kt(a,r(r(r({},this.defaultOptions),e),{},{seed:t}))}},{key:"isBody",value:function(t){return"element"===t.type&&-1===["title","desc","defs","metadata"].indexOf(t.name)}}]),t}();c(Qt,"random",F),c(Qt,"color",O),c(Qt,"parser",gt),t.color=k,t.createAvatar=Kt,t.default=Qt,t.schema=mt,t.utils=Jt,Object.defineProperty(t,"__esModule",{value:!0})}));