No Description

style-inject.es-3827494b.js 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. 'use strict';
  2. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  3. function unwrapExports (x) {
  4. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  5. }
  6. function createCommonjsModule(fn, module) {
  7. return module = { exports: {} }, fn(module, module.exports), module.exports;
  8. }
  9. function getCjsExportFromNamespace (n) {
  10. return n && n['default'] || n;
  11. }
  12. function _classCallCheck(instance, Constructor) {
  13. if (!(instance instanceof Constructor)) {
  14. throw new TypeError("Cannot call a class as a function");
  15. }
  16. }
  17. function _defineProperties(target, props) {
  18. for (var i = 0; i < props.length; i++) {
  19. var descriptor = props[i];
  20. descriptor.enumerable = descriptor.enumerable || false;
  21. descriptor.configurable = true;
  22. if ("value" in descriptor) descriptor.writable = true;
  23. Object.defineProperty(target, descriptor.key, descriptor);
  24. }
  25. }
  26. function _createClass(Constructor, protoProps, staticProps) {
  27. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  28. if (staticProps) _defineProperties(Constructor, staticProps);
  29. return Constructor;
  30. }
  31. function _defineProperty(obj, key, value) {
  32. if (key in obj) {
  33. Object.defineProperty(obj, key, {
  34. value: value,
  35. enumerable: true,
  36. configurable: true,
  37. writable: true
  38. });
  39. } else {
  40. obj[key] = value;
  41. }
  42. return obj;
  43. }
  44. function ownKeys(object, enumerableOnly) {
  45. var keys = Object.keys(object);
  46. if (Object.getOwnPropertySymbols) {
  47. var symbols = Object.getOwnPropertySymbols(object);
  48. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  49. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  50. });
  51. keys.push.apply(keys, symbols);
  52. }
  53. return keys;
  54. }
  55. function _objectSpread2(target) {
  56. for (var i = 1; i < arguments.length; i++) {
  57. var source = arguments[i] != null ? arguments[i] : {};
  58. if (i % 2) {
  59. ownKeys(Object(source), true).forEach(function (key) {
  60. _defineProperty(target, key, source[key]);
  61. });
  62. } else if (Object.getOwnPropertyDescriptors) {
  63. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  64. } else {
  65. ownKeys(Object(source)).forEach(function (key) {
  66. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  67. });
  68. }
  69. }
  70. return target;
  71. }
  72. function _inherits(subClass, superClass) {
  73. if (typeof superClass !== "function" && superClass !== null) {
  74. throw new TypeError("Super expression must either be null or a function");
  75. }
  76. subClass.prototype = Object.create(superClass && superClass.prototype, {
  77. constructor: {
  78. value: subClass,
  79. writable: true,
  80. configurable: true
  81. }
  82. });
  83. if (superClass) _setPrototypeOf(subClass, superClass);
  84. }
  85. function _getPrototypeOf(o) {
  86. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  87. return o.__proto__ || Object.getPrototypeOf(o);
  88. };
  89. return _getPrototypeOf(o);
  90. }
  91. function _setPrototypeOf(o, p) {
  92. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  93. o.__proto__ = p;
  94. return o;
  95. };
  96. return _setPrototypeOf(o, p);
  97. }
  98. function _assertThisInitialized(self) {
  99. if (self === void 0) {
  100. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  101. }
  102. return self;
  103. }
  104. function _possibleConstructorReturn(self, call) {
  105. if (call && (typeof call === "object" || typeof call === "function")) {
  106. return call;
  107. }
  108. return _assertThisInitialized(self);
  109. }
  110. function _slicedToArray(arr, i) {
  111. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
  112. }
  113. function _arrayWithHoles(arr) {
  114. if (Array.isArray(arr)) return arr;
  115. }
  116. function _iterableToArrayLimit(arr, i) {
  117. if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
  118. return;
  119. }
  120. var _arr = [];
  121. var _n = true;
  122. var _d = false;
  123. var _e = undefined;
  124. try {
  125. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  126. _arr.push(_s.value);
  127. if (i && _arr.length === i) break;
  128. }
  129. } catch (err) {
  130. _d = true;
  131. _e = err;
  132. } finally {
  133. try {
  134. if (!_n && _i["return"] != null) _i["return"]();
  135. } finally {
  136. if (_d) throw _e;
  137. }
  138. }
  139. return _arr;
  140. }
  141. function _nonIterableRest() {
  142. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  143. }
  144. var classnames = createCommonjsModule(function (module) {
  145. /*!
  146. Copyright (c) 2017 Jed Watson.
  147. Licensed under the MIT License (MIT), see
  148. http://jedwatson.github.io/classnames
  149. */
  150. /* global define */
  151. (function () {
  152. var hasOwn = {}.hasOwnProperty;
  153. function classNames () {
  154. var classes = [];
  155. for (var i = 0; i < arguments.length; i++) {
  156. var arg = arguments[i];
  157. if (!arg) continue;
  158. var argType = typeof arg;
  159. if (argType === 'string' || argType === 'number') {
  160. classes.push(arg);
  161. } else if (Array.isArray(arg) && arg.length) {
  162. var inner = classNames.apply(null, arg);
  163. if (inner) {
  164. classes.push(inner);
  165. }
  166. } else if (argType === 'object') {
  167. for (var key in arg) {
  168. if (hasOwn.call(arg, key) && arg[key]) {
  169. classes.push(key);
  170. }
  171. }
  172. }
  173. }
  174. return classes.join(' ');
  175. }
  176. if ( module.exports) {
  177. classNames.default = classNames;
  178. module.exports = classNames;
  179. } else {
  180. window.classNames = classNames;
  181. }
  182. }());
  183. });
  184. function styleInject(css, ref) {
  185. if ( ref === void 0 ) ref = {};
  186. var insertAt = ref.insertAt;
  187. if (!css || typeof document === 'undefined') { return; }
  188. var head = document.head || document.getElementsByTagName('head')[0];
  189. var style = document.createElement('style');
  190. style.type = 'text/css';
  191. if (insertAt === 'top') {
  192. if (head.firstChild) {
  193. head.insertBefore(style, head.firstChild);
  194. } else {
  195. head.appendChild(style);
  196. }
  197. } else {
  198. head.appendChild(style);
  199. }
  200. if (style.styleSheet) {
  201. style.styleSheet.cssText = css;
  202. } else {
  203. style.appendChild(document.createTextNode(css));
  204. }
  205. }
  206. exports._classCallCheck = _classCallCheck;
  207. exports._createClass = _createClass;
  208. exports._defineProperty = _defineProperty;
  209. exports._getPrototypeOf = _getPrototypeOf;
  210. exports._inherits = _inherits;
  211. exports._objectSpread2 = _objectSpread2;
  212. exports._possibleConstructorReturn = _possibleConstructorReturn;
  213. exports._slicedToArray = _slicedToArray;
  214. exports.classnames = classnames;
  215. exports.commonjsGlobal = commonjsGlobal;
  216. exports.createCommonjsModule = createCommonjsModule;
  217. exports.getCjsExportFromNamespace = getCjsExportFromNamespace;
  218. exports.styleInject = styleInject;
  219. exports.unwrapExports = unwrapExports;
  220. //# sourceMappingURL=style-inject.es-3827494b.js.map