1 | var MergeStyles =
|
2 | (function(modules) {
|
3 |
|
4 | var installedModules = {};
|
5 |
|
6 |
|
7 | function __webpack_require__(moduleId) {
|
8 |
|
9 |
|
10 | if(installedModules[moduleId]) {
|
11 | return installedModules[moduleId].exports;
|
12 | }
|
13 |
|
14 | var module = installedModules[moduleId] = {
|
15 | i: moduleId,
|
16 | l: false,
|
17 | exports: {}
|
18 | };
|
19 |
|
20 |
|
21 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
|
23 |
|
24 | module.l = true;
|
25 |
|
26 |
|
27 | return module.exports;
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 | __webpack_require__.m = modules;
|
33 |
|
34 |
|
35 | __webpack_require__.c = installedModules;
|
36 |
|
37 |
|
38 | __webpack_require__.d = function(exports, name, getter) {
|
39 | if(!__webpack_require__.o(exports, name)) {
|
40 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
41 | }
|
42 | };
|
43 |
|
44 |
|
45 | __webpack_require__.r = function(exports) {
|
46 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
47 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
48 | }
|
49 | Object.defineProperty(exports, '__esModule', { value: true });
|
50 | };
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | __webpack_require__.t = function(value, mode) {
|
58 | if(mode & 1) value = __webpack_require__(value);
|
59 | if(mode & 8) return value;
|
60 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
61 | var ns = Object.create(null);
|
62 | __webpack_require__.r(ns);
|
63 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
64 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
65 | return ns;
|
66 | };
|
67 |
|
68 |
|
69 | __webpack_require__.n = function(module) {
|
70 | var getter = module && module.__esModule ?
|
71 | function getDefault() { return module['default']; } :
|
72 | function getModuleExports() { return module; };
|
73 | __webpack_require__.d(getter, 'a', getter);
|
74 | return getter;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
79 |
|
80 |
|
81 | __webpack_require__.p = "";
|
82 |
|
83 |
|
84 |
|
85 | return __webpack_require__(__webpack_require__.s = "./lib/index.js");
|
86 | })
|
87 |
|
88 | ({
|
89 |
|
90 | "../../node_modules/tslib/tslib.es6.js":
|
91 | (function(module, __webpack_exports__, __webpack_require__) {
|
92 |
|
93 | "use strict";
|
94 | __webpack_require__.r(__webpack_exports__);
|
95 | __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
|
96 | __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
|
97 | __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
|
98 | __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
|
99 | __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
|
100 | __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
|
101 | __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
|
102 | __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
|
103 | __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
|
104 | __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
|
105 | __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
|
106 | __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
|
107 | __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
|
108 | __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
|
109 | __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
|
110 | __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
|
111 | __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
|
112 | __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
|
113 | __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
|
114 | __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 | var extendStatics = function(d, b) {
|
132 | extendStatics = Object.setPrototypeOf ||
|
133 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
134 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
135 | return extendStatics(d, b);
|
136 | };
|
137 |
|
138 | function __extends(d, b) {
|
139 | extendStatics(d, b);
|
140 | function __() { this.constructor = d; }
|
141 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
142 | }
|
143 |
|
144 | var __assign = function() {
|
145 | __assign = Object.assign || function __assign(t) {
|
146 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
147 | s = arguments[i];
|
148 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
149 | }
|
150 | return t;
|
151 | }
|
152 | return __assign.apply(this, arguments);
|
153 | }
|
154 |
|
155 | function __rest(s, e) {
|
156 | var t = {};
|
157 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
158 | t[p] = s[p];
|
159 | if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
160 | for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
161 | if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
162 | t[p[i]] = s[p[i]];
|
163 | }
|
164 | return t;
|
165 | }
|
166 |
|
167 | function __decorate(decorators, target, key, desc) {
|
168 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
169 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
170 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
171 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
172 | }
|
173 |
|
174 | function __param(paramIndex, decorator) {
|
175 | return function (target, key) { decorator(target, key, paramIndex); }
|
176 | }
|
177 |
|
178 | function __metadata(metadataKey, metadataValue) {
|
179 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
180 | }
|
181 |
|
182 | function __awaiter(thisArg, _arguments, P, generator) {
|
183 | return new (P || (P = Promise))(function (resolve, reject) {
|
184 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
185 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
186 | function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
187 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
188 | });
|
189 | }
|
190 |
|
191 | function __generator(thisArg, body) {
|
192 | var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
193 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
194 | function verb(n) { return function (v) { return step([n, v]); }; }
|
195 | function step(op) {
|
196 | if (f) throw new TypeError("Generator is already executing.");
|
197 | while (_) try {
|
198 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
199 | if (y = 0, t) op = [op[0] & 2, t.value];
|
200 | switch (op[0]) {
|
201 | case 0: case 1: t = op; break;
|
202 | case 4: _.label++; return { value: op[1], done: false };
|
203 | case 5: _.label++; y = op[1]; op = [0]; continue;
|
204 | case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
205 | default:
|
206 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
207 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
208 | if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
209 | if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
210 | if (t[2]) _.ops.pop();
|
211 | _.trys.pop(); continue;
|
212 | }
|
213 | op = body.call(thisArg, _);
|
214 | } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
215 | if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
216 | }
|
217 | }
|
218 |
|
219 | function __exportStar(m, exports) {
|
220 | for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
221 | }
|
222 |
|
223 | function __values(o) {
|
224 | var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
225 | if (m) return m.call(o);
|
226 | return {
|
227 | next: function () {
|
228 | if (o && i >= o.length) o = void 0;
|
229 | return { value: o && o[i++], done: !o };
|
230 | }
|
231 | };
|
232 | }
|
233 |
|
234 | function __read(o, n) {
|
235 | var m = typeof Symbol === "function" && o[Symbol.iterator];
|
236 | if (!m) return o;
|
237 | var i = m.call(o), r, ar = [], e;
|
238 | try {
|
239 | while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
240 | }
|
241 | catch (error) { e = { error: error }; }
|
242 | finally {
|
243 | try {
|
244 | if (r && !r.done && (m = i["return"])) m.call(i);
|
245 | }
|
246 | finally { if (e) throw e.error; }
|
247 | }
|
248 | return ar;
|
249 | }
|
250 |
|
251 | function __spread() {
|
252 | for (var ar = [], i = 0; i < arguments.length; i++)
|
253 | ar = ar.concat(__read(arguments[i]));
|
254 | return ar;
|
255 | }
|
256 |
|
257 | function __spreadArrays() {
|
258 | for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
259 | for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
260 | for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
261 | r[k] = a[j];
|
262 | return r;
|
263 | };
|
264 |
|
265 | function __await(v) {
|
266 | return this instanceof __await ? (this.v = v, this) : new __await(v);
|
267 | }
|
268 |
|
269 | function __asyncGenerator(thisArg, _arguments, generator) {
|
270 | if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
271 | var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
272 | return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
273 | function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
274 | function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
275 | function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
276 | function fulfill(value) { resume("next", value); }
|
277 | function reject(value) { resume("throw", value); }
|
278 | function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
279 | }
|
280 |
|
281 | function __asyncDelegator(o) {
|
282 | var i, p;
|
283 | return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
284 | function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
285 | }
|
286 |
|
287 | function __asyncValues(o) {
|
288 | if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
289 | var m = o[Symbol.asyncIterator], i;
|
290 | return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
291 | function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
292 | function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
293 | }
|
294 |
|
295 | function __makeTemplateObject(cooked, raw) {
|
296 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
297 | return cooked;
|
298 | };
|
299 |
|
300 | function __importStar(mod) {
|
301 | if (mod && mod.__esModule) return mod;
|
302 | var result = {};
|
303 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
304 | result.default = mod;
|
305 | return result;
|
306 | }
|
307 |
|
308 | function __importDefault(mod) {
|
309 | return (mod && mod.__esModule) ? mod : { default: mod };
|
310 | }
|
311 |
|
312 |
|
313 | }),
|
314 |
|
315 | "../set-version/lib/index.js":
|
316 | (function(module, __webpack_exports__, __webpack_require__) {
|
317 |
|
318 | "use strict";
|
319 | __webpack_require__.r(__webpack_exports__);
|
320 | var _setVersion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../set-version/lib/setVersion.js");
|
321 | __webpack_require__.d(__webpack_exports__, "setVersion", function() { return _setVersion__WEBPACK_IMPORTED_MODULE_0__["setVersion"]; });
|
322 |
|
323 |
|
324 |
|
325 | Object(_setVersion__WEBPACK_IMPORTED_MODULE_0__["setVersion"])('@uifabric/set-version', '6.0.0');
|
326 |
|
327 |
|
328 | }),
|
329 |
|
330 | "../set-version/lib/setVersion.js":
|
331 | (function(module, __webpack_exports__, __webpack_require__) {
|
332 |
|
333 | "use strict";
|
334 | __webpack_require__.r(__webpack_exports__);
|
335 | __webpack_require__.d(__webpack_exports__, "setVersion", function() { return setVersion; });
|
336 |
|
337 |
|
338 | var packagesCache = {};
|
339 |
|
340 | var _win = undefined;
|
341 | try {
|
342 | _win = window;
|
343 | }
|
344 | catch (e) {
|
345 |
|
346 | }
|
347 | function setVersion(packageName, packageVersion) {
|
348 | if (typeof _win !== 'undefined') {
|
349 |
|
350 | var packages = (_win.__packages__ = _win.__packages__ || {});
|
351 |
|
352 |
|
353 | if (!packages[packageName] || !packagesCache[packageName]) {
|
354 | packagesCache[packageName] = packageVersion;
|
355 | var versions = (packages[packageName] = packages[packageName] || []);
|
356 | versions.push(packageVersion);
|
357 | }
|
358 | }
|
359 | }
|
360 |
|
361 |
|
362 | }),
|
363 |
|
364 | "./lib/StyleOptionsState.js":
|
365 | (function(module, __webpack_exports__, __webpack_require__) {
|
366 |
|
367 | "use strict";
|
368 | __webpack_require__.r(__webpack_exports__);
|
369 | __webpack_require__.d(__webpack_exports__, "setRTL", function() { return setRTL; });
|
370 | __webpack_require__.d(__webpack_exports__, "getRTL", function() { return getRTL; });
|
371 | __webpack_require__.d(__webpack_exports__, "getStyleOptions", function() { return getStyleOptions; });
|
372 |
|
373 |
|
374 |
|
375 | function setRTL(isRTL) {
|
376 | if (_rtl !== isRTL) {
|
377 | _rtl = isRTL;
|
378 | }
|
379 | }
|
380 |
|
381 |
|
382 |
|
383 | function getRTL() {
|
384 | if (_rtl === undefined) {
|
385 | _rtl =
|
386 | typeof document !== 'undefined' &&
|
387 | !!document.documentElement &&
|
388 | document.documentElement.getAttribute('dir') === 'rtl';
|
389 | }
|
390 | return _rtl;
|
391 | }
|
392 |
|
393 |
|
394 |
|
395 | var _rtl;
|
396 | _rtl = getRTL();
|
397 | function getStyleOptions() {
|
398 | return {
|
399 | rtl: getRTL(),
|
400 | };
|
401 | }
|
402 |
|
403 |
|
404 | }),
|
405 |
|
406 | "./lib/Stylesheet.js":
|
407 | (function(module, __webpack_exports__, __webpack_require__) {
|
408 |
|
409 | "use strict";
|
410 | __webpack_require__.r(__webpack_exports__);
|
411 | __webpack_require__.d(__webpack_exports__, "InjectionMode", function() { return InjectionMode; });
|
412 | __webpack_require__.d(__webpack_exports__, "Stylesheet", function() { return Stylesheet; });
|
413 | var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
|
414 |
|
415 | var InjectionMode = {
|
416 | |
417 |
|
418 |
|
419 | none: 0,
|
420 | |
421 |
|
422 |
|
423 | insertNode: 1,
|
424 | |
425 |
|
426 |
|
427 | appendChild: 2,
|
428 | };
|
429 | var STYLESHEET_SETTING = '__stylesheet__';
|
430 |
|
431 |
|
432 |
|
433 |
|
434 | var REUSE_STYLE_NODE = typeof navigator !== 'undefined' && /rv:11.0/.test(navigator.userAgent);
|
435 | var _global = {};
|
436 |
|
437 | try {
|
438 | _global = window;
|
439 | }
|
440 | catch (_a) {
|
441 |
|
442 | }
|
443 | var _stylesheet;
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 | var Stylesheet = (function () {
|
452 | function Stylesheet(config) {
|
453 | this._rules = [];
|
454 | this._preservedRules = [];
|
455 | this._rulesToInsert = [];
|
456 | this._counter = 0;
|
457 | this._keyToClassName = {};
|
458 | this._onResetCallbacks = [];
|
459 | this._classNameToArgs = {};
|
460 | this._config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ injectionMode: InjectionMode.insertNode, defaultPrefix: 'css', namespace: undefined, cspSettings: undefined }, config);
|
461 | this._keyToClassName = this._config.classNameCache || {};
|
462 | }
|
463 | |
464 |
|
465 |
|
466 | Stylesheet.getInstance = function () {
|
467 | var _a;
|
468 | _stylesheet = _global[STYLESHEET_SETTING];
|
469 | if (!_stylesheet || (_stylesheet._lastStyleElement && _stylesheet._lastStyleElement.ownerDocument !== document)) {
|
470 | var fabricConfig = ((_a = _global) === null || _a === void 0 ? void 0 : _a.FabricConfig) || {};
|
471 | _stylesheet = _global[STYLESHEET_SETTING] = new Stylesheet(fabricConfig.mergeStyles);
|
472 | }
|
473 | return _stylesheet;
|
474 | };
|
475 | |
476 |
|
477 |
|
478 | Stylesheet.prototype.setConfig = function (config) {
|
479 | this._config = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, this._config), config);
|
480 | };
|
481 | |
482 |
|
483 |
|
484 |
|
485 |
|
486 | Stylesheet.prototype.onReset = function (callback) {
|
487 | this._onResetCallbacks.push(callback);
|
488 | };
|
489 | |
490 |
|
491 |
|
492 |
|
493 |
|
494 | Stylesheet.prototype.getClassName = function (displayName) {
|
495 | var namespace = this._config.namespace;
|
496 | var prefix = displayName || this._config.defaultPrefix;
|
497 | return "" + (namespace ? namespace + '-' : '') + prefix + "-" + this._counter++;
|
498 | };
|
499 | |
500 |
|
501 |
|
502 |
|
503 | Stylesheet.prototype.cacheClassName = function (className, key, args, rules) {
|
504 | this._keyToClassName[key] = className;
|
505 | this._classNameToArgs[className] = {
|
506 | args: args,
|
507 | rules: rules,
|
508 | };
|
509 | };
|
510 | |
511 |
|
512 |
|
513 |
|
514 | Stylesheet.prototype.classNameFromKey = function (key) {
|
515 | return this._keyToClassName[key];
|
516 | };
|
517 | |
518 |
|
519 |
|
520 | Stylesheet.prototype.getClassNameCache = function () {
|
521 | return this._keyToClassName;
|
522 | };
|
523 | |
524 |
|
525 |
|
526 |
|
527 | Stylesheet.prototype.argsFromClassName = function (className) {
|
528 | var entry = this._classNameToArgs[className];
|
529 | return entry && entry.args;
|
530 | };
|
531 | |
532 |
|
533 |
|
534 |
|
535 | Stylesheet.prototype.insertedRulesFromClassName = function (className) {
|
536 | var entry = this._classNameToArgs[className];
|
537 | return entry && entry.rules;
|
538 | };
|
539 | |
540 |
|
541 |
|
542 |
|
543 | Stylesheet.prototype.insertRule = function (rule, preserve) {
|
544 | var injectionMode = this._config.injectionMode;
|
545 | var element = injectionMode !== InjectionMode.none ? this._getStyleElement() : undefined;
|
546 | if (preserve) {
|
547 | this._preservedRules.push(rule);
|
548 | }
|
549 | if (element) {
|
550 | switch (this._config.injectionMode) {
|
551 | case InjectionMode.insertNode:
|
552 | var sheet = element.sheet;
|
553 | try {
|
554 | sheet.insertRule(rule, sheet.cssRules.length);
|
555 | }
|
556 | catch (e) {
|
557 |
|
558 |
|
559 |
|
560 | }
|
561 | break;
|
562 | case InjectionMode.appendChild:
|
563 | element.appendChild(document.createTextNode(rule));
|
564 | break;
|
565 | }
|
566 | }
|
567 | else {
|
568 | this._rules.push(rule);
|
569 | }
|
570 | if (this._config.onInsertRule) {
|
571 | this._config.onInsertRule(rule);
|
572 | }
|
573 | };
|
574 | |
575 |
|
576 |
|
577 |
|
578 | Stylesheet.prototype.getRules = function (includePreservedRules) {
|
579 | return ((includePreservedRules ? this._preservedRules.join('') : '') + this._rules.join('') + this._rulesToInsert.join(''));
|
580 | };
|
581 | |
582 |
|
583 |
|
584 |
|
585 | Stylesheet.prototype.reset = function () {
|
586 | this._rules = [];
|
587 | this._rulesToInsert = [];
|
588 | this._counter = 0;
|
589 | this._classNameToArgs = {};
|
590 | this._keyToClassName = {};
|
591 | this._onResetCallbacks.forEach(function (callback) { return callback(); });
|
592 | };
|
593 |
|
594 | Stylesheet.prototype.resetKeys = function () {
|
595 | this._keyToClassName = {};
|
596 | };
|
597 | Stylesheet.prototype._getStyleElement = function () {
|
598 | var _this = this;
|
599 | if (!this._styleElement && typeof document !== 'undefined') {
|
600 | this._styleElement = this._createStyleElement();
|
601 | if (!REUSE_STYLE_NODE) {
|
602 |
|
603 | window.requestAnimationFrame(function () {
|
604 | _this._styleElement = undefined;
|
605 | });
|
606 | }
|
607 | }
|
608 | return this._styleElement;
|
609 | };
|
610 | Stylesheet.prototype._createStyleElement = function () {
|
611 | var head = document.head;
|
612 | var styleElement = document.createElement('style');
|
613 | var nodeToInsertBefore = null;
|
614 | styleElement.setAttribute('data-merge-styles', 'true');
|
615 | var cspSettings = this._config.cspSettings;
|
616 | if (cspSettings) {
|
617 | if (cspSettings.nonce) {
|
618 | styleElement.setAttribute('nonce', cspSettings.nonce);
|
619 | }
|
620 | }
|
621 | if (this._lastStyleElement) {
|
622 |
|
623 |
|
624 | nodeToInsertBefore = this._lastStyleElement.nextElementSibling;
|
625 | }
|
626 | else {
|
627 | var placeholderStyleTag = this._findPlaceholderStyleTag();
|
628 | if (placeholderStyleTag) {
|
629 | nodeToInsertBefore = placeholderStyleTag.nextElementSibling;
|
630 | }
|
631 | else {
|
632 | nodeToInsertBefore = head.childNodes[0];
|
633 | }
|
634 | }
|
635 | head.insertBefore(styleElement, head.contains(nodeToInsertBefore) ? nodeToInsertBefore : null);
|
636 | this._lastStyleElement = styleElement;
|
637 | return styleElement;
|
638 | };
|
639 | Stylesheet.prototype._findPlaceholderStyleTag = function () {
|
640 | var head = document.head;
|
641 | if (head) {
|
642 | return head.querySelector('style[data-merge-styles]');
|
643 | }
|
644 | return null;
|
645 | };
|
646 | return Stylesheet;
|
647 | }());
|
648 |
|
649 |
|
650 |
|
651 | }),
|
652 |
|
653 | "./lib/concatStyleSets.js":
|
654 | (function(module, __webpack_exports__, __webpack_require__) {
|
655 |
|
656 | "use strict";
|
657 | __webpack_require__.r(__webpack_exports__);
|
658 | __webpack_require__.d(__webpack_exports__, "concatStyleSets", function() { return concatStyleSets; });
|
659 | var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
|
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 | function concatStyleSets() {
|
666 | var styleSets = [];
|
667 | for (var _i = 0; _i < arguments.length; _i++) {
|
668 | styleSets[_i] = arguments[_i];
|
669 | }
|
670 | if (styleSets && styleSets.length === 1 && styleSets[0] && !styleSets[0].subComponentStyles) {
|
671 | return styleSets[0];
|
672 | }
|
673 | var mergedSet = {};
|
674 |
|
675 | var workingSubcomponentStyles = {};
|
676 | for (var _a = 0, styleSets_1 = styleSets; _a < styleSets_1.length; _a++) {
|
677 | var currentSet = styleSets_1[_a];
|
678 | if (currentSet) {
|
679 | for (var prop in currentSet) {
|
680 | if (currentSet.hasOwnProperty(prop)) {
|
681 | if (prop === 'subComponentStyles' && currentSet.subComponentStyles !== undefined) {
|
682 |
|
683 | var currentComponentStyles = currentSet.subComponentStyles;
|
684 | for (var subCompProp in currentComponentStyles) {
|
685 | if (currentComponentStyles.hasOwnProperty(subCompProp)) {
|
686 | if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {
|
687 | workingSubcomponentStyles[subCompProp].push(currentComponentStyles[subCompProp]);
|
688 | }
|
689 | else {
|
690 | workingSubcomponentStyles[subCompProp] = [currentComponentStyles[subCompProp]];
|
691 | }
|
692 | }
|
693 | }
|
694 | continue;
|
695 | }
|
696 |
|
697 |
|
698 | var mergedValue = mergedSet[prop];
|
699 | var currentValue = currentSet[prop];
|
700 | if (mergedValue === undefined) {
|
701 | mergedSet[prop] = currentValue;
|
702 | }
|
703 | else {
|
704 | mergedSet[prop] = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])((Array.isArray(mergedValue) ? mergedValue : [mergedValue]), (Array.isArray(currentValue) ? currentValue : [currentValue]));
|
705 | }
|
706 | }
|
707 | }
|
708 | }
|
709 | }
|
710 | if (Object.keys(workingSubcomponentStyles).length > 0) {
|
711 | mergedSet.subComponentStyles = {};
|
712 | var mergedSubStyles = mergedSet.subComponentStyles;
|
713 | var _loop_1 = function (subCompProp) {
|
714 | if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {
|
715 | var workingSet_1 = workingSubcomponentStyles[subCompProp];
|
716 | mergedSubStyles[subCompProp] = function (styleProps) {
|
717 | return concatStyleSets.apply(void 0, workingSet_1.map(function (styleFunctionOrObject) {
|
718 | return typeof styleFunctionOrObject === 'function' ? styleFunctionOrObject(styleProps) : styleFunctionOrObject;
|
719 | }));
|
720 | };
|
721 | }
|
722 | };
|
723 |
|
724 | for (var subCompProp in workingSubcomponentStyles) {
|
725 | _loop_1(subCompProp);
|
726 | }
|
727 | }
|
728 | return mergedSet;
|
729 | }
|
730 |
|
731 |
|
732 | }),
|
733 |
|
734 | "./lib/concatStyleSetsWithProps.js":
|
735 | (function(module, __webpack_exports__, __webpack_require__) {
|
736 |
|
737 | "use strict";
|
738 | __webpack_require__.r(__webpack_exports__);
|
739 | __webpack_require__.d(__webpack_exports__, "concatStyleSetsWithProps", function() { return concatStyleSetsWithProps; });
|
740 | var _concatStyleSets__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/concatStyleSets.js");
|
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 |
|
747 | function concatStyleSetsWithProps(styleProps) {
|
748 | var allStyles = [];
|
749 | for (var _i = 1; _i < arguments.length; _i++) {
|
750 | allStyles[_i - 1] = arguments[_i];
|
751 | }
|
752 | var result = [];
|
753 | for (var _a = 0, allStyles_1 = allStyles; _a < allStyles_1.length; _a++) {
|
754 | var styles = allStyles_1[_a];
|
755 | if (styles) {
|
756 | result.push(typeof styles === 'function' ? styles(styleProps) : styles);
|
757 | }
|
758 | }
|
759 | if (result.length === 1) {
|
760 | return result[0];
|
761 | }
|
762 | else if (result.length) {
|
763 |
|
764 |
|
765 |
|
766 |
|
767 | return _concatStyleSets__WEBPACK_IMPORTED_MODULE_0__["concatStyleSets"].apply(void 0, result);
|
768 | }
|
769 | return {};
|
770 | }
|
771 |
|
772 |
|
773 | }),
|
774 |
|
775 | "./lib/extractStyleParts.js":
|
776 | (function(module, __webpack_exports__, __webpack_require__) {
|
777 |
|
778 | "use strict";
|
779 | __webpack_require__.r(__webpack_exports__);
|
780 | __webpack_require__.d(__webpack_exports__, "extractStyleParts", function() { return extractStyleParts; });
|
781 | var _Stylesheet__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/Stylesheet.js");
|
782 |
|
783 |
|
784 |
|
785 |
|
786 |
|
787 | function extractStyleParts() {
|
788 | var args = [];
|
789 | for (var _i = 0; _i < arguments.length; _i++) {
|
790 | args[_i] = arguments[_i];
|
791 | }
|
792 | var classes = [];
|
793 | var objects = [];
|
794 | var stylesheet = _Stylesheet__WEBPACK_IMPORTED_MODULE_0__["Stylesheet"].getInstance();
|
795 | function _processArgs(argsList) {
|
796 | for (var _i = 0, argsList_1 = argsList; _i < argsList_1.length; _i++) {
|
797 | var arg = argsList_1[_i];
|
798 | if (arg) {
|
799 | if (typeof arg === 'string') {
|
800 | if (arg.indexOf(' ') >= 0) {
|
801 | _processArgs(arg.split(' '));
|
802 | }
|
803 | else {
|
804 | var translatedArgs = stylesheet.argsFromClassName(arg);
|
805 | if (translatedArgs) {
|
806 | _processArgs(translatedArgs);
|
807 | }
|
808 | else {
|
809 |
|
810 | if (classes.indexOf(arg) === -1) {
|
811 | classes.push(arg);
|
812 | }
|
813 | }
|
814 | }
|
815 | }
|
816 | else if (Array.isArray(arg)) {
|
817 | _processArgs(arg);
|
818 | }
|
819 | else if (typeof arg === 'object') {
|
820 | objects.push(arg);
|
821 | }
|
822 | }
|
823 | }
|
824 | }
|
825 | _processArgs(args);
|
826 | return {
|
827 | classes: classes,
|
828 | objects: objects,
|
829 | };
|
830 | }
|
831 |
|
832 |
|
833 | }),
|
834 |
|
835 | "./lib/fontFace.js":
|
836 | (function(module, __webpack_exports__, __webpack_require__) {
|
837 |
|
838 | "use strict";
|
839 | __webpack_require__.r(__webpack_exports__);
|
840 | __webpack_require__.d(__webpack_exports__, "fontFace", function() { return fontFace; });
|
841 | var _StyleOptionsState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/StyleOptionsState.js");
|
842 | var _Stylesheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/Stylesheet.js");
|
843 | var _styleToClassName__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./lib/styleToClassName.js");
|
844 |
|
845 |
|
846 |
|
847 |
|
848 |
|
849 |
|
850 |
|
851 | function fontFace(font) {
|
852 | _Stylesheet__WEBPACK_IMPORTED_MODULE_1__["Stylesheet"].getInstance().insertRule("@font-face{" + Object(_styleToClassName__WEBPACK_IMPORTED_MODULE_2__["serializeRuleEntries"])(Object(_StyleOptionsState__WEBPACK_IMPORTED_MODULE_0__["getStyleOptions"])(), font) + "}", true);
|
853 | }
|
854 |
|
855 |
|
856 | }),
|
857 |
|
858 | "./lib/getVendorSettings.js":
|
859 | (function(module, __webpack_exports__, __webpack_require__) {
|
860 |
|
861 | "use strict";
|
862 | __webpack_require__.r(__webpack_exports__);
|
863 | __webpack_require__.d(__webpack_exports__, "getVendorSettings", function() { return getVendorSettings; });
|
864 | __webpack_require__.d(__webpack_exports__, "setVendorSettings", function() { return setVendorSettings; });
|
865 | var _vendorSettings;
|
866 | function getVendorSettings() {
|
867 | var _a, _b;
|
868 | if (!_vendorSettings) {
|
869 | var doc = typeof document !== 'undefined' ? document : undefined;
|
870 | var nav = typeof navigator !== 'undefined' ? navigator : undefined;
|
871 | var userAgent = (_b = (_a = nav) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
872 | if (!doc) {
|
873 | _vendorSettings = {
|
874 | isWebkit: true,
|
875 | isMoz: true,
|
876 | isOpera: true,
|
877 | isMs: true,
|
878 | };
|
879 | }
|
880 | else {
|
881 | _vendorSettings = {
|
882 | isWebkit: !!(doc && 'WebkitAppearance' in doc.documentElement.style),
|
883 | isMoz: !!(userAgent && userAgent.indexOf('firefox') > -1),
|
884 | isOpera: !!(userAgent && userAgent.indexOf('opera') > -1),
|
885 | isMs: !!(nav && (/rv:11.0/i.test(nav.userAgent) || /Edge\/\d./i.test(navigator.userAgent))),
|
886 | };
|
887 | }
|
888 | }
|
889 | return _vendorSettings;
|
890 | }
|
891 |
|
892 |
|
893 |
|
894 | function setVendorSettings(vendorSettings) {
|
895 | _vendorSettings = vendorSettings;
|
896 | }
|
897 |
|
898 |
|
899 | }),
|
900 |
|
901 | "./lib/index.js":
|
902 | (function(module, __webpack_exports__, __webpack_require__) {
|
903 |
|
904 | "use strict";
|
905 | __webpack_require__.r(__webpack_exports__);
|
906 | var _mergeStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/mergeStyles.js");
|
907 | __webpack_require__.d(__webpack_exports__, "mergeStyles", function() { return _mergeStyles__WEBPACK_IMPORTED_MODULE_0__["mergeStyles"]; });
|
908 |
|
909 | __webpack_require__.d(__webpack_exports__, "mergeCss", function() { return _mergeStyles__WEBPACK_IMPORTED_MODULE_0__["mergeCss"]; });
|
910 |
|
911 | var _mergeStyleSets__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/mergeStyleSets.js");
|
912 | __webpack_require__.d(__webpack_exports__, "mergeStyleSets", function() { return _mergeStyleSets__WEBPACK_IMPORTED_MODULE_1__["mergeStyleSets"]; });
|
913 |
|
914 | __webpack_require__.d(__webpack_exports__, "mergeCssSets", function() { return _mergeStyleSets__WEBPACK_IMPORTED_MODULE_1__["mergeCssSets"]; });
|
915 |
|
916 | var _concatStyleSets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./lib/concatStyleSets.js");
|
917 | __webpack_require__.d(__webpack_exports__, "concatStyleSets", function() { return _concatStyleSets__WEBPACK_IMPORTED_MODULE_2__["concatStyleSets"]; });
|
918 |
|
919 | var _concatStyleSetsWithProps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./lib/concatStyleSetsWithProps.js");
|
920 | __webpack_require__.d(__webpack_exports__, "concatStyleSetsWithProps", function() { return _concatStyleSetsWithProps__WEBPACK_IMPORTED_MODULE_3__["concatStyleSetsWithProps"]; });
|
921 |
|
922 | var _fontFace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./lib/fontFace.js");
|
923 | __webpack_require__.d(__webpack_exports__, "fontFace", function() { return _fontFace__WEBPACK_IMPORTED_MODULE_4__["fontFace"]; });
|
924 |
|
925 | var _keyframes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./lib/keyframes.js");
|
926 | __webpack_require__.d(__webpack_exports__, "keyframes", function() { return _keyframes__WEBPACK_IMPORTED_MODULE_5__["keyframes"]; });
|
927 |
|
928 | var _Stylesheet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./lib/Stylesheet.js");
|
929 | __webpack_require__.d(__webpack_exports__, "InjectionMode", function() { return _Stylesheet__WEBPACK_IMPORTED_MODULE_6__["InjectionMode"]; });
|
930 |
|
931 | __webpack_require__.d(__webpack_exports__, "Stylesheet", function() { return _Stylesheet__WEBPACK_IMPORTED_MODULE_6__["Stylesheet"]; });
|
932 |
|
933 | var _StyleOptionsState__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("./lib/StyleOptionsState.js");
|
934 | __webpack_require__.d(__webpack_exports__, "setRTL", function() { return _StyleOptionsState__WEBPACK_IMPORTED_MODULE_7__["setRTL"]; });
|
935 |
|
936 | var _version__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./lib/version.js");
|
937 |
|
938 |
|
939 |
|
940 |
|
941 |
|
942 |
|
943 |
|
944 |
|
945 |
|
946 |
|
947 |
|
948 | }),
|
949 |
|
950 | "./lib/keyframes.js":
|
951 | (function(module, __webpack_exports__, __webpack_require__) {
|
952 |
|
953 | "use strict";
|
954 | __webpack_require__.r(__webpack_exports__);
|
955 | __webpack_require__.d(__webpack_exports__, "keyframes", function() { return keyframes; });
|
956 | var _StyleOptionsState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/StyleOptionsState.js");
|
957 | var _Stylesheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/Stylesheet.js");
|
958 | var _styleToClassName__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./lib/styleToClassName.js");
|
959 |
|
960 |
|
961 |
|
962 |
|
963 |
|
964 |
|
965 |
|
966 |
|
967 | function keyframes(timeline) {
|
968 | var stylesheet = _Stylesheet__WEBPACK_IMPORTED_MODULE_1__["Stylesheet"].getInstance();
|
969 | var name = stylesheet.getClassName();
|
970 | var rulesArray = [];
|
971 | for (var prop in timeline) {
|
972 | if (timeline.hasOwnProperty(prop)) {
|
973 | rulesArray.push(prop, '{', Object(_styleToClassName__WEBPACK_IMPORTED_MODULE_2__["serializeRuleEntries"])(Object(_StyleOptionsState__WEBPACK_IMPORTED_MODULE_0__["getStyleOptions"])(), timeline[prop]), '}');
|
974 | }
|
975 | }
|
976 | var rules = rulesArray.join('');
|
977 | stylesheet.insertRule("@keyframes " + name + "{" + rules + "}", true);
|
978 | stylesheet.cacheClassName(name, rules, [], ['keyframes', rules]);
|
979 | return name;
|
980 | }
|
981 |
|
982 |
|
983 | }),
|
984 |
|
985 | "./lib/mergeStyleSets.js":
|
986 | (function(module, __webpack_exports__, __webpack_require__) {
|
987 |
|
988 | "use strict";
|
989 | __webpack_require__.r(__webpack_exports__);
|
990 | __webpack_require__.d(__webpack_exports__, "mergeStyleSets", function() { return mergeStyleSets; });
|
991 | __webpack_require__.d(__webpack_exports__, "mergeCssSets", function() { return mergeCssSets; });
|
992 | var _concatStyleSets__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/concatStyleSets.js");
|
993 | var _extractStyleParts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/extractStyleParts.js");
|
994 | var _StyleOptionsState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./lib/StyleOptionsState.js");
|
995 | var _styleToClassName__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./lib/styleToClassName.js");
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
|
1007 |
|
1008 | function mergeStyleSets() {
|
1009 | var styleSets = [];
|
1010 | for (var _i = 0; _i < arguments.length; _i++) {
|
1011 | styleSets[_i] = arguments[_i];
|
1012 | }
|
1013 | return mergeCssSets(styleSets, Object(_StyleOptionsState__WEBPACK_IMPORTED_MODULE_2__["getStyleOptions"])());
|
1014 | }
|
1015 |
|
1016 |
|
1017 |
|
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 |
|
1024 | function mergeCssSets(styleSets, options) {
|
1025 | var _a, _b;
|
1026 | var classNameSet = { subComponentStyles: {} };
|
1027 | var styleSet = styleSets[0];
|
1028 | if (!styleSet && styleSets.length <= 1) {
|
1029 | return { subComponentStyles: {} };
|
1030 | }
|
1031 | var concatenatedStyleSet = _concatStyleSets__WEBPACK_IMPORTED_MODULE_0__["concatStyleSets"].apply(void 0, styleSets);
|
1032 | var registrations = [];
|
1033 | for (var styleSetArea in concatenatedStyleSet) {
|
1034 | if (concatenatedStyleSet.hasOwnProperty(styleSetArea)) {
|
1035 | if (styleSetArea === 'subComponentStyles') {
|
1036 | classNameSet.subComponentStyles = concatenatedStyleSet.subComponentStyles || {};
|
1037 | continue;
|
1038 | }
|
1039 | var styles = concatenatedStyleSet[styleSetArea];
|
1040 | var _c = Object(_extractStyleParts__WEBPACK_IMPORTED_MODULE_1__["extractStyleParts"])(styles), classes = _c.classes, objects = _c.objects;
|
1041 | if ((_a = objects) === null || _a === void 0 ? void 0 : _a.length) {
|
1042 | var registration = Object(_styleToClassName__WEBPACK_IMPORTED_MODULE_3__["styleToRegistration"])(options || {}, { displayName: styleSetArea }, objects);
|
1043 | if (registration) {
|
1044 | registrations.push(registration);
|
1045 | classNameSet[styleSetArea] = classes.concat([registration.className]).join(' ');
|
1046 | }
|
1047 | }
|
1048 | else {
|
1049 | classNameSet[styleSetArea] = classes.join(' ');
|
1050 | }
|
1051 | }
|
1052 | }
|
1053 | for (var _i = 0, registrations_1 = registrations; _i < registrations_1.length; _i++) {
|
1054 | var registration = registrations_1[_i];
|
1055 | if (registration) {
|
1056 | Object(_styleToClassName__WEBPACK_IMPORTED_MODULE_3__["applyRegistration"])(registration, (_b = options) === null || _b === void 0 ? void 0 : _b.specificityMultiplier);
|
1057 | }
|
1058 | }
|
1059 | return classNameSet;
|
1060 | }
|
1061 |
|
1062 |
|
1063 | }),
|
1064 |
|
1065 | "./lib/mergeStyles.js":
|
1066 | (function(module, __webpack_exports__, __webpack_require__) {
|
1067 |
|
1068 | "use strict";
|
1069 | __webpack_require__.r(__webpack_exports__);
|
1070 | __webpack_require__.d(__webpack_exports__, "mergeStyles", function() { return mergeStyles; });
|
1071 | __webpack_require__.d(__webpack_exports__, "mergeCss", function() { return mergeCss; });
|
1072 | var _extractStyleParts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/extractStyleParts.js");
|
1073 | var _StyleOptionsState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/StyleOptionsState.js");
|
1074 | var _styleToClassName__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./lib/styleToClassName.js");
|
1075 |
|
1076 |
|
1077 |
|
1078 |
|
1079 |
|
1080 |
|
1081 |
|
1082 |
|
1083 | function mergeStyles() {
|
1084 | var args = [];
|
1085 | for (var _i = 0; _i < arguments.length; _i++) {
|
1086 | args[_i] = arguments[_i];
|
1087 | }
|
1088 | return mergeCss(args, Object(_StyleOptionsState__WEBPACK_IMPORTED_MODULE_1__["getStyleOptions"])());
|
1089 | }
|
1090 |
|
1091 |
|
1092 |
|
1093 |
|
1094 |
|
1095 |
|
1096 | function mergeCss(args, options) {
|
1097 | var styleArgs = args instanceof Array ? args : [args];
|
1098 | var _a = Object(_extractStyleParts__WEBPACK_IMPORTED_MODULE_0__["extractStyleParts"])(styleArgs), classes = _a.classes, objects = _a.objects;
|
1099 | if (objects.length) {
|
1100 | classes.push(Object(_styleToClassName__WEBPACK_IMPORTED_MODULE_2__["styleToClassName"])(options || {}, objects));
|
1101 | }
|
1102 | return classes.join(' ');
|
1103 | }
|
1104 |
|
1105 |
|
1106 | }),
|
1107 |
|
1108 | "./lib/styleToClassName.js":
|
1109 | (function(module, __webpack_exports__, __webpack_require__) {
|
1110 |
|
1111 | "use strict";
|
1112 | __webpack_require__.r(__webpack_exports__);
|
1113 | __webpack_require__.d(__webpack_exports__, "serializeRuleEntries", function() { return serializeRuleEntries; });
|
1114 | __webpack_require__.d(__webpack_exports__, "styleToRegistration", function() { return styleToRegistration; });
|
1115 | __webpack_require__.d(__webpack_exports__, "applyRegistration", function() { return applyRegistration; });
|
1116 | __webpack_require__.d(__webpack_exports__, "styleToClassName", function() { return styleToClassName; });
|
1117 | var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
|
1118 | var _Stylesheet__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./lib/Stylesheet.js");
|
1119 | var _transforms_kebabRules__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./lib/transforms/kebabRules.js");
|
1120 | var _transforms_prefixRules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./lib/transforms/prefixRules.js");
|
1121 | var _transforms_provideUnits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./lib/transforms/provideUnits.js");
|
1122 | var _transforms_rtlifyRules__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./lib/transforms/rtlifyRules.js");
|
1123 |
|
1124 |
|
1125 |
|
1126 |
|
1127 |
|
1128 |
|
1129 | var DISPLAY_NAME = 'displayName';
|
1130 | function getDisplayName(rules) {
|
1131 | var rootStyle = rules && rules['&'];
|
1132 | return rootStyle ? rootStyle.displayName : undefined;
|
1133 | }
|
1134 | var globalSelectorRegExp = /\:global\((.+?)\)/g;
|
1135 |
|
1136 |
|
1137 |
|
1138 |
|
1139 |
|
1140 |
|
1141 |
|
1142 | function expandCommaSeparatedGlobals(selectorWithGlobals) {
|
1143 |
|
1144 | if (!globalSelectorRegExp.test(selectorWithGlobals)) {
|
1145 | return selectorWithGlobals;
|
1146 | }
|
1147 | var replacementInfo = [];
|
1148 | var findGlobal = /\:global\((.+?)\)/g;
|
1149 | var match = null;
|
1150 |
|
1151 | while ((match = findGlobal.exec(selectorWithGlobals))) {
|
1152 |
|
1153 | if (match[1].indexOf(',') > -1) {
|
1154 | replacementInfo.push([
|
1155 | match.index,
|
1156 | match.index + match[0].length,
|
1157 |
|
1158 | match[1]
|
1159 | .split(',')
|
1160 | .map(function (v) { return ":global(" + v.trim() + ")"; })
|
1161 | .join(', '),
|
1162 | ]);
|
1163 | }
|
1164 | }
|
1165 |
|
1166 | return replacementInfo
|
1167 | .reverse()
|
1168 | .reduce(function (selector, _a) {
|
1169 | var matchIndex = _a[0], matchEndIndex = _a[1], replacement = _a[2];
|
1170 | var prefix = selector.slice(0, matchIndex);
|
1171 | var suffix = selector.slice(matchEndIndex);
|
1172 | return prefix + replacement + suffix;
|
1173 | }, selectorWithGlobals);
|
1174 | }
|
1175 | function expandSelector(newSelector, currentSelector) {
|
1176 | if (newSelector.indexOf(':global(') >= 0) {
|
1177 | return newSelector.replace(globalSelectorRegExp, '$1');
|
1178 | }
|
1179 | else if (newSelector.indexOf(':') === 0) {
|
1180 | return currentSelector + newSelector;
|
1181 | }
|
1182 | else if (newSelector.indexOf('&') < 0) {
|
1183 | return currentSelector + ' ' + newSelector;
|
1184 | }
|
1185 | return newSelector;
|
1186 | }
|
1187 | function extractSelector(currentSelector, rules, selector, value) {
|
1188 | if (rules === void 0) { rules = { __order: [] }; }
|
1189 | if (selector.indexOf('@') === 0) {
|
1190 | selector = selector + '{' + currentSelector;
|
1191 | extractRules([value], rules, selector);
|
1192 | }
|
1193 | else if (selector.indexOf(',') > -1) {
|
1194 | expandCommaSeparatedGlobals(selector)
|
1195 | .split(',')
|
1196 | .map(function (s) { return s.trim(); })
|
1197 | .forEach(function (separatedSelector) {
|
1198 | return extractRules([value], rules, expandSelector(separatedSelector, currentSelector));
|
1199 | });
|
1200 | }
|
1201 | else {
|
1202 | extractRules([value], rules, expandSelector(selector, currentSelector));
|
1203 | }
|
1204 | }
|
1205 | function extractRules(args, rules, currentSelector) {
|
1206 | if (rules === void 0) { rules = { __order: [] }; }
|
1207 | if (currentSelector === void 0) { currentSelector = '&'; }
|
1208 | var stylesheet = _Stylesheet__WEBPACK_IMPORTED_MODULE_1__["Stylesheet"].getInstance();
|
1209 | var currentRules = rules[currentSelector];
|
1210 | if (!currentRules) {
|
1211 | currentRules = {};
|
1212 | rules[currentSelector] = currentRules;
|
1213 | rules.__order.push(currentSelector);
|
1214 | }
|
1215 | for (var _i = 0, args_1 = args; _i < args_1.length; _i++) {
|
1216 | var arg = args_1[_i];
|
1217 |
|
1218 | if (typeof arg === 'string') {
|
1219 | var expandedRules = stylesheet.argsFromClassName(arg);
|
1220 | if (expandedRules) {
|
1221 | extractRules(expandedRules, rules, currentSelector);
|
1222 | }
|
1223 |
|
1224 | }
|
1225 | else if (Array.isArray(arg)) {
|
1226 | extractRules(arg, rules, currentSelector);
|
1227 | }
|
1228 | else {
|
1229 | for (var prop in arg) {
|
1230 | if (arg.hasOwnProperty(prop)) {
|
1231 | var propValue = arg[prop];
|
1232 | if (prop === 'selectors') {
|
1233 |
|
1234 | var selectors = arg.selectors;
|
1235 | for (var newSelector in selectors) {
|
1236 | if (selectors.hasOwnProperty(newSelector)) {
|
1237 | extractSelector(currentSelector, rules, newSelector, selectors[newSelector]);
|
1238 | }
|
1239 | }
|
1240 | }
|
1241 | else if (typeof propValue === 'object') {
|
1242 |
|
1243 | if (propValue !== null) {
|
1244 | extractSelector(currentSelector, rules, prop, propValue);
|
1245 | }
|
1246 | }
|
1247 | else {
|
1248 | if (propValue !== undefined) {
|
1249 |
|
1250 | if (prop === 'margin' || prop === 'padding') {
|
1251 | expandQuads(currentRules, prop, propValue);
|
1252 | }
|
1253 | else {
|
1254 | currentRules[prop] = propValue;
|
1255 | }
|
1256 | }
|
1257 | }
|
1258 | }
|
1259 | }
|
1260 | }
|
1261 | }
|
1262 | return rules;
|
1263 | }
|
1264 | function expandQuads(currentRules, name, value) {
|
1265 | var parts = typeof value === 'string' ? value.split(' ') : [value];
|
1266 | currentRules[name + 'Top'] = parts[0];
|
1267 | currentRules[name + 'Right'] = parts[1] || parts[0];
|
1268 | currentRules[name + 'Bottom'] = parts[2] || parts[0];
|
1269 | currentRules[name + 'Left'] = parts[3] || parts[1] || parts[0];
|
1270 | }
|
1271 | function getKeyForRules(options, rules) {
|
1272 | var serialized = [options.rtl ? 'rtl' : 'ltr'];
|
1273 | var hasProps = false;
|
1274 | for (var _i = 0, _a = rules.__order; _i < _a.length; _i++) {
|
1275 | var selector = _a[_i];
|
1276 | serialized.push(selector);
|
1277 | var rulesForSelector = rules[selector];
|
1278 | for (var propName in rulesForSelector) {
|
1279 | if (rulesForSelector.hasOwnProperty(propName) && rulesForSelector[propName] !== undefined) {
|
1280 | hasProps = true;
|
1281 | serialized.push(propName, rulesForSelector[propName]);
|
1282 | }
|
1283 | }
|
1284 | }
|
1285 | return hasProps ? serialized.join('') : undefined;
|
1286 | }
|
1287 | function repeatString(target, count) {
|
1288 | if (count <= 0) {
|
1289 | return '';
|
1290 | }
|
1291 | if (count === 1) {
|
1292 | return target;
|
1293 | }
|
1294 | return target + repeatString(target, count - 1);
|
1295 | }
|
1296 | function serializeRuleEntries(options, ruleEntries) {
|
1297 | if (!ruleEntries) {
|
1298 | return '';
|
1299 | }
|
1300 | var allEntries = [];
|
1301 | for (var entry in ruleEntries) {
|
1302 | if (ruleEntries.hasOwnProperty(entry) && entry !== DISPLAY_NAME && ruleEntries[entry] !== undefined) {
|
1303 | allEntries.push(entry, ruleEntries[entry]);
|
1304 | }
|
1305 | }
|
1306 |
|
1307 | for (var i = 0; i < allEntries.length; i += 2) {
|
1308 | Object(_transforms_kebabRules__WEBPACK_IMPORTED_MODULE_2__["kebabRules"])(allEntries, i);
|
1309 | Object(_transforms_provideUnits__WEBPACK_IMPORTED_MODULE_4__["provideUnits"])(allEntries, i);
|
1310 | Object(_transforms_rtlifyRules__WEBPACK_IMPORTED_MODULE_5__["rtlifyRules"])(options, allEntries, i);
|
1311 | Object(_transforms_prefixRules__WEBPACK_IMPORTED_MODULE_3__["prefixRules"])(allEntries, i);
|
1312 | }
|
1313 |
|
1314 | for (var i = 1; i < allEntries.length; i += 4) {
|
1315 | allEntries.splice(i, 1, ':', allEntries[i], ';');
|
1316 | }
|
1317 | return allEntries.join('');
|
1318 | }
|
1319 | function styleToRegistration(options) {
|
1320 | var args = [];
|
1321 | for (var _i = 1; _i < arguments.length; _i++) {
|
1322 | args[_i - 1] = arguments[_i];
|
1323 | }
|
1324 | var rules = extractRules(args);
|
1325 | var key = getKeyForRules(options, rules);
|
1326 | if (key) {
|
1327 | var stylesheet = _Stylesheet__WEBPACK_IMPORTED_MODULE_1__["Stylesheet"].getInstance();
|
1328 | var registration = {
|
1329 | className: stylesheet.classNameFromKey(key),
|
1330 | key: key,
|
1331 | args: args,
|
1332 | };
|
1333 | if (!registration.className) {
|
1334 | registration.className = stylesheet.getClassName(getDisplayName(rules));
|
1335 | var rulesToInsert = [];
|
1336 | for (var _a = 0, _b = rules.__order; _a < _b.length; _a++) {
|
1337 | var selector = _b[_a];
|
1338 | rulesToInsert.push(selector, serializeRuleEntries(options, rules[selector]));
|
1339 | }
|
1340 | registration.rulesToInsert = rulesToInsert;
|
1341 | }
|
1342 | return registration;
|
1343 | }
|
1344 | return undefined;
|
1345 | }
|
1346 |
|
1347 |
|
1348 |
|
1349 |
|
1350 |
|
1351 |
|
1352 | function applyRegistration(registration, specificityMultiplier) {
|
1353 | if (specificityMultiplier === void 0) { specificityMultiplier = 1; }
|
1354 | var stylesheet = _Stylesheet__WEBPACK_IMPORTED_MODULE_1__["Stylesheet"].getInstance();
|
1355 | var className = registration.className, key = registration.key, args = registration.args, rulesToInsert = registration.rulesToInsert;
|
1356 | if (rulesToInsert) {
|
1357 |
|
1358 | for (var i = 0; i < rulesToInsert.length; i += 2) {
|
1359 | var rules = rulesToInsert[i + 1];
|
1360 | if (rules) {
|
1361 | var selector = rulesToInsert[i];
|
1362 | selector = selector.replace(/&/g, repeatString("." + registration.className, specificityMultiplier));
|
1363 |
|
1364 | var processedRule = selector + "{" + rules + "}" + (selector.indexOf('@') === 0 ? '}' : '');
|
1365 | stylesheet.insertRule(processedRule);
|
1366 | }
|
1367 | }
|
1368 | stylesheet.cacheClassName(className, key, args, rulesToInsert);
|
1369 | }
|
1370 | }
|
1371 | function styleToClassName(options) {
|
1372 | var args = [];
|
1373 | for (var _i = 1; _i < arguments.length; _i++) {
|
1374 | args[_i - 1] = arguments[_i];
|
1375 | }
|
1376 | var registration = styleToRegistration.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spreadArrays"])([options], args));
|
1377 | if (registration) {
|
1378 | applyRegistration(registration, options.specificityMultiplier);
|
1379 | return registration.className;
|
1380 | }
|
1381 | return '';
|
1382 | }
|
1383 |
|
1384 |
|
1385 | }),
|
1386 |
|
1387 | "./lib/transforms/kebabRules.js":
|
1388 | (function(module, __webpack_exports__, __webpack_require__) {
|
1389 |
|
1390 | "use strict";
|
1391 | __webpack_require__.r(__webpack_exports__);
|
1392 | __webpack_require__.d(__webpack_exports__, "kebabRules", function() { return kebabRules; });
|
1393 | var rules = {};
|
1394 | function kebabRules(rulePairs, index) {
|
1395 | var rule = rulePairs[index];
|
1396 | if (rule.charAt(0) !== '-') {
|
1397 | rulePairs[index] = rules[rule] = rules[rule] || rule.replace(/([A-Z])/g, '-$1').toLowerCase();
|
1398 | }
|
1399 | }
|
1400 |
|
1401 |
|
1402 | }),
|
1403 |
|
1404 | "./lib/transforms/prefixRules.js":
|
1405 | (function(module, __webpack_exports__, __webpack_require__) {
|
1406 |
|
1407 | "use strict";
|
1408 | __webpack_require__.r(__webpack_exports__);
|
1409 | __webpack_require__.d(__webpack_exports__, "prefixRules", function() { return prefixRules; });
|
1410 | var _getVendorSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./lib/getVendorSettings.js");
|
1411 |
|
1412 | var autoPrefixNames = {
|
1413 | 'user-select': 1,
|
1414 | };
|
1415 | function prefixRules(rulePairs, index) {
|
1416 | var vendorSettings = Object(_getVendorSettings__WEBPACK_IMPORTED_MODULE_0__["getVendorSettings"])();
|
1417 | var name = rulePairs[index];
|
1418 | if (autoPrefixNames[name]) {
|
1419 | var value = rulePairs[index + 1];
|
1420 | if (autoPrefixNames[name]) {
|
1421 | if (vendorSettings.isWebkit) {
|
1422 | rulePairs.push('-webkit-' + name, value);
|
1423 | }
|
1424 | if (vendorSettings.isMoz) {
|
1425 | rulePairs.push('-moz-' + name, value);
|
1426 | }
|
1427 | if (vendorSettings.isMs) {
|
1428 | rulePairs.push('-ms-' + name, value);
|
1429 | }
|
1430 | if (vendorSettings.isOpera) {
|
1431 | rulePairs.push('-o-' + name, value);
|
1432 | }
|
1433 | }
|
1434 | }
|
1435 | }
|
1436 |
|
1437 |
|
1438 | }),
|
1439 |
|
1440 | "./lib/transforms/provideUnits.js":
|
1441 | (function(module, __webpack_exports__, __webpack_require__) {
|
1442 |
|
1443 | "use strict";
|
1444 | __webpack_require__.r(__webpack_exports__);
|
1445 | __webpack_require__.d(__webpack_exports__, "provideUnits", function() { return provideUnits; });
|
1446 | var NON_PIXEL_NUMBER_PROPS = [
|
1447 | 'column-count',
|
1448 | 'font-weight',
|
1449 | 'flex',
|
1450 | 'flex-grow',
|
1451 | 'flex-shrink',
|
1452 | 'fill-opacity',
|
1453 | 'opacity',
|
1454 | 'order',
|
1455 | 'z-index',
|
1456 | 'zoom',
|
1457 | ];
|
1458 | function provideUnits(rulePairs, index) {
|
1459 | var name = rulePairs[index];
|
1460 | var value = rulePairs[index + 1];
|
1461 | if (typeof value === 'number') {
|
1462 | var isNonPixelProp = NON_PIXEL_NUMBER_PROPS.indexOf(name) > -1;
|
1463 | var isVariableOrPrefixed = name.indexOf('--') > -1;
|
1464 | var unit = isNonPixelProp || isVariableOrPrefixed ? '' : 'px';
|
1465 | rulePairs[index + 1] = "" + value + unit;
|
1466 | }
|
1467 | }
|
1468 |
|
1469 |
|
1470 | }),
|
1471 |
|
1472 | "./lib/transforms/rtlifyRules.js":
|
1473 | (function(module, __webpack_exports__, __webpack_require__) {
|
1474 |
|
1475 | "use strict";
|
1476 | __webpack_require__.r(__webpack_exports__);
|
1477 | __webpack_require__.d(__webpack_exports__, "rtlifyRules", function() { return rtlifyRules; });
|
1478 | var _a;
|
1479 | var LEFT = 'left';
|
1480 | var RIGHT = 'right';
|
1481 | var NO_FLIP = '@noflip';
|
1482 | var NAME_REPLACEMENTS = (_a = {},
|
1483 | _a[LEFT] = RIGHT,
|
1484 | _a[RIGHT] = LEFT,
|
1485 | _a);
|
1486 | var VALUE_REPLACEMENTS = {
|
1487 | 'w-resize': 'e-resize',
|
1488 | 'sw-resize': 'se-resize',
|
1489 | 'nw-resize': 'ne-resize',
|
1490 | };
|
1491 |
|
1492 |
|
1493 |
|
1494 |
|
1495 | function rtlifyRules(options, rulePairs, index) {
|
1496 | if (options.rtl) {
|
1497 | var name_1 = rulePairs[index];
|
1498 | if (!name_1) {
|
1499 | return;
|
1500 | }
|
1501 | var value = rulePairs[index + 1];
|
1502 | if (typeof value === 'string' && value.indexOf(NO_FLIP) >= 0) {
|
1503 | rulePairs[index + 1] = value.replace(/\s*(?:\/\*\s*)?\@noflip\b(?:\s*\*\/)?\s*?/g, '');
|
1504 | }
|
1505 | else if (name_1.indexOf(LEFT) >= 0) {
|
1506 | rulePairs[index] = name_1.replace(LEFT, RIGHT);
|
1507 | }
|
1508 | else if (name_1.indexOf(RIGHT) >= 0) {
|
1509 | rulePairs[index] = name_1.replace(RIGHT, LEFT);
|
1510 | }
|
1511 | else if (String(value).indexOf(LEFT) >= 0) {
|
1512 | rulePairs[index + 1] = value.replace(LEFT, RIGHT);
|
1513 | }
|
1514 | else if (String(value).indexOf(RIGHT) >= 0) {
|
1515 | rulePairs[index + 1] = value.replace(RIGHT, LEFT);
|
1516 | }
|
1517 | else if (NAME_REPLACEMENTS[name_1]) {
|
1518 | rulePairs[index] = NAME_REPLACEMENTS[name_1];
|
1519 | }
|
1520 | else if (VALUE_REPLACEMENTS[value]) {
|
1521 | rulePairs[index + 1] = VALUE_REPLACEMENTS[value];
|
1522 | }
|
1523 | else {
|
1524 | switch (name_1) {
|
1525 | case 'margin':
|
1526 | case 'padding':
|
1527 | rulePairs[index + 1] = flipQuad(value);
|
1528 | break;
|
1529 | case 'box-shadow':
|
1530 | rulePairs[index + 1] = negateNum(value, 0);
|
1531 | break;
|
1532 | }
|
1533 | }
|
1534 | }
|
1535 | }
|
1536 |
|
1537 |
|
1538 |
|
1539 | function negateNum(value, partIndex) {
|
1540 | var parts = value.split(' ');
|
1541 | var numberVal = parseInt(parts[partIndex], 10);
|
1542 | parts[0] = parts[0].replace(String(numberVal), String(numberVal * -1));
|
1543 | return parts.join(' ');
|
1544 | }
|
1545 |
|
1546 |
|
1547 |
|
1548 | function flipQuad(value) {
|
1549 | if (typeof value === 'string') {
|
1550 | var parts = value.split(' ');
|
1551 | if (parts.length === 4) {
|
1552 | return parts[0] + " " + parts[3] + " " + parts[2] + " " + parts[1];
|
1553 | }
|
1554 | }
|
1555 | return value;
|
1556 | }
|
1557 |
|
1558 |
|
1559 | }),
|
1560 |
|
1561 | "./lib/version.js":
|
1562 | (function(module, __webpack_exports__, __webpack_require__) {
|
1563 |
|
1564 | "use strict";
|
1565 | __webpack_require__.r(__webpack_exports__);
|
1566 | var _uifabric_set_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../set-version/lib/index.js");
|
1567 |
|
1568 |
|
1569 |
|
1570 | Object(_uifabric_set_version__WEBPACK_IMPORTED_MODULE_0__["setVersion"])('@uifabric/merge-styles', '7.20.1');
|
1571 |
|
1572 |
|
1573 | })
|
1574 |
|
1575 | });
|
1576 |
|
\ | No newline at end of file |