"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("@babel/runtime/helpers/typeof"),t=require("@babel/runtime/helpers/slicedToArray");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(r),f=n(t),o=function(e){var r="ek-",t="__",n="_",f="_",o=function(e){return e};"object"===i.default(e)&&null!==e&&("string"==typeof e.b&&(r=e.b),"string"==typeof e.e&&(t=e.e),"string"==typeof e.m&&(n=e.m),"string"==typeof e.v&&(f=e.v),"object"===i.default(e.css)&&null!==e.css&&(o=function(r){return e.css[r]}));var a=function(e,r,t){return t?e+n+r+f+t:e+n+r};return function(e,n){if("string"!=typeof e)throw new Error('The argument "name" is not a string');var f=function(e,n){return n?r+e+t+n:r+e}(e,n);return function(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="",u=function(e){var r=o(e);r&&(n&&(n+=" "),n+=r)};u(f);var l=function(e,r){if(-1!==r.indexOf(" ")){var n=r.split(" ");if(n.length>1&&Object.prototype.hasOwnProperty.call(t,e))for(var i=0;i<n.length;i++){var o=t[e],l=o[i];if(l)if(Array.isArray(l))for(var c=0;c<l.length;c++){var s=l[c],v=o.indexOf(s);(0===c||-1!==v&&!n[v])&&u(a(f,s,n[i]))}else u(a(f,l,n[i]))}}else u(a(f,e,r))};if("object"===i.default(e))for(var c in e)if(Object.prototype.hasOwnProperty.call(e,c)){var s=e[c];if("string"==typeof s||"number"==typeof s)l(c,""+s);else if("boolean"==typeof s)s&&u(a(f,c));else if("object"===i.default(s)){var v=void 0;if(Array.isArray(s))for(v=0;v<s.length;v++)"string"!=typeof s[v]&&"number"!=typeof s[v]||l(c,""+s[v]);else for(v in s)s[v]&&l(c,""+v)}}if(r)if("string"==typeof r)n&&(n+=" "),n+=r;else if(Array.isArray(r))for(var y=0;y<r.length;y++)n&&(n+=" "),n+=r[y];return n}}};o();exports.createBlock=function(){var r,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",i=arguments.length>1?arguments[1]:void 0,a=arguments.length>2?arguments[2]:void 0,u=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0,c=i.replace(/__/,"-"),s="".concat(c,"-as"),v=(r=[],(t=function(e){e.forEach((function(e){Array.isArray(e)?t(e):-1===r.indexOf(e)&&r.push(e)}))})(a),r),y=function(e){return e.reduce((function(e,r){if(Array.isArray(r)&&r.length>0){var t=f.default(r,2),n=t[0],i=t[1];e[n]=i}return e}),{})}(a),p=v.map((function(e){return"".concat(c,"-").concat(e)})),d=o(u)(i),g=e.forwardRef((function(r,t){var i=n,f={},o={};if(l)for(var a in l)if(a!==s){var u=p.indexOf(a);-1!==u?o[v[u]]=l[a]:f[a]=l[a]}else i=l[a];for(var c in r)if(void 0!==r[c])if(c!==s){var g=p.indexOf(c);-1!==g?o[v[g]]=r[c]:f[c]=r[c]}else i=r[c];return f.ref=t,f.className=d(o,r.className,y),e.createElement(i,f)}));return g.displayName=i,g};
