-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathstyled-elements.min.js
More file actions
1 lines (1 loc) · 6.41 KB
/
styled-elements.min.js
File metadata and controls
1 lines (1 loc) · 6.41 KB
1
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("styled",[],t):"object"==typeof exports?exports.styled=t():e.styled=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,t,r){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t){"use strict";function r(e,t){for(var r=1540483477,o=24,s=t^e.length,c=e.length,u=0;c>=4;){var d=n(e,u);d=i(d,r),d^=d>>>o,d=i(d,r),s=i(s,r),s^=d,u+=4,c-=4}switch(c){case 3:s^=a(e,u),s^=e.charCodeAt(u+2)<<16,s=i(s,r);break;case 2:s^=a(e,u),s=i(s,r);break;case 1:s^=e.charCodeAt(u),s=i(s,r)}return s^=s>>>13,s=i(s,r),s^=s>>>15,s>>>0}function n(e,t){return e.charCodeAt(t++)+(e.charCodeAt(t++)<<8)+(e.charCodeAt(t++)<<16)+(e.charCodeAt(t)<<24)}function a(e,t){return e.charCodeAt(t++)+(e.charCodeAt(t++)<<8)}function i(e,t){e=0|e,t=0|t;var r=65535&e,n=e>>>16,a=r*t+((n*t&65535)<<16)|0;return a}t.__esModule=!0,t.doHash=r},function(e,t,r){"use strict";function n(e){var t=e+"";return w.forEach(function(e){return t=t.replace(e,"")}),t}function a(e){return"object"==typeof e&&e.constructor===Object}function i(e,t){var r=Object.keys(e).map(function(t){return a(e[t])?i(e[t],t):o(t)+": "+e[t]+";"}).join(" ");return t?t+" {\n "+r+"\n}":r}function o(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^ms-/,"-ms-")}function s(e){if(Array.isArray(e)){for(var t,r=[],n=0,o=e.length;o>n;n+=1)t=s(e[n]),Array.isArray(t)?r.push.apply(r,t):r.push(t);return r}return a(e)?i(e):""+e}function c(e,t,r){var a="";return e.forEach(function(e,i){if(t.length<i)a+=e;else{var o=t[i];if("function"==typeof o&&(o=s(o(r||{})),Array.isArray(o)&&(o=o.join(" ")),o=n(o||"")),"string"==typeof o&&C[o.replace("class-","")]){var u=o.replace("class-","");o=c(C[u].strings,C[u].keys,r)}a+=e+(o||"")}}),a}function u(e,t){return t?"animation-"+e:"class-"+e}function d(e,t){return""!==t?"\n ."+u(e)+" {\n "+t.trim()+"\n }":""}function f(e,t){var r="\n "+t.trim();return r=r.replace("&","."+u(e))}function l(e,t){var r=t,n=r.substring(r.indexOf("{")+1,r.lastIndexOf("}"));return r="\n "+r.substring(0,r.indexOf("{")+1)+"\n "+m(e,n).trim()+"\n }"}function p(e,t,r){var n=e.indexOf("{",t),a=e.indexOf("}",(r||n)+1),i=e.indexOf("{",n+1);return i>a||i===-1?a:p(e,i,a)}function m(e,t){var r=t,n=[],a=[],i=function s(){var e=r.indexOf("&"),t=r.substring(e,p(r,e)+1);(t+"").indexOf("&")!==-1&&(n.push(t),r=r.replace(t,""),s())},o=function c(){var e=r.indexOf("@media"),t=r.substring(e,p(r,e)+1);(t+"").indexOf("@media")!==-1&&(a.push(t),r=r.replace(t,""),c())};return o(),i(),r=d(e,r.trim()),n.forEach(function(t){return r+=f(e,t)}),a.forEach(function(t){return r+=l(e,t)}),r}function h(e,t){return"\n @-webkit-keyframes "+u(e,!0)+" {\n "+t.trim()+"\n }\n @keyframes "+u(e,!0)+" {\n "+t.trim()+"\n }"}function y(){var e="";return Object.keys(C).forEach(function(t){return e+=C[t].rendered}),""+O+e}function b(e,t,r,n){var a=c(e,t,r),i=(0,j.doHash)(a).toString(36);if(null===document.querySelector("#styles")){var o=document.createElement("style");o.type="text/css",o.id="styles",document.head.insertBefore(o,document.head.firstChild)}return C[i]||(C[i]=n?{rendered:h(i,a),strings:e,keys:t}:{rendered:m(i,a),strings:e,keys:t},document.querySelector("#styles").innerHTML=y()),u(i,n)}function g(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];return b(e,r,{theme:k},!0)}function v(e,t){return e.forEach(function(e){"string"==typeof e||"number"==typeof e?t.appendChild(document.createTextNode(e+"")):Array.isArray(e)?v(e,t):t.appendChild(e)}),t}function x(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;r>a;a++)n[a-1]=arguments[a];return function(){for(var r=arguments.length,a=Array(r),i=0;r>i;i++)a[i]=arguments[i];var o=a[0],s="object"!=typeof o||Array.isArray(o)||0===o.length||o.tagName&&!0||!1||o.nodeName&&!0||!1,c=s?{}:o,u=c.props||{},d=(s?a:a.slice(1))||[];Array.isArray(d[0])&&(d=d[0]);var f=document.createElement(e);return f.className=b(t,n,Object.assign({},{theme:k},c,u)),Object.keys(c).forEach(function(e){"on"===e.substr(0,2)?f.addEventListener(e.substr(2),c[e]):"props"!==e&&"children"!==e&&f.setAttribute(e,c[e])}),v(d,f)}}}function A(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;r>a;a++)n[a-1]=arguments[a];var i=b(t,n,{theme:k});return e.classList?e.classList.add(i):e.className+=" "+i,e}}t.__esModule=!0,t.keyframes=t.presets=t.tags=t.injectGlobal=t.css=t.setTheme=t.dangerChars=t.docCSS=void 0,t.escapeChars=n,t.objToCSS=i,t.hyphenateStyleName=o,t.flattenStyleObject=s,t.joinTemplate=c,t.buildName=u,t.renderCSS=y,t["default"]=A;var j=r(0),k={},O="",C=t.docCSS={},w=t.dangerChars=[/&/g,/</g,/>/g,/"/g,/'/g];t.setTheme=A.setTheme=function(e){return k=Object.assign({},e)},t.css=A.css=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];return b(e,r,{theme:k})},t.injectGlobal=A.injectGlobal=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];O+=c(e,r,{theme:k})},t.tags=A.tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],t.presets=A.presets={mobile:"(min-width: 400px)",Mobile:"@media (min-width: 400px)",phablet:"(min-width: 550px)",Phablet:"@media (min-width: 550px)",tablet:"(min-width: 750px)",Tablet:"@media (min-width: 750px)",desktop:"(min-width: 1000px)",Desktop:"@media (min-width: 1000px)",hd:"(min-width: 1200px)",Hd:"@media (min-width: 1200px)"};A.tags.forEach(function(e){return A[e]=x(e)});t.keyframes=A.keyframes=g}])});