UNPKG

@publidata/utils-svg

Version:

Collection of methods to handle svg files and src

1 lines 147 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios")):"function"==typeof define&&define.amd?define(["axios"],t):"object"==typeof exports?exports["Utils-index"]=t(require("axios")):(e.Publidata=e.Publidata||{},e.Publidata["Utils-index"]=t(e.axios))}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t),n.d(t,"isCssVariable",(function(){return r})),n.d(t,"getSearchableCssVariable",(function(){return i})),n.d(t,"getCssVariableValue",(function(){return a})),n.d(t,"hexaToRgb",(function(){return o})),n.d(t,"hexaToRgba",(function(){return s})),n.d(t,"hexify",(function(){return c})),n.d(t,"getShade",(function(){return l})),n.d(t,"getCSSColor",(function(){return u})),n.d(t,"getTints",(function(){return h})),n.d(t,"getShades",(function(){return v})),n.d(t,"generateColors",(function(){return y})),n.d(t,"generateClusterProperties",(function(){return g})),n.d(t,"getClusterRadius",(function(){return b})),n.d(t,"getClusterFontSize",(function(){return x})),n.d(t,"getBorderTrunk",(function(){return E})),n.d(t,"generatePieChartIcons",(function(){return w}));var r=e=>!(!e||!(e.startsWith("var(")&&e.endsWith(")")||e.startsWith("--"))),i=e=>e?e.startsWith("var(")&&e.endsWith(")")?e.slice(4,-1):e:"",a=e=>{if("undefined"!=typeof window){if(!e)return null;if(!r(e))return e;var t=window.getComputedStyle(document.documentElement).getPropertyValue(i(e)).trim();return t.length?t:null}},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"string";if(!e)return null;var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e),r=n?n.slice(1,4).map(e=>parseInt(e,16)):null;return r&&"string"===t?r.join(", "):r},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e)return null;var n=o(e);if(!n)return null;var r=t>1?1:t<0?0:t;return"".concat(n,", ").concat(r)},c=e=>{if(!e||"string"!=typeof e)return null;var t=e.replace(/rgba?/,"").replace(/[(|)]/,"").replace(/[\s+]/g,"").split(","),n=parseFloat(t[3]||1),r=t.slice(0,3).map(e=>Math.floor(n*parseInt(e)+255*(1-n)));return r.forEach((e,t)=>r[t]=("0"+e.toString(16)).slice(-2)),"#".concat(r.join(""))},l=(e,t)=>{if(!e||"string"!=typeof e)return null;var n=!1,r=e;"#"===e[0]&&(r=e.slice(1),n=!0);var i=parseInt(r,16),a=(i>>16)+t;a>255?a=255:a<0&&(a=0);var o=(255&i)+t;o>255?o=255:o<0&&(o=0);var s=(i>>8&255)+t;return s>255?s=255:s<0&&(s=0),"".concat(n?"#":""," ").concat((o|s<<8|a<<16).toString(16)).replaceAll(" ","")},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e)return e;var n=Array.isArray(e)&&3===e.length,r="string"==typeof e;if(r||n){var i,a,s;if(r){var c=o(e,"array");if(!c)return e;[i,a,s]=c}else[i,a,s]=e;return 1===t?"rgba(".concat(i,", ").concat(a,", ").concat(s,")"):"rgba(".concat(i,", ").concat(a,", ").concat(s,", ").concat(t,")")}return e},f=e=>((e,t)=>{for(var n=""+e;n.length<2;)n="0"+n;return n})(Math.min(Math.max(Math.round(e),0),255).toString(16)),d=(e,t)=>{for(var n,r={red:parseInt(e.substr(0,2),16),green:parseInt(e.substr(2,2),16),blue:parseInt(e.substr(4,2),16)},i=[],a=0;a<10;a++)i[a]=(n=t(r,a),f(n.red)+f(n.green)+f(n.blue));return i},p=(e,t)=>({red:e.red+(255-e.red)*t*.1,green:e.green+(255-e.green)*t*.1,blue:e.blue+(255-e.blue)*t*.1}),h=e=>d(e,p).concat("ffffff"),m=(e,t)=>({red:e.red*(1-.1*t),green:e.green*(1-.1*t),blue:e.blue*(1-.1*t)}),v=e=>d(e,m).concat("000000"),y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",r=[];Object.keys(e).forEach(t=>{r.push("--".concat(t,": ").concat(e[t],";"))}),t.forEach(n=>{if(!e[n])throw t.splice(t.indexOf(n),1),new Error("Color '".concat(n,"' is not defined"))});var i=[{name:"50",opacityPer:"10"},{name:"100",opacityPer:"20"},{name:"200",opacityPer:"40"},{name:"300",opacityPer:"60"},{name:"400",opacityPer:"80"},{name:"500",opacityPer:"100"},{name:"600",opacityShade:"80"},{name:"700",opacityShade:"60"},{name:"800",opacityShade:"40"},{name:"900",opacityShade:"20"}],a={};if(t.forEach(t=>{var n=h(e[t].replace("#","")).reverse(),r=v(e[t].replace("#","")).reverse();n.forEach((e,n)=>{var r=i.find(e=>{var{opacityPer:t}=e;return t==="".concat(10*n)});r&&(a["".concat(t,"-").concat(r.name)]="#".concat(e))}),r.forEach((e,n)=>{var r=i.find(e=>{var{opacityShade:t}=e;return t==="".concat(10*n)});r&&(a["".concat(t,"-").concat(r.name)]="#".concat(e))})}),Object.keys(a).forEach(e=>{r.push("--".concat(e,": ").concat(a[e],";"))}),"array"===n)return r;if("object"===n){var o={};return r.forEach(e=>{var[t,n]=e.replace(/--/g,"").split(":");o[t.trim()]=n.trim()}),o}return r.join("\n")},g=e=>{var t={},n=new Set,i=e=>r(e)?a(e):e,o={},s=e=>{o[e]=["any",["in",e,["get","multiflowColors"]],["all",["==",["get","color"],e],["==",["get","multiflowData"],null]]]};return e.forEach(e=>{var t=i(e.color),{multiflowColors:r}=e;Array.isArray(r)&&r.forEach(e=>{var t=i(e);n.has(t)||(s(t),n.add(t))}),n.has(t)||(s(t),n.add(t))}),Object.entries(o).forEach(e=>{var[n,r]=e;t[n]=["+",["case",r,1,0]]}),t},b=e=>[[1e3,50],[100,32],[10,24],[0,18]].find(t=>{var[n]=t;return e>=n})[1],x=e=>[[1e3,20],[100,18],[10,16],[0,14]].find(t=>{var[n]=t;return e>=n})[1],E=(e,t,n,r,i)=>{var a=(e,t)=>({x:t*Math.cos(2*Math.PI*(e-.25)),y:t*Math.sin(2*Math.PI*(e-.25))}),o=1===t?t-1e-5:t,s=o-e>.5?1:0,c=a(e,n),l=a(o,n),u=a(e,r),f=a(o,r);return'\n <path d="\n M '.concat(n+u.x," ").concat(n+u.y,"\n L ").concat(n+c.x," ").concat(n+c.y,"\n A ").concat(n," ").concat(n," 0 ").concat(s," 1 ").concat(n+l.x," ").concat(n+l.y,"\n L ").concat(n+f.x," ").concat(n+f.y,"\n A ").concat(r," ").concat(r," 0 ").concat(s," 0 ").concat(n+u.x," ").concat(n+u.y,'\n Z\n " fill="').concat(i,'" />\n ').trim()},w=e=>{var t=Object.keys(e).filter(e=>e.startsWith("#")),n=t.map(t=>e[t]),r=n.reduce((e,t)=>e+t,0),i=b(r),a=Math.round(.65*i),o=x(r),s=2*i,c=t.map((e,t)=>{var o=n.slice(0,t).reduce((e,t)=>e+t,0)/r,s=n.slice(0,t+1).reduce((e,t)=>e+t,0)/r;return E(o,s,i,a,e)}),l='\n <div>\n <svg width="'.concat(s,'" height="').concat(s,'" viewBox="0 0 ').concat(s," ").concat(s,'" text-anchor="middle" style="font: ').concat(o,'px Lato, sans-serif; font-weight:600; display: block">');l+=c.join(""),l+='<circle cx="'.concat(i,'" cy="').concat(i,'" r="').concat(a,'" fill="white" />\n <text dominant-baseline="central" transform="translate(').concat(i,", ").concat(i,')">\n ').concat(String(e.point_count),"\n </text>\n </svg>\n </div>");var u=document.createElement("div");return u.innerHTML=l.trim(),u.firstChild}}])},function(t,n){t.exports=e},function(e,t,n){var r;e.exports=(r=n(1),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}([function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(r||(r={}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return c}));class r{constructor(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class i{constructor(e,t,n,r,i,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const a={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},o=new Set(Object.keys(a));function s(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&o.has(t)}var c;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(c||(c={}))},function(e,t,n){"use strict";function r(e){return 9===e||32===e}function i(e){return e>=48&&e<=57}function a(e){return e>=97&&e<=122||e>=65&&e<=90}function o(e){return a(e)||95===e}function s(e){return a(e)||i(e)||95===e}n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}))},function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return function e(t,n){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return function(t,n){if(null===t)return"null";if(n.includes(t))return"[Circular]";const r=[...n,t];if(function(e){return"function"==typeof e.toJSON}(t)){const n=t.toJSON();if(n!==t)return"string"==typeof n?n:e(n,r)}else if(Array.isArray(t))return function(t,n){if(0===t.length)return"[]";if(n.length>2)return"[Array]";const r=Math.min(10,t.length),i=t.length-r,a=[];for(let i=0;i<r;++i)a.push(e(t[i],n));return 1===i?a.push("... 1 more item"):i>1&&a.push(`... ${i} more items`),"["+a.join(", ")+"]"}(t,r);return function(t,n){const r=Object.entries(t);return 0===r.length?"{}":n.length>2?"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(t)+"]":"{ "+r.map(([t,r])=>t+": "+e(r,n)).join(", ")+" }"}(t,r)}(t,n);default:return String(t)}}(e,[])}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(2);function i(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let t=0;t<e.length;++t){var o;const s=e[t],c=a(s);c!==s.length&&(r=null!==(o=r)&&void 0!==o?o:t,i=t,0!==t&&c<n&&(n=c))}return e.map((e,t)=>0===t?e:e.slice(n)).slice(null!==(t=r)&&void 0!==t?t:0,i+1)}function a(e){let t=0;for(;t<e.length&&Object(r.d)(e.charCodeAt(t));)++t;return t}function o(e,t){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),a=1===i.length,o=i.length>1&&i.slice(1).every(e=>0===e.length||Object(r.d)(e.charCodeAt(0))),s=n.endsWith('\\"""'),c=e.endsWith('"')&&!s,l=e.endsWith("\\"),u=c||l,f=!(null!=t&&t.minimize)&&(!a||e.length>70||u||o||s);let d="";const p=a&&Object(r.d)(e.charCodeAt(0));return(f&&!p||o)&&(d+="\n"),d+=n,(f||u)&&(d+="\n"),'"""'+d+'"""'}},function(e,t,n){"use strict";e.exports=function(e){var t=e.uri,n=e.name,r=e.type;this.uri=t,this.name=n,this.type=r}},function(e,t,n){"use strict";var r=n(6);e.exports=function(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||e instanceof r}},function(e,t,n){function r(){var e=o(['\n {\n me {\n kit(token: "','") {\n name\n token\n version\n licenseSelected\n technologySelected\n iconUploads {\n name\n path\n width\n height\n version\n unicode\n }\n }\n }\n }']);return r=function(){return e},e}function i(){var e=o(["\n {\n me {\n kits {\n name\n token\n version\n licenseSelected\n technologySelected\n }\n }\n }\n "]);return i=function(){return e},e}function a(){var e=o(['\n {\n release(version: "6.x") {\n icon(name: "','") {\n id\n svgs(\n filter: {\n familyStyles: [\n { family: CLASSIC, style: '," }\n ]\n }\n ) {\n html\n }\n }\n }\n }\n "]);return a=function(){return e},e}function o(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=t.get(e);if(!n)throw new TypeError("attempted to get private field on non-instance");return n.get?n.get.call(e):n.value}var l=n(15),u=n(16),{GraphQLClient:f,gql:d}=n(9),{FA_API_BASE_URL:p}=n(23),h=new WeakMap;e.exports=class{constructor(e){if(h.set(this,{writable:!0,value:void 0}),s(this,"_client",new f(p)),s(this,"_cache",new u(500)),"string"!=typeof e)throw new Error("Invalid token provided");!function(e,t,n){var r=t.get(e);if(!r)throw new TypeError("attempted to set private field on non-instance");if(r.set)r.set.call(e,n);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=n}}(this,h,e)}get cache(){return{get:this._cache.get}}_connect(){return new Promise((e,t)=>{c(this,h)?l.post("".concat(p,"/token"),{},{headers:{Authorization:"Bearer ".concat(c(this,h))}}).then(n=>{var r;200===n.status?(this._client.setHeaders({Authorization:"Bearer ".concat(null===(r=n.data)||void 0===r?void 0:r.access_token)}),e()):t(Error("Invalid token provided"))}).catch(e=>{t(e)}):t(Error("No token provided"))})}_queryWithToken(e){return new Promise((t,n)=>{this._client.request(e).then(t).catch(()=>{this._connect().then(()=>{this._client.request(e).then(t).catch(n)}).catch(n)})})}getIcon(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fas",n=d(a(),e,{fas:"SOLID",far:"REGULAR",fab:"BRAND"}[t]);return this._queryWithToken(n).then(e=>{var t,n,r;return null===(t=e.release)||void 0===t||null===(n=t.icon)||void 0===n||null===(r=n.svgs)||void 0===r?void 0:r[0]})}kits(){var e=d(i());return this._queryWithToken(e)}kit(e){if(!e)throw new Error("No token provided to .kit($token)");var t=d(r(),e);return this._queryWithToken(t)}kitIcons(e,t){if(!e)throw new Error("No token provided to .kitIcons($token, $[icons])");var n="kitIcons-".concat(e,"-").concat(null==t?void 0:t.join("-"));return new Promise((r,i)=>{var a=this._cache.get(n);if(a)return r(a);if(t){var o=t.map(e=>this._cache.get(e));if(o.every(Boolean))return r(o)}this.kit(e).then(e=>{t&&(e.me.kit.iconUploads=e.me.kit.iconUploads.filter(e=>t.includes(e.name)));var i=e.me.kit.iconUploads.map(e=>({key:"".concat(e.name),value:e}));this._cache.put(n,e.me.kit.iconUploads),this._cache.putAll(i),r(e.me.kit.iconUploads)}).catch(i)})}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},l=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLWebSocketClient=t.gql=t.resolveRequestDocument=t.batchRequests=t.request=t.rawRequest=t.GraphQLClient=t.ClientError=void 0;var f=o(n(17)),d=f,p=n(27),h=n(28),m=u(n(18)),v=n(11),y=n(21),g=n(12);Object.defineProperty(t,"ClientError",{enumerable:!0,get:function(){return g.ClientError}});var b=function(e){var t={};return e&&("undefined"!=typeof Headers&&e instanceof Headers||d&&d.Headers&&e instanceof d.Headers?t=function(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}(e):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];t[n]=r})):t=e),t},x=function(e){return e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},E=function(e){var t=e.url,n=e.query,i=e.variables,a=e.operationName,o=e.headers,l=e.fetch,u=e.fetchOptions,f=e.middleware;return s(void 0,void 0,void 0,(function(){var e,s;return c(this,(function(c){switch(c.label){case 0:return e=m.default(n,i,a,u.jsonSerializer),s=r({method:"POST",headers:r(r({},"string"==typeof e?{"Content-Type":"application/json"}:{}),o),body:e},u),f?[4,Promise.resolve(f(s))]:[3,2];case 1:s=c.sent(),c.label=2;case 2:return[4,l(t,s)];case 3:return[2,c.sent()]}}))}))},w=function(e){var t=e.url,n=e.query,i=e.variables,a=e.operationName,o=e.headers,l=e.fetch,u=e.fetchOptions,f=e.middleware;return s(void 0,void 0,void 0,(function(){var e,s;return c(this,(function(c){switch(c.label){case 0:return e=function(e){var t=e.query,n=e.variables,r=e.operationName,i=e.jsonSerializer;if(!Array.isArray(t)){var a=["query="+encodeURIComponent(x(t))];return n&&a.push("variables="+encodeURIComponent(i.stringify(n))),r&&a.push("operationName="+encodeURIComponent(r)),a.join("&")}if(void 0!==n&&!Array.isArray(n))throw new Error("Cannot create query with given variable type, array expected");var o=t.reduce((function(e,t,r){return e.push({query:x(t),variables:n?i.stringify(n[r]):void 0}),e}),[]);return"query="+encodeURIComponent(i.stringify(o))}({query:n,variables:i,operationName:a,jsonSerializer:u.jsonSerializer}),s=r({method:"GET",headers:o},u),f?[4,Promise.resolve(f(s))]:[3,2];case 1:s=c.sent(),c.label=2;case 2:return[4,l(t+"?"+e,s)];case 3:return[2,c.sent()]}}))}))},O=function(){function e(e,t){void 0===t&&(t={}),this.url=e,this.options=t}return e.prototype.rawRequest=function(e,t,n){return s(this,void 0,void 0,(function(){var i,a,o,s,u,d,p,h,m,v,g,x;return c(this,(function(c){return i=y.parseRawRequestArgs(e,t,n),a=this.options,o=a.headers,s=a.fetch,u=void 0===s?f.default:s,d=a.method,p=void 0===d?"POST":d,h=a.requestMiddleware,m=a.responseMiddleware,v=l(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),g=this.url,void 0!==i.signal&&(v.signal=i.signal),x=N(i.query).operationName,[2,A({url:g,query:i.query,variables:i.variables,headers:r(r({},b(S(o))),b(i.requestHeaders)),operationName:x,fetch:u,method:p,fetchOptions:v,middleware:h}).then((function(e){return m&&m(e),e})).catch((function(e){throw m&&m(e),e}))]}))}))},e.prototype.request=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=t[0],a=t[1],o=y.parseRequestArgs(e,i,a),s=this.options,c=s.headers,u=s.fetch,d=void 0===u?f.default:u,p=s.method,h=void 0===p?"POST":p,m=s.requestMiddleware,v=s.responseMiddleware,g=l(s,["headers","fetch","method","requestMiddleware","responseMiddleware"]),x=this.url;void 0!==o.signal&&(g.signal=o.signal);var E=N(o.document),w=E.query,O=E.operationName;return A({url:x,query:w,variables:o.variables,headers:r(r({},b(S(c))),b(o.requestHeaders)),operationName:O,fetch:d,method:h,fetchOptions:g,middleware:m}).then((function(e){return v&&v(e),e.data})).catch((function(e){throw v&&v(e),e}))},e.prototype.batchRequests=function(e,t){var n=y.parseBatchRequestArgs(e,t),i=this.options,a=i.headers,o=i.fetch,s=void 0===o?f.default:o,c=i.method,u=void 0===c?"POST":c,d=i.requestMiddleware,p=i.responseMiddleware,h=l(i,["headers","fetch","method","requestMiddleware","responseMiddleware"]),m=this.url;return void 0!==n.signal&&(h.signal=n.signal),A({url:m,query:n.documents.map((function(e){return N(e.document).query})),variables:n.documents.map((function(e){return e.variables})),headers:r(r({},b(S(a))),b(n.requestHeaders)),operationName:void 0,fetch:s,method:u,fetchOptions:h,middleware:d}).then((function(e){return p&&p(e),e.data})).catch((function(e){throw p&&p(e),e}))},e.prototype.setHeaders=function(e){return this.options.headers=e,this},e.prototype.setHeader=function(e,t){var n,r=this.options.headers;return r?r[e]=t:this.options.headers=((n={})[e]=t,n),this},e.prototype.setEndpoint=function(e){return this.url=e,this},e}();function A(e){var t=e.url,n=e.query,i=e.variables,a=e.headers,o=e.operationName,u=e.fetch,f=e.method,d=void 0===f?"POST":f,p=e.fetchOptions,h=e.middleware;return s(this,void 0,void 0,(function(){var e,s,f,m,v,y,b,x,O,A,k;return c(this,(function(c){switch(c.label){case 0:return e="POST"===d.toUpperCase()?E:w,s=Array.isArray(n),[4,e({url:t,query:n,variables:i,operationName:o,headers:a,fetch:u,fetchOptions:p,middleware:h})];case 1:return[4,T(f=c.sent(),p.jsonSerializer)];case 2:if(m=c.sent(),v=s&&Array.isArray(m)?!m.some((function(e){return!e.data})):!!m.data,y=!m.errors||"all"===p.errorPolicy||"ignore"===p.errorPolicy,f.ok&&y&&v)return b=f.headers,x=f.status,m.errors,O=l(m,["errors"]),A="ignore"===p.errorPolicy?O:m,[2,r(r({},s?{data:A}:A),{headers:b,status:x})];throw k="string"==typeof m?{error:m}:m,new g.ClientError(r(r({},k),{status:f.status,headers:f.headers}),{query:n,variables:i})}}))}))}function k(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return s(this,void 0,void 0,(function(){var i,a,o;return c(this,(function(s){return i=n[0],a=n[1],o=y.parseRequestExtendedArgs(e,t,i,a),[2,new O(o.url).request(r({},o))]}))}))}function T(e,t){return void 0===t&&(t=v.defaultJsonSerializer),s(this,void 0,void 0,(function(){var n,r,i;return c(this,(function(a){switch(a.label){case 0:return e.headers.forEach((function(e,t){"content-type"===t.toLowerCase()&&(n=e)})),n&&n.toLowerCase().startsWith("application/json")?(i=(r=t).parse,[4,e.text()]):[3,2];case 1:return[2,i.apply(r,[a.sent()])];case 2:return[2,e.text()]}}))}))}function _(e){var t,n=void 0,r=e.definitions.filter((function(e){return"OperationDefinition"===e.kind}));return 1===r.length&&(n=null===(t=r[0].name)||void 0===t?void 0:t.value),n}function N(e){if("string"==typeof e){var t=void 0;try{t=_(p.parse(e))}catch(e){}return{query:e,operationName:t}}var n=_(e);return{query:h.print(e),operationName:n}}function S(e){return"function"==typeof e?e():e}t.GraphQLClient=O,t.rawRequest=function(e,t,n,i){return s(this,void 0,void 0,(function(){var a;return c(this,(function(o){return a=y.parseRawRequestExtendedArgs(e,t,n,i),[2,new O(a.url).rawRequest(r({},a))]}))}))},t.request=k,t.batchRequests=function(e,t,n){return s(this,void 0,void 0,(function(){var i;return c(this,(function(a){return i=y.parseBatchRequestsExtendedArgs(e,t,n),[2,new O(i.url).batchRequests(r({},i))]}))}))},t.default=k,t.resolveRequestDocument=N,t.gql=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.reduce((function(e,n,r){return""+e+n+(r in t?t[r]:"")}),"")};var I=n(22);Object.defineProperty(t,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return I.GraphQLWebSocketClient}})},function(e,t,n){"use strict";var r=n(7);e.exports=function e(t,n,i){var a;void 0===n&&(n=""),void 0===i&&(i=r);var o=new Map;function s(e,t){var n=o.get(t);n?n.push.apply(n,e):o.set(t,e)}if(i(t))a=null,s([n],t);else{var c=n?n+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)a=Array.prototype.map.call(t,(function(e,t){return s([""+c+t],e),null}));else if(Array.isArray(t))a=t.map((function(t,n){var r=e(t,""+c+n,i);return r.files.forEach(s),r.clone}));else if(t&&t.constructor===Object)for(var l in a={},t){var u=e(t[l],""+c+l,i);u.files.forEach(s),a[l]=u.clone}else a=t}return{clone:a,files:o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultJsonSerializer=void 0,t.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ClientError=void 0;var a=function(e){function t(n,r){var i=this,a=t.extractMessage(n)+": "+JSON.stringify({response:n,request:r});return i=e.call(this,a)||this,Object.setPrototypeOf(i,t.prototype),i.response=n,i.request=r,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(i,t),i}return i(t,e),t.extractMessage=function(e){try{return e.errors[0].message}catch(t){return"GraphQL Error (Code: "+e.status+")"}},t}(Error);t.ClientError=a},function(e,t,n){var r=n(25);e.exports={isFaKit:e=>new RegExp(/\b(^fa-?k(it)?)\b/i).test(e),isValidFa:e=>{var t=e.split(" ")[0],n=Object.keys(r).includes(t),i=e.split(" ")[1],a=new RegExp(/^fa-([a-z]|[0-9]){1,}/g).test(i);return n&&a}}},function(e,t,n){var r=n(8),i=n(24),{isFaKit:a,isValidFa:o}=n(13);e.exports={isFaKit:a,isValidFa:o,FontAwesomeApi:r,FontAwesomeUtils:i}},function(e,t){e.exports=r},function(e,t){e.exports=class{constructor(e){this._cache=new Map,this.capacity=e}get(e){return this._cache.get(e)}put(e,t){if("string"!=typeof e)throw new Error("Key must be a string");this._cache.delete(e),this._cache.size===this.capacity?(this._cache.delete(this._cache.keys().next().value),this._cache.set(e,t)):this._cache.set(e,t)}putAll(e){if(!Array.isArray(e))throw new Error("keyValues must be an array");if(e.length>this.capacity)throw new Error("keyValues is longer than the capacity of the cache");e.forEach(e=>this.put(e.key,e.value))}reset(){this._cache.clear()}}},function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,n,r=p(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,n=h(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(e,t){e=l(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},d.prototype.delete=function(e){delete this.map[l(e)]},d.prototype.get=function(e){return e=l(e),this.has(e)?this.map[e]:null},d.prototype.has=function(e){return this.map.hasOwnProperty(l(e))},d.prototype.set=function(e,t){this.map[l(e)]=u(t)},d.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},d.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},d.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},d.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(d.prototype[Symbol.iterator]=d.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,i=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new d(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new d(t.headers)),this.method=(r=(n=t.method||this.method||"GET").toUpperCase(),g.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function E(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},E.error=function(){var e=new E(null,{status:0,statusText:""});return e.type="error",e};var w=[301,302,303,307,308];E.redirect=function(e,t){if(-1===w.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function O(e,n){return new Promise((function(r,a){var o=new b(e,n);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new E(i,n))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}O.polyfill=!0,e.fetch||(e.fetch=O,e.Headers=d,e.Request=b,e.Response=E),t.Headers=d,t.Request=b,t.Response=E,t.fetch=O,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(19),a=r(n(20)),o=n(11),s=function(e){return i.isExtractableFile(e)||null!==e&&"object"==typeof e&&"function"==typeof e.pipe};t.default=function(e,t,n,r){void 0===r&&(r=o.defaultJsonSerializer);var c=i.extractFiles({query:e,variables:t,operationName:n},"",s),l=c.clone,u=c.files;if(0===u.size){if(!Array.isArray(e))return r.stringify(l);if(void 0!==t&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var f=e.reduce((function(e,n,r){return e.push({query:n,variables:t?t[r]:void 0}),e}),[]);return r.stringify(f)}var d=new("undefined"==typeof FormData?a.default:FormData);d.append("operations",r.stringify(l));var p={},h=0;return u.forEach((function(e){p[++h]=e})),d.append("map",r.stringify(p)),h=0,u.forEach((function(e,t){d.append(""+ ++h,t)})),d}},function(e,t,n){"use strict";n.r(t);var r=n(6);n.d(t,"ReactNativeFile",(function(){return r}));var i=n(10);n.d(t,"extractFiles",(function(){return i}));var a=n(7);n.d(t,"isExtractableFile",(function(){return a}))},function(e,t){e.exports="object"==typeof self?self.FormData:window.FormData},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseBatchRequestsExtendedArgs=t.parseRawRequestExtendedArgs=t.parseRequestExtendedArgs=t.parseBatchRequestArgs=t.parseRawRequestArgs=t.parseRequestArgs=void 0,t.parseRequestArgs=function(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}},t.parseRawRequestArgs=function(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}},t.parseBatchRequestArgs=function(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}},t.parseRequestExtendedArgs=function(e,t,n,r){return e.document?e:{url:e,document:t,variables:n,requestHeaders:r,signal:void 0}},t.parseRawRequestExtendedArgs=function(e,t,n,r){return e.query?e:{url:e,query:t,variables:n,requestHeaders:r,signal:void 0}},t.parseBatchRequestsExtendedArgs=function(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLWebSocketClient=void 0;var o=n(12),s=n(9),c=function(){function e(e,t,n){this._type=e,this._payload=t,this._id=n}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){var e={type:this.type};return null!=this.id&&null!=this.id&&(e.id=this.id),null!=this.payload&&null!=this.payload&&(e.payload=this.payload),JSON.stringify(e)},enumerable:!1,configurable:!0}),e.parse=function(t,n){var r=JSON.parse(t),i=r.type,a=r.payload,o=r.id;return new e(i,n(a),o)},e}(),l=function(){function e(e,t){var n=this,s=t.onInit,l=t.onAcknowledged,d=t.onPing,p=t.onPong;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=e,e.onopen=function(t){return i(n,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(a){switch(a.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},n=(t=e).send,r=u,s?[4,s()]:[3,2];case 1:return i=a.sent(),[3,3];case 2:i=null,a.label=3;case 3:return n.apply(t,[r.apply(void 0,[i]).text]),[2]}}))}))},e.onclose=function(e){n.socketState.acknowledged=!1,n.socketState.subscriptions={}},e.onerror=function(e){console.error(e)},e.onmessage=function(t){try{var i=function(e,t){return void 0===t&&(t=function(e){return e}),c.parse(e,t)}(t.data);switch(i.type){case"connection_ack":return void(n.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(n.socketState.acknowledged=!0,l&&l(i.payload)));case"ping":return void(d?d(i.payload).then((function(t){return e.send(f(t).text)})):e.send(f(null).text));case"pong":return void(p&&p(i.payload))}if(!n.socketState.acknowledged)return;if(void 0===i.id||null===i.id||!n.socketState.subscriptions[i.id])return;var a=n.socketState.subscriptions[i.id],s=a.query,u=a.variables,h=a.subscriber;switch(i.type){case"next":return!i.payload.errors&&i.payload.data&&h.next&&h.next(i.payload.data),void(i.payload.errors&&h.error&&h.error(new o.ClientError(r(r({},i.payload),{status:200}),{query:s,variables:u})));case"error":return void(h.error&&h.error(new o.ClientError({errors:i.payload,status:200},{query:s,variables:u})));case"complete":return h.complete&&h.complete(),void delete n.socketState.subscriptions[i.id]}}catch(t){console.error(t),e.close(1006)}e.close(4400,"Unknown graphql-ws message.")}}return e.prototype.makeSubscribe=function(e,t,n,r){var i,a,o=this,s=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[s]={query:e,variables:n,subscriber:r},this.socket.send((i=s,a={query:e,operationName:t,variables:n},new c("subscribe",a,i)).text),function(){o.socket.send(function(e){return new c("complete",void 0,e)}(s).text),delete o.socketState.subscriptions[s]}},e.prototype.rawRequest=function(e,t){var n=this;return new Promise((function(r,i){var a;n.rawSubscribe(e,{next:function(e,t){return a={data:e,extensions:t}},error:i,complete:function(){return r(a)}},t)}))},e.prototype.request=function(e,t){var n=this;return new Promise((function(r,i){var a;n.subscribe(e,{next:function(e){return a=e},error:i,complete:function(){return r(a)}},t)}))},e.prototype.subscribe=function(e,t,n){var r=s.resolveRequestDocument(e),i=r.query,a=r.operationName;return this.makeSubscribe(i,a,n,t)},e.prototype.rawSubscribe=function(e,t,n){return this.makeSubscribe(e,void 0,n,t)},e.prototype.ping=function(e){this.socket.send(function(e){return new c("ping",e,void 0)}(e).text)},e.prototype.close=function(){this.socket.close(1e3)},e.PROTOCOL="graphql-transport-ws",e}();function u(e){return new c("connection_init",e)}function f(e){return new c("pong",e,void 0)}t.GraphQLWebSocketClient=l},function(e,t){e.exports={FA_TOKEN:"bb1d754461",FA_VERSION:"6.2.1",FA_API_BASE_URL:"https://api.fontawesome.com"}},function(e,t,n){function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(8),{isValidFa:a,isFaKit:o}=n(13),{icon:s,library:c,findIconDefinition:l}=n(26);class u{constructor(e,t){r(this,"api",void 0),this._kit=t,this._token=e,this._token&&(this.api=new i(this._token))}setToken(e){this._token=e,this.api=new i(this._token)}setKit(e){this._kit=e}toSvg(e){return new Promise((t,n)=>{if(!a(e))return n(Error("Invalid FontAwesome object"));var r=e.replace("fa-","").split(" ")[1];if(this._token||n(Error("FontAwesome token not set")),!o(e))return this.api.getIcon(r).then(e=>{t(null==e?void 0:e.html)});this._kit||n(Error("FontAwesome kit not set")),this.api.kitIcons(this._kit,[r]).then(e=>{e.length||n(Error("Invalid FontAwesome custom icon"));var i=d(e[0]);i||console.log("Error while converting to svg, this icon is invalid : ".concat(r," for kit ").concat(this._kit)),t(i)})})}toSvgs(e){return new Promise((t,n)=>{Array.isArray(e)||n(Error("Invalid FontAwesome array"));var r=e.filter(a),i=r.filter(o),s=r.filter(e=>!o(e)),c=e=>e.svg,l=s.map(