!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e||self).goober={})}(this,function(e){let t={data:""},r=e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||t},n=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l=/\/\*[^]*?\*\/|  +/g,o=/\n+/g,a=(e,t)=>{let r="",n="",l="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?r=o+" "+s+";":n+="f"==o[1]?a(s,o):o+"{"+a(s,"k"==o[1]?"":t)+"}":"object"==typeof s?n+=a(s,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=s&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=a.p?a.p(o,s):o+":"+s+";")}return r+(t&&l?t+"{"+l+"}":l)+n},s={},c=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+c(e[r]);return t}return e},i=(e,t,r,i,f)=>{let d=c(e),p=s[d]||(s[d]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(d));if(!s[p]){let t=d!==e?e:(e=>{let t,r,a=[{}];for(;t=n.exec(e.replace(l,""));)t[4]?a.shift():t[3]?(r=t[3].replace(o," ").trim(),a.unshift(a[0][r]=a[0][r]||{})):a[0][t[1]]=t[2].replace(o," ").trim();return a[0]})(e);s[p]=a(f?{["@keyframes "+p]:t}:t,r?"":"."+p)}let u=r&&s.g?s.g:null;return r&&(s.g=s[p]),((e,t,r,n)=>{n?t.data=t.data.replace(n,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(s[p],t,i,u),p},f=(e,t,r)=>e.reduce((e,n,l)=>{let o=t[l];if(o&&o.call){let e=o(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":a(e,""):!1===e?"":e}return e+n+(null==o?"":o)},"");function d(e){let t=this||{},n=e.call?e(t.p):e;return i(n.unshift?n.raw?f(n,[].slice.call(arguments,1),t.p):n.reduce((e,r)=>Object.assign(e,r&&r.call?r(t.p):r),{}):n,r(t.target),t.g,t.o,t.k)}let p,u,g,b=d.bind({g:1}),h=d.bind({k:1});e.css=d,e.extractCss=e=>{let t=r(e),n=t.data;return t.data="",n},e.glob=b,e.keyframes=h,e.setup=function(e,t,r,n){a.p=t,p=e,u=r,g=n},e.styled=function(e,t){let r=this||{};return function(){let n=arguments;function l(o,a){let s=Object.assign({},o),c=s.className||l.className;r.p=Object.assign({theme:u&&u()},s),r.o=/ *go\d+/.test(c),s.className=d.apply(r,n)+(c?" "+c:""),t&&(s.ref=a);let i=e;return e[0]&&(i=s.as||e,delete s.as),g&&i[0]&&g(s),p(i,s)}return t?t(l):l}}});
