1 |
|
2 |
|
3 |
|
4 |
|
5 | (function webpackUniversalModuleDefinition(root, factory) {
|
6 | if(typeof exports === 'object' && typeof module === 'object')
|
7 | module.exports = factory(require("react"));
|
8 | else if(typeof define === 'function' && define.amd)
|
9 | define(["react"], factory);
|
10 | else if(typeof exports === 'object')
|
11 | exports["MiradorImageTools"] = factory(require("react"));
|
12 | else
|
13 | root["MiradorImageTools"] = factory(root["React"]);
|
14 | })(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {
|
15 | return (function(modules) {
|
16 |
|
17 | var installedModules = {};
|
18 |
|
19 |
|
20 | function __webpack_require__(moduleId) {
|
21 |
|
22 |
|
23 | if(installedModules[moduleId]) {
|
24 | return installedModules[moduleId].exports;
|
25 | }
|
26 |
|
27 | var module = installedModules[moduleId] = {
|
28 | i: moduleId,
|
29 | l: false,
|
30 | exports: {}
|
31 | };
|
32 |
|
33 |
|
34 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
35 |
|
36 |
|
37 | module.l = true;
|
38 |
|
39 |
|
40 | return module.exports;
|
41 | }
|
42 |
|
43 |
|
44 |
|
45 | __webpack_require__.m = modules;
|
46 |
|
47 |
|
48 | __webpack_require__.c = installedModules;
|
49 |
|
50 |
|
51 | __webpack_require__.d = function(exports, name, getter) {
|
52 | if(!__webpack_require__.o(exports, name)) {
|
53 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
54 | }
|
55 | };
|
56 |
|
57 |
|
58 | __webpack_require__.r = function(exports) {
|
59 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
60 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
61 | }
|
62 | Object.defineProperty(exports, '__esModule', { value: true });
|
63 | };
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 | __webpack_require__.t = function(value, mode) {
|
71 | if(mode & 1) value = __webpack_require__(value);
|
72 | if(mode & 8) return value;
|
73 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
74 | var ns = Object.create(null);
|
75 | __webpack_require__.r(ns);
|
76 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
77 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
78 | return ns;
|
79 | };
|
80 |
|
81 |
|
82 | __webpack_require__.n = function(module) {
|
83 | var getter = module && module.__esModule ?
|
84 | function getDefault() { return module['default']; } :
|
85 | function getModuleExports() { return module; };
|
86 | __webpack_require__.d(getter, 'a', getter);
|
87 | return getter;
|
88 | };
|
89 |
|
90 |
|
91 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
92 |
|
93 |
|
94 | __webpack_require__.p = "";
|
95 |
|
96 |
|
97 |
|
98 | return __webpack_require__(__webpack_require__.s = 88);
|
99 | })
|
100 |
|
101 | ([
|
102 |
|
103 | (function(module, exports) {
|
104 |
|
105 | module.exports = __WEBPACK_EXTERNAL_MODULE__0__;
|
106 |
|
107 | }),
|
108 |
|
109 | (function(module, __webpack_exports__, __webpack_require__) {
|
110 |
|
111 | "use strict";
|
112 | __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
|
113 | function _extends() {
|
114 | _extends = Object.assign || function (target) {
|
115 | for (var i = 1; i < arguments.length; i++) {
|
116 | var source = arguments[i];
|
117 |
|
118 | for (var key in source) {
|
119 | if (Object.prototype.hasOwnProperty.call(source, key)) {
|
120 | target[key] = source[key];
|
121 | }
|
122 | }
|
123 | }
|
124 |
|
125 | return target;
|
126 | };
|
127 |
|
128 | return _extends.apply(this, arguments);
|
129 | }
|
130 |
|
131 | }),
|
132 |
|
133 | (function(module, exports, __webpack_require__) {
|
134 |
|
135 | "use strict";
|
136 |
|
137 | Object.defineProperty(exports, "__esModule", { value: true });
|
138 | var AnnotationMotivation;
|
139 | (function (AnnotationMotivation) {
|
140 | AnnotationMotivation["BOOKMARKING"] = "oa:bookmarking";
|
141 | AnnotationMotivation["CLASSIFYING"] = "oa:classifying";
|
142 | AnnotationMotivation["COMMENTING"] = "oa:commenting";
|
143 | AnnotationMotivation["DESCRIBING"] = "oa:describing";
|
144 | AnnotationMotivation["EDITING"] = "oa:editing";
|
145 | AnnotationMotivation["HIGHLIGHTING"] = "oa:highlighting";
|
146 | AnnotationMotivation["IDENTIFYING"] = "oa:identifying";
|
147 | AnnotationMotivation["LINKING"] = "oa:linking";
|
148 | AnnotationMotivation["MODERATING"] = "oa:moderating";
|
149 | AnnotationMotivation["PAINTING"] = "sc:painting";
|
150 | AnnotationMotivation["QUESTIONING"] = "oa:questioning";
|
151 | AnnotationMotivation["REPLYING"] = "oa:replying";
|
152 | AnnotationMotivation["TAGGING"] = "oa:tagging";
|
153 | AnnotationMotivation["TRANSCRIBING"] = "oad:transcribing";
|
154 | })(AnnotationMotivation = exports.AnnotationMotivation || (exports.AnnotationMotivation = {}));
|
155 | var Behavior;
|
156 | (function (Behavior) {
|
157 | Behavior["AUTO_ADVANCE"] = "auto-advance";
|
158 | Behavior["CONTINUOUS"] = "continuous";
|
159 | Behavior["FACING_PAGES"] = "facing-pages";
|
160 | Behavior["HIDDEN"] = "hidden";
|
161 | Behavior["INDIVIDUALS"] = "individuals";
|
162 | Behavior["MULTI_PART"] = "multi-part";
|
163 | Behavior["NO_NAV"] = "no-nav";
|
164 | Behavior["NON_PAGED"] = "non-paged";
|
165 | Behavior["PAGED"] = "paged";
|
166 | Behavior["REPEAT"] = "repeat";
|
167 | Behavior["SEQUENCE"] = "sequence";
|
168 | Behavior["THUMBNAIL_NAV"] = "thumbnail-nav";
|
169 | Behavior["TOGETHER"] = "together";
|
170 | Behavior["UNORDERED"] = "unordered";
|
171 | })(Behavior = exports.Behavior || (exports.Behavior = {}));
|
172 | var ExternalResourceType;
|
173 | (function (ExternalResourceType) {
|
174 | ExternalResourceType["CANVAS"] = "canvas";
|
175 | ExternalResourceType["CHOICE"] = "choice";
|
176 | ExternalResourceType["CONTENT_AS_TEXT"] = "contentastext";
|
177 | ExternalResourceType["DATASET"] = "dataset";
|
178 | ExternalResourceType["DOCUMENT"] = "document";
|
179 | ExternalResourceType["IMAGE"] = "image";
|
180 | ExternalResourceType["MODEL"] = "model";
|
181 | ExternalResourceType["MOVING_IMAGE"] = "movingimage";
|
182 | ExternalResourceType["PDF"] = "pdf";
|
183 | ExternalResourceType["PHYSICAL_OBJECT"] = "physicalobject";
|
184 | ExternalResourceType["SOUND"] = "sound";
|
185 | ExternalResourceType["TEXT"] = "text";
|
186 | ExternalResourceType["TEXTUALBODY"] = "textualbody";
|
187 | ExternalResourceType["VIDEO"] = "video";
|
188 | })(ExternalResourceType = exports.ExternalResourceType || (exports.ExternalResourceType = {}));
|
189 | var IIIFResourceType;
|
190 | (function (IIIFResourceType) {
|
191 | IIIFResourceType["ANNOTATION"] = "annotation";
|
192 | IIIFResourceType["CANVAS"] = "canvas";
|
193 | IIIFResourceType["COLLECTION"] = "collection";
|
194 | IIIFResourceType["MANIFEST"] = "manifest";
|
195 | IIIFResourceType["RANGE"] = "range";
|
196 | IIIFResourceType["SEQUENCE"] = "sequence";
|
197 | })(IIIFResourceType = exports.IIIFResourceType || (exports.IIIFResourceType = {}));
|
198 | var MediaType;
|
199 | (function (MediaType) {
|
200 | MediaType["AUDIO_MP4"] = "audio/mp4";
|
201 | MediaType["CORTO"] = "application/corto";
|
202 | MediaType["DRACO"] = "application/draco";
|
203 | MediaType["EPUB"] = "application/epub+zip";
|
204 | MediaType["GLB"] = "model/gltf-binary";
|
205 | MediaType["GLTF"] = "model/gltf+json";
|
206 | MediaType["JPG"] = "image/jpeg";
|
207 | MediaType["M3U8"] = "application/vnd.apple.mpegurl";
|
208 | MediaType["MP3"] = "audio/mp3";
|
209 | MediaType["MPEG_DASH"] = "application/dash+xml";
|
210 | MediaType["OBJ"] = "text/plain";
|
211 | MediaType["OPF"] = "application/oebps-package+xml";
|
212 | MediaType["PDF"] = "application/pdf";
|
213 | MediaType["PLY"] = "application/ply";
|
214 | MediaType["THREEJS"] = "application/vnd.threejs+json";
|
215 | MediaType["USDZ"] = "model/vnd.usd+zip";
|
216 | MediaType["VIDEO_MP4"] = "video/mp4";
|
217 | MediaType["WEBM"] = "video/webm";
|
218 | })(MediaType = exports.MediaType || (exports.MediaType = {}));
|
219 | var RenderingFormat;
|
220 | (function (RenderingFormat) {
|
221 | RenderingFormat["DOC"] = "application/msword";
|
222 | RenderingFormat["DOCX"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
223 | RenderingFormat["PDF"] = "application/pdf";
|
224 | })(RenderingFormat = exports.RenderingFormat || (exports.RenderingFormat = {}));
|
225 | var ServiceProfile;
|
226 | (function (ServiceProfile) {
|
227 |
|
228 | ServiceProfile["IMAGE_0_COMPLIANCE_LEVEL_0"] = "http://library.stanford.edu/iiif/image-api/compliance.html#level0";
|
229 | ServiceProfile["IMAGE_0_COMPLIANCE_LEVEL_1"] = "http://library.stanford.edu/iiif/image-api/compliance.html#level1";
|
230 | ServiceProfile["IMAGE_0_COMPLIANCE_LEVEL_2"] = "http://library.stanford.edu/iiif/image-api/compliance.html#level2";
|
231 | ServiceProfile["IMAGE_0_CONFORMANCE_LEVEL_0"] = "http://library.stanford.edu/iiif/image-api/conformance.html#level0";
|
232 | ServiceProfile["IMAGE_0_CONFORMANCE_LEVEL_1"] = "http://library.stanford.edu/iiif/image-api/conformance.html#level1";
|
233 | ServiceProfile["IMAGE_0_CONFORMANCE_LEVEL_2"] = "http://library.stanford.edu/iiif/image-api/conformance.html#level2";
|
234 | ServiceProfile["IMAGE_1_COMPLIANCE_LEVEL_0"] = "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0";
|
235 | ServiceProfile["IMAGE_1_COMPLIANCE_LEVEL_1"] = "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level1";
|
236 | ServiceProfile["IMAGE_1_COMPLIANCE_LEVEL_2"] = "http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level2";
|
237 | ServiceProfile["IMAGE_1_CONFORMANCE_LEVEL_0"] = "http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level0";
|
238 | ServiceProfile["IMAGE_1_CONFORMANCE_LEVEL_1"] = "http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level1";
|
239 | ServiceProfile["IMAGE_1_CONFORMANCE_LEVEL_2"] = "http://library.stanford.edu/iiif/image-api/1.1/conformance.html#level2";
|
240 | ServiceProfile["IMAGE_1_LEVEL_0"] = "http://iiif.io/api/image/1/level0.json";
|
241 | ServiceProfile["IMAGE_1_PROFILE_LEVEL_0"] = "http://iiif.io/api/image/1/profiles/level0.json";
|
242 | ServiceProfile["IMAGE_1_LEVEL_1"] = "http://iiif.io/api/image/1/level1.json";
|
243 | ServiceProfile["IMAGE_1_PROFILE_LEVEL_1"] = "http://iiif.io/api/image/1/profiles/level1.json";
|
244 | ServiceProfile["IMAGE_1_LEVEL_2"] = "http://iiif.io/api/image/1/level2.json";
|
245 | ServiceProfile["IMAGE_1_PROFILE_LEVEL_2"] = "http://iiif.io/api/image/1/profiles/level2.json";
|
246 | ServiceProfile["IMAGE_2_LEVEL_0"] = "http://iiif.io/api/image/2/level0.json";
|
247 | ServiceProfile["IMAGE_2_PROFILE_LEVEL_0"] = "http://iiif.io/api/image/2/profiles/level0.json";
|
248 | ServiceProfile["IMAGE_2_LEVEL_1"] = "http://iiif.io/api/image/2/level1.json";
|
249 | ServiceProfile["IMAGE_2_PROFILE_LEVEL_1"] = "http://iiif.io/api/image/2/profiles/level1.json";
|
250 | ServiceProfile["IMAGE_2_LEVEL_2"] = "http://iiif.io/api/image/2/level2.json";
|
251 | ServiceProfile["IMAGE_2_PROFILE_LEVEL_2"] = "http://iiif.io/api/image/2/profiles/level2.json";
|
252 |
|
253 | ServiceProfile["AUTH_0_CLICK_THROUGH"] = "http://iiif.io/api/auth/0/login/clickthrough";
|
254 | ServiceProfile["AUTH_0_LOGIN"] = "http://iiif.io/api/auth/0/login";
|
255 | ServiceProfile["AUTH_0_LOGOUT"] = "http://iiif.io/api/auth/0/logout";
|
256 | ServiceProfile["AUTH_0_RESTRICTED"] = "http://iiif.io/api/auth/0/login/restricted";
|
257 | ServiceProfile["AUTH_0_TOKEN"] = "http://iiif.io/api/auth/0/token";
|
258 | ServiceProfile["AUTH_1_CLICK_THROUGH"] = "http://iiif.io/api/auth/1/clickthrough";
|
259 | ServiceProfile["AUTH_1_EXTERNAL"] = "http://iiif.io/api/auth/1/external";
|
260 | ServiceProfile["AUTH_1_KIOSK"] = "http://iiif.io/api/auth/1/kiosk";
|
261 | ServiceProfile["AUTH_1_LOGIN"] = "http://iiif.io/api/auth/1/login";
|
262 | ServiceProfile["AUTH_1_LOGOUT"] = "http://iiif.io/api/auth/1/logout";
|
263 | ServiceProfile["AUTH_1_PROBE"] = "http://iiif.io/api/auth/1/probe";
|
264 | ServiceProfile["AUTH_1_TOKEN"] = "http://iiif.io/api/auth/1/token";
|
265 |
|
266 | ServiceProfile["SEARCH_0"] = "http://iiif.io/api/search/0/search";
|
267 | ServiceProfile["SEARCH_0_AUTO_COMPLETE"] = "http://iiif.io/api/search/0/autocomplete";
|
268 | ServiceProfile["SEARCH_1"] = "http://iiif.io/api/search/1/search";
|
269 | ServiceProfile["SEARCH_1_AUTO_COMPLETE"] = "http://iiif.io/api/search/1/autocomplete";
|
270 |
|
271 | ServiceProfile["TRACKING_EXTENSIONS"] = "http://universalviewer.io/tracking-extensions-profile";
|
272 | ServiceProfile["UI_EXTENSIONS"] = "http://universalviewer.io/ui-extensions-profile";
|
273 | ServiceProfile["PRINT_EXTENSIONS"] = "http://universalviewer.io/print-extensions-profile";
|
274 | ServiceProfile["SHARE_EXTENSIONS"] = "http://universalviewer.io/share-extensions-profile";
|
275 |
|
276 | ServiceProfile["OTHER_MANIFESTATIONS"] = "http://iiif.io/api/otherManifestations.json";
|
277 | ServiceProfile["IXIF"] = "http://wellcomelibrary.org/ld/ixif/0/alpha.json";
|
278 | })(ServiceProfile = exports.ServiceProfile || (exports.ServiceProfile = {}));
|
279 | var ViewingDirection;
|
280 | (function (ViewingDirection) {
|
281 | ViewingDirection["BOTTOM_TO_TOP"] = "bottom-to-top";
|
282 | ViewingDirection["LEFT_TO_RIGHT"] = "left-to-right";
|
283 | ViewingDirection["RIGHT_TO_LEFT"] = "right-to-left";
|
284 | ViewingDirection["TOP_TO_BOTTOM"] = "top-to-bottom";
|
285 | })(ViewingDirection = exports.ViewingDirection || (exports.ViewingDirection = {}));
|
286 | var ViewingHint;
|
287 | (function (ViewingHint) {
|
288 | ViewingHint["CONTINUOUS"] = "continuous";
|
289 | ViewingHint["INDIVIDUALS"] = "individuals";
|
290 | ViewingHint["NON_PAGED"] = "non-paged";
|
291 | ViewingHint["PAGED"] = "paged";
|
292 | ViewingHint["TOP"] = "top";
|
293 | })(ViewingHint = exports.ViewingHint || (exports.ViewingHint = {}));
|
294 |
|
295 |
|
296 | }),
|
297 |
|
298 | (function(module, __webpack_exports__, __webpack_require__) {
|
299 |
|
300 | "use strict";
|
301 | __webpack_require__.r(__webpack_exports__);
|
302 | __webpack_require__.d(__webpack_exports__, "defaultMemoize", function() { return defaultMemoize; });
|
303 | __webpack_require__.d(__webpack_exports__, "createSelectorCreator", function() { return createSelectorCreator; });
|
304 | __webpack_require__.d(__webpack_exports__, "createSelector", function() { return createSelector; });
|
305 | __webpack_require__.d(__webpack_exports__, "createStructuredSelector", function() { return createStructuredSelector; });
|
306 | function defaultEqualityCheck(a, b) {
|
307 | return a === b;
|
308 | }
|
309 |
|
310 | function areArgumentsShallowlyEqual(equalityCheck, prev, next) {
|
311 | if (prev === null || next === null || prev.length !== next.length) {
|
312 | return false;
|
313 | }
|
314 |
|
315 |
|
316 | var length = prev.length;
|
317 | for (var i = 0; i < length; i++) {
|
318 | if (!equalityCheck(prev[i], next[i])) {
|
319 | return false;
|
320 | }
|
321 | }
|
322 |
|
323 | return true;
|
324 | }
|
325 |
|
326 | function defaultMemoize(func) {
|
327 | var equalityCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultEqualityCheck;
|
328 |
|
329 | var lastArgs = null;
|
330 | var lastResult = null;
|
331 |
|
332 | return function () {
|
333 | if (!areArgumentsShallowlyEqual(equalityCheck, lastArgs, arguments)) {
|
334 |
|
335 | lastResult = func.apply(null, arguments);
|
336 | }
|
337 |
|
338 | lastArgs = arguments;
|
339 | return lastResult;
|
340 | };
|
341 | }
|
342 |
|
343 | function getDependencies(funcs) {
|
344 | var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
|
345 |
|
346 | if (!dependencies.every(function (dep) {
|
347 | return typeof dep === 'function';
|
348 | })) {
|
349 | var dependencyTypes = dependencies.map(function (dep) {
|
350 | return typeof dep;
|
351 | }).join(', ');
|
352 | throw new Error('Selector creators expect all input-selectors to be functions, ' + ('instead received the following types: [' + dependencyTypes + ']'));
|
353 | }
|
354 |
|
355 | return dependencies;
|
356 | }
|
357 |
|
358 | function createSelectorCreator(memoize) {
|
359 | for (var _len = arguments.length, memoizeOptions = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
360 | memoizeOptions[_key - 1] = arguments[_key];
|
361 | }
|
362 |
|
363 | return function () {
|
364 | for (var _len2 = arguments.length, funcs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
365 | funcs[_key2] = arguments[_key2];
|
366 | }
|
367 |
|
368 | var recomputations = 0;
|
369 | var resultFunc = funcs.pop();
|
370 | var dependencies = getDependencies(funcs);
|
371 |
|
372 | var memoizedResultFunc = memoize.apply(undefined, [function () {
|
373 | recomputations++;
|
374 |
|
375 | return resultFunc.apply(null, arguments);
|
376 | }].concat(memoizeOptions));
|
377 |
|
378 |
|
379 | var selector = memoize(function () {
|
380 | var params = [];
|
381 | var length = dependencies.length;
|
382 |
|
383 | for (var i = 0; i < length; i++) {
|
384 |
|
385 | params.push(dependencies[i].apply(null, arguments));
|
386 | }
|
387 |
|
388 |
|
389 | return memoizedResultFunc.apply(null, params);
|
390 | });
|
391 |
|
392 | selector.resultFunc = resultFunc;
|
393 | selector.dependencies = dependencies;
|
394 | selector.recomputations = function () {
|
395 | return recomputations;
|
396 | };
|
397 | selector.resetRecomputations = function () {
|
398 | return recomputations = 0;
|
399 | };
|
400 | return selector;
|
401 | };
|
402 | }
|
403 |
|
404 | var createSelector = createSelectorCreator(defaultMemoize);
|
405 |
|
406 | function createStructuredSelector(selectors) {
|
407 | var selectorCreator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : createSelector;
|
408 |
|
409 | if (typeof selectors !== 'object') {
|
410 | throw new Error('createStructuredSelector expects first argument to be an object ' + ('where each property is a selector, instead received a ' + typeof selectors));
|
411 | }
|
412 | var objectKeys = Object.keys(selectors);
|
413 | return selectorCreator(objectKeys.map(function (key) {
|
414 | return selectors[key];
|
415 | }), function () {
|
416 | for (var _len3 = arguments.length, values = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
417 | values[_key3] = arguments[_key3];
|
418 | }
|
419 |
|
420 | return values.reduce(function (composition, value, index) {
|
421 | composition[objectKeys[index]] = value;
|
422 | return composition;
|
423 | }, {});
|
424 | });
|
425 | }
|
426 |
|
427 | }),
|
428 |
|
429 | (function(module, exports, __webpack_require__) {
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 | if (false) { var throwOnDirectAccess, ReactIs; } else {
|
439 |
|
440 |
|
441 | module.exports = __webpack_require__(89)();
|
442 | }
|
443 |
|
444 |
|
445 | }),
|
446 |
|
447 | (function(module, __webpack_exports__, __webpack_require__) {
|
448 |
|
449 | "use strict";
|
450 | __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
|
451 | var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
|
452 |
|
453 | function _objectWithoutProperties(source, excluded) {
|
454 | if (source == null) return {};
|
455 | var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[ "a"])(source, excluded);
|
456 | var key, i;
|
457 |
|
458 | if (Object.getOwnPropertySymbols) {
|
459 | var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
460 |
|
461 | for (i = 0; i < sourceSymbolKeys.length; i++) {
|
462 | key = sourceSymbolKeys[i];
|
463 | if (excluded.indexOf(key) >= 0) continue;
|
464 | if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
465 | target[key] = source[key];
|
466 | }
|
467 | }
|
468 |
|
469 | return target;
|
470 | }
|
471 |
|
472 | }),
|
473 |
|
474 | (function(module, __webpack_exports__, __webpack_require__) {
|
475 |
|
476 | "use strict";
|
477 | function toVal(mix) {
|
478 | var k, y, str='';
|
479 |
|
480 | if (typeof mix === 'string' || typeof mix === 'number') {
|
481 | str += mix;
|
482 | } else if (typeof mix === 'object') {
|
483 | if (Array.isArray(mix)) {
|
484 | for (k=0; k < mix.length; k++) {
|
485 | if (mix[k]) {
|
486 | if (y = toVal(mix[k])) {
|
487 | str && (str += ' ');
|
488 | str += y;
|
489 | }
|
490 | }
|
491 | }
|
492 | } else {
|
493 | for (k in mix) {
|
494 | if (mix[k]) {
|
495 | str && (str += ' ');
|
496 | str += k;
|
497 | }
|
498 | }
|
499 | }
|
500 | }
|
501 |
|
502 | return str;
|
503 | }
|
504 |
|
505 | __webpack_exports__["a"] = (function () {
|
506 | var i=0, tmp, x, str='';
|
507 | while (i < arguments.length) {
|
508 | if (tmp = arguments[i++]) {
|
509 | if (x = toVal(tmp)) {
|
510 | str && (str += ' ');
|
511 | str += x
|
512 | }
|
513 | }
|
514 | }
|
515 | return str;
|
516 | });
|
517 |
|
518 |
|
519 | }),
|
520 |
|
521 | (function(module, __webpack_exports__, __webpack_require__) {
|
522 |
|
523 | "use strict";
|
524 |
|
525 |
|
526 | var esm_extends = __webpack_require__(1);
|
527 |
|
528 |
|
529 | var objectWithoutProperties = __webpack_require__(5);
|
530 |
|
531 |
|
532 | var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(0);
|
533 | var external_root_React_commonjs2_react_commonjs_react_amd_react_default = __webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
534 |
|
535 |
|
536 | var prop_types = __webpack_require__(4);
|
537 |
|
538 |
|
539 | var hoist_non_react_statics_cjs = __webpack_require__(69);
|
540 | var hoist_non_react_statics_cjs_default = __webpack_require__.n(hoist_non_react_statics_cjs);
|
541 |
|
542 |
|
543 | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
544 |
|
545 | var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document.nodeType === 9;
|
546 |
|
547 | var dist_module = (isBrowser);
|
548 |
|
549 |
|
550 | var isProduction = "production" === 'production';
|
551 | function warning(condition, message) {
|
552 | if (!isProduction) {
|
553 | if (condition) {
|
554 | return;
|
555 | }
|
556 |
|
557 | var text = "Warning: " + message;
|
558 |
|
559 | if (typeof console !== 'undefined') {
|
560 | console.warn(text);
|
561 | }
|
562 |
|
563 | try {
|
564 | throw Error(text);
|
565 | } catch (x) {}
|
566 | }
|
567 | }
|
568 |
|
569 | var tiny_warning_esm = (warning);
|
570 |
|
571 |
|
572 | function _defineProperties(target, props) {
|
573 | for (var i = 0; i < props.length; i++) {
|
574 | var descriptor = props[i];
|
575 | descriptor.enumerable = descriptor.enumerable || false;
|
576 | descriptor.configurable = true;
|
577 | if ("value" in descriptor) descriptor.writable = true;
|
578 | Object.defineProperty(target, descriptor.key, descriptor);
|
579 | }
|
580 | }
|
581 |
|
582 | function _createClass(Constructor, protoProps, staticProps) {
|
583 | if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
584 | if (staticProps) _defineProperties(Constructor, staticProps);
|
585 | return Constructor;
|
586 | }
|
587 |
|
588 | var inheritsLoose = __webpack_require__(23);
|
589 |
|
590 |
|
591 | var assertThisInitialized = __webpack_require__(29);
|
592 |
|
593 |
|
594 | var objectWithoutPropertiesLoose = __webpack_require__(19);
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 |
|
605 | var plainObjectConstrurctor = {}.constructor;
|
606 | function cloneStyle(style) {
|
607 | if (style == null || typeof style !== 'object') return style;
|
608 | if (Array.isArray(style)) return style.map(cloneStyle);
|
609 | if (style.constructor !== plainObjectConstrurctor) return style;
|
610 | var newStyle = {};
|
611 |
|
612 | for (var name in style) {
|
613 | newStyle[name] = cloneStyle(style[name]);
|
614 | }
|
615 |
|
616 | return newStyle;
|
617 | }
|
618 |
|
619 |
|
620 |
|
621 |
|
622 |
|
623 | function createRule(name, decl, options) {
|
624 | if (name === void 0) {
|
625 | name = 'unnamed';
|
626 | }
|
627 |
|
628 | var jss = options.jss;
|
629 | var declCopy = cloneStyle(decl);
|
630 | var rule = jss.plugins.onCreateRule(name, declCopy, options);
|
631 | if (rule) return rule;
|
632 |
|
633 | if (name[0] === '@') {
|
634 | false ? undefined : void 0;
|
635 | }
|
636 |
|
637 | return null;
|
638 | }
|
639 |
|
640 | var join = function join(value, by) {
|
641 | var result = '';
|
642 |
|
643 | for (var i = 0; i < value.length; i++) {
|
644 |
|
645 | if (value[i] === '!important') break;
|
646 | if (result) result += by;
|
647 | result += value[i];
|
648 | }
|
649 |
|
650 | return result;
|
651 | };
|
652 |
|
653 |
|
654 |
|
655 |
|
656 |
|
657 |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 | function toCssValue(value, ignoreImportant) {
|
663 | if (ignoreImportant === void 0) {
|
664 | ignoreImportant = false;
|
665 | }
|
666 |
|
667 | if (!Array.isArray(value)) return value;
|
668 | var cssValue = '';
|
669 |
|
670 | if (Array.isArray(value[0])) {
|
671 | for (var i = 0; i < value.length; i++) {
|
672 | if (value[i] === '!important') break;
|
673 | if (cssValue) cssValue += ', ';
|
674 | cssValue += join(value[i], ' ');
|
675 | }
|
676 | } else cssValue = join(value, ', ');
|
677 |
|
678 |
|
679 | if (!ignoreImportant && value[value.length - 1] === '!important') {
|
680 | cssValue += ' !important';
|
681 | }
|
682 |
|
683 | return cssValue;
|
684 | }
|
685 |
|
686 |
|
687 |
|
688 |
|
689 |
|
690 | function indentStr(str, indent) {
|
691 | var result = '';
|
692 |
|
693 | for (var index = 0; index < indent; index++) {
|
694 | result += ' ';
|
695 | }
|
696 |
|
697 | return result + str;
|
698 | }
|
699 |
|
700 |
|
701 |
|
702 |
|
703 |
|
704 | function toCss(selector, style, options) {
|
705 | if (options === void 0) {
|
706 | options = {};
|
707 | }
|
708 |
|
709 | var result = '';
|
710 | if (!style) return result;
|
711 | var _options = options,
|
712 | _options$indent = _options.indent,
|
713 | indent = _options$indent === void 0 ? 0 : _options$indent;
|
714 | var fallbacks = style.fallbacks;
|
715 | if (selector) indent++;
|
716 |
|
717 | if (fallbacks) {
|
718 |
|
719 | if (Array.isArray(fallbacks)) {
|
720 | for (var index = 0; index < fallbacks.length; index++) {
|
721 | var fallback = fallbacks[index];
|
722 |
|
723 | for (var prop in fallback) {
|
724 | var value = fallback[prop];
|
725 |
|
726 | if (value != null) {
|
727 | if (result) result += '\n';
|
728 | result += "" + indentStr(prop + ": " + toCssValue(value) + ";", indent);
|
729 | }
|
730 | }
|
731 | }
|
732 | } else {
|
733 |
|
734 | for (var _prop in fallbacks) {
|
735 | var _value = fallbacks[_prop];
|
736 |
|
737 | if (_value != null) {
|
738 | if (result) result += '\n';
|
739 | result += "" + indentStr(_prop + ": " + toCssValue(_value) + ";", indent);
|
740 | }
|
741 | }
|
742 | }
|
743 | }
|
744 |
|
745 | for (var _prop2 in style) {
|
746 | var _value2 = style[_prop2];
|
747 |
|
748 | if (_value2 != null && _prop2 !== 'fallbacks') {
|
749 | if (result) result += '\n';
|
750 | result += "" + indentStr(_prop2 + ": " + toCssValue(_value2) + ";", indent);
|
751 | }
|
752 | }
|
753 |
|
754 |
|
755 | if (!result && !options.allowEmpty) return result;
|
756 |
|
757 | if (!selector) return result;
|
758 | indent--;
|
759 | if (result) result = "\n" + result + "\n";
|
760 | return indentStr(selector + " {" + result, indent) + indentStr('}', indent);
|
761 | }
|
762 |
|
763 | var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g;
|
764 | var nativeEscape = typeof CSS !== 'undefined' && CSS.escape;
|
765 | var jss_esm_escape = (function (str) {
|
766 | return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\$1');
|
767 | });
|
768 |
|
769 | var BaseStyleRule =
|
770 |
|
771 | function () {
|
772 | function BaseStyleRule(key, style, options) {
|
773 | this.type = 'style';
|
774 | this.key = void 0;
|
775 | this.isProcessed = false;
|
776 | this.style = void 0;
|
777 | this.renderer = void 0;
|
778 | this.renderable = void 0;
|
779 | this.options = void 0;
|
780 | var sheet = options.sheet,
|
781 | Renderer = options.Renderer;
|
782 | this.key = key;
|
783 | this.options = options;
|
784 | this.style = style;
|
785 | if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();
|
786 | }
|
787 | |
788 |
|
789 |
|
790 |
|
791 |
|
792 | var _proto = BaseStyleRule.prototype;
|
793 |
|
794 | _proto.prop = function prop(name, value, options) {
|
795 |
|
796 | if (value === undefined) return this.style[name];
|
797 |
|
798 | var force = options ? options.force : false;
|
799 | if (!force && this.style[name] === value) return this;
|
800 | var newValue = value;
|
801 |
|
802 | if (!options || options.process !== false) {
|
803 | newValue = this.options.jss.plugins.onChangeValue(value, name, this);
|
804 | }
|
805 |
|
806 | var isEmpty = newValue == null || newValue === false;
|
807 | var isDefined = name in this.style;
|
808 |
|
809 | if (isEmpty && !isDefined && !force) return this;
|
810 |
|
811 | var remove = isEmpty && isDefined;
|
812 | if (remove) delete this.style[name];else this.style[name] = newValue;
|
813 |
|
814 | if (this.renderable && this.renderer) {
|
815 | if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);
|
816 | return this;
|
817 | }
|
818 |
|
819 | var sheet = this.options.sheet;
|
820 |
|
821 | if (sheet && sheet.attached) {
|
822 | false ? undefined : void 0;
|
823 | }
|
824 |
|
825 | return this;
|
826 | };
|
827 |
|
828 | return BaseStyleRule;
|
829 | }();
|
830 | var jss_esm_StyleRule =
|
831 |
|
832 | function (_BaseStyleRule) {
|
833 | Object(inheritsLoose["a" ])(StyleRule, _BaseStyleRule);
|
834 |
|
835 | function StyleRule(key, style, options) {
|
836 | var _this;
|
837 |
|
838 | _this = _BaseStyleRule.call(this, key, style, options) || this;
|
839 | _this.selectorText = void 0;
|
840 | _this.id = void 0;
|
841 | _this.renderable = void 0;
|
842 | var selector = options.selector,
|
843 | scoped = options.scoped,
|
844 | sheet = options.sheet,
|
845 | generateId = options.generateId;
|
846 |
|
847 | if (selector) {
|
848 | _this.selectorText = selector;
|
849 | } else if (scoped !== false) {
|
850 | _this.id = generateId(Object(assertThisInitialized["a" ])(Object(assertThisInitialized["a" ])(_this)), sheet);
|
851 | _this.selectorText = "." + jss_esm_escape(_this.id);
|
852 | }
|
853 |
|
854 | return _this;
|
855 | }
|
856 | |
857 |
|
858 |
|
859 |
|
860 |
|
861 |
|
862 |
|
863 | var _proto2 = StyleRule.prototype;
|
864 |
|
865 | |
866 |
|
867 |
|
868 | _proto2.applyTo = function applyTo(renderable) {
|
869 | var renderer = this.renderer;
|
870 |
|
871 | if (renderer) {
|
872 | var json = this.toJSON();
|
873 |
|
874 | for (var prop in json) {
|
875 | renderer.setProperty(renderable, prop, json[prop]);
|
876 | }
|
877 | }
|
878 |
|
879 | return this;
|
880 | }
|
881 | |
882 |
|
883 |
|
884 |
|
885 |
|
886 | ;
|
887 |
|
888 | _proto2.toJSON = function toJSON() {
|
889 | var json = {};
|
890 |
|
891 | for (var prop in this.style) {
|
892 | var value = this.style[prop];
|
893 | if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);
|
894 | }
|
895 |
|
896 | return json;
|
897 | }
|
898 | |
899 |
|
900 |
|
901 | ;
|
902 |
|
903 | _proto2.toString = function toString(options) {
|
904 | var sheet = this.options.sheet;
|
905 | var link = sheet ? sheet.options.link : false;
|
906 | var opts = link ? Object(esm_extends["a" ])({}, options, {
|
907 | allowEmpty: true
|
908 | }) : options;
|
909 | return toCss(this.selectorText, this.style, opts);
|
910 | };
|
911 |
|
912 | _createClass(StyleRule, [{
|
913 | key: "selector",
|
914 | set: function set(selector) {
|
915 | if (selector === this.selectorText) return;
|
916 | this.selectorText = selector;
|
917 | var renderer = this.renderer,
|
918 | renderable = this.renderable;
|
919 | if (!renderable || !renderer) return;
|
920 | var hasChanged = renderer.setSelector(renderable, selector);
|
921 |
|
922 | if (!hasChanged) {
|
923 | renderer.replaceRule(renderable, this);
|
924 | }
|
925 | }
|
926 | |
927 |
|
928 |
|
929 | ,
|
930 | get: function get() {
|
931 | return this.selectorText;
|
932 | }
|
933 | }]);
|
934 |
|
935 | return StyleRule;
|
936 | }(BaseStyleRule);
|
937 | var pluginStyleRule = {
|
938 | onCreateRule: function onCreateRule(name, style, options) {
|
939 | if (name[0] === '@' || options.parent && options.parent.type === 'keyframes') {
|
940 | return null;
|
941 | }
|
942 |
|
943 | return new jss_esm_StyleRule(name, style, options);
|
944 | }
|
945 | };
|
946 |
|
947 | var defaultToStringOptions = {
|
948 | indent: 1,
|
949 | children: true
|
950 | };
|
951 | var atRegExp = /@([\w-]+)/;
|
952 |
|
953 |
|
954 |
|
955 |
|
956 | var jss_esm_ConditionalRule =
|
957 |
|
958 | function () {
|
959 | function ConditionalRule(key, styles, options) {
|
960 | this.type = 'conditional';
|
961 | this.at = void 0;
|
962 | this.key = void 0;
|
963 | this.query = void 0;
|
964 | this.rules = void 0;
|
965 | this.options = void 0;
|
966 | this.isProcessed = false;
|
967 | this.renderable = void 0;
|
968 | this.key = key;
|
969 |
|
970 | this.query = options.name;
|
971 | var atMatch = key.match(atRegExp);
|
972 | this.at = atMatch ? atMatch[1] : 'unknown';
|
973 | this.options = options;
|
974 | this.rules = new jss_esm_RuleList(Object(esm_extends["a" ])({}, options, {
|
975 | parent: this
|
976 | }));
|
977 |
|
978 | for (var name in styles) {
|
979 | this.rules.add(name, styles[name]);
|
980 | }
|
981 |
|
982 | this.rules.process();
|
983 | }
|
984 | |
985 |
|
986 |
|
987 |
|
988 |
|
989 | var _proto = ConditionalRule.prototype;
|
990 |
|
991 | _proto.getRule = function getRule(name) {
|
992 | return this.rules.get(name);
|
993 | }
|
994 | |
995 |
|
996 |
|
997 | ;
|
998 |
|
999 | _proto.indexOf = function indexOf(rule) {
|
1000 | return this.rules.indexOf(rule);
|
1001 | }
|
1002 | |
1003 |
|
1004 |
|
1005 | ;
|
1006 |
|
1007 | _proto.addRule = function addRule(name, style, options) {
|
1008 | var rule = this.rules.add(name, style, options);
|
1009 | if (!rule) return null;
|
1010 | this.options.jss.plugins.onProcessRule(rule);
|
1011 | return rule;
|
1012 | }
|
1013 | |
1014 |
|
1015 |
|
1016 | ;
|
1017 |
|
1018 | _proto.toString = function toString(options) {
|
1019 | if (options === void 0) {
|
1020 | options = defaultToStringOptions;
|
1021 | }
|
1022 |
|
1023 | if (options.indent == null) options.indent = defaultToStringOptions.indent;
|
1024 | if (options.children == null) options.children = defaultToStringOptions.children;
|
1025 |
|
1026 | if (options.children === false) {
|
1027 | return this.query + " {}";
|
1028 | }
|
1029 |
|
1030 | var children = this.rules.toString(options);
|
1031 | return children ? this.query + " {\n" + children + "\n}" : '';
|
1032 | };
|
1033 |
|
1034 | return ConditionalRule;
|
1035 | }();
|
1036 | var keyRegExp = /@media|@supports\s+/;
|
1037 | var pluginConditionalRule = {
|
1038 | onCreateRule: function onCreateRule(key, styles, options) {
|
1039 | return keyRegExp.test(key) ? new jss_esm_ConditionalRule(key, styles, options) : null;
|
1040 | }
|
1041 | };
|
1042 |
|
1043 | var defaultToStringOptions$1 = {
|
1044 | indent: 1,
|
1045 | children: true
|
1046 | };
|
1047 | var nameRegExp = /@keyframes\s+([\w-]+)/;
|
1048 |
|
1049 |
|
1050 |
|
1051 |
|
1052 | var jss_esm_KeyframesRule =
|
1053 |
|
1054 | function () {
|
1055 | function KeyframesRule(key, frames, options) {
|
1056 | this.type = 'keyframes';
|
1057 | this.at = '@keyframes';
|
1058 | this.key = void 0;
|
1059 | this.name = void 0;
|
1060 | this.id = void 0;
|
1061 | this.rules = void 0;
|
1062 | this.options = void 0;
|
1063 | this.isProcessed = false;
|
1064 | this.renderable = void 0;
|
1065 | var nameMatch = key.match(nameRegExp);
|
1066 |
|
1067 | if (nameMatch && nameMatch[1]) {
|
1068 | this.name = nameMatch[1];
|
1069 | } else {
|
1070 | this.name = 'noname';
|
1071 | false ? undefined : void 0;
|
1072 | }
|
1073 |
|
1074 | this.key = this.type + "-" + this.name;
|
1075 | this.options = options;
|
1076 | var scoped = options.scoped,
|
1077 | sheet = options.sheet,
|
1078 | generateId = options.generateId;
|
1079 | this.id = scoped === false ? this.name : jss_esm_escape(generateId(this, sheet));
|
1080 | this.rules = new jss_esm_RuleList(Object(esm_extends["a" ])({}, options, {
|
1081 | parent: this
|
1082 | }));
|
1083 |
|
1084 | for (var name in frames) {
|
1085 | this.rules.add(name, frames[name], Object(esm_extends["a" ])({}, options, {
|
1086 | parent: this
|
1087 | }));
|
1088 | }
|
1089 |
|
1090 | this.rules.process();
|
1091 | }
|
1092 | |
1093 |
|
1094 |
|
1095 |
|
1096 |
|
1097 | var _proto = KeyframesRule.prototype;
|
1098 |
|
1099 | _proto.toString = function toString(options) {
|
1100 | if (options === void 0) {
|
1101 | options = defaultToStringOptions$1;
|
1102 | }
|
1103 |
|
1104 | if (options.indent == null) options.indent = defaultToStringOptions$1.indent;
|
1105 | if (options.children == null) options.children = defaultToStringOptions$1.children;
|
1106 |
|
1107 | if (options.children === false) {
|
1108 | return this.at + " " + this.id + " {}";
|
1109 | }
|
1110 |
|
1111 | var children = this.rules.toString(options);
|
1112 | if (children) children = "\n" + children + "\n";
|
1113 | return this.at + " " + this.id + " {" + children + "}";
|
1114 | };
|
1115 |
|
1116 | return KeyframesRule;
|
1117 | }();
|
1118 | var keyRegExp$1 = /@keyframes\s+/;
|
1119 | var refRegExp = /\$([\w-]+)/g;
|
1120 |
|
1121 | var findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {
|
1122 | if (typeof val === 'string') {
|
1123 | return val.replace(refRegExp, function (match, name) {
|
1124 | if (name in keyframes) {
|
1125 | return keyframes[name];
|
1126 | }
|
1127 |
|
1128 | false ? undefined : void 0;
|
1129 | return match;
|
1130 | });
|
1131 | }
|
1132 |
|
1133 | return val;
|
1134 | };
|
1135 |
|
1136 |
|
1137 |
|
1138 |
|
1139 |
|
1140 | var jss_esm_replaceRef = function replaceRef(style, prop, keyframes) {
|
1141 | var value = style[prop];
|
1142 | var refKeyframe = findReferencedKeyframe(value, keyframes);
|
1143 |
|
1144 | if (refKeyframe !== value) {
|
1145 | style[prop] = refKeyframe;
|
1146 | }
|
1147 | };
|
1148 |
|
1149 | var jss_esm_plugin = {
|
1150 | onCreateRule: function onCreateRule(key, frames, options) {
|
1151 | return typeof key === 'string' && keyRegExp$1.test(key) ? new jss_esm_KeyframesRule(key, frames, options) : null;
|
1152 | },
|
1153 |
|
1154 | onProcessStyle: function onProcessStyle(style, rule, sheet) {
|
1155 | if (rule.type !== 'style' || !sheet) return style;
|
1156 | if ('animation-name' in style) jss_esm_replaceRef(style, 'animation-name', sheet.keyframes);
|
1157 | if ('animation' in style) jss_esm_replaceRef(style, 'animation', sheet.keyframes);
|
1158 | return style;
|
1159 | },
|
1160 | onChangeValue: function onChangeValue(val, prop, rule) {
|
1161 | var sheet = rule.options.sheet;
|
1162 |
|
1163 | if (!sheet) {
|
1164 | return val;
|
1165 | }
|
1166 |
|
1167 | switch (prop) {
|
1168 | case 'animation':
|
1169 | return findReferencedKeyframe(val, sheet.keyframes);
|
1170 |
|
1171 | case 'animation-name':
|
1172 | return findReferencedKeyframe(val, sheet.keyframes);
|
1173 |
|
1174 | default:
|
1175 | return val;
|
1176 | }
|
1177 | }
|
1178 | };
|
1179 |
|
1180 | var jss_esm_KeyframeRule =
|
1181 |
|
1182 | function (_BaseStyleRule) {
|
1183 | Object(inheritsLoose["a" ])(KeyframeRule, _BaseStyleRule);
|
1184 |
|
1185 | function KeyframeRule() {
|
1186 | var _this;
|
1187 |
|
1188 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
1189 | args[_key] = arguments[_key];
|
1190 | }
|
1191 |
|
1192 | _this = _BaseStyleRule.call.apply(_BaseStyleRule, [this].concat(args)) || this;
|
1193 | _this.renderable = void 0;
|
1194 | return _this;
|
1195 | }
|
1196 |
|
1197 | var _proto = KeyframeRule.prototype;
|
1198 |
|
1199 | |
1200 |
|
1201 |
|
1202 | _proto.toString = function toString(options) {
|
1203 | var sheet = this.options.sheet;
|
1204 | var link = sheet ? sheet.options.link : false;
|
1205 | var opts = link ? Object(esm_extends["a" ])({}, options, {
|
1206 | allowEmpty: true
|
1207 | }) : options;
|
1208 | return toCss(this.key, this.style, opts);
|
1209 | };
|
1210 |
|
1211 | return KeyframeRule;
|
1212 | }(BaseStyleRule);
|
1213 | var pluginKeyframeRule = {
|
1214 | onCreateRule: function onCreateRule(key, style, options) {
|
1215 | if (options.parent && options.parent.type === 'keyframes') {
|
1216 | return new jss_esm_KeyframeRule(key, style, options);
|
1217 | }
|
1218 |
|
1219 | return null;
|
1220 | }
|
1221 | };
|
1222 |
|
1223 | var FontFaceRule =
|
1224 |
|
1225 | function () {
|
1226 | function FontFaceRule(key, style, options) {
|
1227 | this.type = 'font-face';
|
1228 | this.at = '@font-face';
|
1229 | this.key = void 0;
|
1230 | this.style = void 0;
|
1231 | this.options = void 0;
|
1232 | this.isProcessed = false;
|
1233 | this.renderable = void 0;
|
1234 | this.key = key;
|
1235 | this.style = style;
|
1236 | this.options = options;
|
1237 | }
|
1238 | |
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 | var _proto = FontFaceRule.prototype;
|
1244 |
|
1245 | _proto.toString = function toString(options) {
|
1246 | if (Array.isArray(this.style)) {
|
1247 | var str = '';
|
1248 |
|
1249 | for (var index = 0; index < this.style.length; index++) {
|
1250 | str += toCss(this.at, this.style[index]);
|
1251 | if (this.style[index + 1]) str += '\n';
|
1252 | }
|
1253 |
|
1254 | return str;
|
1255 | }
|
1256 |
|
1257 | return toCss(this.at, this.style, options);
|
1258 | };
|
1259 |
|
1260 | return FontFaceRule;
|
1261 | }();
|
1262 | var keyRegExp$2 = /@font-face/;
|
1263 | var pluginFontFaceRule = {
|
1264 | onCreateRule: function onCreateRule(key, style, options) {
|
1265 | return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null;
|
1266 | }
|
1267 | };
|
1268 |
|
1269 | var ViewportRule =
|
1270 |
|
1271 | function () {
|
1272 | function ViewportRule(key, style, options) {
|
1273 | this.type = 'viewport';
|
1274 | this.at = '@viewport';
|
1275 | this.key = void 0;
|
1276 | this.style = void 0;
|
1277 | this.options = void 0;
|
1278 | this.isProcessed = false;
|
1279 | this.renderable = void 0;
|
1280 | this.key = key;
|
1281 | this.style = style;
|
1282 | this.options = options;
|
1283 | }
|
1284 | |
1285 |
|
1286 |
|
1287 |
|
1288 |
|
1289 | var _proto = ViewportRule.prototype;
|
1290 |
|
1291 | _proto.toString = function toString(options) {
|
1292 | return toCss(this.key, this.style, options);
|
1293 | };
|
1294 |
|
1295 | return ViewportRule;
|
1296 | }();
|
1297 | var pluginViewportRule = {
|
1298 | onCreateRule: function onCreateRule(key, style, options) {
|
1299 | return key === '@viewport' || key === '@-ms-viewport' ? new ViewportRule(key, style, options) : null;
|
1300 | }
|
1301 | };
|
1302 |
|
1303 | var SimpleRule =
|
1304 |
|
1305 | function () {
|
1306 | function SimpleRule(key, value, options) {
|
1307 | this.type = 'simple';
|
1308 | this.key = void 0;
|
1309 | this.value = void 0;
|
1310 | this.options = void 0;
|
1311 | this.isProcessed = false;
|
1312 | this.renderable = void 0;
|
1313 | this.key = key;
|
1314 | this.value = value;
|
1315 | this.options = options;
|
1316 | }
|
1317 | |
1318 |
|
1319 |
|
1320 |
|
1321 |
|
1322 |
|
1323 | var _proto = SimpleRule.prototype;
|
1324 |
|
1325 | _proto.toString = function toString(options) {
|
1326 | if (Array.isArray(this.value)) {
|
1327 | var str = '';
|
1328 |
|
1329 | for (var index = 0; index < this.value.length; index++) {
|
1330 | str += this.key + " " + this.value[index] + ";";
|
1331 | if (this.value[index + 1]) str += '\n';
|
1332 | }
|
1333 |
|
1334 | return str;
|
1335 | }
|
1336 |
|
1337 | return this.key + " " + this.value + ";";
|
1338 | };
|
1339 |
|
1340 | return SimpleRule;
|
1341 | }();
|
1342 | var keysMap = {
|
1343 | '@charset': true,
|
1344 | '@import': true,
|
1345 | '@namespace': true
|
1346 | };
|
1347 | var pluginSimpleRule = {
|
1348 | onCreateRule: function onCreateRule(key, value, options) {
|
1349 | return key in keysMap ? new SimpleRule(key, value, options) : null;
|
1350 | }
|
1351 | };
|
1352 |
|
1353 | var plugins = [pluginStyleRule, pluginConditionalRule, jss_esm_plugin, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule];
|
1354 |
|
1355 | var defaultUpdateOptions = {
|
1356 | process: true
|
1357 | };
|
1358 | var forceUpdateOptions = {
|
1359 | force: true,
|
1360 | process: true
|
1361 | |
1362 |
|
1363 |
|
1364 |
|
1365 |
|
1366 | };
|
1367 |
|
1368 | var jss_esm_RuleList =
|
1369 |
|
1370 | function () {
|
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 | function RuleList(options) {
|
1376 | this.map = {};
|
1377 | this.raw = {};
|
1378 | this.index = [];
|
1379 | this.counter = 0;
|
1380 | this.options = void 0;
|
1381 | this.classes = void 0;
|
1382 | this.keyframes = void 0;
|
1383 | this.options = options;
|
1384 | this.classes = options.classes;
|
1385 | this.keyframes = options.keyframes;
|
1386 | }
|
1387 | |
1388 |
|
1389 |
|
1390 |
|
1391 |
|
1392 |
|
1393 |
|
1394 | var _proto = RuleList.prototype;
|
1395 |
|
1396 | _proto.add = function add(name, decl, ruleOptions) {
|
1397 | var _this$options = this.options,
|
1398 | parent = _this$options.parent,
|
1399 | sheet = _this$options.sheet,
|
1400 | jss = _this$options.jss,
|
1401 | Renderer = _this$options.Renderer,
|
1402 | generateId = _this$options.generateId,
|
1403 | scoped = _this$options.scoped;
|
1404 |
|
1405 | var options = Object(esm_extends["a" ])({
|
1406 | classes: this.classes,
|
1407 | parent: parent,
|
1408 | sheet: sheet,
|
1409 | jss: jss,
|
1410 | Renderer: Renderer,
|
1411 | generateId: generateId,
|
1412 | scoped: scoped,
|
1413 | name: name
|
1414 | }, ruleOptions);
|
1415 |
|
1416 |
|
1417 |
|
1418 |
|
1419 | var key = name;
|
1420 |
|
1421 | if (name in this.raw) {
|
1422 | key = name + "-d" + this.counter++;
|
1423 | }
|
1424 |
|
1425 |
|
1426 |
|
1427 | this.raw[key] = decl;
|
1428 |
|
1429 | if (key in this.classes) {
|
1430 |
|
1431 | options.selector = "." + jss_esm_escape(this.classes[key]);
|
1432 | }
|
1433 |
|
1434 | var rule = createRule(key, decl, options);
|
1435 | if (!rule) return null;
|
1436 | this.register(rule);
|
1437 | var index = options.index === undefined ? this.index.length : options.index;
|
1438 | this.index.splice(index, 0, rule);
|
1439 | return rule;
|
1440 | }
|
1441 | |
1442 |
|
1443 |
|
1444 | ;
|
1445 |
|
1446 | _proto.get = function get(name) {
|
1447 | return this.map[name];
|
1448 | }
|
1449 | |
1450 |
|
1451 |
|
1452 | ;
|
1453 |
|
1454 | _proto.remove = function remove(rule) {
|
1455 | this.unregister(rule);
|
1456 | delete this.raw[rule.key];
|
1457 | this.index.splice(this.index.indexOf(rule), 1);
|
1458 | }
|
1459 | |
1460 |
|
1461 |
|
1462 | ;
|
1463 |
|
1464 | _proto.indexOf = function indexOf(rule) {
|
1465 | return this.index.indexOf(rule);
|
1466 | }
|
1467 | |
1468 |
|
1469 |
|
1470 | ;
|
1471 |
|
1472 | _proto.process = function process() {
|
1473 | var plugins = this.options.jss.plugins;
|
1474 |
|
1475 |
|
1476 | this.index.slice(0).forEach(plugins.onProcessRule, plugins);
|
1477 | }
|
1478 | |
1479 |
|
1480 |
|
1481 | ;
|
1482 |
|
1483 | _proto.register = function register(rule) {
|
1484 | this.map[rule.key] = rule;
|
1485 |
|
1486 | if (rule instanceof jss_esm_StyleRule) {
|
1487 | this.map[rule.selector] = rule;
|
1488 | if (rule.id) this.classes[rule.key] = rule.id;
|
1489 | } else if (rule instanceof jss_esm_KeyframesRule && this.keyframes) {
|
1490 | this.keyframes[rule.name] = rule.id;
|
1491 | }
|
1492 | }
|
1493 | |
1494 |
|
1495 |
|
1496 | ;
|
1497 |
|
1498 | _proto.unregister = function unregister(rule) {
|
1499 | delete this.map[rule.key];
|
1500 |
|
1501 | if (rule instanceof jss_esm_StyleRule) {
|
1502 | delete this.map[rule.selector];
|
1503 | delete this.classes[rule.key];
|
1504 | } else if (rule instanceof jss_esm_KeyframesRule) {
|
1505 | delete this.keyframes[rule.name];
|
1506 | }
|
1507 | }
|
1508 | |
1509 |
|
1510 |
|
1511 | ;
|
1512 |
|
1513 | _proto.update = function update() {
|
1514 | var name;
|
1515 | var data;
|
1516 | var options;
|
1517 |
|
1518 | if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') {
|
1519 | name = arguments.length <= 0 ? undefined : arguments[0];
|
1520 |
|
1521 | data = arguments.length <= 1 ? undefined : arguments[1];
|
1522 |
|
1523 | options = arguments.length <= 2 ? undefined : arguments[2];
|
1524 | } else {
|
1525 | data = arguments.length <= 0 ? undefined : arguments[0];
|
1526 |
|
1527 | options = arguments.length <= 1 ? undefined : arguments[1];
|
1528 | name = null;
|
1529 | }
|
1530 |
|
1531 | if (name) {
|
1532 | this.updateOne(this.map[name], data, options);
|
1533 | } else {
|
1534 | for (var index = 0; index < this.index.length; index++) {
|
1535 | this.updateOne(this.index[index], data, options);
|
1536 | }
|
1537 | }
|
1538 | }
|
1539 | |
1540 |
|
1541 |
|
1542 | ;
|
1543 |
|
1544 | _proto.updateOne = function updateOne(rule, data, options) {
|
1545 | if (options === void 0) {
|
1546 | options = defaultUpdateOptions;
|
1547 | }
|
1548 |
|
1549 | var _this$options2 = this.options,
|
1550 | plugins = _this$options2.jss.plugins,
|
1551 | sheet = _this$options2.sheet;
|
1552 |
|
1553 | if (rule.rules instanceof RuleList) {
|
1554 | rule.rules.update(data, options);
|
1555 | return;
|
1556 | }
|
1557 |
|
1558 | var styleRule = rule;
|
1559 | var style = styleRule.style;
|
1560 | plugins.onUpdate(data, rule, sheet, options);
|
1561 |
|
1562 | if (options.process && style && style !== styleRule.style) {
|
1563 |
|
1564 | plugins.onProcessStyle(styleRule.style, styleRule, sheet);
|
1565 |
|
1566 | for (var prop in styleRule.style) {
|
1567 | var nextValue = styleRule.style[prop];
|
1568 | var prevValue = style[prop];
|
1569 |
|
1570 |
|
1571 | if (nextValue !== prevValue) {
|
1572 | styleRule.prop(prop, nextValue, forceUpdateOptions);
|
1573 | }
|
1574 | }
|
1575 |
|
1576 |
|
1577 | for (var _prop in style) {
|
1578 | var _nextValue = styleRule.style[_prop];
|
1579 | var _prevValue = style[_prop];
|
1580 |
|
1581 |
|
1582 | if (_nextValue == null && _nextValue !== _prevValue) {
|
1583 | styleRule.prop(_prop, null, forceUpdateOptions);
|
1584 | }
|
1585 | }
|
1586 | }
|
1587 | }
|
1588 | |
1589 |
|
1590 |
|
1591 | ;
|
1592 |
|
1593 | _proto.toString = function toString(options) {
|
1594 | var str = '';
|
1595 | var sheet = this.options.sheet;
|
1596 | var link = sheet ? sheet.options.link : false;
|
1597 |
|
1598 | for (var index = 0; index < this.index.length; index++) {
|
1599 | var rule = this.index[index];
|
1600 | var css = rule.toString(options);
|
1601 |
|
1602 | if (!css && !link) continue;
|
1603 | if (str) str += '\n';
|
1604 | str += css;
|
1605 | }
|
1606 |
|
1607 | return str;
|
1608 | };
|
1609 |
|
1610 | return RuleList;
|
1611 | }();
|
1612 |
|
1613 | var jss_esm_StyleSheet =
|
1614 |
|
1615 | function () {
|
1616 | function StyleSheet(styles, options) {
|
1617 | this.options = void 0;
|
1618 | this.deployed = void 0;
|
1619 | this.attached = void 0;
|
1620 | this.rules = void 0;
|
1621 | this.renderer = void 0;
|
1622 | this.classes = void 0;
|
1623 | this.keyframes = void 0;
|
1624 | this.queue = void 0;
|
1625 | this.attached = false;
|
1626 | this.deployed = false;
|
1627 | this.classes = {};
|
1628 | this.keyframes = {};
|
1629 | this.options = Object(esm_extends["a" ])({}, options, {
|
1630 | sheet: this,
|
1631 | parent: this,
|
1632 | classes: this.classes,
|
1633 | keyframes: this.keyframes
|
1634 | });
|
1635 |
|
1636 | if (options.Renderer) {
|
1637 | this.renderer = new options.Renderer(this);
|
1638 | }
|
1639 |
|
1640 | this.rules = new jss_esm_RuleList(this.options);
|
1641 |
|
1642 | for (var name in styles) {
|
1643 | this.rules.add(name, styles[name]);
|
1644 | }
|
1645 |
|
1646 | this.rules.process();
|
1647 | }
|
1648 | |
1649 |
|
1650 |
|
1651 |
|
1652 |
|
1653 | var _proto = StyleSheet.prototype;
|
1654 |
|
1655 | _proto.attach = function attach() {
|
1656 | if (this.attached) return this;
|
1657 | if (this.renderer) this.renderer.attach();
|
1658 | this.attached = true;
|
1659 |
|
1660 | if (!this.deployed) this.deploy();
|
1661 | return this;
|
1662 | }
|
1663 | |
1664 |
|
1665 |
|
1666 | ;
|
1667 |
|
1668 | _proto.detach = function detach() {
|
1669 | if (!this.attached) return this;
|
1670 | if (this.renderer) this.renderer.detach();
|
1671 | this.attached = false;
|
1672 | return this;
|
1673 | }
|
1674 | |
1675 |
|
1676 |
|
1677 |
|
1678 | ;
|
1679 |
|
1680 | _proto.addRule = function addRule(name, decl, options) {
|
1681 | var queue = this.queue;
|
1682 |
|
1683 |
|
1684 |
|
1685 | if (this.attached && !queue) this.queue = [];
|
1686 | var rule = this.rules.add(name, decl, options);
|
1687 | if (!rule) return null;
|
1688 | this.options.jss.plugins.onProcessRule(rule);
|
1689 |
|
1690 | if (this.attached) {
|
1691 | if (!this.deployed) return rule;
|
1692 |
|
1693 |
|
1694 | if (queue) queue.push(rule);else {
|
1695 | this.insertRule(rule);
|
1696 |
|
1697 | if (this.queue) {
|
1698 | this.queue.forEach(this.insertRule, this);
|
1699 | this.queue = undefined;
|
1700 | }
|
1701 | }
|
1702 | return rule;
|
1703 | }
|
1704 |
|
1705 |
|
1706 |
|
1707 | this.deployed = false;
|
1708 | return rule;
|
1709 | }
|
1710 | |
1711 |
|
1712 |
|
1713 | ;
|
1714 |
|
1715 | _proto.insertRule = function insertRule(rule) {
|
1716 | if (this.renderer) {
|
1717 | this.renderer.insertRule(rule);
|
1718 | }
|
1719 | }
|
1720 | |
1721 |
|
1722 |
|
1723 |
|
1724 | ;
|
1725 |
|
1726 | _proto.addRules = function addRules(styles, options) {
|
1727 | var added = [];
|
1728 |
|
1729 | for (var name in styles) {
|
1730 | var rule = this.addRule(name, styles[name], options);
|
1731 | if (rule) added.push(rule);
|
1732 | }
|
1733 |
|
1734 | return added;
|
1735 | }
|
1736 | |
1737 |
|
1738 |
|
1739 | ;
|
1740 |
|
1741 | _proto.getRule = function getRule(name) {
|
1742 | return this.rules.get(name);
|
1743 | }
|
1744 | |
1745 |
|
1746 |
|
1747 |
|
1748 | ;
|
1749 |
|
1750 | _proto.deleteRule = function deleteRule(name) {
|
1751 | var rule = typeof name === 'object' ? name : this.rules.get(name);
|
1752 | if (!rule) return false;
|
1753 | this.rules.remove(rule);
|
1754 |
|
1755 | if (this.attached && rule.renderable && this.renderer) {
|
1756 | return this.renderer.deleteRule(rule.renderable);
|
1757 | }
|
1758 |
|
1759 | return true;
|
1760 | }
|
1761 | |
1762 |
|
1763 |
|
1764 | ;
|
1765 |
|
1766 | _proto.indexOf = function indexOf(rule) {
|
1767 | return this.rules.indexOf(rule);
|
1768 | }
|
1769 | |
1770 |
|
1771 |
|
1772 | ;
|
1773 |
|
1774 | _proto.deploy = function deploy() {
|
1775 | if (this.renderer) this.renderer.deploy();
|
1776 | this.deployed = true;
|
1777 | return this;
|
1778 | }
|
1779 | |
1780 |
|
1781 |
|
1782 | ;
|
1783 |
|
1784 | _proto.update = function update() {
|
1785 | var _this$rules;
|
1786 |
|
1787 | (_this$rules = this.rules).update.apply(_this$rules, arguments);
|
1788 |
|
1789 | return this;
|
1790 | }
|
1791 | |
1792 |
|
1793 |
|
1794 | ;
|
1795 |
|
1796 | _proto.updateOne = function updateOne(rule, data, options) {
|
1797 | this.rules.updateOne(rule, data, options);
|
1798 | return this;
|
1799 | }
|
1800 | |
1801 |
|
1802 |
|
1803 | ;
|
1804 |
|
1805 | _proto.toString = function toString(options) {
|
1806 | return this.rules.toString(options);
|
1807 | };
|
1808 |
|
1809 | return StyleSheet;
|
1810 | }();
|
1811 |
|
1812 | var PluginsRegistry =
|
1813 |
|
1814 | function () {
|
1815 | function PluginsRegistry() {
|
1816 | this.plugins = {
|
1817 | internal: [],
|
1818 | external: []
|
1819 | };
|
1820 | this.registry = void 0;
|
1821 | }
|
1822 |
|
1823 | var _proto = PluginsRegistry.prototype;
|
1824 |
|
1825 | |
1826 |
|
1827 |
|
1828 | _proto.onCreateRule = function onCreateRule(name, decl, options) {
|
1829 | for (var i = 0; i < this.registry.onCreateRule.length; i++) {
|
1830 | var rule = this.registry.onCreateRule[i](name, decl, options);
|
1831 | if (rule) return rule;
|
1832 | }
|
1833 |
|
1834 | return null;
|
1835 | }
|
1836 | |
1837 |
|
1838 |
|
1839 | ;
|
1840 |
|
1841 | _proto.onProcessRule = function onProcessRule(rule) {
|
1842 | if (rule.isProcessed) return;
|
1843 | var sheet = rule.options.sheet;
|
1844 |
|
1845 | for (var i = 0; i < this.registry.onProcessRule.length; i++) {
|
1846 | this.registry.onProcessRule[i](rule, sheet);
|
1847 | }
|
1848 |
|
1849 | if (rule.style) this.onProcessStyle(rule.style, rule, sheet);
|
1850 | rule.isProcessed = true;
|
1851 | }
|
1852 | |
1853 |
|
1854 |
|
1855 | ;
|
1856 |
|
1857 | _proto.onProcessStyle = function onProcessStyle(style, rule, sheet) {
|
1858 | for (var i = 0; i < this.registry.onProcessStyle.length; i++) {
|
1859 |
|
1860 | rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet);
|
1861 | }
|
1862 | }
|
1863 | |
1864 |
|
1865 |
|
1866 | ;
|
1867 |
|
1868 | _proto.onProcessSheet = function onProcessSheet(sheet) {
|
1869 | for (var i = 0; i < this.registry.onProcessSheet.length; i++) {
|
1870 | this.registry.onProcessSheet[i](sheet);
|
1871 | }
|
1872 | }
|
1873 | |
1874 |
|
1875 |
|
1876 | ;
|
1877 |
|
1878 | _proto.onUpdate = function onUpdate(data, rule, sheet, options) {
|
1879 | for (var i = 0; i < this.registry.onUpdate.length; i++) {
|
1880 | this.registry.onUpdate[i](data, rule, sheet, options);
|
1881 | }
|
1882 | }
|
1883 | |
1884 |
|
1885 |
|
1886 | ;
|
1887 |
|
1888 | _proto.onChangeValue = function onChangeValue(value, prop, rule) {
|
1889 | var processedValue = value;
|
1890 |
|
1891 | for (var i = 0; i < this.registry.onChangeValue.length; i++) {
|
1892 | processedValue = this.registry.onChangeValue[i](processedValue, prop, rule);
|
1893 | }
|
1894 |
|
1895 | return processedValue;
|
1896 | }
|
1897 | |
1898 |
|
1899 |
|
1900 | ;
|
1901 |
|
1902 | _proto.use = function use(newPlugin, options) {
|
1903 | if (options === void 0) {
|
1904 | options = {
|
1905 | queue: 'external'
|
1906 | };
|
1907 | }
|
1908 |
|
1909 | var plugins = this.plugins[options.queue];
|
1910 |
|
1911 | if (plugins.indexOf(newPlugin) !== -1) {
|
1912 | return;
|
1913 | }
|
1914 |
|
1915 | plugins.push(newPlugin);
|
1916 | this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function (registry, plugin) {
|
1917 | for (var name in plugin) {
|
1918 | if (name in registry) {
|
1919 | registry[name].push(plugin[name]);
|
1920 | } else {
|
1921 | false ? undefined : void 0;
|
1922 | }
|
1923 | }
|
1924 |
|
1925 | return registry;
|
1926 | }, {
|
1927 | onCreateRule: [],
|
1928 | onProcessRule: [],
|
1929 | onProcessStyle: [],
|
1930 | onProcessSheet: [],
|
1931 | onChangeValue: [],
|
1932 | onUpdate: []
|
1933 | });
|
1934 | };
|
1935 |
|
1936 | return PluginsRegistry;
|
1937 | }();
|
1938 |
|
1939 |
|
1940 |
|
1941 |
|
1942 | var jss_esm_SheetsRegistry =
|
1943 |
|
1944 | function () {
|
1945 | function SheetsRegistry() {
|
1946 | this.registry = [];
|
1947 | }
|
1948 |
|
1949 | var _proto = SheetsRegistry.prototype;
|
1950 |
|
1951 | |
1952 |
|
1953 |
|
1954 | _proto.add = function add(sheet) {
|
1955 | var registry = this.registry;
|
1956 | var index = sheet.options.index;
|
1957 | if (registry.indexOf(sheet) !== -1) return;
|
1958 |
|
1959 | if (registry.length === 0 || index >= this.index) {
|
1960 | registry.push(sheet);
|
1961 | return;
|
1962 | }
|
1963 |
|
1964 |
|
1965 | for (var i = 0; i < registry.length; i++) {
|
1966 | if (registry[i].options.index > index) {
|
1967 | registry.splice(i, 0, sheet);
|
1968 | return;
|
1969 | }
|
1970 | }
|
1971 | }
|
1972 | |
1973 |
|
1974 |
|
1975 | ;
|
1976 |
|
1977 | _proto.reset = function reset() {
|
1978 | this.registry = [];
|
1979 | }
|
1980 | |
1981 |
|
1982 |
|
1983 | ;
|
1984 |
|
1985 | _proto.remove = function remove(sheet) {
|
1986 | var index = this.registry.indexOf(sheet);
|
1987 | this.registry.splice(index, 1);
|
1988 | }
|
1989 | |
1990 |
|
1991 |
|
1992 | ;
|
1993 |
|
1994 | _proto.toString = function toString(_temp) {
|
1995 | var _ref = _temp === void 0 ? {} : _temp,
|
1996 | attached = _ref.attached,
|
1997 | options = Object(objectWithoutPropertiesLoose["a" ])(_ref, ["attached"]);
|
1998 |
|
1999 | var css = '';
|
2000 |
|
2001 | for (var i = 0; i < this.registry.length; i++) {
|
2002 | var sheet = this.registry[i];
|
2003 |
|
2004 | if (attached != null && sheet.attached !== attached) {
|
2005 | continue;
|
2006 | }
|
2007 |
|
2008 | if (css) css += '\n';
|
2009 | css += sheet.toString(options);
|
2010 | }
|
2011 |
|
2012 | return css;
|
2013 | };
|
2014 |
|
2015 | _createClass(SheetsRegistry, [{
|
2016 | key: "index",
|
2017 |
|
2018 | |
2019 |
|
2020 |
|
2021 | get: function get() {
|
2022 | return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index;
|
2023 | }
|
2024 | }]);
|
2025 |
|
2026 | return SheetsRegistry;
|
2027 | }();
|
2028 |
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 |
|
2035 |
|
2036 | var sheets = new jss_esm_SheetsRegistry();
|
2037 |
|
2038 |
|
2039 |
|
2040 | var globalThis = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
2041 |
|
2042 | var ns = '2f1acc6c3a606b082e5eef5e54414ffb';
|
2043 | if (globalThis[ns] == null) globalThis[ns] = 0;
|
2044 |
|
2045 |
|
2046 |
|
2047 |
|
2048 | var moduleId = globalThis[ns]++;
|
2049 |
|
2050 | var maxRules = 1e10;
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 | var createGenerateId = function createGenerateId(options) {
|
2058 | if (options === void 0) {
|
2059 | options = {};
|
2060 | }
|
2061 |
|
2062 | var ruleCounter = 0;
|
2063 | return function (rule, sheet) {
|
2064 | ruleCounter += 1;
|
2065 |
|
2066 | if (ruleCounter > maxRules) {
|
2067 | false ? undefined : void 0;
|
2068 | }
|
2069 |
|
2070 | var jssId = '';
|
2071 | var prefix = '';
|
2072 |
|
2073 | if (sheet) {
|
2074 | if (sheet.options.classNamePrefix) {
|
2075 | prefix = sheet.options.classNamePrefix;
|
2076 | }
|
2077 |
|
2078 | if (sheet.options.jss.id != null) {
|
2079 | jssId = String(sheet.options.jss.id);
|
2080 | }
|
2081 | }
|
2082 |
|
2083 | if (options.minify) {
|
2084 |
|
2085 | return "" + (prefix || 'c') + moduleId + jssId + ruleCounter;
|
2086 | }
|
2087 |
|
2088 | return prefix + rule.key + "-" + moduleId + (jssId ? "-" + jssId : '') + "-" + ruleCounter;
|
2089 | };
|
2090 | };
|
2091 |
|
2092 |
|
2093 |
|
2094 |
|
2095 | var memoize = function memoize(fn) {
|
2096 | var value;
|
2097 | return function () {
|
2098 | if (!value) value = fn();
|
2099 | return value;
|
2100 | };
|
2101 | };
|
2102 |
|
2103 |
|
2104 |
|
2105 |
|
2106 |
|
2107 | function getPropertyValue(cssRule, prop) {
|
2108 | try {
|
2109 |
|
2110 | if (cssRule.attributeStyleMap) {
|
2111 | return cssRule.attributeStyleMap.get(prop);
|
2112 | }
|
2113 |
|
2114 | return cssRule.style.getPropertyValue(prop);
|
2115 | } catch (err) {
|
2116 |
|
2117 | return '';
|
2118 | }
|
2119 | }
|
2120 |
|
2121 |
|
2122 |
|
2123 |
|
2124 |
|
2125 | function setProperty(cssRule, prop, value) {
|
2126 | try {
|
2127 | var cssValue = value;
|
2128 |
|
2129 | if (Array.isArray(value)) {
|
2130 | cssValue = toCssValue(value, true);
|
2131 |
|
2132 | if (value[value.length - 1] === '!important') {
|
2133 | cssRule.style.setProperty(prop, cssValue, 'important');
|
2134 | return true;
|
2135 | }
|
2136 | }
|
2137 |
|
2138 |
|
2139 | if (cssRule.attributeStyleMap) {
|
2140 | cssRule.attributeStyleMap.set(prop, cssValue);
|
2141 | } else {
|
2142 | cssRule.style.setProperty(prop, cssValue);
|
2143 | }
|
2144 | } catch (err) {
|
2145 |
|
2146 | return false;
|
2147 | }
|
2148 |
|
2149 | return true;
|
2150 | }
|
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 | function removeProperty(cssRule, prop) {
|
2157 | try {
|
2158 |
|
2159 | if (cssRule.attributeStyleMap) {
|
2160 | cssRule.attributeStyleMap.delete(prop);
|
2161 | } else {
|
2162 | cssRule.style.removeProperty(prop);
|
2163 | }
|
2164 | } catch (err) {
|
2165 | false ? undefined : void 0;
|
2166 | }
|
2167 | }
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 | function setSelector(cssRule, selectorText) {
|
2174 | cssRule.selectorText = selectorText;
|
2175 |
|
2176 |
|
2177 | return cssRule.selectorText === selectorText;
|
2178 | }
|
2179 |
|
2180 |
|
2181 |
|
2182 |
|
2183 |
|
2184 |
|
2185 | var getHead = memoize(function () {
|
2186 | return document.querySelector('head');
|
2187 | });
|
2188 |
|
2189 |
|
2190 |
|
2191 |
|
2192 | function findHigherSheet(registry, options) {
|
2193 | for (var i = 0; i < registry.length; i++) {
|
2194 | var sheet = registry[i];
|
2195 |
|
2196 | if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {
|
2197 | return sheet;
|
2198 | }
|
2199 | }
|
2200 |
|
2201 | return null;
|
2202 | }
|
2203 |
|
2204 |
|
2205 |
|
2206 |
|
2207 |
|
2208 | function findHighestSheet(registry, options) {
|
2209 | for (var i = registry.length - 1; i >= 0; i--) {
|
2210 | var sheet = registry[i];
|
2211 |
|
2212 | if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {
|
2213 | return sheet;
|
2214 | }
|
2215 | }
|
2216 |
|
2217 | return null;
|
2218 | }
|
2219 |
|
2220 |
|
2221 |
|
2222 |
|
2223 |
|
2224 | function findCommentNode(text) {
|
2225 | var head = getHead();
|
2226 |
|
2227 | for (var i = 0; i < head.childNodes.length; i++) {
|
2228 | var node = head.childNodes[i];
|
2229 |
|
2230 | if (node.nodeType === 8 && node.nodeValue.trim() === text) {
|
2231 | return node;
|
2232 | }
|
2233 | }
|
2234 |
|
2235 | return null;
|
2236 | }
|
2237 |
|
2238 |
|
2239 |
|
2240 |
|
2241 | function findPrevNode(options) {
|
2242 | var registry = sheets.registry;
|
2243 |
|
2244 | if (registry.length > 0) {
|
2245 |
|
2246 | var sheet = findHigherSheet(registry, options);
|
2247 |
|
2248 | if (sheet && sheet.renderer) {
|
2249 | return {
|
2250 | parent: sheet.renderer.element.parentNode,
|
2251 | node: sheet.renderer.element
|
2252 | };
|
2253 | }
|
2254 |
|
2255 |
|
2256 | sheet = findHighestSheet(registry, options);
|
2257 |
|
2258 | if (sheet && sheet.renderer) {
|
2259 | return {
|
2260 | parent: sheet.renderer.element.parentNode,
|
2261 | node: sheet.renderer.element.nextSibling
|
2262 | };
|
2263 | }
|
2264 | }
|
2265 |
|
2266 |
|
2267 | var insertionPoint = options.insertionPoint;
|
2268 |
|
2269 | if (insertionPoint && typeof insertionPoint === 'string') {
|
2270 | var comment = findCommentNode(insertionPoint);
|
2271 |
|
2272 | if (comment) {
|
2273 | return {
|
2274 | parent: comment.parentNode,
|
2275 | node: comment.nextSibling
|
2276 | };
|
2277 | }
|
2278 |
|
2279 |
|
2280 |
|
2281 | false ? undefined : void 0;
|
2282 | }
|
2283 |
|
2284 | return false;
|
2285 | }
|
2286 |
|
2287 |
|
2288 |
|
2289 |
|
2290 |
|
2291 | function insertStyle(style, options) {
|
2292 | var insertionPoint = options.insertionPoint;
|
2293 | var nextNode = findPrevNode(options);
|
2294 |
|
2295 | if (nextNode !== false && nextNode.parent) {
|
2296 | nextNode.parent.insertBefore(style, nextNode.node);
|
2297 | return;
|
2298 | }
|
2299 |
|
2300 |
|
2301 | if (insertionPoint && typeof insertionPoint.nodeType === 'number') {
|
2302 |
|
2303 | var insertionPointElement = insertionPoint;
|
2304 | var parentNode = insertionPointElement.parentNode;
|
2305 | if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else false ? undefined : void 0;
|
2306 | return;
|
2307 | }
|
2308 |
|
2309 | getHead().appendChild(style);
|
2310 | }
|
2311 |
|
2312 |
|
2313 |
|
2314 |
|
2315 |
|
2316 | var getNonce = memoize(function () {
|
2317 | var node = document.querySelector('meta[property="csp-nonce"]');
|
2318 | return node ? node.getAttribute('content') : null;
|
2319 | });
|
2320 |
|
2321 | var _insertRule = function insertRule(container, rule, index) {
|
2322 | var maxIndex = container.cssRules.length;
|
2323 |
|
2324 | if (index === undefined || index > maxIndex) {
|
2325 |
|
2326 | index = maxIndex;
|
2327 | }
|
2328 |
|
2329 | try {
|
2330 | if ('insertRule' in container) {
|
2331 | var c = container;
|
2332 | c.insertRule(rule, index);
|
2333 | }
|
2334 | else if ('appendRule' in container) {
|
2335 | var _c = container;
|
2336 |
|
2337 | _c.appendRule(rule);
|
2338 | }
|
2339 | } catch (err) {
|
2340 | false ? undefined : void 0;
|
2341 | return false;
|
2342 | }
|
2343 |
|
2344 | return container.cssRules[index];
|
2345 | };
|
2346 |
|
2347 | var createStyle = function createStyle() {
|
2348 | var el = document.createElement('style');
|
2349 |
|
2350 |
|
2351 |
|
2352 | el.textContent = '\n';
|
2353 | return el;
|
2354 | };
|
2355 |
|
2356 | var DomRenderer =
|
2357 |
|
2358 | function () {
|
2359 |
|
2360 | function DomRenderer(sheet) {
|
2361 | this.getPropertyValue = getPropertyValue;
|
2362 | this.setProperty = setProperty;
|
2363 | this.removeProperty = removeProperty;
|
2364 | this.setSelector = setSelector;
|
2365 | this.element = void 0;
|
2366 | this.sheet = void 0;
|
2367 | this.hasInsertedRules = false;
|
2368 |
|
2369 | if (sheet) sheets.add(sheet);
|
2370 | this.sheet = sheet;
|
2371 |
|
2372 | var _ref = this.sheet ? this.sheet.options : {},
|
2373 | media = _ref.media,
|
2374 | meta = _ref.meta,
|
2375 | element = _ref.element;
|
2376 |
|
2377 | this.element = element || createStyle();
|
2378 | this.element.setAttribute('data-jss', '');
|
2379 | if (media) this.element.setAttribute('media', media);
|
2380 | if (meta) this.element.setAttribute('data-meta', meta);
|
2381 | var nonce = getNonce();
|
2382 | if (nonce) this.element.setAttribute('nonce', nonce);
|
2383 | }
|
2384 | |
2385 |
|
2386 |
|
2387 |
|
2388 |
|
2389 | var _proto = DomRenderer.prototype;
|
2390 |
|
2391 | _proto.attach = function attach() {
|
2392 |
|
2393 | if (this.element.parentNode || !this.sheet) return;
|
2394 | insertStyle(this.element, this.sheet.options);
|
2395 |
|
2396 |
|
2397 | var deployed = Boolean(this.sheet && this.sheet.deployed);
|
2398 |
|
2399 | if (this.hasInsertedRules && deployed) {
|
2400 | this.hasInsertedRules = false;
|
2401 | this.deploy();
|
2402 | }
|
2403 | }
|
2404 | |
2405 |
|
2406 |
|
2407 | ;
|
2408 |
|
2409 | _proto.detach = function detach() {
|
2410 | var parentNode = this.element.parentNode;
|
2411 | if (parentNode) parentNode.removeChild(this.element);
|
2412 | }
|
2413 | |
2414 |
|
2415 |
|
2416 | ;
|
2417 |
|
2418 | _proto.deploy = function deploy() {
|
2419 | var sheet = this.sheet;
|
2420 | if (!sheet) return;
|
2421 |
|
2422 | if (sheet.options.link) {
|
2423 | this.insertRules(sheet.rules);
|
2424 | return;
|
2425 | }
|
2426 |
|
2427 | this.element.textContent = "\n" + sheet.toString() + "\n";
|
2428 | }
|
2429 | |
2430 |
|
2431 |
|
2432 | ;
|
2433 |
|
2434 | _proto.insertRules = function insertRules(rules, nativeParent) {
|
2435 | for (var i = 0; i < rules.index.length; i++) {
|
2436 | this.insertRule(rules.index[i], i, nativeParent);
|
2437 | }
|
2438 | }
|
2439 | |
2440 |
|
2441 |
|
2442 | ;
|
2443 |
|
2444 | _proto.insertRule = function insertRule(rule, index, nativeParent) {
|
2445 | if (nativeParent === void 0) {
|
2446 | nativeParent = this.element.sheet;
|
2447 | }
|
2448 |
|
2449 | if (rule.rules) {
|
2450 | var parent = rule;
|
2451 | var latestNativeParent = nativeParent;
|
2452 |
|
2453 | if (rule.type === 'conditional' || rule.type === 'keyframes') {
|
2454 |
|
2455 | latestNativeParent = _insertRule(nativeParent, parent.toString({
|
2456 | children: false
|
2457 | }), index);
|
2458 |
|
2459 | if (latestNativeParent === false) {
|
2460 | return false;
|
2461 | }
|
2462 | }
|
2463 |
|
2464 | this.insertRules(parent.rules, latestNativeParent);
|
2465 | return latestNativeParent;
|
2466 | }
|
2467 |
|
2468 |
|
2469 |
|
2470 |
|
2471 | if (rule.renderable && rule.renderable.parentStyleSheet === this.element.sheet) {
|
2472 | return rule.renderable;
|
2473 | }
|
2474 |
|
2475 | var ruleStr = rule.toString();
|
2476 | if (!ruleStr) return false;
|
2477 |
|
2478 | var nativeRule = _insertRule(nativeParent, ruleStr, index);
|
2479 |
|
2480 | if (nativeRule === false) {
|
2481 | return false;
|
2482 | }
|
2483 |
|
2484 | this.hasInsertedRules = true;
|
2485 | rule.renderable = nativeRule;
|
2486 | return nativeRule;
|
2487 | }
|
2488 | |
2489 |
|
2490 |
|
2491 | ;
|
2492 |
|
2493 | _proto.deleteRule = function deleteRule(cssRule) {
|
2494 | var sheet = this.element.sheet;
|
2495 | var index = this.indexOf(cssRule);
|
2496 | if (index === -1) return false;
|
2497 | sheet.deleteRule(index);
|
2498 | return true;
|
2499 | }
|
2500 | |
2501 |
|
2502 |
|
2503 | ;
|
2504 |
|
2505 | _proto.indexOf = function indexOf(cssRule) {
|
2506 | var cssRules = this.element.sheet.cssRules;
|
2507 |
|
2508 | for (var index = 0; index < cssRules.length; index++) {
|
2509 | if (cssRule === cssRules[index]) return index;
|
2510 | }
|
2511 |
|
2512 | return -1;
|
2513 | }
|
2514 | |
2515 |
|
2516 |
|
2517 |
|
2518 |
|
2519 | ;
|
2520 |
|
2521 | _proto.replaceRule = function replaceRule(cssRule, rule) {
|
2522 | var index = this.indexOf(cssRule);
|
2523 | if (index === -1) return false;
|
2524 | this.element.sheet.deleteRule(index);
|
2525 | return this.insertRule(rule, index);
|
2526 | }
|
2527 | |
2528 |
|
2529 |
|
2530 | ;
|
2531 |
|
2532 | _proto.getRules = function getRules() {
|
2533 | return this.element.sheet.cssRules;
|
2534 | };
|
2535 |
|
2536 | return DomRenderer;
|
2537 | }();
|
2538 |
|
2539 | var instanceCounter = 0;
|
2540 |
|
2541 | var jss_esm_Jss =
|
2542 |
|
2543 | function () {
|
2544 | function Jss(options) {
|
2545 | this.id = instanceCounter++;
|
2546 | this.version = "10.3.0";
|
2547 | this.plugins = new PluginsRegistry();
|
2548 | this.options = {
|
2549 | id: {
|
2550 | minify: false
|
2551 | },
|
2552 | createGenerateId: createGenerateId,
|
2553 | Renderer: dist_module ? DomRenderer : null,
|
2554 | plugins: []
|
2555 | };
|
2556 | this.generateId = createGenerateId({
|
2557 | minify: false
|
2558 | });
|
2559 |
|
2560 | for (var i = 0; i < plugins.length; i++) {
|
2561 | this.plugins.use(plugins[i], {
|
2562 | queue: 'internal'
|
2563 | });
|
2564 | }
|
2565 |
|
2566 | this.setup(options);
|
2567 | }
|
2568 | |
2569 |
|
2570 |
|
2571 |
|
2572 |
|
2573 |
|
2574 |
|
2575 | var _proto = Jss.prototype;
|
2576 |
|
2577 | _proto.setup = function setup(options) {
|
2578 | if (options === void 0) {
|
2579 | options = {};
|
2580 | }
|
2581 |
|
2582 | if (options.createGenerateId) {
|
2583 | this.options.createGenerateId = options.createGenerateId;
|
2584 | }
|
2585 |
|
2586 | if (options.id) {
|
2587 | this.options.id = Object(esm_extends["a" ])({}, this.options.id, options.id);
|
2588 | }
|
2589 |
|
2590 | if (options.createGenerateId || options.id) {
|
2591 | this.generateId = this.options.createGenerateId(this.options.id);
|
2592 | }
|
2593 |
|
2594 | if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint;
|
2595 |
|
2596 | if ('Renderer' in options) {
|
2597 | this.options.Renderer = options.Renderer;
|
2598 | }
|
2599 |
|
2600 |
|
2601 | if (options.plugins) this.use.apply(this, options.plugins);
|
2602 | return this;
|
2603 | }
|
2604 | |
2605 |
|
2606 |
|
2607 | ;
|
2608 |
|
2609 | _proto.createStyleSheet = function createStyleSheet(styles, options) {
|
2610 | if (options === void 0) {
|
2611 | options = {};
|
2612 | }
|
2613 |
|
2614 | var _options = options,
|
2615 | index = _options.index;
|
2616 |
|
2617 | if (typeof index !== 'number') {
|
2618 | index = sheets.index === 0 ? 0 : sheets.index + 1;
|
2619 | }
|
2620 |
|
2621 | var sheet = new jss_esm_StyleSheet(styles, Object(esm_extends["a" ])({}, options, {
|
2622 | jss: this,
|
2623 | generateId: options.generateId || this.generateId,
|
2624 | insertionPoint: this.options.insertionPoint,
|
2625 | Renderer: this.options.Renderer,
|
2626 | index: index
|
2627 | }));
|
2628 | this.plugins.onProcessSheet(sheet);
|
2629 | return sheet;
|
2630 | }
|
2631 | |
2632 |
|
2633 |
|
2634 | ;
|
2635 |
|
2636 | _proto.removeStyleSheet = function removeStyleSheet(sheet) {
|
2637 | sheet.detach();
|
2638 | sheets.remove(sheet);
|
2639 | return this;
|
2640 | }
|
2641 | |
2642 |
|
2643 |
|
2644 |
|
2645 | ;
|
2646 |
|
2647 | _proto.createRule = function createRule$1(name, style, options) {
|
2648 | if (style === void 0) {
|
2649 | style = {};
|
2650 | }
|
2651 |
|
2652 | if (options === void 0) {
|
2653 | options = {};
|
2654 | }
|
2655 |
|
2656 |
|
2657 | if (typeof name === 'object') {
|
2658 | return this.createRule(undefined, name, style);
|
2659 | }
|
2660 |
|
2661 | var ruleOptions = Object(esm_extends["a" ])({}, options, {
|
2662 | name: name,
|
2663 | jss: this,
|
2664 | Renderer: this.options.Renderer
|
2665 | });
|
2666 |
|
2667 | if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId;
|
2668 | if (!ruleOptions.classes) ruleOptions.classes = {};
|
2669 | if (!ruleOptions.keyframes) ruleOptions.keyframes = {};
|
2670 |
|
2671 | var rule = createRule(name, style, ruleOptions);
|
2672 |
|
2673 | if (rule) this.plugins.onProcessRule(rule);
|
2674 | return rule;
|
2675 | }
|
2676 | |
2677 |
|
2678 |
|
2679 | ;
|
2680 |
|
2681 | _proto.use = function use() {
|
2682 | var _this = this;
|
2683 |
|
2684 | for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
|
2685 | plugins[_key] = arguments[_key];
|
2686 | }
|
2687 |
|
2688 | plugins.forEach(function (plugin) {
|
2689 | _this.plugins.use(plugin);
|
2690 | });
|
2691 | return this;
|
2692 | };
|
2693 |
|
2694 | return Jss;
|
2695 | }();
|
2696 |
|
2697 |
|
2698 |
|
2699 |
|
2700 | function getDynamicStyles(styles) {
|
2701 | var to = null;
|
2702 |
|
2703 | for (var key in styles) {
|
2704 | var value = styles[key];
|
2705 | var type = typeof value;
|
2706 |
|
2707 | if (type === 'function') {
|
2708 | if (!to) to = {};
|
2709 | to[key] = value;
|
2710 | } else if (type === 'object' && value !== null && !Array.isArray(value)) {
|
2711 | var extracted = getDynamicStyles(value);
|
2712 |
|
2713 | if (extracted) {
|
2714 | if (!to) to = {};
|
2715 | to[key] = extracted;
|
2716 | }
|
2717 | }
|
2718 | }
|
2719 |
|
2720 | return to;
|
2721 | }
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 |
|
2727 | var jss_esm_SheetsManager =
|
2728 |
|
2729 | function () {
|
2730 | function SheetsManager() {
|
2731 | this.length = 0;
|
2732 | this.sheets = new WeakMap();
|
2733 | }
|
2734 |
|
2735 | var _proto = SheetsManager.prototype;
|
2736 |
|
2737 | _proto.get = function get(key) {
|
2738 | var entry = this.sheets.get(key);
|
2739 | return entry && entry.sheet;
|
2740 | };
|
2741 |
|
2742 | _proto.add = function add(key, sheet) {
|
2743 | if (this.sheets.has(key)) return;
|
2744 | this.length++;
|
2745 | this.sheets.set(key, {
|
2746 | sheet: sheet,
|
2747 | refs: 0
|
2748 | });
|
2749 | };
|
2750 |
|
2751 | _proto.manage = function manage(key) {
|
2752 | var entry = this.sheets.get(key);
|
2753 |
|
2754 | if (entry) {
|
2755 | if (entry.refs === 0) {
|
2756 | entry.sheet.attach();
|
2757 | }
|
2758 |
|
2759 | entry.refs++;
|
2760 | return entry.sheet;
|
2761 | }
|
2762 |
|
2763 | tiny_warning_esm(false, "[JSS] SheetsManager: can't find sheet to manage");
|
2764 | return undefined;
|
2765 | };
|
2766 |
|
2767 | _proto.unmanage = function unmanage(key) {
|
2768 | var entry = this.sheets.get(key);
|
2769 |
|
2770 | if (entry) {
|
2771 | if (entry.refs > 0) {
|
2772 | entry.refs--;
|
2773 | if (entry.refs === 0) entry.sheet.detach();
|
2774 | }
|
2775 | } else {
|
2776 | tiny_warning_esm(false, "SheetsManager: can't find sheet to unmanage");
|
2777 | }
|
2778 | };
|
2779 |
|
2780 | _createClass(SheetsManager, [{
|
2781 | key: "size",
|
2782 | get: function get() {
|
2783 | return this.length;
|
2784 | }
|
2785 | }]);
|
2786 |
|
2787 | return SheetsManager;
|
2788 | }();
|
2789 |
|
2790 |
|
2791 |
|
2792 |
|
2793 |
|
2794 |
|
2795 |
|
2796 |
|
2797 |
|
2798 |
|
2799 |
|
2800 |
|
2801 |
|
2802 | var hasCSSTOMSupport = typeof CSS !== 'undefined' && CSS && 'number' in CSS;
|
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 | var jss_esm_create = function create(options) {
|
2808 | return new jss_esm_Jss(options);
|
2809 | };
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 | var jss_esm_index = jss_esm_create();
|
2815 |
|
2816 | var jss_esm = (jss_esm_index);
|
2817 |
|
2818 |
|
2819 |
|
2820 |
|
2821 |
|
2822 | function mergeClasses() {
|
2823 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
2824 | var baseClasses = options.baseClasses,
|
2825 | newClasses = options.newClasses,
|
2826 | Component = options.Component;
|
2827 |
|
2828 | if (!newClasses) {
|
2829 | return baseClasses;
|
2830 | }
|
2831 |
|
2832 | var nextClasses = Object(esm_extends["a" ])({}, baseClasses);
|
2833 |
|
2834 | if (false) {}
|
2835 |
|
2836 | Object.keys(newClasses).forEach(function (key) {
|
2837 | if (false) {}
|
2838 |
|
2839 | if (newClasses[key]) {
|
2840 | nextClasses[key] = "".concat(baseClasses[key], " ").concat(newClasses[key]);
|
2841 | }
|
2842 | });
|
2843 | return nextClasses;
|
2844 | }
|
2845 |
|
2846 |
|
2847 | var multiKeyStore = {
|
2848 | set: function set(cache, key1, key2, value) {
|
2849 | var subCache = cache.get(key1);
|
2850 |
|
2851 | if (!subCache) {
|
2852 | subCache = new Map();
|
2853 | cache.set(key1, subCache);
|
2854 | }
|
2855 |
|
2856 | subCache.set(key2, value);
|
2857 | },
|
2858 | get: function get(cache, key1, key2) {
|
2859 | var subCache = cache.get(key1);
|
2860 | return subCache ? subCache.get(key2) : undefined;
|
2861 | },
|
2862 | delete: function _delete(cache, key1, key2) {
|
2863 | var subCache = cache.get(key1);
|
2864 | subCache.delete(key2);
|
2865 | }
|
2866 | };
|
2867 | var makeStyles_multiKeyStore = (multiKeyStore);
|
2868 |
|
2869 | var useTheme = __webpack_require__(216);
|
2870 |
|
2871 |
|
2872 | var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
2873 | var nested = (hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__');
|
2874 |
|
2875 |
|
2876 |
|
2877 |
|
2878 |
|
2879 |
|
2880 |
|
2881 |
|
2882 |
|
2883 |
|
2884 |
|
2885 |
|
2886 | var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];
|
2887 |
|
2888 |
|
2889 |
|
2890 |
|
2891 |
|
2892 |
|
2893 | function createGenerateClassName() {
|
2894 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
2895 | var _options$disableGloba = options.disableGlobal,
|
2896 | disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,
|
2897 | _options$productionPr = options.productionPrefix,
|
2898 | productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,
|
2899 | _options$seed = options.seed,
|
2900 | seed = _options$seed === void 0 ? '' : _options$seed;
|
2901 | var seedPrefix = seed === '' ? '' : "".concat(seed, "-");
|
2902 | var ruleCounter = 0;
|
2903 |
|
2904 | var getNextCounterId = function getNextCounterId() {
|
2905 | ruleCounter += 1;
|
2906 |
|
2907 | if (false) {}
|
2908 |
|
2909 | return ruleCounter;
|
2910 | };
|
2911 |
|
2912 | return function (rule, styleSheet) {
|
2913 | var name = styleSheet.options.name;
|
2914 |
|
2915 | if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {
|
2916 |
|
2917 | if (pseudoClasses.indexOf(rule.key) !== -1) {
|
2918 | return "Mui-".concat(rule.key);
|
2919 | }
|
2920 |
|
2921 | var prefix = "".concat(seedPrefix).concat(name, "-").concat(rule.key);
|
2922 |
|
2923 | if (!styleSheet.options.theme[nested] || seed !== '') {
|
2924 | return prefix;
|
2925 | }
|
2926 |
|
2927 | return "".concat(prefix, "-").concat(getNextCounterId());
|
2928 | }
|
2929 |
|
2930 | if (true) {
|
2931 | return "".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId());
|
2932 | }
|
2933 |
|
2934 | var suffix = "".concat(rule.key, "-").concat(getNextCounterId());
|
2935 |
|
2936 | if (styleSheet.options.classNamePrefix) {
|
2937 | return "".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, "-").concat(suffix);
|
2938 | }
|
2939 |
|
2940 | return "".concat(seedPrefix).concat(suffix);
|
2941 | };
|
2942 | }
|
2943 |
|
2944 |
|
2945 |
|
2946 |
|
2947 | var now = Date.now();
|
2948 | var fnValuesNs = "fnValues" + now;
|
2949 | var fnRuleNs = "fnStyle" + ++now;
|
2950 | function functionPlugin() {
|
2951 | return {
|
2952 | onCreateRule: function onCreateRule(name, decl, options) {
|
2953 | if (typeof decl !== 'function') return null;
|
2954 | var rule = createRule(name, {}, options);
|
2955 | rule[fnRuleNs] = decl;
|
2956 | return rule;
|
2957 | },
|
2958 | onProcessStyle: function onProcessStyle(style, rule) {
|
2959 |
|
2960 |
|
2961 |
|
2962 |
|
2963 | if (fnValuesNs in rule || fnRuleNs in rule) return style;
|
2964 | var fnValues = {};
|
2965 |
|
2966 | for (var prop in style) {
|
2967 | var value = style[prop];
|
2968 | if (typeof value !== 'function') continue;
|
2969 | delete style[prop];
|
2970 | fnValues[prop] = value;
|
2971 | }
|
2972 |
|
2973 |
|
2974 | rule[fnValuesNs] = fnValues;
|
2975 | return style;
|
2976 | },
|
2977 | onUpdate: function onUpdate(data, rule, sheet, options) {
|
2978 | var styleRule = rule;
|
2979 | var fnRule = styleRule[fnRuleNs];
|
2980 |
|
2981 |
|
2982 | if (fnRule) {
|
2983 |
|
2984 |
|
2985 | styleRule.style = fnRule(data) || {};
|
2986 |
|
2987 | if (false) { var prop; }
|
2988 | }
|
2989 |
|
2990 | var fnValues = styleRule[fnValuesNs];
|
2991 |
|
2992 | if (fnValues) {
|
2993 | for (var _prop in fnValues) {
|
2994 | styleRule.prop(_prop, fnValues[_prop](data), options);
|
2995 | }
|
2996 | }
|
2997 | }
|
2998 | };
|
2999 | }
|
3000 |
|
3001 | var jss_plugin_rule_value_function_esm = (functionPlugin);
|
3002 |
|
3003 |
|
3004 |
|
3005 |
|
3006 |
|
3007 | var at = '@global';
|
3008 | var atPrefix = '@global ';
|
3009 |
|
3010 | var jss_plugin_global_esm_GlobalContainerRule =
|
3011 |
|
3012 | function () {
|
3013 | function GlobalContainerRule(key, styles, options) {
|
3014 | this.type = 'global';
|
3015 | this.at = at;
|
3016 | this.rules = void 0;
|
3017 | this.options = void 0;
|
3018 | this.key = void 0;
|
3019 | this.isProcessed = false;
|
3020 | this.key = key;
|
3021 | this.options = options;
|
3022 | this.rules = new jss_esm_RuleList(Object(esm_extends["a" ])({}, options, {
|
3023 | parent: this
|
3024 | }));
|
3025 |
|
3026 | for (var selector in styles) {
|
3027 | this.rules.add(selector, styles[selector]);
|
3028 | }
|
3029 |
|
3030 | this.rules.process();
|
3031 | }
|
3032 | |
3033 |
|
3034 |
|
3035 |
|
3036 |
|
3037 | var _proto = GlobalContainerRule.prototype;
|
3038 |
|
3039 | _proto.getRule = function getRule(name) {
|
3040 | return this.rules.get(name);
|
3041 | }
|
3042 | |
3043 |
|
3044 |
|
3045 | ;
|
3046 |
|
3047 | _proto.addRule = function addRule(name, style, options) {
|
3048 | var rule = this.rules.add(name, style, options);
|
3049 | this.options.jss.plugins.onProcessRule(rule);
|
3050 | return rule;
|
3051 | }
|
3052 | |
3053 |
|
3054 |
|
3055 | ;
|
3056 |
|
3057 | _proto.indexOf = function indexOf(rule) {
|
3058 | return this.rules.indexOf(rule);
|
3059 | }
|
3060 | |
3061 |
|
3062 |
|
3063 | ;
|
3064 |
|
3065 | _proto.toString = function toString() {
|
3066 | return this.rules.toString();
|
3067 | };
|
3068 |
|
3069 | return GlobalContainerRule;
|
3070 | }();
|
3071 |
|
3072 | var jss_plugin_global_esm_GlobalPrefixedRule =
|
3073 |
|
3074 | function () {
|
3075 | function GlobalPrefixedRule(key, style, options) {
|
3076 | this.type = 'global';
|
3077 | this.at = at;
|
3078 | this.options = void 0;
|
3079 | this.rule = void 0;
|
3080 | this.isProcessed = false;
|
3081 | this.key = void 0;
|
3082 | this.key = key;
|
3083 | this.options = options;
|
3084 | var selector = key.substr(atPrefix.length);
|
3085 | this.rule = options.jss.createRule(selector, style, Object(esm_extends["a" ])({}, options, {
|
3086 | parent: this
|
3087 | }));
|
3088 | }
|
3089 |
|
3090 | var _proto2 = GlobalPrefixedRule.prototype;
|
3091 |
|
3092 | _proto2.toString = function toString(options) {
|
3093 | return this.rule ? this.rule.toString(options) : '';
|
3094 | };
|
3095 |
|
3096 | return GlobalPrefixedRule;
|
3097 | }();
|
3098 |
|
3099 | var separatorRegExp = /\s*,\s*/g;
|
3100 |
|
3101 | function addScope(selector, scope) {
|
3102 | var parts = selector.split(separatorRegExp);
|
3103 | var scoped = '';
|
3104 |
|
3105 | for (var i = 0; i < parts.length; i++) {
|
3106 | scoped += scope + " " + parts[i].trim();
|
3107 | if (parts[i + 1]) scoped += ', ';
|
3108 | }
|
3109 |
|
3110 | return scoped;
|
3111 | }
|
3112 |
|
3113 | function handleNestedGlobalContainerRule(rule) {
|
3114 | var options = rule.options,
|
3115 | style = rule.style;
|
3116 | var rules = style ? style[at] : null;
|
3117 | if (!rules) return;
|
3118 |
|
3119 | for (var name in rules) {
|
3120 | options.sheet.addRule(name, rules[name], Object(esm_extends["a" ])({}, options, {
|
3121 | selector: addScope(name, rule.selector)
|
3122 | }));
|
3123 | }
|
3124 |
|
3125 | delete style[at];
|
3126 | }
|
3127 |
|
3128 | function handlePrefixedGlobalRule(rule) {
|
3129 | var options = rule.options,
|
3130 | style = rule.style;
|
3131 |
|
3132 | for (var prop in style) {
|
3133 | if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;
|
3134 | var selector = addScope(prop.substr(at.length), rule.selector);
|
3135 | options.sheet.addRule(selector, style[prop], Object(esm_extends["a" ])({}, options, {
|
3136 | selector: selector
|
3137 | }));
|
3138 | delete style[prop];
|
3139 | }
|
3140 | }
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 |
|
3147 |
|
3148 |
|
3149 | function jssGlobal() {
|
3150 | function onCreateRule(name, styles, options) {
|
3151 | if (!name) return null;
|
3152 |
|
3153 | if (name === at) {
|
3154 | return new jss_plugin_global_esm_GlobalContainerRule(name, styles, options);
|
3155 | }
|
3156 |
|
3157 | if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {
|
3158 | return new jss_plugin_global_esm_GlobalPrefixedRule(name, styles, options);
|
3159 | }
|
3160 |
|
3161 | var parent = options.parent;
|
3162 |
|
3163 | if (parent) {
|
3164 | if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {
|
3165 | options.scoped = false;
|
3166 | }
|
3167 | }
|
3168 |
|
3169 | if (options.scoped === false) {
|
3170 | options.selector = name;
|
3171 | }
|
3172 |
|
3173 | return null;
|
3174 | }
|
3175 |
|
3176 | function onProcessRule(rule) {
|
3177 | if (rule.type !== 'style') return;
|
3178 | handleNestedGlobalContainerRule(rule);
|
3179 | handlePrefixedGlobalRule(rule);
|
3180 | }
|
3181 |
|
3182 | return {
|
3183 | onCreateRule: onCreateRule,
|
3184 | onProcessRule: onProcessRule
|
3185 | };
|
3186 | }
|
3187 |
|
3188 | var jss_plugin_global_esm = (jssGlobal);
|
3189 |
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 | var jss_plugin_nested_esm_separatorRegExp = /\s*,\s*/g;
|
3195 | var parentRegExp = /&/g;
|
3196 | var jss_plugin_nested_esm_refRegExp = /\$([\w-]+)/g;
|
3197 |
|
3198 |
|
3199 |
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 | function jssNested() {
|
3205 |
|
3206 | function getReplaceRef(container, sheet) {
|
3207 | return function (match, key) {
|
3208 | var rule = container.getRule(key) || sheet && sheet.getRule(key);
|
3209 |
|
3210 | if (rule) {
|
3211 | rule = rule;
|
3212 | return rule.selector;
|
3213 | }
|
3214 |
|
3215 | false ? undefined : void 0;
|
3216 | return key;
|
3217 | };
|
3218 | }
|
3219 |
|
3220 | function replaceParentRefs(nestedProp, parentProp) {
|
3221 | var parentSelectors = parentProp.split(jss_plugin_nested_esm_separatorRegExp);
|
3222 | var nestedSelectors = nestedProp.split(jss_plugin_nested_esm_separatorRegExp);
|
3223 | var result = '';
|
3224 |
|
3225 | for (var i = 0; i < parentSelectors.length; i++) {
|
3226 | var parent = parentSelectors[i];
|
3227 |
|
3228 | for (var j = 0; j < nestedSelectors.length; j++) {
|
3229 | var nested = nestedSelectors[j];
|
3230 | if (result) result += ', ';
|
3231 |
|
3232 | result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + " " + nested;
|
3233 | }
|
3234 | }
|
3235 |
|
3236 | return result;
|
3237 | }
|
3238 |
|
3239 | function getOptions(rule, container, prevOptions) {
|
3240 |
|
3241 | if (prevOptions) return Object(esm_extends["a" ])({}, prevOptions, {
|
3242 | index: prevOptions.index + 1
|
3243 | });
|
3244 | var nestingLevel = rule.options.nestingLevel;
|
3245 | nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;
|
3246 |
|
3247 | var options = Object(esm_extends["a" ])({}, rule.options, {
|
3248 | nestingLevel: nestingLevel,
|
3249 | index: container.indexOf(rule) + 1
|
3250 |
|
3251 | });
|
3252 |
|
3253 | delete options.name;
|
3254 | return options;
|
3255 | }
|
3256 |
|
3257 | function onProcessStyle(style, rule, sheet) {
|
3258 | if (rule.type !== 'style') return style;
|
3259 | var styleRule = rule;
|
3260 | var container = styleRule.options.parent;
|
3261 | var options;
|
3262 | var replaceRef;
|
3263 |
|
3264 | for (var prop in style) {
|
3265 | var isNested = prop.indexOf('&') !== -1;
|
3266 | var isNestedConditional = prop[0] === '@';
|
3267 | if (!isNested && !isNestedConditional) continue;
|
3268 | options = getOptions(styleRule, container, options);
|
3269 |
|
3270 | if (isNested) {
|
3271 | var selector = replaceParentRefs(prop, styleRule.selector);
|
3272 |
|
3273 |
|
3274 | if (!replaceRef) replaceRef = getReplaceRef(container, sheet);
|
3275 |
|
3276 | selector = selector.replace(jss_plugin_nested_esm_refRegExp, replaceRef);
|
3277 | container.addRule(selector, style[prop], Object(esm_extends["a" ])({}, options, {
|
3278 | selector: selector
|
3279 | }));
|
3280 | } else if (isNestedConditional) {
|
3281 |
|
3282 | container.addRule(prop, {}, options)
|
3283 |
|
3284 |
|
3285 | .addRule(styleRule.key, style[prop], {
|
3286 | selector: styleRule.selector
|
3287 | });
|
3288 | }
|
3289 |
|
3290 | delete style[prop];
|
3291 | }
|
3292 |
|
3293 | return style;
|
3294 | }
|
3295 |
|
3296 | return {
|
3297 | onProcessStyle: onProcessStyle
|
3298 | };
|
3299 | }
|
3300 |
|
3301 | var jss_plugin_nested_esm = (jssNested);
|
3302 |
|
3303 |
|
3304 |
|
3305 | var uppercasePattern = /[A-Z]/g
|
3306 | var msPattern = /^ms-/
|
3307 | var cache = {}
|
3308 |
|
3309 | function toHyphenLower(match) {
|
3310 | return '-' + match.toLowerCase()
|
3311 | }
|
3312 |
|
3313 | function hyphenateStyleName(name) {
|
3314 | if (cache.hasOwnProperty(name)) {
|
3315 | return cache[name]
|
3316 | }
|
3317 |
|
3318 | var hName = name.replace(uppercasePattern, toHyphenLower)
|
3319 | return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)
|
3320 | }
|
3321 |
|
3322 | var hyphenate_style_name = (hyphenateStyleName);
|
3323 |
|
3324 |
|
3325 |
|
3326 |
|
3327 |
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 |
|
3333 |
|
3334 | function convertCase(style) {
|
3335 | var converted = {};
|
3336 |
|
3337 | for (var prop in style) {
|
3338 | var key = prop.indexOf('--') === 0 ? prop : hyphenate_style_name(prop);
|
3339 | converted[key] = style[prop];
|
3340 | }
|
3341 |
|
3342 | if (style.fallbacks) {
|
3343 | if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);
|
3344 | }
|
3345 |
|
3346 | return converted;
|
3347 | }
|
3348 |
|
3349 |
|
3350 |
|
3351 |
|
3352 |
|
3353 |
|
3354 |
|
3355 | function camelCase() {
|
3356 | function onProcessStyle(style) {
|
3357 | if (Array.isArray(style)) {
|
3358 |
|
3359 | for (var index = 0; index < style.length; index++) {
|
3360 | style[index] = convertCase(style[index]);
|
3361 | }
|
3362 |
|
3363 | return style;
|
3364 | }
|
3365 |
|
3366 | return convertCase(style);
|
3367 | }
|
3368 |
|
3369 | function onChangeValue(value, prop, rule) {
|
3370 | if (prop.indexOf('--') === 0) {
|
3371 | return value;
|
3372 | }
|
3373 |
|
3374 | var hyphenatedProp = hyphenate_style_name(prop);
|
3375 |
|
3376 | if (prop === hyphenatedProp) return value;
|
3377 | rule.prop(hyphenatedProp, value);
|
3378 |
|
3379 | return null;
|
3380 | }
|
3381 |
|
3382 | return {
|
3383 | onProcessStyle: onProcessStyle,
|
3384 | onChangeValue: onChangeValue
|
3385 | };
|
3386 | }
|
3387 |
|
3388 | var jss_plugin_camel_case_esm = (camelCase);
|
3389 |
|
3390 |
|
3391 |
|
3392 |
|
3393 | var px = hasCSSTOMSupport && CSS ? CSS.px : 'px';
|
3394 | var ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';
|
3395 | var percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';
|
3396 |
|
3397 |
|
3398 |
|
3399 |
|
3400 |
|
3401 |
|
3402 | var defaultUnits = {
|
3403 |
|
3404 | 'animation-delay': ms,
|
3405 | 'animation-duration': ms,
|
3406 |
|
3407 | 'background-position': px,
|
3408 | 'background-position-x': px,
|
3409 | 'background-position-y': px,
|
3410 | 'background-size': px,
|
3411 |
|
3412 | border: px,
|
3413 | 'border-bottom': px,
|
3414 | 'border-bottom-left-radius': px,
|
3415 | 'border-bottom-right-radius': px,
|
3416 | 'border-bottom-width': px,
|
3417 | 'border-left': px,
|
3418 | 'border-left-width': px,
|
3419 | 'border-radius': px,
|
3420 | 'border-right': px,
|
3421 | 'border-right-width': px,
|
3422 | 'border-top': px,
|
3423 | 'border-top-left-radius': px,
|
3424 | 'border-top-right-radius': px,
|
3425 | 'border-top-width': px,
|
3426 | 'border-width': px,
|
3427 |
|
3428 | margin: px,
|
3429 | 'margin-bottom': px,
|
3430 | 'margin-left': px,
|
3431 | 'margin-right': px,
|
3432 | 'margin-top': px,
|
3433 |
|
3434 | padding: px,
|
3435 | 'padding-bottom': px,
|
3436 | 'padding-left': px,
|
3437 | 'padding-right': px,
|
3438 | 'padding-top': px,
|
3439 |
|
3440 | 'mask-position-x': px,
|
3441 | 'mask-position-y': px,
|
3442 | 'mask-size': px,
|
3443 |
|
3444 | height: px,
|
3445 | width: px,
|
3446 | 'min-height': px,
|
3447 | 'max-height': px,
|
3448 | 'min-width': px,
|
3449 | 'max-width': px,
|
3450 |
|
3451 | bottom: px,
|
3452 | left: px,
|
3453 | top: px,
|
3454 | right: px,
|
3455 |
|
3456 | 'box-shadow': px,
|
3457 | 'text-shadow': px,
|
3458 |
|
3459 | 'column-gap': px,
|
3460 | 'column-rule': px,
|
3461 | 'column-rule-width': px,
|
3462 | 'column-width': px,
|
3463 |
|
3464 | 'font-size': px,
|
3465 | 'font-size-delta': px,
|
3466 | 'letter-spacing': px,
|
3467 | 'text-indent': px,
|
3468 | 'text-stroke': px,
|
3469 | 'text-stroke-width': px,
|
3470 | 'word-spacing': px,
|
3471 |
|
3472 | motion: px,
|
3473 | 'motion-offset': px,
|
3474 |
|
3475 | outline: px,
|
3476 | 'outline-offset': px,
|
3477 | 'outline-width': px,
|
3478 |
|
3479 | perspective: px,
|
3480 | 'perspective-origin-x': percent,
|
3481 | 'perspective-origin-y': percent,
|
3482 |
|
3483 | 'transform-origin': percent,
|
3484 | 'transform-origin-x': percent,
|
3485 | 'transform-origin-y': percent,
|
3486 | 'transform-origin-z': percent,
|
3487 |
|
3488 | 'transition-delay': ms,
|
3489 | 'transition-duration': ms,
|
3490 |
|
3491 | 'vertical-align': px,
|
3492 | 'flex-basis': px,
|
3493 |
|
3494 | 'shape-margin': px,
|
3495 | size: px,
|
3496 |
|
3497 | grid: px,
|
3498 | 'grid-gap': px,
|
3499 | 'grid-row-gap': px,
|
3500 | 'grid-column-gap': px,
|
3501 | 'grid-template-rows': px,
|
3502 | 'grid-template-columns': px,
|
3503 | 'grid-auto-rows': px,
|
3504 | 'grid-auto-columns': px,
|
3505 |
|
3506 |
|
3507 | 'box-shadow-x': px,
|
3508 | 'box-shadow-y': px,
|
3509 | 'box-shadow-blur': px,
|
3510 | 'box-shadow-spread': px,
|
3511 | 'font-line-height': px,
|
3512 | 'text-shadow-x': px,
|
3513 | 'text-shadow-y': px,
|
3514 | 'text-shadow-blur': px
|
3515 | };
|
3516 |
|
3517 |
|
3518 |
|
3519 |
|
3520 | function addCamelCasedVersion(obj) {
|
3521 | var regExp = /(-[a-z])/g;
|
3522 |
|
3523 | var replace = function replace(str) {
|
3524 | return str[1].toUpperCase();
|
3525 | };
|
3526 |
|
3527 | var newObj = {};
|
3528 |
|
3529 | for (var _key in obj) {
|
3530 | newObj[_key] = obj[_key];
|
3531 | newObj[_key.replace(regExp, replace)] = obj[_key];
|
3532 | }
|
3533 |
|
3534 | return newObj;
|
3535 | }
|
3536 |
|
3537 | var units = addCamelCasedVersion(defaultUnits);
|
3538 |
|
3539 |
|
3540 |
|
3541 |
|
3542 | function iterate(prop, value, options) {
|
3543 | if (!value) return value;
|
3544 |
|
3545 | if (Array.isArray(value)) {
|
3546 | for (var i = 0; i < value.length; i++) {
|
3547 | value[i] = iterate(prop, value[i], options);
|
3548 | }
|
3549 | } else if (typeof value === 'object') {
|
3550 | if (prop === 'fallbacks') {
|
3551 | for (var innerProp in value) {
|
3552 | value[innerProp] = iterate(innerProp, value[innerProp], options);
|
3553 | }
|
3554 | } else {
|
3555 | for (var _innerProp in value) {
|
3556 | value[_innerProp] = iterate(prop + "-" + _innerProp, value[_innerProp], options);
|
3557 | }
|
3558 | }
|
3559 | } else if (typeof value === 'number') {
|
3560 | var unit = options[prop] || units[prop];
|
3561 |
|
3562 | if (unit) {
|
3563 | return typeof unit === 'function' ? unit(value).toString() : "" + value + unit;
|
3564 | }
|
3565 |
|
3566 | return value.toString();
|
3567 | }
|
3568 |
|
3569 | return value;
|
3570 | }
|
3571 |
|
3572 |
|
3573 |
|
3574 |
|
3575 |
|
3576 | function defaultUnit(options) {
|
3577 | if (options === void 0) {
|
3578 | options = {};
|
3579 | }
|
3580 |
|
3581 | var camelCasedOptions = addCamelCasedVersion(options);
|
3582 |
|
3583 | function onProcessStyle(style, rule) {
|
3584 | if (rule.type !== 'style') return style;
|
3585 |
|
3586 | for (var prop in style) {
|
3587 | style[prop] = iterate(prop, style[prop], camelCasedOptions);
|
3588 | }
|
3589 |
|
3590 | return style;
|
3591 | }
|
3592 |
|
3593 | function onChangeValue(value, prop) {
|
3594 | return iterate(prop, value, camelCasedOptions);
|
3595 | }
|
3596 |
|
3597 | return {
|
3598 | onProcessStyle: onProcessStyle,
|
3599 | onChangeValue: onChangeValue
|
3600 | };
|
3601 | }
|
3602 |
|
3603 | var jss_plugin_default_unit_esm = (defaultUnit);
|
3604 |
|
3605 |
|
3606 | var toConsumableArray = __webpack_require__(20);
|
3607 |
|
3608 |
|
3609 |
|
3610 |
|
3611 |
|
3612 |
|
3613 | var js = '';
|
3614 | var css_vendor_esm_css = '';
|
3615 | var vendor = '';
|
3616 | var browser = '';
|
3617 | var isTouch = dist_module && 'ontouchstart' in document.documentElement;
|
3618 |
|
3619 | if (dist_module) {
|
3620 |
|
3621 |
|
3622 | var jsCssMap = {
|
3623 | Moz: '-moz-',
|
3624 | ms: '-ms-',
|
3625 | O: '-o-',
|
3626 | Webkit: '-webkit-'
|
3627 | };
|
3628 |
|
3629 | var _document$createEleme = document.createElement('p'),
|
3630 | css_vendor_esm_style = _document$createEleme.style;
|
3631 |
|
3632 | var testProp = 'Transform';
|
3633 |
|
3634 | for (var css_vendor_esm_key in jsCssMap) {
|
3635 | if (css_vendor_esm_key + testProp in css_vendor_esm_style) {
|
3636 | js = css_vendor_esm_key;
|
3637 | css_vendor_esm_css = jsCssMap[css_vendor_esm_key];
|
3638 | break;
|
3639 | }
|
3640 | }
|
3641 |
|
3642 |
|
3643 | if (js === 'Webkit' && 'msHyphens' in css_vendor_esm_style) {
|
3644 | js = 'ms';
|
3645 | css_vendor_esm_css = jsCssMap.ms;
|
3646 | browser = 'edge';
|
3647 | }
|
3648 |
|
3649 |
|
3650 | if (js === 'Webkit' && '-apple-trailing-word' in css_vendor_esm_style) {
|
3651 | vendor = 'apple';
|
3652 | }
|
3653 | }
|
3654 |
|
3655 |
|
3656 |
|
3657 |
|
3658 |
|
3659 |
|
3660 |
|
3661 |
|
3662 | var css_vendor_esm_prefix = {
|
3663 | js: js,
|
3664 | css: css_vendor_esm_css,
|
3665 | vendor: vendor,
|
3666 | browser: browser,
|
3667 | isTouch: isTouch
|
3668 | };
|
3669 |
|
3670 |
|
3671 |
|
3672 |
|
3673 |
|
3674 |
|
3675 |
|
3676 |
|
3677 |
|
3678 | function supportedKeyframes(key) {
|
3679 |
|
3680 | if (key[1] === '-') return key;
|
3681 |
|
3682 |
|
3683 | if (css_vendor_esm_prefix.js === 'ms') return key;
|
3684 | return "@" + css_vendor_esm_prefix.css + "keyframes" + key.substr(10);
|
3685 | }
|
3686 |
|
3687 |
|
3688 |
|
3689 | var appearence = {
|
3690 | noPrefill: ['appearance'],
|
3691 | supportedProperty: function supportedProperty(prop) {
|
3692 | if (prop !== 'appearance') return false;
|
3693 | if (css_vendor_esm_prefix.js === 'ms') return "-webkit-" + prop;
|
3694 | return css_vendor_esm_prefix.css + prop;
|
3695 | }
|
3696 | };
|
3697 |
|
3698 |
|
3699 |
|
3700 | var colorAdjust = {
|
3701 | noPrefill: ['color-adjust'],
|
3702 | supportedProperty: function supportedProperty(prop) {
|
3703 | if (prop !== 'color-adjust') return false;
|
3704 | if (css_vendor_esm_prefix.js === 'Webkit') return css_vendor_esm_prefix.css + "print-" + prop;
|
3705 | return prop;
|
3706 | }
|
3707 | };
|
3708 |
|
3709 | var regExp = /[-\s]+(.)?/g;
|
3710 |
|
3711 |
|
3712 |
|
3713 |
|
3714 |
|
3715 |
|
3716 |
|
3717 |
|
3718 |
|
3719 | function toUpper(match, c) {
|
3720 | return c ? c.toUpperCase() : '';
|
3721 | }
|
3722 |
|
3723 |
|
3724 |
|
3725 |
|
3726 |
|
3727 |
|
3728 |
|
3729 |
|
3730 |
|
3731 | function camelize(str) {
|
3732 | return str.replace(regExp, toUpper);
|
3733 | }
|
3734 |
|
3735 |
|
3736 |
|
3737 |
|
3738 |
|
3739 |
|
3740 |
|
3741 |
|
3742 |
|
3743 | function pascalize(str) {
|
3744 | return camelize("-" + str);
|
3745 | }
|
3746 |
|
3747 |
|
3748 |
|
3749 |
|
3750 | var mask = {
|
3751 | noPrefill: ['mask'],
|
3752 | supportedProperty: function supportedProperty(prop, style) {
|
3753 | if (!/^mask/.test(prop)) return false;
|
3754 |
|
3755 | if (css_vendor_esm_prefix.js === 'Webkit') {
|
3756 | var longhand = 'mask-image';
|
3757 |
|
3758 | if (camelize(longhand) in style) {
|
3759 | return prop;
|
3760 | }
|
3761 |
|
3762 | if (css_vendor_esm_prefix.js + pascalize(longhand) in style) {
|
3763 | return css_vendor_esm_prefix.css + prop;
|
3764 | }
|
3765 | }
|
3766 |
|
3767 | return prop;
|
3768 | }
|
3769 | };
|
3770 |
|
3771 |
|
3772 |
|
3773 | var textOrientation = {
|
3774 | noPrefill: ['text-orientation'],
|
3775 | supportedProperty: function supportedProperty(prop) {
|
3776 | if (prop !== 'text-orientation') return false;
|
3777 |
|
3778 | if (css_vendor_esm_prefix.vendor === 'apple' && !css_vendor_esm_prefix.isTouch) {
|
3779 | return css_vendor_esm_prefix.css + prop;
|
3780 | }
|
3781 |
|
3782 | return prop;
|
3783 | }
|
3784 | };
|
3785 |
|
3786 |
|
3787 |
|
3788 | var transform = {
|
3789 | noPrefill: ['transform'],
|
3790 | supportedProperty: function supportedProperty(prop, style, options) {
|
3791 | if (prop !== 'transform') return false;
|
3792 |
|
3793 | if (options.transform) {
|
3794 | return prop;
|
3795 | }
|
3796 |
|
3797 | return css_vendor_esm_prefix.css + prop;
|
3798 | }
|
3799 | };
|
3800 |
|
3801 |
|
3802 |
|
3803 | var transition = {
|
3804 | noPrefill: ['transition'],
|
3805 | supportedProperty: function supportedProperty(prop, style, options) {
|
3806 | if (prop !== 'transition') return false;
|
3807 |
|
3808 | if (options.transition) {
|
3809 | return prop;
|
3810 | }
|
3811 |
|
3812 | return css_vendor_esm_prefix.css + prop;
|
3813 | }
|
3814 | };
|
3815 |
|
3816 |
|
3817 |
|
3818 | var writingMode = {
|
3819 | noPrefill: ['writing-mode'],
|
3820 | supportedProperty: function supportedProperty(prop) {
|
3821 | if (prop !== 'writing-mode') return false;
|
3822 |
|
3823 | if (css_vendor_esm_prefix.js === 'Webkit' || css_vendor_esm_prefix.js === 'ms' && css_vendor_esm_prefix.browser !== 'edge') {
|
3824 | return css_vendor_esm_prefix.css + prop;
|
3825 | }
|
3826 |
|
3827 | return prop;
|
3828 | }
|
3829 | };
|
3830 |
|
3831 |
|
3832 |
|
3833 | var userSelect = {
|
3834 | noPrefill: ['user-select'],
|
3835 | supportedProperty: function supportedProperty(prop) {
|
3836 | if (prop !== 'user-select') return false;
|
3837 |
|
3838 | if (css_vendor_esm_prefix.js === 'Moz' || css_vendor_esm_prefix.js === 'ms' || css_vendor_esm_prefix.vendor === 'apple') {
|
3839 | return css_vendor_esm_prefix.css + prop;
|
3840 | }
|
3841 |
|
3842 | return prop;
|
3843 | }
|
3844 | };
|
3845 |
|
3846 |
|
3847 |
|
3848 |
|
3849 |
|
3850 | var breakPropsOld = {
|
3851 | supportedProperty: function supportedProperty(prop, style) {
|
3852 | if (!/^break-/.test(prop)) return false;
|
3853 |
|
3854 | if (css_vendor_esm_prefix.js === 'Webkit') {
|
3855 | var jsProp = "WebkitColumn" + pascalize(prop);
|
3856 | return jsProp in style ? css_vendor_esm_prefix.css + "column-" + prop : false;
|
3857 | }
|
3858 |
|
3859 | if (css_vendor_esm_prefix.js === 'Moz') {
|
3860 | var _jsProp = "page" + pascalize(prop);
|
3861 |
|
3862 | return _jsProp in style ? "page-" + prop : false;
|
3863 | }
|
3864 |
|
3865 | return false;
|
3866 | }
|
3867 | };
|
3868 |
|
3869 |
|
3870 |
|
3871 | var inlineLogicalOld = {
|
3872 | supportedProperty: function supportedProperty(prop, style) {
|
3873 | if (!/^(border|margin|padding)-inline/.test(prop)) return false;
|
3874 | if (css_vendor_esm_prefix.js === 'Moz') return prop;
|
3875 | var newProp = prop.replace('-inline', '');
|
3876 | return css_vendor_esm_prefix.js + pascalize(newProp) in style ? css_vendor_esm_prefix.css + newProp : false;
|
3877 | }
|
3878 | };
|
3879 |
|
3880 |
|
3881 |
|
3882 |
|
3883 | var unprefixed = {
|
3884 | supportedProperty: function supportedProperty(prop, style) {
|
3885 | return camelize(prop) in style ? prop : false;
|
3886 | }
|
3887 | };
|
3888 |
|
3889 | var prefixed = {
|
3890 | supportedProperty: function supportedProperty(prop, style) {
|
3891 | var pascalized = pascalize(prop);
|
3892 |
|
3893 | if (prop[0] === '-') return prop;
|
3894 |
|
3895 | if (prop[0] === '-' && prop[1] === '-') return prop;
|
3896 | if (css_vendor_esm_prefix.js + pascalized in style) return css_vendor_esm_prefix.css + prop;
|
3897 |
|
3898 | if (css_vendor_esm_prefix.js !== 'Webkit' && "Webkit" + pascalized in style) return "-webkit-" + prop;
|
3899 | return false;
|
3900 | }
|
3901 | };
|
3902 |
|
3903 |
|
3904 |
|
3905 | var scrollSnap = {
|
3906 | supportedProperty: function supportedProperty(prop) {
|
3907 | if (prop.substring(0, 11) !== 'scroll-snap') return false;
|
3908 |
|
3909 | if (css_vendor_esm_prefix.js === 'ms') {
|
3910 | return "" + css_vendor_esm_prefix.css + prop;
|
3911 | }
|
3912 |
|
3913 | return prop;
|
3914 | }
|
3915 | };
|
3916 |
|
3917 |
|
3918 |
|
3919 | var overscrollBehavior = {
|
3920 | supportedProperty: function supportedProperty(prop) {
|
3921 | if (prop !== 'overscroll-behavior') return false;
|
3922 |
|
3923 | if (css_vendor_esm_prefix.js === 'ms') {
|
3924 | return css_vendor_esm_prefix.css + "scroll-chaining";
|
3925 | }
|
3926 |
|
3927 | return prop;
|
3928 | }
|
3929 | };
|
3930 |
|
3931 | var propMap = {
|
3932 | 'flex-grow': 'flex-positive',
|
3933 | 'flex-shrink': 'flex-negative',
|
3934 | 'flex-basis': 'flex-preferred-size',
|
3935 | 'justify-content': 'flex-pack',
|
3936 | order: 'flex-order',
|
3937 | 'align-items': 'flex-align',
|
3938 | 'align-content': 'flex-line-pack'
|
3939 |
|
3940 | };
|
3941 |
|
3942 | var flex2012 = {
|
3943 | supportedProperty: function supportedProperty(prop, style) {
|
3944 | var newProp = propMap[prop];
|
3945 | if (!newProp) return false;
|
3946 | return css_vendor_esm_prefix.js + pascalize(newProp) in style ? css_vendor_esm_prefix.css + newProp : false;
|
3947 | }
|
3948 | };
|
3949 |
|
3950 | var propMap$1 = {
|
3951 | flex: 'box-flex',
|
3952 | 'flex-grow': 'box-flex',
|
3953 | 'flex-direction': ['box-orient', 'box-direction'],
|
3954 | order: 'box-ordinal-group',
|
3955 | 'align-items': 'box-align',
|
3956 | 'flex-flow': ['box-orient', 'box-direction'],
|
3957 | 'justify-content': 'box-pack'
|
3958 | };
|
3959 | var propKeys = Object.keys(propMap$1);
|
3960 |
|
3961 | var prefixCss = function prefixCss(p) {
|
3962 | return css_vendor_esm_prefix.css + p;
|
3963 | };
|
3964 |
|
3965 |
|
3966 | var flex2009 = {
|
3967 | supportedProperty: function supportedProperty(prop, style, _ref) {
|
3968 | var multiple = _ref.multiple;
|
3969 |
|
3970 | if (propKeys.indexOf(prop) > -1) {
|
3971 | var newProp = propMap$1[prop];
|
3972 |
|
3973 | if (!Array.isArray(newProp)) {
|
3974 | return css_vendor_esm_prefix.js + pascalize(newProp) in style ? css_vendor_esm_prefix.css + newProp : false;
|
3975 | }
|
3976 |
|
3977 | if (!multiple) return false;
|
3978 |
|
3979 | for (var i = 0; i < newProp.length; i++) {
|
3980 | if (!(css_vendor_esm_prefix.js + pascalize(newProp[0]) in style)) {
|
3981 | return false;
|
3982 | }
|
3983 | }
|
3984 |
|
3985 | return newProp.map(prefixCss);
|
3986 | }
|
3987 |
|
3988 | return false;
|
3989 | }
|
3990 | };
|
3991 |
|
3992 |
|
3993 |
|
3994 |
|
3995 |
|
3996 |
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 |
|
4006 |
|
4007 | var css_vendor_esm_plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];
|
4008 | var propertyDetectors = css_vendor_esm_plugins.filter(function (p) {
|
4009 | return p.supportedProperty;
|
4010 | }).map(function (p) {
|
4011 | return p.supportedProperty;
|
4012 | });
|
4013 | var noPrefill = css_vendor_esm_plugins.filter(function (p) {
|
4014 | return p.noPrefill;
|
4015 | }).reduce(function (a, p) {
|
4016 | a.push.apply(a, Object(toConsumableArray["a" ])(p.noPrefill));
|
4017 | return a;
|
4018 | }, []);
|
4019 |
|
4020 | var el;
|
4021 | var css_vendor_esm_cache = {};
|
4022 |
|
4023 | if (dist_module) {
|
4024 | el = document.createElement('p');
|
4025 |
|
4026 |
|
4027 |
|
4028 |
|
4029 |
|
4030 |
|
4031 |
|
4032 | var computed = window.getComputedStyle(document.documentElement, '');
|
4033 |
|
4034 | for (var key$1 in computed) {
|
4035 |
|
4036 | if (!isNaN(key$1)) css_vendor_esm_cache[computed[key$1]] = computed[key$1];
|
4037 | }
|
4038 |
|
4039 |
|
4040 |
|
4041 | noPrefill.forEach(function (x) {
|
4042 | return delete css_vendor_esm_cache[x];
|
4043 | });
|
4044 | }
|
4045 |
|
4046 |
|
4047 |
|
4048 |
|
4049 |
|
4050 |
|
4051 |
|
4052 |
|
4053 |
|
4054 |
|
4055 |
|
4056 | function supportedProperty(prop, options) {
|
4057 | if (options === void 0) {
|
4058 | options = {};
|
4059 | }
|
4060 |
|
4061 |
|
4062 | if (!el) return prop;
|
4063 |
|
4064 | if ("production" !== 'benchmark' && css_vendor_esm_cache[prop] != null) {
|
4065 | return css_vendor_esm_cache[prop];
|
4066 | }
|
4067 |
|
4068 |
|
4069 | if (prop === 'transition' || prop === 'transform') {
|
4070 | options[prop] = prop in el.style;
|
4071 | }
|
4072 |
|
4073 |
|
4074 | for (var i = 0; i < propertyDetectors.length; i++) {
|
4075 | css_vendor_esm_cache[prop] = propertyDetectors[i](prop, el.style, options);
|
4076 |
|
4077 | if (css_vendor_esm_cache[prop]) break;
|
4078 | }
|
4079 |
|
4080 |
|
4081 |
|
4082 | try {
|
4083 | el.style[prop] = '';
|
4084 | } catch (err) {
|
4085 | return false;
|
4086 | }
|
4087 |
|
4088 | return css_vendor_esm_cache[prop];
|
4089 | }
|
4090 |
|
4091 | var cache$1 = {};
|
4092 | var transitionProperties = {
|
4093 | transition: 1,
|
4094 | 'transition-property': 1,
|
4095 | '-webkit-transition': 1,
|
4096 | '-webkit-transition-property': 1
|
4097 | };
|
4098 | var transPropsRegExp = /(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;
|
4099 | var el$1;
|
4100 |
|
4101 |
|
4102 |
|
4103 |
|
4104 |
|
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 |
|
4110 | function prefixTransitionCallback(match, p1, p2) {
|
4111 | if (p1 === 'var') return 'var';
|
4112 | if (p1 === 'all') return 'all';
|
4113 | if (p2 === 'all') return ', all';
|
4114 | var prefixedValue = p1 ? supportedProperty(p1) : ", " + supportedProperty(p2);
|
4115 | if (!prefixedValue) return p1 || p2;
|
4116 | return prefixedValue;
|
4117 | }
|
4118 |
|
4119 | if (dist_module) el$1 = document.createElement('p');
|
4120 |
|
4121 |
|
4122 |
|
4123 |
|
4124 |
|
4125 |
|
4126 |
|
4127 |
|
4128 |
|
4129 | function supportedValue(property, value) {
|
4130 |
|
4131 | var prefixedValue = value;
|
4132 | if (!el$1 || property === 'content') return value;
|
4133 |
|
4134 |
|
4135 |
|
4136 | if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {
|
4137 | return prefixedValue;
|
4138 | }
|
4139 |
|
4140 |
|
4141 | var cacheKey = property + prefixedValue;
|
4142 |
|
4143 | if ("production" !== 'benchmark' && cache$1[cacheKey] != null) {
|
4144 | return cache$1[cacheKey];
|
4145 | }
|
4146 |
|
4147 |
|
4148 | try {
|
4149 |
|
4150 | el$1.style[property] = prefixedValue;
|
4151 | } catch (err) {
|
4152 |
|
4153 | cache$1[cacheKey] = false;
|
4154 | return false;
|
4155 | }
|
4156 |
|
4157 |
|
4158 | if (transitionProperties[property]) {
|
4159 | prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);
|
4160 | } else if (el$1.style[property] === '') {
|
4161 |
|
4162 | prefixedValue = css_vendor_esm_prefix.css + prefixedValue;
|
4163 |
|
4164 | if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox';
|
4165 |
|
4166 | el$1.style[property] = prefixedValue;
|
4167 |
|
4168 | if (el$1.style[property] === '') {
|
4169 | cache$1[cacheKey] = false;
|
4170 | return false;
|
4171 | }
|
4172 | }
|
4173 |
|
4174 |
|
4175 | el$1.style[property] = '';
|
4176 |
|
4177 | cache$1[cacheKey] = prefixedValue;
|
4178 | return cache$1[cacheKey];
|
4179 | }
|
4180 |
|
4181 |
|
4182 |
|
4183 |
|
4184 |
|
4185 |
|
4186 |
|
4187 |
|
4188 |
|
4189 |
|
4190 |
|
4191 |
|
4192 |
|
4193 | function jssVendorPrefixer() {
|
4194 | function onProcessRule(rule) {
|
4195 | if (rule.type === 'keyframes') {
|
4196 | var atRule = rule;
|
4197 | atRule.at = supportedKeyframes(atRule.at);
|
4198 | }
|
4199 | }
|
4200 |
|
4201 | function prefixStyle(style) {
|
4202 | for (var prop in style) {
|
4203 | var value = style[prop];
|
4204 |
|
4205 | if (prop === 'fallbacks' && Array.isArray(value)) {
|
4206 | style[prop] = value.map(prefixStyle);
|
4207 | continue;
|
4208 | }
|
4209 |
|
4210 | var changeProp = false;
|
4211 | var supportedProp = supportedProperty(prop);
|
4212 | if (supportedProp && supportedProp !== prop) changeProp = true;
|
4213 | var changeValue = false;
|
4214 | var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));
|
4215 | if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;
|
4216 |
|
4217 | if (changeProp || changeValue) {
|
4218 | if (changeProp) delete style[prop];
|
4219 | style[supportedProp || prop] = supportedValue$1 || value;
|
4220 | }
|
4221 | }
|
4222 |
|
4223 | return style;
|
4224 | }
|
4225 |
|
4226 | function onProcessStyle(style, rule) {
|
4227 | if (rule.type !== 'style') return style;
|
4228 | return prefixStyle(style);
|
4229 | }
|
4230 |
|
4231 | function onChangeValue(value, prop) {
|
4232 | return supportedValue(prop, toCssValue(value)) || value;
|
4233 | }
|
4234 |
|
4235 | return {
|
4236 | onProcessRule: onProcessRule,
|
4237 | onProcessStyle: onProcessStyle,
|
4238 | onChangeValue: onChangeValue
|
4239 | };
|
4240 | }
|
4241 |
|
4242 | var jss_plugin_vendor_prefixer_esm = (jssVendorPrefixer);
|
4243 |
|
4244 |
|
4245 |
|
4246 |
|
4247 |
|
4248 | function jssPropsSort() {
|
4249 | var sort = function sort(prop0, prop1) {
|
4250 | if (prop0.length === prop1.length) {
|
4251 | return prop0 > prop1 ? 1 : -1;
|
4252 | }
|
4253 |
|
4254 | return prop0.length - prop1.length;
|
4255 | };
|
4256 |
|
4257 | return {
|
4258 | onProcessStyle: function onProcessStyle(style, rule) {
|
4259 | if (rule.type !== 'style') return style;
|
4260 | var newStyle = {};
|
4261 | var props = Object.keys(style).sort(sort);
|
4262 |
|
4263 | for (var i = 0; i < props.length; i++) {
|
4264 | newStyle[props[i]] = style[props[i]];
|
4265 | }
|
4266 |
|
4267 | return newStyle;
|
4268 | }
|
4269 | };
|
4270 | }
|
4271 |
|
4272 | var jss_plugin_props_sort_esm = (jssPropsSort);
|
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 |
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 | function jssPreset() {
|
4284 | return {
|
4285 | plugins: [jss_plugin_rule_value_function_esm(), jss_plugin_global_esm(), jss_plugin_nested_esm(), jss_plugin_camel_case_esm(), jss_plugin_default_unit_esm(),
|
4286 |
|
4287 |
|
4288 | typeof window === 'undefined' ? null : jss_plugin_vendor_prefixer_esm(), jss_plugin_props_sort_esm()]
|
4289 | };
|
4290 | }
|
4291 |
|
4292 |
|
4293 |
|
4294 |
|
4295 |
|
4296 |
|
4297 |
|
4298 |
|
4299 |
|
4300 |
|
4301 | var StylesProvider_jss = jss_esm_create(jssPreset());
|
4302 |
|
4303 |
|
4304 |
|
4305 |
|
4306 | var generateClassName = createGenerateClassName();
|
4307 |
|
4308 | var sheetsManager = new Map();
|
4309 | var defaultOptions = {
|
4310 | disableGeneration: false,
|
4311 | generateClassName: generateClassName,
|
4312 | jss: StylesProvider_jss,
|
4313 | sheetsCache: null,
|
4314 | sheetsManager: sheetsManager,
|
4315 | sheetsRegistry: null
|
4316 | };
|
4317 | var StylesContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createContext(defaultOptions);
|
4318 |
|
4319 | if (false) {}
|
4320 |
|
4321 | var injectFirstNode;
|
4322 | function StylesProvider(props) {
|
4323 | var children = props.children,
|
4324 | _props$injectFirst = props.injectFirst,
|
4325 | injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst,
|
4326 | _props$disableGenerat = props.disableGeneration,
|
4327 | disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat,
|
4328 | localOptions = Object(objectWithoutProperties["a" ])(props, ["children", "injectFirst", "disableGeneration"]);
|
4329 |
|
4330 | var outerOptions = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useContext(StylesContext);
|
4331 |
|
4332 | var context = Object(esm_extends["a" ])(Object(esm_extends["a" ])({}, outerOptions), {}, {
|
4333 | disableGeneration: disableGeneration
|
4334 | }, localOptions);
|
4335 |
|
4336 | if (false) {}
|
4337 |
|
4338 | if (false) {}
|
4339 |
|
4340 | if (false) {}
|
4341 |
|
4342 | if (!context.jss.options.insertionPoint && injectFirst && typeof window !== 'undefined') {
|
4343 | if (!injectFirstNode) {
|
4344 | var head = document.head;
|
4345 | injectFirstNode = document.createComment('mui-inject-first');
|
4346 | head.insertBefore(injectFirstNode, head.firstChild);
|
4347 | }
|
4348 |
|
4349 | context.jss = jss_esm_create({
|
4350 | plugins: jssPreset().plugins,
|
4351 | insertionPoint: injectFirstNode
|
4352 | });
|
4353 | }
|
4354 |
|
4355 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(StylesContext.Provider, {
|
4356 | value: context
|
4357 | }, children);
|
4358 | }
|
4359 | false ? undefined : void 0;
|
4360 |
|
4361 | if (false) {}
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 |
|
4367 |
|
4368 |
|
4369 |
|
4370 |
|
4371 |
|
4372 | var indexCounter = -1e9;
|
4373 | function increment() {
|
4374 | indexCounter += 1;
|
4375 |
|
4376 | if (false) {}
|
4377 |
|
4378 | return indexCounter;
|
4379 | }
|
4380 |
|
4381 | var esm_typeof = __webpack_require__(27);
|
4382 |
|
4383 |
|
4384 | var deepmerge = __webpack_require__(215);
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 |
|
4390 |
|
4391 | function getStylesCreator(stylesOrCreator) {
|
4392 | var themingEnabled = typeof stylesOrCreator === 'function';
|
4393 |
|
4394 | if (false) {}
|
4395 |
|
4396 | return {
|
4397 | create: function create(theme, name) {
|
4398 | var styles;
|
4399 |
|
4400 | try {
|
4401 | styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;
|
4402 | } catch (err) {
|
4403 | if (false) {}
|
4404 |
|
4405 | throw err;
|
4406 | }
|
4407 |
|
4408 | if (!name || !theme.overrides || !theme.overrides[name]) {
|
4409 | return styles;
|
4410 | }
|
4411 |
|
4412 | var overrides = theme.overrides[name];
|
4413 |
|
4414 | var stylesWithOverrides = Object(esm_extends["a" ])({}, styles);
|
4415 |
|
4416 | Object.keys(overrides).forEach(function (key) {
|
4417 | if (false) {}
|
4418 |
|
4419 | stylesWithOverrides[key] = Object(deepmerge["a" ])(stylesWithOverrides[key], overrides[key]);
|
4420 | });
|
4421 | return stylesWithOverrides;
|
4422 | },
|
4423 | options: {}
|
4424 | };
|
4425 | }
|
4426 |
|
4427 |
|
4428 | var noopTheme = {};
|
4429 | var getStylesCreator_noopTheme = (noopTheme);
|
4430 |
|
4431 |
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 |
|
4441 |
|
4442 |
|
4443 | function getClasses(_ref, classes, Component) {
|
4444 | var state = _ref.state,
|
4445 | stylesOptions = _ref.stylesOptions;
|
4446 |
|
4447 | if (stylesOptions.disableGeneration) {
|
4448 | return classes || {};
|
4449 | }
|
4450 |
|
4451 | if (!state.cacheClasses) {
|
4452 | state.cacheClasses = {
|
4453 |
|
4454 | value: null,
|
4455 |
|
4456 | lastProp: null,
|
4457 |
|
4458 | lastJSS: {}
|
4459 | };
|
4460 | }
|
4461 |
|
4462 |
|
4463 |
|
4464 | var generate = false;
|
4465 |
|
4466 | if (state.classes !== state.cacheClasses.lastJSS) {
|
4467 | state.cacheClasses.lastJSS = state.classes;
|
4468 | generate = true;
|
4469 | }
|
4470 |
|
4471 | if (classes !== state.cacheClasses.lastProp) {
|
4472 | state.cacheClasses.lastProp = classes;
|
4473 | generate = true;
|
4474 | }
|
4475 |
|
4476 | if (generate) {
|
4477 | state.cacheClasses.value = mergeClasses({
|
4478 | baseClasses: state.cacheClasses.lastJSS,
|
4479 | newClasses: classes,
|
4480 | Component: Component
|
4481 | });
|
4482 | }
|
4483 |
|
4484 | return state.cacheClasses.value;
|
4485 | }
|
4486 |
|
4487 | function attach(_ref2, props) {
|
4488 | var state = _ref2.state,
|
4489 | theme = _ref2.theme,
|
4490 | stylesOptions = _ref2.stylesOptions,
|
4491 | stylesCreator = _ref2.stylesCreator,
|
4492 | name = _ref2.name;
|
4493 |
|
4494 | if (stylesOptions.disableGeneration) {
|
4495 | return;
|
4496 | }
|
4497 |
|
4498 | var sheetManager = makeStyles_multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);
|
4499 |
|
4500 | if (!sheetManager) {
|
4501 | sheetManager = {
|
4502 | refs: 0,
|
4503 | staticSheet: null,
|
4504 | dynamicStyles: null
|
4505 | };
|
4506 | makeStyles_multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);
|
4507 | }
|
4508 |
|
4509 | var options = Object(esm_extends["a" ])(Object(esm_extends["a" ])(Object(esm_extends["a" ])({}, stylesCreator.options), stylesOptions), {}, {
|
4510 | theme: theme,
|
4511 | flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'
|
4512 | });
|
4513 |
|
4514 | options.generateId = options.serverGenerateClassName || options.generateClassName;
|
4515 | var sheetsRegistry = stylesOptions.sheetsRegistry;
|
4516 |
|
4517 | if (sheetManager.refs === 0) {
|
4518 | var staticSheet;
|
4519 |
|
4520 | if (stylesOptions.sheetsCache) {
|
4521 | staticSheet = makeStyles_multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);
|
4522 | }
|
4523 |
|
4524 | var styles = stylesCreator.create(theme, name);
|
4525 |
|
4526 | if (!staticSheet) {
|
4527 | staticSheet = stylesOptions.jss.createStyleSheet(styles, Object(esm_extends["a" ])({
|
4528 | link: false
|
4529 | }, options));
|
4530 | staticSheet.attach();
|
4531 |
|
4532 | if (stylesOptions.sheetsCache) {
|
4533 | makeStyles_multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);
|
4534 | }
|
4535 | }
|
4536 |
|
4537 | if (sheetsRegistry) {
|
4538 | sheetsRegistry.add(staticSheet);
|
4539 | }
|
4540 |
|
4541 | sheetManager.staticSheet = staticSheet;
|
4542 | sheetManager.dynamicStyles = getDynamicStyles(styles);
|
4543 | }
|
4544 |
|
4545 | if (sheetManager.dynamicStyles) {
|
4546 | var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, Object(esm_extends["a" ])({
|
4547 | link: true
|
4548 | }, options));
|
4549 | dynamicSheet.update(props);
|
4550 | dynamicSheet.attach();
|
4551 | state.dynamicSheet = dynamicSheet;
|
4552 | state.classes = mergeClasses({
|
4553 | baseClasses: sheetManager.staticSheet.classes,
|
4554 | newClasses: dynamicSheet.classes
|
4555 | });
|
4556 |
|
4557 | if (sheetsRegistry) {
|
4558 | sheetsRegistry.add(dynamicSheet);
|
4559 | }
|
4560 | } else {
|
4561 | state.classes = sheetManager.staticSheet.classes;
|
4562 | }
|
4563 |
|
4564 | sheetManager.refs += 1;
|
4565 | }
|
4566 |
|
4567 | function update(_ref3, props) {
|
4568 | var state = _ref3.state;
|
4569 |
|
4570 | if (state.dynamicSheet) {
|
4571 | state.dynamicSheet.update(props);
|
4572 | }
|
4573 | }
|
4574 |
|
4575 | function detach(_ref4) {
|
4576 | var state = _ref4.state,
|
4577 | theme = _ref4.theme,
|
4578 | stylesOptions = _ref4.stylesOptions,
|
4579 | stylesCreator = _ref4.stylesCreator;
|
4580 |
|
4581 | if (stylesOptions.disableGeneration) {
|
4582 | return;
|
4583 | }
|
4584 |
|
4585 | var sheetManager = makeStyles_multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);
|
4586 | sheetManager.refs -= 1;
|
4587 | var sheetsRegistry = stylesOptions.sheetsRegistry;
|
4588 |
|
4589 | if (sheetManager.refs === 0) {
|
4590 | makeStyles_multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);
|
4591 | stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);
|
4592 |
|
4593 | if (sheetsRegistry) {
|
4594 | sheetsRegistry.remove(sheetManager.staticSheet);
|
4595 | }
|
4596 | }
|
4597 |
|
4598 | if (state.dynamicSheet) {
|
4599 | stylesOptions.jss.removeStyleSheet(state.dynamicSheet);
|
4600 |
|
4601 | if (sheetsRegistry) {
|
4602 | sheetsRegistry.remove(state.dynamicSheet);
|
4603 | }
|
4604 | }
|
4605 | }
|
4606 |
|
4607 | function useSynchronousEffect(func, values) {
|
4608 | var key = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useRef([]);
|
4609 | var output;
|
4610 |
|
4611 | var currentKey = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useMemo(function () {
|
4612 | return {};
|
4613 | }, values);
|
4614 |
|
4615 |
|
4616 | if (key.current !== currentKey) {
|
4617 | key.current = currentKey;
|
4618 | output = func();
|
4619 | }
|
4620 |
|
4621 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useEffect(function () {
|
4622 | return function () {
|
4623 | if (output) {
|
4624 | output();
|
4625 | }
|
4626 | };
|
4627 | }, [currentKey]
|
4628 | );
|
4629 | }
|
4630 |
|
4631 | function makeStyles(stylesOrCreator) {
|
4632 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
4633 |
|
4634 | var name = options.name,
|
4635 | classNamePrefixOption = options.classNamePrefix,
|
4636 | Component = options.Component,
|
4637 | _options$defaultTheme = options.defaultTheme,
|
4638 | defaultTheme = _options$defaultTheme === void 0 ? getStylesCreator_noopTheme : _options$defaultTheme,
|
4639 | stylesOptions2 = Object(objectWithoutProperties["a" ])(options, ["name", "classNamePrefix", "Component", "defaultTheme"]);
|
4640 |
|
4641 | var stylesCreator = getStylesCreator(stylesOrCreator);
|
4642 | var classNamePrefix = name || classNamePrefixOption || 'makeStyles';
|
4643 | stylesCreator.options = {
|
4644 | index: increment(),
|
4645 | name: name,
|
4646 | meta: classNamePrefix,
|
4647 | classNamePrefix: classNamePrefix
|
4648 | };
|
4649 |
|
4650 | var useStyles = function useStyles() {
|
4651 | var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
4652 | var theme = Object(useTheme["a" ])() || defaultTheme;
|
4653 |
|
4654 | var stylesOptions = Object(esm_extends["a" ])(Object(esm_extends["a" ])({}, external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useContext(StylesContext)), stylesOptions2);
|
4655 |
|
4656 | var instance = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useRef();
|
4657 | var shouldUpdate = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useRef();
|
4658 | useSynchronousEffect(function () {
|
4659 | var current = {
|
4660 | name: name,
|
4661 | state: {},
|
4662 | stylesCreator: stylesCreator,
|
4663 | stylesOptions: stylesOptions,
|
4664 | theme: theme
|
4665 | };
|
4666 | attach(current, props);
|
4667 | shouldUpdate.current = false;
|
4668 | instance.current = current;
|
4669 | return function () {
|
4670 | detach(current);
|
4671 | };
|
4672 | }, [theme, stylesCreator]);
|
4673 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useEffect(function () {
|
4674 | if (shouldUpdate.current) {
|
4675 | update(instance.current, props);
|
4676 | }
|
4677 |
|
4678 | shouldUpdate.current = true;
|
4679 | });
|
4680 | var classes = getClasses(instance.current, props.classes, Component);
|
4681 |
|
4682 | if (false) {}
|
4683 |
|
4684 | return classes;
|
4685 | };
|
4686 |
|
4687 | return useStyles;
|
4688 | }
|
4689 |
|
4690 |
|
4691 | function getThemeProps(params) {
|
4692 | var theme = params.theme,
|
4693 | name = params.name,
|
4694 | props = params.props;
|
4695 |
|
4696 | if (!theme || !theme.props || !theme.props[name]) {
|
4697 | return props;
|
4698 | }
|
4699 |
|
4700 |
|
4701 |
|
4702 | var defaultProps = theme.props[name];
|
4703 | var propName;
|
4704 |
|
4705 | for (propName in defaultProps) {
|
4706 | if (props[propName] === undefined) {
|
4707 | props[propName] = defaultProps[propName];
|
4708 | }
|
4709 | }
|
4710 |
|
4711 | return props;
|
4712 | }
|
4713 |
|
4714 |
|
4715 |
|
4716 |
|
4717 |
|
4718 |
|
4719 |
|
4720 |
|
4721 |
|
4722 |
|
4723 |
|
4724 |
|
4725 |
|
4726 | var withStyles_withStyles = function withStyles(stylesOrCreator) {
|
4727 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
4728 | return function (Component) {
|
4729 | var defaultTheme = options.defaultTheme,
|
4730 | _options$withTheme = options.withTheme,
|
4731 | withTheme = _options$withTheme === void 0 ? false : _options$withTheme,
|
4732 | name = options.name,
|
4733 | stylesOptions = Object(objectWithoutProperties["a" ])(options, ["defaultTheme", "withTheme", "name"]);
|
4734 |
|
4735 | if (false) {}
|
4736 |
|
4737 | var classNamePrefix = name;
|
4738 |
|
4739 | if (false) { var displayName; }
|
4740 |
|
4741 | var useStyles = makeStyles(stylesOrCreator, Object(esm_extends["a" ])({
|
4742 | defaultTheme: defaultTheme,
|
4743 | Component: Component,
|
4744 | name: name || Component.displayName,
|
4745 | classNamePrefix: classNamePrefix
|
4746 | }, stylesOptions));
|
4747 | var WithStyles = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.forwardRef(function WithStyles(props, ref) {
|
4748 | var classesProp = props.classes,
|
4749 | innerRef = props.innerRef,
|
4750 | other = Object(objectWithoutProperties["a" ])(props, ["classes", "innerRef"]);
|
4751 |
|
4752 |
|
4753 |
|
4754 |
|
4755 | var classes = useStyles(Object(esm_extends["a" ])(Object(esm_extends["a" ])({}, Component.defaultProps), props));
|
4756 | var theme;
|
4757 | var more = other;
|
4758 |
|
4759 | if (typeof name === 'string' || withTheme) {
|
4760 |
|
4761 |
|
4762 | theme = Object(useTheme["a" ])() || defaultTheme;
|
4763 |
|
4764 | if (name) {
|
4765 | more = getThemeProps({
|
4766 | theme: theme,
|
4767 | name: name,
|
4768 | props: other
|
4769 | });
|
4770 | }
|
4771 |
|
4772 |
|
4773 |
|
4774 | if (withTheme && !more.theme) {
|
4775 | more.theme = theme;
|
4776 | }
|
4777 | }
|
4778 |
|
4779 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, Object(esm_extends["a" ])({
|
4780 | ref: innerRef || ref,
|
4781 | classes: classes
|
4782 | }, more));
|
4783 | });
|
4784 | false ? undefined : void 0;
|
4785 |
|
4786 | if (false) {}
|
4787 |
|
4788 | hoist_non_react_statics_cjs_default()(WithStyles, Component);
|
4789 |
|
4790 | if (false) {}
|
4791 |
|
4792 | return WithStyles;
|
4793 | };
|
4794 | };
|
4795 |
|
4796 | var esm_withStyles_withStyles = (withStyles_withStyles);
|
4797 |
|
4798 | var styles_defaultTheme = __webpack_require__(37);
|
4799 |
|
4800 |
|
4801 |
|
4802 |
|
4803 |
|
4804 |
|
4805 | function styles_withStyles_withStyles(stylesOrCreator, options) {
|
4806 | return esm_withStyles_withStyles(stylesOrCreator, Object(esm_extends["a" ])({
|
4807 | defaultTheme: styles_defaultTheme["a" ]
|
4808 | }, options));
|
4809 | }
|
4810 |
|
4811 | var styles_withStyles = __webpack_exports__["a"] = (styles_withStyles_withStyles);
|
4812 |
|
4813 | }),
|
4814 |
|
4815 | (function(module, __webpack_exports__, __webpack_require__) {
|
4816 |
|
4817 | "use strict";
|
4818 | __webpack_require__.d(__webpack_exports__, "a", function() { return capitalize; });
|
4819 | var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(214);
|
4820 |
|
4821 |
|
4822 |
|
4823 |
|
4824 |
|
4825 | function capitalize(string) {
|
4826 | if (typeof string !== 'string') {
|
4827 | throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[ "a"])(7));
|
4828 | }
|
4829 |
|
4830 | return string.charAt(0).toUpperCase() + string.slice(1);
|
4831 | }
|
4832 |
|
4833 | }),
|
4834 |
|
4835 | (function(module, __webpack_exports__, __webpack_require__) {
|
4836 |
|
4837 | "use strict";
|
4838 |
|
4839 |
|
4840 |
|
4841 |
|
4842 |
|
4843 | __webpack_require__.d(__webpack_exports__, "c", function() { return getContrastRatio; });
|
4844 |
|
4845 |
|
4846 | __webpack_require__.d(__webpack_exports__, "b", function() { return fade; });
|
4847 | __webpack_require__.d(__webpack_exports__, "a", function() { return darken; });
|
4848 | __webpack_require__.d(__webpack_exports__, "d", function() { return lighten; });
|
4849 | var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(214);
|
4850 |
|
4851 |
|
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 |
|
4857 |
|
4858 |
|
4859 |
|
4860 |
|
4861 |
|
4862 | function clamp(value) {
|
4863 | var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
4864 | var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
4865 |
|
4866 | if (false) {}
|
4867 |
|
4868 | return Math.min(Math.max(min, value), max);
|
4869 | }
|
4870 |
|
4871 |
|
4872 |
|
4873 |
|
4874 |
|
4875 |
|
4876 |
|
4877 |
|
4878 | function hexToRgb(color) {
|
4879 | color = color.substr(1);
|
4880 | var re = new RegExp(".{1,".concat(color.length >= 6 ? 2 : 1, "}"), 'g');
|
4881 | var colors = color.match(re);
|
4882 |
|
4883 | if (colors && colors[0].length === 1) {
|
4884 | colors = colors.map(function (n) {
|
4885 | return n + n;
|
4886 | });
|
4887 | }
|
4888 |
|
4889 | return colors ? "rgb".concat(colors.length === 4 ? 'a' : '', "(").concat(colors.map(function (n, index) {
|
4890 | return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;
|
4891 | }).join(', '), ")") : '';
|
4892 | }
|
4893 |
|
4894 | function intToHex(int) {
|
4895 | var hex = int.toString(16);
|
4896 | return hex.length === 1 ? "0".concat(hex) : hex;
|
4897 | }
|
4898 |
|
4899 |
|
4900 |
|
4901 |
|
4902 |
|
4903 |
|
4904 |
|
4905 |
|
4906 | function rgbToHex(color) {
|
4907 |
|
4908 | if (color.indexOf('#') === 0) {
|
4909 | return color;
|
4910 | }
|
4911 |
|
4912 | var _decomposeColor = decomposeColor(color),
|
4913 | values = _decomposeColor.values;
|
4914 |
|
4915 | return "#".concat(values.map(function (n) {
|
4916 | return intToHex(n);
|
4917 | }).join(''));
|
4918 | }
|
4919 |
|
4920 |
|
4921 |
|
4922 |
|
4923 |
|
4924 |
|
4925 |
|
4926 | function hslToRgb(color) {
|
4927 | color = decomposeColor(color);
|
4928 | var _color = color,
|
4929 | values = _color.values;
|
4930 | var h = values[0];
|
4931 | var s = values[1] / 100;
|
4932 | var l = values[2] / 100;
|
4933 | var a = s * Math.min(l, 1 - l);
|
4934 |
|
4935 | var f = function f(n) {
|
4936 | var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;
|
4937 | return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
4938 | };
|
4939 |
|
4940 | var type = 'rgb';
|
4941 | var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
|
4942 |
|
4943 | if (color.type === 'hsla') {
|
4944 | type += 'a';
|
4945 | rgb.push(values[3]);
|
4946 | }
|
4947 |
|
4948 | return recomposeColor({
|
4949 | type: type,
|
4950 | values: rgb
|
4951 | });
|
4952 | }
|
4953 |
|
4954 |
|
4955 |
|
4956 |
|
4957 |
|
4958 |
|
4959 |
|
4960 |
|
4961 |
|
4962 | function decomposeColor(color) {
|
4963 |
|
4964 | if (color.type) {
|
4965 | return color;
|
4966 | }
|
4967 |
|
4968 | if (color.charAt(0) === '#') {
|
4969 | return decomposeColor(hexToRgb(color));
|
4970 | }
|
4971 |
|
4972 | var marker = color.indexOf('(');
|
4973 | var type = color.substring(0, marker);
|
4974 |
|
4975 | if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {
|
4976 | throw new Error( false ? undefined : Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[ "a"])(3, color));
|
4977 | }
|
4978 |
|
4979 | var values = color.substring(marker + 1, color.length - 1).split(',');
|
4980 | values = values.map(function (value) {
|
4981 | return parseFloat(value);
|
4982 | });
|
4983 | return {
|
4984 | type: type,
|
4985 | values: values
|
4986 | };
|
4987 | }
|
4988 |
|
4989 |
|
4990 |
|
4991 |
|
4992 |
|
4993 |
|
4994 |
|
4995 |
|
4996 |
|
4997 | function recomposeColor(color) {
|
4998 | var type = color.type;
|
4999 | var values = color.values;
|
5000 |
|
5001 | if (type.indexOf('rgb') !== -1) {
|
5002 |
|
5003 | values = values.map(function (n, i) {
|
5004 | return i < 3 ? parseInt(n, 10) : n;
|
5005 | });
|
5006 | } else if (type.indexOf('hsl') !== -1) {
|
5007 | values[1] = "".concat(values[1], "%");
|
5008 | values[2] = "".concat(values[2], "%");
|
5009 | }
|
5010 |
|
5011 | return "".concat(type, "(").concat(values.join(', '), ")");
|
5012 | }
|
5013 |
|
5014 |
|
5015 |
|
5016 |
|
5017 |
|
5018 |
|
5019 |
|
5020 |
|
5021 |
|
5022 |
|
5023 | function getContrastRatio(foreground, background) {
|
5024 | var lumA = getLuminance(foreground);
|
5025 | var lumB = getLuminance(background);
|
5026 | return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
|
5027 | }
|
5028 |
|
5029 |
|
5030 |
|
5031 |
|
5032 |
|
5033 |
|
5034 |
|
5035 |
|
5036 |
|
5037 |
|
5038 | function getLuminance(color) {
|
5039 | color = decomposeColor(color);
|
5040 | var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;
|
5041 | rgb = rgb.map(function (val) {
|
5042 | val /= 255;
|
5043 |
|
5044 | return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
|
5045 | });
|
5046 |
|
5047 | return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
|
5048 | }
|
5049 |
|
5050 |
|
5051 |
|
5052 |
|
5053 |
|
5054 |
|
5055 |
|
5056 |
|
5057 |
|
5058 | function emphasize(color) {
|
5059 | var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;
|
5060 | return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
|
5061 | }
|
5062 |
|
5063 |
|
5064 |
|
5065 |
|
5066 |
|
5067 |
|
5068 |
|
5069 |
|
5070 |
|
5071 | function fade(color, value) {
|
5072 | color = decomposeColor(color);
|
5073 | value = clamp(value);
|
5074 |
|
5075 | if (color.type === 'rgb' || color.type === 'hsl') {
|
5076 | color.type += 'a';
|
5077 | }
|
5078 |
|
5079 | color.values[3] = value;
|
5080 | return recomposeColor(color);
|
5081 | }
|
5082 |
|
5083 |
|
5084 |
|
5085 |
|
5086 |
|
5087 |
|
5088 |
|
5089 |
|
5090 | function darken(color, coefficient) {
|
5091 | color = decomposeColor(color);
|
5092 | coefficient = clamp(coefficient);
|
5093 |
|
5094 | if (color.type.indexOf('hsl') !== -1) {
|
5095 | color.values[2] *= 1 - coefficient;
|
5096 | } else if (color.type.indexOf('rgb') !== -1) {
|
5097 | for (var i = 0; i < 3; i += 1) {
|
5098 | color.values[i] *= 1 - coefficient;
|
5099 | }
|
5100 | }
|
5101 |
|
5102 | return recomposeColor(color);
|
5103 | }
|
5104 |
|
5105 |
|
5106 |
|
5107 |
|
5108 |
|
5109 |
|
5110 |
|
5111 |
|
5112 | function lighten(color, coefficient) {
|
5113 | color = decomposeColor(color);
|
5114 | coefficient = clamp(coefficient);
|
5115 |
|
5116 | if (color.type.indexOf('hsl') !== -1) {
|
5117 | color.values[2] += (100 - color.values[2]) * coefficient;
|
5118 | } else if (color.type.indexOf('rgb') !== -1) {
|
5119 | for (var i = 0; i < 3; i += 1) {
|
5120 | color.values[i] += (255 - color.values[i]) * coefficient;
|
5121 | }
|
5122 | }
|
5123 |
|
5124 | return recomposeColor(color);
|
5125 | }
|
5126 |
|
5127 | }),
|
5128 | ,
|
5129 |
|
5130 | (function(module, exports, __webpack_require__) {
|
5131 |
|
5132 | "use strict";
|
5133 |
|
5134 |
|
5135 | function checkDCE() {
|
5136 |
|
5137 | if (
|
5138 | typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
|
5139 | typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
|
5140 | ) {
|
5141 | return;
|
5142 | }
|
5143 | if (false) {}
|
5144 | try {
|
5145 |
|
5146 | __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
5147 | } catch (err) {
|
5148 |
|
5149 |
|
5150 | console.error(err);
|
5151 | }
|
5152 | }
|
5153 |
|
5154 | if (true) {
|
5155 |
|
5156 |
|
5157 | checkDCE();
|
5158 | module.exports = __webpack_require__(91);
|
5159 | } else {}
|
5160 |
|
5161 |
|
5162 | }),
|
5163 |
|
5164 | (function(module, exports, __webpack_require__) {
|
5165 |
|
5166 | "use strict";
|
5167 |
|
5168 | Object.defineProperty(exports, "__esModule", { value: true });
|
5169 | exports.CONTINUE = 100;
|
5170 | exports.SWITCHING_PROTOCOLS = 101;
|
5171 | exports.PROCESSING = 102;
|
5172 | exports.OK = 200;
|
5173 | exports.CREATED = 201;
|
5174 | exports.ACCEPTED = 202;
|
5175 | exports.NON_AUTHORITATIVE_INFORMATION = 203;
|
5176 | exports.NO_CONTENT = 204;
|
5177 | exports.RESET_CONTENT = 205;
|
5178 | exports.PARTIAL_CONTENT = 206;
|
5179 | exports.MULTI_STATUS = 207;
|
5180 | exports.MULTIPLE_CHOICES = 300;
|
5181 | exports.MOVED_PERMANENTLY = 301;
|
5182 | exports.MOVED_TEMPORARILY = 302;
|
5183 | exports.SEE_OTHER = 303;
|
5184 | exports.NOT_MODIFIED = 304;
|
5185 | exports.USE_PROXY = 305;
|
5186 | exports.TEMPORARY_REDIRECT = 307;
|
5187 | exports.BAD_REQUEST = 400;
|
5188 | exports.UNAUTHORIZED = 401;
|
5189 | exports.PAYMENT_REQUIRED = 402;
|
5190 | exports.FORBIDDEN = 403;
|
5191 | exports.NOT_FOUND = 404;
|
5192 | exports.METHOD_NOT_ALLOWED = 405;
|
5193 | exports.NOT_ACCEPTABLE = 406;
|
5194 | exports.PROXY_AUTHENTICATION_REQUIRED = 407;
|
5195 | exports.REQUEST_TIME_OUT = 408;
|
5196 | exports.CONFLICT = 409;
|
5197 | exports.GONE = 410;
|
5198 | exports.LENGTH_REQUIRED = 411;
|
5199 | exports.PRECONDITION_FAILED = 412;
|
5200 | exports.REQUEST_ENTITY_TOO_LARGE = 413;
|
5201 | exports.REQUEST_URI_TOO_LARGE = 414;
|
5202 | exports.UNSUPPORTED_MEDIA_TYPE = 415;
|
5203 | exports.REQUESTED_RANGE_NOT_SATISFIABLE = 416;
|
5204 | exports.EXPECTATION_FAILED = 417;
|
5205 | exports.IM_A_TEAPOT = 418;
|
5206 | exports.UNPROCESSABLE_ENTITY = 422;
|
5207 | exports.LOCKED = 423;
|
5208 | exports.FAILED_DEPENDENCY = 424;
|
5209 | exports.UNORDERED_COLLECTION = 425;
|
5210 | exports.UPGRADE_REQUIRED = 426;
|
5211 | exports.PRECONDITION_REQUIRED = 428;
|
5212 | exports.TOO_MANY_REQUESTS = 429;
|
5213 | exports.REQUEST_HEADER_FIELDS_TOO_LARGE = 431;
|
5214 | exports.INTERNAL_SERVER_ERROR = 500;
|
5215 | exports.NOT_IMPLEMENTED = 501;
|
5216 | exports.BAD_GATEWAY = 502;
|
5217 | exports.SERVICE_UNAVAILABLE = 503;
|
5218 | exports.GATEWAY_TIME_OUT = 504;
|
5219 | exports.HTTP_VERSION_NOT_SUPPORTED = 505;
|
5220 | exports.VARIANT_ALSO_NEGOTIATES = 506;
|
5221 | exports.INSUFFICIENT_STORAGE = 507;
|
5222 | exports.BANDWIDTH_LIMIT_EXCEEDED = 509;
|
5223 | exports.NOT_EXTENDED = 510;
|
5224 | exports.NETWORK_AUTHENTICATION_REQUIRED = 511;
|
5225 |
|
5226 |
|
5227 | }),
|
5228 |
|
5229 | (function(module, exports) {
|
5230 |
|
5231 | function _interopRequireDefault(obj) {
|
5232 | return obj && obj.__esModule ? obj : {
|
5233 | "default": obj
|
5234 | };
|
5235 | }
|
5236 |
|
5237 | module.exports = _interopRequireDefault;
|
5238 |
|
5239 | }),
|
5240 |
|
5241 | (function(module, __webpack_exports__, __webpack_require__) {
|
5242 |
|
5243 | "use strict";
|
5244 | __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
|
5245 | function _defineProperty(obj, key, value) {
|
5246 | if (key in obj) {
|
5247 | Object.defineProperty(obj, key, {
|
5248 | value: value,
|
5249 | enumerable: true,
|
5250 | configurable: true,
|
5251 | writable: true
|
5252 | });
|
5253 | } else {
|
5254 | obj[key] = value;
|
5255 | }
|
5256 |
|
5257 | return obj;
|
5258 | }
|
5259 |
|
5260 | }),
|
5261 |
|
5262 | (function(module, exports, __webpack_require__) {
|
5263 |
|
5264 | "use strict";
|
5265 |
|
5266 |
|
5267 | var _interopRequireDefault = __webpack_require__(13);
|
5268 |
|
5269 | Object.defineProperty(exports, "__esModule", {
|
5270 | value: true
|
5271 | });
|
5272 | exports.default = createSvgIcon;
|
5273 |
|
5274 | var _extends2 = _interopRequireDefault(__webpack_require__(101));
|
5275 |
|
5276 | var _react = _interopRequireDefault(__webpack_require__(0));
|
5277 |
|
5278 | var _SvgIcon = _interopRequireDefault(__webpack_require__(190));
|
5279 |
|
5280 | function createSvgIcon(path, displayName) {
|
5281 | var Component = _react.default.memo(_react.default.forwardRef(function (props, ref) {
|
5282 | return _react.default.createElement(_SvgIcon.default, (0, _extends2.default)({
|
5283 | ref: ref
|
5284 | }, props), path);
|
5285 | }));
|
5286 |
|
5287 | if (false) {}
|
5288 |
|
5289 | Component.muiName = _SvgIcon.default.muiName;
|
5290 | return Component;
|
5291 | }
|
5292 |
|
5293 | }),
|
5294 |
|
5295 | (function(module, exports) {
|
5296 |
|
5297 |
|
5298 |
|
5299 |
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 |
|
5306 |
|
5307 |
|
5308 |
|
5309 |
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 |
|
5315 |
|
5316 |
|
5317 |
|
5318 |
|
5319 |
|
5320 | var isArray = Array.isArray;
|
5321 |
|
5322 | module.exports = isArray;
|
5323 |
|
5324 |
|
5325 | }),
|
5326 |
|
5327 | (function(module, exports, __webpack_require__) {
|
5328 |
|
5329 | var freeGlobal = __webpack_require__(52);
|
5330 |
|
5331 |
|
5332 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
5333 |
|
5334 |
|
5335 | var root = freeGlobal || freeSelf || Function('return this')();
|
5336 |
|
5337 | module.exports = root;
|
5338 |
|
5339 |
|
5340 | }),
|
5341 |
|
5342 | (function(module, exports, __webpack_require__) {
|
5343 |
|
5344 | var baseFlatten = __webpack_require__(50);
|
5345 |
|
5346 |
|
5347 |
|
5348 |
|
5349 |
|
5350 |
|
5351 |
|
5352 |
|
5353 |
|
5354 |
|
5355 |
|
5356 |
|
5357 |
|
5358 |
|
5359 |
|
5360 | function flatten(array) {
|
5361 | var length = array == null ? 0 : array.length;
|
5362 | return length ? baseFlatten(array, 1) : [];
|
5363 | }
|
5364 |
|
5365 | module.exports = flatten;
|
5366 |
|
5367 |
|
5368 | }),
|
5369 |
|
5370 | (function(module, __webpack_exports__, __webpack_require__) {
|
5371 |
|
5372 | "use strict";
|
5373 | __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
|
5374 | function _objectWithoutPropertiesLoose(source, excluded) {
|
5375 | if (source == null) return {};
|
5376 | var target = {};
|
5377 | var sourceKeys = Object.keys(source);
|
5378 | var key, i;
|
5379 |
|
5380 | for (i = 0; i < sourceKeys.length; i++) {
|
5381 | key = sourceKeys[i];
|
5382 | if (excluded.indexOf(key) >= 0) continue;
|
5383 | target[key] = source[key];
|
5384 | }
|
5385 |
|
5386 | return target;
|
5387 | }
|
5388 |
|
5389 | }),
|
5390 |
|
5391 | (function(module, __webpack_exports__, __webpack_require__) {
|
5392 |
|
5393 | "use strict";
|
5394 |
|
5395 |
|
5396 | var arrayLikeToArray = __webpack_require__(28);
|
5397 |
|
5398 |
|
5399 |
|
5400 | function _arrayWithoutHoles(arr) {
|
5401 | if (Array.isArray(arr)) return Object(arrayLikeToArray["a" ])(arr);
|
5402 | }
|
5403 |
|
5404 | function _iterableToArray(iter) {
|
5405 | if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
5406 | }
|
5407 |
|
5408 | var unsupportedIterableToArray = __webpack_require__(35);
|
5409 |
|
5410 |
|
5411 | function _nonIterableSpread() {
|
5412 | throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
5413 | }
|
5414 |
|
5415 | __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; });
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 | function _toConsumableArray(arr) {
|
5421 | return _arrayWithoutHoles(arr) || _iterableToArray(arr) || Object(unsupportedIterableToArray["a" ])(arr) || _nonIterableSpread();
|
5422 | }
|
5423 |
|
5424 | }),
|
5425 |
|
5426 | (function(module, __webpack_exports__, __webpack_require__) {
|
5427 |
|
5428 | "use strict";
|
5429 |
|
5430 |
|
5431 | function _arrayWithHoles(arr) {
|
5432 | if (Array.isArray(arr)) return arr;
|
5433 | }
|
5434 |
|
5435 | function _iterableToArrayLimit(arr, i) {
|
5436 | if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
5437 | var _arr = [];
|
5438 | var _n = true;
|
5439 | var _d = false;
|
5440 | var _e = undefined;
|
5441 |
|
5442 | try {
|
5443 | for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
5444 | _arr.push(_s.value);
|
5445 |
|
5446 | if (i && _arr.length === i) break;
|
5447 | }
|
5448 | } catch (err) {
|
5449 | _d = true;
|
5450 | _e = err;
|
5451 | } finally {
|
5452 | try {
|
5453 | if (!_n && _i["return"] != null) _i["return"]();
|
5454 | } finally {
|
5455 | if (_d) throw _e;
|
5456 | }
|
5457 | }
|
5458 |
|
5459 | return _arr;
|
5460 | }
|
5461 |
|
5462 | var unsupportedIterableToArray = __webpack_require__(35);
|
5463 |
|
5464 |
|
5465 | function _nonIterableRest() {
|
5466 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
5467 | }
|
5468 |
|
5469 | __webpack_require__.d(__webpack_exports__, "a", function() { return _slicedToArray; });
|
5470 |
|
5471 |
|
5472 |
|
5473 |
|
5474 | function _slicedToArray(arr, i) {
|
5475 | return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" ])(arr, i) || _nonIterableRest();
|
5476 | }
|
5477 |
|
5478 | }),
|
5479 |
|
5480 | (function(module, exports, __webpack_require__) {
|
5481 |
|
5482 | var baseIsNative = __webpack_require__(105),
|
5483 | getValue = __webpack_require__(108);
|
5484 |
|
5485 |
|
5486 |
|
5487 |
|
5488 |
|
5489 |
|
5490 |
|
5491 |
|
5492 |
|
5493 | function getNative(object, key) {
|
5494 | var value = getValue(object, key);
|
5495 | return baseIsNative(value) ? value : undefined;
|
5496 | }
|
5497 |
|
5498 | module.exports = getNative;
|
5499 |
|
5500 |
|
5501 | }),
|
5502 |
|
5503 | (function(module, __webpack_exports__, __webpack_require__) {
|
5504 |
|
5505 | "use strict";
|
5506 | __webpack_require__.d(__webpack_exports__, "a", function() { return _inheritsLoose; });
|
5507 | function _inheritsLoose(subClass, superClass) {
|
5508 | subClass.prototype = Object.create(superClass.prototype);
|
5509 | subClass.prototype.constructor = subClass;
|
5510 | subClass.__proto__ = superClass;
|
5511 | }
|
5512 |
|
5513 | }),
|
5514 |
|
5515 | (function(module, exports, __webpack_require__) {
|
5516 |
|
5517 | var root = __webpack_require__(17);
|
5518 |
|
5519 |
|
5520 | var Symbol = root.Symbol;
|
5521 |
|
5522 | module.exports = Symbol;
|
5523 |
|
5524 |
|
5525 | }),
|
5526 |
|
5527 | (function(module, exports, __webpack_require__) {
|
5528 |
|
5529 | var Symbol = __webpack_require__(24),
|
5530 | getRawTag = __webpack_require__(99),
|
5531 | objectToString = __webpack_require__(100);
|
5532 |
|
5533 |
|
5534 | var nullTag = '[object Null]',
|
5535 | undefinedTag = '[object Undefined]';
|
5536 |
|
5537 |
|
5538 | var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
5539 |
|
5540 |
|
5541 |
|
5542 |
|
5543 |
|
5544 |
|
5545 |
|
5546 |
|
5547 | function baseGetTag(value) {
|
5548 | if (value == null) {
|
5549 | return value === undefined ? undefinedTag : nullTag;
|
5550 | }
|
5551 | return (symToStringTag && symToStringTag in Object(value))
|
5552 | ? getRawTag(value)
|
5553 | : objectToString(value);
|
5554 | }
|
5555 |
|
5556 | module.exports = baseGetTag;
|
5557 |
|
5558 |
|
5559 | }),
|
5560 |
|
5561 | (function(module, exports) {
|
5562 |
|
5563 |
|
5564 |
|
5565 |
|
5566 |
|
5567 |
|
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 |
|
5583 |
|
5584 |
|
5585 |
|
5586 |
|
5587 | function isObjectLike(value) {
|
5588 | return value != null && typeof value == 'object';
|
5589 | }
|
5590 |
|
5591 | module.exports = isObjectLike;
|
5592 |
|
5593 |
|
5594 | }),
|
5595 |
|
5596 | (function(module, __webpack_exports__, __webpack_require__) {
|
5597 |
|
5598 | "use strict";
|
5599 | __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
|
5600 | function _typeof(obj) {
|
5601 | "@babel/helpers - typeof";
|
5602 |
|
5603 | if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
5604 | _typeof = function _typeof(obj) {
|
5605 | return typeof obj;
|
5606 | };
|
5607 | } else {
|
5608 | _typeof = function _typeof(obj) {
|
5609 | return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
5610 | };
|
5611 | }
|
5612 |
|
5613 | return _typeof(obj);
|
5614 | }
|
5615 |
|
5616 | }),
|
5617 |
|
5618 | (function(module, __webpack_exports__, __webpack_require__) {
|
5619 |
|
5620 | "use strict";
|
5621 | __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
|
5622 | function _arrayLikeToArray(arr, len) {
|
5623 | if (len == null || len > arr.length) len = arr.length;
|
5624 |
|
5625 | for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
5626 | arr2[i] = arr[i];
|
5627 | }
|
5628 |
|
5629 | return arr2;
|
5630 | }
|
5631 |
|
5632 | }),
|
5633 |
|
5634 | (function(module, __webpack_exports__, __webpack_require__) {
|
5635 |
|
5636 | "use strict";
|
5637 | __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
|
5638 | function _assertThisInitialized(self) {
|
5639 | if (self === void 0) {
|
5640 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
5641 | }
|
5642 |
|
5643 | return self;
|
5644 | }
|
5645 |
|
5646 | }),
|
5647 |
|
5648 | (function(module, exports, __webpack_require__) {
|
5649 |
|
5650 | var listCacheClear = __webpack_require__(130),
|
5651 | listCacheDelete = __webpack_require__(131),
|
5652 | listCacheGet = __webpack_require__(132),
|
5653 | listCacheHas = __webpack_require__(133),
|
5654 | listCacheSet = __webpack_require__(134);
|
5655 |
|
5656 |
|
5657 |
|
5658 |
|
5659 |
|
5660 |
|
5661 |
|
5662 |
|
5663 | function ListCache(entries) {
|
5664 | var index = -1,
|
5665 | length = entries == null ? 0 : entries.length;
|
5666 |
|
5667 | this.clear();
|
5668 | while (++index < length) {
|
5669 | var entry = entries[index];
|
5670 | this.set(entry[0], entry[1]);
|
5671 | }
|
5672 | }
|
5673 |
|
5674 |
|
5675 | ListCache.prototype.clear = listCacheClear;
|
5676 | ListCache.prototype['delete'] = listCacheDelete;
|
5677 | ListCache.prototype.get = listCacheGet;
|
5678 | ListCache.prototype.has = listCacheHas;
|
5679 | ListCache.prototype.set = listCacheSet;
|
5680 |
|
5681 | module.exports = ListCache;
|
5682 |
|
5683 |
|
5684 | }),
|
5685 |
|
5686 | (function(module, exports, __webpack_require__) {
|
5687 |
|
5688 | var eq = __webpack_require__(62);
|
5689 |
|
5690 |
|
5691 |
|
5692 |
|
5693 |
|
5694 |
|
5695 |
|
5696 |
|
5697 |
|
5698 | function assocIndexOf(array, key) {
|
5699 | var length = array.length;
|
5700 | while (length--) {
|
5701 | if (eq(array[length][0], key)) {
|
5702 | return length;
|
5703 | }
|
5704 | }
|
5705 | return -1;
|
5706 | }
|
5707 |
|
5708 | module.exports = assocIndexOf;
|
5709 |
|
5710 |
|
5711 | }),
|
5712 |
|
5713 | (function(module, exports, __webpack_require__) {
|
5714 |
|
5715 | var getNative = __webpack_require__(22);
|
5716 |
|
5717 |
|
5718 | var nativeCreate = getNative(Object, 'create');
|
5719 |
|
5720 | module.exports = nativeCreate;
|
5721 |
|
5722 |
|
5723 | }),
|
5724 |
|
5725 | (function(module, exports, __webpack_require__) {
|
5726 |
|
5727 | var isKeyable = __webpack_require__(148);
|
5728 |
|
5729 |
|
5730 |
|
5731 |
|
5732 |
|
5733 |
|
5734 |
|
5735 |
|
5736 |
|
5737 | function getMapData(map, key) {
|
5738 | var data = map.__data__;
|
5739 | return isKeyable(key)
|
5740 | ? data[typeof key == 'string' ? 'string' : 'hash']
|
5741 | : data.map;
|
5742 | }
|
5743 |
|
5744 | module.exports = getMapData;
|
5745 |
|
5746 |
|
5747 | }),
|
5748 |
|
5749 | (function(module, exports, __webpack_require__) {
|
5750 |
|
5751 | var isSymbol = __webpack_require__(45);
|
5752 |
|
5753 |
|
5754 | var INFINITY = 1 / 0;
|
5755 |
|
5756 |
|
5757 |
|
5758 |
|
5759 |
|
5760 |
|
5761 |
|
5762 |
|
5763 | function toKey(value) {
|
5764 | if (typeof value == 'string' || isSymbol(value)) {
|
5765 | return value;
|
5766 | }
|
5767 | var result = (value + '');
|
5768 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
5769 | }
|
5770 |
|
5771 | module.exports = toKey;
|
5772 |
|
5773 |
|
5774 | }),
|
5775 |
|
5776 | (function(module, __webpack_exports__, __webpack_require__) {
|
5777 |
|
5778 | "use strict";
|
5779 | __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
|
5780 | var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28);
|
5781 |
|
5782 | function _unsupportedIterableToArray(o, minLen) {
|
5783 | if (!o) return;
|
5784 | if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[ "a"])(o, minLen);
|
5785 | var n = Object.prototype.toString.call(o).slice(8, -1);
|
5786 | if (n === "Object" && o.constructor) n = o.constructor.name;
|
5787 | if (n === "Map" || n === "Set") return Array.from(n);
|
5788 | if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[ "a"])(o, minLen);
|
5789 | }
|
5790 |
|
5791 | }),
|
5792 |
|
5793 | (function(module, exports, __webpack_require__) {
|
5794 |
|
5795 | "use strict";
|
5796 |
|
5797 |
|
5798 | var _interopRequireDefault = __webpack_require__(13);
|
5799 |
|
5800 | Object.defineProperty(exports, "__esModule", {
|
5801 | value: true
|
5802 | });
|
5803 | exports.default = void 0;
|
5804 |
|
5805 | var _react = _interopRequireDefault(__webpack_require__(0));
|
5806 |
|
5807 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
5808 |
|
5809 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
5810 | d: "M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"
|
5811 | }), 'TuneSharp');
|
5812 |
|
5813 | exports.default = _default;
|
5814 |
|
5815 | }),
|
5816 |
|
5817 | (function(module, __webpack_exports__, __webpack_require__) {
|
5818 |
|
5819 | "use strict";
|
5820 |
|
5821 |
|
5822 | var defineProperty = __webpack_require__(14);
|
5823 |
|
5824 |
|
5825 | var objectWithoutProperties = __webpack_require__(5);
|
5826 |
|
5827 |
|
5828 | var deepmerge = __webpack_require__(215);
|
5829 |
|
5830 |
|
5831 | var esm_extends = __webpack_require__(1);
|
5832 |
|
5833 |
|
5834 |
|
5835 |
|
5836 |
|
5837 |
|
5838 | var keys = ['xs', 'sm', 'md', 'lg', 'xl'];
|
5839 |
|
5840 | function createBreakpoints(breakpoints) {
|
5841 | var _breakpoints$values = breakpoints.values,
|
5842 | values = _breakpoints$values === void 0 ? {
|
5843 | xs: 0,
|
5844 | sm: 600,
|
5845 | md: 960,
|
5846 | lg: 1280,
|
5847 | xl: 1920
|
5848 | } : _breakpoints$values,
|
5849 | _breakpoints$unit = breakpoints.unit,
|
5850 | unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,
|
5851 | _breakpoints$step = breakpoints.step,
|
5852 | step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,
|
5853 | other = Object(objectWithoutProperties["a" ])(breakpoints, ["values", "unit", "step"]);
|
5854 |
|
5855 | function up(key) {
|
5856 | var value = typeof values[key] === 'number' ? values[key] : key;
|
5857 | return "@media (min-width:".concat(value).concat(unit, ")");
|
5858 | }
|
5859 |
|
5860 | function down(key) {
|
5861 | var endIndex = keys.indexOf(key) + 1;
|
5862 | var upperbound = values[keys[endIndex]];
|
5863 |
|
5864 | if (endIndex === keys.length) {
|
5865 |
|
5866 | return up('xs');
|
5867 | }
|
5868 |
|
5869 | var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;
|
5870 | return "@media (max-width:".concat(value - step / 100).concat(unit, ")");
|
5871 | }
|
5872 |
|
5873 | function between(start, end) {
|
5874 | var endIndex = keys.indexOf(end);
|
5875 |
|
5876 | if (endIndex === keys.length - 1) {
|
5877 | return up(start);
|
5878 | }
|
5879 |
|
5880 | return "@media (min-width:".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, ")");
|
5881 | }
|
5882 |
|
5883 | function only(key) {
|
5884 | return between(key, key);
|
5885 | }
|
5886 |
|
5887 | function width(key) {
|
5888 | return values[key];
|
5889 | }
|
5890 |
|
5891 | return Object(esm_extends["a" ])({
|
5892 | keys: keys,
|
5893 | values: values,
|
5894 | up: up,
|
5895 | down: down,
|
5896 | between: between,
|
5897 | only: only,
|
5898 | width: width
|
5899 | }, other);
|
5900 | }
|
5901 |
|
5902 |
|
5903 |
|
5904 | function createMixins(breakpoints, spacing, mixins) {
|
5905 | var _toolbar;
|
5906 |
|
5907 | return Object(esm_extends["a" ])({
|
5908 | gutters: function gutters() {
|
5909 | var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
5910 |
|
5911 |
|
5912 |
|
5913 |
|
5914 |
|
5915 |
|
5916 |
|
5917 |
|
5918 |
|
5919 |
|
5920 |
|
5921 |
|
5922 |
|
5923 |
|
5924 |
|
5925 |
|
5926 | return Object(esm_extends["a" ])({
|
5927 | paddingLeft: spacing(2),
|
5928 | paddingRight: spacing(2)
|
5929 | }, styles, Object(defineProperty["a" ])({}, breakpoints.up('sm'), Object(esm_extends["a" ])({
|
5930 | paddingLeft: spacing(3),
|
5931 | paddingRight: spacing(3)
|
5932 | }, styles[breakpoints.up('sm')])));
|
5933 | },
|
5934 | toolbar: (_toolbar = {
|
5935 | minHeight: 56
|
5936 | }, Object(defineProperty["a" ])(_toolbar, "".concat(breakpoints.up('xs'), " and (orientation: landscape)"), {
|
5937 | minHeight: 48
|
5938 | }), Object(defineProperty["a" ])(_toolbar, breakpoints.up('sm'), {
|
5939 | minHeight: 64
|
5940 | }), _toolbar)
|
5941 | }, mixins);
|
5942 | }
|
5943 |
|
5944 | var formatMuiErrorMessage = __webpack_require__(214);
|
5945 |
|
5946 |
|
5947 | var common = {
|
5948 | black: '#000',
|
5949 | white: '#fff'
|
5950 | };
|
5951 | var colors_common = (common);
|
5952 |
|
5953 | var grey = {
|
5954 | 50: '#fafafa',
|
5955 | 100: '#f5f5f5',
|
5956 | 200: '#eeeeee',
|
5957 | 300: '#e0e0e0',
|
5958 | 400: '#bdbdbd',
|
5959 | 500: '#9e9e9e',
|
5960 | 600: '#757575',
|
5961 | 700: '#616161',
|
5962 | 800: '#424242',
|
5963 | 900: '#212121',
|
5964 | A100: '#d5d5d5',
|
5965 | A200: '#aaaaaa',
|
5966 | A400: '#303030',
|
5967 | A700: '#616161'
|
5968 | };
|
5969 | var colors_grey = (grey);
|
5970 |
|
5971 | var indigo = {
|
5972 | 50: '#e8eaf6',
|
5973 | 100: '#c5cae9',
|
5974 | 200: '#9fa8da',
|
5975 | 300: '#7986cb',
|
5976 | 400: '#5c6bc0',
|
5977 | 500: '#3f51b5',
|
5978 | 600: '#3949ab',
|
5979 | 700: '#303f9f',
|
5980 | 800: '#283593',
|
5981 | 900: '#1a237e',
|
5982 | A100: '#8c9eff',
|
5983 | A200: '#536dfe',
|
5984 | A400: '#3d5afe',
|
5985 | A700: '#304ffe'
|
5986 | };
|
5987 | var colors_indigo = (indigo);
|
5988 |
|
5989 | var pink = {
|
5990 | 50: '#fce4ec',
|
5991 | 100: '#f8bbd0',
|
5992 | 200: '#f48fb1',
|
5993 | 300: '#f06292',
|
5994 | 400: '#ec407a',
|
5995 | 500: '#e91e63',
|
5996 | 600: '#d81b60',
|
5997 | 700: '#c2185b',
|
5998 | 800: '#ad1457',
|
5999 | 900: '#880e4f',
|
6000 | A100: '#ff80ab',
|
6001 | A200: '#ff4081',
|
6002 | A400: '#f50057',
|
6003 | A700: '#c51162'
|
6004 | };
|
6005 | var colors_pink = (pink);
|
6006 |
|
6007 | var red = {
|
6008 | 50: '#ffebee',
|
6009 | 100: '#ffcdd2',
|
6010 | 200: '#ef9a9a',
|
6011 | 300: '#e57373',
|
6012 | 400: '#ef5350',
|
6013 | 500: '#f44336',
|
6014 | 600: '#e53935',
|
6015 | 700: '#d32f2f',
|
6016 | 800: '#c62828',
|
6017 | 900: '#b71c1c',
|
6018 | A100: '#ff8a80',
|
6019 | A200: '#ff5252',
|
6020 | A400: '#ff1744',
|
6021 | A700: '#d50000'
|
6022 | };
|
6023 | var colors_red = (red);
|
6024 |
|
6025 | var orange = {
|
6026 | 50: '#fff3e0',
|
6027 | 100: '#ffe0b2',
|
6028 | 200: '#ffcc80',
|
6029 | 300: '#ffb74d',
|
6030 | 400: '#ffa726',
|
6031 | 500: '#ff9800',
|
6032 | 600: '#fb8c00',
|
6033 | 700: '#f57c00',
|
6034 | 800: '#ef6c00',
|
6035 | 900: '#e65100',
|
6036 | A100: '#ffd180',
|
6037 | A200: '#ffab40',
|
6038 | A400: '#ff9100',
|
6039 | A700: '#ff6d00'
|
6040 | };
|
6041 | var colors_orange = (orange);
|
6042 |
|
6043 | var blue = {
|
6044 | 50: '#e3f2fd',
|
6045 | 100: '#bbdefb',
|
6046 | 200: '#90caf9',
|
6047 | 300: '#64b5f6',
|
6048 | 400: '#42a5f5',
|
6049 | 500: '#2196f3',
|
6050 | 600: '#1e88e5',
|
6051 | 700: '#1976d2',
|
6052 | 800: '#1565c0',
|
6053 | 900: '#0d47a1',
|
6054 | A100: '#82b1ff',
|
6055 | A200: '#448aff',
|
6056 | A400: '#2979ff',
|
6057 | A700: '#2962ff'
|
6058 | };
|
6059 | var colors_blue = (blue);
|
6060 |
|
6061 | var green = {
|
6062 | 50: '#e8f5e9',
|
6063 | 100: '#c8e6c9',
|
6064 | 200: '#a5d6a7',
|
6065 | 300: '#81c784',
|
6066 | 400: '#66bb6a',
|
6067 | 500: '#4caf50',
|
6068 | 600: '#43a047',
|
6069 | 700: '#388e3c',
|
6070 | 800: '#2e7d32',
|
6071 | 900: '#1b5e20',
|
6072 | A100: '#b9f6ca',
|
6073 | A200: '#69f0ae',
|
6074 | A400: '#00e676',
|
6075 | A700: '#00c853'
|
6076 | };
|
6077 | var colors_green = (green);
|
6078 |
|
6079 | var colorManipulator = __webpack_require__(9);
|
6080 |
|
6081 |
|
6082 |
|
6083 |
|
6084 |
|
6085 |
|
6086 |
|
6087 |
|
6088 |
|
6089 |
|
6090 |
|
6091 |
|
6092 |
|
6093 |
|
6094 |
|
6095 | var light = {
|
6096 |
|
6097 | text: {
|
6098 |
|
6099 | primary: 'rgba(0, 0, 0, 0.87)',
|
6100 |
|
6101 | secondary: 'rgba(0, 0, 0, 0.54)',
|
6102 |
|
6103 | disabled: 'rgba(0, 0, 0, 0.38)',
|
6104 |
|
6105 | hint: 'rgba(0, 0, 0, 0.38)'
|
6106 | },
|
6107 |
|
6108 | divider: 'rgba(0, 0, 0, 0.12)',
|
6109 |
|
6110 |
|
6111 | background: {
|
6112 | paper: colors_common.white,
|
6113 | default: colors_grey[50]
|
6114 | },
|
6115 |
|
6116 | action: {
|
6117 |
|
6118 | active: 'rgba(0, 0, 0, 0.54)',
|
6119 |
|
6120 | hover: 'rgba(0, 0, 0, 0.04)',
|
6121 | hoverOpacity: 0.04,
|
6122 |
|
6123 | selected: 'rgba(0, 0, 0, 0.08)',
|
6124 | selectedOpacity: 0.08,
|
6125 |
|
6126 | disabled: 'rgba(0, 0, 0, 0.26)',
|
6127 |
|
6128 | disabledBackground: 'rgba(0, 0, 0, 0.12)',
|
6129 | disabledOpacity: 0.38,
|
6130 | focus: 'rgba(0, 0, 0, 0.12)',
|
6131 | focusOpacity: 0.12,
|
6132 | activatedOpacity: 0.12
|
6133 | }
|
6134 | };
|
6135 | var dark = {
|
6136 | text: {
|
6137 | primary: colors_common.white,
|
6138 | secondary: 'rgba(255, 255, 255, 0.7)',
|
6139 | disabled: 'rgba(255, 255, 255, 0.5)',
|
6140 | hint: 'rgba(255, 255, 255, 0.5)',
|
6141 | icon: 'rgba(255, 255, 255, 0.5)'
|
6142 | },
|
6143 | divider: 'rgba(255, 255, 255, 0.12)',
|
6144 | background: {
|
6145 | paper: colors_grey[800],
|
6146 | default: '#303030'
|
6147 | },
|
6148 | action: {
|
6149 | active: colors_common.white,
|
6150 | hover: 'rgba(255, 255, 255, 0.08)',
|
6151 | hoverOpacity: 0.08,
|
6152 | selected: 'rgba(255, 255, 255, 0.16)',
|
6153 | selectedOpacity: 0.16,
|
6154 | disabled: 'rgba(255, 255, 255, 0.3)',
|
6155 | disabledBackground: 'rgba(255, 255, 255, 0.12)',
|
6156 | disabledOpacity: 0.38,
|
6157 | focus: 'rgba(255, 255, 255, 0.12)',
|
6158 | focusOpacity: 0.12,
|
6159 | activatedOpacity: 0.24
|
6160 | }
|
6161 | };
|
6162 |
|
6163 | function addLightOrDark(intent, direction, shade, tonalOffset) {
|
6164 | var tonalOffsetLight = tonalOffset.light || tonalOffset;
|
6165 | var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;
|
6166 |
|
6167 | if (!intent[direction]) {
|
6168 | if (intent.hasOwnProperty(shade)) {
|
6169 | intent[direction] = intent[shade];
|
6170 | } else if (direction === 'light') {
|
6171 | intent.light = Object(colorManipulator["d" ])(intent.main, tonalOffsetLight);
|
6172 | } else if (direction === 'dark') {
|
6173 | intent.dark = Object(colorManipulator["a" ])(intent.main, tonalOffsetDark);
|
6174 | }
|
6175 | }
|
6176 | }
|
6177 |
|
6178 | function createPalette(palette) {
|
6179 | var _palette$primary = palette.primary,
|
6180 | primary = _palette$primary === void 0 ? {
|
6181 | light: colors_indigo[300],
|
6182 | main: colors_indigo[500],
|
6183 | dark: colors_indigo[700]
|
6184 | } : _palette$primary,
|
6185 | _palette$secondary = palette.secondary,
|
6186 | secondary = _palette$secondary === void 0 ? {
|
6187 | light: colors_pink.A200,
|
6188 | main: colors_pink.A400,
|
6189 | dark: colors_pink.A700
|
6190 | } : _palette$secondary,
|
6191 | _palette$error = palette.error,
|
6192 | error = _palette$error === void 0 ? {
|
6193 | light: colors_red[300],
|
6194 | main: colors_red[500],
|
6195 | dark: colors_red[700]
|
6196 | } : _palette$error,
|
6197 | _palette$warning = palette.warning,
|
6198 | warning = _palette$warning === void 0 ? {
|
6199 | light: colors_orange[300],
|
6200 | main: colors_orange[500],
|
6201 | dark: colors_orange[700]
|
6202 | } : _palette$warning,
|
6203 | _palette$info = palette.info,
|
6204 | info = _palette$info === void 0 ? {
|
6205 | light: colors_blue[300],
|
6206 | main: colors_blue[500],
|
6207 | dark: colors_blue[700]
|
6208 | } : _palette$info,
|
6209 | _palette$success = palette.success,
|
6210 | success = _palette$success === void 0 ? {
|
6211 | light: colors_green[300],
|
6212 | main: colors_green[500],
|
6213 | dark: colors_green[700]
|
6214 | } : _palette$success,
|
6215 | _palette$type = palette.type,
|
6216 | type = _palette$type === void 0 ? 'light' : _palette$type,
|
6217 | _palette$contrastThre = palette.contrastThreshold,
|
6218 | contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,
|
6219 | _palette$tonalOffset = palette.tonalOffset,
|
6220 | tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,
|
6221 | other = Object(objectWithoutProperties["a" ])(palette, ["primary", "secondary", "error", "warning", "info", "success", "type", "contrastThreshold", "tonalOffset"]);
|
6222 |
|
6223 |
|
6224 |
|
6225 |
|
6226 | function getContrastText(background) {
|
6227 | var contrastText = Object(colorManipulator["c" ])(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;
|
6228 |
|
6229 | if (false) { var contrast; }
|
6230 |
|
6231 | return contrastText;
|
6232 | }
|
6233 |
|
6234 | var augmentColor = function augmentColor(color) {
|
6235 | var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
6236 | var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
|
6237 | var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;
|
6238 | color = Object(esm_extends["a" ])({}, color);
|
6239 |
|
6240 | if (!color.main && color[mainShade]) {
|
6241 | color.main = color[mainShade];
|
6242 | }
|
6243 |
|
6244 | if (!color.main) {
|
6245 | throw new Error( false ? undefined : Object(formatMuiErrorMessage["a" ])(4, mainShade));
|
6246 | }
|
6247 |
|
6248 | if (typeof color.main !== 'string') {
|
6249 | throw new Error( false ? undefined : Object(formatMuiErrorMessage["a" ])(5, JSON.stringify(color.main)));
|
6250 | }
|
6251 |
|
6252 | addLightOrDark(color, 'light', lightShade, tonalOffset);
|
6253 | addLightOrDark(color, 'dark', darkShade, tonalOffset);
|
6254 |
|
6255 | if (!color.contrastText) {
|
6256 | color.contrastText = getContrastText(color.main);
|
6257 | }
|
6258 |
|
6259 | return color;
|
6260 | };
|
6261 |
|
6262 | var types = {
|
6263 | dark: dark,
|
6264 | light: light
|
6265 | };
|
6266 |
|
6267 | if (false) {}
|
6268 |
|
6269 | var paletteOutput = Object(deepmerge["a" ])(Object(esm_extends["a" ])({
|
6270 |
|
6271 | common: colors_common,
|
6272 |
|
6273 | type: type,
|
6274 |
|
6275 | primary: augmentColor(primary),
|
6276 |
|
6277 | secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),
|
6278 |
|
6279 | error: augmentColor(error),
|
6280 |
|
6281 | warning: augmentColor(warning),
|
6282 |
|
6283 | info: augmentColor(info),
|
6284 |
|
6285 | success: augmentColor(success),
|
6286 |
|
6287 | grey: colors_grey,
|
6288 |
|
6289 |
|
6290 | contrastThreshold: contrastThreshold,
|
6291 |
|
6292 | getContrastText: getContrastText,
|
6293 |
|
6294 | augmentColor: augmentColor,
|
6295 |
|
6296 |
|
6297 |
|
6298 | tonalOffset: tonalOffset
|
6299 | }, types[type]), other);
|
6300 | return paletteOutput;
|
6301 | }
|
6302 |
|
6303 |
|
6304 |
|
6305 |
|
6306 |
|
6307 | function round(value) {
|
6308 | return Math.round(value * 1e5) / 1e5;
|
6309 | }
|
6310 |
|
6311 | var caseAllCaps = {
|
6312 | textTransform: 'uppercase'
|
6313 | };
|
6314 | var defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif';
|
6315 |
|
6316 |
|
6317 |
|
6318 |
|
6319 |
|
6320 | function createTypography(palette, typography) {
|
6321 | var _ref = typeof typography === 'function' ? typography(palette) : typography,
|
6322 | _ref$fontFamily = _ref.fontFamily,
|
6323 | fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,
|
6324 | _ref$fontSize = _ref.fontSize,
|
6325 | fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,
|
6326 | _ref$fontWeightLight = _ref.fontWeightLight,
|
6327 | fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,
|
6328 | _ref$fontWeightRegula = _ref.fontWeightRegular,
|
6329 | fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,
|
6330 | _ref$fontWeightMedium = _ref.fontWeightMedium,
|
6331 | fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,
|
6332 | _ref$fontWeightBold = _ref.fontWeightBold,
|
6333 | fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,
|
6334 | _ref$htmlFontSize = _ref.htmlFontSize,
|
6335 | htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,
|
6336 | allVariants = _ref.allVariants,
|
6337 | pxToRem2 = _ref.pxToRem,
|
6338 | other = Object(objectWithoutProperties["a" ])(_ref, ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]);
|
6339 |
|
6340 | if (false) {}
|
6341 |
|
6342 | var coef = fontSize / 14;
|
6343 |
|
6344 | var pxToRem = pxToRem2 || function (size) {
|
6345 | return "".concat(size / htmlFontSize * coef, "rem");
|
6346 | };
|
6347 |
|
6348 | var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {
|
6349 | return Object(esm_extends["a" ])({
|
6350 | fontFamily: fontFamily,
|
6351 | fontWeight: fontWeight,
|
6352 | fontSize: pxToRem(size),
|
6353 |
|
6354 | lineHeight: lineHeight
|
6355 | }, fontFamily === defaultFontFamily ? {
|
6356 | letterSpacing: "".concat(round(letterSpacing / size), "em")
|
6357 | } : {}, casing, allVariants);
|
6358 | };
|
6359 |
|
6360 | var variants = {
|
6361 | h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),
|
6362 | h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),
|
6363 | h3: buildVariant(fontWeightRegular, 48, 1.167, 0),
|
6364 | h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),
|
6365 | h5: buildVariant(fontWeightRegular, 24, 1.334, 0),
|
6366 | h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),
|
6367 | subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),
|
6368 | subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),
|
6369 | body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),
|
6370 | body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),
|
6371 | button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),
|
6372 | caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
|
6373 | overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
|
6374 | };
|
6375 | return Object(deepmerge["a" ])(Object(esm_extends["a" ])({
|
6376 | htmlFontSize: htmlFontSize,
|
6377 | pxToRem: pxToRem,
|
6378 | round: round,
|
6379 |
|
6380 | fontFamily: fontFamily,
|
6381 | fontSize: fontSize,
|
6382 | fontWeightLight: fontWeightLight,
|
6383 | fontWeightRegular: fontWeightRegular,
|
6384 | fontWeightMedium: fontWeightMedium,
|
6385 | fontWeightBold: fontWeightBold
|
6386 | }, variants), other, {
|
6387 | clone: false
|
6388 |
|
6389 | });
|
6390 | }
|
6391 |
|
6392 | var shadowKeyUmbraOpacity = 0.2;
|
6393 | var shadowKeyPenumbraOpacity = 0.14;
|
6394 | var shadowAmbientShadowOpacity = 0.12;
|
6395 |
|
6396 | function createShadow() {
|
6397 | return ["".concat(arguments.length <= 0 ? undefined : arguments[0], "px ").concat(arguments.length <= 1 ? undefined : arguments[1], "px ").concat(arguments.length <= 2 ? undefined : arguments[2], "px ").concat(arguments.length <= 3 ? undefined : arguments[3], "px rgba(0,0,0,").concat(shadowKeyUmbraOpacity, ")"), "".concat(arguments.length <= 4 ? undefined : arguments[4], "px ").concat(arguments.length <= 5 ? undefined : arguments[5], "px ").concat(arguments.length <= 6 ? undefined : arguments[6], "px ").concat(arguments.length <= 7 ? undefined : arguments[7], "px rgba(0,0,0,").concat(shadowKeyPenumbraOpacity, ")"), "".concat(arguments.length <= 8 ? undefined : arguments[8], "px ").concat(arguments.length <= 9 ? undefined : arguments[9], "px ").concat(arguments.length <= 10 ? undefined : arguments[10], "px ").concat(arguments.length <= 11 ? undefined : arguments[11], "px rgba(0,0,0,").concat(shadowAmbientShadowOpacity, ")")].join(',');
|
6398 | }
|
6399 |
|
6400 |
|
6401 | var shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
|
6402 | var styles_shadows = (shadows);
|
6403 |
|
6404 | var shape = {
|
6405 | borderRadius: 4
|
6406 | };
|
6407 | var styles_shape = (shape);
|
6408 |
|
6409 | var slicedToArray = __webpack_require__(21);
|
6410 |
|
6411 |
|
6412 | var toConsumableArray = __webpack_require__(20);
|
6413 |
|
6414 |
|
6415 | var esm_typeof = __webpack_require__(27);
|
6416 |
|
6417 |
|
6418 | var prop_types = __webpack_require__(4);
|
6419 |
|
6420 |
|
6421 |
|
6422 |
|
6423 | function merge(acc, item) {
|
6424 | if (!item) {
|
6425 | return acc;
|
6426 | }
|
6427 |
|
6428 | return Object(deepmerge["a" ])(acc, item, {
|
6429 | clone: false
|
6430 |
|
6431 | });
|
6432 | }
|
6433 |
|
6434 | var esm_merge = (merge);
|
6435 |
|
6436 |
|
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 | var breakpoints_values = {
|
6444 | xs: 0,
|
6445 | sm: 600,
|
6446 | md: 960,
|
6447 | lg: 1280,
|
6448 | xl: 1920
|
6449 | };
|
6450 | var defaultBreakpoints = {
|
6451 |
|
6452 |
|
6453 | keys: ['xs', 'sm', 'md', 'lg', 'xl'],
|
6454 | up: function up(key) {
|
6455 | return "@media (min-width:".concat(breakpoints_values[key], "px)");
|
6456 | }
|
6457 | };
|
6458 | function handleBreakpoints(props, propValue, styleFromPropValue) {
|
6459 | if (false) {}
|
6460 |
|
6461 | if (Array.isArray(propValue)) {
|
6462 | var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
6463 | return propValue.reduce(function (acc, item, index) {
|
6464 | acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);
|
6465 | return acc;
|
6466 | }, {});
|
6467 | }
|
6468 |
|
6469 | if (Object(esm_typeof["a" ])(propValue) === 'object') {
|
6470 | var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
6471 |
|
6472 | return Object.keys(propValue).reduce(function (acc, breakpoint) {
|
6473 | acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);
|
6474 | return acc;
|
6475 | }, {});
|
6476 | }
|
6477 |
|
6478 | var output = styleFromPropValue(propValue);
|
6479 | return output;
|
6480 | }
|
6481 |
|
6482 | function breakpoints_breakpoints(styleFunction) {
|
6483 | var newStyleFunction = function newStyleFunction(props) {
|
6484 | var base = styleFunction(props);
|
6485 | var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
6486 | var extended = themeBreakpoints.keys.reduce(function (acc, key) {
|
6487 | if (props[key]) {
|
6488 | acc = acc || {};
|
6489 | acc[themeBreakpoints.up(key)] = styleFunction(Object(esm_extends["a" ])({
|
6490 | theme: props.theme
|
6491 | }, props[key]));
|
6492 | }
|
6493 |
|
6494 | return acc;
|
6495 | }, null);
|
6496 | return esm_merge(base, extended);
|
6497 | };
|
6498 |
|
6499 | newStyleFunction.propTypes = false ? undefined : {};
|
6500 | newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(Object(toConsumableArray["a" ])(styleFunction.filterProps));
|
6501 | return newStyleFunction;
|
6502 | }
|
6503 |
|
6504 | var esm_breakpoints = (breakpoints_breakpoints);
|
6505 |
|
6506 | function memoize(fn) {
|
6507 | var cache = {};
|
6508 | return function (arg) {
|
6509 | if (cache[arg] === undefined) {
|
6510 | cache[arg] = fn(arg);
|
6511 | }
|
6512 |
|
6513 | return cache[arg];
|
6514 | };
|
6515 | }
|
6516 |
|
6517 |
|
6518 |
|
6519 |
|
6520 |
|
6521 |
|
6522 | var properties = {
|
6523 | m: 'margin',
|
6524 | p: 'padding'
|
6525 | };
|
6526 | var directions = {
|
6527 | t: 'Top',
|
6528 | r: 'Right',
|
6529 | b: 'Bottom',
|
6530 | l: 'Left',
|
6531 | x: ['Left', 'Right'],
|
6532 | y: ['Top', 'Bottom']
|
6533 | };
|
6534 | var aliases = {
|
6535 | marginX: 'mx',
|
6536 | marginY: 'my',
|
6537 | paddingX: 'px',
|
6538 | paddingY: 'py'
|
6539 | };
|
6540 |
|
6541 |
|
6542 |
|
6543 | var getCssProperties = memoize(function (prop) {
|
6544 |
|
6545 | if (prop.length > 2) {
|
6546 | if (aliases[prop]) {
|
6547 | prop = aliases[prop];
|
6548 | } else {
|
6549 | return [prop];
|
6550 | }
|
6551 | }
|
6552 |
|
6553 | var _prop$split = prop.split(''),
|
6554 | _prop$split2 = Object(slicedToArray["a" ])(_prop$split, 2),
|
6555 | a = _prop$split2[0],
|
6556 | b = _prop$split2[1];
|
6557 |
|
6558 | var property = properties[a];
|
6559 | var direction = directions[b] || '';
|
6560 | return Array.isArray(direction) ? direction.map(function (dir) {
|
6561 | return property + dir;
|
6562 | }) : [property + direction];
|
6563 | });
|
6564 | var spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY'];
|
6565 | function createUnarySpacing(theme) {
|
6566 | var themeSpacing = theme.spacing || 8;
|
6567 |
|
6568 | if (typeof themeSpacing === 'number') {
|
6569 | return function (abs) {
|
6570 | if (false) {}
|
6571 |
|
6572 | return themeSpacing * abs;
|
6573 | };
|
6574 | }
|
6575 |
|
6576 | if (Array.isArray(themeSpacing)) {
|
6577 | return function (abs) {
|
6578 | if (false) {}
|
6579 |
|
6580 | return themeSpacing[abs];
|
6581 | };
|
6582 | }
|
6583 |
|
6584 | if (typeof themeSpacing === 'function') {
|
6585 | return themeSpacing;
|
6586 | }
|
6587 |
|
6588 | if (false) {}
|
6589 |
|
6590 | return function () {
|
6591 | return undefined;
|
6592 | };
|
6593 | }
|
6594 |
|
6595 | function getValue(transformer, propValue) {
|
6596 | if (typeof propValue === 'string') {
|
6597 | return propValue;
|
6598 | }
|
6599 |
|
6600 | var abs = Math.abs(propValue);
|
6601 | var transformed = transformer(abs);
|
6602 |
|
6603 | if (propValue >= 0) {
|
6604 | return transformed;
|
6605 | }
|
6606 |
|
6607 | if (typeof transformed === 'number') {
|
6608 | return -transformed;
|
6609 | }
|
6610 |
|
6611 | return "-".concat(transformed);
|
6612 | }
|
6613 |
|
6614 | function getStyleFromPropValue(cssProperties, transformer) {
|
6615 | return function (propValue) {
|
6616 | return cssProperties.reduce(function (acc, cssProperty) {
|
6617 | acc[cssProperty] = getValue(transformer, propValue);
|
6618 | return acc;
|
6619 | }, {});
|
6620 | };
|
6621 | }
|
6622 |
|
6623 | function spacing_spacing(props) {
|
6624 | var theme = props.theme;
|
6625 | var transformer = createUnarySpacing(theme);
|
6626 | return Object.keys(props).map(function (prop) {
|
6627 |
|
6628 |
|
6629 | if (spacingKeys.indexOf(prop) === -1) {
|
6630 | return null;
|
6631 | }
|
6632 |
|
6633 | var cssProperties = getCssProperties(prop);
|
6634 | var styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
|
6635 | var propValue = props[prop];
|
6636 | return handleBreakpoints(props, propValue, styleFromPropValue);
|
6637 | }).reduce(esm_merge, {});
|
6638 | }
|
6639 |
|
6640 | spacing_spacing.propTypes = false ? undefined : {};
|
6641 | spacing_spacing.filterProps = spacingKeys;
|
6642 | var esm_spacing = (spacing_spacing);
|
6643 |
|
6644 |
|
6645 | var warnOnce;
|
6646 | function createSpacing() {
|
6647 | var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;
|
6648 |
|
6649 |
|
6650 | if (spacingInput.mui) {
|
6651 | return spacingInput;
|
6652 | }
|
6653 |
|
6654 |
|
6655 |
|
6656 |
|
6657 | var transform = createUnarySpacing({
|
6658 | spacing: spacingInput
|
6659 | });
|
6660 |
|
6661 | var spacing = function spacing() {
|
6662 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
6663 | args[_key] = arguments[_key];
|
6664 | }
|
6665 |
|
6666 | if (false) {}
|
6667 |
|
6668 | if (args.length === 0) {
|
6669 | return transform(1);
|
6670 | }
|
6671 |
|
6672 | if (args.length === 1) {
|
6673 | return transform(args[0]);
|
6674 | }
|
6675 |
|
6676 | return args.map(function (argument) {
|
6677 | if (typeof argument === 'string') {
|
6678 | return argument;
|
6679 | }
|
6680 |
|
6681 | var output = transform(argument);
|
6682 | return typeof output === 'number' ? "".concat(output, "px") : output;
|
6683 | }).join(' ');
|
6684 | };
|
6685 |
|
6686 |
|
6687 | Object.defineProperty(spacing, 'unit', {
|
6688 | get: function get() {
|
6689 | if (false) {}
|
6690 |
|
6691 | return spacingInput;
|
6692 | }
|
6693 | });
|
6694 | spacing.mui = true;
|
6695 | return spacing;
|
6696 | }
|
6697 |
|
6698 |
|
6699 |
|
6700 |
|
6701 | var easing = {
|
6702 |
|
6703 | easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
6704 |
|
6705 |
|
6706 | easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
|
6707 |
|
6708 | easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
|
6709 |
|
6710 | sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'
|
6711 | };
|
6712 |
|
6713 |
|
6714 | var duration = {
|
6715 | shortest: 150,
|
6716 | shorter: 200,
|
6717 | short: 250,
|
6718 |
|
6719 | standard: 300,
|
6720 |
|
6721 | complex: 375,
|
6722 |
|
6723 | enteringScreen: 225,
|
6724 |
|
6725 | leavingScreen: 195
|
6726 | };
|
6727 |
|
6728 | function formatMs(milliseconds) {
|
6729 | return "".concat(Math.round(milliseconds), "ms");
|
6730 | }
|
6731 |
|
6732 |
|
6733 |
|
6734 |
|
6735 |
|
6736 |
|
6737 |
|
6738 |
|
6739 |
|
6740 |
|
6741 | var transitions = ({
|
6742 | easing: easing,
|
6743 | duration: duration,
|
6744 | create: function create() {
|
6745 | var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];
|
6746 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
6747 |
|
6748 | var _options$duration = options.duration,
|
6749 | durationOption = _options$duration === void 0 ? duration.standard : _options$duration,
|
6750 | _options$easing = options.easing,
|
6751 | easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,
|
6752 | _options$delay = options.delay,
|
6753 | delay = _options$delay === void 0 ? 0 : _options$delay,
|
6754 | other = Object(objectWithoutProperties["a" ])(options, ["duration", "easing", "delay"]);
|
6755 |
|
6756 | if (false) { var isNumber, isString; }
|
6757 |
|
6758 | return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {
|
6759 | return "".concat(animatedProp, " ").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), " ").concat(easingOption, " ").concat(typeof delay === 'string' ? delay : formatMs(delay));
|
6760 | }).join(',');
|
6761 | },
|
6762 | getAutoHeightDuration: function getAutoHeightDuration(height) {
|
6763 | if (!height) {
|
6764 | return 0;
|
6765 | }
|
6766 |
|
6767 | var constant = height / 36;
|
6768 |
|
6769 | return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);
|
6770 | }
|
6771 | });
|
6772 |
|
6773 |
|
6774 |
|
6775 | var zIndex = {
|
6776 | mobileStepper: 1000,
|
6777 | speedDial: 1050,
|
6778 | appBar: 1100,
|
6779 | drawer: 1200,
|
6780 | modal: 1300,
|
6781 | snackbar: 1400,
|
6782 | tooltip: 1500
|
6783 | };
|
6784 | var styles_zIndex = (zIndex);
|
6785 |
|
6786 |
|
6787 |
|
6788 |
|
6789 |
|
6790 |
|
6791 |
|
6792 |
|
6793 |
|
6794 |
|
6795 |
|
6796 |
|
6797 |
|
6798 |
|
6799 | function createMuiTheme() {
|
6800 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
6801 |
|
6802 | var _options$breakpoints = options.breakpoints,
|
6803 | breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,
|
6804 | _options$mixins = options.mixins,
|
6805 | mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,
|
6806 | _options$palette = options.palette,
|
6807 | paletteInput = _options$palette === void 0 ? {} : _options$palette,
|
6808 | spacingInput = options.spacing,
|
6809 | _options$typography = options.typography,
|
6810 | typographyInput = _options$typography === void 0 ? {} : _options$typography,
|
6811 | other = Object(objectWithoutProperties["a" ])(options, ["breakpoints", "mixins", "palette", "spacing", "typography"]);
|
6812 |
|
6813 | var palette = createPalette(paletteInput);
|
6814 | var breakpoints = createBreakpoints(breakpointsInput);
|
6815 | var spacing = createSpacing(spacingInput);
|
6816 | var muiTheme = Object(deepmerge["a" ])({
|
6817 | breakpoints: breakpoints,
|
6818 | direction: 'ltr',
|
6819 | mixins: createMixins(breakpoints, spacing, mixinsInput),
|
6820 | overrides: {},
|
6821 |
|
6822 | palette: palette,
|
6823 | props: {},
|
6824 |
|
6825 | shadows: styles_shadows,
|
6826 | typography: createTypography(palette, typographyInput),
|
6827 | spacing: spacing,
|
6828 | shape: styles_shape,
|
6829 | transitions: transitions,
|
6830 | zIndex: styles_zIndex
|
6831 | }, other);
|
6832 |
|
6833 | for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
6834 | args[_key - 1] = arguments[_key];
|
6835 | }
|
6836 |
|
6837 | muiTheme = args.reduce(function (acc, argument) {
|
6838 | return Object(deepmerge["a" ])(acc, argument);
|
6839 | }, muiTheme);
|
6840 |
|
6841 | if (false) { var traverse, pseudoClasses; }
|
6842 |
|
6843 | return muiTheme;
|
6844 | }
|
6845 |
|
6846 | var styles_createMuiTheme = (createMuiTheme);
|
6847 |
|
6848 |
|
6849 | var defaultTheme = styles_createMuiTheme();
|
6850 | var styles_defaultTheme = __webpack_exports__["a"] = (defaultTheme);
|
6851 |
|
6852 | }),
|
6853 |
|
6854 | (function(module, exports, __webpack_require__) {
|
6855 |
|
6856 | var baseIsArguments = __webpack_require__(98),
|
6857 | isObjectLike = __webpack_require__(26);
|
6858 |
|
6859 |
|
6860 | var objectProto = Object.prototype;
|
6861 |
|
6862 |
|
6863 | var hasOwnProperty = objectProto.hasOwnProperty;
|
6864 |
|
6865 |
|
6866 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
6867 |
|
6868 |
|
6869 |
|
6870 |
|
6871 |
|
6872 |
|
6873 |
|
6874 |
|
6875 |
|
6876 |
|
6877 |
|
6878 |
|
6879 |
|
6880 |
|
6881 |
|
6882 |
|
6883 |
|
6884 |
|
6885 |
|
6886 | var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
6887 | return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
6888 | !propertyIsEnumerable.call(value, 'callee');
|
6889 | };
|
6890 |
|
6891 | module.exports = isArguments;
|
6892 |
|
6893 |
|
6894 | }),
|
6895 |
|
6896 | (function(module, exports) {
|
6897 |
|
6898 |
|
6899 |
|
6900 |
|
6901 |
|
6902 |
|
6903 |
|
6904 |
|
6905 |
|
6906 |
|
6907 |
|
6908 |
|
6909 |
|
6910 |
|
6911 |
|
6912 |
|
6913 |
|
6914 |
|
6915 |
|
6916 |
|
6917 |
|
6918 |
|
6919 |
|
6920 |
|
6921 |
|
6922 |
|
6923 | function isObject(value) {
|
6924 | var type = typeof value;
|
6925 | return value != null && (type == 'object' || type == 'function');
|
6926 | }
|
6927 |
|
6928 | module.exports = isObject;
|
6929 |
|
6930 |
|
6931 | }),
|
6932 |
|
6933 | (function(module, exports, __webpack_require__) {
|
6934 |
|
6935 | var arrayLikeKeys = __webpack_require__(116),
|
6936 | baseKeys = __webpack_require__(122),
|
6937 | isArrayLike = __webpack_require__(60);
|
6938 |
|
6939 |
|
6940 |
|
6941 |
|
6942 |
|
6943 |
|
6944 |
|
6945 |
|
6946 |
|
6947 |
|
6948 |
|
6949 |
|
6950 |
|
6951 |
|
6952 |
|
6953 |
|
6954 |
|
6955 |
|
6956 |
|
6957 |
|
6958 |
|
6959 |
|
6960 |
|
6961 |
|
6962 |
|
6963 |
|
6964 |
|
6965 |
|
6966 |
|
6967 | function keys(object) {
|
6968 | return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
6969 | }
|
6970 |
|
6971 | module.exports = keys;
|
6972 |
|
6973 |
|
6974 | }),
|
6975 |
|
6976 | (function(module, exports) {
|
6977 |
|
6978 |
|
6979 | var MAX_SAFE_INTEGER = 9007199254740991;
|
6980 |
|
6981 |
|
6982 |
|
6983 |
|
6984 |
|
6985 |
|
6986 |
|
6987 |
|
6988 |
|
6989 |
|
6990 |
|
6991 |
|
6992 |
|
6993 |
|
6994 |
|
6995 |
|
6996 |
|
6997 |
|
6998 |
|
6999 |
|
7000 |
|
7001 |
|
7002 |
|
7003 |
|
7004 |
|
7005 |
|
7006 |
|
7007 | function isLength(value) {
|
7008 | return typeof value == 'number' &&
|
7009 | value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
7010 | }
|
7011 |
|
7012 | module.exports = isLength;
|
7013 |
|
7014 |
|
7015 | }),
|
7016 |
|
7017 | (function(module, exports, __webpack_require__) {
|
7018 |
|
7019 | var getNative = __webpack_require__(22),
|
7020 | root = __webpack_require__(17);
|
7021 |
|
7022 |
|
7023 | var Map = getNative(root, 'Map');
|
7024 |
|
7025 | module.exports = Map;
|
7026 |
|
7027 |
|
7028 | }),
|
7029 |
|
7030 | (function(module, exports, __webpack_require__) {
|
7031 |
|
7032 | var mapCacheClear = __webpack_require__(140),
|
7033 | mapCacheDelete = __webpack_require__(147),
|
7034 | mapCacheGet = __webpack_require__(149),
|
7035 | mapCacheHas = __webpack_require__(150),
|
7036 | mapCacheSet = __webpack_require__(151);
|
7037 |
|
7038 |
|
7039 |
|
7040 |
|
7041 |
|
7042 |
|
7043 |
|
7044 |
|
7045 | function MapCache(entries) {
|
7046 | var index = -1,
|
7047 | length = entries == null ? 0 : entries.length;
|
7048 |
|
7049 | this.clear();
|
7050 | while (++index < length) {
|
7051 | var entry = entries[index];
|
7052 | this.set(entry[0], entry[1]);
|
7053 | }
|
7054 | }
|
7055 |
|
7056 |
|
7057 | MapCache.prototype.clear = mapCacheClear;
|
7058 | MapCache.prototype['delete'] = mapCacheDelete;
|
7059 | MapCache.prototype.get = mapCacheGet;
|
7060 | MapCache.prototype.has = mapCacheHas;
|
7061 | MapCache.prototype.set = mapCacheSet;
|
7062 |
|
7063 | module.exports = MapCache;
|
7064 |
|
7065 |
|
7066 | }),
|
7067 |
|
7068 | (function(module, exports, __webpack_require__) {
|
7069 |
|
7070 | var isArray = __webpack_require__(16),
|
7071 | isSymbol = __webpack_require__(45);
|
7072 |
|
7073 |
|
7074 | var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
7075 | reIsPlainProp = /^\w*$/;
|
7076 |
|
7077 |
|
7078 |
|
7079 |
|
7080 |
|
7081 |
|
7082 |
|
7083 |
|
7084 |
|
7085 | function isKey(value, object) {
|
7086 | if (isArray(value)) {
|
7087 | return false;
|
7088 | }
|
7089 | var type = typeof value;
|
7090 | if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
7091 | value == null || isSymbol(value)) {
|
7092 | return true;
|
7093 | }
|
7094 | return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
7095 | (object != null && value in Object(object));
|
7096 | }
|
7097 |
|
7098 | module.exports = isKey;
|
7099 |
|
7100 |
|
7101 | }),
|
7102 |
|
7103 | (function(module, exports, __webpack_require__) {
|
7104 |
|
7105 | var baseGetTag = __webpack_require__(25),
|
7106 | isObjectLike = __webpack_require__(26);
|
7107 |
|
7108 |
|
7109 | var symbolTag = '[object Symbol]';
|
7110 |
|
7111 |
|
7112 |
|
7113 |
|
7114 |
|
7115 |
|
7116 |
|
7117 |
|
7118 |
|
7119 |
|
7120 |
|
7121 |
|
7122 |
|
7123 |
|
7124 |
|
7125 |
|
7126 |
|
7127 |
|
7128 | function isSymbol(value) {
|
7129 | return typeof value == 'symbol' ||
|
7130 | (isObjectLike(value) && baseGetTag(value) == symbolTag);
|
7131 | }
|
7132 |
|
7133 | module.exports = isSymbol;
|
7134 |
|
7135 |
|
7136 | }),
|
7137 |
|
7138 | (function(module, exports, __webpack_require__) {
|
7139 |
|
7140 | var baseAssignValue = __webpack_require__(103),
|
7141 | createAggregator = __webpack_require__(109);
|
7142 |
|
7143 |
|
7144 | var objectProto = Object.prototype;
|
7145 |
|
7146 |
|
7147 | var hasOwnProperty = objectProto.hasOwnProperty;
|
7148 |
|
7149 |
|
7150 |
|
7151 |
|
7152 |
|
7153 |
|
7154 |
|
7155 |
|
7156 |
|
7157 |
|
7158 |
|
7159 |
|
7160 |
|
7161 |
|
7162 |
|
7163 |
|
7164 |
|
7165 |
|
7166 |
|
7167 |
|
7168 |
|
7169 |
|
7170 |
|
7171 |
|
7172 | var groupBy = createAggregator(function(result, value, key) {
|
7173 | if (hasOwnProperty.call(result, key)) {
|
7174 | result[key].push(value);
|
7175 | } else {
|
7176 | baseAssignValue(result, key, [value]);
|
7177 | }
|
7178 | });
|
7179 |
|
7180 | module.exports = groupBy;
|
7181 |
|
7182 |
|
7183 | }),
|
7184 |
|
7185 | (function(module, exports, __webpack_require__) {
|
7186 |
|
7187 | var baseFlatten = __webpack_require__(50);
|
7188 |
|
7189 |
|
7190 | var INFINITY = 1 / 0;
|
7191 |
|
7192 |
|
7193 |
|
7194 |
|
7195 |
|
7196 |
|
7197 |
|
7198 |
|
7199 |
|
7200 |
|
7201 |
|
7202 |
|
7203 |
|
7204 |
|
7205 |
|
7206 | function flattenDeep(array) {
|
7207 | var length = array == null ? 0 : array.length;
|
7208 | return length ? baseFlatten(array, INFINITY) : [];
|
7209 | }
|
7210 |
|
7211 | module.exports = flattenDeep;
|
7212 |
|
7213 |
|
7214 | }),
|
7215 | ,
|
7216 |
|
7217 | (function(module, exports) {
|
7218 |
|
7219 | var g;
|
7220 |
|
7221 |
|
7222 | g = (function() {
|
7223 | return this;
|
7224 | })();
|
7225 |
|
7226 | try {
|
7227 |
|
7228 | g = g || Function("return this")() || (1, eval)("this");
|
7229 | } catch (e) {
|
7230 |
|
7231 | if (typeof window === "object") g = window;
|
7232 | }
|
7233 |
|
7234 |
|
7235 |
|
7236 |
|
7237 |
|
7238 | module.exports = g;
|
7239 |
|
7240 |
|
7241 | }),
|
7242 |
|
7243 | (function(module, exports, __webpack_require__) {
|
7244 |
|
7245 | var arrayPush = __webpack_require__(51),
|
7246 | isFlattenable = __webpack_require__(97);
|
7247 |
|
7248 |
|
7249 |
|
7250 |
|
7251 |
|
7252 |
|
7253 |
|
7254 |
|
7255 |
|
7256 |
|
7257 |
|
7258 |
|
7259 | function baseFlatten(array, depth, predicate, isStrict, result) {
|
7260 | var index = -1,
|
7261 | length = array.length;
|
7262 |
|
7263 | predicate || (predicate = isFlattenable);
|
7264 | result || (result = []);
|
7265 |
|
7266 | while (++index < length) {
|
7267 | var value = array[index];
|
7268 | if (depth > 0 && predicate(value)) {
|
7269 | if (depth > 1) {
|
7270 |
|
7271 | baseFlatten(value, depth - 1, predicate, isStrict, result);
|
7272 | } else {
|
7273 | arrayPush(result, value);
|
7274 | }
|
7275 | } else if (!isStrict) {
|
7276 | result[result.length] = value;
|
7277 | }
|
7278 | }
|
7279 | return result;
|
7280 | }
|
7281 |
|
7282 | module.exports = baseFlatten;
|
7283 |
|
7284 |
|
7285 | }),
|
7286 |
|
7287 | (function(module, exports) {
|
7288 |
|
7289 |
|
7290 |
|
7291 |
|
7292 |
|
7293 |
|
7294 |
|
7295 |
|
7296 |
|
7297 | function arrayPush(array, values) {
|
7298 | var index = -1,
|
7299 | length = values.length,
|
7300 | offset = array.length;
|
7301 |
|
7302 | while (++index < length) {
|
7303 | array[offset + index] = values[index];
|
7304 | }
|
7305 | return array;
|
7306 | }
|
7307 |
|
7308 | module.exports = arrayPush;
|
7309 |
|
7310 |
|
7311 | }),
|
7312 |
|
7313 | (function(module, exports, __webpack_require__) {
|
7314 |
|
7315 | (function(global) {
|
7316 | var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
7317 |
|
7318 | module.exports = freeGlobal;
|
7319 |
|
7320 | }.call(this, __webpack_require__(49)))
|
7321 |
|
7322 | }),
|
7323 |
|
7324 | (function(__webpack_module__, __webpack_exports__, __webpack_require__) {
|
7325 |
|
7326 | "use strict";
|
7327 | __webpack_require__.r(__webpack_exports__);
|
7328 | __webpack_exports__["default"] = (function(e,n){return n=n||{},new Promise(function(t,r){var s=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(JSON.parse(s.responseText))},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var l in s.open(n.method||"get",e,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+","+t:t}),t(a())},s.onerror=r,s.withCredentials="include"==n.credentials,n.headers)s.setRequestHeader(l,n.headers[l]);s.send(n.body||null)})});
|
7329 |
|
7330 |
|
7331 |
|
7332 | }),
|
7333 |
|
7334 | (function(module, exports, __webpack_require__) {
|
7335 |
|
7336 | var baseGetTag = __webpack_require__(25),
|
7337 | isObject = __webpack_require__(39);
|
7338 |
|
7339 |
|
7340 | var asyncTag = '[object AsyncFunction]',
|
7341 | funcTag = '[object Function]',
|
7342 | genTag = '[object GeneratorFunction]',
|
7343 | proxyTag = '[object Proxy]';
|
7344 |
|
7345 |
|
7346 |
|
7347 |
|
7348 |
|
7349 |
|
7350 |
|
7351 |
|
7352 |
|
7353 |
|
7354 |
|
7355 |
|
7356 |
|
7357 |
|
7358 |
|
7359 |
|
7360 |
|
7361 |
|
7362 | function isFunction(value) {
|
7363 | if (!isObject(value)) {
|
7364 | return false;
|
7365 | }
|
7366 |
|
7367 |
|
7368 | var tag = baseGetTag(value);
|
7369 | return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
7370 | }
|
7371 |
|
7372 | module.exports = isFunction;
|
7373 |
|
7374 |
|
7375 | }),
|
7376 |
|
7377 | (function(module, exports) {
|
7378 |
|
7379 |
|
7380 | var funcProto = Function.prototype;
|
7381 |
|
7382 |
|
7383 | var funcToString = funcProto.toString;
|
7384 |
|
7385 |
|
7386 |
|
7387 |
|
7388 |
|
7389 |
|
7390 |
|
7391 |
|
7392 | function toSource(func) {
|
7393 | if (func != null) {
|
7394 | try {
|
7395 | return funcToString.call(func);
|
7396 | } catch (e) {}
|
7397 | try {
|
7398 | return (func + '');
|
7399 | } catch (e) {}
|
7400 | }
|
7401 | return '';
|
7402 | }
|
7403 |
|
7404 | module.exports = toSource;
|
7405 |
|
7406 |
|
7407 | }),
|
7408 |
|
7409 | (function(module, exports, __webpack_require__) {
|
7410 |
|
7411 | (function(module) {var root = __webpack_require__(17),
|
7412 | stubFalse = __webpack_require__(118);
|
7413 |
|
7414 |
|
7415 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
7416 |
|
7417 |
|
7418 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
7419 |
|
7420 |
|
7421 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
7422 |
|
7423 |
|
7424 | var Buffer = moduleExports ? root.Buffer : undefined;
|
7425 |
|
7426 |
|
7427 | var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 |
|
7435 |
|
7436 |
|
7437 |
|
7438 |
|
7439 |
|
7440 |
|
7441 |
|
7442 |
|
7443 |
|
7444 |
|
7445 |
|
7446 | var isBuffer = nativeIsBuffer || stubFalse;
|
7447 |
|
7448 | module.exports = isBuffer;
|
7449 |
|
7450 | }.call(this, __webpack_require__(57)(module)))
|
7451 |
|
7452 | }),
|
7453 |
|
7454 | (function(module, exports) {
|
7455 |
|
7456 | module.exports = function(module) {
|
7457 | if (!module.webpackPolyfill) {
|
7458 | module.deprecate = function() {};
|
7459 | module.paths = [];
|
7460 |
|
7461 | if (!module.children) module.children = [];
|
7462 | Object.defineProperty(module, "loaded", {
|
7463 | enumerable: true,
|
7464 | get: function() {
|
7465 | return module.l;
|
7466 | }
|
7467 | });
|
7468 | Object.defineProperty(module, "id", {
|
7469 | enumerable: true,
|
7470 | get: function() {
|
7471 | return module.i;
|
7472 | }
|
7473 | });
|
7474 | module.webpackPolyfill = 1;
|
7475 | }
|
7476 | return module;
|
7477 | };
|
7478 |
|
7479 |
|
7480 | }),
|
7481 |
|
7482 | (function(module, exports) {
|
7483 |
|
7484 |
|
7485 | var MAX_SAFE_INTEGER = 9007199254740991;
|
7486 |
|
7487 |
|
7488 | var reIsUint = /^(?:0|[1-9]\d*)$/;
|
7489 |
|
7490 |
|
7491 |
|
7492 |
|
7493 |
|
7494 |
|
7495 |
|
7496 |
|
7497 |
|
7498 | function isIndex(value, length) {
|
7499 | var type = typeof value;
|
7500 | length = length == null ? MAX_SAFE_INTEGER : length;
|
7501 |
|
7502 | return !!length &&
|
7503 | (type == 'number' ||
|
7504 | (type != 'symbol' && reIsUint.test(value))) &&
|
7505 | (value > -1 && value % 1 == 0 && value < length);
|
7506 | }
|
7507 |
|
7508 | module.exports = isIndex;
|
7509 |
|
7510 |
|
7511 | }),
|
7512 |
|
7513 | (function(module, exports, __webpack_require__) {
|
7514 |
|
7515 | var baseIsTypedArray = __webpack_require__(119),
|
7516 | baseUnary = __webpack_require__(120),
|
7517 | nodeUtil = __webpack_require__(121);
|
7518 |
|
7519 |
|
7520 | var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
7521 |
|
7522 |
|
7523 |
|
7524 |
|
7525 |
|
7526 |
|
7527 |
|
7528 |
|
7529 |
|
7530 |
|
7531 |
|
7532 |
|
7533 |
|
7534 |
|
7535 |
|
7536 |
|
7537 |
|
7538 |
|
7539 | var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
7540 |
|
7541 | module.exports = isTypedArray;
|
7542 |
|
7543 |
|
7544 | }),
|
7545 |
|
7546 | (function(module, exports, __webpack_require__) {
|
7547 |
|
7548 | var isFunction = __webpack_require__(54),
|
7549 | isLength = __webpack_require__(41);
|
7550 |
|
7551 |
|
7552 |
|
7553 |
|
7554 |
|
7555 |
|
7556 |
|
7557 |
|
7558 |
|
7559 |
|
7560 |
|
7561 |
|
7562 |
|
7563 |
|
7564 |
|
7565 |
|
7566 |
|
7567 |
|
7568 |
|
7569 |
|
7570 |
|
7571 |
|
7572 |
|
7573 |
|
7574 |
|
7575 |
|
7576 | function isArrayLike(value) {
|
7577 | return value != null && isLength(value.length) && !isFunction(value);
|
7578 | }
|
7579 |
|
7580 | module.exports = isArrayLike;
|
7581 |
|
7582 |
|
7583 | }),
|
7584 |
|
7585 | (function(module, exports, __webpack_require__) {
|
7586 |
|
7587 | var ListCache = __webpack_require__(30),
|
7588 | stackClear = __webpack_require__(135),
|
7589 | stackDelete = __webpack_require__(136),
|
7590 | stackGet = __webpack_require__(137),
|
7591 | stackHas = __webpack_require__(138),
|
7592 | stackSet = __webpack_require__(139);
|
7593 |
|
7594 |
|
7595 |
|
7596 |
|
7597 |
|
7598 |
|
7599 |
|
7600 |
|
7601 | function Stack(entries) {
|
7602 | var data = this.__data__ = new ListCache(entries);
|
7603 | this.size = data.size;
|
7604 | }
|
7605 |
|
7606 |
|
7607 | Stack.prototype.clear = stackClear;
|
7608 | Stack.prototype['delete'] = stackDelete;
|
7609 | Stack.prototype.get = stackGet;
|
7610 | Stack.prototype.has = stackHas;
|
7611 | Stack.prototype.set = stackSet;
|
7612 |
|
7613 | module.exports = Stack;
|
7614 |
|
7615 |
|
7616 | }),
|
7617 |
|
7618 | (function(module, exports) {
|
7619 |
|
7620 |
|
7621 |
|
7622 |
|
7623 |
|
7624 |
|
7625 |
|
7626 |
|
7627 |
|
7628 |
|
7629 |
|
7630 |
|
7631 |
|
7632 |
|
7633 |
|
7634 |
|
7635 |
|
7636 |
|
7637 |
|
7638 |
|
7639 |
|
7640 |
|
7641 |
|
7642 |
|
7643 |
|
7644 |
|
7645 |
|
7646 |
|
7647 |
|
7648 |
|
7649 |
|
7650 |
|
7651 |
|
7652 | function eq(value, other) {
|
7653 | return value === other || (value !== value && other !== other);
|
7654 | }
|
7655 |
|
7656 | module.exports = eq;
|
7657 |
|
7658 |
|
7659 | }),
|
7660 |
|
7661 | (function(module, exports, __webpack_require__) {
|
7662 |
|
7663 | var baseIsEqualDeep = __webpack_require__(152),
|
7664 | isObjectLike = __webpack_require__(26);
|
7665 |
|
7666 |
|
7667 |
|
7668 |
|
7669 |
|
7670 |
|
7671 |
|
7672 |
|
7673 |
|
7674 |
|
7675 |
|
7676 |
|
7677 |
|
7678 |
|
7679 |
|
7680 | function baseIsEqual(value, other, bitmask, customizer, stack) {
|
7681 | if (value === other) {
|
7682 | return true;
|
7683 | }
|
7684 | if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
7685 | return value !== value && other !== other;
|
7686 | }
|
7687 | return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
7688 | }
|
7689 |
|
7690 | module.exports = baseIsEqual;
|
7691 |
|
7692 |
|
7693 | }),
|
7694 |
|
7695 | (function(module, exports, __webpack_require__) {
|
7696 |
|
7697 | var SetCache = __webpack_require__(153),
|
7698 | arraySome = __webpack_require__(156),
|
7699 | cacheHas = __webpack_require__(157);
|
7700 |
|
7701 |
|
7702 | var COMPARE_PARTIAL_FLAG = 1,
|
7703 | COMPARE_UNORDERED_FLAG = 2;
|
7704 |
|
7705 |
|
7706 |
|
7707 |
|
7708 |
|
7709 |
|
7710 |
|
7711 |
|
7712 |
|
7713 |
|
7714 |
|
7715 |
|
7716 |
|
7717 |
|
7718 | function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
7719 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
7720 | arrLength = array.length,
|
7721 | othLength = other.length;
|
7722 |
|
7723 | if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
7724 | return false;
|
7725 | }
|
7726 |
|
7727 | var stacked = stack.get(array);
|
7728 | if (stacked && stack.get(other)) {
|
7729 | return stacked == other;
|
7730 | }
|
7731 | var index = -1,
|
7732 | result = true,
|
7733 | seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
|
7734 |
|
7735 | stack.set(array, other);
|
7736 | stack.set(other, array);
|
7737 |
|
7738 |
|
7739 | while (++index < arrLength) {
|
7740 | var arrValue = array[index],
|
7741 | othValue = other[index];
|
7742 |
|
7743 | if (customizer) {
|
7744 | var compared = isPartial
|
7745 | ? customizer(othValue, arrValue, index, other, array, stack)
|
7746 | : customizer(arrValue, othValue, index, array, other, stack);
|
7747 | }
|
7748 | if (compared !== undefined) {
|
7749 | if (compared) {
|
7750 | continue;
|
7751 | }
|
7752 | result = false;
|
7753 | break;
|
7754 | }
|
7755 |
|
7756 | if (seen) {
|
7757 | if (!arraySome(other, function(othValue, othIndex) {
|
7758 | if (!cacheHas(seen, othIndex) &&
|
7759 | (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
7760 | return seen.push(othIndex);
|
7761 | }
|
7762 | })) {
|
7763 | result = false;
|
7764 | break;
|
7765 | }
|
7766 | } else if (!(
|
7767 | arrValue === othValue ||
|
7768 | equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
7769 | )) {
|
7770 | result = false;
|
7771 | break;
|
7772 | }
|
7773 | }
|
7774 | stack['delete'](array);
|
7775 | stack['delete'](other);
|
7776 | return result;
|
7777 | }
|
7778 |
|
7779 | module.exports = equalArrays;
|
7780 |
|
7781 |
|
7782 | }),
|
7783 |
|
7784 | (function(module, exports, __webpack_require__) {
|
7785 |
|
7786 | var isObject = __webpack_require__(39);
|
7787 |
|
7788 |
|
7789 |
|
7790 |
|
7791 |
|
7792 |
|
7793 |
|
7794 |
|
7795 |
|
7796 | function isStrictComparable(value) {
|
7797 | return value === value && !isObject(value);
|
7798 | }
|
7799 |
|
7800 | module.exports = isStrictComparable;
|
7801 |
|
7802 |
|
7803 | }),
|
7804 |
|
7805 | (function(module, exports) {
|
7806 |
|
7807 |
|
7808 |
|
7809 |
|
7810 |
|
7811 |
|
7812 |
|
7813 |
|
7814 |
|
7815 |
|
7816 | function matchesStrictComparable(key, srcValue) {
|
7817 | return function(object) {
|
7818 | if (object == null) {
|
7819 | return false;
|
7820 | }
|
7821 | return object[key] === srcValue &&
|
7822 | (srcValue !== undefined || (key in Object(object)));
|
7823 | };
|
7824 | }
|
7825 |
|
7826 | module.exports = matchesStrictComparable;
|
7827 |
|
7828 |
|
7829 | }),
|
7830 |
|
7831 | (function(module, exports, __webpack_require__) {
|
7832 |
|
7833 | var castPath = __webpack_require__(68),
|
7834 | toKey = __webpack_require__(34);
|
7835 |
|
7836 |
|
7837 |
|
7838 |
|
7839 |
|
7840 |
|
7841 |
|
7842 |
|
7843 |
|
7844 | function baseGet(object, path) {
|
7845 | path = castPath(path, object);
|
7846 |
|
7847 | var index = 0,
|
7848 | length = path.length;
|
7849 |
|
7850 | while (object != null && index < length) {
|
7851 | object = object[toKey(path[index++])];
|
7852 | }
|
7853 | return (index && index == length) ? object : undefined;
|
7854 | }
|
7855 |
|
7856 | module.exports = baseGet;
|
7857 |
|
7858 |
|
7859 | }),
|
7860 |
|
7861 | (function(module, exports, __webpack_require__) {
|
7862 |
|
7863 | var isArray = __webpack_require__(16),
|
7864 | isKey = __webpack_require__(44),
|
7865 | stringToPath = __webpack_require__(176),
|
7866 | toString = __webpack_require__(179);
|
7867 |
|
7868 |
|
7869 |
|
7870 |
|
7871 |
|
7872 |
|
7873 |
|
7874 |
|
7875 |
|
7876 | function castPath(value, object) {
|
7877 | if (isArray(value)) {
|
7878 | return value;
|
7879 | }
|
7880 | return isKey(value, object) ? [value] : stringToPath(toString(value));
|
7881 | }
|
7882 |
|
7883 | module.exports = castPath;
|
7884 |
|
7885 |
|
7886 | }),
|
7887 |
|
7888 | (function(module, exports, __webpack_require__) {
|
7889 |
|
7890 | "use strict";
|
7891 |
|
7892 |
|
7893 | var reactIs = __webpack_require__(95);
|
7894 |
|
7895 |
|
7896 |
|
7897 |
|
7898 |
|
7899 | var REACT_STATICS = {
|
7900 | childContextTypes: true,
|
7901 | contextType: true,
|
7902 | contextTypes: true,
|
7903 | defaultProps: true,
|
7904 | displayName: true,
|
7905 | getDefaultProps: true,
|
7906 | getDerivedStateFromError: true,
|
7907 | getDerivedStateFromProps: true,
|
7908 | mixins: true,
|
7909 | propTypes: true,
|
7910 | type: true
|
7911 | };
|
7912 | var KNOWN_STATICS = {
|
7913 | name: true,
|
7914 | length: true,
|
7915 | prototype: true,
|
7916 | caller: true,
|
7917 | callee: true,
|
7918 | arguments: true,
|
7919 | arity: true
|
7920 | };
|
7921 | var FORWARD_REF_STATICS = {
|
7922 | '$$typeof': true,
|
7923 | render: true,
|
7924 | defaultProps: true,
|
7925 | displayName: true,
|
7926 | propTypes: true
|
7927 | };
|
7928 | var MEMO_STATICS = {
|
7929 | '$$typeof': true,
|
7930 | compare: true,
|
7931 | defaultProps: true,
|
7932 | displayName: true,
|
7933 | propTypes: true,
|
7934 | type: true
|
7935 | };
|
7936 | var TYPE_STATICS = {};
|
7937 | TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
7938 | TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
7939 |
|
7940 | function getStatics(component) {
|
7941 |
|
7942 | if (reactIs.isMemo(component)) {
|
7943 | return MEMO_STATICS;
|
7944 | }
|
7945 |
|
7946 |
|
7947 | return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
7948 | }
|
7949 |
|
7950 | var defineProperty = Object.defineProperty;
|
7951 | var getOwnPropertyNames = Object.getOwnPropertyNames;
|
7952 | var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
7953 | var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
7954 | var getPrototypeOf = Object.getPrototypeOf;
|
7955 | var objectPrototype = Object.prototype;
|
7956 | function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
7957 | if (typeof sourceComponent !== 'string') {
|
7958 |
|
7959 | if (objectPrototype) {
|
7960 | var inheritedComponent = getPrototypeOf(sourceComponent);
|
7961 |
|
7962 | if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
7963 | hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
7964 | }
|
7965 | }
|
7966 |
|
7967 | var keys = getOwnPropertyNames(sourceComponent);
|
7968 |
|
7969 | if (getOwnPropertySymbols) {
|
7970 | keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
7971 | }
|
7972 |
|
7973 | var targetStatics = getStatics(targetComponent);
|
7974 | var sourceStatics = getStatics(sourceComponent);
|
7975 |
|
7976 | for (var i = 0; i < keys.length; ++i) {
|
7977 | var key = keys[i];
|
7978 |
|
7979 | if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
7980 | var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
7981 |
|
7982 | try {
|
7983 |
|
7984 | defineProperty(targetComponent, key, descriptor);
|
7985 | } catch (e) {}
|
7986 | }
|
7987 | }
|
7988 | }
|
7989 |
|
7990 | return targetComponent;
|
7991 | }
|
7992 |
|
7993 | module.exports = hoistNonReactStatics;
|
7994 |
|
7995 |
|
7996 | }),
|
7997 |
|
7998 | (function(module, __webpack_exports__, __webpack_require__) {
|
7999 |
|
8000 | "use strict";
|
8001 | (function(global) { |
8002 |
|
8003 |
|
8004 |
|
8005 |
|
8006 |
|
8007 |
|
8008 |
|
8009 |
|
8010 |
|
8011 |
|
8012 |
|
8013 |
|
8014 |
|
8015 |
|
8016 |
|
8017 |
|
8018 |
|
8019 |
|
8020 |
|
8021 |
|
8022 |
|
8023 |
|
8024 |
|
8025 | var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';
|
8026 |
|
8027 | var timeoutDuration = function () {
|
8028 | var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
|
8029 | for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
|
8030 | if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
|
8031 | return 1;
|
8032 | }
|
8033 | }
|
8034 | return 0;
|
8035 | }();
|
8036 |
|
8037 | function microtaskDebounce(fn) {
|
8038 | var called = false;
|
8039 | return function () {
|
8040 | if (called) {
|
8041 | return;
|
8042 | }
|
8043 | called = true;
|
8044 | window.Promise.resolve().then(function () {
|
8045 | called = false;
|
8046 | fn();
|
8047 | });
|
8048 | };
|
8049 | }
|
8050 |
|
8051 | function taskDebounce(fn) {
|
8052 | var scheduled = false;
|
8053 | return function () {
|
8054 | if (!scheduled) {
|
8055 | scheduled = true;
|
8056 | setTimeout(function () {
|
8057 | scheduled = false;
|
8058 | fn();
|
8059 | }, timeoutDuration);
|
8060 | }
|
8061 | };
|
8062 | }
|
8063 |
|
8064 | var supportsMicroTasks = isBrowser && window.Promise;
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 |
|
8070 |
|
8071 |
|
8072 |
|
8073 |
|
8074 |
|
8075 | var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
|
8076 |
|
8077 |
|
8078 |
|
8079 |
|
8080 |
|
8081 |
|
8082 |
|
8083 |
|
8084 | function isFunction(functionToCheck) {
|
8085 | var getType = {};
|
8086 | return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
8087 | }
|
8088 |
|
8089 |
|
8090 |
|
8091 |
|
8092 |
|
8093 |
|
8094 |
|
8095 |
|
8096 | function getStyleComputedProperty(element, property) {
|
8097 | if (element.nodeType !== 1) {
|
8098 | return [];
|
8099 | }
|
8100 |
|
8101 | var window = element.ownerDocument.defaultView;
|
8102 | var css = window.getComputedStyle(element, null);
|
8103 | return property ? css[property] : css;
|
8104 | }
|
8105 |
|
8106 |
|
8107 |
|
8108 |
|
8109 |
|
8110 |
|
8111 |
|
8112 |
|
8113 | function getParentNode(element) {
|
8114 | if (element.nodeName === 'HTML') {
|
8115 | return element;
|
8116 | }
|
8117 | return element.parentNode || element.host;
|
8118 | }
|
8119 |
|
8120 |
|
8121 |
|
8122 |
|
8123 |
|
8124 |
|
8125 |
|
8126 |
|
8127 | function getScrollParent(element) {
|
8128 |
|
8129 | if (!element) {
|
8130 | return document.body;
|
8131 | }
|
8132 |
|
8133 | switch (element.nodeName) {
|
8134 | case 'HTML':
|
8135 | case 'BODY':
|
8136 | return element.ownerDocument.body;
|
8137 | case '#document':
|
8138 | return element.body;
|
8139 | }
|
8140 |
|
8141 |
|
8142 |
|
8143 | var _getStyleComputedProp = getStyleComputedProperty(element),
|
8144 | overflow = _getStyleComputedProp.overflow,
|
8145 | overflowX = _getStyleComputedProp.overflowX,
|
8146 | overflowY = _getStyleComputedProp.overflowY;
|
8147 |
|
8148 | if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
|
8149 | return element;
|
8150 | }
|
8151 |
|
8152 | return getScrollParent(getParentNode(element));
|
8153 | }
|
8154 |
|
8155 |
|
8156 |
|
8157 |
|
8158 |
|
8159 |
|
8160 |
|
8161 |
|
8162 | function getReferenceNode(reference) {
|
8163 | return reference && reference.referenceNode ? reference.referenceNode : reference;
|
8164 | }
|
8165 |
|
8166 | var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
|
8167 | var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
|
8168 |
|
8169 |
|
8170 |
|
8171 |
|
8172 |
|
8173 |
|
8174 |
|
8175 |
|
8176 | function isIE(version) {
|
8177 | if (version === 11) {
|
8178 | return isIE11;
|
8179 | }
|
8180 | if (version === 10) {
|
8181 | return isIE10;
|
8182 | }
|
8183 | return isIE11 || isIE10;
|
8184 | }
|
8185 |
|
8186 |
|
8187 |
|
8188 |
|
8189 |
|
8190 |
|
8191 |
|
8192 |
|
8193 | function getOffsetParent(element) {
|
8194 | if (!element) {
|
8195 | return document.documentElement;
|
8196 | }
|
8197 |
|
8198 | var noOffsetParent = isIE(10) ? document.body : null;
|
8199 |
|
8200 |
|
8201 | var offsetParent = element.offsetParent || null;
|
8202 |
|
8203 | while (offsetParent === noOffsetParent && element.nextElementSibling) {
|
8204 | offsetParent = (element = element.nextElementSibling).offsetParent;
|
8205 | }
|
8206 |
|
8207 | var nodeName = offsetParent && offsetParent.nodeName;
|
8208 |
|
8209 | if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
|
8210 | return element ? element.ownerDocument.documentElement : document.documentElement;
|
8211 | }
|
8212 |
|
8213 |
|
8214 |
|
8215 | if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
|
8216 | return getOffsetParent(offsetParent);
|
8217 | }
|
8218 |
|
8219 | return offsetParent;
|
8220 | }
|
8221 |
|
8222 | function isOffsetContainer(element) {
|
8223 | var nodeName = element.nodeName;
|
8224 |
|
8225 | if (nodeName === 'BODY') {
|
8226 | return false;
|
8227 | }
|
8228 | return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
|
8229 | }
|
8230 |
|
8231 |
|
8232 |
|
8233 |
|
8234 |
|
8235 |
|
8236 |
|
8237 |
|
8238 | function getRoot(node) {
|
8239 | if (node.parentNode !== null) {
|
8240 | return getRoot(node.parentNode);
|
8241 | }
|
8242 |
|
8243 | return node;
|
8244 | }
|
8245 |
|
8246 |
|
8247 |
|
8248 |
|
8249 |
|
8250 |
|
8251 |
|
8252 |
|
8253 |
|
8254 | function findCommonOffsetParent(element1, element2) {
|
8255 |
|
8256 | if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
|
8257 | return document.documentElement;
|
8258 | }
|
8259 |
|
8260 |
|
8261 | var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
|
8262 | var start = order ? element1 : element2;
|
8263 | var end = order ? element2 : element1;
|
8264 |
|
8265 |
|
8266 | var range = document.createRange();
|
8267 | range.setStart(start, 0);
|
8268 | range.setEnd(end, 0);
|
8269 | var commonAncestorContainer = range.commonAncestorContainer;
|
8270 |
|
8271 |
|
8272 |
|
8273 | if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
|
8274 | if (isOffsetContainer(commonAncestorContainer)) {
|
8275 | return commonAncestorContainer;
|
8276 | }
|
8277 |
|
8278 | return getOffsetParent(commonAncestorContainer);
|
8279 | }
|
8280 |
|
8281 |
|
8282 | var element1root = getRoot(element1);
|
8283 | if (element1root.host) {
|
8284 | return findCommonOffsetParent(element1root.host, element2);
|
8285 | } else {
|
8286 | return findCommonOffsetParent(element1, getRoot(element2).host);
|
8287 | }
|
8288 | }
|
8289 |
|
8290 |
|
8291 |
|
8292 |
|
8293 |
|
8294 |
|
8295 |
|
8296 |
|
8297 |
|
8298 | function getScroll(element) {
|
8299 | var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
|
8300 |
|
8301 | var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
|
8302 | var nodeName = element.nodeName;
|
8303 |
|
8304 | if (nodeName === 'BODY' || nodeName === 'HTML') {
|
8305 | var html = element.ownerDocument.documentElement;
|
8306 | var scrollingElement = element.ownerDocument.scrollingElement || html;
|
8307 | return scrollingElement[upperSide];
|
8308 | }
|
8309 |
|
8310 | return element[upperSide];
|
8311 | }
|
8312 |
|
8313 |
|
8314 |
|
8315 |
|
8316 |
|
8317 |
|
8318 |
|
8319 |
|
8320 |
|
8321 |
|
8322 | function includeScroll(rect, element) {
|
8323 | var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
8324 |
|
8325 | var scrollTop = getScroll(element, 'top');
|
8326 | var scrollLeft = getScroll(element, 'left');
|
8327 | var modifier = subtract ? -1 : 1;
|
8328 | rect.top += scrollTop * modifier;
|
8329 | rect.bottom += scrollTop * modifier;
|
8330 | rect.left += scrollLeft * modifier;
|
8331 | rect.right += scrollLeft * modifier;
|
8332 | return rect;
|
8333 | }
|
8334 |
|
8335 |
|
8336 |
|
8337 |
|
8338 |
|
8339 |
|
8340 |
|
8341 |
|
8342 |
|
8343 |
|
8344 |
|
8345 | function getBordersSize(styles, axis) {
|
8346 | var sideA = axis === 'x' ? 'Left' : 'Top';
|
8347 | var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
|
8348 |
|
8349 | return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
|
8350 | }
|
8351 |
|
8352 | function getSize(axis, body, html, computedStyle) {
|
8353 | return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
|
8354 | }
|
8355 |
|
8356 | function getWindowSizes(document) {
|
8357 | var body = document.body;
|
8358 | var html = document.documentElement;
|
8359 | var computedStyle = isIE(10) && getComputedStyle(html);
|
8360 |
|
8361 | return {
|
8362 | height: getSize('Height', body, html, computedStyle),
|
8363 | width: getSize('Width', body, html, computedStyle)
|
8364 | };
|
8365 | }
|
8366 |
|
8367 | var classCallCheck = function (instance, Constructor) {
|
8368 | if (!(instance instanceof Constructor)) {
|
8369 | throw new TypeError("Cannot call a class as a function");
|
8370 | }
|
8371 | };
|
8372 |
|
8373 | var createClass = function () {
|
8374 | function defineProperties(target, props) {
|
8375 | for (var i = 0; i < props.length; i++) {
|
8376 | var descriptor = props[i];
|
8377 | descriptor.enumerable = descriptor.enumerable || false;
|
8378 | descriptor.configurable = true;
|
8379 | if ("value" in descriptor) descriptor.writable = true;
|
8380 | Object.defineProperty(target, descriptor.key, descriptor);
|
8381 | }
|
8382 | }
|
8383 |
|
8384 | return function (Constructor, protoProps, staticProps) {
|
8385 | if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
8386 | if (staticProps) defineProperties(Constructor, staticProps);
|
8387 | return Constructor;
|
8388 | };
|
8389 | }();
|
8390 |
|
8391 |
|
8392 |
|
8393 |
|
8394 |
|
8395 | var defineProperty = function (obj, key, value) {
|
8396 | if (key in obj) {
|
8397 | Object.defineProperty(obj, key, {
|
8398 | value: value,
|
8399 | enumerable: true,
|
8400 | configurable: true,
|
8401 | writable: true
|
8402 | });
|
8403 | } else {
|
8404 | obj[key] = value;
|
8405 | }
|
8406 |
|
8407 | return obj;
|
8408 | };
|
8409 |
|
8410 | var _extends = Object.assign || function (target) {
|
8411 | for (var i = 1; i < arguments.length; i++) {
|
8412 | var source = arguments[i];
|
8413 |
|
8414 | for (var key in source) {
|
8415 | if (Object.prototype.hasOwnProperty.call(source, key)) {
|
8416 | target[key] = source[key];
|
8417 | }
|
8418 | }
|
8419 | }
|
8420 |
|
8421 | return target;
|
8422 | };
|
8423 |
|
8424 |
|
8425 |
|
8426 |
|
8427 |
|
8428 |
|
8429 |
|
8430 |
|
8431 | function getClientRect(offsets) {
|
8432 | return _extends({}, offsets, {
|
8433 | right: offsets.left + offsets.width,
|
8434 | bottom: offsets.top + offsets.height
|
8435 | });
|
8436 | }
|
8437 |
|
8438 |
|
8439 |
|
8440 |
|
8441 |
|
8442 |
|
8443 |
|
8444 |
|
8445 | function getBoundingClientRect(element) {
|
8446 | var rect = {};
|
8447 |
|
8448 |
|
8449 |
|
8450 |
|
8451 | try {
|
8452 | if (isIE(10)) {
|
8453 | rect = element.getBoundingClientRect();
|
8454 | var scrollTop = getScroll(element, 'top');
|
8455 | var scrollLeft = getScroll(element, 'left');
|
8456 | rect.top += scrollTop;
|
8457 | rect.left += scrollLeft;
|
8458 | rect.bottom += scrollTop;
|
8459 | rect.right += scrollLeft;
|
8460 | } else {
|
8461 | rect = element.getBoundingClientRect();
|
8462 | }
|
8463 | } catch (e) {}
|
8464 |
|
8465 | var result = {
|
8466 | left: rect.left,
|
8467 | top: rect.top,
|
8468 | width: rect.right - rect.left,
|
8469 | height: rect.bottom - rect.top
|
8470 | };
|
8471 |
|
8472 |
|
8473 | var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};
|
8474 | var width = sizes.width || element.clientWidth || result.width;
|
8475 | var height = sizes.height || element.clientHeight || result.height;
|
8476 |
|
8477 | var horizScrollbar = element.offsetWidth - width;
|
8478 | var vertScrollbar = element.offsetHeight - height;
|
8479 |
|
8480 |
|
8481 |
|
8482 | if (horizScrollbar || vertScrollbar) {
|
8483 | var styles = getStyleComputedProperty(element);
|
8484 | horizScrollbar -= getBordersSize(styles, 'x');
|
8485 | vertScrollbar -= getBordersSize(styles, 'y');
|
8486 |
|
8487 | result.width -= horizScrollbar;
|
8488 | result.height -= vertScrollbar;
|
8489 | }
|
8490 |
|
8491 | return getClientRect(result);
|
8492 | }
|
8493 |
|
8494 | function getOffsetRectRelativeToArbitraryNode(children, parent) {
|
8495 | var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
8496 |
|
8497 | var isIE10 = isIE(10);
|
8498 | var isHTML = parent.nodeName === 'HTML';
|
8499 | var childrenRect = getBoundingClientRect(children);
|
8500 | var parentRect = getBoundingClientRect(parent);
|
8501 | var scrollParent = getScrollParent(children);
|
8502 |
|
8503 | var styles = getStyleComputedProperty(parent);
|
8504 | var borderTopWidth = parseFloat(styles.borderTopWidth);
|
8505 | var borderLeftWidth = parseFloat(styles.borderLeftWidth);
|
8506 |
|
8507 |
|
8508 | if (fixedPosition && isHTML) {
|
8509 | parentRect.top = Math.max(parentRect.top, 0);
|
8510 | parentRect.left = Math.max(parentRect.left, 0);
|
8511 | }
|
8512 | var offsets = getClientRect({
|
8513 | top: childrenRect.top - parentRect.top - borderTopWidth,
|
8514 | left: childrenRect.left - parentRect.left - borderLeftWidth,
|
8515 | width: childrenRect.width,
|
8516 | height: childrenRect.height
|
8517 | });
|
8518 | offsets.marginTop = 0;
|
8519 | offsets.marginLeft = 0;
|
8520 |
|
8521 |
|
8522 |
|
8523 |
|
8524 |
|
8525 | if (!isIE10 && isHTML) {
|
8526 | var marginTop = parseFloat(styles.marginTop);
|
8527 | var marginLeft = parseFloat(styles.marginLeft);
|
8528 |
|
8529 | offsets.top -= borderTopWidth - marginTop;
|
8530 | offsets.bottom -= borderTopWidth - marginTop;
|
8531 | offsets.left -= borderLeftWidth - marginLeft;
|
8532 | offsets.right -= borderLeftWidth - marginLeft;
|
8533 |
|
8534 |
|
8535 | offsets.marginTop = marginTop;
|
8536 | offsets.marginLeft = marginLeft;
|
8537 | }
|
8538 |
|
8539 | if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
|
8540 | offsets = includeScroll(offsets, parent);
|
8541 | }
|
8542 |
|
8543 | return offsets;
|
8544 | }
|
8545 |
|
8546 | function getViewportOffsetRectRelativeToArtbitraryNode(element) {
|
8547 | var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
8548 |
|
8549 | var html = element.ownerDocument.documentElement;
|
8550 | var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
|
8551 | var width = Math.max(html.clientWidth, window.innerWidth || 0);
|
8552 | var height = Math.max(html.clientHeight, window.innerHeight || 0);
|
8553 |
|
8554 | var scrollTop = !excludeScroll ? getScroll(html) : 0;
|
8555 | var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;
|
8556 |
|
8557 | var offset = {
|
8558 | top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
|
8559 | left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
|
8560 | width: width,
|
8561 | height: height
|
8562 | };
|
8563 |
|
8564 | return getClientRect(offset);
|
8565 | }
|
8566 |
|
8567 |
|
8568 |
|
8569 |
|
8570 |
|
8571 |
|
8572 |
|
8573 |
|
8574 |
|
8575 | function isFixed(element) {
|
8576 | var nodeName = element.nodeName;
|
8577 | if (nodeName === 'BODY' || nodeName === 'HTML') {
|
8578 | return false;
|
8579 | }
|
8580 | if (getStyleComputedProperty(element, 'position') === 'fixed') {
|
8581 | return true;
|
8582 | }
|
8583 | var parentNode = getParentNode(element);
|
8584 | if (!parentNode) {
|
8585 | return false;
|
8586 | }
|
8587 | return isFixed(parentNode);
|
8588 | }
|
8589 |
|
8590 |
|
8591 |
|
8592 |
|
8593 |
|
8594 |
|
8595 |
|
8596 |
|
8597 |
|
8598 | function getFixedPositionOffsetParent(element) {
|
8599 |
|
8600 | if (!element || !element.parentElement || isIE()) {
|
8601 | return document.documentElement;
|
8602 | }
|
8603 | var el = element.parentElement;
|
8604 | while (el && getStyleComputedProperty(el, 'transform') === 'none') {
|
8605 | el = el.parentElement;
|
8606 | }
|
8607 | return el || document.documentElement;
|
8608 | }
|
8609 |
|
8610 |
|
8611 |
|
8612 |
|
8613 |
|
8614 |
|
8615 |
|
8616 |
|
8617 |
|
8618 |
|
8619 |
|
8620 |
|
8621 | function getBoundaries(popper, reference, padding, boundariesElement) {
|
8622 | var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
8623 |
|
8624 |
|
8625 |
|
8626 | var boundaries = { top: 0, left: 0 };
|
8627 | var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
|
8628 |
|
8629 |
|
8630 | if (boundariesElement === 'viewport') {
|
8631 | boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);
|
8632 | } else {
|
8633 |
|
8634 | var boundariesNode = void 0;
|
8635 | if (boundariesElement === 'scrollParent') {
|
8636 | boundariesNode = getScrollParent(getParentNode(reference));
|
8637 | if (boundariesNode.nodeName === 'BODY') {
|
8638 | boundariesNode = popper.ownerDocument.documentElement;
|
8639 | }
|
8640 | } else if (boundariesElement === 'window') {
|
8641 | boundariesNode = popper.ownerDocument.documentElement;
|
8642 | } else {
|
8643 | boundariesNode = boundariesElement;
|
8644 | }
|
8645 |
|
8646 | var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);
|
8647 |
|
8648 |
|
8649 | if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
|
8650 | var _getWindowSizes = getWindowSizes(popper.ownerDocument),
|
8651 | height = _getWindowSizes.height,
|
8652 | width = _getWindowSizes.width;
|
8653 |
|
8654 | boundaries.top += offsets.top - offsets.marginTop;
|
8655 | boundaries.bottom = height + offsets.top;
|
8656 | boundaries.left += offsets.left - offsets.marginLeft;
|
8657 | boundaries.right = width + offsets.left;
|
8658 | } else {
|
8659 |
|
8660 | boundaries = offsets;
|
8661 | }
|
8662 | }
|
8663 |
|
8664 |
|
8665 | padding = padding || 0;
|
8666 | var isPaddingNumber = typeof padding === 'number';
|
8667 | boundaries.left += isPaddingNumber ? padding : padding.left || 0;
|
8668 | boundaries.top += isPaddingNumber ? padding : padding.top || 0;
|
8669 | boundaries.right -= isPaddingNumber ? padding : padding.right || 0;
|
8670 | boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;
|
8671 |
|
8672 | return boundaries;
|
8673 | }
|
8674 |
|
8675 | function getArea(_ref) {
|
8676 | var width = _ref.width,
|
8677 | height = _ref.height;
|
8678 |
|
8679 | return width * height;
|
8680 | }
|
8681 |
|
8682 |
|
8683 |
|
8684 |
|
8685 |
|
8686 |
|
8687 |
|
8688 |
|
8689 |
|
8690 |
|
8691 | function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
|
8692 | var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
|
8693 |
|
8694 | if (placement.indexOf('auto') === -1) {
|
8695 | return placement;
|
8696 | }
|
8697 |
|
8698 | var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
|
8699 |
|
8700 | var rects = {
|
8701 | top: {
|
8702 | width: boundaries.width,
|
8703 | height: refRect.top - boundaries.top
|
8704 | },
|
8705 | right: {
|
8706 | width: boundaries.right - refRect.right,
|
8707 | height: boundaries.height
|
8708 | },
|
8709 | bottom: {
|
8710 | width: boundaries.width,
|
8711 | height: boundaries.bottom - refRect.bottom
|
8712 | },
|
8713 | left: {
|
8714 | width: refRect.left - boundaries.left,
|
8715 | height: boundaries.height
|
8716 | }
|
8717 | };
|
8718 |
|
8719 | var sortedAreas = Object.keys(rects).map(function (key) {
|
8720 | return _extends({
|
8721 | key: key
|
8722 | }, rects[key], {
|
8723 | area: getArea(rects[key])
|
8724 | });
|
8725 | }).sort(function (a, b) {
|
8726 | return b.area - a.area;
|
8727 | });
|
8728 |
|
8729 | var filteredAreas = sortedAreas.filter(function (_ref2) {
|
8730 | var width = _ref2.width,
|
8731 | height = _ref2.height;
|
8732 | return width >= popper.clientWidth && height >= popper.clientHeight;
|
8733 | });
|
8734 |
|
8735 | var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
|
8736 |
|
8737 | var variation = placement.split('-')[1];
|
8738 |
|
8739 | return computedPlacement + (variation ? '-' + variation : '');
|
8740 | }
|
8741 |
|
8742 |
|
8743 |
|
8744 |
|
8745 |
|
8746 |
|
8747 |
|
8748 |
|
8749 |
|
8750 |
|
8751 |
|
8752 | function getReferenceOffsets(state, popper, reference) {
|
8753 | var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
8754 |
|
8755 | var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));
|
8756 | return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);
|
8757 | }
|
8758 |
|
8759 |
|
8760 |
|
8761 |
|
8762 |
|
8763 |
|
8764 |
|
8765 |
|
8766 | function getOuterSizes(element) {
|
8767 | var window = element.ownerDocument.defaultView;
|
8768 | var styles = window.getComputedStyle(element);
|
8769 | var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);
|
8770 | var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);
|
8771 | var result = {
|
8772 | width: element.offsetWidth + y,
|
8773 | height: element.offsetHeight + x
|
8774 | };
|
8775 | return result;
|
8776 | }
|
8777 |
|
8778 |
|
8779 |
|
8780 |
|
8781 |
|
8782 |
|
8783 |
|
8784 |
|
8785 | function getOppositePlacement(placement) {
|
8786 | var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
|
8787 | return placement.replace(/left|right|bottom|top/g, function (matched) {
|
8788 | return hash[matched];
|
8789 | });
|
8790 | }
|
8791 |
|
8792 |
|
8793 |
|
8794 |
|
8795 |
|
8796 |
|
8797 |
|
8798 |
|
8799 |
|
8800 |
|
8801 |
|
8802 | function getPopperOffsets(popper, referenceOffsets, placement) {
|
8803 | placement = placement.split('-')[0];
|
8804 |
|
8805 |
|
8806 | var popperRect = getOuterSizes(popper);
|
8807 |
|
8808 |
|
8809 | var popperOffsets = {
|
8810 | width: popperRect.width,
|
8811 | height: popperRect.height
|
8812 | };
|
8813 |
|
8814 |
|
8815 | var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
|
8816 | var mainSide = isHoriz ? 'top' : 'left';
|
8817 | var secondarySide = isHoriz ? 'left' : 'top';
|
8818 | var measurement = isHoriz ? 'height' : 'width';
|
8819 | var secondaryMeasurement = !isHoriz ? 'height' : 'width';
|
8820 |
|
8821 | popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
|
8822 | if (placement === secondarySide) {
|
8823 | popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
|
8824 | } else {
|
8825 | popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
|
8826 | }
|
8827 |
|
8828 | return popperOffsets;
|
8829 | }
|
8830 |
|
8831 |
|
8832 |
|
8833 |
|
8834 |
|
8835 |
|
8836 |
|
8837 |
|
8838 |
|
8839 |
|
8840 | function find(arr, check) {
|
8841 |
|
8842 | if (Array.prototype.find) {
|
8843 | return arr.find(check);
|
8844 | }
|
8845 |
|
8846 |
|
8847 | return arr.filter(check)[0];
|
8848 | }
|
8849 |
|
8850 |
|
8851 |
|
8852 |
|
8853 |
|
8854 |
|
8855 |
|
8856 |
|
8857 |
|
8858 |
|
8859 | function findIndex(arr, prop, value) {
|
8860 |
|
8861 | if (Array.prototype.findIndex) {
|
8862 | return arr.findIndex(function (cur) {
|
8863 | return cur[prop] === value;
|
8864 | });
|
8865 | }
|
8866 |
|
8867 |
|
8868 | var match = find(arr, function (obj) {
|
8869 | return obj[prop] === value;
|
8870 | });
|
8871 | return arr.indexOf(match);
|
8872 | }
|
8873 |
|
8874 |
|
8875 |
|
8876 |
|
8877 |
|
8878 |
|
8879 |
|
8880 |
|
8881 |
|
8882 |
|
8883 |
|
8884 | function runModifiers(modifiers, data, ends) {
|
8885 | var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
|
8886 |
|
8887 | modifiersToRun.forEach(function (modifier) {
|
8888 | if (modifier['function']) {
|
8889 |
|
8890 | console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
|
8891 | }
|
8892 | var fn = modifier['function'] || modifier.fn;
|
8893 | if (modifier.enabled && isFunction(fn)) {
|
8894 |
|
8895 |
|
8896 |
|
8897 | data.offsets.popper = getClientRect(data.offsets.popper);
|
8898 | data.offsets.reference = getClientRect(data.offsets.reference);
|
8899 |
|
8900 | data = fn(data, modifier);
|
8901 | }
|
8902 | });
|
8903 |
|
8904 | return data;
|
8905 | }
|
8906 |
|
8907 |
|
8908 |
|
8909 |
|
8910 |
|
8911 |
|
8912 |
|
8913 |
|
8914 | function update() {
|
8915 |
|
8916 | if (this.state.isDestroyed) {
|
8917 | return;
|
8918 | }
|
8919 |
|
8920 | var data = {
|
8921 | instance: this,
|
8922 | styles: {},
|
8923 | arrowStyles: {},
|
8924 | attributes: {},
|
8925 | flipped: false,
|
8926 | offsets: {}
|
8927 | };
|
8928 |
|
8929 |
|
8930 | data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);
|
8931 |
|
8932 |
|
8933 |
|
8934 |
|
8935 | data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
|
8936 |
|
8937 |
|
8938 | data.originalPlacement = data.placement;
|
8939 |
|
8940 | data.positionFixed = this.options.positionFixed;
|
8941 |
|
8942 |
|
8943 | data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
|
8944 |
|
8945 | data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';
|
8946 |
|
8947 |
|
8948 | data = runModifiers(this.modifiers, data);
|
8949 |
|
8950 |
|
8951 |
|
8952 | if (!this.state.isCreated) {
|
8953 | this.state.isCreated = true;
|
8954 | this.options.onCreate(data);
|
8955 | } else {
|
8956 | this.options.onUpdate(data);
|
8957 | }
|
8958 | }
|
8959 |
|
8960 |
|
8961 |
|
8962 |
|
8963 |
|
8964 |
|
8965 |
|
8966 | function isModifierEnabled(modifiers, modifierName) {
|
8967 | return modifiers.some(function (_ref) {
|
8968 | var name = _ref.name,
|
8969 | enabled = _ref.enabled;
|
8970 | return enabled && name === modifierName;
|
8971 | });
|
8972 | }
|
8973 |
|
8974 |
|
8975 |
|
8976 |
|
8977 |
|
8978 |
|
8979 |
|
8980 |
|
8981 | function getSupportedPropertyName(property) {
|
8982 | var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
|
8983 | var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
|
8984 |
|
8985 | for (var i = 0; i < prefixes.length; i++) {
|
8986 | var prefix = prefixes[i];
|
8987 | var toCheck = prefix ? '' + prefix + upperProp : property;
|
8988 | if (typeof document.body.style[toCheck] !== 'undefined') {
|
8989 | return toCheck;
|
8990 | }
|
8991 | }
|
8992 | return null;
|
8993 | }
|
8994 |
|
8995 |
|
8996 |
|
8997 |
|
8998 |
|
8999 |
|
9000 | function destroy() {
|
9001 | this.state.isDestroyed = true;
|
9002 |
|
9003 |
|
9004 | if (isModifierEnabled(this.modifiers, 'applyStyle')) {
|
9005 | this.popper.removeAttribute('x-placement');
|
9006 | this.popper.style.position = '';
|
9007 | this.popper.style.top = '';
|
9008 | this.popper.style.left = '';
|
9009 | this.popper.style.right = '';
|
9010 | this.popper.style.bottom = '';
|
9011 | this.popper.style.willChange = '';
|
9012 | this.popper.style[getSupportedPropertyName('transform')] = '';
|
9013 | }
|
9014 |
|
9015 | this.disableEventListeners();
|
9016 |
|
9017 |
|
9018 |
|
9019 | if (this.options.removeOnDestroy) {
|
9020 | this.popper.parentNode.removeChild(this.popper);
|
9021 | }
|
9022 | return this;
|
9023 | }
|
9024 |
|
9025 |
|
9026 |
|
9027 |
|
9028 |
|
9029 |
|
9030 | function getWindow(element) {
|
9031 | var ownerDocument = element.ownerDocument;
|
9032 | return ownerDocument ? ownerDocument.defaultView : window;
|
9033 | }
|
9034 |
|
9035 | function attachToScrollParents(scrollParent, event, callback, scrollParents) {
|
9036 | var isBody = scrollParent.nodeName === 'BODY';
|
9037 | var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;
|
9038 | target.addEventListener(event, callback, { passive: true });
|
9039 |
|
9040 | if (!isBody) {
|
9041 | attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
|
9042 | }
|
9043 | scrollParents.push(target);
|
9044 | }
|
9045 |
|
9046 |
|
9047 |
|
9048 |
|
9049 |
|
9050 |
|
9051 |
|
9052 | function setupEventListeners(reference, options, state, updateBound) {
|
9053 |
|
9054 | state.updateBound = updateBound;
|
9055 | getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });
|
9056 |
|
9057 |
|
9058 | var scrollElement = getScrollParent(reference);
|
9059 | attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
|
9060 | state.scrollElement = scrollElement;
|
9061 | state.eventsEnabled = true;
|
9062 |
|
9063 | return state;
|
9064 | }
|
9065 |
|
9066 |
|
9067 |
|
9068 |
|
9069 |
|
9070 |
|
9071 |
|
9072 | function enableEventListeners() {
|
9073 | if (!this.state.eventsEnabled) {
|
9074 | this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
|
9075 | }
|
9076 | }
|
9077 |
|
9078 |
|
9079 |
|
9080 |
|
9081 |
|
9082 |
|
9083 |
|
9084 | function removeEventListeners(reference, state) {
|
9085 |
|
9086 | getWindow(reference).removeEventListener('resize', state.updateBound);
|
9087 |
|
9088 |
|
9089 | state.scrollParents.forEach(function (target) {
|
9090 | target.removeEventListener('scroll', state.updateBound);
|
9091 | });
|
9092 |
|
9093 |
|
9094 | state.updateBound = null;
|
9095 | state.scrollParents = [];
|
9096 | state.scrollElement = null;
|
9097 | state.eventsEnabled = false;
|
9098 | return state;
|
9099 | }
|
9100 |
|
9101 |
|
9102 |
|
9103 |
|
9104 |
|
9105 |
|
9106 |
|
9107 |
|
9108 | function disableEventListeners() {
|
9109 | if (this.state.eventsEnabled) {
|
9110 | cancelAnimationFrame(this.scheduleUpdate);
|
9111 | this.state = removeEventListeners(this.reference, this.state);
|
9112 | }
|
9113 | }
|
9114 |
|
9115 |
|
9116 |
|
9117 |
|
9118 |
|
9119 |
|
9120 |
|
9121 |
|
9122 | function isNumeric(n) {
|
9123 | return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
|
9124 | }
|
9125 |
|
9126 |
|
9127 |
|
9128 |
|
9129 |
|
9130 |
|
9131 |
|
9132 |
|
9133 |
|
9134 | function setStyles(element, styles) {
|
9135 | Object.keys(styles).forEach(function (prop) {
|
9136 | var unit = '';
|
9137 |
|
9138 | if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
|
9139 | unit = 'px';
|
9140 | }
|
9141 | element.style[prop] = styles[prop] + unit;
|
9142 | });
|
9143 | }
|
9144 |
|
9145 |
|
9146 |
|
9147 |
|
9148 |
|
9149 |
|
9150 |
|
9151 |
|
9152 |
|
9153 | function setAttributes(element, attributes) {
|
9154 | Object.keys(attributes).forEach(function (prop) {
|
9155 | var value = attributes[prop];
|
9156 | if (value !== false) {
|
9157 | element.setAttribute(prop, attributes[prop]);
|
9158 | } else {
|
9159 | element.removeAttribute(prop);
|
9160 | }
|
9161 | });
|
9162 | }
|
9163 |
|
9164 |
|
9165 |
|
9166 |
|
9167 |
|
9168 |
|
9169 |
|
9170 |
|
9171 |
|
9172 |
|
9173 | function applyStyle(data) {
|
9174 |
|
9175 |
|
9176 |
|
9177 |
|
9178 | setStyles(data.instance.popper, data.styles);
|
9179 |
|
9180 |
|
9181 |
|
9182 | setAttributes(data.instance.popper, data.attributes);
|
9183 |
|
9184 |
|
9185 | if (data.arrowElement && Object.keys(data.arrowStyles).length) {
|
9186 | setStyles(data.arrowElement, data.arrowStyles);
|
9187 | }
|
9188 |
|
9189 | return data;
|
9190 | }
|
9191 |
|
9192 |
|
9193 |
|
9194 |
|
9195 |
|
9196 |
|
9197 |
|
9198 |
|
9199 |
|
9200 |
|
9201 |
|
9202 | function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
|
9203 |
|
9204 | var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);
|
9205 |
|
9206 |
|
9207 |
|
9208 |
|
9209 | var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
|
9210 |
|
9211 | popper.setAttribute('x-placement', placement);
|
9212 |
|
9213 |
|
9214 |
|
9215 | setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });
|
9216 |
|
9217 | return options;
|
9218 | }
|
9219 |
|
9220 |
|
9221 |
|
9222 |
|
9223 |
|
9224 |
|
9225 |
|
9226 |
|
9227 |
|
9228 |
|
9229 |
|
9230 |
|
9231 |
|
9232 |
|
9233 |
|
9234 |
|
9235 |
|
9236 |
|
9237 |
|
9238 |
|
9239 | function getRoundedOffsets(data, shouldRound) {
|
9240 | var _data$offsets = data.offsets,
|
9241 | popper = _data$offsets.popper,
|
9242 | reference = _data$offsets.reference;
|
9243 | var round = Math.round,
|
9244 | floor = Math.floor;
|
9245 |
|
9246 | var noRound = function noRound(v) {
|
9247 | return v;
|
9248 | };
|
9249 |
|
9250 | var referenceWidth = round(reference.width);
|
9251 | var popperWidth = round(popper.width);
|
9252 |
|
9253 | var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
|
9254 | var isVariation = data.placement.indexOf('-') !== -1;
|
9255 | var sameWidthParity = referenceWidth % 2 === popperWidth % 2;
|
9256 | var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;
|
9257 |
|
9258 | var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;
|
9259 | var verticalToInteger = !shouldRound ? noRound : round;
|
9260 |
|
9261 | return {
|
9262 | left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),
|
9263 | top: verticalToInteger(popper.top),
|
9264 | bottom: verticalToInteger(popper.bottom),
|
9265 | right: horizontalToInteger(popper.right)
|
9266 | };
|
9267 | }
|
9268 |
|
9269 | var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);
|
9270 |
|
9271 |
|
9272 |
|
9273 |
|
9274 |
|
9275 |
|
9276 |
|
9277 |
|
9278 | function computeStyle(data, options) {
|
9279 | var x = options.x,
|
9280 | y = options.y;
|
9281 | var popper = data.offsets.popper;
|
9282 |
|
9283 |
|
9284 |
|
9285 | var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
|
9286 | return modifier.name === 'applyStyle';
|
9287 | }).gpuAcceleration;
|
9288 | if (legacyGpuAccelerationOption !== undefined) {
|
9289 | console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
|
9290 | }
|
9291 | var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
|
9292 |
|
9293 | var offsetParent = getOffsetParent(data.instance.popper);
|
9294 | var offsetParentRect = getBoundingClientRect(offsetParent);
|
9295 |
|
9296 |
|
9297 | var styles = {
|
9298 | position: popper.position
|
9299 | };
|
9300 |
|
9301 | var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);
|
9302 |
|
9303 | var sideA = x === 'bottom' ? 'top' : 'bottom';
|
9304 | var sideB = y === 'right' ? 'left' : 'right';
|
9305 |
|
9306 |
|
9307 |
|
9308 |
|
9309 | var prefixedProperty = getSupportedPropertyName('transform');
|
9310 |
|
9311 |
|
9312 |
|
9313 |
|
9314 |
|
9315 |
|
9316 |
|
9317 |
|
9318 |
|
9319 |
|
9320 | var left = void 0,
|
9321 | top = void 0;
|
9322 | if (sideA === 'bottom') {
|
9323 |
|
9324 |
|
9325 | if (offsetParent.nodeName === 'HTML') {
|
9326 | top = -offsetParent.clientHeight + offsets.bottom;
|
9327 | } else {
|
9328 | top = -offsetParentRect.height + offsets.bottom;
|
9329 | }
|
9330 | } else {
|
9331 | top = offsets.top;
|
9332 | }
|
9333 | if (sideB === 'right') {
|
9334 | if (offsetParent.nodeName === 'HTML') {
|
9335 | left = -offsetParent.clientWidth + offsets.right;
|
9336 | } else {
|
9337 | left = -offsetParentRect.width + offsets.right;
|
9338 | }
|
9339 | } else {
|
9340 | left = offsets.left;
|
9341 | }
|
9342 | if (gpuAcceleration && prefixedProperty) {
|
9343 | styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
|
9344 | styles[sideA] = 0;
|
9345 | styles[sideB] = 0;
|
9346 | styles.willChange = 'transform';
|
9347 | } else {
|
9348 |
|
9349 | var invertTop = sideA === 'bottom' ? -1 : 1;
|
9350 | var invertLeft = sideB === 'right' ? -1 : 1;
|
9351 | styles[sideA] = top * invertTop;
|
9352 | styles[sideB] = left * invertLeft;
|
9353 | styles.willChange = sideA + ', ' + sideB;
|
9354 | }
|
9355 |
|
9356 |
|
9357 | var attributes = {
|
9358 | 'x-placement': data.placement
|
9359 | };
|
9360 |
|
9361 |
|
9362 | data.attributes = _extends({}, attributes, data.attributes);
|
9363 | data.styles = _extends({}, styles, data.styles);
|
9364 | data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
|
9365 |
|
9366 | return data;
|
9367 | }
|
9368 |
|
9369 |
|
9370 |
|
9371 |
|
9372 |
|
9373 |
|
9374 |
|
9375 |
|
9376 |
|
9377 |
|
9378 |
|
9379 | function isModifierRequired(modifiers, requestingName, requestedName) {
|
9380 | var requesting = find(modifiers, function (_ref) {
|
9381 | var name = _ref.name;
|
9382 | return name === requestingName;
|
9383 | });
|
9384 |
|
9385 | var isRequired = !!requesting && modifiers.some(function (modifier) {
|
9386 | return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
|
9387 | });
|
9388 |
|
9389 | if (!isRequired) {
|
9390 | var _requesting = '`' + requestingName + '`';
|
9391 | var requested = '`' + requestedName + '`';
|
9392 | console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
|
9393 | }
|
9394 | return isRequired;
|
9395 | }
|
9396 |
|
9397 |
|
9398 |
|
9399 |
|
9400 |
|
9401 |
|
9402 |
|
9403 |
|
9404 | function arrow(data, options) {
|
9405 | var _data$offsets$arrow;
|
9406 |
|
9407 |
|
9408 | if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
|
9409 | return data;
|
9410 | }
|
9411 |
|
9412 | var arrowElement = options.element;
|
9413 |
|
9414 |
|
9415 | if (typeof arrowElement === 'string') {
|
9416 | arrowElement = data.instance.popper.querySelector(arrowElement);
|
9417 |
|
9418 |
|
9419 | if (!arrowElement) {
|
9420 | return data;
|
9421 | }
|
9422 | } else {
|
9423 |
|
9424 |
|
9425 | if (!data.instance.popper.contains(arrowElement)) {
|
9426 | console.warn('WARNING: `arrow.element` must be child of its popper element!');
|
9427 | return data;
|
9428 | }
|
9429 | }
|
9430 |
|
9431 | var placement = data.placement.split('-')[0];
|
9432 | var _data$offsets = data.offsets,
|
9433 | popper = _data$offsets.popper,
|
9434 | reference = _data$offsets.reference;
|
9435 |
|
9436 | var isVertical = ['left', 'right'].indexOf(placement) !== -1;
|
9437 |
|
9438 | var len = isVertical ? 'height' : 'width';
|
9439 | var sideCapitalized = isVertical ? 'Top' : 'Left';
|
9440 | var side = sideCapitalized.toLowerCase();
|
9441 | var altSide = isVertical ? 'left' : 'top';
|
9442 | var opSide = isVertical ? 'bottom' : 'right';
|
9443 | var arrowElementSize = getOuterSizes(arrowElement)[len];
|
9444 |
|
9445 |
|
9446 |
|
9447 |
|
9448 |
|
9449 |
|
9450 |
|
9451 | if (reference[opSide] - arrowElementSize < popper[side]) {
|
9452 | data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
|
9453 | }
|
9454 |
|
9455 | if (reference[side] + arrowElementSize > popper[opSide]) {
|
9456 | data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
|
9457 | }
|
9458 | data.offsets.popper = getClientRect(data.offsets.popper);
|
9459 |
|
9460 |
|
9461 | var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
|
9462 |
|
9463 |
|
9464 |
|
9465 | var css = getStyleComputedProperty(data.instance.popper);
|
9466 | var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);
|
9467 | var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);
|
9468 | var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;
|
9469 |
|
9470 |
|
9471 | sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
|
9472 |
|
9473 | data.arrowElement = arrowElement;
|
9474 | data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);
|
9475 |
|
9476 | return data;
|
9477 | }
|
9478 |
|
9479 |
|
9480 |
|
9481 |
|
9482 |
|
9483 |
|
9484 |
|
9485 |
|
9486 | function getOppositeVariation(variation) {
|
9487 | if (variation === 'end') {
|
9488 | return 'start';
|
9489 | } else if (variation === 'start') {
|
9490 | return 'end';
|
9491 | }
|
9492 | return variation;
|
9493 | }
|
9494 |
|
9495 |
|
9496 |
|
9497 |
|
9498 |
|
9499 |
|
9500 |
|
9501 |
|
9502 |
|
9503 |
|
9504 |
|
9505 |
|
9506 |
|
9507 |
|
9508 |
|
9509 |
|
9510 |
|
9511 |
|
9512 |
|
9513 |
|
9514 |
|
9515 |
|
9516 |
|
9517 |
|
9518 |
|
9519 |
|
9520 |
|
9521 |
|
9522 |
|
9523 |
|
9524 |
|
9525 |
|
9526 | var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
|
9527 |
|
9528 |
|
9529 | var validPlacements = placements.slice(3);
|
9530 |
|
9531 |
|
9532 |
|
9533 |
|
9534 |
|
9535 |
|
9536 |
|
9537 |
|
9538 |
|
9539 |
|
9540 |
|
9541 | function clockwise(placement) {
|
9542 | var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
9543 |
|
9544 | var index = validPlacements.indexOf(placement);
|
9545 | var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
|
9546 | return counter ? arr.reverse() : arr;
|
9547 | }
|
9548 |
|
9549 | var BEHAVIORS = {
|
9550 | FLIP: 'flip',
|
9551 | CLOCKWISE: 'clockwise',
|
9552 | COUNTERCLOCKWISE: 'counterclockwise'
|
9553 | };
|
9554 |
|
9555 |
|
9556 |
|
9557 |
|
9558 |
|
9559 |
|
9560 |
|
9561 |
|
9562 | function flip(data, options) {
|
9563 |
|
9564 | if (isModifierEnabled(data.instance.modifiers, 'inner')) {
|
9565 | return data;
|
9566 | }
|
9567 |
|
9568 | if (data.flipped && data.placement === data.originalPlacement) {
|
9569 |
|
9570 | return data;
|
9571 | }
|
9572 |
|
9573 | var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);
|
9574 |
|
9575 | var placement = data.placement.split('-')[0];
|
9576 | var placementOpposite = getOppositePlacement(placement);
|
9577 | var variation = data.placement.split('-')[1] || '';
|
9578 |
|
9579 | var flipOrder = [];
|
9580 |
|
9581 | switch (options.behavior) {
|
9582 | case BEHAVIORS.FLIP:
|
9583 | flipOrder = [placement, placementOpposite];
|
9584 | break;
|
9585 | case BEHAVIORS.CLOCKWISE:
|
9586 | flipOrder = clockwise(placement);
|
9587 | break;
|
9588 | case BEHAVIORS.COUNTERCLOCKWISE:
|
9589 | flipOrder = clockwise(placement, true);
|
9590 | break;
|
9591 | default:
|
9592 | flipOrder = options.behavior;
|
9593 | }
|
9594 |
|
9595 | flipOrder.forEach(function (step, index) {
|
9596 | if (placement !== step || flipOrder.length === index + 1) {
|
9597 | return data;
|
9598 | }
|
9599 |
|
9600 | placement = data.placement.split('-')[0];
|
9601 | placementOpposite = getOppositePlacement(placement);
|
9602 |
|
9603 | var popperOffsets = data.offsets.popper;
|
9604 | var refOffsets = data.offsets.reference;
|
9605 |
|
9606 |
|
9607 | var floor = Math.floor;
|
9608 | var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
|
9609 |
|
9610 | var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
|
9611 | var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
|
9612 | var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
|
9613 | var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
|
9614 |
|
9615 | var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
|
9616 |
|
9617 |
|
9618 | var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
|
9619 |
|
9620 |
|
9621 | var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
|
9622 |
|
9623 |
|
9624 | var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
|
9625 |
|
9626 | var flippedVariation = flippedVariationByRef || flippedVariationByContent;
|
9627 |
|
9628 | if (overlapsRef || overflowsBoundaries || flippedVariation) {
|
9629 |
|
9630 | data.flipped = true;
|
9631 |
|
9632 | if (overlapsRef || overflowsBoundaries) {
|
9633 | placement = flipOrder[index + 1];
|
9634 | }
|
9635 |
|
9636 | if (flippedVariation) {
|
9637 | variation = getOppositeVariation(variation);
|
9638 | }
|
9639 |
|
9640 | data.placement = placement + (variation ? '-' + variation : '');
|
9641 |
|
9642 |
|
9643 |
|
9644 | data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
|
9645 |
|
9646 | data = runModifiers(data.instance.modifiers, data, 'flip');
|
9647 | }
|
9648 | });
|
9649 | return data;
|
9650 | }
|
9651 |
|
9652 |
|
9653 |
|
9654 |
|
9655 |
|
9656 |
|
9657 |
|
9658 |
|
9659 | function keepTogether(data) {
|
9660 | var _data$offsets = data.offsets,
|
9661 | popper = _data$offsets.popper,
|
9662 | reference = _data$offsets.reference;
|
9663 |
|
9664 | var placement = data.placement.split('-')[0];
|
9665 | var floor = Math.floor;
|
9666 | var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
|
9667 | var side = isVertical ? 'right' : 'bottom';
|
9668 | var opSide = isVertical ? 'left' : 'top';
|
9669 | var measurement = isVertical ? 'width' : 'height';
|
9670 |
|
9671 | if (popper[side] < floor(reference[opSide])) {
|
9672 | data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
|
9673 | }
|
9674 | if (popper[opSide] > floor(reference[side])) {
|
9675 | data.offsets.popper[opSide] = floor(reference[side]);
|
9676 | }
|
9677 |
|
9678 | return data;
|
9679 | }
|
9680 |
|
9681 |
|
9682 |
|
9683 |
|
9684 |
|
9685 |
|
9686 |
|
9687 |
|
9688 |
|
9689 |
|
9690 |
|
9691 |
|
9692 |
|
9693 | function toValue(str, measurement, popperOffsets, referenceOffsets) {
|
9694 |
|
9695 | var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
|
9696 | var value = +split[1];
|
9697 | var unit = split[2];
|
9698 |
|
9699 |
|
9700 | if (!value) {
|
9701 | return str;
|
9702 | }
|
9703 |
|
9704 | if (unit.indexOf('%') === 0) {
|
9705 | var element = void 0;
|
9706 | switch (unit) {
|
9707 | case '%p':
|
9708 | element = popperOffsets;
|
9709 | break;
|
9710 | case '%':
|
9711 | case '%r':
|
9712 | default:
|
9713 | element = referenceOffsets;
|
9714 | }
|
9715 |
|
9716 | var rect = getClientRect(element);
|
9717 | return rect[measurement] / 100 * value;
|
9718 | } else if (unit === 'vh' || unit === 'vw') {
|
9719 |
|
9720 | var size = void 0;
|
9721 | if (unit === 'vh') {
|
9722 | size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
9723 | } else {
|
9724 | size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
9725 | }
|
9726 | return size / 100 * value;
|
9727 | } else {
|
9728 |
|
9729 |
|
9730 | return value;
|
9731 | }
|
9732 | }
|
9733 |
|
9734 |
|
9735 |
|
9736 |
|
9737 |
|
9738 |
|
9739 |
|
9740 |
|
9741 |
|
9742 |
|
9743 |
|
9744 |
|
9745 | function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
|
9746 | var offsets = [0, 0];
|
9747 |
|
9748 |
|
9749 |
|
9750 |
|
9751 | var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
|
9752 |
|
9753 |
|
9754 |
|
9755 | var fragments = offset.split(/(\+|\-)/).map(function (frag) {
|
9756 | return frag.trim();
|
9757 | });
|
9758 |
|
9759 |
|
9760 |
|
9761 | var divider = fragments.indexOf(find(fragments, function (frag) {
|
9762 | return frag.search(/,|\s/) !== -1;
|
9763 | }));
|
9764 |
|
9765 | if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
|
9766 | console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
|
9767 | }
|
9768 |
|
9769 |
|
9770 |
|
9771 | var splitRegex = /\s*,\s*|\s+/;
|
9772 | var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
|
9773 |
|
9774 |
|
9775 | ops = ops.map(function (op, index) {
|
9776 |
|
9777 | var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
|
9778 | var mergeWithPrevious = false;
|
9779 | return op
|
9780 |
|
9781 |
|
9782 | .reduce(function (a, b) {
|
9783 | if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
|
9784 | a[a.length - 1] = b;
|
9785 | mergeWithPrevious = true;
|
9786 | return a;
|
9787 | } else if (mergeWithPrevious) {
|
9788 | a[a.length - 1] += b;
|
9789 | mergeWithPrevious = false;
|
9790 | return a;
|
9791 | } else {
|
9792 | return a.concat(b);
|
9793 | }
|
9794 | }, [])
|
9795 |
|
9796 | .map(function (str) {
|
9797 | return toValue(str, measurement, popperOffsets, referenceOffsets);
|
9798 | });
|
9799 | });
|
9800 |
|
9801 |
|
9802 | ops.forEach(function (op, index) {
|
9803 | op.forEach(function (frag, index2) {
|
9804 | if (isNumeric(frag)) {
|
9805 | offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
|
9806 | }
|
9807 | });
|
9808 | });
|
9809 | return offsets;
|
9810 | }
|
9811 |
|
9812 |
|
9813 |
|
9814 |
|
9815 |
|
9816 |
|
9817 |
|
9818 |
|
9819 |
|
9820 |
|
9821 | function offset(data, _ref) {
|
9822 | var offset = _ref.offset;
|
9823 | var placement = data.placement,
|
9824 | _data$offsets = data.offsets,
|
9825 | popper = _data$offsets.popper,
|
9826 | reference = _data$offsets.reference;
|
9827 |
|
9828 | var basePlacement = placement.split('-')[0];
|
9829 |
|
9830 | var offsets = void 0;
|
9831 | if (isNumeric(+offset)) {
|
9832 | offsets = [+offset, 0];
|
9833 | } else {
|
9834 | offsets = parseOffset(offset, popper, reference, basePlacement);
|
9835 | }
|
9836 |
|
9837 | if (basePlacement === 'left') {
|
9838 | popper.top += offsets[0];
|
9839 | popper.left -= offsets[1];
|
9840 | } else if (basePlacement === 'right') {
|
9841 | popper.top += offsets[0];
|
9842 | popper.left += offsets[1];
|
9843 | } else if (basePlacement === 'top') {
|
9844 | popper.left += offsets[0];
|
9845 | popper.top -= offsets[1];
|
9846 | } else if (basePlacement === 'bottom') {
|
9847 | popper.left += offsets[0];
|
9848 | popper.top += offsets[1];
|
9849 | }
|
9850 |
|
9851 | data.popper = popper;
|
9852 | return data;
|
9853 | }
|
9854 |
|
9855 |
|
9856 |
|
9857 |
|
9858 |
|
9859 |
|
9860 |
|
9861 |
|
9862 | function preventOverflow(data, options) {
|
9863 | var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
|
9864 |
|
9865 |
|
9866 |
|
9867 |
|
9868 | if (data.instance.reference === boundariesElement) {
|
9869 | boundariesElement = getOffsetParent(boundariesElement);
|
9870 | }
|
9871 |
|
9872 |
|
9873 |
|
9874 |
|
9875 | var transformProp = getSupportedPropertyName('transform');
|
9876 | var popperStyles = data.instance.popper.style;
|
9877 | var top = popperStyles.top,
|
9878 | left = popperStyles.left,
|
9879 | transform = popperStyles[transformProp];
|
9880 |
|
9881 | popperStyles.top = '';
|
9882 | popperStyles.left = '';
|
9883 | popperStyles[transformProp] = '';
|
9884 |
|
9885 | var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);
|
9886 |
|
9887 |
|
9888 |
|
9889 | popperStyles.top = top;
|
9890 | popperStyles.left = left;
|
9891 | popperStyles[transformProp] = transform;
|
9892 |
|
9893 | options.boundaries = boundaries;
|
9894 |
|
9895 | var order = options.priority;
|
9896 | var popper = data.offsets.popper;
|
9897 |
|
9898 | var check = {
|
9899 | primary: function primary(placement) {
|
9900 | var value = popper[placement];
|
9901 | if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
|
9902 | value = Math.max(popper[placement], boundaries[placement]);
|
9903 | }
|
9904 | return defineProperty({}, placement, value);
|
9905 | },
|
9906 | secondary: function secondary(placement) {
|
9907 | var mainSide = placement === 'right' ? 'left' : 'top';
|
9908 | var value = popper[mainSide];
|
9909 | if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
|
9910 | value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
|
9911 | }
|
9912 | return defineProperty({}, mainSide, value);
|
9913 | }
|
9914 | };
|
9915 |
|
9916 | order.forEach(function (placement) {
|
9917 | var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
|
9918 | popper = _extends({}, popper, check[side](placement));
|
9919 | });
|
9920 |
|
9921 | data.offsets.popper = popper;
|
9922 |
|
9923 | return data;
|
9924 | }
|
9925 |
|
9926 |
|
9927 |
|
9928 |
|
9929 |
|
9930 |
|
9931 |
|
9932 |
|
9933 | function shift(data) {
|
9934 | var placement = data.placement;
|
9935 | var basePlacement = placement.split('-')[0];
|
9936 | var shiftvariation = placement.split('-')[1];
|
9937 |
|
9938 |
|
9939 | if (shiftvariation) {
|
9940 | var _data$offsets = data.offsets,
|
9941 | reference = _data$offsets.reference,
|
9942 | popper = _data$offsets.popper;
|
9943 |
|
9944 | var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
|
9945 | var side = isVertical ? 'left' : 'top';
|
9946 | var measurement = isVertical ? 'width' : 'height';
|
9947 |
|
9948 | var shiftOffsets = {
|
9949 | start: defineProperty({}, side, reference[side]),
|
9950 | end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
|
9951 | };
|
9952 |
|
9953 | data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
|
9954 | }
|
9955 |
|
9956 | return data;
|
9957 | }
|
9958 |
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 |
|
9964 |
|
9965 |
|
9966 | function hide(data) {
|
9967 | if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
|
9968 | return data;
|
9969 | }
|
9970 |
|
9971 | var refRect = data.offsets.reference;
|
9972 | var bound = find(data.instance.modifiers, function (modifier) {
|
9973 | return modifier.name === 'preventOverflow';
|
9974 | }).boundaries;
|
9975 |
|
9976 | if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
|
9977 |
|
9978 | if (data.hide === true) {
|
9979 | return data;
|
9980 | }
|
9981 |
|
9982 | data.hide = true;
|
9983 | data.attributes['x-out-of-boundaries'] = '';
|
9984 | } else {
|
9985 |
|
9986 | if (data.hide === false) {
|
9987 | return data;
|
9988 | }
|
9989 |
|
9990 | data.hide = false;
|
9991 | data.attributes['x-out-of-boundaries'] = false;
|
9992 | }
|
9993 |
|
9994 | return data;
|
9995 | }
|
9996 |
|
9997 |
|
9998 |
|
9999 |
|
10000 |
|
10001 |
|
10002 |
|
10003 |
|
10004 | function inner(data) {
|
10005 | var placement = data.placement;
|
10006 | var basePlacement = placement.split('-')[0];
|
10007 | var _data$offsets = data.offsets,
|
10008 | popper = _data$offsets.popper,
|
10009 | reference = _data$offsets.reference;
|
10010 |
|
10011 | var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
|
10012 |
|
10013 | var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
|
10014 |
|
10015 | popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
|
10016 |
|
10017 | data.placement = getOppositePlacement(placement);
|
10018 | data.offsets.popper = getClientRect(popper);
|
10019 |
|
10020 | return data;
|
10021 | }
|
10022 |
|
10023 |
|
10024 |
|
10025 |
|
10026 |
|
10027 |
|
10028 |
|
10029 |
|
10030 |
|
10031 |
|
10032 |
|
10033 |
|
10034 |
|
10035 |
|
10036 |
|
10037 |
|
10038 |
|
10039 |
|
10040 |
|
10041 |
|
10042 |
|
10043 |
|
10044 | var modifiers = {
|
10045 | |
10046 |
|
10047 |
|
10048 |
|
10049 |
|
10050 |
|
10051 |
|
10052 |
|
10053 | shift: {
|
10054 |
|
10055 | order: 100,
|
10056 |
|
10057 | enabled: true,
|
10058 |
|
10059 | fn: shift
|
10060 | },
|
10061 |
|
10062 | |
10063 |
|
10064 |
|
10065 |
|
10066 |
|
10067 |
|
10068 |
|
10069 |
|
10070 |
|
10071 |
|
10072 |
|
10073 |
|
10074 |
|
10075 |
|
10076 |
|
10077 |
|
10078 |
|
10079 |
|
10080 |
|
10081 |
|
10082 |
|
10083 |
|
10084 |
|
10085 |
|
10086 |
|
10087 |
|
10088 |
|
10089 |
|
10090 |
|
10091 |
|
10092 |
|
10093 |
|
10094 |
|
10095 |
|
10096 |
|
10097 |
|
10098 |
|
10099 |
|
10100 | offset: {
|
10101 |
|
10102 | order: 200,
|
10103 |
|
10104 | enabled: true,
|
10105 |
|
10106 | fn: offset,
|
10107 | |
10108 |
|
10109 |
|
10110 | offset: 0
|
10111 | },
|
10112 |
|
10113 | |
10114 |
|
10115 |
|
10116 |
|
10117 |
|
10118 |
|
10119 |
|
10120 |
|
10121 |
|
10122 |
|
10123 |
|
10124 |
|
10125 |
|
10126 |
|
10127 |
|
10128 |
|
10129 |
|
10130 | preventOverflow: {
|
10131 |
|
10132 | order: 300,
|
10133 |
|
10134 | enabled: true,
|
10135 |
|
10136 | fn: preventOverflow,
|
10137 | |
10138 |
|
10139 |
|
10140 |
|
10141 |
|
10142 | priority: ['left', 'right', 'top', 'bottom'],
|
10143 | |
10144 |
|
10145 |
|
10146 |
|
10147 |
|
10148 |
|
10149 | padding: 5,
|
10150 | |
10151 |
|
10152 |
|
10153 |
|
10154 |
|
10155 | boundariesElement: 'scrollParent'
|
10156 | },
|
10157 |
|
10158 | |
10159 |
|
10160 |
|
10161 |
|
10162 |
|
10163 |
|
10164 |
|
10165 |
|
10166 |
|
10167 | keepTogether: {
|
10168 |
|
10169 | order: 400,
|
10170 |
|
10171 | enabled: true,
|
10172 |
|
10173 | fn: keepTogether
|
10174 | },
|
10175 |
|
10176 | |
10177 |
|
10178 |
|
10179 |
|
10180 |
|
10181 |
|
10182 |
|
10183 |
|
10184 |
|
10185 |
|
10186 | arrow: {
|
10187 |
|
10188 | order: 500,
|
10189 |
|
10190 | enabled: true,
|
10191 |
|
10192 | fn: arrow,
|
10193 |
|
10194 | element: '[x-arrow]'
|
10195 | },
|
10196 |
|
10197 | |
10198 |
|
10199 |
|
10200 |
|
10201 |
|
10202 |
|
10203 |
|
10204 |
|
10205 |
|
10206 |
|
10207 |
|
10208 | flip: {
|
10209 |
|
10210 | order: 600,
|
10211 |
|
10212 | enabled: true,
|
10213 |
|
10214 | fn: flip,
|
10215 | |
10216 |
|
10217 |
|
10218 |
|
10219 |
|
10220 |
|
10221 | behavior: 'flip',
|
10222 | |
10223 |
|
10224 |
|
10225 |
|
10226 | padding: 5,
|
10227 | |
10228 |
|
10229 |
|
10230 |
|
10231 |
|
10232 |
|
10233 | boundariesElement: 'viewport',
|
10234 | |
10235 |
|
10236 |
|
10237 |
|
10238 |
|
10239 |
|
10240 |
|
10241 | flipVariations: false,
|
10242 | |
10243 |
|
10244 |
|
10245 |
|
10246 |
|
10247 |
|
10248 |
|
10249 | flipVariationsByContent: false
|
10250 | },
|
10251 |
|
10252 | |
10253 |
|
10254 |
|
10255 |
|
10256 |
|
10257 |
|
10258 |
|
10259 | inner: {
|
10260 |
|
10261 | order: 700,
|
10262 |
|
10263 | enabled: false,
|
10264 |
|
10265 | fn: inner
|
10266 | },
|
10267 |
|
10268 | |
10269 |
|
10270 |
|
10271 |
|
10272 |
|
10273 |
|
10274 |
|
10275 |
|
10276 |
|
10277 |
|
10278 | hide: {
|
10279 |
|
10280 | order: 800,
|
10281 |
|
10282 | enabled: true,
|
10283 |
|
10284 | fn: hide
|
10285 | },
|
10286 |
|
10287 | |
10288 |
|
10289 |
|
10290 |
|
10291 |
|
10292 |
|
10293 |
|
10294 |
|
10295 |
|
10296 |
|
10297 |
|
10298 |
|
10299 |
|
10300 |
|
10301 |
|
10302 | computeStyle: {
|
10303 |
|
10304 | order: 850,
|
10305 |
|
10306 | enabled: true,
|
10307 |
|
10308 | fn: computeStyle,
|
10309 | |
10310 |
|
10311 |
|
10312 |
|
10313 |
|
10314 | gpuAcceleration: true,
|
10315 | |
10316 |
|
10317 |
|
10318 |
|
10319 |
|
10320 | x: 'bottom',
|
10321 | |
10322 |
|
10323 |
|
10324 |
|
10325 |
|
10326 | y: 'right'
|
10327 | },
|
10328 |
|
10329 | |
10330 |
|
10331 |
|
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 |
|
10337 |
|
10338 |
|
10339 |
|
10340 |
|
10341 |
|
10342 |
|
10343 |
|
10344 | applyStyle: {
|
10345 |
|
10346 | order: 900,
|
10347 |
|
10348 | enabled: true,
|
10349 |
|
10350 | fn: applyStyle,
|
10351 |
|
10352 | onLoad: applyStyleOnLoad,
|
10353 | |
10354 |
|
10355 |
|
10356 |
|
10357 |
|
10358 |
|
10359 | gpuAcceleration: undefined
|
10360 | }
|
10361 | };
|
10362 |
|
10363 |
|
10364 |
|
10365 |
|
10366 |
|
10367 |
|
10368 |
|
10369 |
|
10370 |
|
10371 |
|
10372 |
|
10373 |
|
10374 |
|
10375 |
|
10376 |
|
10377 |
|
10378 |
|
10379 |
|
10380 |
|
10381 |
|
10382 |
|
10383 |
|
10384 |
|
10385 |
|
10386 |
|
10387 |
|
10388 |
|
10389 |
|
10390 |
|
10391 |
|
10392 |
|
10393 |
|
10394 |
|
10395 |
|
10396 |
|
10397 |
|
10398 | var Defaults = {
|
10399 | |
10400 |
|
10401 |
|
10402 |
|
10403 | placement: 'bottom',
|
10404 |
|
10405 | |
10406 |
|
10407 |
|
10408 |
|
10409 | positionFixed: false,
|
10410 |
|
10411 | |
10412 |
|
10413 |
|
10414 |
|
10415 | eventsEnabled: true,
|
10416 |
|
10417 | |
10418 |
|
10419 |
|
10420 |
|
10421 |
|
10422 | removeOnDestroy: false,
|
10423 |
|
10424 | |
10425 |
|
10426 |
|
10427 |
|
10428 |
|
10429 |
|
10430 | onCreate: function onCreate() {},
|
10431 |
|
10432 | |
10433 |
|
10434 |
|
10435 |
|
10436 |
|
10437 |
|
10438 |
|
10439 |
|
10440 | onUpdate: function onUpdate() {},
|
10441 |
|
10442 | |
10443 |
|
10444 |
|
10445 |
|
10446 |
|
10447 | modifiers: modifiers
|
10448 | };
|
10449 |
|
10450 |
|
10451 |
|
10452 |
|
10453 |
|
10454 |
|
10455 |
|
10456 |
|
10457 |
|
10458 |
|
10459 |
|
10460 |
|
10461 |
|
10462 | var Popper = function () {
|
10463 | |
10464 |
|
10465 |
|
10466 |
|
10467 |
|
10468 |
|
10469 |
|
10470 |
|
10471 | function Popper(reference, popper) {
|
10472 | var _this = this;
|
10473 |
|
10474 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
10475 | classCallCheck(this, Popper);
|
10476 |
|
10477 | this.scheduleUpdate = function () {
|
10478 | return requestAnimationFrame(_this.update);
|
10479 | };
|
10480 |
|
10481 |
|
10482 | this.update = debounce(this.update.bind(this));
|
10483 |
|
10484 |
|
10485 | this.options = _extends({}, Popper.Defaults, options);
|
10486 |
|
10487 |
|
10488 | this.state = {
|
10489 | isDestroyed: false,
|
10490 | isCreated: false,
|
10491 | scrollParents: []
|
10492 | };
|
10493 |
|
10494 |
|
10495 | this.reference = reference && reference.jquery ? reference[0] : reference;
|
10496 | this.popper = popper && popper.jquery ? popper[0] : popper;
|
10497 |
|
10498 |
|
10499 | this.options.modifiers = {};
|
10500 | Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
|
10501 | _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
|
10502 | });
|
10503 |
|
10504 |
|
10505 | this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
|
10506 | return _extends({
|
10507 | name: name
|
10508 | }, _this.options.modifiers[name]);
|
10509 | })
|
10510 |
|
10511 | .sort(function (a, b) {
|
10512 | return a.order - b.order;
|
10513 | });
|
10514 |
|
10515 |
|
10516 |
|
10517 |
|
10518 |
|
10519 | this.modifiers.forEach(function (modifierOptions) {
|
10520 | if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
|
10521 | modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
|
10522 | }
|
10523 | });
|
10524 |
|
10525 |
|
10526 | this.update();
|
10527 |
|
10528 | var eventsEnabled = this.options.eventsEnabled;
|
10529 | if (eventsEnabled) {
|
10530 |
|
10531 | this.enableEventListeners();
|
10532 | }
|
10533 |
|
10534 | this.state.eventsEnabled = eventsEnabled;
|
10535 | }
|
10536 |
|
10537 |
|
10538 |
|
10539 |
|
10540 |
|
10541 | createClass(Popper, [{
|
10542 | key: 'update',
|
10543 | value: function update$$1() {
|
10544 | return update.call(this);
|
10545 | }
|
10546 | }, {
|
10547 | key: 'destroy',
|
10548 | value: function destroy$$1() {
|
10549 | return destroy.call(this);
|
10550 | }
|
10551 | }, {
|
10552 | key: 'enableEventListeners',
|
10553 | value: function enableEventListeners$$1() {
|
10554 | return enableEventListeners.call(this);
|
10555 | }
|
10556 | }, {
|
10557 | key: 'disableEventListeners',
|
10558 | value: function disableEventListeners$$1() {
|
10559 | return disableEventListeners.call(this);
|
10560 | }
|
10561 |
|
10562 | |
10563 |
|
10564 |
|
10565 |
|
10566 |
|
10567 |
|
10568 |
|
10569 | |
10570 |
|
10571 |
|
10572 |
|
10573 |
|
10574 |
|
10575 |
|
10576 |
|
10577 |
|
10578 |
|
10579 |
|
10580 |
|
10581 |
|
10582 |
|
10583 |
|
10584 |
|
10585 |
|
10586 | }]);
|
10587 | return Popper;
|
10588 | }();
|
10589 |
|
10590 |
|
10591 |
|
10592 |
|
10593 |
|
10594 |
|
10595 |
|
10596 |
|
10597 |
|
10598 |
|
10599 |
|
10600 |
|
10601 |
|
10602 |
|
10603 |
|
10604 |
|
10605 |
|
10606 |
|
10607 |
|
10608 |
|
10609 |
|
10610 |
|
10611 | Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
|
10612 | Popper.placements = placements;
|
10613 | Popper.Defaults = Defaults;
|
10614 |
|
10615 | __webpack_exports__["a"] = (Popper);
|
10616 |
|
10617 |
|
10618 | }.call(this, __webpack_require__(49)))
|
10619 |
|
10620 | }),
|
10621 |
|
10622 | (function(module, exports, __webpack_require__) {
|
10623 |
|
10624 | "use strict";
|
10625 |
|
10626 |
|
10627 | var _interopRequireDefault = __webpack_require__(13);
|
10628 |
|
10629 | Object.defineProperty(exports, "__esModule", {
|
10630 | value: true
|
10631 | });
|
10632 | exports.default = void 0;
|
10633 |
|
10634 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10635 |
|
10636 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10637 |
|
10638 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10639 | d: "M7.11 8.53L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47zM6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47zm1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93z"
|
10640 | }), 'RotateLeft');
|
10641 |
|
10642 | exports.default = _default;
|
10643 |
|
10644 | }),
|
10645 |
|
10646 | (function(module, exports, __webpack_require__) {
|
10647 |
|
10648 | "use strict";
|
10649 |
|
10650 |
|
10651 | var _interopRequireDefault = __webpack_require__(13);
|
10652 |
|
10653 | Object.defineProperty(exports, "__esModule", {
|
10654 | value: true
|
10655 | });
|
10656 | exports.default = void 0;
|
10657 |
|
10658 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10659 |
|
10660 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10661 |
|
10662 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10663 | d: "M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"
|
10664 | }), 'RotateRight');
|
10665 |
|
10666 | exports.default = _default;
|
10667 |
|
10668 | }),
|
10669 |
|
10670 | (function(module, exports, __webpack_require__) {
|
10671 |
|
10672 | "use strict";
|
10673 |
|
10674 |
|
10675 | var _interopRequireDefault = __webpack_require__(13);
|
10676 |
|
10677 | Object.defineProperty(exports, "__esModule", {
|
10678 | value: true
|
10679 | });
|
10680 | exports.default = void 0;
|
10681 |
|
10682 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10683 |
|
10684 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10685 |
|
10686 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10687 | d: "M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"
|
10688 | }), 'SwapHoriz');
|
10689 |
|
10690 | exports.default = _default;
|
10691 |
|
10692 | }),
|
10693 |
|
10694 | (function(module, exports, __webpack_require__) {
|
10695 |
|
10696 | "use strict";
|
10697 |
|
10698 |
|
10699 | var _interopRequireDefault = __webpack_require__(13);
|
10700 |
|
10701 | Object.defineProperty(exports, "__esModule", {
|
10702 | value: true
|
10703 | });
|
10704 | exports.default = void 0;
|
10705 |
|
10706 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10707 |
|
10708 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10709 |
|
10710 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10711 | d: "M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"
|
10712 | }), 'Brightness5');
|
10713 |
|
10714 | exports.default = _default;
|
10715 |
|
10716 | }),
|
10717 |
|
10718 | (function(module, exports, __webpack_require__) {
|
10719 |
|
10720 | "use strict";
|
10721 |
|
10722 |
|
10723 | var _interopRequireDefault = __webpack_require__(13);
|
10724 |
|
10725 | Object.defineProperty(exports, "__esModule", {
|
10726 | value: true
|
10727 | });
|
10728 | exports.default = void 0;
|
10729 |
|
10730 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10731 |
|
10732 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10733 |
|
10734 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10735 | d: "M21 3H3v18h18V3zM6 7h5v1.5H6V7zm13 12H5L19 5v14zm-4.5-3v2H16v-2h2v-1.5h-2v-2h-1.5v2h-2V16h2z"
|
10736 | }), 'ExposureSharp');
|
10737 |
|
10738 | exports.default = _default;
|
10739 |
|
10740 | }),
|
10741 |
|
10742 | (function(module, exports, __webpack_require__) {
|
10743 |
|
10744 | "use strict";
|
10745 |
|
10746 |
|
10747 | var _interopRequireDefault = __webpack_require__(13);
|
10748 |
|
10749 | Object.defineProperty(exports, "__esModule", {
|
10750 | value: true
|
10751 | });
|
10752 | exports.default = void 0;
|
10753 |
|
10754 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10755 |
|
10756 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10757 |
|
10758 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10759 | d: "M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"
|
10760 | }), 'Gradient');
|
10761 |
|
10762 | exports.default = _default;
|
10763 |
|
10764 | }),
|
10765 |
|
10766 | (function(module, exports, __webpack_require__) {
|
10767 |
|
10768 | "use strict";
|
10769 |
|
10770 |
|
10771 | var _interopRequireDefault = __webpack_require__(13);
|
10772 |
|
10773 | Object.defineProperty(exports, "__esModule", {
|
10774 | value: true
|
10775 | });
|
10776 | exports.default = void 0;
|
10777 |
|
10778 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10779 |
|
10780 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10781 |
|
10782 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10783 | d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.93H13v-.93zM13 7h5.24c.25.31.48.65.68 1H13V7zm0 3h6.74c.08.33.15.66.19 1H13v-1zm0 9.93V19h2.87c-.87.48-1.84.8-2.87.93zM18.24 17H13v-1h5.92c-.2.35-.43.69-.68 1zm1.5-3H13v-1h6.93c-.04.34-.11.67-.19 1z"
|
10784 | }), 'Tonality');
|
10785 |
|
10786 | exports.default = _default;
|
10787 |
|
10788 | }),
|
10789 |
|
10790 | (function(module, exports, __webpack_require__) {
|
10791 |
|
10792 | "use strict";
|
10793 |
|
10794 |
|
10795 | var _interopRequireDefault = __webpack_require__(13);
|
10796 |
|
10797 | Object.defineProperty(exports, "__esModule", {
|
10798 | value: true
|
10799 | });
|
10800 | exports.default = void 0;
|
10801 |
|
10802 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10803 |
|
10804 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10805 |
|
10806 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10807 | d: "M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"
|
10808 | }), 'InvertColors');
|
10809 |
|
10810 | exports.default = _default;
|
10811 |
|
10812 | }),
|
10813 |
|
10814 | (function(module, exports, __webpack_require__) {
|
10815 |
|
10816 | "use strict";
|
10817 |
|
10818 |
|
10819 | var _interopRequireDefault = __webpack_require__(13);
|
10820 |
|
10821 | Object.defineProperty(exports, "__esModule", {
|
10822 | value: true
|
10823 | });
|
10824 | exports.default = void 0;
|
10825 |
|
10826 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10827 |
|
10828 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10829 |
|
10830 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10831 | d: "M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"
|
10832 | }), 'ReplaySharp');
|
10833 |
|
10834 | exports.default = _default;
|
10835 |
|
10836 | }),
|
10837 |
|
10838 | (function(module, exports, __webpack_require__) {
|
10839 |
|
10840 | "use strict";
|
10841 |
|
10842 |
|
10843 | var _interopRequireDefault = __webpack_require__(13);
|
10844 |
|
10845 | Object.defineProperty(exports, "__esModule", {
|
10846 | value: true
|
10847 | });
|
10848 | exports.default = void 0;
|
10849 |
|
10850 | var _react = _interopRequireDefault(__webpack_require__(0));
|
10851 |
|
10852 | var _createSvgIcon = _interopRequireDefault(__webpack_require__(15));
|
10853 |
|
10854 | var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
|
10855 | d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
10856 | }), 'CloseSharp');
|
10857 |
|
10858 | exports.default = _default;
|
10859 |
|
10860 | }),
|
10861 |
|
10862 | (function(module, exports, __webpack_require__) {
|
10863 |
|
10864 | "use strict";
|
10865 |
|
10866 |
|
10867 | var isMergeableObject = function isMergeableObject(value) {
|
10868 | return isNonNullObject(value)
|
10869 | && !isSpecial(value)
|
10870 | };
|
10871 |
|
10872 | function isNonNullObject(value) {
|
10873 | return !!value && typeof value === 'object'
|
10874 | }
|
10875 |
|
10876 | function isSpecial(value) {
|
10877 | var stringValue = Object.prototype.toString.call(value);
|
10878 |
|
10879 | return stringValue === '[object RegExp]'
|
10880 | || stringValue === '[object Date]'
|
10881 | || isReactElement(value)
|
10882 | }
|
10883 |
|
10884 |
|
10885 | var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
|
10886 | var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
|
10887 |
|
10888 | function isReactElement(value) {
|
10889 | return value.$$typeof === REACT_ELEMENT_TYPE
|
10890 | }
|
10891 |
|
10892 | function emptyTarget(val) {
|
10893 | return Array.isArray(val) ? [] : {}
|
10894 | }
|
10895 |
|
10896 | function cloneUnlessOtherwiseSpecified(value, options) {
|
10897 | return (options.clone !== false && options.isMergeableObject(value))
|
10898 | ? deepmerge(emptyTarget(value), value, options)
|
10899 | : value
|
10900 | }
|
10901 |
|
10902 | function defaultArrayMerge(target, source, options) {
|
10903 | return target.concat(source).map(function(element) {
|
10904 | return cloneUnlessOtherwiseSpecified(element, options)
|
10905 | })
|
10906 | }
|
10907 |
|
10908 | function getMergeFunction(key, options) {
|
10909 | if (!options.customMerge) {
|
10910 | return deepmerge
|
10911 | }
|
10912 | var customMerge = options.customMerge(key);
|
10913 | return typeof customMerge === 'function' ? customMerge : deepmerge
|
10914 | }
|
10915 |
|
10916 | function getEnumerableOwnPropertySymbols(target) {
|
10917 | return Object.getOwnPropertySymbols
|
10918 | ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
10919 | return target.propertyIsEnumerable(symbol)
|
10920 | })
|
10921 | : []
|
10922 | }
|
10923 |
|
10924 | function getKeys(target) {
|
10925 | return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
10926 | }
|
10927 |
|
10928 | function propertyIsOnObject(object, property) {
|
10929 | try {
|
10930 | return property in object
|
10931 | } catch(_) {
|
10932 | return false
|
10933 | }
|
10934 | }
|
10935 |
|
10936 |
|
10937 | function propertyIsUnsafe(target, key) {
|
10938 | return propertyIsOnObject(target, key)
|
10939 | && !(Object.hasOwnProperty.call(target, key)
|
10940 | && Object.propertyIsEnumerable.call(target, key))
|
10941 | }
|
10942 |
|
10943 | function mergeObject(target, source, options) {
|
10944 | var destination = {};
|
10945 | if (options.isMergeableObject(target)) {
|
10946 | getKeys(target).forEach(function(key) {
|
10947 | destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
|
10948 | });
|
10949 | }
|
10950 | getKeys(source).forEach(function(key) {
|
10951 | if (propertyIsUnsafe(target, key)) {
|
10952 | return
|
10953 | }
|
10954 |
|
10955 | if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
10956 | destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
|
10957 | } else {
|
10958 | destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
|
10959 | }
|
10960 | });
|
10961 | return destination
|
10962 | }
|
10963 |
|
10964 | function deepmerge(target, source, options) {
|
10965 | options = options || {};
|
10966 | options.arrayMerge = options.arrayMerge || defaultArrayMerge;
|
10967 | options.isMergeableObject = options.isMergeableObject || isMergeableObject;
|
10968 |
|
10969 |
|
10970 | options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
|
10971 |
|
10972 | var sourceIsArray = Array.isArray(source);
|
10973 | var targetIsArray = Array.isArray(target);
|
10974 | var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
|
10975 |
|
10976 | if (!sourceAndTargetTypesMatch) {
|
10977 | return cloneUnlessOtherwiseSpecified(source, options)
|
10978 | } else if (sourceIsArray) {
|
10979 | return options.arrayMerge(target, source, options)
|
10980 | } else {
|
10981 | return mergeObject(target, source, options)
|
10982 | }
|
10983 | }
|
10984 |
|
10985 | deepmerge.all = function deepmergeAll(array, options) {
|
10986 | if (!Array.isArray(array)) {
|
10987 | throw new Error('first argument should be an array')
|
10988 | }
|
10989 |
|
10990 | return array.reduce(function(prev, next) {
|
10991 | return deepmerge(prev, next, options)
|
10992 | }, {})
|
10993 | };
|
10994 |
|
10995 | var deepmerge_1 = deepmerge;
|
10996 |
|
10997 | module.exports = deepmerge_1;
|
10998 |
|
10999 |
|
11000 | }),
|
11001 |
|
11002 | (function(module, exports, __webpack_require__) {
|
11003 |
|
11004 | (function (global, factory) {
|
11005 | true ? factory(exports, __webpack_require__(3)) :
|
11006 | undefined;
|
11007 | }(this, (function (exports, reselect) { 'use strict';
|
11008 |
|
11009 | function isStringOrNumber(value) {
|
11010 | return typeof value === 'string' || typeof value === 'number';
|
11011 | }
|
11012 |
|
11013 | var FlatObjectCache = function () {
|
11014 | function FlatObjectCache() {
|
11015 | this._cache = {};
|
11016 | }
|
11017 |
|
11018 | var _proto = FlatObjectCache.prototype;
|
11019 |
|
11020 | _proto.set = function set(key, selectorFn) {
|
11021 | this._cache[key] = selectorFn;
|
11022 | };
|
11023 |
|
11024 | _proto.get = function get(key) {
|
11025 | return this._cache[key];
|
11026 | };
|
11027 |
|
11028 | _proto.remove = function remove(key) {
|
11029 | delete this._cache[key];
|
11030 | };
|
11031 |
|
11032 | _proto.clear = function clear() {
|
11033 | this._cache = {};
|
11034 | };
|
11035 |
|
11036 | _proto.isValidCacheKey = function isValidCacheKey(cacheKey) {
|
11037 | return isStringOrNumber(cacheKey);
|
11038 | };
|
11039 |
|
11040 | return FlatObjectCache;
|
11041 | }();
|
11042 |
|
11043 | var defaultCacheCreator = FlatObjectCache;
|
11044 |
|
11045 | var defaultCacheKeyValidator = function defaultCacheKeyValidator() {
|
11046 | return true;
|
11047 | };
|
11048 |
|
11049 | function createCachedSelector() {
|
11050 | for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
11051 | funcs[_key] = arguments[_key];
|
11052 | }
|
11053 |
|
11054 | return function (polymorphicOptions, legacyOptions) {
|
11055 | if (legacyOptions) {
|
11056 | throw new Error('[re-reselect] "options" as second argument is not supported anymore. Please provide an option object as single argument.');
|
11057 | }
|
11058 |
|
11059 | var options = typeof polymorphicOptions === 'function' ? {
|
11060 | keySelector: polymorphicOptions
|
11061 | } : Object.assign({}, polymorphicOptions);
|
11062 |
|
11063 | var recomputations = 0;
|
11064 | var resultFunc = funcs.pop();
|
11065 | var dependencies = Array.isArray(funcs[0]) ? funcs[0] : [].concat(funcs);
|
11066 |
|
11067 | var resultFuncWithRecomputations = function resultFuncWithRecomputations() {
|
11068 | recomputations++;
|
11069 | return resultFunc.apply(void 0, arguments);
|
11070 | };
|
11071 |
|
11072 | funcs.push(resultFuncWithRecomputations);
|
11073 | var cache = options.cacheObject || new defaultCacheCreator();
|
11074 | var selectorCreator = options.selectorCreator || reselect.createSelector;
|
11075 | var isValidCacheKey = cache.isValidCacheKey || defaultCacheKeyValidator;
|
11076 |
|
11077 | if (options.keySelectorCreator) {
|
11078 | options.keySelector = options.keySelectorCreator({
|
11079 | keySelector: options.keySelector,
|
11080 | inputSelectors: dependencies,
|
11081 | resultFunc: resultFunc
|
11082 | });
|
11083 | }
|
11084 |
|
11085 |
|
11086 | var selector = function selector() {
|
11087 | var cacheKey = options.keySelector.apply(options, arguments);
|
11088 |
|
11089 | if (isValidCacheKey(cacheKey)) {
|
11090 | var cacheResponse = cache.get(cacheKey);
|
11091 |
|
11092 | if (cacheResponse === undefined) {
|
11093 | cacheResponse = selectorCreator.apply(void 0, funcs);
|
11094 | cache.set(cacheKey, cacheResponse);
|
11095 | }
|
11096 |
|
11097 | return cacheResponse.apply(void 0, arguments);
|
11098 | }
|
11099 |
|
11100 | console.warn("[re-reselect] Invalid cache key \"" + cacheKey + "\" has been returned by keySelector function.");
|
11101 | return undefined;
|
11102 | };
|
11103 |
|
11104 |
|
11105 | selector.getMatchingSelector = function () {
|
11106 | var cacheKey = options.keySelector.apply(options, arguments);
|
11107 |
|
11108 | return cache.get(cacheKey);
|
11109 | };
|
11110 |
|
11111 | selector.removeMatchingSelector = function () {
|
11112 | var cacheKey = options.keySelector.apply(options, arguments);
|
11113 | cache.remove(cacheKey);
|
11114 | };
|
11115 |
|
11116 | selector.clearCache = function () {
|
11117 | cache.clear();
|
11118 | };
|
11119 |
|
11120 | selector.resultFunc = resultFunc;
|
11121 | selector.dependencies = dependencies;
|
11122 | selector.cache = cache;
|
11123 |
|
11124 | selector.recomputations = function () {
|
11125 | return recomputations;
|
11126 | };
|
11127 |
|
11128 | selector.resetRecomputations = function () {
|
11129 | return recomputations = 0;
|
11130 | };
|
11131 |
|
11132 | selector.keySelector = options.keySelector;
|
11133 | return selector;
|
11134 | };
|
11135 | }
|
11136 |
|
11137 | function createStructuredCachedSelector(selectors) {
|
11138 | return reselect.createStructuredSelector(selectors, createCachedSelector);
|
11139 | }
|
11140 |
|
11141 | function validateCacheSize(cacheSize) {
|
11142 | if (cacheSize === undefined) {
|
11143 | throw new Error('Missing the required property "cacheSize".');
|
11144 | }
|
11145 |
|
11146 | if (!Number.isInteger(cacheSize) || cacheSize <= 0) {
|
11147 | throw new Error('The "cacheSize" property must be a positive integer value.');
|
11148 | }
|
11149 | }
|
11150 |
|
11151 | var FifoObjectCache = function () {
|
11152 | function FifoObjectCache(_temp) {
|
11153 | var _ref = _temp === void 0 ? {} : _temp,
|
11154 | cacheSize = _ref.cacheSize;
|
11155 |
|
11156 | validateCacheSize(cacheSize);
|
11157 | this._cache = {};
|
11158 | this._cacheOrdering = [];
|
11159 | this._cacheSize = cacheSize;
|
11160 | }
|
11161 |
|
11162 | var _proto = FifoObjectCache.prototype;
|
11163 |
|
11164 | _proto.set = function set(key, selectorFn) {
|
11165 | this._cache[key] = selectorFn;
|
11166 |
|
11167 | this._cacheOrdering.push(key);
|
11168 |
|
11169 | if (this._cacheOrdering.length > this._cacheSize) {
|
11170 | var earliest = this._cacheOrdering[0];
|
11171 | this.remove(earliest);
|
11172 | }
|
11173 | };
|
11174 |
|
11175 | _proto.get = function get(key) {
|
11176 | return this._cache[key];
|
11177 | };
|
11178 |
|
11179 | _proto.remove = function remove(key) {
|
11180 | var index = this._cacheOrdering.indexOf(key);
|
11181 |
|
11182 | if (index > -1) {
|
11183 | this._cacheOrdering.splice(index, 1);
|
11184 | }
|
11185 |
|
11186 | delete this._cache[key];
|
11187 | };
|
11188 |
|
11189 | _proto.clear = function clear() {
|
11190 | this._cache = {};
|
11191 | this._cacheOrdering = [];
|
11192 | };
|
11193 |
|
11194 | _proto.isValidCacheKey = function isValidCacheKey(cacheKey) {
|
11195 | return isStringOrNumber(cacheKey);
|
11196 | };
|
11197 |
|
11198 | return FifoObjectCache;
|
11199 | }();
|
11200 |
|
11201 | var LruObjectCache = function () {
|
11202 | function LruObjectCache(_temp) {
|
11203 | var _ref = _temp === void 0 ? {} : _temp,
|
11204 | cacheSize = _ref.cacheSize;
|
11205 |
|
11206 | validateCacheSize(cacheSize);
|
11207 | this._cache = {};
|
11208 | this._cacheOrdering = [];
|
11209 | this._cacheSize = cacheSize;
|
11210 | }
|
11211 |
|
11212 | var _proto = LruObjectCache.prototype;
|
11213 |
|
11214 | _proto.set = function set(key, selectorFn) {
|
11215 | this._cache[key] = selectorFn;
|
11216 |
|
11217 | this._registerCacheHit(key);
|
11218 |
|
11219 | if (this._cacheOrdering.length > this._cacheSize) {
|
11220 | var earliest = this._cacheOrdering[0];
|
11221 | this.remove(earliest);
|
11222 | }
|
11223 | };
|
11224 |
|
11225 | _proto.get = function get(key) {
|
11226 | this._registerCacheHit(key);
|
11227 |
|
11228 | return this._cache[key];
|
11229 | };
|
11230 |
|
11231 | _proto.remove = function remove(key) {
|
11232 | this._deleteCacheHit(key);
|
11233 |
|
11234 | delete this._cache[key];
|
11235 | };
|
11236 |
|
11237 | _proto.clear = function clear() {
|
11238 | this._cache = {};
|
11239 | this._cacheOrdering = [];
|
11240 | };
|
11241 |
|
11242 | _proto._registerCacheHit = function _registerCacheHit(key) {
|
11243 | this._deleteCacheHit(key);
|
11244 |
|
11245 | this._cacheOrdering.push(key);
|
11246 | };
|
11247 |
|
11248 | _proto._deleteCacheHit = function _deleteCacheHit(key) {
|
11249 | var index = this._cacheOrdering.indexOf(key);
|
11250 |
|
11251 | if (index > -1) {
|
11252 | this._cacheOrdering.splice(index, 1);
|
11253 | }
|
11254 | };
|
11255 |
|
11256 | _proto.isValidCacheKey = function isValidCacheKey(cacheKey) {
|
11257 | return isStringOrNumber(cacheKey);
|
11258 | };
|
11259 |
|
11260 | return LruObjectCache;
|
11261 | }();
|
11262 |
|
11263 | var FlatMapCache = function () {
|
11264 | function FlatMapCache() {
|
11265 | this._cache = new Map();
|
11266 | }
|
11267 |
|
11268 | var _proto = FlatMapCache.prototype;
|
11269 |
|
11270 | _proto.set = function set(key, selectorFn) {
|
11271 | this._cache.set(key, selectorFn);
|
11272 | };
|
11273 |
|
11274 | _proto.get = function get(key) {
|
11275 | return this._cache.get(key);
|
11276 | };
|
11277 |
|
11278 | _proto.remove = function remove(key) {
|
11279 | this._cache["delete"](key);
|
11280 | };
|
11281 |
|
11282 | _proto.clear = function clear() {
|
11283 | this._cache.clear();
|
11284 | };
|
11285 |
|
11286 | return FlatMapCache;
|
11287 | }();
|
11288 |
|
11289 | var FifoMapCache = function () {
|
11290 | function FifoMapCache(_temp) {
|
11291 | var _ref = _temp === void 0 ? {} : _temp,
|
11292 | cacheSize = _ref.cacheSize;
|
11293 |
|
11294 | validateCacheSize(cacheSize);
|
11295 | this._cache = new Map();
|
11296 | this._cacheSize = cacheSize;
|
11297 | }
|
11298 |
|
11299 | var _proto = FifoMapCache.prototype;
|
11300 |
|
11301 | _proto.set = function set(key, selectorFn) {
|
11302 | this._cache.set(key, selectorFn);
|
11303 |
|
11304 | if (this._cache.size > this._cacheSize) {
|
11305 | var earliest = this._cache.keys().next().value;
|
11306 |
|
11307 | this.remove(earliest);
|
11308 | }
|
11309 | };
|
11310 |
|
11311 | _proto.get = function get(key) {
|
11312 | return this._cache.get(key);
|
11313 | };
|
11314 |
|
11315 | _proto.remove = function remove(key) {
|
11316 | this._cache["delete"](key);
|
11317 | };
|
11318 |
|
11319 | _proto.clear = function clear() {
|
11320 | this._cache.clear();
|
11321 | };
|
11322 |
|
11323 | return FifoMapCache;
|
11324 | }();
|
11325 |
|
11326 | var LruMapCache = function () {
|
11327 | function LruMapCache(_temp) {
|
11328 | var _ref = _temp === void 0 ? {} : _temp,
|
11329 | cacheSize = _ref.cacheSize;
|
11330 |
|
11331 | validateCacheSize(cacheSize);
|
11332 | this._cache = new Map();
|
11333 | this._cacheSize = cacheSize;
|
11334 | }
|
11335 |
|
11336 | var _proto = LruMapCache.prototype;
|
11337 |
|
11338 | _proto.set = function set(key, selectorFn) {
|
11339 | this._cache.set(key, selectorFn);
|
11340 |
|
11341 | if (this._cache.size > this._cacheSize) {
|
11342 | var earliest = this._cache.keys().next().value;
|
11343 |
|
11344 | this.remove(earliest);
|
11345 | }
|
11346 | };
|
11347 |
|
11348 | _proto.get = function get(key) {
|
11349 | var value = this._cache.get(key);
|
11350 |
|
11351 |
|
11352 | if (this._cache.has(key)) {
|
11353 | this.remove(key);
|
11354 |
|
11355 | this._cache.set(key, value);
|
11356 | }
|
11357 |
|
11358 | return value;
|
11359 | };
|
11360 |
|
11361 | _proto.remove = function remove(key) {
|
11362 | this._cache["delete"](key);
|
11363 | };
|
11364 |
|
11365 | _proto.clear = function clear() {
|
11366 | this._cache.clear();
|
11367 | };
|
11368 |
|
11369 | return LruMapCache;
|
11370 | }();
|
11371 |
|
11372 | exports.FifoMapCache = FifoMapCache;
|
11373 | exports.FifoObjectCache = FifoObjectCache;
|
11374 | exports.FlatMapCache = FlatMapCache;
|
11375 | exports.FlatObjectCache = FlatObjectCache;
|
11376 | exports.LruMapCache = LruMapCache;
|
11377 | exports.LruObjectCache = LruObjectCache;
|
11378 | exports.createCachedSelector = createCachedSelector;
|
11379 | exports.createStructuredCachedSelector = createStructuredCachedSelector;
|
11380 | exports.default = createCachedSelector;
|
11381 |
|
11382 | Object.defineProperty(exports, '__esModule', { value: true });
|
11383 |
|
11384 | })));
|
11385 |
|
11386 |
|
11387 |
|
11388 | }),
|
11389 | ,
|
11390 | ,
|
11391 | ,
|
11392 | ,
|
11393 | ,
|
11394 |
|
11395 | (function(module, exports, __webpack_require__) {
|
11396 |
|
11397 | module.exports = __webpack_require__(189);
|
11398 |
|
11399 |
|
11400 | }),
|
11401 |
|
11402 | (function(module, exports, __webpack_require__) {
|
11403 |
|
11404 | "use strict";
|
11405 |
|
11406 |
|
11407 |
|
11408 |
|
11409 |
|
11410 |
|
11411 |
|
11412 |
|
11413 |
|
11414 | var ReactPropTypesSecret = __webpack_require__(90);
|
11415 |
|
11416 | function emptyFunction() {}
|
11417 | function emptyFunctionWithReset() {}
|
11418 | emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
11419 |
|
11420 | module.exports = function() {
|
11421 | function shim(props, propName, componentName, location, propFullName, secret) {
|
11422 | if (secret === ReactPropTypesSecret) {
|
11423 |
|
11424 | return;
|
11425 | }
|
11426 | var err = new Error(
|
11427 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
11428 | 'Use PropTypes.checkPropTypes() to call them. ' +
|
11429 | 'Read more at http://fb.me/use-check-prop-types'
|
11430 | );
|
11431 | err.name = 'Invariant Violation';
|
11432 | throw err;
|
11433 | };
|
11434 | shim.isRequired = shim;
|
11435 | function getShim() {
|
11436 | return shim;
|
11437 | };
|
11438 |
|
11439 |
|
11440 | var ReactPropTypes = {
|
11441 | array: shim,
|
11442 | bool: shim,
|
11443 | func: shim,
|
11444 | number: shim,
|
11445 | object: shim,
|
11446 | string: shim,
|
11447 | symbol: shim,
|
11448 |
|
11449 | any: shim,
|
11450 | arrayOf: getShim,
|
11451 | element: shim,
|
11452 | elementType: shim,
|
11453 | instanceOf: getShim,
|
11454 | node: shim,
|
11455 | objectOf: getShim,
|
11456 | oneOf: getShim,
|
11457 | oneOfType: getShim,
|
11458 | shape: getShim,
|
11459 | exact: getShim,
|
11460 |
|
11461 | checkPropTypes: emptyFunctionWithReset,
|
11462 | resetWarningCache: emptyFunction
|
11463 | };
|
11464 |
|
11465 | ReactPropTypes.PropTypes = ReactPropTypes;
|
11466 |
|
11467 | return ReactPropTypes;
|
11468 | };
|
11469 |
|
11470 |
|
11471 | }),
|
11472 |
|
11473 | (function(module, exports, __webpack_require__) {
|
11474 |
|
11475 | "use strict";
|
11476 |
|
11477 |
|
11478 |
|
11479 |
|
11480 |
|
11481 |
|
11482 |
|
11483 |
|
11484 |
|
11485 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
11486 |
|
11487 | module.exports = ReactPropTypesSecret;
|
11488 |
|
11489 |
|
11490 | }),
|
11491 |
|
11492 | (function(module, exports, __webpack_require__) {
|
11493 |
|
11494 | "use strict";
|
11495 |
|
11496 |
|
11497 |
|
11498 |
|
11499 |
|
11500 |
|
11501 |
|
11502 |
|
11503 |
|
11504 |
|
11505 |
|
11506 |
|
11507 | var aa=__webpack_require__(0),n=__webpack_require__(92),r=__webpack_require__(93);function u(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(u(227));
|
11508 | function ba(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var da=!1,ea=null,fa=!1,ha=null,ia={onError:function(a){da=!0;ea=a}};function ja(a,b,c,d,e,f,g,h,k){da=!1;ea=null;ba.apply(ia,arguments)}function ka(a,b,c,d,e,f,g,h,k){ja.apply(this,arguments);if(da){if(da){var l=ea;da=!1;ea=null}else throw Error(u(198));fa||(fa=!0,ha=l)}}var la=null,ma=null,na=null;
|
11509 | function oa(a,b,c){var d=a.type||"unknown-event";a.currentTarget=na(c);ka(d,b,void 0,a);a.currentTarget=null}var pa=null,qa={};
|
11510 | function ra(){if(pa)for(var a in qa){var b=qa[a],c=pa.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!sa[c]){if(!b.extractEvents)throw Error(u(97,a));sa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(ta.hasOwnProperty(h))throw Error(u(99,h));ta[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ua(k[e],g,h);e=!0}else f.registrationName?(ua(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}
|
11511 | function ua(a,b,c){if(va[a])throw Error(u(100,a));va[a]=b;wa[a]=b.eventTypes[c].dependencies}var sa=[],ta={},va={},wa={};function xa(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!qa.hasOwnProperty(c)||qa[c]!==d){if(qa[c])throw Error(u(102,c));qa[c]=d;b=!0}}b&&ra()}var ya=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),za=null,Aa=null,Ba=null;
|
11512 | function Ca(a){if(a=ma(a)){if("function"!==typeof za)throw Error(u(280));var b=a.stateNode;b&&(b=la(b),za(a.stateNode,a.type,b))}}function Da(a){Aa?Ba?Ba.push(a):Ba=[a]:Aa=a}function Ea(){if(Aa){var a=Aa,b=Ba;Ba=Aa=null;Ca(a);if(b)for(a=0;a<b.length;a++)Ca(b[a])}}function Fa(a,b){return a(b)}function Ga(a,b,c,d,e){return a(b,c,d,e)}function Ha(){}var Ia=Fa,Ja=!1,Ka=!1;function La(){if(null!==Aa||null!==Ba)Ha(),Ea()}
|
11513 | function Ma(a,b,c){if(Ka)return a(b,c);Ka=!0;try{return Ia(a,b,c)}finally{Ka=!1,La()}}var Na=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Oa=Object.prototype.hasOwnProperty,Pa={},Qa={};
|
11514 | function Ra(a){if(Oa.call(Qa,a))return!0;if(Oa.call(Pa,a))return!1;if(Na.test(a))return Qa[a]=!0;Pa[a]=!0;return!1}function Sa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
|
11515 | function Ta(a,b,c,d){if(null===b||"undefined"===typeof b||Sa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var C={};
|
11516 | "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C[a]=new v(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];C[b]=new v(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){C[a]=new v(a,2,!1,a.toLowerCase(),null,!1)});
|
11517 | ["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C[a]=new v(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){C[a]=new v(a,3,!1,a.toLowerCase(),null,!1)});
|
11518 | ["checked","multiple","muted","selected"].forEach(function(a){C[a]=new v(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){C[a]=new v(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){C[a]=new v(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){C[a]=new v(a,5,!1,a.toLowerCase(),null,!1)});var Ua=/[\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()}
|
11519 | "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(Ua,
|
11520 | Va);C[b]=new v(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!1)});
|
11521 | C.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty("ReactCurrentDispatcher")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty("ReactCurrentBatchConfig")||(Wa.ReactCurrentBatchConfig={suspense:null});
|
11522 | function Xa(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Ta(b,c,e,d)&&(c=null),d||null===e?Ra(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
|
11523 | var Ya=/^(.*)[\\\/]/,E="function"===typeof Symbol&&Symbol.for,Za=E?Symbol.for("react.element"):60103,$a=E?Symbol.for("react.portal"):60106,ab=E?Symbol.for("react.fragment"):60107,bb=E?Symbol.for("react.strict_mode"):60108,cb=E?Symbol.for("react.profiler"):60114,db=E?Symbol.for("react.provider"):60109,eb=E?Symbol.for("react.context"):60110,fb=E?Symbol.for("react.concurrent_mode"):60111,gb=E?Symbol.for("react.forward_ref"):60112,hb=E?Symbol.for("react.suspense"):60113,ib=E?Symbol.for("react.suspense_list"):
|
11524 | 60120,jb=E?Symbol.for("react.memo"):60115,kb=E?Symbol.for("react.lazy"):60116,lb=E?Symbol.for("react.block"):60121,mb="function"===typeof Symbol&&Symbol.iterator;function nb(a){if(null===a||"object"!==typeof a)return null;a=mb&&a[mb]||a["@@iterator"];return"function"===typeof a?a:null}function ob(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}
|
11525 | function pb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ab:return"Fragment";case $a:return"Portal";case cb:return"Profiler";case bb:return"StrictMode";case hb:return"Suspense";case ib:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case eb:return"Context.Consumer";case db:return"Context.Provider";case gb:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":
|
11526 | "ForwardRef");case jb:return pb(a.type);case lb:return pb(a.render);case kb:if(a=1===a._status?a._result:null)return pb(a)}return null}function qb(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=a._debugSource,f=pb(a.type);c=null;d&&(c=pb(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(Ya,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}
|
11527 | function rb(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function sb(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
|
11528 | function tb(a){var b=sb(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
|
11529 | null;delete a[b]}}}}function xb(a){a._valueTracker||(a._valueTracker=tb(a))}function yb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=sb(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function zb(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}
|
11530 | function Ab(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=rb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Bb(a,b){b=b.checked;null!=b&&Xa(a,"checked",b,!1)}
|
11531 | function Cb(a,b){Bb(a,b);var c=rb(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Db(a,b.type,c):b.hasOwnProperty("defaultValue")&&Db(a,b.type,rb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
|
11532 | function Eb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
|
11533 | function Db(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Fb(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Gb(a,b){a=n({children:void 0},b);if(b=Fb(b.children))a.children=b;return a}
|
11534 | function Hb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+rb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
|
11535 | function Ib(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(u(91));return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Jb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(u(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:rb(c)}}
|
11536 | function Kb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var Mb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
|
11537 | function Nb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ob(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Nb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
|
11538 | var Pb,Qb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Mb.svg||"innerHTML"in a)a.innerHTML=b;else{Pb=Pb||document.createElement("div");Pb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
|
11539 | function Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Tb={animationend:Sb("Animation","AnimationEnd"),animationiteration:Sb("Animation","AnimationIteration"),animationstart:Sb("Animation","AnimationStart"),transitionend:Sb("Transition","TransitionEnd")},Ub={},Vb={};
|
11540 | ya&&(Vb=document.createElement("div").style,"AnimationEvent"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),"TransitionEvent"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a}
|
11541 | var Xb=Wb("animationend"),Yb=Wb("animationiteration"),Zb=Wb("animationstart"),$b=Wb("transitionend"),ac="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bc=new ("function"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b}
|
11542 | function dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));}
|
11543 | function gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
|
11544 | c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
|
11545 | function ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var kc=null;
|
11546 | function lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)oa(a,b[d],c[d]);else b&&oa(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function mc(a){null!==a&&(kc=ic(kc,a));a=kc;kc=null;if(a){jc(a,lc);if(kc)throw Error(u(95));if(fa)throw a=ha,fa=!1,ha=null,a;}}
|
11547 | function nc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function oc(a){if(!ya)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}var pc=[];function qc(a){a.topLevelType=null;a.nativeEvent=null;a.targetInst=null;a.ancestors.length=0;10>pc.length&&pc.push(a)}
|
11548 | function rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}
|
11549 | function sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=nc(a.nativeEvent);d=a.topLevelType;var f=a.nativeEvent,g=a.eventSystemFlags;0===c&&(g|=64);for(var h=null,k=0;k<sa.length;k++){var l=sa[k];l&&(l=l.extractEvents(d,b,f,e,g))&&(h=
|
11550 | ic(h,l))}mc(h)}}function uc(a,b,c){if(!c.has(a)){switch(a){case "scroll":vc(b,"scroll",!0);break;case "focus":case "blur":vc(b,"focus",!0);vc(b,"blur",!0);c.set("blur",null);c.set("focus",null);break;case "cancel":case "close":oc(a)&&vc(b,a,!0);break;case "invalid":case "submit":case "reset":break;default:-1===ac.indexOf(a)&&F(a,b)}c.set(a,null)}}
|
11551 | var wc,xc,yc,zc=!1,Ac=[],Bc=null,Cc=null,Dc=null,Ec=new Map,Fc=new Map,Gc=[],Hc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ic="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");
|
11552 | function Jc(a,b){var c=cc(b);Hc.forEach(function(a){uc(a,b,c)});Ic.forEach(function(a){uc(a,b,c)})}function Kc(a,b,c,d,e){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:e,container:d}}
|
11553 | function Lc(a,b){switch(a){case "focus":case "blur":Bc=null;break;case "dragenter":case "dragleave":Cc=null;break;case "mouseover":case "mouseout":Dc=null;break;case "pointerover":case "pointerout":Ec.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Fc.delete(b.pointerId)}}function Mc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=Kc(b,c,d,e,f),null!==b&&(b=Nc(b),null!==b&&xc(b)),a;a.eventSystemFlags|=d;return a}
|
11554 | function Oc(a,b,c,d,e){switch(b){case "focus":return Bc=Mc(Bc,a,b,c,d,e),!0;case "dragenter":return Cc=Mc(Cc,a,b,c,d,e),!0;case "mouseover":return Dc=Mc(Dc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Ec.set(f,Mc(Ec.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Fc.set(f,Mc(Fc.get(f)||null,a,b,c,d,e)),!0}return!1}
|
11555 | function Pc(a){var b=tc(a.target);if(null!==b){var c=dc(b);if(null!==c)if(b=c.tag,13===b){if(b=ec(c),null!==b){a.blockedOn=b;r.unstable_runWithPriority(a.priority,function(){yc(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Qc(a){if(null!==a.blockedOn)return!1;var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);if(null!==b){var c=Nc(b);null!==c&&xc(c);a.blockedOn=b;return!1}return!0}
|
11556 | function Sc(a,b,c){Qc(a)&&c.delete(b)}function Tc(){for(zc=!1;0<Ac.length;){var a=Ac[0];if(null!==a.blockedOn){a=Nc(a.blockedOn);null!==a&&wc(a);break}var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);null!==b?a.blockedOn=b:Ac.shift()}null!==Bc&&Qc(Bc)&&(Bc=null);null!==Cc&&Qc(Cc)&&(Cc=null);null!==Dc&&Qc(Dc)&&(Dc=null);Ec.forEach(Sc);Fc.forEach(Sc)}function Uc(a,b){a.blockedOn===b&&(a.blockedOn=null,zc||(zc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Tc)))}
|
11557 | function Vc(a){function b(b){return Uc(b,a)}if(0<Ac.length){Uc(Ac[0],a);for(var c=1;c<Ac.length;c++){var d=Ac[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Bc&&Uc(Bc,a);null!==Cc&&Uc(Cc,a);null!==Dc&&Uc(Dc,a);Ec.forEach(b);Fc.forEach(b);for(c=0;c<Gc.length;c++)d=Gc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Gc.length&&(c=Gc[0],null===c.blockedOn);)Pc(c),null===c.blockedOn&&Gc.shift()}
|
11558 | var Wc={},Yc=new Map,Zc=new Map,$c=["abort","abort",Xb,"animationEnd",Yb,"animationIteration",Zb,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking",
|
11559 | "seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",$b,"transitionEnd","waiting","waiting"];function ad(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f="on"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+"Capture"},dependencies:[d],eventPriority:b};Zc.set(d,b);Yc.set(d,f);Wc[e]=f}}
|
11560 | ad("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);
|
11561 | ad("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ad($c,2);for(var bd="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),cd=0;cd<bd.length;cd++)Zc.set(bd[cd],0);
|
11562 | var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function F(a,b){vc(b,a,!1)}function vc(a,b,c){var d=Zc.get(b);switch(void 0===d?2:d){case 0:d=gd.bind(null,b,1,a);break;case 1:d=hd.bind(null,b,1,a);break;default:d=id.bind(null,b,1,a)}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1)}function gd(a,b,c,d){Ja||Ha();var e=id,f=Ja;Ja=!0;try{Ga(e,a,b,c,d)}finally{(Ja=f)||La()}}function hd(a,b,c,d){ed(dd,id.bind(null,a,b,c,d))}
|
11563 | function id(a,b,c,d){if(fd)if(0<Ac.length&&-1<Hc.indexOf(a))a=Kc(null,a,b,c,d),Ac.push(a);else{var e=Rc(a,b,c,d);if(null===e)Lc(a,d);else if(-1<Hc.indexOf(a))a=Kc(e,a,b,c,d),Ac.push(a);else if(!Oc(e,a,b,c,d)){Lc(a,d);a=rc(a,d,null,b);try{Ma(sc,a)}finally{qc(a)}}}}
|
11564 | function Rc(a,b,c,d){c=nc(d);c=tc(c);if(null!==c){var e=dc(c);if(null===e)c=null;else{var f=e.tag;if(13===f){c=ec(e);if(null!==c)return c;c=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null}else e!==c&&(c=null)}}a=rc(a,d,c,b);try{Ma(sc,a)}finally{qc(a)}return null}
|
11565 | var jd={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
|
11566 | floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kd=["Webkit","ms","Moz","O"];Object.keys(jd).forEach(function(a){kd.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);jd[b]=jd[a]})});function ld(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||jd.hasOwnProperty(a)&&jd[a]?(""+b).trim():b+"px"}
|
11567 | function md(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=ld(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var nd=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
|
11568 | function od(a,b){if(b){if(nd[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(u(137,a,""));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(u(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(u(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(u(62,""));}}
|
11569 | function pd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}var qd=Mb.html;function rd(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=cc(a);b=wa[b];for(var d=0;d<b.length;d++)uc(b[d],a,c)}function sd(){}
|
11570 | function td(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function ud(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function vd(a,b){var c=ud(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ud(c)}}
|
11571 | function wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=td(a.document)}return b}
|
11572 | function yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var zd="$",Ad="/$",Bd="$?",Cd="$!",Dd=null,Ed=null;function Fd(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
|
11573 | function Gd(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd="function"===typeof setTimeout?setTimeout:void 0,Id="function"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}
|
11574 | function Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--}else c===Ad&&b++}a=a.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md="__reactInternalInstance$"+Ld,Nd="__reactEventHandlers$"+Ld,Od="__reactContainere$"+Ld;
|
11575 | function tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a)}return b}a=c;c=a.parentNode}return null}function Nc(a){a=a[Md]||a[Od];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null}
|
11576 | function Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}
|
11577 | function Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(u(231,
|
11578 | b,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a)}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0<b--;)Td(c[b],"captured",a);for(b=0;b<c.length;b++)Td(c[b],"bubbled",a)}}
|
11579 | function Vd(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Sd(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a))}function Wd(a){a&&a.dispatchConfig.registrationName&&Vd(a._targetInst,null,a)}function Xd(a){jc(a,Ud)}var Yd=null,Zd=null,$d=null;
|
11580 | function ae(){if($d)return $d;var a,b=Zd,c=b.length,d,e="value"in Yd?Yd.value:Yd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return $d=e.slice(a,1<d?1-d:void 0)}function be(){return!0}function ce(){return!1}
|
11581 | function G(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?be:ce;this.isPropagationStopped=ce;return this}
|
11582 | n(G.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=be)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=be)},persist:function(){this.isPersistent=be},isPersistent:ce,destructor:function(){var a=this.constructor.Interface,
|
11583 | b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=ce;this._dispatchInstances=this._dispatchListeners=null}});G.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
|
11584 | G.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;de(c);return c};de(G);function ee(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
|
11585 | function fe(a){if(!(a instanceof this))throw Error(u(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=ya&&"CompositionEvent"in window,ke=null;ya&&"documentMode"in document&&(ke=document.documentMode);
|
11586 | var le=ya&&"TextEvent"in window&&!ke,me=ya&&(!je||ke&&8<ke&&11>=ke),ne=String.fromCharCode(32),oe={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
|
11587 | captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},pe=!1;
|
11588 | function qe(a,b){switch(a){case "keyup":return-1!==ie.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function re(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var se=!1;function te(a,b){switch(a){case "compositionend":return re(b);case "keypress":if(32!==b.which)return null;pe=!0;return ne;case "textInput":return a=b.data,a===ne&&pe?null:a;default:return null}}
|
11589 | function ue(a,b){if(se)return"compositionend"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return me&&"ko"!==b.locale?null:b.data;default:return null}}
|
11590 | var ve={eventTypes:oe,extractEvents:function(a,b,c,d){var e;if(je)b:{switch(a){case "compositionstart":var f=oe.compositionStart;break b;case "compositionend":f=oe.compositionEnd;break b;case "compositionupdate":f=oe.compositionUpdate;break b}f=void 0}else se?qe(a,c)&&(f=oe.compositionEnd):"keydown"===a&&229===c.keyCode&&(f=oe.compositionStart);f?(me&&"ko"!==c.locale&&(se||f!==oe.compositionStart?f===oe.compositionEnd&&se&&(e=ae()):(Yd=d,Zd="value"in Yd?Yd.value:Yd.textContent,se=!0)),f=ge.getPooled(f,
|
11591 | b,c,d),e?f.data=e:(e=re(c),null!==e&&(f.data=e)),Xd(f),e=f):e=null;(a=le?te(a,c):ue(a,c))?(b=he.getPooled(oe.beforeInput,b,c,d),b.data=a,Xd(b)):b=null;return null===e?b:null===b?e:[e,b]}},we={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!we[a.type]:"textarea"===b?!0:!1}
|
11592 | var ye={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function ze(a,b,c){a=G.getPooled(ye.change,a,b,c);a.type="change";Da(c);Xd(a);return a}var Ae=null,Be=null;function Ce(a){mc(a)}function De(a){var b=Pd(a);if(yb(b))return a}function Ee(a,b){if("change"===a)return b}var Fe=!1;ya&&(Fe=oc("input")&&(!document.documentMode||9<document.documentMode));
|
11593 | function Ge(){Ae&&(Ae.detachEvent("onpropertychange",He),Be=Ae=null)}function He(a){if("value"===a.propertyName&&De(Be))if(a=ze(Be,a,nc(a)),Ja)mc(a);else{Ja=!0;try{Fa(Ce,a)}finally{Ja=!1,La()}}}function Ie(a,b,c){"focus"===a?(Ge(),Ae=b,Be=c,Ae.attachEvent("onpropertychange",He)):"blur"===a&&Ge()}function Je(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return De(Be)}function Ke(a,b){if("click"===a)return De(b)}function Le(a,b){if("input"===a||"change"===a)return De(b)}
|
11594 | var Me={eventTypes:ye,_isInputEventSupported:Fe,extractEvents:function(a,b,c,d){var e=b?Pd(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=Ee;else if(xe(e))if(Fe)g=Le;else{g=Je;var h=Ie}else(f=e.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(g=Ke);if(g&&(g=g(a,b)))return ze(g,c,d);h&&h(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Db(e,"number",e.value)}},Ne=G.extend({view:null,detail:null}),
|
11595 | Oe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pe(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Oe[a])?!!b[a]:!1}function Qe(){return Pe}
|
11596 | var Re=0,Se=0,Te=!1,Ue=!1,Ve=Ne.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Qe,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=Re;Re=a.screenX;return Te?"mousemove"===a.type?a.screenX-b:0:(Te=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;
|
11597 | var b=Se;Se=a.screenY;return Ue?"mousemove"===a.type?a.screenY-b:0:(Ue=!0,0)}}),We=Ve.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Xe={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",
|
11598 | dependencies:["pointerout","pointerover"]}},Ye={eventTypes:Xe,extractEvents:function(a,b,c,d,e){var f="mouseover"===a||"pointerover"===a,g="mouseout"===a||"pointerout"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?tc(b):null,null!==b){var h=dc(b);if(b!==h||5!==b.tag&&6!==b.tag)b=null}}else g=null;if(g===b)return null;if("mouseout"===a||"mouseover"===
|
11599 | a){var k=Ve;var l=Xe.mouseLeave;var m=Xe.mouseEnter;var p="mouse"}else if("pointerout"===a||"pointerover"===a)k=We,l=Xe.pointerLeave,m=Xe.pointerEnter,p="pointer";a=null==g?f:Pd(g);f=null==b?f:Pd(b);l=k.getPooled(l,g,c,d);l.type=p+"leave";l.target=a;l.relatedTarget=f;c=k.getPooled(m,b,c,d);c.type=p+"enter";c.target=f;c.relatedTarget=a;d=g;p=b;if(d&&p)a:{k=d;m=p;g=0;for(a=k;a;a=Rd(a))g++;a=0;for(b=m;b;b=Rd(b))a++;for(;0<g-a;)k=Rd(k),g--;for(;0<a-g;)m=Rd(m),a--;for(;g--;){if(k===m||k===m.alternate)break a;
|
11600 | k=Rd(k);m=Rd(m)}k=null}else k=null;m=k;for(k=[];d&&d!==m;){g=d.alternate;if(null!==g&&g===m)break;k.push(d);d=Rd(d)}for(d=[];p&&p!==m;){g=p.alternate;if(null!==g&&g===m)break;d.push(p);p=Rd(p)}for(p=0;p<k.length;p++)Vd(k[p],"bubbled",l);for(p=d.length;0<p--;)Vd(d[p],"captured",c);return 0===(e&64)?[l]:[l,c]}};function Ze(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var $e="function"===typeof Object.is?Object.is:Ze,af=Object.prototype.hasOwnProperty;
|
11601 | function bf(a,b){if($e(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!af.call(b,c[d])||!$e(a[c[d]],b[c[d]]))return!1;return!0}
|
11602 | var cf=ya&&"documentMode"in document&&11>=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ef=null,ff=null,gf=null,hf=!1;
|
11603 | function jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;"selectionStart"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type="select",a.target=ef,Xd(a),a)}
|
11604 | var kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?Pd(b):window;switch(a){case "focus":if(xe(e)||"true"===e.contentEditable)ef=e,ff=b,gf=null;break;case "blur":gf=ff=ef=null;break;case "mousedown":hf=!0;break;case "contextmenu":case "mouseup":case "dragend":return hf=!1,jf(c,d);case "selectionchange":if(cf)break;
|
11605 | case "keydown":case "keyup":return jf(c,d)}return null}},lf=G.extend({animationName:null,elapsedTime:null,pseudoElement:null}),mf=G.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),nf=Ne.extend({relatedTarget:null});function of(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
|
11606 | var pf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
|
11607 | 116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},rf=Ne.extend({key:function(a){if(a.key){var b=pf[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=of(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?qf[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Qe,charCode:function(a){return"keypress"===
|
11608 | a.type?of(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?of(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),sf=Ve.extend({dataTransfer:null}),tf=Ne.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Qe}),uf=G.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),vf=Ve.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in
|
11609 | a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),wf={eventTypes:Wc,extractEvents:function(a,b,c,d){var e=Yc.get(a);if(!e)return null;switch(a){case "keypress":if(0===of(c))return null;case "keydown":case "keyup":a=rf;break;case "blur":case "focus":a=nf;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=
|
11610 | Ve;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=sf;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=tf;break;case Xb:case Yb:case Zb:a=lf;break;case $b:a=uf;break;case "scroll":a=Ne;break;case "wheel":a=vf;break;case "copy":case "cut":case "paste":a=mf;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=
|
11611 | We;break;default:a=G}b=a.getPooled(e,b,c,d);Xd(b);return b}};if(pa)throw Error(u(101));pa=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));ra();var xf=Nc;la=Qd;ma=xf;na=Pd;xa({SimpleEventPlugin:wf,EnterLeaveEventPlugin:Ye,ChangeEventPlugin:Me,SelectEventPlugin:kf,BeforeInputEventPlugin:ve});var yf=[],zf=-1;function H(a){0>zf||(a.current=yf[zf],yf[zf]=null,zf--)}
|
11612 | function I(a,b){zf++;yf[zf]=a.current;a.current=b}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}
|
11613 | function Df(){H(K);H(J)}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c)}function Ff(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||"Unknown",e));return n({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return!0}
|
11614 | function Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}
|
11615 | var If=r.unstable_runWithPriority,Jf=r.unstable_scheduleCallback,Kf=r.unstable_cancelCallback,Lf=r.unstable_requestPaint,Mf=r.unstable_now,Nf=r.unstable_getCurrentPriorityLevel,Of=r.unstable_ImmediatePriority,Pf=r.unstable_UserBlockingPriority,Qf=r.unstable_NormalPriority,Rf=r.unstable_LowPriority,Sf=r.unstable_IdlePriority,Tf={},Uf=r.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf};
|
11616 | function ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a)}fg()}
|
11617 | function fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});Wf=null}catch(c){throw null!==Wf&&(Wf=Wf.slice(a+1)),Jf(Of,gg),c;}finally{Yf=!1}}}function hg(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function ig(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}var jg={current:null},kg=null,lg=null,mg=null;function ng(){mg=lg=kg=null}
|
11618 | function og(a){var b=jg.current;H(jg);a.type._context._currentValue=b}function pg(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function qg(a,b){kg=a;mg=lg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(rg=!0),a.firstContext=null)}
|
11619 | function sg(a,b){if(mg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null}}else lg=lg.next=b}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}
|
11620 | function vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}
|
11621 | function yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}
|
11622 | function zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(g<d){var ca={expirationTime:z.expirationTime,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null};null===x?(p=x=
|
11623 | ca,m=k):x=x.next=ca;g>l&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if("function"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g="function"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:tg=!0}}null!==z.callback&&
|
11624 | (a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z))}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k}}
|
11625 | function Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=e;e=c;if("function"!==typeof d)throw Error(u(191,d));d.call(e)}}}var Dg=Wa.ReactCurrentBatchConfig,Eg=(new aa.Component).refs;function Fg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;0===a.expirationTime&&(a.updateQueue.baseState=c)}
|
11626 | var Jg={isMounted:function(a){return(a=a._reactInternalFiber)?dc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=Gg(),d=Dg.suspense;
|
11627 | c=Hg(c,a,d);d=wg(c,d);d.tag=2;void 0!==b&&null!==b&&(d.callback=b);xg(a,d);Ig(a,c)}};function Kg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!bf(c,d)||!bf(e,f):!0}
|
11628 | function Lg(a,b,c){var d=!1,e=Af;var f=b.contextType;"object"===typeof f&&null!==f?f=sg(f):(e=L(b)?Bf:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Cf(a,e):Af);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Jg;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
|
11629 | function Mg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Jg.enqueueReplaceState(b,b.state,null)}
|
11630 | function Ng(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Eg;ug(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=sg(f):(f=L(b)?Bf:J.current,e.context=Cf(a,f));zg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Fg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||
|
11631 | (b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Jg.enqueueReplaceState(e,e.state,null),zg(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.effectTag|=4)}var Og=Array.isArray;
|
11632 | function Pg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(u(309));var d=c.stateNode}if(!d)throw Error(u(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Eg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(u(284));if(!c._owner)throw Error(u(290,a));}return a}
|
11633 | function Qg(a,b){if("textarea"!==a.type)throw Error(u(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,""));}
|
11634 | function Rg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Sg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=
|
11635 | 2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Tg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Pg(a,b,c),d.return=a,d;d=Ug(c.type,c.key,c.props,null,a.mode,d);d.ref=Pg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==
|
11636 | c.implementation)return b=Vg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Wg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function p(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Tg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Za:return c=Ug(b.type,b.key,b.props,null,a.mode,c),c.ref=Pg(a,null,b),c.return=a,c;case $a:return b=Vg(b,a.mode,c),b.return=a,b}if(Og(b)||
|
11637 | nb(b))return b=Wg(b,a.mode,c,null),b.return=a,b;Qg(a,b)}return null}function x(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Za:return c.key===e?c.type===ab?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case $a:return c.key===e?l(a,b,c,d):null}if(Og(c)||nb(c))return null!==e?null:m(a,b,c,d,null);Qg(a,c)}return null}function z(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=
|
11638 | a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Za:return a=a.get(null===d.key?c:d.key)||null,d.type===ab?m(b,a,d.props.children,e,d.key):k(b,a,d,e);case $a:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Og(d)||nb(d))return a=a.get(c)||null,m(b,a,d,e,null);Qg(b,d)}return null}function ca(e,g,h,k){for(var l=null,t=null,m=g,y=g=0,A=null;null!==m&&y<h.length;y++){m.index>y?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&&
|
11639 | m&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A}if(y===h.length)return c(e,m),l;if(null===m){for(;y<h.length;y++)m=p(e,h[y],k),null!==m&&(g=f(m,g,y),null===t?l=m:t.sibling=m,t=m);return l}for(m=d(e,m);y<h.length;y++)A=z(m,e,y,h[y],k),null!==A&&(a&&null!==A.alternate&&m.delete(null===A.key?y:A.key),g=f(A,g,y),null===t?l=A:t.sibling=A,t=A);a&&m.forEach(function(a){return b(e,a)});return l}function D(e,g,h,l){var k=nb(h);if("function"!==typeof k)throw Error(u(150));h=k.call(h);
|
11640 | if(null==h)throw Error(u(151));for(var m=k=null,t=g,y=g=0,A=null,q=h.next();null!==t&&!q.done;y++,q=h.next()){t.index>y?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!==
|
11641 | q.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,
|
11642 | k.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ab?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h)}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=
|
11643 | d.sibling}d=Vg(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(nb(f))return D(a,d,f,h);l&&Qg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||"Component"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};
|
11644 | function ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a)}H($g);I($g,b)}function eh(){H($g);H(ah);H(bh)}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c))}function gh(a){ah.current===a&&(H($g),H(ah))}var M={current:0};
|
11645 | function hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ih(a,b){return{responder:a,props:b}}
|
11646 | var jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!$e(a[c],b[c]))return!1;return!0}
|
11647 | function oh(a,b,c,d,e,f){lh=f;N=b;b.memoizedState=null;b.updateQueue=null;b.expirationTime=0;jh.current=null===a||null===a.memoizedState?ph:qh;a=c(d,e);if(b.expirationTime===lh){f=0;do{b.expirationTime=0;if(!(25>f))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e)}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a}
|
11648 | function th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}
|
11649 | function vh(a,b){return"function"===typeof b?b(a):b}
|
11650 | function wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(l<lh){var m={expirationTime:k.expirationTime,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=m,f=d):h=h.next=m;l>N.expirationTime&&
|
11651 | (N.expirationTime=l,Bg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}
|
11652 | function xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}
|
11653 | function yh(a){var b=th();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return[b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}
|
11654 | function Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d)}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)}
|
11655 | function Hh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}
|
11656 | function Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0)});cg(97<d?97:d,function(){var d=kh.suspense;kh.suspense=void 0===b?null:b;try{a(!1),c()}finally{kh.suspense=d}})}
|
11657 | function zh(a,b,c){var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e={expirationTime:d,suspenseConfig:e,action:c,eagerReducer:null,eagerState:null,next:null};var f=b.pending;null===f?e.next=e:(e.next=f.next,f.next=e);b.pending=e;f=a.alternate;if(a===N||null!==f&&f===N)mh=!0,e.expirationTime=lh,N.expirationTime=lh;else{if(0===a.expirationTime&&(null===f||0===f.expirationTime)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.eagerReducer=f;e.eagerState=h;if($e(h,g))return}catch(k){}finally{}Ig(a,
|
11658 | d)}}
|
11659 | var sh={readContext:sg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useResponder:Q,useDeferredValue:Q,useTransition:Q},ph={readContext:sg,useCallback:Kh,useContext:sg,useEffect:Eh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ch(4,2,Hh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Ch(4,2,a,b)},useMemo:function(a,b){var c=th();b=void 0===b?null:b;a=a();c.memoizedState=[a,
|
11660 | b];return a},useReducer:function(a,b,c){var d=th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=zh.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=th();a={current:a};return b.memoizedState=a},useState:yh,useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=yh(a),d=c[0],e=c[1];Eh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=
|
11661 | c}},[a,b]);return d},useTransition:function(a){var b=yh(!1),c=b[0];b=b[1];return[Kh(Nh.bind(null,b,a),[b,a]),c]}},qh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:wh,useRef:Bh,useState:function(){return wh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=wh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=
|
11662 | wh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,b,a),[b,a]),c]}},rh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:xh,useRef:Bh,useState:function(){return xh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=xh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=xh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,
|
11663 | b,a),[b,a]),c]}},Oh=null,Ph=null,Qh=!1;function Rh(a,b){var c=Sh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}
|
11664 | function Th(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
|
11665 | function Uh(a){if(Qh){var b=Ph;if(b){var c=b;if(!Th(a,b)){b=Jd(c.nextSibling);if(!b||!Th(a,b)){a.effectTag=a.effectTag&-1025|2;Qh=!1;Oh=a;return}Rh(Oh,c)}Oh=a;Ph=Jd(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,Qh=!1,Oh=a}}function Vh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;Oh=a}
|
11666 | function Wh(a){if(a!==Oh)return!1;if(!Qh)return Vh(a),Qh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Gd(b,a.memoizedProps))for(b=Ph;b;)Rh(a,b),b=Jd(b.nextSibling);Vh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(u(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===Ad){if(0===b){Ph=Jd(a.nextSibling);break a}b--}else c!==zd&&c!==Cd&&c!==Bd||b++}a=a.nextSibling}Ph=null}}else Ph=Oh?Jd(a.stateNode.nextSibling):null;return!0}
|
11667 | function Xh(){Ph=Oh=null;Qh=!1}var Yh=Wa.ReactCurrentOwner,rg=!1;function R(a,b,c,d){b.child=null===a?Yg(b,null,c,d):Xg(b,a.child,c,d)}function Zh(a,b,c,d,e){c=c.render;var f=b.ref;qg(b,e);d=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,d,e);return b.child}
|
11668 | function ai(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!bi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ci(a,b,g,d,e,f);a=Ug(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:bf,c(e,d)&&a.ref===b.ref))return $h(a,b,f);b.effectTag|=1;a=Sg(g,d);a.ref=b.ref;a.return=b;return b.child=a}
|
11669 | function ci(a,b,c,d,e,f){return null!==a&&bf(a.memoizedProps,d)&&a.ref===b.ref&&(rg=!1,e<f)?(b.expirationTime=a.expirationTime,$h(a,b,f)):di(a,b,c,d,f)}function ei(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function di(a,b,c,d,e){var f=L(c)?Bf:J.current;f=Cf(b,f);qg(b,e);c=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,c,e);return b.child}
|
11670 | function fi(a,b,c,d,e){if(L(c)){var f=!0;Gf(b)}else f=!1;qg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Lg(b,c,d),Ng(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l));var m=c.getDerivedStateFromProps,p="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;p||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
|
11671 | "function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l);tg=!1;var x=b.memoizedState;g.state=x;zg(b,d,g,e);k=b.memoizedState;h!==d||x!==k||K.current||tg?("function"===typeof m&&(Fg(b,c,m,d),k=b.memoizedState),(h=tg||Kg(b,c,h,d,x,k,l))?(p||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===
|
11672 | typeof g.componentDidMount&&(b.effectTag|=4)):("function"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,vg(a,b),h=b.memoizedProps,g.props=b.type===b.elementType?h:ig(b.type,h),k=g.context,l=c.contextType,"object"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l)),m=c.getDerivedStateFromProps,(p="function"===typeof m||"function"===
|
11673 | typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l),tg=!1,k=b.memoizedState,g.state=k,zg(b,d,g,e),x=b.memoizedState,h!==d||k!==x||K.current||tg?("function"===typeof m&&(Fg(b,c,m,d),x=b.memoizedState),(m=tg||Kg(b,c,h,d,k,x,l))?(p||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,
|
11674 | x,l),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,l)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=l,d=m):
|
11675 | ("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return gi(a,b,c,d,f,e)}
|
11676 | function gi(a,b,c,d,e,f){ei(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Hf(b,c,!1),$h(a,b,f);d=b.stateNode;Yh.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=Xg(b,a.child,null,f),b.child=Xg(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&Hf(b,c,!0);return b.child}function hi(a){var b=a.stateNode;b.pendingContext?Ef(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Ef(a,b.context,!1);dh(a,b.containerInfo)}
|
11677 | var ii={dehydrated:null,retryTime:0};
|
11678 | function ji(a,b,c){var d=b.mode,e=b.pendingProps,f=M.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);I(M,f&1);if(null===a){void 0!==e.fallback&&Uh(b);if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=
|
11679 | b;e.sibling=c;b.memoizedState=ii;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Yg(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=Sg(a,a.pendingProps);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;d=Sg(d,e);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=ii;b.child=c;return d}c=Xg(b,a.child,e.children,c);b.memoizedState=null;return b.child=
|
11680 | c}a=a.child;if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=ii;b.child=e;return c}b.memoizedState=null;return b.child=Xg(b,a,e.children,c)}
|
11681 | function ki(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);pg(a.return,b)}function li(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailExpiration:0,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}
|
11682 | function mi(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=M.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&ki(a,c);else if(19===a.tag)ki(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(M,d);if(0===(b.mode&2))b.memoizedState=
|
11683 | null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===hh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);li(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===hh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}li(b,!0,c,null,f,b.lastEffect);break;case "together":li(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
|
11684 | function $h(a,b,c){null!==a&&(b.dependencies=a.dependencies);var d=b.expirationTime;0!==d&&Bg(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(u(153));if(null!==b.child){a=b.child;c=Sg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Sg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}var ni,oi,pi,qi;
|
11685 | ni=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};oi=function(){};
|
11686 | pi=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;ch($g.current);a=null;switch(c){case "input":f=zb(g,f);d=zb(g,d);a=[];break;case "option":f=Gb(g,f);d=Gb(g,d);a=[];break;case "select":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case "textarea":f=Ib(g,f);d=Ib(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=sd)}od(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if("style"===
|
11687 | h)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]="");else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(va.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if("style"===h)if(g){for(k in g)!g.hasOwnProperty(k)||l&&l.hasOwnProperty(k)||(c||(c={}),c[k]="");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),
|
11688 | c[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else"dangerouslySetInnerHTML"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,l)):"children"===h?g===l||"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(h,""+l):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(va.hasOwnProperty(h)?(null!=l&&rd(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=a||[]).push("style",c);e=a;if(b.updateQueue=e)b.effectTag|=4}};
|
11689 | qi=function(a,b,c,d){c!==d&&(b.effectTag|=4)};function ri(a,b){switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
|
11690 | function si(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return L(b.type)&&Df(),null;case 3:return eh(),H(K),H(J),c=b.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==a&&null!==a.child||!Wh(b)||(b.effectTag|=4),oi(b),null;case 5:gh(b);c=ch(bh.current);var e=b.type;if(null!==a&&null!=b.stateNode)pi(a,b,e,d,c),a.ref!==b.ref&&(b.effectTag|=128);else{if(!d){if(null===b.stateNode)throw Error(u(166));
|
11691 | return null}a=ch($g.current);if(Wh(b)){d=b.stateNode;e=b.type;var f=b.memoizedProps;d[Md]=b;d[Nd]=f;switch(e){case "iframe":case "object":case "embed":F("load",d);break;case "video":case "audio":for(a=0;a<ac.length;a++)F(ac[a],d);break;case "source":F("error",d);break;case "img":case "image":case "link":F("error",d);F("load",d);break;case "form":F("reset",d);F("submit",d);break;case "details":F("toggle",d);break;case "input":Ab(d,f);F("invalid",d);rd(c,"onChange");break;case "select":d._wrapperState=
|
11692 | {wasMultiple:!!f.multiple};F("invalid",d);rd(c,"onChange");break;case "textarea":Jb(d,f),F("invalid",d),rd(c,"onChange")}od(e,f);a=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(a=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(a=["children",""+h]):va.hasOwnProperty(g)&&null!=h&&rd(c,g)}switch(e){case "input":xb(d);Eb(d,f,!0);break;case "textarea":xb(d);Lb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&
|
11693 | (d.onclick=sd)}c=a;b.updateQueue=c;null!==c&&(b.effectTag|=4)}else{g=9===c.nodeType?c:c.ownerDocument;a===qd&&(a=Nb(e));a===qd?"script"===e?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),"select"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case "iframe":case "object":case "embed":F("load",
|
11694 | a);h=d;break;case "video":case "audio":for(h=0;h<ac.length;h++)F(ac[h],a);h=d;break;case "source":F("error",a);h=d;break;case "img":case "image":case "link":F("error",a);F("load",a);h=d;break;case "form":F("reset",a);F("submit",a);h=d;break;case "details":F("toggle",a);h=d;break;case "input":Ab(a,d);h=zb(a,d);F("invalid",a);rd(c,"onChange");break;case "option":h=Gb(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};h=n({},d,{value:void 0});F("invalid",a);rd(c,"onChange");break;case "textarea":Jb(a,
|
11695 | d);h=Ib(a,d);F("invalid",a);rd(c,"onChange");break;default:h=d}od(e,h);var k=h;for(f in k)if(k.hasOwnProperty(f)){var l=k[f];"style"===f?md(a,l):"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,null!=l&&Qb(a,l)):"children"===f?"string"===typeof l?("textarea"!==e||""!==l)&&Rb(a,l):"number"===typeof l&&Rb(a,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(va.hasOwnProperty(f)?null!=l&&rd(c,f):null!=l&&Xa(a,f,l,g))}switch(e){case "input":xb(a);Eb(a,d,!1);
|
11696 | break;case "textarea":xb(a);Lb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+rb(d.value));break;case "select":a.multiple=!!d.multiple;c=d.value;null!=c?Hb(a,!!d.multiple,c,!1):null!=d.defaultValue&&Hb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof h.onClick&&(a.onclick=sd)}Fd(e,d)&&(b.effectTag|=4)}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)qi(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(u(166));
|
11697 | c=ch(bh.current);ch($g.current);Wh(b)?(c=b.stateNode,d=b.memoizedProps,c[Md]=b,c.nodeValue!==d&&(b.effectTag|=4)):(c=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),c[Md]=b,b.stateNode=c)}return null;case 13:H(M);d=b.memoizedState;if(0!==(b.effectTag&64))return b.expirationTime=c,b;c=null!==d;d=!1;null===a?void 0!==b.memoizedProps.fallback&&Wh(b):(e=a.memoizedState,d=null!==e,c||null===e||(e=a.child.sibling,null!==e&&(f=b.firstEffect,null!==f?(b.firstEffect=e,e.nextEffect=f):(b.firstEffect=b.lastEffect=
|
11698 | e,e.nextEffect=null),e.effectTag=8)));if(c&&!d&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(M.current&1))S===ti&&(S=ui);else{if(S===ti||S===ui)S=vi;0!==wi&&null!==T&&(xi(T,U),yi(T,wi))}if(c||d)b.effectTag|=4;return null;case 4:return eh(),oi(b),null;case 10:return og(b),null;case 17:return L(b.type)&&Df(),null;case 19:H(M);d=b.memoizedState;if(null===d)return null;e=0!==(b.effectTag&64);f=d.rendering;if(null===f)if(e)ri(d,!1);else{if(S!==ti||null!==a&&0!==(a.effectTag&
|
11699 | 64))for(f=b.child;null!==f;){a=hh(f);if(null!==a){b.effectTag|=64;ri(d,!1);e=a.updateQueue;null!==e&&(b.updateQueue=e,b.effectTag|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;for(d=b.child;null!==d;)e=d,f=c,e.effectTag&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null,a=e.alternate,null===a?(e.childExpirationTime=0,e.expirationTime=f,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null):(e.childExpirationTime=a.childExpirationTime,
|
11700 | e.expirationTime=a.expirationTime,e.child=a.child,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,f=a.dependencies,e.dependencies=null===f?null:{expirationTime:f.expirationTime,firstContext:f.firstContext,responders:f.responders}),d=d.sibling;I(M,M.current&1|2);return b.child}f=f.sibling}}else{if(!e)if(a=hh(f),null!==a){if(b.effectTag|=64,e=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),ri(d,!0),null===d.tail&&"hidden"===d.tailMode&&!f.alternate)return b=
|
11701 | b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*$f()-d.renderingStartTime>d.tailExpiration&&1<c&&(b.effectTag|=64,e=!0,ri(d,!1),b.expirationTime=b.childExpirationTime=c-1);d.isBackwards?(f.sibling=b.child,b.child=f):(c=d.last,null!==c?c.sibling=f:b.child=f,d.last=f)}return null!==d.tail?(0===d.tailExpiration&&(d.tailExpiration=$f()+500),c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=$f(),c.sibling=null,b=M.current,I(M,e?b&1|2:b&1),c):null}throw Error(u(156,
|
11702 | b.tag));}function zi(a){switch(a.tag){case 1:L(a.type)&&Df();var b=a.effectTag;return b&4096?(a.effectTag=b&-4097|64,a):null;case 3:eh();H(K);H(J);b=a.effectTag;if(0!==(b&64))throw Error(u(285));a.effectTag=b&-4097|64;return a;case 5:return gh(a),null;case 13:return H(M),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return H(M),null;case 4:return eh(),null;case 10:return og(a),null;default:return null}}function Ai(a,b){return{value:a,source:b,stack:qb(b)}}
|
11703 | var Bi="function"===typeof WeakSet?WeakSet:Set;function Ci(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=qb(c));null!==c&&pb(c.type);b=b.value;null!==a&&1===a.tag&&pb(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Di(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Ei(a,c)}}function Fi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Ei(a,c)}else b.current=null}
|
11704 | function Gi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ig(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(u(163));}
|
11705 | function Hi(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.destroy;c.destroy=void 0;void 0!==d&&d()}c=c.next}while(c!==b)}}function Ii(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}
|
11706 | function Ji(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:Ii(3,c);return;case 1:a=c.stateNode;if(c.effectTag&4)if(null===b)a.componentDidMount();else{var d=c.elementType===c.type?b.memoizedProps:ig(c.type,b.memoizedProps);a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}b=c.updateQueue;null!==b&&Cg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Cg(c,b,a)}return;
|
11707 | case 5:a=c.stateNode;null===b&&c.effectTag&4&&Fd(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Vc(c))));return;case 19:case 17:case 20:case 21:return}throw Error(u(163));}
|
11708 | function Ki(a,b,c){"function"===typeof Li&&Li(b);switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;cg(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){Ei(g,h)}}a=a.next}while(a!==d)})}break;case 1:Fi(b);c=b.stateNode;"function"===typeof c.componentWillUnmount&&Di(b,c);break;case 5:Fi(b);break;case 4:Mi(a,b,c)}}
|
11709 | function Ni(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;a.stateNode=null;null!==b&&Ni(b)}function Oi(a){return 5===a.tag||3===a.tag||4===a.tag}
|
11710 | function Pi(a){a:{for(var b=a.return;null!==b;){if(Oi(b)){var c=b;break a}b=b.return}throw Error(u(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(u(161));}c.effectTag&16&&(Rb(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Oi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;
|
11711 | if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}d?Qi(a,c,b):Ri(a,c,b)}
|
11712 | function Qi(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=sd));else if(4!==d&&(a=a.child,null!==a))for(Qi(a,b,c),a=a.sibling;null!==a;)Qi(a,b,c),a=a.sibling}
|
11713 | function Ri(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Ri(a,b,c),a=a.sibling;null!==a;)Ri(a,b,c),a=a.sibling}
|
11714 | function Mi(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(u(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,l=c,m=k;;)if(Ki(h,m,l),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break a;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=m.return;m=m.sibling}g?(h=
|
11715 | f,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Ki(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}
|
11716 | function Si(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:Hi(3,b);return;case 1:return;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Nd]=d;"input"===a&&"radio"===d.type&&null!=d.name&&Bb(c,d);pd(a,e);b=pd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?md(c,h):"dangerouslySetInnerHTML"===g?Qb(c,h):"children"===g?Rb(c,h):Xa(c,g,h,b)}switch(a){case "input":Cb(c,d);break;
|
11717 | case "textarea":Kb(c,d);break;case "select":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?Hb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?Hb(c,!!d.multiple,d.defaultValue,!0):Hb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(u(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,Vc(b.containerInfo));return;case 12:return;case 13:c=b;null===b.memoizedState?
|
11718 | d=!1:(d=!0,c=b.child,Ti=$f());if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null,f.style.display=ld("display",e));else if(6===a.tag)a.stateNode.nodeValue=d?"":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=
|
11719 | f;continue}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===c)break;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}Ui(b);return;case 19:Ui(b);return;case 17:return}throw Error(u(163));}function Ui(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Bi);b.forEach(function(b){var d=Vi.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}
|
11720 | var Wi="function"===typeof WeakMap?WeakMap:Map;function Xi(a,b,c){c=wg(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Yi||(Yi=!0,Zi=d);Ci(a,b)};return c}
|
11721 | function $i(a,b,c){c=wg(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ci(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===aj?aj=new Set([this]):aj.add(this),Ci(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}
|
11722 | var bj=Math.ceil,cj=Wa.ReactCurrentDispatcher,dj=Wa.ReactCurrentOwner,V=0,ej=8,fj=16,gj=32,ti=0,hj=1,ij=2,ui=3,vi=4,jj=5,W=V,T=null,X=null,U=0,S=ti,kj=null,lj=1073741823,mj=1073741823,nj=null,wi=0,oj=!1,Ti=0,pj=500,Y=null,Yi=!1,Zi=null,aj=null,qj=!1,rj=null,sj=90,tj=null,uj=0,vj=null,wj=0;function Gg(){return(W&(fj|gj))!==V?1073741821-($f()/10|0):0!==wj?wj:wj=1073741821-($f()/10|0)}
|
11723 | function Hg(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=ag();if(0===(b&4))return 99===d?1073741823:1073741822;if((W&fj)!==V)return U;if(null!==c)a=hg(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=hg(a,150,100);break;case 97:case 96:a=hg(a,5E3,250);break;case 95:a=2;break;default:throw Error(u(326));}null!==T&&a===U&&--a;return a}
|
11724 | function Ig(a,b){if(50<uj)throw uj=0,vj=null,Error(u(185));a=xj(a,b);if(null!==a){var c=ag();1073741823===b?(W&ej)!==V&&(W&(fj|gj))===V?yj(a):(Z(a),W===V&&gg()):Z(a);(W&4)===V||98!==c&&99!==c||(null===tj?tj=new Map([[a,b]]):(c=tj.get(a),(void 0===c||c>b)&&tj.set(a,b)))}}
|
11725 | function xj(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(T===e&&(Bg(b),S===vi&&xi(e,U)),yi(e,b));return e}
|
11726 | function zj(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Aj(a,b))return b;var c=a.lastPingedTime;a=a.nextKnownPendingLevel;a=c>a?c:a;return 2>=a&&b!==a?0:a}
|
11727 | function Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else{var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c)}a.callbackExpirationTime=
|
11728 | b;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b}}}
|
11729 | function Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h)}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2<c?2:c);break;case ui:xi(a,c);d=a.lastSuspendedTime;
|
11730 | c===d&&(a.nextKnownPendingLevel=Ij(e));if(1073741823===lj&&(e=Ti+pj-$f(),10<e)){if(oj){var f=a.lastPingedTime;if(0===f||f>=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=
|
11731 | d;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=Hd(Jj.bind(null,a),d);break}Jj(a);break;case jj:if(1073741823!==lj&&null!==nj){f=lj;var g=nj;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10<d){xi(a,c);a.timeoutHandle=
|
11732 | Hd(Jj.bind(null,a),d);break}}Jj(a);break;default:throw Error(u(329));}Z(a);if(a.callbackNode===b)return Bj.bind(null,a)}}return null}
|
11733 | function yj(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&b===U||Ej(a,b);if(null!==X){var c=W;W|=fj;var d=Fj();do try{Kj();break}catch(e){Hj(a,e)}while(1);ng();W=c;cj.current=d;if(S===hj)throw c=kj,Ej(a,b),xi(a,b),Z(a),c;if(null!==X)throw Error(u(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;T=null;Jj(a);Z(a)}return null}function Lj(){if(null!==tj){var a=tj;tj=null;a.forEach(function(a,c){Cj(c,a);Z(c)});gg()}}
|
11734 | function Mj(a,b){var c=W;W|=1;try{return a(b)}finally{W=c,W===V&&gg()}}function Nj(a,b){var c=W;W&=-2;W|=ej;try{return a(b)}finally{W=c,W===V&&gg()}}
|
11735 | function Ej(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Id(c));if(null!==X)for(c=X.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Df();break;case 3:eh();H(K);H(J);break;case 5:gh(d);break;case 4:eh();break;case 13:H(M);break;case 19:H(M);break;case 10:og(d)}c=c.return}T=a;X=Sg(a.current,null);U=b;S=ti;kj=null;mj=lj=1073741823;nj=null;wi=0;oj=!1}
|
11736 | function Hj(a,b){do{try{ng();jh.current=sh;if(mh)for(var c=N.memoizedState;null!==c;){var d=c.queue;null!==d&&(d.pending=null);c=c.next}lh=0;P=O=N=null;mh=!1;if(null===X||null===X.return)return S=hj,kj=b,X=null;a:{var e=a,f=X.return,g=X,h=b;b=U;g.effectTag|=2048;g.firstEffect=g.lastEffect=null;if(null!==h&&"object"===typeof h&&"function"===typeof h.then){var k=h;if(0===(g.mode&2)){var l=g.alternate;l?(g.updateQueue=l.updateQueue,g.memoizedState=l.memoizedState,g.expirationTime=l.expirationTime):(g.updateQueue=
|
11737 | null,g.memoizedState=null)}var m=0!==(M.current&1),p=f;do{var x;if(x=13===p.tag){var z=p.memoizedState;if(null!==z)x=null!==z.dehydrated?!0:!1;else{var ca=p.memoizedProps;x=void 0===ca.fallback?!1:!0!==ca.unstable_avoidThisFallback?!0:m?!1:!0}}if(x){var D=p.updateQueue;if(null===D){var t=new Set;t.add(k);p.updateQueue=t}else D.add(k);if(0===(p.mode&2)){p.effectTag|=64;g.effectTag&=-2981;if(1===g.tag)if(null===g.alternate)g.tag=17;else{var y=wg(1073741823,null);y.tag=2;xg(g,y)}g.expirationTime=1073741823;
|
11738 | break a}h=void 0;g=b;var A=e.pingCache;null===A?(A=e.pingCache=new Wi,h=new Set,A.set(k,h)):(h=A.get(k),void 0===h&&(h=new Set,A.set(k,h)));if(!h.has(g)){h.add(g);var q=Oj.bind(null,e,k,g);k.then(q,q)}p.effectTag|=4096;p.expirationTime=b;break a}p=p.return}while(null!==p);h=Error((pb(g.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+qb(g))}S!==
|
11739 | jj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=h;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&("function"===typeof w.getDerivedStateFromError||null!==ub&&"function"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return}while(null!==p)}X=Pj(X)}catch(Xc){b=Xc;continue}break}while(1)}
|
11740 | function Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}function Ag(a,b){a<lj&&2<a&&(lj=a);null!==b&&a<mj&&2<a&&(mj=a,nj=b)}function Bg(a){a>wi&&(wi=a)}function Kj(){for(;null!==X;)X=Qj(X)}function Gj(){for(;null!==X&&!Uf();)X=Qj(X)}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b}
|
11741 | function Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}X.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1<X.effectTag&&(null!==
|
11742 | a.lastEffect?a.lastEffect.nextEffect=X:a.firstEffect=X,a.lastEffect=X))}else{b=zi(X);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=X.sibling;if(null!==b)return b;X=a}while(null!==X);S===ti&&(S=jj);return null}function Ij(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null}
|
11743 | function Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=
|
11744 | d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=W;W|=gj;dj.current=null;Dd=fd;var g=xd();if(yd(g)){if("selectionStart"in g)var h={start:g.selectionStart,end:g.selectionEnd};else a:{h=(h=g.ownerDocument)&&h.defaultView||window;var k=h.getSelection&&h.getSelection();if(k&&0!==k.rangeCount){h=k.anchorNode;var l=k.anchorOffset,
|
11745 | m=k.focusNode;k=k.focusOffset;try{h.nodeType,m.nodeType}catch(wb){h=null;break a}var p=0,x=-1,z=-1,ca=0,D=0,t=g,y=null;b:for(;;){for(var A;;){t!==h||0!==l&&3!==t.nodeType||(x=p+l);t!==m||0!==k&&3!==t.nodeType||(z=p+k);3===t.nodeType&&(p+=t.nodeValue.length);if(null===(A=t.firstChild))break;y=t;t=A}for(;;){if(t===g)break b;y===h&&++ca===l&&(x=p);y===m&&++D===k&&(z=p);if(null!==(A=t.nextSibling))break;t=y;y=t.parentNode}t=A}h=-1===x||-1===z?null:{start:x,end:z}}else h=null}h=h||{start:0,end:0}}else h=
|
11746 | null;Ed={activeElementDetached:null,focusedElem:g,selectionRange:h};fd=!1;Y=e;do try{Tj()}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(g=a,h=b;null!==Y;){var q=Y.effectTag;q&16&&Rb(Y.stateNode,"");if(q&128){var B=Y.alternate;if(null!==B){var w=B.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(q&1038){case 2:Pi(Y);Y.effectTag&=-3;break;case 6:Pi(Y);Y.effectTag&=-3;Si(Y.alternate,Y);break;case 1024:Y.effectTag&=-1025;break;case 1028:Y.effectTag&=
|
11747 | -1025;Si(Y.alternate,Y);break;case 4:Si(Y.alternate,Y);break;case 8:l=Y,Mi(g,l,h),Ni(l)}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);w=Ed;B=xd();q=w.focusedElem;h=w.selectionRange;if(B!==q&&q&&q.ownerDocument&&wd(q.ownerDocument.documentElement,q)){null!==h&&yd(q)&&(B=h.start,w=h.end,void 0===w&&(w=B),"selectionStart"in q?(q.selectionStart=B,q.selectionEnd=Math.min(w,q.value.length)):(w=(B=q.ownerDocument||document)&&B.defaultView||window,w.getSelection&&
|
11748 | (w=w.getSelection(),l=q.textContent.length,g=Math.min(h.start,l),h=void 0===h.end?g:Math.min(h.end,l),!w.extend&&g>h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft,
|
11749 | top:w.scrollTop});"function"===typeof q.focus&&q.focus();for(q=0;q<B.length;q++)w=B[q],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}fd=!!Dd;Ed=Dd=null;a.current=c;Y=e;do try{for(q=a;null!==Y;){var ub=Y.effectTag;ub&36&&Ji(q,Y.alternate,Y);if(ub&128){B=void 0;var vb=Y.ref;if(null!==vb){var Xc=Y.stateNode;switch(Y.tag){case 5:B=Xc;break;default:B=Xc}"function"===typeof vb?vb(B):vb.current=B}}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=
|
11750 | null;Vf();W=f}else a.current=c;if(qj)qj=!1,rj=a,sj=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&(aj=null);1073741823===b?a===vj?uj++:(uj=0,vj=a):uj=0;"function"===typeof Uj&&Uj(c.stateNode,d);Z(a);if(Yi)throw Yi=!1,a=Zi,Zi=null,a;if((W&ej)!==V)return null;gg();return null}function Tj(){for(;null!==Y;){var a=Y.effectTag;0!==(a&256)&&Gi(Y.alternate,Y);0===(a&512)||qj||(qj=!0,dg(97,function(){Dj();return null}));Y=Y.nextEffect}}
|
11751 | function Dj(){if(90!==sj){var a=97<sj?97:sj;sj=90;return cg(a,Vj)}}function Vj(){if(null===rj)return!1;var a=rj;rj=null;if((W&(fj|gj))!==V)throw Error(u(331));var b=W;W|=gj;for(a=a.current.firstEffect;null!==a;){try{var c=a;if(0!==(c.effectTag&512))switch(c.tag){case 0:case 11:case 15:case 22:Hi(5,c),Ii(5,c)}}catch(d){if(null===a)throw Error(u(330));Ei(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}W=b;gg();return!0}
|
11752 | function Wj(a,b,c){b=Ai(c,b);b=Xi(a,b,1073741823);xg(a,b);a=xj(a,1073741823);null!==a&&Z(a)}function Ei(a,b){if(3===a.tag)Wj(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){Wj(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===aj||!aj.has(d))){a=Ai(b,a);a=$i(c,a,1073741823);xg(c,a);c=xj(c,1073741823);null!==c&&Z(c);break}}c=c.return}}
|
11753 | function Oj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);T===a&&U===c?S===vi||S===ui&&1073741823===lj&&$f()-Ti<pj?Ej(a,U):oj=!0:Aj(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,Z(a)))}function Vi(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=Gg(),b=Hg(b,a,null));a=xj(a,b);null!==a&&Z(a)}var Rj;
|
11754 | Rj=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||K.current)rg=!0;else{if(d<c){rg=!1;switch(b.tag){case 3:hi(b);Xh();break;case 5:fh(b);if(b.mode&4&&1!==c&&e.hidden)return b.expirationTime=b.childExpirationTime=1,null;break;case 1:L(b.type)&&Gf(b);break;case 4:dh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;e=b.type._context;I(jg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;
|
11755 | if(0!==d&&d>=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null,
|
11756 | b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=
|
11757 | null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c);
|
11758 | case 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:
|
11759 | null,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,
|
11760 | b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==
|
11761 | k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime<c&&(h.expirationTime=c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);pg(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=
|
11762 | g}R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,qg(b,c),e=sg(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,R(a,b,d,c),b.child;case 14:return e=b.type,f=ig(e,b.pendingProps),f=ig(e.type,f),ai(a,b,e,f,d,c);case 15:return ci(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,L(d)?(a=!0,Gf(b)):a=!1,qg(b,c),Lg(b,d,e),Ng(b,d,e,c),gi(null,
|
11763 | b,d,!0,a,c);case 19:return mi(a,b,c)}throw Error(u(156,b.tag));};var Uj=null,Li=null;function Yj(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Uj=function(a){try{b.onCommitFiberRoot(c,a,void 0,64===(a.current.effectTag&64))}catch(e){}};Li=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}
|
11764 | function Zj(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function Sh(a,b,c,d){return new Zj(a,b,c,d)}
|
11765 | function bi(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Xj(a){if("function"===typeof a)return bi(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===gb)return 11;if(a===jb)return 14}return 2}
|
11766 | function Sg(a,b){var c=a.alternate;null===c?(c=Sh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,
|
11767 | firstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}
|
11768 | function Ug(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bi(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ab:return Wg(c.children,e,f,b);case fb:g=8;e|=7;break;case bb:g=8;e|=1;break;case cb:return a=Sh(12,c,b,e|8),a.elementType=cb,a.type=cb,a.expirationTime=f,a;case hb:return a=Sh(13,c,b,e),a.type=hb,a.elementType=hb,a.expirationTime=f,a;case ib:return a=Sh(19,c,b,e),a.elementType=ib,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case db:g=
|
11769 | 10;break a;case eb:g=9;break a;case gb:g=11;break a;case jb:g=14;break a;case kb:g=16;d=null;break a;case lb:g=22;break a}throw Error(u(130,null==a?a:typeof a,""));}b=Sh(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Wg(a,b,c,d){a=Sh(7,a,d,b);a.expirationTime=c;return a}function Tg(a,b,c){a=Sh(6,a,null,b);a.expirationTime=c;return a}
|
11770 | function Vg(a,b,c){b=Sh(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
|
11771 | function ak(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}
|
11772 | function Aj(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}
|
11773 | function yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}
|
11774 | function bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0===
|
11775 | d?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=b)}function ek(a,b){dk(a,b);(a=a.alternate)&&dk(a,b)}
|
11776 | function fk(a,b,c){c=null!=c&&!0===c.hydrate;var d=new ak(a,b,c),e=Sh(3,null,null,2===b?7:1===b?3:0);d.current=e;e.stateNode=d;ug(e);a[Od]=d.current;c&&0!==b&&Jc(a,9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}fk.prototype.render=function(a){bk(a,this._internalRoot,null,null)};fk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;bk(null,a,null,function(){b[Od]=null})};
|
11777 | function gk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function hk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new fk(a,0,b?{hydrate:!0}:void 0)}
|
11778 | function ik(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=ck(g);h.call(a)}}bk(b,g,a,e)}else{f=c._reactRootContainer=hk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=ck(g);k.call(a)}}Nj(function(){bk(b,g,a,e)})}return ck(g)}function jk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:$a,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
|
11779 | wc=function(a){if(13===a.tag){var b=hg(Gg(),150,100);Ig(a,b);ek(a,b)}};xc=function(a){13===a.tag&&(Ig(a,3),ek(a,3))};yc=function(a){if(13===a.tag){var b=Gg();b=Hg(b,a,null);Ig(a,b);ek(a,b)}};
|
11780 | za=function(a,b,c){switch(b){case "input":Cb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Qd(d);if(!e)throw Error(u(90));yb(d);Cb(d,e)}}}break;case "textarea":Kb(a,c);break;case "select":b=c.value,null!=b&&Hb(a,!!c.multiple,b,!1)}};Fa=Mj;
|
11781 | Ga=function(a,b,c,d,e){var f=W;W|=4;try{return cg(98,a.bind(null,b,c,d,e))}finally{W=f,W===V&&gg()}};Ha=function(){(W&(1|fj|gj))===V&&(Lj(),Dj())};Ia=function(a,b){var c=W;W|=2;try{return a(b)}finally{W=c,W===V&&gg()}};function kk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gk(b))throw Error(u(200));return jk(a,b,null,c)}var lk={Events:[Nc,Pd,Qd,xa,ta,Xd,function(a){jc(a,Wd)},Da,Ea,id,mc,Dj,{current:!1}]};
|
11782 | (function(a){var b=a.findFiberByHostInstance;return Yj(n({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=hc(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:tc,bundleType:0,version:"16.13.1",
|
11783 | rendererPackageName:"react-dom"});exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;exports.createPortal=kk;exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if("function"===typeof a.render)throw Error(u(188));throw Error(u(268,Object.keys(a)));}a=hc(b);a=null===a?null:a.stateNode;return a};
|
11784 | exports.flushSync=function(a,b){if((W&(fj|gj))!==V)throw Error(u(187));var c=W;W|=1;try{return cg(99,a.bind(null,b))}finally{W=c,gg()}};exports.hydrate=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!0,c)};exports.render=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!1,c)};
|
11785 | exports.unmountComponentAtNode=function(a){if(!gk(a))throw Error(u(40));return a._reactRootContainer?(Nj(function(){ik(null,null,a,!1,function(){a._reactRootContainer=null;a[Od]=null})}),!0):!1};exports.unstable_batchedUpdates=Mj;exports.unstable_createPortal=function(a,b){return kk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
|
11786 | exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!gk(c))throw Error(u(200));if(null==a||void 0===a._reactInternalFiber)throw Error(u(38));return ik(a,b,c,!1,d)};exports.version="16.13.1";
|
11787 |
|
11788 |
|
11789 | }),
|
11790 |
|
11791 | (function(module, exports, __webpack_require__) {
|
11792 |
|
11793 | "use strict";
|
11794 |
|
11795 |
|
11796 |
|
11797 |
|
11798 |
|
11799 |
|
11800 |
|
11801 |
|
11802 | var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
11803 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
11804 | var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
11805 |
|
11806 | function toObject(val) {
|
11807 | if (val === null || val === undefined) {
|
11808 | throw new TypeError('Object.assign cannot be called with null or undefined');
|
11809 | }
|
11810 |
|
11811 | return Object(val);
|
11812 | }
|
11813 |
|
11814 | function shouldUseNative() {
|
11815 | try {
|
11816 | if (!Object.assign) {
|
11817 | return false;
|
11818 | }
|
11819 |
|
11820 |
|
11821 |
|
11822 |
|
11823 | var test1 = new String('abc');
|
11824 | test1[5] = 'de';
|
11825 | if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
11826 | return false;
|
11827 | }
|
11828 |
|
11829 |
|
11830 | var test2 = {};
|
11831 | for (var i = 0; i < 10; i++) {
|
11832 | test2['_' + String.fromCharCode(i)] = i;
|
11833 | }
|
11834 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
11835 | return test2[n];
|
11836 | });
|
11837 | if (order2.join('') !== '0123456789') {
|
11838 | return false;
|
11839 | }
|
11840 |
|
11841 |
|
11842 | var test3 = {};
|
11843 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
11844 | test3[letter] = letter;
|
11845 | });
|
11846 | if (Object.keys(Object.assign({}, test3)).join('') !==
|
11847 | 'abcdefghijklmnopqrst') {
|
11848 | return false;
|
11849 | }
|
11850 |
|
11851 | return true;
|
11852 | } catch (err) {
|
11853 |
|
11854 | return false;
|
11855 | }
|
11856 | }
|
11857 |
|
11858 | module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
11859 | var from;
|
11860 | var to = toObject(target);
|
11861 | var symbols;
|
11862 |
|
11863 | for (var s = 1; s < arguments.length; s++) {
|
11864 | from = Object(arguments[s]);
|
11865 |
|
11866 | for (var key in from) {
|
11867 | if (hasOwnProperty.call(from, key)) {
|
11868 | to[key] = from[key];
|
11869 | }
|
11870 | }
|
11871 |
|
11872 | if (getOwnPropertySymbols) {
|
11873 | symbols = getOwnPropertySymbols(from);
|
11874 | for (var i = 0; i < symbols.length; i++) {
|
11875 | if (propIsEnumerable.call(from, symbols[i])) {
|
11876 | to[symbols[i]] = from[symbols[i]];
|
11877 | }
|
11878 | }
|
11879 | }
|
11880 | }
|
11881 |
|
11882 | return to;
|
11883 | };
|
11884 |
|
11885 |
|
11886 | }),
|
11887 |
|
11888 | (function(module, exports, __webpack_require__) {
|
11889 |
|
11890 | "use strict";
|
11891 |
|
11892 |
|
11893 | if (true) {
|
11894 | module.exports = __webpack_require__(94);
|
11895 | } else {}
|
11896 |
|
11897 |
|
11898 | }),
|
11899 |
|
11900 | (function(module, exports, __webpack_require__) {
|
11901 |
|
11902 | "use strict";
|
11903 |
|
11904 |
|
11905 |
|
11906 |
|
11907 |
|
11908 |
|
11909 |
|
11910 |
|
11911 |
|
11912 | var f,g,h,k,l;
|
11913 | if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,
|
11914 | y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");"function"!==typeof A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===
|
11915 | typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):F=0<a?Math.floor(1E3/a):5};var H=new MessageChannel,I=H.port2;H.port1.onmessage=
|
11916 | function(){if(null!==D){var a=exports.unstable_now();G=a+F;try{D(!0,a)?I.postMessage(null):(C=!1,D=null)}catch(b){throw I.postMessage(null),b;}}else C=!1};f=function(a){D=a;C||(C=!0,I.postMessage(null))};g=function(a,b){E=y(function(){a(exports.unstable_now())},b)};h=function(){z(E);E=-1}}function J(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<K(e,b))a[d]=b,a[c]=e,c=d;else break a}}function L(a){a=a[0];return void 0===a?null:a}
|
11917 | function M(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;
|
11918 | function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}
|
11919 | function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}
|
11920 | function Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};
|
11921 | exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};
|
11922 | exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:Y(a)}else c=Y(a),e=d;c=e+c;a={id:P++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};
|
11923 | exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<Q.expirationTime||k()};exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};
|
11924 |
|
11925 |
|
11926 | }),
|
11927 |
|
11928 | (function(module, exports, __webpack_require__) {
|
11929 |
|
11930 | "use strict";
|
11931 |
|
11932 |
|
11933 | if (true) {
|
11934 | module.exports = __webpack_require__(96);
|
11935 | } else {}
|
11936 |
|
11937 |
|
11938 | }),
|
11939 |
|
11940 | (function(module, exports, __webpack_require__) {
|
11941 |
|
11942 | "use strict";
|
11943 |
|
11944 |
|
11945 |
|
11946 |
|
11947 |
|
11948 |
|
11949 |
|
11950 |
|
11951 |
|
11952 | var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
11953 | Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
11954 | function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
|
11955 | exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
|
11956 | exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
|
11957 | exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
|
11958 |
|
11959 |
|
11960 | }),
|
11961 |
|
11962 | (function(module, exports, __webpack_require__) {
|
11963 |
|
11964 | var Symbol = __webpack_require__(24),
|
11965 | isArguments = __webpack_require__(38),
|
11966 | isArray = __webpack_require__(16);
|
11967 |
|
11968 |
|
11969 | var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
11970 |
|
11971 |
|
11972 |
|
11973 |
|
11974 |
|
11975 |
|
11976 |
|
11977 |
|
11978 | function isFlattenable(value) {
|
11979 | return isArray(value) || isArguments(value) ||
|
11980 | !!(spreadableSymbol && value && value[spreadableSymbol]);
|
11981 | }
|
11982 |
|
11983 | module.exports = isFlattenable;
|
11984 |
|
11985 |
|
11986 | }),
|
11987 |
|
11988 | (function(module, exports, __webpack_require__) {
|
11989 |
|
11990 | var baseGetTag = __webpack_require__(25),
|
11991 | isObjectLike = __webpack_require__(26);
|
11992 |
|
11993 |
|
11994 | var argsTag = '[object Arguments]';
|
11995 |
|
11996 |
|
11997 |
|
11998 |
|
11999 |
|
12000 |
|
12001 |
|
12002 |
|
12003 | function baseIsArguments(value) {
|
12004 | return isObjectLike(value) && baseGetTag(value) == argsTag;
|
12005 | }
|
12006 |
|
12007 | module.exports = baseIsArguments;
|
12008 |
|
12009 |
|
12010 | }),
|
12011 |
|
12012 | (function(module, exports, __webpack_require__) {
|
12013 |
|
12014 | var Symbol = __webpack_require__(24);
|
12015 |
|
12016 |
|
12017 | var objectProto = Object.prototype;
|
12018 |
|
12019 |
|
12020 | var hasOwnProperty = objectProto.hasOwnProperty;
|
12021 |
|
12022 |
|
12023 |
|
12024 |
|
12025 |
|
12026 |
|
12027 | var nativeObjectToString = objectProto.toString;
|
12028 |
|
12029 |
|
12030 | var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
12031 |
|
12032 |
|
12033 |
|
12034 |
|
12035 |
|
12036 |
|
12037 |
|
12038 |
|
12039 | function getRawTag(value) {
|
12040 | var isOwn = hasOwnProperty.call(value, symToStringTag),
|
12041 | tag = value[symToStringTag];
|
12042 |
|
12043 | try {
|
12044 | value[symToStringTag] = undefined;
|
12045 | var unmasked = true;
|
12046 | } catch (e) {}
|
12047 |
|
12048 | var result = nativeObjectToString.call(value);
|
12049 | if (unmasked) {
|
12050 | if (isOwn) {
|
12051 | value[symToStringTag] = tag;
|
12052 | } else {
|
12053 | delete value[symToStringTag];
|
12054 | }
|
12055 | }
|
12056 | return result;
|
12057 | }
|
12058 |
|
12059 | module.exports = getRawTag;
|
12060 |
|
12061 |
|
12062 | }),
|
12063 |
|
12064 | (function(module, exports) {
|
12065 |
|
12066 |
|
12067 | var objectProto = Object.prototype;
|
12068 |
|
12069 |
|
12070 |
|
12071 |
|
12072 |
|
12073 |
|
12074 | var nativeObjectToString = objectProto.toString;
|
12075 |
|
12076 |
|
12077 |
|
12078 |
|
12079 |
|
12080 |
|
12081 |
|
12082 |
|
12083 | function objectToString(value) {
|
12084 | return nativeObjectToString.call(value);
|
12085 | }
|
12086 |
|
12087 | module.exports = objectToString;
|
12088 |
|
12089 |
|
12090 | }),
|
12091 |
|
12092 | (function(module, exports) {
|
12093 |
|
12094 | function _extends() {
|
12095 | module.exports = _extends = Object.assign || function (target) {
|
12096 | for (var i = 1; i < arguments.length; i++) {
|
12097 | var source = arguments[i];
|
12098 |
|
12099 | for (var key in source) {
|
12100 | if (Object.prototype.hasOwnProperty.call(source, key)) {
|
12101 | target[key] = source[key];
|
12102 | }
|
12103 | }
|
12104 | }
|
12105 |
|
12106 | return target;
|
12107 | };
|
12108 |
|
12109 | return _extends.apply(this, arguments);
|
12110 | }
|
12111 |
|
12112 | module.exports = _extends;
|
12113 |
|
12114 | }),
|
12115 |
|
12116 | (function(module, exports, __webpack_require__) {
|
12117 |
|
12118 | module.exports = window.fetch || (window.fetch = __webpack_require__(53).default || __webpack_require__(53));
|
12119 |
|
12120 |
|
12121 | }),
|
12122 |
|
12123 | (function(module, exports, __webpack_require__) {
|
12124 |
|
12125 | var defineProperty = __webpack_require__(104);
|
12126 |
|
12127 |
|
12128 |
|
12129 |
|
12130 |
|
12131 |
|
12132 |
|
12133 |
|
12134 |
|
12135 |
|
12136 | function baseAssignValue(object, key, value) {
|
12137 | if (key == '__proto__' && defineProperty) {
|
12138 | defineProperty(object, key, {
|
12139 | 'configurable': true,
|
12140 | 'enumerable': true,
|
12141 | 'value': value,
|
12142 | 'writable': true
|
12143 | });
|
12144 | } else {
|
12145 | object[key] = value;
|
12146 | }
|
12147 | }
|
12148 |
|
12149 | module.exports = baseAssignValue;
|
12150 |
|
12151 |
|
12152 | }),
|
12153 |
|
12154 | (function(module, exports, __webpack_require__) {
|
12155 |
|
12156 | var getNative = __webpack_require__(22);
|
12157 |
|
12158 | var defineProperty = (function() {
|
12159 | try {
|
12160 | var func = getNative(Object, 'defineProperty');
|
12161 | func({}, '', {});
|
12162 | return func;
|
12163 | } catch (e) {}
|
12164 | }());
|
12165 |
|
12166 | module.exports = defineProperty;
|
12167 |
|
12168 |
|
12169 | }),
|
12170 |
|
12171 | (function(module, exports, __webpack_require__) {
|
12172 |
|
12173 | var isFunction = __webpack_require__(54),
|
12174 | isMasked = __webpack_require__(106),
|
12175 | isObject = __webpack_require__(39),
|
12176 | toSource = __webpack_require__(55);
|
12177 |
|
12178 |
|
12179 |
|
12180 |
|
12181 |
|
12182 | var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
12183 |
|
12184 |
|
12185 | var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
12186 |
|
12187 |
|
12188 | var funcProto = Function.prototype,
|
12189 | objectProto = Object.prototype;
|
12190 |
|
12191 |
|
12192 | var funcToString = funcProto.toString;
|
12193 |
|
12194 |
|
12195 | var hasOwnProperty = objectProto.hasOwnProperty;
|
12196 |
|
12197 |
|
12198 | var reIsNative = RegExp('^' +
|
12199 | funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
12200 | .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
12201 | );
|
12202 |
|
12203 |
|
12204 |
|
12205 |
|
12206 |
|
12207 |
|
12208 |
|
12209 |
|
12210 |
|
12211 | function baseIsNative(value) {
|
12212 | if (!isObject(value) || isMasked(value)) {
|
12213 | return false;
|
12214 | }
|
12215 | var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
12216 | return pattern.test(toSource(value));
|
12217 | }
|
12218 |
|
12219 | module.exports = baseIsNative;
|
12220 |
|
12221 |
|
12222 | }),
|
12223 |
|
12224 | (function(module, exports, __webpack_require__) {
|
12225 |
|
12226 | var coreJsData = __webpack_require__(107);
|
12227 |
|
12228 |
|
12229 | var maskSrcKey = (function() {
|
12230 | var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
12231 | return uid ? ('Symbol(src)_1.' + uid) : '';
|
12232 | }());
|
12233 |
|
12234 |
|
12235 |
|
12236 |
|
12237 |
|
12238 |
|
12239 |
|
12240 |
|
12241 | function isMasked(func) {
|
12242 | return !!maskSrcKey && (maskSrcKey in func);
|
12243 | }
|
12244 |
|
12245 | module.exports = isMasked;
|
12246 |
|
12247 |
|
12248 | }),
|
12249 |
|
12250 | (function(module, exports, __webpack_require__) {
|
12251 |
|
12252 | var root = __webpack_require__(17);
|
12253 |
|
12254 |
|
12255 | var coreJsData = root['__core-js_shared__'];
|
12256 |
|
12257 | module.exports = coreJsData;
|
12258 |
|
12259 |
|
12260 | }),
|
12261 |
|
12262 | (function(module, exports) {
|
12263 |
|
12264 |
|
12265 |
|
12266 |
|
12267 |
|
12268 |
|
12269 |
|
12270 |
|
12271 |
|
12272 | function getValue(object, key) {
|
12273 | return object == null ? undefined : object[key];
|
12274 | }
|
12275 |
|
12276 | module.exports = getValue;
|
12277 |
|
12278 |
|
12279 | }),
|
12280 |
|
12281 | (function(module, exports, __webpack_require__) {
|
12282 |
|
12283 | var arrayAggregator = __webpack_require__(110),
|
12284 | baseAggregator = __webpack_require__(111),
|
12285 | baseIteratee = __webpack_require__(127),
|
12286 | isArray = __webpack_require__(16);
|
12287 |
|
12288 |
|
12289 |
|
12290 |
|
12291 |
|
12292 |
|
12293 |
|
12294 |
|
12295 |
|
12296 | function createAggregator(setter, initializer) {
|
12297 | return function(collection, iteratee) {
|
12298 | var func = isArray(collection) ? arrayAggregator : baseAggregator,
|
12299 | accumulator = initializer ? initializer() : {};
|
12300 |
|
12301 | return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
|
12302 | };
|
12303 | }
|
12304 |
|
12305 | module.exports = createAggregator;
|
12306 |
|
12307 |
|
12308 | }),
|
12309 |
|
12310 | (function(module, exports) {
|
12311 |
|
12312 |
|
12313 |
|
12314 |
|
12315 |
|
12316 |
|
12317 |
|
12318 |
|
12319 |
|
12320 |
|
12321 |
|
12322 | function arrayAggregator(array, setter, iteratee, accumulator) {
|
12323 | var index = -1,
|
12324 | length = array == null ? 0 : array.length;
|
12325 |
|
12326 | while (++index < length) {
|
12327 | var value = array[index];
|
12328 | setter(accumulator, value, iteratee(value), array);
|
12329 | }
|
12330 | return accumulator;
|
12331 | }
|
12332 |
|
12333 | module.exports = arrayAggregator;
|
12334 |
|
12335 |
|
12336 | }),
|
12337 |
|
12338 | (function(module, exports, __webpack_require__) {
|
12339 |
|
12340 | var baseEach = __webpack_require__(112);
|
12341 |
|
12342 |
|
12343 |
|
12344 |
|
12345 |
|
12346 |
|
12347 |
|
12348 |
|
12349 |
|
12350 |
|
12351 |
|
12352 |
|
12353 | function baseAggregator(collection, setter, iteratee, accumulator) {
|
12354 | baseEach(collection, function(value, key, collection) {
|
12355 | setter(accumulator, value, iteratee(value), collection);
|
12356 | });
|
12357 | return accumulator;
|
12358 | }
|
12359 |
|
12360 | module.exports = baseAggregator;
|
12361 |
|
12362 |
|
12363 | }),
|
12364 |
|
12365 | (function(module, exports, __webpack_require__) {
|
12366 |
|
12367 | var baseForOwn = __webpack_require__(113),
|
12368 | createBaseEach = __webpack_require__(126);
|
12369 |
|
12370 |
|
12371 |
|
12372 |
|
12373 |
|
12374 |
|
12375 |
|
12376 |
|
12377 |
|
12378 | var baseEach = createBaseEach(baseForOwn);
|
12379 |
|
12380 | module.exports = baseEach;
|
12381 |
|
12382 |
|
12383 | }),
|
12384 |
|
12385 | (function(module, exports, __webpack_require__) {
|
12386 |
|
12387 | var baseFor = __webpack_require__(114),
|
12388 | keys = __webpack_require__(40);
|
12389 |
|
12390 |
|
12391 |
|
12392 |
|
12393 |
|
12394 |
|
12395 |
|
12396 |
|
12397 |
|
12398 | function baseForOwn(object, iteratee) {
|
12399 | return object && baseFor(object, iteratee, keys);
|
12400 | }
|
12401 |
|
12402 | module.exports = baseForOwn;
|
12403 |
|
12404 |
|
12405 | }),
|
12406 |
|
12407 | (function(module, exports, __webpack_require__) {
|
12408 |
|
12409 | var createBaseFor = __webpack_require__(115);
|
12410 |
|
12411 |
|
12412 |
|
12413 |
|
12414 |
|
12415 |
|
12416 |
|
12417 |
|
12418 |
|
12419 |
|
12420 |
|
12421 |
|
12422 | var baseFor = createBaseFor();
|
12423 |
|
12424 | module.exports = baseFor;
|
12425 |
|
12426 |
|
12427 | }),
|
12428 |
|
12429 | (function(module, exports) {
|
12430 |
|
12431 |
|
12432 |
|
12433 |
|
12434 |
|
12435 |
|
12436 |
|
12437 |
|
12438 | function createBaseFor(fromRight) {
|
12439 | return function(object, iteratee, keysFunc) {
|
12440 | var index = -1,
|
12441 | iterable = Object(object),
|
12442 | props = keysFunc(object),
|
12443 | length = props.length;
|
12444 |
|
12445 | while (length--) {
|
12446 | var key = props[fromRight ? length : ++index];
|
12447 | if (iteratee(iterable[key], key, iterable) === false) {
|
12448 | break;
|
12449 | }
|
12450 | }
|
12451 | return object;
|
12452 | };
|
12453 | }
|
12454 |
|
12455 | module.exports = createBaseFor;
|
12456 |
|
12457 |
|
12458 | }),
|
12459 |
|
12460 | (function(module, exports, __webpack_require__) {
|
12461 |
|
12462 | var baseTimes = __webpack_require__(117),
|
12463 | isArguments = __webpack_require__(38),
|
12464 | isArray = __webpack_require__(16),
|
12465 | isBuffer = __webpack_require__(56),
|
12466 | isIndex = __webpack_require__(58),
|
12467 | isTypedArray = __webpack_require__(59);
|
12468 |
|
12469 |
|
12470 | var objectProto = Object.prototype;
|
12471 |
|
12472 |
|
12473 | var hasOwnProperty = objectProto.hasOwnProperty;
|
12474 |
|
12475 |
|
12476 |
|
12477 |
|
12478 |
|
12479 |
|
12480 |
|
12481 |
|
12482 |
|
12483 | function arrayLikeKeys(value, inherited) {
|
12484 | var isArr = isArray(value),
|
12485 | isArg = !isArr && isArguments(value),
|
12486 | isBuff = !isArr && !isArg && isBuffer(value),
|
12487 | isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
12488 | skipIndexes = isArr || isArg || isBuff || isType,
|
12489 | result = skipIndexes ? baseTimes(value.length, String) : [],
|
12490 | length = result.length;
|
12491 |
|
12492 | for (var key in value) {
|
12493 | if ((inherited || hasOwnProperty.call(value, key)) &&
|
12494 | !(skipIndexes && (
|
12495 |
|
12496 | key == 'length' ||
|
12497 |
|
12498 | (isBuff && (key == 'offset' || key == 'parent')) ||
|
12499 |
|
12500 | (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
12501 |
|
12502 | isIndex(key, length)
|
12503 | ))) {
|
12504 | result.push(key);
|
12505 | }
|
12506 | }
|
12507 | return result;
|
12508 | }
|
12509 |
|
12510 | module.exports = arrayLikeKeys;
|
12511 |
|
12512 |
|
12513 | }),
|
12514 |
|
12515 | (function(module, exports) {
|
12516 |
|
12517 |
|
12518 |
|
12519 |
|
12520 |
|
12521 |
|
12522 |
|
12523 |
|
12524 |
|
12525 |
|
12526 | function baseTimes(n, iteratee) {
|
12527 | var index = -1,
|
12528 | result = Array(n);
|
12529 |
|
12530 | while (++index < n) {
|
12531 | result[index] = iteratee(index);
|
12532 | }
|
12533 | return result;
|
12534 | }
|
12535 |
|
12536 | module.exports = baseTimes;
|
12537 |
|
12538 |
|
12539 | }),
|
12540 |
|
12541 | (function(module, exports) {
|
12542 |
|
12543 |
|
12544 |
|
12545 |
|
12546 |
|
12547 |
|
12548 |
|
12549 |
|
12550 |
|
12551 |
|
12552 |
|
12553 |
|
12554 |
|
12555 |
|
12556 | function stubFalse() {
|
12557 | return false;
|
12558 | }
|
12559 |
|
12560 | module.exports = stubFalse;
|
12561 |
|
12562 |
|
12563 | }),
|
12564 |
|
12565 | (function(module, exports, __webpack_require__) {
|
12566 |
|
12567 | var baseGetTag = __webpack_require__(25),
|
12568 | isLength = __webpack_require__(41),
|
12569 | isObjectLike = __webpack_require__(26);
|
12570 |
|
12571 |
|
12572 | var argsTag = '[object Arguments]',
|
12573 | arrayTag = '[object Array]',
|
12574 | boolTag = '[object Boolean]',
|
12575 | dateTag = '[object Date]',
|
12576 | errorTag = '[object Error]',
|
12577 | funcTag = '[object Function]',
|
12578 | mapTag = '[object Map]',
|
12579 | numberTag = '[object Number]',
|
12580 | objectTag = '[object Object]',
|
12581 | regexpTag = '[object RegExp]',
|
12582 | setTag = '[object Set]',
|
12583 | stringTag = '[object String]',
|
12584 | weakMapTag = '[object WeakMap]';
|
12585 |
|
12586 | var arrayBufferTag = '[object ArrayBuffer]',
|
12587 | dataViewTag = '[object DataView]',
|
12588 | float32Tag = '[object Float32Array]',
|
12589 | float64Tag = '[object Float64Array]',
|
12590 | int8Tag = '[object Int8Array]',
|
12591 | int16Tag = '[object Int16Array]',
|
12592 | int32Tag = '[object Int32Array]',
|
12593 | uint8Tag = '[object Uint8Array]',
|
12594 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
12595 | uint16Tag = '[object Uint16Array]',
|
12596 | uint32Tag = '[object Uint32Array]';
|
12597 |
|
12598 |
|
12599 | var typedArrayTags = {};
|
12600 | typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
12601 | typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
12602 | typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
12603 | typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
12604 | typedArrayTags[uint32Tag] = true;
|
12605 | typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
12606 | typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
12607 | typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
12608 | typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
12609 | typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
12610 | typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
12611 | typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
12612 | typedArrayTags[weakMapTag] = false;
|
12613 |
|
12614 |
|
12615 |
|
12616 |
|
12617 |
|
12618 |
|
12619 |
|
12620 |
|
12621 | function baseIsTypedArray(value) {
|
12622 | return isObjectLike(value) &&
|
12623 | isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
12624 | }
|
12625 |
|
12626 | module.exports = baseIsTypedArray;
|
12627 |
|
12628 |
|
12629 | }),
|
12630 |
|
12631 | (function(module, exports) {
|
12632 |
|
12633 |
|
12634 |
|
12635 |
|
12636 |
|
12637 |
|
12638 |
|
12639 |
|
12640 | function baseUnary(func) {
|
12641 | return function(value) {
|
12642 | return func(value);
|
12643 | };
|
12644 | }
|
12645 |
|
12646 | module.exports = baseUnary;
|
12647 |
|
12648 |
|
12649 | }),
|
12650 |
|
12651 | (function(module, exports, __webpack_require__) {
|
12652 |
|
12653 | (function(module) {var freeGlobal = __webpack_require__(52);
|
12654 |
|
12655 |
|
12656 | var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
12657 |
|
12658 |
|
12659 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
12660 |
|
12661 |
|
12662 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
12663 |
|
12664 |
|
12665 | var freeProcess = moduleExports && freeGlobal.process;
|
12666 |
|
12667 |
|
12668 | var nodeUtil = (function() {
|
12669 | try {
|
12670 |
|
12671 | var types = freeModule && freeModule.require && freeModule.require('util').types;
|
12672 |
|
12673 | if (types) {
|
12674 | return types;
|
12675 | }
|
12676 |
|
12677 |
|
12678 | return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
12679 | } catch (e) {}
|
12680 | }());
|
12681 |
|
12682 | module.exports = nodeUtil;
|
12683 |
|
12684 | }.call(this, __webpack_require__(57)(module)))
|
12685 |
|
12686 | }),
|
12687 |
|
12688 | (function(module, exports, __webpack_require__) {
|
12689 |
|
12690 | var isPrototype = __webpack_require__(123),
|
12691 | nativeKeys = __webpack_require__(124);
|
12692 |
|
12693 |
|
12694 | var objectProto = Object.prototype;
|
12695 |
|
12696 |
|
12697 | var hasOwnProperty = objectProto.hasOwnProperty;
|
12698 |
|
12699 |
|
12700 |
|
12701 |
|
12702 |
|
12703 |
|
12704 |
|
12705 |
|
12706 | function baseKeys(object) {
|
12707 | if (!isPrototype(object)) {
|
12708 | return nativeKeys(object);
|
12709 | }
|
12710 | var result = [];
|
12711 | for (var key in Object(object)) {
|
12712 | if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
12713 | result.push(key);
|
12714 | }
|
12715 | }
|
12716 | return result;
|
12717 | }
|
12718 |
|
12719 | module.exports = baseKeys;
|
12720 |
|
12721 |
|
12722 | }),
|
12723 |
|
12724 | (function(module, exports) {
|
12725 |
|
12726 |
|
12727 | var objectProto = Object.prototype;
|
12728 |
|
12729 |
|
12730 |
|
12731 |
|
12732 |
|
12733 |
|
12734 |
|
12735 |
|
12736 | function isPrototype(value) {
|
12737 | var Ctor = value && value.constructor,
|
12738 | proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
12739 |
|
12740 | return value === proto;
|
12741 | }
|
12742 |
|
12743 | module.exports = isPrototype;
|
12744 |
|
12745 |
|
12746 | }),
|
12747 |
|
12748 | (function(module, exports, __webpack_require__) {
|
12749 |
|
12750 | var overArg = __webpack_require__(125);
|
12751 |
|
12752 |
|
12753 | var nativeKeys = overArg(Object.keys, Object);
|
12754 |
|
12755 | module.exports = nativeKeys;
|
12756 |
|
12757 |
|
12758 | }),
|
12759 |
|
12760 | (function(module, exports) {
|
12761 |
|
12762 |
|
12763 |
|
12764 |
|
12765 |
|
12766 |
|
12767 |
|
12768 |
|
12769 |
|
12770 | function overArg(func, transform) {
|
12771 | return function(arg) {
|
12772 | return func(transform(arg));
|
12773 | };
|
12774 | }
|
12775 |
|
12776 | module.exports = overArg;
|
12777 |
|
12778 |
|
12779 | }),
|
12780 |
|
12781 | (function(module, exports, __webpack_require__) {
|
12782 |
|
12783 | var isArrayLike = __webpack_require__(60);
|
12784 |
|
12785 |
|
12786 |
|
12787 |
|
12788 |
|
12789 |
|
12790 |
|
12791 |
|
12792 |
|
12793 | function createBaseEach(eachFunc, fromRight) {
|
12794 | return function(collection, iteratee) {
|
12795 | if (collection == null) {
|
12796 | return collection;
|
12797 | }
|
12798 | if (!isArrayLike(collection)) {
|
12799 | return eachFunc(collection, iteratee);
|
12800 | }
|
12801 | var length = collection.length,
|
12802 | index = fromRight ? length : -1,
|
12803 | iterable = Object(collection);
|
12804 |
|
12805 | while ((fromRight ? index-- : ++index < length)) {
|
12806 | if (iteratee(iterable[index], index, iterable) === false) {
|
12807 | break;
|
12808 | }
|
12809 | }
|
12810 | return collection;
|
12811 | };
|
12812 | }
|
12813 |
|
12814 | module.exports = createBaseEach;
|
12815 |
|
12816 |
|
12817 | }),
|
12818 |
|
12819 | (function(module, exports, __webpack_require__) {
|
12820 |
|
12821 | var baseMatches = __webpack_require__(128),
|
12822 | baseMatchesProperty = __webpack_require__(174),
|
12823 | identity = __webpack_require__(185),
|
12824 | isArray = __webpack_require__(16),
|
12825 | property = __webpack_require__(186);
|
12826 |
|
12827 |
|
12828 |
|
12829 |
|
12830 |
|
12831 |
|
12832 |
|
12833 |
|
12834 | function baseIteratee(value) {
|
12835 |
|
12836 |
|
12837 | if (typeof value == 'function') {
|
12838 | return value;
|
12839 | }
|
12840 | if (value == null) {
|
12841 | return identity;
|
12842 | }
|
12843 | if (typeof value == 'object') {
|
12844 | return isArray(value)
|
12845 | ? baseMatchesProperty(value[0], value[1])
|
12846 | : baseMatches(value);
|
12847 | }
|
12848 | return property(value);
|
12849 | }
|
12850 |
|
12851 | module.exports = baseIteratee;
|
12852 |
|
12853 |
|
12854 | }),
|
12855 |
|
12856 | (function(module, exports, __webpack_require__) {
|
12857 |
|
12858 | var baseIsMatch = __webpack_require__(129),
|
12859 | getMatchData = __webpack_require__(173),
|
12860 | matchesStrictComparable = __webpack_require__(66);
|
12861 |
|
12862 |
|
12863 |
|
12864 |
|
12865 |
|
12866 |
|
12867 |
|
12868 |
|
12869 | function baseMatches(source) {
|
12870 | var matchData = getMatchData(source);
|
12871 | if (matchData.length == 1 && matchData[0][2]) {
|
12872 | return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
12873 | }
|
12874 | return function(object) {
|
12875 | return object === source || baseIsMatch(object, source, matchData);
|
12876 | };
|
12877 | }
|
12878 |
|
12879 | module.exports = baseMatches;
|
12880 |
|
12881 |
|
12882 | }),
|
12883 |
|
12884 | (function(module, exports, __webpack_require__) {
|
12885 |
|
12886 | var Stack = __webpack_require__(61),
|
12887 | baseIsEqual = __webpack_require__(63);
|
12888 |
|
12889 |
|
12890 | var COMPARE_PARTIAL_FLAG = 1,
|
12891 | COMPARE_UNORDERED_FLAG = 2;
|
12892 |
|
12893 |
|
12894 |
|
12895 |
|
12896 |
|
12897 |
|
12898 |
|
12899 |
|
12900 |
|
12901 |
|
12902 |
|
12903 | function baseIsMatch(object, source, matchData, customizer) {
|
12904 | var index = matchData.length,
|
12905 | length = index,
|
12906 | noCustomizer = !customizer;
|
12907 |
|
12908 | if (object == null) {
|
12909 | return !length;
|
12910 | }
|
12911 | object = Object(object);
|
12912 | while (index--) {
|
12913 | var data = matchData[index];
|
12914 | if ((noCustomizer && data[2])
|
12915 | ? data[1] !== object[data[0]]
|
12916 | : !(data[0] in object)
|
12917 | ) {
|
12918 | return false;
|
12919 | }
|
12920 | }
|
12921 | while (++index < length) {
|
12922 | data = matchData[index];
|
12923 | var key = data[0],
|
12924 | objValue = object[key],
|
12925 | srcValue = data[1];
|
12926 |
|
12927 | if (noCustomizer && data[2]) {
|
12928 | if (objValue === undefined && !(key in object)) {
|
12929 | return false;
|
12930 | }
|
12931 | } else {
|
12932 | var stack = new Stack;
|
12933 | if (customizer) {
|
12934 | var result = customizer(objValue, srcValue, key, object, source, stack);
|
12935 | }
|
12936 | if (!(result === undefined
|
12937 | ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
12938 | : result
|
12939 | )) {
|
12940 | return false;
|
12941 | }
|
12942 | }
|
12943 | }
|
12944 | return true;
|
12945 | }
|
12946 |
|
12947 | module.exports = baseIsMatch;
|
12948 |
|
12949 |
|
12950 | }),
|
12951 |
|
12952 | (function(module, exports) {
|
12953 |
|
12954 |
|
12955 |
|
12956 |
|
12957 |
|
12958 |
|
12959 |
|
12960 |
|
12961 | function listCacheClear() {
|
12962 | this.__data__ = [];
|
12963 | this.size = 0;
|
12964 | }
|
12965 |
|
12966 | module.exports = listCacheClear;
|
12967 |
|
12968 |
|
12969 | }),
|
12970 |
|
12971 | (function(module, exports, __webpack_require__) {
|
12972 |
|
12973 | var assocIndexOf = __webpack_require__(31);
|
12974 |
|
12975 |
|
12976 | var arrayProto = Array.prototype;
|
12977 |
|
12978 |
|
12979 | var splice = arrayProto.splice;
|
12980 |
|
12981 |
|
12982 |
|
12983 |
|
12984 |
|
12985 |
|
12986 |
|
12987 |
|
12988 |
|
12989 |
|
12990 | function listCacheDelete(key) {
|
12991 | var data = this.__data__,
|
12992 | index = assocIndexOf(data, key);
|
12993 |
|
12994 | if (index < 0) {
|
12995 | return false;
|
12996 | }
|
12997 | var lastIndex = data.length - 1;
|
12998 | if (index == lastIndex) {
|
12999 | data.pop();
|
13000 | } else {
|
13001 | splice.call(data, index, 1);
|
13002 | }
|
13003 | --this.size;
|
13004 | return true;
|
13005 | }
|
13006 |
|
13007 | module.exports = listCacheDelete;
|
13008 |
|
13009 |
|
13010 | }),
|
13011 |
|
13012 | (function(module, exports, __webpack_require__) {
|
13013 |
|
13014 | var assocIndexOf = __webpack_require__(31);
|
13015 |
|
13016 |
|
13017 |
|
13018 |
|
13019 |
|
13020 |
|
13021 |
|
13022 |
|
13023 |
|
13024 |
|
13025 | function listCacheGet(key) {
|
13026 | var data = this.__data__,
|
13027 | index = assocIndexOf(data, key);
|
13028 |
|
13029 | return index < 0 ? undefined : data[index][1];
|
13030 | }
|
13031 |
|
13032 | module.exports = listCacheGet;
|
13033 |
|
13034 |
|
13035 | }),
|
13036 |
|
13037 | (function(module, exports, __webpack_require__) {
|
13038 |
|
13039 | var assocIndexOf = __webpack_require__(31);
|
13040 |
|
13041 |
|
13042 |
|
13043 |
|
13044 |
|
13045 |
|
13046 |
|
13047 |
|
13048 |
|
13049 |
|
13050 | function listCacheHas(key) {
|
13051 | return assocIndexOf(this.__data__, key) > -1;
|
13052 | }
|
13053 |
|
13054 | module.exports = listCacheHas;
|
13055 |
|
13056 |
|
13057 | }),
|
13058 |
|
13059 | (function(module, exports, __webpack_require__) {
|
13060 |
|
13061 | var assocIndexOf = __webpack_require__(31);
|
13062 |
|
13063 |
|
13064 |
|
13065 |
|
13066 |
|
13067 |
|
13068 |
|
13069 |
|
13070 |
|
13071 |
|
13072 |
|
13073 | function listCacheSet(key, value) {
|
13074 | var data = this.__data__,
|
13075 | index = assocIndexOf(data, key);
|
13076 |
|
13077 | if (index < 0) {
|
13078 | ++this.size;
|
13079 | data.push([key, value]);
|
13080 | } else {
|
13081 | data[index][1] = value;
|
13082 | }
|
13083 | return this;
|
13084 | }
|
13085 |
|
13086 | module.exports = listCacheSet;
|
13087 |
|
13088 |
|
13089 | }),
|
13090 |
|
13091 | (function(module, exports, __webpack_require__) {
|
13092 |
|
13093 | var ListCache = __webpack_require__(30);
|
13094 |
|
13095 |
|
13096 |
|
13097 |
|
13098 |
|
13099 |
|
13100 |
|
13101 |
|
13102 | function stackClear() {
|
13103 | this.__data__ = new ListCache;
|
13104 | this.size = 0;
|
13105 | }
|
13106 |
|
13107 | module.exports = stackClear;
|
13108 |
|
13109 |
|
13110 | }),
|
13111 |
|
13112 | (function(module, exports) {
|
13113 |
|
13114 |
|
13115 |
|
13116 |
|
13117 |
|
13118 |
|
13119 |
|
13120 |
|
13121 |
|
13122 |
|
13123 | function stackDelete(key) {
|
13124 | var data = this.__data__,
|
13125 | result = data['delete'](key);
|
13126 |
|
13127 | this.size = data.size;
|
13128 | return result;
|
13129 | }
|
13130 |
|
13131 | module.exports = stackDelete;
|
13132 |
|
13133 |
|
13134 | }),
|
13135 |
|
13136 | (function(module, exports) {
|
13137 |
|
13138 |
|
13139 |
|
13140 |
|
13141 |
|
13142 |
|
13143 |
|
13144 |
|
13145 |
|
13146 |
|
13147 | function stackGet(key) {
|
13148 | return this.__data__.get(key);
|
13149 | }
|
13150 |
|
13151 | module.exports = stackGet;
|
13152 |
|
13153 |
|
13154 | }),
|
13155 |
|
13156 | (function(module, exports) {
|
13157 |
|
13158 |
|
13159 |
|
13160 |
|
13161 |
|
13162 |
|
13163 |
|
13164 |
|
13165 |
|
13166 |
|
13167 | function stackHas(key) {
|
13168 | return this.__data__.has(key);
|
13169 | }
|
13170 |
|
13171 | module.exports = stackHas;
|
13172 |
|
13173 |
|
13174 | }),
|
13175 |
|
13176 | (function(module, exports, __webpack_require__) {
|
13177 |
|
13178 | var ListCache = __webpack_require__(30),
|
13179 | Map = __webpack_require__(42),
|
13180 | MapCache = __webpack_require__(43);
|
13181 |
|
13182 |
|
13183 | var LARGE_ARRAY_SIZE = 200;
|
13184 |
|
13185 |
|
13186 |
|
13187 |
|
13188 |
|
13189 |
|
13190 |
|
13191 |
|
13192 |
|
13193 |
|
13194 |
|
13195 | function stackSet(key, value) {
|
13196 | var data = this.__data__;
|
13197 | if (data instanceof ListCache) {
|
13198 | var pairs = data.__data__;
|
13199 | if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
13200 | pairs.push([key, value]);
|
13201 | this.size = ++data.size;
|
13202 | return this;
|
13203 | }
|
13204 | data = this.__data__ = new MapCache(pairs);
|
13205 | }
|
13206 | data.set(key, value);
|
13207 | this.size = data.size;
|
13208 | return this;
|
13209 | }
|
13210 |
|
13211 | module.exports = stackSet;
|
13212 |
|
13213 |
|
13214 | }),
|
13215 |
|
13216 | (function(module, exports, __webpack_require__) {
|
13217 |
|
13218 | var Hash = __webpack_require__(141),
|
13219 | ListCache = __webpack_require__(30),
|
13220 | Map = __webpack_require__(42);
|
13221 |
|
13222 |
|
13223 |
|
13224 |
|
13225 |
|
13226 |
|
13227 |
|
13228 |
|
13229 | function mapCacheClear() {
|
13230 | this.size = 0;
|
13231 | this.__data__ = {
|
13232 | 'hash': new Hash,
|
13233 | 'map': new (Map || ListCache),
|
13234 | 'string': new Hash
|
13235 | };
|
13236 | }
|
13237 |
|
13238 | module.exports = mapCacheClear;
|
13239 |
|
13240 |
|
13241 | }),
|
13242 |
|
13243 | (function(module, exports, __webpack_require__) {
|
13244 |
|
13245 | var hashClear = __webpack_require__(142),
|
13246 | hashDelete = __webpack_require__(143),
|
13247 | hashGet = __webpack_require__(144),
|
13248 | hashHas = __webpack_require__(145),
|
13249 | hashSet = __webpack_require__(146);
|
13250 |
|
13251 |
|
13252 |
|
13253 |
|
13254 |
|
13255 |
|
13256 |
|
13257 |
|
13258 | function Hash(entries) {
|
13259 | var index = -1,
|
13260 | length = entries == null ? 0 : entries.length;
|
13261 |
|
13262 | this.clear();
|
13263 | while (++index < length) {
|
13264 | var entry = entries[index];
|
13265 | this.set(entry[0], entry[1]);
|
13266 | }
|
13267 | }
|
13268 |
|
13269 |
|
13270 | Hash.prototype.clear = hashClear;
|
13271 | Hash.prototype['delete'] = hashDelete;
|
13272 | Hash.prototype.get = hashGet;
|
13273 | Hash.prototype.has = hashHas;
|
13274 | Hash.prototype.set = hashSet;
|
13275 |
|
13276 | module.exports = Hash;
|
13277 |
|
13278 |
|
13279 | }),
|
13280 |
|
13281 | (function(module, exports, __webpack_require__) {
|
13282 |
|
13283 | var nativeCreate = __webpack_require__(32);
|
13284 |
|
13285 |
|
13286 |
|
13287 |
|
13288 |
|
13289 |
|
13290 |
|
13291 |
|
13292 | function hashClear() {
|
13293 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
13294 | this.size = 0;
|
13295 | }
|
13296 |
|
13297 | module.exports = hashClear;
|
13298 |
|
13299 |
|
13300 | }),
|
13301 |
|
13302 | (function(module, exports) {
|
13303 |
|
13304 |
|
13305 |
|
13306 |
|
13307 |
|
13308 |
|
13309 |
|
13310 |
|
13311 |
|
13312 |
|
13313 |
|
13314 | function hashDelete(key) {
|
13315 | var result = this.has(key) && delete this.__data__[key];
|
13316 | this.size -= result ? 1 : 0;
|
13317 | return result;
|
13318 | }
|
13319 |
|
13320 | module.exports = hashDelete;
|
13321 |
|
13322 |
|
13323 | }),
|
13324 |
|
13325 | (function(module, exports, __webpack_require__) {
|
13326 |
|
13327 | var nativeCreate = __webpack_require__(32);
|
13328 |
|
13329 |
|
13330 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
13331 |
|
13332 |
|
13333 | var objectProto = Object.prototype;
|
13334 |
|
13335 |
|
13336 | var hasOwnProperty = objectProto.hasOwnProperty;
|
13337 |
|
13338 |
|
13339 |
|
13340 |
|
13341 |
|
13342 |
|
13343 |
|
13344 |
|
13345 |
|
13346 |
|
13347 | function hashGet(key) {
|
13348 | var data = this.__data__;
|
13349 | if (nativeCreate) {
|
13350 | var result = data[key];
|
13351 | return result === HASH_UNDEFINED ? undefined : result;
|
13352 | }
|
13353 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
13354 | }
|
13355 |
|
13356 | module.exports = hashGet;
|
13357 |
|
13358 |
|
13359 | }),
|
13360 |
|
13361 | (function(module, exports, __webpack_require__) {
|
13362 |
|
13363 | var nativeCreate = __webpack_require__(32);
|
13364 |
|
13365 |
|
13366 | var objectProto = Object.prototype;
|
13367 |
|
13368 |
|
13369 | var hasOwnProperty = objectProto.hasOwnProperty;
|
13370 |
|
13371 |
|
13372 |
|
13373 |
|
13374 |
|
13375 |
|
13376 |
|
13377 |
|
13378 |
|
13379 |
|
13380 | function hashHas(key) {
|
13381 | var data = this.__data__;
|
13382 | return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
13383 | }
|
13384 |
|
13385 | module.exports = hashHas;
|
13386 |
|
13387 |
|
13388 | }),
|
13389 |
|
13390 | (function(module, exports, __webpack_require__) {
|
13391 |
|
13392 | var nativeCreate = __webpack_require__(32);
|
13393 |
|
13394 |
|
13395 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
13396 |
|
13397 |
|
13398 |
|
13399 |
|
13400 |
|
13401 |
|
13402 |
|
13403 |
|
13404 |
|
13405 |
|
13406 |
|
13407 | function hashSet(key, value) {
|
13408 | var data = this.__data__;
|
13409 | this.size += this.has(key) ? 0 : 1;
|
13410 | data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
13411 | return this;
|
13412 | }
|
13413 |
|
13414 | module.exports = hashSet;
|
13415 |
|
13416 |
|
13417 | }),
|
13418 |
|
13419 | (function(module, exports, __webpack_require__) {
|
13420 |
|
13421 | var getMapData = __webpack_require__(33);
|
13422 |
|
13423 |
|
13424 |
|
13425 |
|
13426 |
|
13427 |
|
13428 |
|
13429 |
|
13430 |
|
13431 |
|
13432 | function mapCacheDelete(key) {
|
13433 | var result = getMapData(this, key)['delete'](key);
|
13434 | this.size -= result ? 1 : 0;
|
13435 | return result;
|
13436 | }
|
13437 |
|
13438 | module.exports = mapCacheDelete;
|
13439 |
|
13440 |
|
13441 | }),
|
13442 |
|
13443 | (function(module, exports) {
|
13444 |
|
13445 |
|
13446 |
|
13447 |
|
13448 |
|
13449 |
|
13450 |
|
13451 |
|
13452 | function isKeyable(value) {
|
13453 | var type = typeof value;
|
13454 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
13455 | ? (value !== '__proto__')
|
13456 | : (value === null);
|
13457 | }
|
13458 |
|
13459 | module.exports = isKeyable;
|
13460 |
|
13461 |
|
13462 | }),
|
13463 |
|
13464 | (function(module, exports, __webpack_require__) {
|
13465 |
|
13466 | var getMapData = __webpack_require__(33);
|
13467 |
|
13468 |
|
13469 |
|
13470 |
|
13471 |
|
13472 |
|
13473 |
|
13474 |
|
13475 |
|
13476 |
|
13477 | function mapCacheGet(key) {
|
13478 | return getMapData(this, key).get(key);
|
13479 | }
|
13480 |
|
13481 | module.exports = mapCacheGet;
|
13482 |
|
13483 |
|
13484 | }),
|
13485 |
|
13486 | (function(module, exports, __webpack_require__) {
|
13487 |
|
13488 | var getMapData = __webpack_require__(33);
|
13489 |
|
13490 |
|
13491 |
|
13492 |
|
13493 |
|
13494 |
|
13495 |
|
13496 |
|
13497 |
|
13498 |
|
13499 | function mapCacheHas(key) {
|
13500 | return getMapData(this, key).has(key);
|
13501 | }
|
13502 |
|
13503 | module.exports = mapCacheHas;
|
13504 |
|
13505 |
|
13506 | }),
|
13507 |
|
13508 | (function(module, exports, __webpack_require__) {
|
13509 |
|
13510 | var getMapData = __webpack_require__(33);
|
13511 |
|
13512 |
|
13513 |
|
13514 |
|
13515 |
|
13516 |
|
13517 |
|
13518 |
|
13519 |
|
13520 |
|
13521 |
|
13522 | function mapCacheSet(key, value) {
|
13523 | var data = getMapData(this, key),
|
13524 | size = data.size;
|
13525 |
|
13526 | data.set(key, value);
|
13527 | this.size += data.size == size ? 0 : 1;
|
13528 | return this;
|
13529 | }
|
13530 |
|
13531 | module.exports = mapCacheSet;
|
13532 |
|
13533 |
|
13534 | }),
|
13535 |
|
13536 | (function(module, exports, __webpack_require__) {
|
13537 |
|
13538 | var Stack = __webpack_require__(61),
|
13539 | equalArrays = __webpack_require__(64),
|
13540 | equalByTag = __webpack_require__(158),
|
13541 | equalObjects = __webpack_require__(162),
|
13542 | getTag = __webpack_require__(168),
|
13543 | isArray = __webpack_require__(16),
|
13544 | isBuffer = __webpack_require__(56),
|
13545 | isTypedArray = __webpack_require__(59);
|
13546 |
|
13547 |
|
13548 | var COMPARE_PARTIAL_FLAG = 1;
|
13549 |
|
13550 |
|
13551 | var argsTag = '[object Arguments]',
|
13552 | arrayTag = '[object Array]',
|
13553 | objectTag = '[object Object]';
|
13554 |
|
13555 |
|
13556 | var objectProto = Object.prototype;
|
13557 |
|
13558 |
|
13559 | var hasOwnProperty = objectProto.hasOwnProperty;
|
13560 |
|
13561 |
|
13562 |
|
13563 |
|
13564 |
|
13565 |
|
13566 |
|
13567 |
|
13568 |
|
13569 |
|
13570 |
|
13571 |
|
13572 |
|
13573 |
|
13574 |
|
13575 | function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
13576 | var objIsArr = isArray(object),
|
13577 | othIsArr = isArray(other),
|
13578 | objTag = objIsArr ? arrayTag : getTag(object),
|
13579 | othTag = othIsArr ? arrayTag : getTag(other);
|
13580 |
|
13581 | objTag = objTag == argsTag ? objectTag : objTag;
|
13582 | othTag = othTag == argsTag ? objectTag : othTag;
|
13583 |
|
13584 | var objIsObj = objTag == objectTag,
|
13585 | othIsObj = othTag == objectTag,
|
13586 | isSameTag = objTag == othTag;
|
13587 |
|
13588 | if (isSameTag && isBuffer(object)) {
|
13589 | if (!isBuffer(other)) {
|
13590 | return false;
|
13591 | }
|
13592 | objIsArr = true;
|
13593 | objIsObj = false;
|
13594 | }
|
13595 | if (isSameTag && !objIsObj) {
|
13596 | stack || (stack = new Stack);
|
13597 | return (objIsArr || isTypedArray(object))
|
13598 | ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
13599 | : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
13600 | }
|
13601 | if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
13602 | var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
13603 | othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
13604 |
|
13605 | if (objIsWrapped || othIsWrapped) {
|
13606 | var objUnwrapped = objIsWrapped ? object.value() : object,
|
13607 | othUnwrapped = othIsWrapped ? other.value() : other;
|
13608 |
|
13609 | stack || (stack = new Stack);
|
13610 | return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
13611 | }
|
13612 | }
|
13613 | if (!isSameTag) {
|
13614 | return false;
|
13615 | }
|
13616 | stack || (stack = new Stack);
|
13617 | return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
13618 | }
|
13619 |
|
13620 | module.exports = baseIsEqualDeep;
|
13621 |
|
13622 |
|
13623 | }),
|
13624 |
|
13625 | (function(module, exports, __webpack_require__) {
|
13626 |
|
13627 | var MapCache = __webpack_require__(43),
|
13628 | setCacheAdd = __webpack_require__(154),
|
13629 | setCacheHas = __webpack_require__(155);
|
13630 |
|
13631 |
|
13632 |
|
13633 |
|
13634 |
|
13635 |
|
13636 |
|
13637 |
|
13638 |
|
13639 | function SetCache(values) {
|
13640 | var index = -1,
|
13641 | length = values == null ? 0 : values.length;
|
13642 |
|
13643 | this.__data__ = new MapCache;
|
13644 | while (++index < length) {
|
13645 | this.add(values[index]);
|
13646 | }
|
13647 | }
|
13648 |
|
13649 |
|
13650 | SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
13651 | SetCache.prototype.has = setCacheHas;
|
13652 |
|
13653 | module.exports = SetCache;
|
13654 |
|
13655 |
|
13656 | }),
|
13657 |
|
13658 | (function(module, exports) {
|
13659 |
|
13660 |
|
13661 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
13662 |
|
13663 |
|
13664 |
|
13665 |
|
13666 |
|
13667 |
|
13668 |
|
13669 |
|
13670 |
|
13671 |
|
13672 |
|
13673 | function setCacheAdd(value) {
|
13674 | this.__data__.set(value, HASH_UNDEFINED);
|
13675 | return this;
|
13676 | }
|
13677 |
|
13678 | module.exports = setCacheAdd;
|
13679 |
|
13680 |
|
13681 | }),
|
13682 |
|
13683 | (function(module, exports) {
|
13684 |
|
13685 |
|
13686 |
|
13687 |
|
13688 |
|
13689 |
|
13690 |
|
13691 |
|
13692 |
|
13693 |
|
13694 | function setCacheHas(value) {
|
13695 | return this.__data__.has(value);
|
13696 | }
|
13697 |
|
13698 | module.exports = setCacheHas;
|
13699 |
|
13700 |
|
13701 | }),
|
13702 |
|
13703 | (function(module, exports) {
|
13704 |
|
13705 |
|
13706 |
|
13707 |
|
13708 |
|
13709 |
|
13710 |
|
13711 |
|
13712 |
|
13713 |
|
13714 |
|
13715 | function arraySome(array, predicate) {
|
13716 | var index = -1,
|
13717 | length = array == null ? 0 : array.length;
|
13718 |
|
13719 | while (++index < length) {
|
13720 | if (predicate(array[index], index, array)) {
|
13721 | return true;
|
13722 | }
|
13723 | }
|
13724 | return false;
|
13725 | }
|
13726 |
|
13727 | module.exports = arraySome;
|
13728 |
|
13729 |
|
13730 | }),
|
13731 |
|
13732 | (function(module, exports) {
|
13733 |
|
13734 |
|
13735 |
|
13736 |
|
13737 |
|
13738 |
|
13739 |
|
13740 |
|
13741 |
|
13742 | function cacheHas(cache, key) {
|
13743 | return cache.has(key);
|
13744 | }
|
13745 |
|
13746 | module.exports = cacheHas;
|
13747 |
|
13748 |
|
13749 | }),
|
13750 |
|
13751 | (function(module, exports, __webpack_require__) {
|
13752 |
|
13753 | var Symbol = __webpack_require__(24),
|
13754 | Uint8Array = __webpack_require__(159),
|
13755 | eq = __webpack_require__(62),
|
13756 | equalArrays = __webpack_require__(64),
|
13757 | mapToArray = __webpack_require__(160),
|
13758 | setToArray = __webpack_require__(161);
|
13759 |
|
13760 |
|
13761 | var COMPARE_PARTIAL_FLAG = 1,
|
13762 | COMPARE_UNORDERED_FLAG = 2;
|
13763 |
|
13764 |
|
13765 | var boolTag = '[object Boolean]',
|
13766 | dateTag = '[object Date]',
|
13767 | errorTag = '[object Error]',
|
13768 | mapTag = '[object Map]',
|
13769 | numberTag = '[object Number]',
|
13770 | regexpTag = '[object RegExp]',
|
13771 | setTag = '[object Set]',
|
13772 | stringTag = '[object String]',
|
13773 | symbolTag = '[object Symbol]';
|
13774 |
|
13775 | var arrayBufferTag = '[object ArrayBuffer]',
|
13776 | dataViewTag = '[object DataView]';
|
13777 |
|
13778 |
|
13779 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
13780 | symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
13781 |
|
13782 |
|
13783 |
|
13784 |
|
13785 |
|
13786 |
|
13787 |
|
13788 |
|
13789 |
|
13790 |
|
13791 |
|
13792 |
|
13793 |
|
13794 |
|
13795 |
|
13796 |
|
13797 |
|
13798 |
|
13799 | function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
13800 | switch (tag) {
|
13801 | case dataViewTag:
|
13802 | if ((object.byteLength != other.byteLength) ||
|
13803 | (object.byteOffset != other.byteOffset)) {
|
13804 | return false;
|
13805 | }
|
13806 | object = object.buffer;
|
13807 | other = other.buffer;
|
13808 |
|
13809 | case arrayBufferTag:
|
13810 | if ((object.byteLength != other.byteLength) ||
|
13811 | !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
13812 | return false;
|
13813 | }
|
13814 | return true;
|
13815 |
|
13816 | case boolTag:
|
13817 | case dateTag:
|
13818 | case numberTag:
|
13819 |
|
13820 |
|
13821 | return eq(+object, +other);
|
13822 |
|
13823 | case errorTag:
|
13824 | return object.name == other.name && object.message == other.message;
|
13825 |
|
13826 | case regexpTag:
|
13827 | case stringTag:
|
13828 |
|
13829 |
|
13830 |
|
13831 | return object == (other + '');
|
13832 |
|
13833 | case mapTag:
|
13834 | var convert = mapToArray;
|
13835 |
|
13836 | case setTag:
|
13837 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
13838 | convert || (convert = setToArray);
|
13839 |
|
13840 | if (object.size != other.size && !isPartial) {
|
13841 | return false;
|
13842 | }
|
13843 |
|
13844 | var stacked = stack.get(object);
|
13845 | if (stacked) {
|
13846 | return stacked == other;
|
13847 | }
|
13848 | bitmask |= COMPARE_UNORDERED_FLAG;
|
13849 |
|
13850 |
|
13851 | stack.set(object, other);
|
13852 | var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
13853 | stack['delete'](object);
|
13854 | return result;
|
13855 |
|
13856 | case symbolTag:
|
13857 | if (symbolValueOf) {
|
13858 | return symbolValueOf.call(object) == symbolValueOf.call(other);
|
13859 | }
|
13860 | }
|
13861 | return false;
|
13862 | }
|
13863 |
|
13864 | module.exports = equalByTag;
|
13865 |
|
13866 |
|
13867 | }),
|
13868 |
|
13869 | (function(module, exports, __webpack_require__) {
|
13870 |
|
13871 | var root = __webpack_require__(17);
|
13872 |
|
13873 |
|
13874 | var Uint8Array = root.Uint8Array;
|
13875 |
|
13876 | module.exports = Uint8Array;
|
13877 |
|
13878 |
|
13879 | }),
|
13880 |
|
13881 | (function(module, exports) {
|
13882 |
|
13883 |
|
13884 |
|
13885 |
|
13886 |
|
13887 |
|
13888 |
|
13889 |
|
13890 | function mapToArray(map) {
|
13891 | var index = -1,
|
13892 | result = Array(map.size);
|
13893 |
|
13894 | map.forEach(function(value, key) {
|
13895 | result[++index] = [key, value];
|
13896 | });
|
13897 | return result;
|
13898 | }
|
13899 |
|
13900 | module.exports = mapToArray;
|
13901 |
|
13902 |
|
13903 | }),
|
13904 |
|
13905 | (function(module, exports) {
|
13906 |
|
13907 |
|
13908 |
|
13909 |
|
13910 |
|
13911 |
|
13912 |
|
13913 |
|
13914 | function setToArray(set) {
|
13915 | var index = -1,
|
13916 | result = Array(set.size);
|
13917 |
|
13918 | set.forEach(function(value) {
|
13919 | result[++index] = value;
|
13920 | });
|
13921 | return result;
|
13922 | }
|
13923 |
|
13924 | module.exports = setToArray;
|
13925 |
|
13926 |
|
13927 | }),
|
13928 |
|
13929 | (function(module, exports, __webpack_require__) {
|
13930 |
|
13931 | var getAllKeys = __webpack_require__(163);
|
13932 |
|
13933 |
|
13934 | var COMPARE_PARTIAL_FLAG = 1;
|
13935 |
|
13936 |
|
13937 | var objectProto = Object.prototype;
|
13938 |
|
13939 |
|
13940 | var hasOwnProperty = objectProto.hasOwnProperty;
|
13941 |
|
13942 |
|
13943 |
|
13944 |
|
13945 |
|
13946 |
|
13947 |
|
13948 |
|
13949 |
|
13950 |
|
13951 |
|
13952 |
|
13953 |
|
13954 |
|
13955 | function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
13956 | var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
13957 | objProps = getAllKeys(object),
|
13958 | objLength = objProps.length,
|
13959 | othProps = getAllKeys(other),
|
13960 | othLength = othProps.length;
|
13961 |
|
13962 | if (objLength != othLength && !isPartial) {
|
13963 | return false;
|
13964 | }
|
13965 | var index = objLength;
|
13966 | while (index--) {
|
13967 | var key = objProps[index];
|
13968 | if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
13969 | return false;
|
13970 | }
|
13971 | }
|
13972 |
|
13973 | var stacked = stack.get(object);
|
13974 | if (stacked && stack.get(other)) {
|
13975 | return stacked == other;
|
13976 | }
|
13977 | var result = true;
|
13978 | stack.set(object, other);
|
13979 | stack.set(other, object);
|
13980 |
|
13981 | var skipCtor = isPartial;
|
13982 | while (++index < objLength) {
|
13983 | key = objProps[index];
|
13984 | var objValue = object[key],
|
13985 | othValue = other[key];
|
13986 |
|
13987 | if (customizer) {
|
13988 | var compared = isPartial
|
13989 | ? customizer(othValue, objValue, key, other, object, stack)
|
13990 | : customizer(objValue, othValue, key, object, other, stack);
|
13991 | }
|
13992 |
|
13993 | if (!(compared === undefined
|
13994 | ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
13995 | : compared
|
13996 | )) {
|
13997 | result = false;
|
13998 | break;
|
13999 | }
|
14000 | skipCtor || (skipCtor = key == 'constructor');
|
14001 | }
|
14002 | if (result && !skipCtor) {
|
14003 | var objCtor = object.constructor,
|
14004 | othCtor = other.constructor;
|
14005 |
|
14006 |
|
14007 | if (objCtor != othCtor &&
|
14008 | ('constructor' in object && 'constructor' in other) &&
|
14009 | !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
14010 | typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
14011 | result = false;
|
14012 | }
|
14013 | }
|
14014 | stack['delete'](object);
|
14015 | stack['delete'](other);
|
14016 | return result;
|
14017 | }
|
14018 |
|
14019 | module.exports = equalObjects;
|
14020 |
|
14021 |
|
14022 | }),
|
14023 |
|
14024 | (function(module, exports, __webpack_require__) {
|
14025 |
|
14026 | var baseGetAllKeys = __webpack_require__(164),
|
14027 | getSymbols = __webpack_require__(165),
|
14028 | keys = __webpack_require__(40);
|
14029 |
|
14030 |
|
14031 |
|
14032 |
|
14033 |
|
14034 |
|
14035 |
|
14036 |
|
14037 | function getAllKeys(object) {
|
14038 | return baseGetAllKeys(object, keys, getSymbols);
|
14039 | }
|
14040 |
|
14041 | module.exports = getAllKeys;
|
14042 |
|
14043 |
|
14044 | }),
|
14045 |
|
14046 | (function(module, exports, __webpack_require__) {
|
14047 |
|
14048 | var arrayPush = __webpack_require__(51),
|
14049 | isArray = __webpack_require__(16);
|
14050 |
|
14051 |
|
14052 |
|
14053 |
|
14054 |
|
14055 |
|
14056 |
|
14057 |
|
14058 |
|
14059 |
|
14060 |
|
14061 |
|
14062 | function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
14063 | var result = keysFunc(object);
|
14064 | return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
14065 | }
|
14066 |
|
14067 | module.exports = baseGetAllKeys;
|
14068 |
|
14069 |
|
14070 | }),
|
14071 |
|
14072 | (function(module, exports, __webpack_require__) {
|
14073 |
|
14074 | var arrayFilter = __webpack_require__(166),
|
14075 | stubArray = __webpack_require__(167);
|
14076 |
|
14077 |
|
14078 | var objectProto = Object.prototype;
|
14079 |
|
14080 |
|
14081 | var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
14082 |
|
14083 |
|
14084 | var nativeGetSymbols = Object.getOwnPropertySymbols;
|
14085 |
|
14086 |
|
14087 |
|
14088 |
|
14089 |
|
14090 |
|
14091 |
|
14092 |
|
14093 | var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
14094 | if (object == null) {
|
14095 | return [];
|
14096 | }
|
14097 | object = Object(object);
|
14098 | return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
14099 | return propertyIsEnumerable.call(object, symbol);
|
14100 | });
|
14101 | };
|
14102 |
|
14103 | module.exports = getSymbols;
|
14104 |
|
14105 |
|
14106 | }),
|
14107 |
|
14108 | (function(module, exports) {
|
14109 |
|
14110 |
|
14111 |
|
14112 |
|
14113 |
|
14114 |
|
14115 |
|
14116 |
|
14117 |
|
14118 |
|
14119 | function arrayFilter(array, predicate) {
|
14120 | var index = -1,
|
14121 | length = array == null ? 0 : array.length,
|
14122 | resIndex = 0,
|
14123 | result = [];
|
14124 |
|
14125 | while (++index < length) {
|
14126 | var value = array[index];
|
14127 | if (predicate(value, index, array)) {
|
14128 | result[resIndex++] = value;
|
14129 | }
|
14130 | }
|
14131 | return result;
|
14132 | }
|
14133 |
|
14134 | module.exports = arrayFilter;
|
14135 |
|
14136 |
|
14137 | }),
|
14138 |
|
14139 | (function(module, exports) {
|
14140 |
|
14141 |
|
14142 |
|
14143 |
|
14144 |
|
14145 |
|
14146 |
|
14147 |
|
14148 |
|
14149 |
|
14150 |
|
14151 |
|
14152 |
|
14153 |
|
14154 |
|
14155 |
|
14156 |
|
14157 |
|
14158 |
|
14159 | function stubArray() {
|
14160 | return [];
|
14161 | }
|
14162 |
|
14163 | module.exports = stubArray;
|
14164 |
|
14165 |
|
14166 | }),
|
14167 |
|
14168 | (function(module, exports, __webpack_require__) {
|
14169 |
|
14170 | var DataView = __webpack_require__(169),
|
14171 | Map = __webpack_require__(42),
|
14172 | Promise = __webpack_require__(170),
|
14173 | Set = __webpack_require__(171),
|
14174 | WeakMap = __webpack_require__(172),
|
14175 | baseGetTag = __webpack_require__(25),
|
14176 | toSource = __webpack_require__(55);
|
14177 |
|
14178 |
|
14179 | var mapTag = '[object Map]',
|
14180 | objectTag = '[object Object]',
|
14181 | promiseTag = '[object Promise]',
|
14182 | setTag = '[object Set]',
|
14183 | weakMapTag = '[object WeakMap]';
|
14184 |
|
14185 | var dataViewTag = '[object DataView]';
|
14186 |
|
14187 |
|
14188 | var dataViewCtorString = toSource(DataView),
|
14189 | mapCtorString = toSource(Map),
|
14190 | promiseCtorString = toSource(Promise),
|
14191 | setCtorString = toSource(Set),
|
14192 | weakMapCtorString = toSource(WeakMap);
|
14193 |
|
14194 |
|
14195 |
|
14196 |
|
14197 |
|
14198 |
|
14199 |
|
14200 |
|
14201 | var getTag = baseGetTag;
|
14202 |
|
14203 |
|
14204 | if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
14205 | (Map && getTag(new Map) != mapTag) ||
|
14206 | (Promise && getTag(Promise.resolve()) != promiseTag) ||
|
14207 | (Set && getTag(new Set) != setTag) ||
|
14208 | (WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
14209 | getTag = function(value) {
|
14210 | var result = baseGetTag(value),
|
14211 | Ctor = result == objectTag ? value.constructor : undefined,
|
14212 | ctorString = Ctor ? toSource(Ctor) : '';
|
14213 |
|
14214 | if (ctorString) {
|
14215 | switch (ctorString) {
|
14216 | case dataViewCtorString: return dataViewTag;
|
14217 | case mapCtorString: return mapTag;
|
14218 | case promiseCtorString: return promiseTag;
|
14219 | case setCtorString: return setTag;
|
14220 | case weakMapCtorString: return weakMapTag;
|
14221 | }
|
14222 | }
|
14223 | return result;
|
14224 | };
|
14225 | }
|
14226 |
|
14227 | module.exports = getTag;
|
14228 |
|
14229 |
|
14230 | }),
|
14231 |
|
14232 | (function(module, exports, __webpack_require__) {
|
14233 |
|
14234 | var getNative = __webpack_require__(22),
|
14235 | root = __webpack_require__(17);
|
14236 |
|
14237 |
|
14238 | var DataView = getNative(root, 'DataView');
|
14239 |
|
14240 | module.exports = DataView;
|
14241 |
|
14242 |
|
14243 | }),
|
14244 |
|
14245 | (function(module, exports, __webpack_require__) {
|
14246 |
|
14247 | var getNative = __webpack_require__(22),
|
14248 | root = __webpack_require__(17);
|
14249 |
|
14250 |
|
14251 | var Promise = getNative(root, 'Promise');
|
14252 |
|
14253 | module.exports = Promise;
|
14254 |
|
14255 |
|
14256 | }),
|
14257 |
|
14258 | (function(module, exports, __webpack_require__) {
|
14259 |
|
14260 | var getNative = __webpack_require__(22),
|
14261 | root = __webpack_require__(17);
|
14262 |
|
14263 |
|
14264 | var Set = getNative(root, 'Set');
|
14265 |
|
14266 | module.exports = Set;
|
14267 |
|
14268 |
|
14269 | }),
|
14270 |
|
14271 | (function(module, exports, __webpack_require__) {
|
14272 |
|
14273 | var getNative = __webpack_require__(22),
|
14274 | root = __webpack_require__(17);
|
14275 |
|
14276 |
|
14277 | var WeakMap = getNative(root, 'WeakMap');
|
14278 |
|
14279 | module.exports = WeakMap;
|
14280 |
|
14281 |
|
14282 | }),
|
14283 |
|
14284 | (function(module, exports, __webpack_require__) {
|
14285 |
|
14286 | var isStrictComparable = __webpack_require__(65),
|
14287 | keys = __webpack_require__(40);
|
14288 |
|
14289 |
|
14290 |
|
14291 |
|
14292 |
|
14293 |
|
14294 |
|
14295 |
|
14296 | function getMatchData(object) {
|
14297 | var result = keys(object),
|
14298 | length = result.length;
|
14299 |
|
14300 | while (length--) {
|
14301 | var key = result[length],
|
14302 | value = object[key];
|
14303 |
|
14304 | result[length] = [key, value, isStrictComparable(value)];
|
14305 | }
|
14306 | return result;
|
14307 | }
|
14308 |
|
14309 | module.exports = getMatchData;
|
14310 |
|
14311 |
|
14312 | }),
|
14313 |
|
14314 | (function(module, exports, __webpack_require__) {
|
14315 |
|
14316 | var baseIsEqual = __webpack_require__(63),
|
14317 | get = __webpack_require__(175),
|
14318 | hasIn = __webpack_require__(182),
|
14319 | isKey = __webpack_require__(44),
|
14320 | isStrictComparable = __webpack_require__(65),
|
14321 | matchesStrictComparable = __webpack_require__(66),
|
14322 | toKey = __webpack_require__(34);
|
14323 |
|
14324 | /** Used to compose bitmasks for value comparisons. */
|
14325 | var COMPARE_PARTIAL_FLAG = 1,
|
14326 | COMPARE_UNORDERED_FLAG = 2;
|
14327 |
|
14328 | /**
|
14329 | * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
14330 | *
|
14331 | * @private
|
14332 | * @param {string} path The path of the property to get.
|
14333 | * @param {*} srcValue The value to match.
|
14334 | * @returns {Function} Returns the new spec function.
|
14335 | */
|
14336 | function baseMatchesProperty(path, srcValue) {
|
14337 | if (isKey(path) && isStrictComparable(srcValue)) {
|
14338 | return matchesStrictComparable(toKey(path), srcValue);
|
14339 | }
|
14340 | return function(object) {
|
14341 | var objValue = get(object, path);
|
14342 | return (objValue === undefined && objValue === srcValue)
|
14343 | ? hasIn(object, path)
|
14344 | : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
14345 | };
|
14346 | }
|
14347 |
|
14348 | module.exports = baseMatchesProperty;
|
14349 |
|
14350 |
|
14351 | /***/ }),
|
14352 | /* 175 */
|
14353 | /***/ (function(module, exports, __webpack_require__) {
|
14354 |
|
14355 | var baseGet = __webpack_require__(67);
|
14356 |
|
14357 |
|
14358 |
|
14359 |
|
14360 |
|
14361 |
|
14362 |
|
14363 |
|
14364 |
|
14365 |
|
14366 |
|
14367 |
|
14368 |
|
14369 |
|
14370 |
|
14371 |
|
14372 |
|
14373 |
|
14374 |
|
14375 |
|
14376 |
|
14377 |
|
14378 |
|
14379 |
|
14380 |
|
14381 |
|
14382 | function get(object, path, defaultValue) {
|
14383 | var result = object == null ? undefined : baseGet(object, path);
|
14384 | return result === undefined ? defaultValue : result;
|
14385 | }
|
14386 |
|
14387 | module.exports = get;
|
14388 |
|
14389 |
|
14390 | /***/ }),
|
14391 | /* 176 */
|
14392 | /***/ (function(module, exports, __webpack_require__) {
|
14393 |
|
14394 | var memoizeCapped = __webpack_require__(177);
|
14395 |
|
14396 |
|
14397 | var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
14398 |
|
14399 |
|
14400 | var reEscapeChar = /\\(\\)?/g;
|
14401 |
|
14402 |
|
14403 |
|
14404 |
|
14405 |
|
14406 |
|
14407 |
|
14408 |
|
14409 | var stringToPath = memoizeCapped(function(string) {
|
14410 | var result = [];
|
14411 | if (string.charCodeAt(0) === 46 ) {
|
14412 | result.push('');
|
14413 | }
|
14414 | string.replace(rePropName, function(match, number, quote, subString) {
|
14415 | result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
14416 | });
|
14417 | return result;
|
14418 | });
|
14419 |
|
14420 | module.exports = stringToPath;
|
14421 |
|
14422 |
|
14423 | }),
|
14424 |
|
14425 | (function(module, exports, __webpack_require__) {
|
14426 |
|
14427 | var memoize = __webpack_require__(178);
|
14428 |
|
14429 |
|
14430 | var MAX_MEMOIZE_SIZE = 500;
|
14431 |
|
14432 |
|
14433 |
|
14434 |
|
14435 |
|
14436 |
|
14437 |
|
14438 |
|
14439 |
|
14440 | function memoizeCapped(func) {
|
14441 | var result = memoize(func, function(key) {
|
14442 | if (cache.size === MAX_MEMOIZE_SIZE) {
|
14443 | cache.clear();
|
14444 | }
|
14445 | return key;
|
14446 | });
|
14447 |
|
14448 | var cache = result.cache;
|
14449 | return result;
|
14450 | }
|
14451 |
|
14452 | module.exports = memoizeCapped;
|
14453 |
|
14454 |
|
14455 | }),
|
14456 |
|
14457 | (function(module, exports, __webpack_require__) {
|
14458 |
|
14459 | var MapCache = __webpack_require__(43);
|
14460 |
|
14461 |
|
14462 | var FUNC_ERROR_TEXT = 'Expected a function';
|
14463 |
|
14464 |
|
14465 |
|
14466 |
|
14467 |
|
14468 |
|
14469 |
|
14470 |
|
14471 |
|
14472 |
|
14473 |
|
14474 |
|
14475 |
|
14476 |
|
14477 |
|
14478 |
|
14479 |
|
14480 |
|
14481 |
|
14482 |
|
14483 |
|
14484 |
|
14485 |
|
14486 |
|
14487 |
|
14488 |
|
14489 |
|
14490 |
|
14491 |
|
14492 |
|
14493 |
|
14494 |
|
14495 |
|
14496 |
|
14497 |
|
14498 |
|
14499 |
|
14500 |
|
14501 |
|
14502 |
|
14503 |
|
14504 |
|
14505 |
|
14506 |
|
14507 |
|
14508 | function memoize(func, resolver) {
|
14509 | if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
14510 | throw new TypeError(FUNC_ERROR_TEXT);
|
14511 | }
|
14512 | var memoized = function() {
|
14513 | var args = arguments,
|
14514 | key = resolver ? resolver.apply(this, args) : args[0],
|
14515 | cache = memoized.cache;
|
14516 |
|
14517 | if (cache.has(key)) {
|
14518 | return cache.get(key);
|
14519 | }
|
14520 | var result = func.apply(this, args);
|
14521 | memoized.cache = cache.set(key, result) || cache;
|
14522 | return result;
|
14523 | };
|
14524 | memoized.cache = new (memoize.Cache || MapCache);
|
14525 | return memoized;
|
14526 | }
|
14527 |
|
14528 |
|
14529 | memoize.Cache = MapCache;
|
14530 |
|
14531 | module.exports = memoize;
|
14532 |
|
14533 |
|
14534 | }),
|
14535 |
|
14536 | (function(module, exports, __webpack_require__) {
|
14537 |
|
14538 | var baseToString = __webpack_require__(180);
|
14539 |
|
14540 |
|
14541 |
|
14542 |
|
14543 |
|
14544 |
|
14545 |
|
14546 |
|
14547 |
|
14548 |
|
14549 |
|
14550 |
|
14551 |
|
14552 |
|
14553 |
|
14554 |
|
14555 |
|
14556 |
|
14557 |
|
14558 |
|
14559 |
|
14560 |
|
14561 | function toString(value) {
|
14562 | return value == null ? '' : baseToString(value);
|
14563 | }
|
14564 |
|
14565 | module.exports = toString;
|
14566 |
|
14567 |
|
14568 | }),
|
14569 |
|
14570 | (function(module, exports, __webpack_require__) {
|
14571 |
|
14572 | var Symbol = __webpack_require__(24),
|
14573 | arrayMap = __webpack_require__(181),
|
14574 | isArray = __webpack_require__(16),
|
14575 | isSymbol = __webpack_require__(45);
|
14576 |
|
14577 |
|
14578 | var INFINITY = 1 / 0;
|
14579 |
|
14580 |
|
14581 | var symbolProto = Symbol ? Symbol.prototype : undefined,
|
14582 | symbolToString = symbolProto ? symbolProto.toString : undefined;
|
14583 |
|
14584 |
|
14585 |
|
14586 |
|
14587 |
|
14588 |
|
14589 |
|
14590 |
|
14591 |
|
14592 | function baseToString(value) {
|
14593 |
|
14594 | if (typeof value == 'string') {
|
14595 | return value;
|
14596 | }
|
14597 | if (isArray(value)) {
|
14598 |
|
14599 | return arrayMap(value, baseToString) + '';
|
14600 | }
|
14601 | if (isSymbol(value)) {
|
14602 | return symbolToString ? symbolToString.call(value) : '';
|
14603 | }
|
14604 | var result = (value + '');
|
14605 | return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
14606 | }
|
14607 |
|
14608 | module.exports = baseToString;
|
14609 |
|
14610 |
|
14611 | }),
|
14612 |
|
14613 | (function(module, exports) {
|
14614 |
|
14615 |
|
14616 |
|
14617 |
|
14618 |
|
14619 |
|
14620 |
|
14621 |
|
14622 |
|
14623 |
|
14624 | function arrayMap(array, iteratee) {
|
14625 | var index = -1,
|
14626 | length = array == null ? 0 : array.length,
|
14627 | result = Array(length);
|
14628 |
|
14629 | while (++index < length) {
|
14630 | result[index] = iteratee(array[index], index, array);
|
14631 | }
|
14632 | return result;
|
14633 | }
|
14634 |
|
14635 | module.exports = arrayMap;
|
14636 |
|
14637 |
|
14638 | }),
|
14639 |
|
14640 | (function(module, exports, __webpack_require__) {
|
14641 |
|
14642 | var baseHasIn = __webpack_require__(183),
|
14643 | hasPath = __webpack_require__(184);
|
14644 |
|
14645 |
|
14646 |
|
14647 |
|
14648 |
|
14649 |
|
14650 |
|
14651 |
|
14652 |
|
14653 |
|
14654 |
|
14655 |
|
14656 |
|
14657 |
|
14658 |
|
14659 |
|
14660 |
|
14661 |
|
14662 |
|
14663 |
|
14664 |
|
14665 |
|
14666 |
|
14667 |
|
14668 |
|
14669 |
|
14670 |
|
14671 | function hasIn(object, path) {
|
14672 | return object != null && hasPath(object, path, baseHasIn);
|
14673 | }
|
14674 |
|
14675 | module.exports = hasIn;
|
14676 |
|
14677 |
|
14678 | }),
|
14679 |
|
14680 | (function(module, exports) {
|
14681 |
|
14682 |
|
14683 |
|
14684 |
|
14685 |
|
14686 |
|
14687 |
|
14688 |
|
14689 |
|
14690 | function baseHasIn(object, key) {
|
14691 | return object != null && key in Object(object);
|
14692 | }
|
14693 |
|
14694 | module.exports = baseHasIn;
|
14695 |
|
14696 |
|
14697 | }),
|
14698 |
|
14699 | (function(module, exports, __webpack_require__) {
|
14700 |
|
14701 | var castPath = __webpack_require__(68),
|
14702 | isArguments = __webpack_require__(38),
|
14703 | isArray = __webpack_require__(16),
|
14704 | isIndex = __webpack_require__(58),
|
14705 | isLength = __webpack_require__(41),
|
14706 | toKey = __webpack_require__(34);
|
14707 |
|
14708 |
|
14709 |
|
14710 |
|
14711 |
|
14712 |
|
14713 |
|
14714 |
|
14715 |
|
14716 |
|
14717 | function hasPath(object, path, hasFunc) {
|
14718 | path = castPath(path, object);
|
14719 |
|
14720 | var index = -1,
|
14721 | length = path.length,
|
14722 | result = false;
|
14723 |
|
14724 | while (++index < length) {
|
14725 | var key = toKey(path[index]);
|
14726 | if (!(result = object != null && hasFunc(object, key))) {
|
14727 | break;
|
14728 | }
|
14729 | object = object[key];
|
14730 | }
|
14731 | if (result || ++index != length) {
|
14732 | return result;
|
14733 | }
|
14734 | length = object == null ? 0 : object.length;
|
14735 | return !!length && isLength(length) && isIndex(key, length) &&
|
14736 | (isArray(object) || isArguments(object));
|
14737 | }
|
14738 |
|
14739 | module.exports = hasPath;
|
14740 |
|
14741 |
|
14742 | }),
|
14743 |
|
14744 | (function(module, exports) {
|
14745 |
|
14746 |
|
14747 |
|
14748 |
|
14749 |
|
14750 |
|
14751 |
|
14752 |
|
14753 |
|
14754 |
|
14755 |
|
14756 |
|
14757 |
|
14758 |
|
14759 |
|
14760 |
|
14761 |
|
14762 | function identity(value) {
|
14763 | return value;
|
14764 | }
|
14765 |
|
14766 | module.exports = identity;
|
14767 |
|
14768 |
|
14769 | }),
|
14770 |
|
14771 | (function(module, exports, __webpack_require__) {
|
14772 |
|
14773 | var baseProperty = __webpack_require__(187),
|
14774 | basePropertyDeep = __webpack_require__(188),
|
14775 | isKey = __webpack_require__(44),
|
14776 | toKey = __webpack_require__(34);
|
14777 |
|
14778 |
|
14779 |
|
14780 |
|
14781 |
|
14782 |
|
14783 |
|
14784 |
|
14785 |
|
14786 |
|
14787 |
|
14788 |
|
14789 |
|
14790 |
|
14791 |
|
14792 |
|
14793 |
|
14794 |
|
14795 |
|
14796 |
|
14797 |
|
14798 |
|
14799 |
|
14800 | function property(path) {
|
14801 | return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
14802 | }
|
14803 |
|
14804 | module.exports = property;
|
14805 |
|
14806 |
|
14807 | }),
|
14808 |
|
14809 | (function(module, exports) {
|
14810 |
|
14811 |
|
14812 |
|
14813 |
|
14814 |
|
14815 |
|
14816 |
|
14817 |
|
14818 | function baseProperty(key) {
|
14819 | return function(object) {
|
14820 | return object == null ? undefined : object[key];
|
14821 | };
|
14822 | }
|
14823 |
|
14824 | module.exports = baseProperty;
|
14825 |
|
14826 |
|
14827 | }),
|
14828 |
|
14829 | (function(module, exports, __webpack_require__) {
|
14830 |
|
14831 | var baseGet = __webpack_require__(67);
|
14832 |
|
14833 |
|
14834 |
|
14835 |
|
14836 |
|
14837 |
|
14838 |
|
14839 |
|
14840 | function basePropertyDeep(path) {
|
14841 | return function(object) {
|
14842 | return baseGet(object, path);
|
14843 | };
|
14844 | }
|
14845 |
|
14846 | module.exports = basePropertyDeep;
|
14847 |
|
14848 |
|
14849 | }),
|
14850 |
|
14851 | (function(module, __webpack_exports__, __webpack_require__) {
|
14852 |
|
14853 | "use strict";
|
14854 | __webpack_require__.r(__webpack_exports__);
|
14855 |
|
14856 |
|
14857 |
|
14858 |
|
14859 |
|
14860 |
|
14861 |
|
14862 | var getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
14863 | var rnds8 = new Uint8Array(16);
|
14864 | function rng() {
|
14865 | if (!getRandomValues) {
|
14866 | throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
14867 | }
|
14868 |
|
14869 | return getRandomValues(rnds8);
|
14870 | }
|
14871 |
|
14872 |
|
14873 |
|
14874 |
|
14875 |
|
14876 | var byteToHex = [];
|
14877 |
|
14878 | for (var bytesToUuid_i = 0; bytesToUuid_i < 256; ++bytesToUuid_i) {
|
14879 | byteToHex.push((bytesToUuid_i + 0x100).toString(16).substr(1));
|
14880 | }
|
14881 |
|
14882 | function bytesToUuid(buf, offset_) {
|
14883 | var offset = offset_ || 0;
|
14884 |
|
14885 |
|
14886 | return (byteToHex[buf[offset + 0]] + byteToHex[buf[offset + 1]] + byteToHex[buf[offset + 2]] + byteToHex[buf[offset + 3]] + '-' + byteToHex[buf[offset + 4]] + byteToHex[buf[offset + 5]] + '-' + byteToHex[buf[offset + 6]] + byteToHex[buf[offset + 7]] + '-' + byteToHex[buf[offset + 8]] + byteToHex[buf[offset + 9]] + '-' + byteToHex[buf[offset + 10]] + byteToHex[buf[offset + 11]] + byteToHex[buf[offset + 12]] + byteToHex[buf[offset + 13]] + byteToHex[buf[offset + 14]] + byteToHex[buf[offset + 15]]).toLowerCase();
|
14887 | }
|
14888 |
|
14889 | var esm_browser_bytesToUuid = (bytesToUuid);
|
14890 |
|
14891 |
|
14892 |
|
14893 |
|
14894 | function v4(options, buf, offset) {
|
14895 | options = options || {};
|
14896 | var rnds = options.random || (options.rng || rng)();
|
14897 |
|
14898 | rnds[6] = rnds[6] & 0x0f | 0x40;
|
14899 | rnds[8] = rnds[8] & 0x3f | 0x80;
|
14900 |
|
14901 | if (buf) {
|
14902 | offset = offset || 0;
|
14903 |
|
14904 | for (var i = 0; i < 16; ++i) {
|
14905 | buf[offset + i] = rnds[i];
|
14906 | }
|
14907 |
|
14908 | return buf;
|
14909 | }
|
14910 |
|
14911 | return esm_browser_bytesToUuid(rnds);
|
14912 | }
|
14913 |
|
14914 | var esm_browser_v4 = (v4);
|
14915 |
|
14916 |
|
14917 | var ActionTypes = {
|
14918 | ADD_COMPANION_WINDOW: 'mirador/ADD_COMPANION_WINDOW',
|
14919 | UPDATE_COMPANION_WINDOW: 'mirador/UPDATE_COMPANION_WINDOW',
|
14920 | REMOVE_COMPANION_WINDOW: 'mirador/REMOVE_COMPANION_WINDOW',
|
14921 | TOGGLE_TOC_NODE: 'mirador/TOGGLE_TOC_NODE',
|
14922 | UPDATE_WINDOW: 'mirador/UPDATE_WINDOW',
|
14923 | HOVER_ANNOTATION: 'mirador/HOVER_ANNOTATION',
|
14924 | REQUEST_ANNOTATION: 'mirador/REQUEST_ANNOTATION',
|
14925 | RECEIVE_ANNOTATION: 'mirador/RECEIVE_ANNOTATION',
|
14926 | RECEIVE_ANNOTATION_FAILURE: 'mirador/RECEIVE_ANNOTATION_FAILURE',
|
14927 | DESELECT_ANNOTATION: 'mirador/DESELECT_ANNOTATION',
|
14928 | SELECT_ANNOTATION: 'mirador/SELECT_ANNOTATION',
|
14929 | TOGGLE_ANNOTATION_DISPLAY: 'mirador/TOGGLE_ANNOTATION_DISPLAY',
|
14930 | FOCUS_WINDOW: 'mirador/FOCUS_WINDOW',
|
14931 | SET_WORKSPACE_FULLSCREEN: 'mirador/SET_WORKSPACE_FULLSCREEN',
|
14932 | SET_WORKSPACE_VIEWPORT_POSITION: 'mirador/SET_WORKSPACE_VIEWPORT_POSITION',
|
14933 | TOGGLE_WORKSPACE_EXPOSE_MODE: 'mirador/TOGGLE_WORKSPACE_EXPOSE_MODE',
|
14934 | ADD_MANIFEST: 'mirador/ADD_MANIFEST',
|
14935 | ADD_WINDOW: 'mirador/ADD_WINDOW',
|
14936 | ADD_ERROR: 'mirador/ADD_ERROR',
|
14937 | IMPORT_CONFIG: 'mirador/IMPORT_CONFIG',
|
14938 | IMPORT_MIRADOR_STATE: 'mirador/IMPORT_MIRADOR_STATE',
|
14939 | SET_CANVAS: 'mirador/SET_CANVAS',
|
14940 | MAXIMIZE_WINDOW: 'mirador/MAXIMIZE_WINDOW',
|
14941 | MINIMIZE_WINDOW: 'mirador/MINIMIZE_WINDOW',
|
14942 | UPDATE_WINDOW_POSITION: 'mirador/UPDATE_WINDOW_POSITION',
|
14943 | SET_WINDOW_SIZE: 'mirador/SET_WINDOW_SIZE',
|
14944 | REMOVE_WINDOW: 'mirador/REMOVE_WINDOW',
|
14945 | PICK_WINDOWING_SYSTEM: 'mirador/PICK_WINDOWING_SYSTEM',
|
14946 | REQUEST_MANIFEST: 'mirador/REQUEST_MANIFEST',
|
14947 | RECEIVE_MANIFEST: 'mirador/RECEIVE_MANIFEST',
|
14948 | RECEIVE_MANIFEST_FAILURE: 'mirador/RECEIVE_MANIFEST_FAILURE',
|
14949 | REMOVE_ERROR: 'mirador/REMOVE_ERROR',
|
14950 | SET_CONFIG: 'mirador/SET_CONFIG',
|
14951 | UPDATE_WORKSPACE: 'mirador/UPDATE_WORKSPACE',
|
14952 | SET_WINDOW_THUMBNAIL_POSITION: 'mirador/SET_WINDOW_THUMBNAIL_POSITION',
|
14953 | SET_WINDOW_VIEW_TYPE: 'mirador/SET_WINDOW_VIEW_TYPE',
|
14954 | SET_WORKSPACE_ADD_VISIBILITY: 'mirador/SET_WORKSPACE_ADD_VISIBILITY',
|
14955 | TOGGLE_WINDOW_SIDE_BAR: 'mirador/TOGGLE_WINDOW_SIDE_BAR',
|
14956 | TOGGLE_DRAGGING: 'mirador/TOGGLE_DRAGGING',
|
14957 | SET_WINDOW_SIDE_BAR_PANEL: 'mirador/SET_WINDOW_SIDE_BAR_PANEL',
|
14958 | TOGGLE_ZOOM_CONTROLS: 'mirador/TOGGLE_ZOOM_CONTROLS',
|
14959 | UPDATE_CONFIG: 'mirador/UPDATE_CONFIG',
|
14960 | REMOVE_MANIFEST: 'mirador/REMOVE_MANIFEST',
|
14961 | REQUEST_INFO_RESPONSE: 'mirador/REQUEST_INFO_RESPONSE',
|
14962 | RECEIVE_INFO_RESPONSE: 'mirador/RECEIVE_INFO_RESPONSE',
|
14963 | RECEIVE_DEGRADED_INFO_RESPONSE: 'mirador/RECEIVE_DEGRADED_INFO_RESPONSE',
|
14964 | RECEIVE_INFO_RESPONSE_FAILURE: 'mirador/RECEIVE_INFO_RESPONSE_FAILURE',
|
14965 | REMOVE_INFO_RESPONSE: 'mirador/REMOVE_INFO_RESPONSE',
|
14966 | UPDATE_WORKSPACE_MOSAIC_LAYOUT: 'mirador/UPDATE_WORKSPACE_MOSAIC_LAYOUT',
|
14967 | UPDATE_VIEWPORT: 'mirador/UPDATE_VIEWPORT',
|
14968 | UPDATE_ELASTIC_WINDOW_LAYOUT: 'mirador/UPDATE_ELASTIC_WINDOW_LAYOUT',
|
14969 | ADD_AUTHENTICATION_REQUEST: 'mirador/ADD_AUTHENTICATION_REQUEST',
|
14970 | RESOLVE_AUTHENTICATION_REQUEST: 'mirador/RESOLVE_AUTHENTICATION_REQUEST',
|
14971 | REQUEST_ACCESS_TOKEN: 'mirador/REQUEST_ACCESS_TOKEN',
|
14972 | RECEIVE_ACCESS_TOKEN: 'mirador/RECEIVE_ACCESS_TOKEN',
|
14973 | RECEIVE_ACCESS_TOKEN_FAILURE: 'mirador/RECEIVE_ACCESS_TOKEN_FAILURE',
|
14974 | RESET_AUTHENTICATION_STATE: 'mirador/RESET_AUTHENTICATION_STATE',
|
14975 | CLEAR_ACCESS_TOKEN_QUEUE: 'mirador/CLEAR_ACCESS_TOKEN_QUEUE',
|
14976 | REQUEST_SEARCH: 'mirador/REQUEST_SEARCH',
|
14977 | RECEIVE_SEARCH: 'mirador/RECEIVE_SEARCH',
|
14978 | RECEIVE_SEARCH_FAILURE: 'mirador/RECEIVE_SEARCH_FAILURE',
|
14979 | REMOVE_SEARCH: 'mirador/REMOVE_SEARCH',
|
14980 | SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS: 'mirador/SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS',
|
14981 | UPDATE_LAYERS: 'mirador/UPDATE_LAYERS',
|
14982 | ADD_RESOURCE: 'mirador/ADD_RESOURCE',
|
14983 | REMOVE_RESOURCE: 'mirador/REMOVE_RESOURCE'
|
14984 | };
|
14985 | var action_types = (ActionTypes);
|
14986 |
|
14987 | function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
14988 |
|
14989 | function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
14990 |
|
14991 | function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
14992 |
|
14993 | function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
14994 |
|
14995 | function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
14996 |
|
14997 | function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
14998 |
|
14999 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
15000 |
|
15001 |
|
15002 | var settings = ({
|
15003 | state: {
|
15004 | },
|
15005 | canvasNavigation: {
|
15006 |
|
15007 | height: 50,
|
15008 | width: 50
|
15009 | },
|
15010 | selectedTheme: 'light',
|
15011 |
|
15012 | themes: {
|
15013 | dark: {
|
15014 | palette: {
|
15015 | type: 'dark',
|
15016 | primary: {
|
15017 | main: '#4db6ac'
|
15018 | },
|
15019 | secondary: {
|
15020 | main: '#4db6ac'
|
15021 | },
|
15022 | shades: {
|
15023 | dark: '#000000',
|
15024 | main: '#424242',
|
15025 | light: '#616161'
|
15026 | }
|
15027 | }
|
15028 | },
|
15029 | light: {
|
15030 | palette: {
|
15031 | type: 'light'
|
15032 | }
|
15033 | }
|
15034 | },
|
15035 | theme: {
|
15036 |
|
15037 | palette: {
|
15038 | type: 'light',
|
15039 | primary: {
|
15040 | main: '#1967d2'
|
15041 |
|
15042 | },
|
15043 | secondary: {
|
15044 | main: '#1967d2'
|
15045 |
|
15046 | },
|
15047 | shades: {
|
15048 |
|
15049 | dark: '#eeeeee',
|
15050 | main: '#ffffff',
|
15051 | light: '#f5f5f5'
|
15052 | },
|
15053 | error: {
|
15054 | main: '#b00020'
|
15055 | },
|
15056 | notification: {
|
15057 |
|
15058 | main: '#ffa224'
|
15059 | },
|
15060 | hitCounter: {
|
15061 | "default": '#bdbdbd'
|
15062 | },
|
15063 | highlights: {
|
15064 | primary: '#ffff00',
|
15065 | secondary: '#00BFFF'
|
15066 | },
|
15067 | section_divider: 'rgba(0, 0, 0, 0.25)',
|
15068 | annotations: {
|
15069 | hidden: {
|
15070 | globalAlpha: 0
|
15071 | },
|
15072 | "default": {
|
15073 | strokeStyle: '#00BFFF',
|
15074 | globalAlpha: 1
|
15075 | },
|
15076 | hovered: {
|
15077 | strokeStyle: '#BF00FF',
|
15078 | globalAlpha: 1
|
15079 | },
|
15080 | selected: {
|
15081 | strokeStyle: '#ffff00',
|
15082 | globalAlpha: 1
|
15083 | }
|
15084 | },
|
15085 | search: {
|
15086 | "default": {
|
15087 | fillStyle: '#00BFFF',
|
15088 | globalAlpha: 0.3
|
15089 | },
|
15090 | hovered: {
|
15091 | fillStyle: '#00FFFF',
|
15092 | globalAlpha: 0.3
|
15093 | },
|
15094 | selected: {
|
15095 | fillStyle: '#ffff00',
|
15096 | globalAlpha: 0.3
|
15097 | }
|
15098 | }
|
15099 | },
|
15100 | typography: {
|
15101 | body1: {
|
15102 | fontSize: "1rem",
|
15103 | letterSpacing: "0em",
|
15104 | lineHeight: "1.6em"
|
15105 | },
|
15106 | body2: {
|
15107 | fontSize: "0.878rem",
|
15108 | letterSpacing: "0.015em",
|
15109 | lineHeight: "1.6em"
|
15110 | },
|
15111 | button: {
|
15112 | fontSize: "0.878rem",
|
15113 | letterSpacing: "0.09em",
|
15114 | lineHeight: "2.25rem",
|
15115 | textTransform: "uppercase"
|
15116 | },
|
15117 | caption: {
|
15118 | fontSize: "0.772rem",
|
15119 | letterSpacing: "0.033em",
|
15120 | lineHeight: "1.6rem"
|
15121 | },
|
15122 | body1Next: {
|
15123 | fontSize: "1rem",
|
15124 | letterSpacing: "0em",
|
15125 | lineHeight: "1.6em"
|
15126 | },
|
15127 | body2Next: {
|
15128 | fontSize: "0.878rem",
|
15129 | letterSpacing: "0.015em",
|
15130 | lineHeight: "1.6em"
|
15131 | },
|
15132 | buttonNext: {
|
15133 | fontSize: "0.878rem",
|
15134 | letterSpacing: "0.09em",
|
15135 | lineHeight: "2.25rem"
|
15136 | },
|
15137 | captionNext: {
|
15138 | fontSize: "0.772rem",
|
15139 | letterSpacing: "0.33em",
|
15140 | lineHeight: "1.6rem"
|
15141 | },
|
15142 | overline: {
|
15143 | fontSize: "0.678rem",
|
15144 | fontWeight: 500,
|
15145 | letterSpacing: "0.166em",
|
15146 | lineHeight: "2em",
|
15147 | textTransform: "uppercase"
|
15148 | },
|
15149 | h1: {
|
15150 | fontSize: "2.822rem",
|
15151 | letterSpacing: "-0.015em",
|
15152 | lineHeight: "1.2em"
|
15153 | },
|
15154 | h2: {
|
15155 | fontSize: "1.575rem",
|
15156 | letterSpacing: "0em",
|
15157 | lineHeight: "1.33em"
|
15158 | },
|
15159 | h3: {
|
15160 | fontSize: "1.383rem",
|
15161 | fontWeight: 300,
|
15162 | letterSpacing: "0em",
|
15163 | lineHeight: "1.33em"
|
15164 | },
|
15165 | h4: {
|
15166 | fontSize: "1.215rem",
|
15167 | letterSpacing: "0.007em",
|
15168 | lineHeight: "1.45em"
|
15169 | },
|
15170 | h5: {
|
15171 | fontSize: "1.138rem",
|
15172 | letterSpacing: "0.005em",
|
15173 | lineHeight: "1.55em"
|
15174 | },
|
15175 | h6: {
|
15176 | fontSize: "1.067rem",
|
15177 | fontWeight: 400,
|
15178 | letterSpacing: "0.01em",
|
15179 | lineHeight: "1.6em"
|
15180 | },
|
15181 | subtitle1: {
|
15182 | fontSize: "0.937rem",
|
15183 | letterSpacing: "0.015em",
|
15184 | lineHeight: "1.6em",
|
15185 | fontWeight: 300
|
15186 | },
|
15187 | subtitle2: {
|
15188 | fontSize: "0.878rem",
|
15189 | fontWeight: 500,
|
15190 | letterSpacing: "0.02em",
|
15191 | lineHeight: "1.75em"
|
15192 | },
|
15193 | useNextVariants: true
|
15194 |
|
15195 | },
|
15196 | overrides: {
|
15197 | MuiListSubheader: {
|
15198 | root: {
|
15199 | '&[role="presentation"]:focus': {
|
15200 | outline: 0
|
15201 | }
|
15202 | }
|
15203 | },
|
15204 | MuiTooltip: {
|
15205 |
|
15206 | tooltipPlacementLeft: _defineProperty({}, '@media (min-width:600px)', {
|
15207 | margin: 0
|
15208 | }),
|
15209 | tooltipPlacementRight: _defineProperty({}, '@media (min-width:600px)', {
|
15210 | margin: 0
|
15211 | }),
|
15212 | tooltipPlacementTop: _defineProperty({}, '@media (min-width:600px)', {
|
15213 | margin: 0
|
15214 | }),
|
15215 | tooltipPlacementBottom: _defineProperty({}, '@media (min-width:600px)', {
|
15216 | margin: 0
|
15217 | })
|
15218 | },
|
15219 | MuiTouchRipple: {
|
15220 | childPulsate: {
|
15221 | animation: 'none'
|
15222 | },
|
15223 | rippleVisible: {
|
15224 | animation: 'none'
|
15225 | }
|
15226 | }
|
15227 | },
|
15228 | props: {
|
15229 | MuiButtonBase: {
|
15230 | disableTouchRipple: true
|
15231 | },
|
15232 | MuiLink: {
|
15233 | underline: 'always'
|
15234 | }
|
15235 | }
|
15236 | },
|
15237 | language: 'en',
|
15238 |
|
15239 | availableLanguages: {
|
15240 |
|
15241 | ar: 'العربية',
|
15242 | de: 'Deutsch',
|
15243 | en: 'English',
|
15244 | fr: 'Français',
|
15245 | ja: '日本語',
|
15246 | nl: 'Nederlands',
|
15247 | 'pt-BR': 'Português do Brasil',
|
15248 | 'zh-CN': '中文(简体)',
|
15249 | 'zh-TW': '中文(繁體)',
|
15250 | it: "Italiano",
|
15251 | sr: 'Српски'
|
15252 | },
|
15253 | annotations: {
|
15254 | htmlSanitizationRuleSet: 'iiif',
|
15255 |
|
15256 | filteredMotivations: ['oa:commenting', 'oa:tagging', 'sc:painting', 'commenting', 'tagging']
|
15257 | },
|
15258 | classPrefix: 'mirador',
|
15259 | requests: {
|
15260 | preprocessors: [
|
15261 |
|
15262 | ],
|
15263 | postprocessors: [
|
15264 |
|
15265 |
|
15266 |
|
15267 |
|
15268 |
|
15269 |
|
15270 | ]
|
15271 | },
|
15272 | translations: {
|
15273 | },
|
15274 | window: {
|
15275 |
|
15276 | allowClose: true,
|
15277 |
|
15278 | allowFullscreen: false,
|
15279 |
|
15280 | allowMaximize: true,
|
15281 |
|
15282 | allowTopMenuButton: true,
|
15283 |
|
15284 | allowWindowSideBar: true,
|
15285 |
|
15286 | authNewWindowCenter: 'parent',
|
15287 |
|
15288 | sideBarPanel: 'info',
|
15289 |
|
15290 | defaultSidebarPanelHeight: 201,
|
15291 |
|
15292 | defaultSidebarPanelWidth: 235,
|
15293 |
|
15294 | defaultView: 'single',
|
15295 |
|
15296 | forceDrawAnnotations: false,
|
15297 | hideWindowTitle: false,
|
15298 |
|
15299 | highlightAllAnnotations: false,
|
15300 |
|
15301 | showLocalePicker: false,
|
15302 |
|
15303 | sideBarOpen: false,
|
15304 |
|
15305 | panels: {
|
15306 |
|
15307 | info: true,
|
15308 | attribution: true,
|
15309 | canvas: true,
|
15310 | annotations: true,
|
15311 | search: true
|
15312 | },
|
15313 | views: [{
|
15314 | key: 'single',
|
15315 | behaviors: ['individuals']
|
15316 | }, {
|
15317 | key: 'book',
|
15318 | behaviors: ['paged']
|
15319 | }, {
|
15320 | key: 'scroll',
|
15321 | behaviors: ['continuous']
|
15322 | }, {
|
15323 | key: 'gallery'
|
15324 | }]
|
15325 | },
|
15326 | windows: [
|
15327 |
|
15328 | |
15329 |
|
15330 |
|
15331 |
|
15332 |
|
15333 |
|
15334 |
|
15335 |
|
15336 |
|
15337 |
|
15338 | ],
|
15339 | thumbnailNavigation: {
|
15340 | defaultPosition: 'off',
|
15341 |
|
15342 | height: 130,
|
15343 |
|
15344 | width: 100
|
15345 |
|
15346 | },
|
15347 | workspace: {
|
15348 | draggingEnabled: true,
|
15349 | allowNewWindows: true,
|
15350 | id: esm_browser_v4(),
|
15351 | isWorkspaceAddVisible: false,
|
15352 |
|
15353 | exposeModeOn: false,
|
15354 |
|
15355 | height: 5000,
|
15356 |
|
15357 | showZoomControls: false,
|
15358 |
|
15359 | type: 'mosaic',
|
15360 |
|
15361 | viewportPosition: {
|
15362 |
|
15363 | x: 0,
|
15364 | y: 0
|
15365 | },
|
15366 | width: 5000
|
15367 |
|
15368 | },
|
15369 | workspaceControlPanel: {
|
15370 | enabled: true
|
15371 |
|
15372 | },
|
15373 | galleryView: {
|
15374 | height: 120,
|
15375 |
|
15376 | width: null
|
15377 |
|
15378 | },
|
15379 | osdConfig: {
|
15380 |
|
15381 | alwaysBlend: false,
|
15382 | blendTime: 0.1,
|
15383 | preserveImageSizeOnResize: true,
|
15384 | preserveViewport: true,
|
15385 | showNavigationControl: false
|
15386 | },
|
15387 | "export": {
|
15388 | catalog: true,
|
15389 | companionWindows: true,
|
15390 | config: true,
|
15391 | elasticLayout: true,
|
15392 | layers: true,
|
15393 |
|
15394 | manifests: {
|
15395 | filter: function filter(_ref) {
|
15396 | var _ref2 = _slicedToArray(_ref, 2),
|
15397 | id = _ref2[0],
|
15398 | value = _ref2[1];
|
15399 |
|
15400 | return !id.startsWith('http');
|
15401 | }
|
15402 | },
|
15403 | viewers: true,
|
15404 | windows: true,
|
15405 | workspace: true
|
15406 | }
|
15407 | });
|
15408 |
|
15409 |
|
15410 |
|
15411 |
|
15412 | function miradorSlice(state) {
|
15413 | if (settings.state.slice) return state[settings.state.slice];
|
15414 | return state;
|
15415 | }
|
15416 |
|
15417 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
15418 |
|
15419 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { window_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
15420 |
|
15421 | function window_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
15422 |
|
15423 | function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || window_unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
15424 |
|
15425 | function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
15426 |
|
15427 | function window_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return window_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return window_arrayLikeToArray(o, minLen); }
|
15428 |
|
15429 | function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
15430 |
|
15431 | function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return window_arrayLikeToArray(arr); }
|
15432 |
|
15433 | function window_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
15434 |
|
15435 | function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
15436 |
|
15437 | function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
15438 |
|
15439 |
|
15440 |
|
15441 |
|
15442 |
|
15443 |
|
15444 |
|
15445 |
|
15446 |
|
15447 |
|
15448 |
|
15449 | function focusWindow(windowId) {
|
15450 | var pan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
15451 | return {
|
15452 | pan: pan,
|
15453 | type: action_types.FOCUS_WINDOW,
|
15454 | windowId: windowId
|
15455 | };
|
15456 | }
|
15457 |
|
15458 |
|
15459 |
|
15460 |
|
15461 |
|
15462 |
|
15463 |
|
15464 | function addWindow(_ref) {
|
15465 | var companionWindows = _ref.companionWindows,
|
15466 | manifest = _ref.manifest,
|
15467 | options = _objectWithoutProperties(_ref, ["companionWindows", "manifest"]);
|
15468 |
|
15469 | return function (dispatch, getState) {
|
15470 | var _miradorSlice = miradorSlice(getState()),
|
15471 | config = _miradorSlice.config,
|
15472 | _miradorSlice$workspa = _miradorSlice.workspace.windowIds,
|
15473 | windowIds = _miradorSlice$workspa === void 0 ? [] : _miradorSlice$workspa;
|
15474 |
|
15475 | var numWindows = windowIds.length;
|
15476 | var windowId = options.id || "window-".concat(esm_browser_v4());
|
15477 | var cwThumbs = "cw-".concat(esm_browser_v4());
|
15478 | var defaultCompanionWindows = [{
|
15479 | content: 'thumbnailNavigation',
|
15480 | "default": true,
|
15481 | id: cwThumbs,
|
15482 | position: options.thumbnailNavigationPosition || config.thumbnailNavigation.defaultPosition,
|
15483 | windowId: windowId
|
15484 | }].concat(_toConsumableArray((companionWindows || []).map(function (cw, i) {
|
15485 | return _objectSpread(_objectSpread({}, cw), {}, {
|
15486 | id: "cw-".concat(esm_browser_v4())
|
15487 | });
|
15488 | })));
|
15489 |
|
15490 | if (config.window.defaultSideBarPanel || config.window.sideBarPanel) {
|
15491 | defaultCompanionWindows.unshift({
|
15492 | content: config.window.defaultSideBarPanel || config.window.sideBarPanel,
|
15493 | "default": true,
|
15494 | id: "cw-".concat(esm_browser_v4()),
|
15495 | position: 'left',
|
15496 | windowId: windowId
|
15497 | });
|
15498 | }
|
15499 |
|
15500 | var defaultOptions = {
|
15501 | canvasId: undefined,
|
15502 | collectionIndex: 0,
|
15503 | companionAreaOpen: true,
|
15504 | companionWindowIds: defaultCompanionWindows.map(function (cw) {
|
15505 | return cw.id;
|
15506 | }),
|
15507 | draggingEnabled: true,
|
15508 | highlightAllAnnotations: config.window.highlightAllAnnotations || false,
|
15509 | id: windowId,
|
15510 | manifestId: null,
|
15511 | maximized: false,
|
15512 | rangeId: null,
|
15513 | rotation: null,
|
15514 | selectedAnnotations: {},
|
15515 | sideBarOpen: config.window.sideBarOpenByDefault !== undefined ? config.window.sideBarOpenByDefault : config.window.sideBarOpen,
|
15516 | sideBarPanel: config.window.defaultSideBarPanel || config.window.sideBarPanel,
|
15517 | thumbnailNavigationId: cwThumbs
|
15518 | };
|
15519 | var elasticLayout = {
|
15520 | height: 400,
|
15521 | width: 400,
|
15522 | x: 200 + (Math.floor(numWindows / 10) * 50 + numWindows * 30 % 300),
|
15523 | y: 200 + numWindows * 50 % 300
|
15524 | };
|
15525 | dispatch({
|
15526 | companionWindows: defaultCompanionWindows,
|
15527 | elasticLayout: elasticLayout,
|
15528 | manifest: manifest,
|
15529 | type: action_types.ADD_WINDOW,
|
15530 | window: _objectSpread(_objectSpread({}, defaultOptions), options)
|
15531 | });
|
15532 | };
|
15533 | }
|
15534 |
|
15535 |
|
15536 | function window_updateWindow(id, payload) {
|
15537 | return {
|
15538 | id: id,
|
15539 | payload: payload,
|
15540 | type: action_types.UPDATE_WINDOW
|
15541 | };
|
15542 | }
|
15543 |
|
15544 |
|
15545 |
|
15546 |
|
15547 |
|
15548 |
|
15549 | function maximizeWindow(windowId, layout) {
|
15550 | return {
|
15551 | type: action_types.MAXIMIZE_WINDOW,
|
15552 | windowId: windowId
|
15553 | };
|
15554 | }
|
15555 |
|
15556 |
|
15557 |
|
15558 |
|
15559 |
|
15560 |
|
15561 | function minimizeWindow(windowId) {
|
15562 | return {
|
15563 | type: action_types.MINIMIZE_WINDOW,
|
15564 | windowId: windowId
|
15565 | };
|
15566 | }
|
15567 |
|
15568 |
|
15569 | function setCompanionAreaOpen(id, companionAreaOpen) {
|
15570 | return {
|
15571 | id: id,
|
15572 | payload: {
|
15573 | companionAreaOpen: companionAreaOpen
|
15574 | },
|
15575 | type: action_types.UPDATE_WINDOW
|
15576 | };
|
15577 | }
|
15578 |
|
15579 |
|
15580 |
|
15581 |
|
15582 |
|
15583 |
|
15584 |
|
15585 | function removeWindow(windowId) {
|
15586 | return {
|
15587 | type: action_types.REMOVE_WINDOW,
|
15588 | windowId: windowId
|
15589 | };
|
15590 | }
|
15591 |
|
15592 |
|
15593 |
|
15594 |
|
15595 |
|
15596 |
|
15597 |
|
15598 | function toggleWindowSideBar(windowId) {
|
15599 | return {
|
15600 | type: action_types.TOGGLE_WINDOW_SIDE_BAR,
|
15601 | windowId: windowId
|
15602 | };
|
15603 | }
|
15604 |
|
15605 |
|
15606 |
|
15607 |
|
15608 |
|
15609 |
|
15610 |
|
15611 |
|
15612 | function setWindowThumbnailPosition(windowId, position) {
|
15613 | return function (dispatch, getState) {
|
15614 | var _getState = getState(),
|
15615 | windows = _getState.windows;
|
15616 |
|
15617 | var thumbnailNavigationId = windows[windowId].thumbnailNavigationId;
|
15618 | dispatch({
|
15619 | id: thumbnailNavigationId,
|
15620 | payload: {
|
15621 | position: position
|
15622 | },
|
15623 | type: action_types.UPDATE_COMPANION_WINDOW
|
15624 | });
|
15625 | };
|
15626 | }
|
15627 |
|
15628 |
|
15629 |
|
15630 |
|
15631 |
|
15632 |
|
15633 |
|
15634 |
|
15635 | function setWindowViewType(windowId, viewType) {
|
15636 | return {
|
15637 | type: action_types.SET_WINDOW_VIEW_TYPE,
|
15638 | viewType: viewType,
|
15639 | windowId: windowId
|
15640 | };
|
15641 | }
|
15642 |
|
15643 | var es = __webpack_require__(3);
|
15644 |
|
15645 |
|
15646 | var JSONLDResource = (function () {
|
15647 | function JSONLDResource(jsonld) {
|
15648 | this.__jsonld = jsonld;
|
15649 | this.context = this.getProperty("context");
|
15650 | this.id = this.getProperty("id");
|
15651 | }
|
15652 | JSONLDResource.prototype.getProperty = function (name) {
|
15653 | var prop = null;
|
15654 | if (this.__jsonld) {
|
15655 | prop = this.__jsonld[name];
|
15656 | if (!prop) {
|
15657 |
|
15658 | prop = this.__jsonld["@" + name];
|
15659 | }
|
15660 | }
|
15661 | return prop;
|
15662 | };
|
15663 | return JSONLDResource;
|
15664 | }());
|
15665 |
|
15666 |
|
15667 |
|
15668 | var dist_commonjs = __webpack_require__(2);
|
15669 |
|
15670 |
|
15671 | var __extends = (undefined && undefined.__extends) || (function () {
|
15672 | var extendStatics = function (d, b) {
|
15673 | extendStatics = Object.setPrototypeOf ||
|
15674 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
15675 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
15676 | return extendStatics(d, b);
|
15677 | };
|
15678 | return function (d, b) {
|
15679 | extendStatics(d, b);
|
15680 | function __() { this.constructor = d; }
|
15681 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15682 | };
|
15683 | })();
|
15684 |
|
15685 |
|
15686 | var ManifestResource_ManifestResource = (function (_super) {
|
15687 | __extends(ManifestResource, _super);
|
15688 | function ManifestResource(jsonld, options) {
|
15689 | var _this = _super.call(this, jsonld) || this;
|
15690 | _this.options = options;
|
15691 | return _this;
|
15692 | }
|
15693 | ManifestResource.prototype.getIIIFResourceType = function () {
|
15694 | return Utils_Utils.normaliseType(this.getProperty("type"));
|
15695 | };
|
15696 | ManifestResource.prototype.getLabel = function () {
|
15697 | var label = this.getProperty("label");
|
15698 | if (label) {
|
15699 | return LanguageMap_LanguageMap.parse(label, this.options.locale);
|
15700 | }
|
15701 | return [];
|
15702 | };
|
15703 | ManifestResource.prototype.getDefaultLabel = function () {
|
15704 | return LanguageMap_LanguageMap.getValue(this.getLabel());
|
15705 | };
|
15706 | ManifestResource.prototype.getMetadata = function () {
|
15707 | var _metadata = this.getProperty("metadata");
|
15708 | var metadata = [];
|
15709 | if (!_metadata)
|
15710 | return metadata;
|
15711 | for (var i = 0; i < _metadata.length; i++) {
|
15712 | var item = _metadata[i];
|
15713 | var metadataItem = new LabelValuePair_LabelValuePair(this.options.locale);
|
15714 | metadataItem.parse(item);
|
15715 | metadata.push(metadataItem);
|
15716 | }
|
15717 | return metadata;
|
15718 | };
|
15719 | ManifestResource.prototype.getRendering = function (format) {
|
15720 | var renderings = this.getRenderings();
|
15721 | for (var i = 0; i < renderings.length; i++) {
|
15722 | var rendering = renderings[i];
|
15723 | if (rendering.getFormat() === format) {
|
15724 | return rendering;
|
15725 | }
|
15726 | }
|
15727 | return null;
|
15728 | };
|
15729 | ManifestResource.prototype.getRenderings = function () {
|
15730 | var rendering;
|
15731 |
|
15732 |
|
15733 | if (this.__jsonld) {
|
15734 | rendering = this.__jsonld.rendering;
|
15735 | }
|
15736 | else {
|
15737 | rendering = this.rendering;
|
15738 | }
|
15739 | var renderings = [];
|
15740 | if (!rendering)
|
15741 | return renderings;
|
15742 |
|
15743 | if (!Array.isArray(rendering)) {
|
15744 | rendering = [rendering];
|
15745 | }
|
15746 | for (var i = 0; i < rendering.length; i++) {
|
15747 | var r = rendering[i];
|
15748 | renderings.push(new Rendering(r, this.options));
|
15749 | }
|
15750 | return renderings;
|
15751 | };
|
15752 | ManifestResource.prototype.getService = function (profile) {
|
15753 | return Utils_Utils.getService(this, profile);
|
15754 | };
|
15755 | ManifestResource.prototype.getServices = function () {
|
15756 | return Utils_Utils.getServices(this);
|
15757 | };
|
15758 | ManifestResource.prototype.getThumbnail = function () {
|
15759 | var thumbnail = this.getProperty("thumbnail");
|
15760 | if (Array.isArray(thumbnail)) {
|
15761 | thumbnail = thumbnail[0];
|
15762 | }
|
15763 | if (thumbnail) {
|
15764 | return new Thumbnail(thumbnail, this.options);
|
15765 | }
|
15766 | return null;
|
15767 | };
|
15768 | ManifestResource.prototype.isAnnotation = function () {
|
15769 | return this.getIIIFResourceType() === dist_commonjs["IIIFResourceType"].ANNOTATION;
|
15770 | };
|
15771 | ManifestResource.prototype.isCanvas = function () {
|
15772 | return this.getIIIFResourceType() === dist_commonjs["IIIFResourceType"].CANVAS;
|
15773 | };
|
15774 | ManifestResource.prototype.isCollection = function () {
|
15775 | return this.getIIIFResourceType() === dist_commonjs["IIIFResourceType"].COLLECTION;
|
15776 | };
|
15777 | ManifestResource.prototype.isManifest = function () {
|
15778 | return this.getIIIFResourceType() === dist_commonjs["IIIFResourceType"].MANIFEST;
|
15779 | };
|
15780 | ManifestResource.prototype.isRange = function () {
|
15781 | return this.getIIIFResourceType() === dist_commonjs["IIIFResourceType"].RANGE;
|
15782 | };
|
15783 | ManifestResource.prototype.isSequence = function () {
|
15784 | return this.getIIIFResourceType() === dist_commonjs["IIIFResourceType"].SEQUENCE;
|
15785 | };
|
15786 | return ManifestResource;
|
15787 | }(JSONLDResource));
|
15788 |
|
15789 |
|
15790 |
|
15791 | var Resource_extends = (undefined && undefined.__extends) || (function () {
|
15792 | var extendStatics = function (d, b) {
|
15793 | extendStatics = Object.setPrototypeOf ||
|
15794 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
15795 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
15796 | return extendStatics(d, b);
|
15797 | };
|
15798 | return function (d, b) {
|
15799 | extendStatics(d, b);
|
15800 | function __() { this.constructor = d; }
|
15801 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15802 | };
|
15803 | })();
|
15804 |
|
15805 | var Resource_Resource = (function (_super) {
|
15806 | Resource_extends(Resource, _super);
|
15807 | function Resource(jsonld, options) {
|
15808 | return _super.call(this, jsonld, options) || this;
|
15809 | }
|
15810 | Resource.prototype.getFormat = function () {
|
15811 | var format = this.getProperty("format");
|
15812 | if (format) {
|
15813 | return format.toLowerCase();
|
15814 | }
|
15815 | return null;
|
15816 | };
|
15817 | Resource.prototype.getResources = function () {
|
15818 | var resources = [];
|
15819 | if (!this.__jsonld.resources)
|
15820 | return resources;
|
15821 | for (var i = 0; i < this.__jsonld.resources.length; i++) {
|
15822 | var a = this.__jsonld.resources[i];
|
15823 | var annotation = new Annotation_Annotation(a, this.options);
|
15824 | resources.push(annotation);
|
15825 | }
|
15826 | return resources;
|
15827 | };
|
15828 | Resource.prototype.getType = function () {
|
15829 | var type = this.getProperty("type");
|
15830 | if (type) {
|
15831 | return Utils_Utils.normaliseType(type);
|
15832 | }
|
15833 | return null;
|
15834 | };
|
15835 | Resource.prototype.getWidth = function () {
|
15836 | return this.getProperty("width");
|
15837 | };
|
15838 | Resource.prototype.getHeight = function () {
|
15839 | return this.getProperty("height");
|
15840 | };
|
15841 | Resource.prototype.getMaxWidth = function () {
|
15842 | return this.getProperty("maxWidth");
|
15843 | };
|
15844 | Resource.prototype.getMaxHeight = function () {
|
15845 | var maxHeight = this.getProperty("maxHeight");
|
15846 |
|
15847 |
|
15848 | if (!maxHeight) {
|
15849 | return this.getMaxWidth();
|
15850 | }
|
15851 | return null;
|
15852 | };
|
15853 | return Resource;
|
15854 | }(ManifestResource_ManifestResource));
|
15855 |
|
15856 |
|
15857 |
|
15858 | var IIIFResource_extends = (undefined && undefined.__extends) || (function () {
|
15859 | var extendStatics = function (d, b) {
|
15860 | extendStatics = Object.setPrototypeOf ||
|
15861 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
15862 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
15863 | return extendStatics(d, b);
|
15864 | };
|
15865 | return function (d, b) {
|
15866 | extendStatics(d, b);
|
15867 | function __() { this.constructor = d; }
|
15868 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15869 | };
|
15870 | })();
|
15871 |
|
15872 |
|
15873 | var IIIFResource_IIIFResource = (function (_super) {
|
15874 | IIIFResource_extends(IIIFResource, _super);
|
15875 | function IIIFResource(jsonld, options) {
|
15876 | var _this = _super.call(this, jsonld, options) || this;
|
15877 | _this.index = -1;
|
15878 | _this.isLoaded = false;
|
15879 | var defaultOptions = {
|
15880 | defaultLabel: "-",
|
15881 | locale: "en-GB",
|
15882 | resource: _this,
|
15883 | pessimisticAccessControl: false
|
15884 | };
|
15885 | _this.options = Object.assign(defaultOptions, options);
|
15886 | return _this;
|
15887 | }
|
15888 | IIIFResource.prototype.getAttribution = function () {
|
15889 |
|
15890 | var attribution = this.getProperty("attribution");
|
15891 | if (attribution) {
|
15892 | return LanguageMap_LanguageMap.parse(attribution, this.options.locale);
|
15893 | }
|
15894 | return [];
|
15895 | };
|
15896 | IIIFResource.prototype.getDescription = function () {
|
15897 | var description = this.getProperty("description");
|
15898 | if (description) {
|
15899 | return LanguageMap_LanguageMap.parse(description, this.options.locale);
|
15900 | }
|
15901 | return [];
|
15902 | };
|
15903 | IIIFResource.prototype.getIIIFResourceType = function () {
|
15904 | return Utils_Utils.normaliseType(this.getProperty("type"));
|
15905 | };
|
15906 | IIIFResource.prototype.getLogo = function () {
|
15907 | var logo = this.getProperty("logo");
|
15908 | if (!logo)
|
15909 | return null;
|
15910 | if (typeof logo === "string")
|
15911 | return logo;
|
15912 | if (Array.isArray(logo) && logo.length) {
|
15913 | logo = logo[0];
|
15914 | }
|
15915 | return logo["@id"] || logo.id;
|
15916 | };
|
15917 | IIIFResource.prototype.getLicense = function () {
|
15918 | return Utils_Utils.getLocalisedValue(this.getProperty("license"), this.options.locale);
|
15919 | };
|
15920 | IIIFResource.prototype.getNavDate = function () {
|
15921 | return new Date(this.getProperty("navDate"));
|
15922 | };
|
15923 | IIIFResource.prototype.getRelated = function () {
|
15924 | return this.getProperty("related");
|
15925 | };
|
15926 | IIIFResource.prototype.getSeeAlso = function () {
|
15927 | return this.getProperty("seeAlso");
|
15928 | };
|
15929 | IIIFResource.prototype.getTrackingLabel = function () {
|
15930 | var service = (this.getService(dist_commonjs["ServiceProfile"].TRACKING_EXTENSIONS));
|
15931 | if (service) {
|
15932 | return service.getProperty("trackingLabel");
|
15933 | }
|
15934 | return "";
|
15935 | };
|
15936 | IIIFResource.prototype.getDefaultTree = function () {
|
15937 | this.defaultTree = new TreeNode_TreeNode("root");
|
15938 | this.defaultTree.data = this;
|
15939 | return this.defaultTree;
|
15940 | };
|
15941 | IIIFResource.prototype.getRequiredStatement = function () {
|
15942 | var requiredStatement = null;
|
15943 | var _requiredStatement = this.getProperty("requiredStatement");
|
15944 | if (_requiredStatement) {
|
15945 | requiredStatement = new LabelValuePair_LabelValuePair(this.options.locale);
|
15946 | requiredStatement.parse(_requiredStatement);
|
15947 | }
|
15948 | else {
|
15949 |
|
15950 | var attribution = this.getAttribution();
|
15951 | if (attribution) {
|
15952 | requiredStatement = new LabelValuePair_LabelValuePair(this.options.locale);
|
15953 | requiredStatement.value = attribution;
|
15954 | }
|
15955 | }
|
15956 | return requiredStatement;
|
15957 | };
|
15958 | IIIFResource.prototype.isCollection = function () {
|
15959 | if (this.getIIIFResourceType() === dist_commonjs["IIIFResourceType"].COLLECTION) {
|
15960 | return true;
|
15961 | }
|
15962 | return false;
|
15963 | };
|
15964 | IIIFResource.prototype.isManifest = function () {
|
15965 | if (this.getIIIFResourceType() === dist_commonjs["IIIFResourceType"].MANIFEST) {
|
15966 | return true;
|
15967 | }
|
15968 | return false;
|
15969 | };
|
15970 | IIIFResource.prototype.load = function () {
|
15971 | var that = this;
|
15972 | return new Promise(function (resolve) {
|
15973 | if (that.isLoaded) {
|
15974 | resolve(that);
|
15975 | }
|
15976 | else {
|
15977 | var options_1 = that.options;
|
15978 | options_1.navDate = that.getNavDate();
|
15979 | var id = that.__jsonld.id;
|
15980 | if (!id) {
|
15981 | id = that.__jsonld["@id"];
|
15982 | }
|
15983 | Utils_Utils.loadManifest(id).then(function (data) {
|
15984 | that.parentLabel = (LanguageMap_LanguageMap.getValue(that.getLabel(), options_1.locale));
|
15985 | var parsed = Serialisation_Deserialiser.parse(data, options_1);
|
15986 | that = Object.assign(that, parsed);
|
15987 |
|
15988 | that.index = options_1.index;
|
15989 | resolve(that);
|
15990 | });
|
15991 | }
|
15992 | });
|
15993 | };
|
15994 | return IIIFResource;
|
15995 | }(ManifestResource_ManifestResource));
|
15996 |
|
15997 |
|
15998 |
|
15999 | var Annotation_extends = (undefined && undefined.__extends) || (function () {
|
16000 | var extendStatics = function (d, b) {
|
16001 | extendStatics = Object.setPrototypeOf ||
|
16002 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
16003 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
16004 | return extendStatics(d, b);
|
16005 | };
|
16006 | return function (d, b) {
|
16007 | extendStatics(d, b);
|
16008 | function __() { this.constructor = d; }
|
16009 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
16010 | };
|
16011 | })();
|
16012 |
|
16013 | var Annotation_Annotation = (function (_super) {
|
16014 | Annotation_extends(Annotation, _super);
|
16015 | function Annotation(jsonld, options) {
|
16016 | return _super.call(this, jsonld, options) || this;
|
16017 | }
|
16018 | Annotation.prototype.getBody = function () {
|
16019 | var bodies = [];
|
16020 | var body = this.getProperty("body");
|
16021 |
|
16022 | if (body) {
|
16023 | if (Array.isArray(body)) {
|
16024 | for (var i = 0; i < body.length; i++) {
|
16025 | var b = body[i];
|
16026 | if (b.items) {
|
16027 | for (var i_1 = 0; i_1 < b.items.length; i_1++) {
|
16028 |
|
16029 | var c = b.items[i_1];
|
16030 | bodies.push(new AnnotationBody_AnnotationBody(c, this.options));
|
16031 | }
|
16032 | }
|
16033 | else {
|
16034 | bodies.push(new AnnotationBody_AnnotationBody(b, this.options));
|
16035 | }
|
16036 | }
|
16037 | }
|
16038 | else if (body.items) {
|
16039 | for (var i = 0; i < body.items.length; i++) {
|
16040 | var b = body.items[i];
|
16041 | bodies.push(new AnnotationBody_AnnotationBody(b, this.options));
|
16042 | }
|
16043 | }
|
16044 | else {
|
16045 | bodies.push(new AnnotationBody_AnnotationBody(body, this.options));
|
16046 | }
|
16047 | }
|
16048 | return bodies;
|
16049 | };
|
16050 | Annotation.prototype.getMotivation = function () {
|
16051 | var motivation = this.getProperty("motivation");
|
16052 | if (motivation) {
|
16053 |
|
16054 | return motivation;
|
16055 | }
|
16056 | return null;
|
16057 | };
|
16058 |
|
16059 | Annotation.prototype.getOn = function () {
|
16060 | return this.getProperty("on");
|
16061 | };
|
16062 | Annotation.prototype.getTarget = function () {
|
16063 | return this.getProperty("target");
|
16064 | };
|
16065 | Annotation.prototype.getResource = function () {
|
16066 | return new Resource_Resource(this.getProperty("resource"), this.options);
|
16067 | };
|
16068 | return Annotation;
|
16069 | }(ManifestResource_ManifestResource));
|
16070 |
|
16071 |
|
16072 |
|
16073 | var AnnotationBody_extends = (undefined && undefined.__extends) || (function () {
|
16074 | var extendStatics = function (d, b) {
|
16075 | extendStatics = Object.setPrototypeOf ||
|
16076 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
16077 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
16078 | return extendStatics(d, b);
|
16079 | };
|
16080 | return function (d, b) {
|
16081 | extendStatics(d, b);
|
16082 | function __() { this.constructor = d; }
|
16083 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
16084 | };
|
16085 | })();
|
16086 |
|
16087 | var AnnotationBody_AnnotationBody = (function (_super) {
|
16088 | AnnotationBody_extends(AnnotationBody, _super);
|
16089 | function AnnotationBody(jsonld, options) {
|
16090 | return _super.call(this, jsonld, options) || this;
|
16091 | }
|
16092 | AnnotationBody.prototype.getFormat = function () {
|
16093 | var format = this.getProperty("format");
|
16094 | if (format) {
|
16095 | return Utils_Utils.getMediaType(format);
|
16096 | }
|
16097 | return null;
|
16098 | };
|
16099 | AnnotationBody.prototype.getType = function () {
|
16100 | var type = this.getProperty("type");
|
16101 | if (type) {
|
16102 | return (Utils_Utils.normaliseType(this.getProperty("type")));
|
16103 | }
|
16104 | return null;
|
16105 | };
|
16106 | AnnotationBody.prototype.getWidth = function () {
|
16107 | return this.getProperty("width");
|
16108 | };
|
16109 | AnnotationBody.prototype.getHeight = function () {
|
16110 | return this.getProperty("height");
|
16111 | };
|
16112 | return AnnotationBody;
|
16113 | }(ManifestResource_ManifestResource));
|
16114 |
|
16115 |
|
16116 |
|
16117 | var AnnotationList_extends = (undefined && undefined.__extends) || (function () {
|
16118 | var extendStatics = function (d, b) {
|
16119 | extendStatics = Object.setPrototypeOf ||
|
16120 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
16121 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
16122 | return extendStatics(d, b);
|
16123 | };
|
16124 | return function (d, b) {
|
16125 | extendStatics(d, b);
|
16126 | function __() { this.constructor = d; }
|
16127 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
16128 | };
|
16129 | })();
|
16130 |
|
16131 | var AnnotationList_AnnotationList = (function (_super) {
|
16132 | AnnotationList_extends(AnnotationList, _super);
|
16133 | function AnnotationList(label, jsonld, options) {
|
16134 | var _this = _super.call(this, jsonld) || this;
|
16135 | _this.label = label;
|
16136 | _this.options = options;
|
16137 | return _this;
|
16138 | }
|
16139 | AnnotationList.prototype.getIIIFResourceType = function () {
|
16140 | return Utils_Utils.normaliseType(this.getProperty("type"));
|
16141 | };
|
16142 | AnnotationList.prototype.getLabel = function () {
|
16143 | return this.label;
|
16144 | };
|
16145 | AnnotationList.prototype.getResources = function () {
|
16146 | var _this = this;
|
16147 | var resources = this.getProperty("resources");
|
16148 | return resources.map(function (resource) { return new Annotation_Annotation(resource, _this.options); });
|
16149 | };
|
16150 | AnnotationList.prototype.load = function () {
|
16151 | var _this = this;
|
16152 | return new Promise(function (resolve, reject) {
|
16153 | if (_this.isLoaded) {
|
16154 | resolve(_this);
|
16155 | }
|
16156 | else {
|
16157 | var id = _this.__jsonld.id;
|
16158 | if (!id) {
|
16159 | id = _this.__jsonld["@id"];
|
16160 | }
|
16161 | Utils_Utils.loadManifest(id)
|
16162 | .then(function (data) {
|
16163 | _this.__jsonld = data;
|
16164 | _this.context = _this.getProperty("context");
|
16165 | _this.id = _this.getProperty("id");
|
16166 | _this.isLoaded = true;
|
16167 | resolve(_this);
|
16168 | })
|
16169 | .catch(reject);
|
16170 | }
|
16171 | });
|
16172 | };
|
16173 | return AnnotationList;
|
16174 | }(JSONLDResource));
|
16175 |
|
16176 |
|
16177 |
|
16178 | var AnnotationPage_extends = (undefined && undefined.__extends) || (function () {
|
16179 | var extendStatics = function (d, b) {
|
16180 | extendStatics = Object.setPrototypeOf ||
|
16181 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
16182 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
16183 | return extendStatics(d, b);
|
16184 | };
|
16185 | return function (d, b) {
|
16186 | extendStatics(d, b);
|
16187 | function __() { this.constructor = d; }
|
16188 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
16189 | };
|
16190 | })();
|
16191 |
|
16192 | var AnnotationPage = (function (_super) {
|
16193 | AnnotationPage_extends(AnnotationPage, _super);
|
16194 | function AnnotationPage(jsonld, options) {
|
16195 | return _super.call(this, jsonld, options) || this;
|
16196 | }
|
16197 | AnnotationPage.prototype.getItems = function () {
|
16198 | return this.getProperty("items");
|
16199 | };
|
16200 | return AnnotationPage;
|
16201 | }(ManifestResource_ManifestResource));
|
16202 |
|
16203 |
|
16204 |
|
16205 | var Canvas_extends = (undefined && undefined.__extends) || (function () {
|
16206 | var extendStatics = function (d, b) {
|
16207 | extendStatics = Object.setPrototypeOf ||
|
16208 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
16209 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
16210 | return extendStatics(d, b);
|
16211 | };
|
16212 | return function (d, b) {
|
16213 | extendStatics(d, b);
|
16214 | function __() { this.constructor = d; }
|
16215 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
16216 | };
|
16217 | })();
|
16218 |
|
16219 | var Canvas_Canvas = (function (_super) {
|
16220 | Canvas_extends(Canvas, _super);
|
16221 | function Canvas(jsonld, options) {
|
16222 | return _super.call(this, jsonld, options) || this;
|
16223 | }
|
16224 |
|
16225 | Canvas.prototype.getCanonicalImageUri = function (w) {
|
16226 | var id = null;
|
16227 | var region = "full";
|
16228 | var rotation = 0;
|
16229 | var quality = "default";
|
16230 | var width = w;
|
16231 | var size;
|
16232 |
|
16233 | if (this.externalResource &&
|
16234 | this.externalResource.data &&
|
16235 | this.externalResource.data["@id"]) {
|
16236 | id = this.externalResource.data["@id"];
|
16237 | if (!width) {
|
16238 | width = this.externalResource.data.width;
|
16239 | }
|
16240 | if (this.externalResource.data["@context"]) {
|
16241 | if (this.externalResource.data["@context"].indexOf("/1.0/context.json") >
|
16242 | -1 ||
|
16243 | this.externalResource.data["@context"].indexOf("/1.1/context.json") >
|
16244 | -1 ||
|
16245 | this.externalResource.data["@context"].indexOf("/1/context.json") > -1) {
|
16246 | quality = "native";
|
16247 | }
|
16248 | }
|
16249 | }
|
16250 | else {
|
16251 |
|
16252 | var images = this.getImages();
|
16253 | if (images && images.length) {
|
16254 | var firstImage = images[0];
|
16255 | var resource = firstImage.getResource();
|
16256 | var services = resource.getServices();
|
16257 | if (!width) {
|
16258 | width = resource.getWidth();
|
16259 | }
|
16260 | if (services.length) {
|
16261 | var service = services[0];
|
16262 | id = service.id;
|
16263 | quality = Utils_Utils.getImageQuality(service.getProfile());
|
16264 | }
|
16265 | else if (width === resource.getWidth()) {
|
16266 |
|
16267 |
|
16268 |
|
16269 |
|
16270 | return resource.id;
|
16271 | }
|
16272 | }
|
16273 |
|
16274 | if (!id) {
|
16275 | var thumbnail = this.getProperty("thumbnail");
|
16276 | if (thumbnail) {
|
16277 | if (typeof thumbnail === "string") {
|
16278 | return thumbnail;
|
16279 | }
|
16280 | else {
|
16281 | if (thumbnail["@id"]) {
|
16282 | return thumbnail["@id"];
|
16283 | }
|
16284 | else if (thumbnail.length) {
|
16285 | return thumbnail[0].id;
|
16286 | }
|
16287 | }
|
16288 | }
|
16289 | }
|
16290 | }
|
16291 | size = width + ",";
|
16292 |
|
16293 | if (id && id.endsWith("/")) {
|
16294 | id = id.substr(0, id.length - 1);
|
16295 | }
|
16296 | var uri = [id, region, size, rotation, quality + ".jpg"].join("/");
|
16297 | return uri;
|
16298 | };
|
16299 | Canvas.prototype.getMaxDimensions = function () {
|
16300 | var maxDimensions = null;
|
16301 | var profile;
|
16302 | if (this.externalResource &&
|
16303 | this.externalResource.data &&
|
16304 | this.externalResource.data.profile) {
|
16305 | profile = this.externalResource.data.profile;
|
16306 | if (Array.isArray(profile)) {
|
16307 | profile = profile.filter(function (p) { return p["maxWidth" || "maxwidth"]; })[0];
|
16308 | if (profile) {
|
16309 | maxDimensions = new Size(profile.maxWidth, profile.maxHeight ? profile.maxHeight : profile.maxWidth);
|
16310 | }
|
16311 | }
|
16312 | }
|
16313 | return maxDimensions;
|
16314 | };
|
16315 |
|
16316 | Canvas.prototype.getContent = function () {
|
16317 | var content = [];
|
16318 | var items = this.__jsonld.items || this.__jsonld.content;
|
16319 | if (!items)
|
16320 | return content;
|
16321 |
|
16322 | var annotationPage = null;
|
16323 | if (items.length) {
|
16324 | annotationPage = new AnnotationPage(items[0], this.options);
|
16325 | }
|
16326 | if (!annotationPage) {
|
16327 | return content;
|
16328 | }
|
16329 | var annotations = annotationPage.getItems();
|
16330 | for (var i = 0; i < annotations.length; i++) {
|
16331 | var a = annotations[i];
|
16332 | var annotation = new Annotation_Annotation(a, this.options);
|
16333 | content.push(annotation);
|
16334 | }
|
16335 | return content;
|
16336 | };
|
16337 | Canvas.prototype.getDuration = function () {
|
16338 | return this.getProperty("duration");
|
16339 | };
|
16340 | Canvas.prototype.getImages = function () {
|
16341 | var images = [];
|
16342 | if (!this.__jsonld.images)
|
16343 | return images;
|
16344 | for (var i = 0; i < this.__jsonld.images.length; i++) {
|
16345 | var a = this.__jsonld.images[i];
|
16346 | var annotation = new Annotation_Annotation(a, this.options);
|
16347 | images.push(annotation);
|
16348 | }
|
16349 | return images;
|
16350 | };
|
16351 | Canvas.prototype.getIndex = function () {
|
16352 | return this.getProperty("index");
|
16353 | };
|
16354 | Canvas.prototype.getOtherContent = function () {
|
16355 | var _this = this;
|
16356 | var otherContent = Array.isArray(this.getProperty("otherContent"))
|
16357 | ? this.getProperty("otherContent")
|
16358 | : [this.getProperty("otherContent")];
|
16359 | var canonicalComparison = function (typeA, typeB) {
|
16360 | if (typeof typeA !== "string" || typeof typeB !== "string") {
|
16361 | return false;
|
16362 | }
|
16363 | return typeA.toLowerCase() === typeA.toLowerCase();
|
16364 | };
|
16365 | var otherPromises = otherContent
|
16366 | .filter(function (otherContent) {
|
16367 | return otherContent &&
|
16368 | canonicalComparison(otherContent["@type"], "sc:AnnotationList");
|
16369 | })
|
16370 | .map(function (annotationList, i) {
|
16371 | return new AnnotationList_AnnotationList(annotationList["label"] || "Annotation list " + i, annotationList, _this.options);
|
16372 | })
|
16373 | .map(function (annotationList) { return annotationList.load(); });
|
16374 | return Promise.all(otherPromises);
|
16375 | };
|
16376 |
|
16377 |
|
16378 |
|
16379 |
|
16380 |
|
16381 |
|
16382 |
|
16383 |
|
16384 |
|
16385 |
|
16386 |
|
16387 |
|
16388 |
|
16389 |
|
16390 |
|
16391 |
|
16392 |
|
16393 |
|
16394 |
|
16395 |
|
16396 |
|
16397 |
|
16398 |
|
16399 |
|
16400 |
|
16401 |
|
16402 |
|
16403 |
|
16404 |
|
16405 |
|
16406 |
|
16407 |
|
16408 | Canvas.prototype.getWidth = function () {
|
16409 | return this.getProperty("width");
|
16410 | };
|
16411 | Canvas.prototype.getHeight = function () {
|
16412 | return this.getProperty("height");
|
16413 | };
|
16414 | return Canvas;
|
16415 | }(Resource_Resource));
|
16416 |
|
16417 |
|
16418 |
|
16419 | var Collection_extends = (undefined && undefined.__extends) || (function () {
|
16420 | var extendStatics = function (d, b) {
|
16421 | extendStatics = Object.setPrototypeOf ||
|
16422 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
16423 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
16424 | return extendStatics(d, b);
|
16425 | };
|
16426 | return function (d, b) {
|
16427 | extendStatics(d, b);
|
16428 | function __() { this.constructor = d; }
|
16429 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
16430 | };
|
16431 | })();
|
16432 |
|
16433 |
|
16434 | var Collection_Collection = (function (_super) {
|
16435 | Collection_extends(Collection, _super);
|
16436 | function Collection(jsonld, options) {
|
16437 | var _this = _super.call(this, jsonld, options) || this;
|
16438 | _this.items = [];
|
16439 | _this._collections = null;
|
16440 | _this._manifests = null;
|
16441 | jsonld.__collection = _this;
|
16442 | return _this;
|
16443 | }
|
16444 | Collection.prototype.getCollections = function () {
|
16445 | if (this._collections) {
|
16446 | return this._collections;
|
16447 | }
|
16448 | return (this._collections = (this.items.filter(function (m) { return m.isCollection(); })));
|
16449 | };
|
16450 | Collection.prototype.getManifests = function () {
|
16451 | if (this._manifests) {
|
16452 | return this._manifests;
|
16453 | }
|
16454 | return (this._manifests = (this.items.filter(function (m) { return m.isManifest(); })));
|
16455 | };
|
16456 | Collection.prototype.getCollectionByIndex = function (collectionIndex) {
|
16457 | var collections = this.getCollections();
|
16458 | var collection;
|
16459 | for (var i = 0; i < collections.length; i++) {
|
16460 | var c = collections[i];
|
16461 | if (c.index === collectionIndex) {
|
16462 | collection = c;
|
16463 | }
|
16464 | }
|
16465 | if (collection) {
|
16466 | collection.options.index = collectionIndex;
|
16467 |
|
16468 | return collection.load();
|
16469 | }
|
16470 | else {
|
16471 | throw new Error("Collection index not found");
|
16472 | }
|
16473 | };
|
16474 | Collection.prototype.getManifestByIndex = function (manifestIndex) {
|
16475 | var manifests = this.getManifests();
|
16476 | var manifest;
|
16477 | for (var i = 0; i < manifests.length; i++) {
|
16478 | var m = manifests[i];
|
16479 | if (m.index === manifestIndex) {
|
16480 | manifest = m;
|
16481 | }
|
16482 | }
|
16483 | if (manifest) {
|
16484 | manifest.options.index = manifestIndex;
|
16485 | return manifest.load();
|
16486 | }
|
16487 | else {
|
16488 | throw new Error("Manifest index not found");
|
16489 | }
|
16490 | };
|
16491 | Collection.prototype.getTotalCollections = function () {
|
16492 | return this.getCollections().length;
|
16493 | };
|
16494 | Collection.prototype.getTotalManifests = function () {
|
16495 | return this.getManifests().length;
|
16496 | };
|
16497 | Collection.prototype.getTotalItems = function () {
|
16498 | return this.items.length;
|
16499 | };
|
16500 | Collection.prototype.getViewingDirection = function () {
|
16501 | if (this.getProperty("viewingDirection")) {
|
16502 | return this.getProperty("viewingDirection");
|
16503 | }
|
16504 | return dist_commonjs["ViewingDirection"].LEFT_TO_RIGHT;
|
16505 | };
|
16506 | |
16507 |
|
16508 |
|
16509 | Collection.prototype.getDefaultTree = function () {
|
16510 | _super.prototype.getDefaultTree.call(this);
|
16511 |
|
16512 | this.defaultTree.data.type = Utils_Utils.normaliseType(TreeNodeType.COLLECTION);
|
16513 | this._parseManifests(this);
|
16514 | this._parseCollections(this);
|
16515 | Utils_Utils.generateTreeNodeIds(this.defaultTree);
|
16516 | return this.defaultTree;
|
16517 | };
|
16518 | Collection.prototype._parseManifests = function (parentCollection) {
|
16519 | if (parentCollection.getManifests() &&
|
16520 | parentCollection.getManifests().length) {
|
16521 | for (var i = 0; i < parentCollection.getManifests().length; i++) {
|
16522 | var manifest = parentCollection.getManifests()[i];
|
16523 | var tree = manifest.getDefaultTree();
|
16524 | tree.label =
|
16525 | manifest.parentLabel ||
|
16526 | LanguageMap_LanguageMap.getValue(manifest.getLabel(), this.options.locale) ||
|
16527 | "manifest " + (i + 1);
|
16528 | tree.navDate = manifest.getNavDate();
|
16529 | tree.data.id = manifest.id;
|
16530 | tree.data.type = Utils_Utils.normaliseType(TreeNodeType.MANIFEST);
|
16531 | parentCollection.defaultTree.addNode(tree);
|
16532 | }
|
16533 | }
|
16534 | };
|
16535 | Collection.prototype._parseCollections = function (parentCollection) {
|
16536 |
|
16537 | if (parentCollection.getCollections() &&
|
16538 | parentCollection.getCollections().length) {
|
16539 | for (var i = 0; i < parentCollection.getCollections().length; i++) {
|
16540 | var collection = parentCollection.getCollections()[i];
|
16541 | var tree = collection.getDefaultTree();
|
16542 | tree.label =
|
16543 | collection.parentLabel ||
|
16544 | LanguageMap_LanguageMap.getValue(collection.getLabel(), this.options.locale) ||
|
16545 | "collection " + (i + 1);
|
16546 | tree.navDate = collection.getNavDate();
|
16547 | tree.data.id = collection.id;
|
16548 | tree.data.type = Utils_Utils.normaliseType(TreeNodeType.COLLECTION);
|
16549 | parentCollection.defaultTree.addNode(tree);
|
16550 | }
|
16551 | }
|
16552 | };
|
16553 | return Collection;
|
16554 | }(IIIFResource_IIIFResource));
|
16555 |
|
16556 |
|
16557 |
|
16558 | var Duration = (function () {
|
16559 | function Duration(start, end) {
|
16560 | this.start = start;
|
16561 | this.end = end;
|
16562 | }
|
16563 | Duration.prototype.getLength = function () {
|
16564 | return this.end - this.start;
|
16565 | };
|
16566 | return Duration;
|
16567 | }());
|
16568 |
|
16569 |
|
16570 |
|
16571 |
|
16572 | var LabelValuePair_LabelValuePair = (function () {
|
16573 | function LabelValuePair(defaultLocale) {
|
16574 | this.defaultLocale = defaultLocale;
|
16575 | }
|
16576 | LabelValuePair.prototype.parse = function (resource) {
|
16577 | this.resource = resource;
|
16578 | this.label = LanguageMap_LanguageMap.parse(this.resource.label, this.defaultLocale);
|
16579 | this.value = LanguageMap_LanguageMap.parse(this.resource.value, this.defaultLocale);
|
16580 | };
|
16581 |
|
16582 | LabelValuePair.prototype.getLabel = function () {
|
16583 | if (this.label) {
|
16584 | return LanguageMap_LanguageMap.getValue(this.label, this.defaultLocale);
|
16585 | }
|
16586 | return null;
|
16587 | };
|
16588 | LabelValuePair.prototype.setLabel = function (value) {
|
16589 | var _this = this;
|
16590 | if (this.label && this.label.length) {
|
16591 | var t = this.label.filter(function (x) {
|
16592 | return x.locale === _this.defaultLocale ||
|
16593 | x.locale === Utils_Utils.getInexactLocale(_this.defaultLocale);
|
16594 | })[0];
|
16595 | if (t)
|
16596 | t.value = value;
|
16597 | }
|
16598 | };
|
16599 | LabelValuePair.prototype.getValue = function () {
|
16600 | if (this.value) {
|
16601 | var locale = this.defaultLocale;
|
16602 |
|
16603 | if (this.label && this.label.length && this.label[0].locale) {
|
16604 | locale = this.label[0].locale;
|
16605 | }
|
16606 | return LanguageMap_LanguageMap.getValue(this.value, locale);
|
16607 | }
|
16608 | return null;
|
16609 | };
|
16610 | LabelValuePair.prototype.getValues = function () {
|
16611 | if (this.value) {
|
16612 | var locale = this.defaultLocale;
|
16613 |
|
16614 | if (this.label && this.label.length && this.label[0].locale) {
|
16615 | locale = this.label[0].locale;
|
16616 | }
|
16617 | return LanguageMap_LanguageMap.getValues(this.value, locale);
|
16618 | }
|
16619 | return [];
|
16620 | };
|
16621 | LabelValuePair.prototype.setValue = function (value) {
|
16622 | var _this = this;
|
16623 | if (this.value && this.value.length) {
|
16624 | var t = this.value.filter(function (x) {
|
16625 | return x.locale === _this.defaultLocale ||
|
16626 | x.locale === Utils_Utils.getInexactLocale(_this.defaultLocale);
|
16627 | })[0];
|
16628 | if (t)
|
16629 | t.value = value;
|
16630 | }
|
16631 | };
|
16632 | return LabelValuePair;
|
16633 | }());
|
16634 |
|
16635 |
|
16636 |
|
16637 | var Language = (function () {
|
16638 | function Language(value, locale) {
|
16639 | if (Array.isArray(value)) {
|
16640 | if (value.length === 1) {
|
16641 | this.value = value[0];
|
16642 | }
|
16643 | else {
|
16644 |
|
16645 | this.value = value.join("<br/>");
|
16646 | }
|
16647 | }
|
16648 | else {
|
16649 | this.value = value;
|
16650 | }
|
16651 | this.locale = locale;
|
16652 | }
|
16653 | return Language;
|
16654 | }());
|
16655 |
|
16656 |
|
16657 |
|
16658 | var LanguageMap_extends = (undefined && undefined.__extends) || (function () {
|
16659 | var extendStatics = function (d, b) {
|
16660 | extendStatics = Object.setPrototypeOf ||
|
16661 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
16662 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
16663 | return extendStatics(d, b);
|
16664 | };
|
16665 | return function (d, b) {
|
16666 | extendStatics(d, b);
|
16667 | function __() { this.constructor = d; }
|
16668 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
16669 | };
|
16670 | })();
|
16671 |
|
16672 | var LanguageMap_LanguageMap = (function (_super) {
|
16673 | LanguageMap_extends(LanguageMap, _super);
|
16674 | function LanguageMap() {
|
16675 | return _super !== null && _super.apply(this, arguments) || this;
|
16676 | }
|
16677 | LanguageMap.parse = function (language, defaultLocale) {
|
16678 | var tc = [];
|
16679 | var t;
|
16680 | if (!language) {
|
16681 | return tc;
|
16682 | }
|
16683 | else if (Array.isArray(language)) {
|
16684 | for (var i = 0; i < language.length; i++) {
|
16685 | var value = language[i];
|
16686 | if (typeof value === "string") {
|
16687 | t = new Language(value, defaultLocale);
|
16688 | }
|
16689 | else {
|
16690 | t = new Language(value["@value"], value["@language"] || defaultLocale);
|
16691 | }
|
16692 | tc.push(t);
|
16693 | }
|
16694 | }
|
16695 | else if (typeof language === "string") {
|
16696 |
|
16697 | t = new Language(language, defaultLocale);
|
16698 | tc.push(t);
|
16699 | return tc;
|
16700 | }
|
16701 | else {
|
16702 |
|
16703 | if (language["@value"]) {
|
16704 |
|
16705 | t = new Language(language["@value"], language["@language"] || defaultLocale);
|
16706 | tc.push(t);
|
16707 | }
|
16708 | else {
|
16709 |
|
16710 | Object.keys(language).forEach(function (key) {
|
16711 |
|
16712 | if (language[key].length) {
|
16713 | t = new Language(language[key], key);
|
16714 | tc.push(t);
|
16715 | }
|
16716 | else {
|
16717 | throw new Error("language must have a value");
|
16718 | }
|
16719 | });
|
16720 | }
|
16721 | }
|
16722 | return tc;
|
16723 | };
|
16724 | LanguageMap.getValue = function (languageCollection, locale) {
|
16725 | if (languageCollection.length) {
|
16726 | if (locale) {
|
16727 | var language = languageCollection.filter(function (t) {
|
16728 | return t.locale === locale ||
|
16729 | Utils_Utils.getInexactLocale(t.locale) === Utils_Utils.getInexactLocale(locale);
|
16730 | })[0];
|
16731 | if (language) {
|
16732 | return language.value;
|
16733 | }
|
16734 | }
|
16735 |
|
16736 | return languageCollection[0].value;
|
16737 | }
|
16738 | return null;
|
16739 | };
|
16740 | LanguageMap.getValues = function (languageCollection, locale) {
|
16741 | if (languageCollection.length) {
|
16742 | if (locale) {
|
16743 | return languageCollection
|
16744 | .filter(function (t) {
|
16745 | return t.locale === locale ||
|
16746 | Utils_Utils.getInexactLocale(t.locale) ===
|
16747 | Utils_Utils.getInexactLocale(locale);
|
16748 | })
|
16749 | .map(function (language) { return language.value; });
|
16750 | }
|
16751 |
|
16752 | return languageCollection.map(function (language) { return language.value; });
|
16753 | }
|
16754 | return [];
|
16755 | };
|
16756 | return LanguageMap;
|
16757 | }(Array));
|
16758 |
|
16759 |
|
16760 |
|
16761 | var Manifest_extends = (undefined && undefined.__extends) || (function () {
|
16762 | var extendStatics = function (d, b) {
|
16763 | extendStatics = Object.setPrototypeOf ||
|
16764 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
16765 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
16766 | return extendStatics(d, b);
|
16767 | };
|
16768 | return function (d, b) {
|
16769 | extendStatics(d, b);
|
16770 | function __() { this.constructor = d; }
|
16771 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
16772 | };
|
16773 | })();
|
16774 |
|
16775 |
|
16776 | var Manifest_Manifest = (function (_super) {
|
16777 | Manifest_extends(Manifest, _super);
|
16778 | function Manifest(jsonld, options) {
|
16779 | var _this = _super.call(this, jsonld, options) || this;
|
16780 | _this.index = 0;
|
16781 | _this._allRanges = null;
|
16782 | _this.items = [];
|
16783 | _this._topRanges = [];
|
16784 | if (_this.__jsonld.structures && _this.__jsonld.structures.length) {
|
16785 | var topRanges = _this._getTopRanges();
|
16786 | for (var i = 0; i < topRanges.length; i++) {
|
16787 | var range = topRanges[i];
|
16788 | _this._parseRanges(range, String(i));
|
16789 | }
|
16790 | }
|
16791 | return _this;
|
16792 | }
|
16793 | Manifest.prototype.getPosterCanvas = function () {
|
16794 | var posterCanvas = this.getProperty("posterCanvas");
|
16795 | if (posterCanvas) {
|
16796 | posterCanvas = new Canvas_Canvas(posterCanvas, this.options);
|
16797 | }
|
16798 | return posterCanvas;
|
16799 | };
|
16800 | Manifest.prototype.getBehavior = function () {
|
16801 | var behavior = this.getProperty("behavior");
|
16802 | if (Array.isArray(behavior)) {
|
16803 | behavior = behavior[0];
|
16804 | }
|
16805 | if (behavior) {
|
16806 | return behavior;
|
16807 | }
|
16808 | return null;
|
16809 | };
|
16810 | Manifest.prototype.getDefaultTree = function () {
|
16811 | _super.prototype.getDefaultTree.call(this);
|
16812 | this.defaultTree.data.type = Utils_Utils.normaliseType(TreeNodeType.MANIFEST);
|
16813 | if (!this.isLoaded) {
|
16814 | return this.defaultTree;
|
16815 | }
|
16816 | var topRanges = this.getTopRanges();
|
16817 |
|
16818 | if (topRanges.length) {
|
16819 | topRanges[0].getTree(this.defaultTree);
|
16820 | }
|
16821 | Utils_Utils.generateTreeNodeIds(this.defaultTree);
|
16822 | return this.defaultTree;
|
16823 | };
|
16824 | Manifest.prototype._getTopRanges = function () {
|
16825 | var topRanges = [];
|
16826 | if (this.__jsonld.structures && this.__jsonld.structures.length) {
|
16827 | for (var i = 0; i < this.__jsonld.structures.length; i++) {
|
16828 | var json = this.__jsonld.structures[i];
|
16829 | if (json.viewingHint === dist_commonjs["ViewingHint"].TOP) {
|
16830 | topRanges.push(json);
|
16831 | }
|
16832 | }
|
16833 |
|
16834 | if (!topRanges.length) {
|
16835 | var range = {};
|
16836 | range.ranges = this.__jsonld.structures;
|
16837 | topRanges.push(range);
|
16838 | }
|
16839 | }
|
16840 | return topRanges;
|
16841 | };
|
16842 | Manifest.prototype.getTopRanges = function () {
|
16843 | return this._topRanges;
|
16844 | };
|
16845 | Manifest.prototype._getRangeById = function (id) {
|
16846 | if (this.__jsonld.structures && this.__jsonld.structures.length) {
|
16847 | for (var i = 0; i < this.__jsonld.structures.length; i++) {
|
16848 | var r = this.__jsonld.structures[i];
|
16849 | if (r["@id"] === id || r.id === id) {
|
16850 | return r;
|
16851 | }
|
16852 | }
|
16853 | }
|
16854 | return null;
|
16855 | };
|
16856 |
|
16857 |
|
16858 |
|
16859 |
|
16860 |
|
16861 | Manifest.prototype._parseRanges = function (r, path, parentRange) {
|
16862 | var range;
|
16863 | var id = null;
|
16864 | if (typeof r === "string") {
|
16865 | id = r;
|
16866 | r = this._getRangeById(id);
|
16867 | }
|
16868 | if (!r) {
|
16869 | console.warn("Range:", id, "does not exist");
|
16870 | return;
|
16871 | }
|
16872 | range = new Range_Range(r, this.options);
|
16873 | range.parentRange = parentRange;
|
16874 | range.path = path;
|
16875 | if (!parentRange) {
|
16876 | this._topRanges.push(range);
|
16877 | }
|
16878 | else {
|
16879 | parentRange.items.push(range);
|
16880 | }
|
16881 | var items = r.items || r.members;
|
16882 | if (items) {
|
16883 | for (var i = 0; i < items.length; i++) {
|
16884 | var item = items[i];
|
16885 |
|
16886 | if ((item["@type"] && item["@type"].toLowerCase() === "sc:range") ||
|
16887 | (item["type"] && item["type"].toLowerCase() === "range")) {
|
16888 | this._parseRanges(item, path + "/" + i, range);
|
16889 | }
|
16890 | else if ((item["@type"] && item["@type"].toLowerCase() === "sc:canvas") ||
|
16891 | (item["type"] && item["type"].toLowerCase() === "canvas")) {
|
16892 |
|
16893 | if (!range.canvases) {
|
16894 | range.canvases = [];
|
16895 | }
|
16896 | var id_1 = item.id || item["@id"];
|
16897 | range.canvases.push(id_1);
|
16898 | }
|
16899 | }
|
16900 | }
|
16901 | else if (r.ranges) {
|
16902 | for (var i = 0; i < r.ranges.length; i++) {
|
16903 | this._parseRanges(r.ranges[i], path + "/" + i, range);
|
16904 | }
|
16905 | }
|
16906 | };
|
16907 | Manifest.prototype.getAllRanges = function () {
|
16908 | if (this._allRanges != null)
|
16909 | return this._allRanges;
|
16910 | this._allRanges = [];
|
16911 | var topRanges = this.getTopRanges();
|
16912 | var _loop_1 = function (i) {
|
16913 | var topRange = topRanges[i];
|
16914 | if (topRange.id) {
|
16915 | this_1._allRanges.push(topRange);
|
16916 | }
|
16917 | var reducer = function (acc, next) {
|
16918 | acc.add(next);
|
16919 | var nextRanges = next.getRanges();
|
16920 | if (nextRanges.length) {
|
16921 | return nextRanges.reduce(reducer, acc);
|
16922 | }
|
16923 | return acc;
|
16924 | };
|
16925 | var subRanges = Array.from(topRange.getRanges().reduce(reducer, new Set()));
|
16926 | this_1._allRanges = this_1._allRanges.concat(subRanges);
|
16927 | };
|
16928 | var this_1 = this;
|
16929 | for (var i = 0; i < topRanges.length; i++) {
|
16930 | _loop_1(i);
|
16931 | }
|
16932 | return this._allRanges;
|
16933 | };
|
16934 | Manifest.prototype.getRangeById = function (id) {
|
16935 | var ranges = this.getAllRanges();
|
16936 | for (var i = 0; i < ranges.length; i++) {
|
16937 | var range = ranges[i];
|
16938 | if (range.id === id) {
|
16939 | return range;
|
16940 | }
|
16941 | }
|
16942 | return null;
|
16943 | };
|
16944 | Manifest.prototype.getRangeByPath = function (path) {
|
16945 | var ranges = this.getAllRanges();
|
16946 | for (var i = 0; i < ranges.length; i++) {
|
16947 | var range = ranges[i];
|
16948 | if (range.path === path) {
|
16949 | return range;
|
16950 | }
|
16951 | }
|
16952 | return null;
|
16953 | };
|
16954 | Manifest.prototype.getSequences = function () {
|
16955 | if (this.items.length) {
|
16956 | return this.items;
|
16957 | }
|
16958 |
|
16959 |
|
16960 | var items = this.__jsonld.mediaSequences || this.__jsonld.sequences;
|
16961 | if (items) {
|
16962 | for (var i = 0; i < items.length; i++) {
|
16963 | var s = items[i];
|
16964 | var sequence = new Sequence_Sequence(s, this.options);
|
16965 | this.items.push(sequence);
|
16966 | }
|
16967 | }
|
16968 | else if (this.__jsonld.items) {
|
16969 | var sequence = new Sequence_Sequence(this.__jsonld.items, this.options);
|
16970 | this.items.push(sequence);
|
16971 | }
|
16972 | return this.items;
|
16973 | };
|
16974 | Manifest.prototype.getSequenceByIndex = function (sequenceIndex) {
|
16975 | return this.getSequences()[sequenceIndex];
|
16976 | };
|
16977 | Manifest.prototype.getTotalSequences = function () {
|
16978 | return this.getSequences().length;
|
16979 | };
|
16980 | Manifest.prototype.getManifestType = function () {
|
16981 | var service = (this.getService(dist_commonjs["ServiceProfile"].UI_EXTENSIONS));
|
16982 | if (service) {
|
16983 | return service.getProperty("manifestType");
|
16984 | }
|
16985 | return ManifestType.EMPTY;
|
16986 | };
|
16987 | Manifest.prototype.isMultiSequence = function () {
|
16988 | return this.getTotalSequences() > 1;
|
16989 | };
|
16990 | Manifest.prototype.isPagingEnabled = function () {
|
16991 | var viewingHint = this.getViewingHint();
|
16992 | if (viewingHint) {
|
16993 | return viewingHint === dist_commonjs["ViewingHint"].PAGED;
|
16994 | }
|
16995 | var behavior = this.getBehavior();
|
16996 | if (behavior) {
|
16997 | return behavior === dist_commonjs["Behavior"].PAGED;
|
16998 | }
|
16999 | return false;
|
17000 | };
|
17001 | Manifest.prototype.getViewingDirection = function () {
|
17002 | return this.getProperty("viewingDirection");
|
17003 | };
|
17004 | Manifest.prototype.getViewingHint = function () {
|
17005 | return this.getProperty("viewingHint");
|
17006 | };
|
17007 | return Manifest;
|
17008 | }(IIIFResource_IIIFResource));
|
17009 |
|
17010 |
|
17011 |
|
17012 | var ManifestType;
|
17013 | (function (ManifestType) {
|
17014 | ManifestType["EMPTY"] = "";
|
17015 | ManifestType["MANUSCRIPT"] = "manuscript";
|
17016 | ManifestType["MONOGRAPH"] = "monograph";
|
17017 | })(ManifestType || (ManifestType = {}));
|
17018 |
|
17019 |
|
17020 | var Range_extends = (undefined && undefined.__extends) || (function () {
|
17021 | var extendStatics = function (d, b) {
|
17022 | extendStatics = Object.setPrototypeOf ||
|
17023 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
17024 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
17025 | return extendStatics(d, b);
|
17026 | };
|
17027 | return function (d, b) {
|
17028 | extendStatics(d, b);
|
17029 | function __() { this.constructor = d; }
|
17030 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
17031 | };
|
17032 | })();
|
17033 |
|
17034 |
|
17035 | var Range_Range = (function (_super) {
|
17036 | Range_extends(Range, _super);
|
17037 | function Range(jsonld, options) {
|
17038 | var _this = _super.call(this, jsonld, options) || this;
|
17039 | _this._ranges = null;
|
17040 | _this.canvases = null;
|
17041 | _this.items = [];
|
17042 | return _this;
|
17043 | }
|
17044 | Range.prototype.getCanvasIds = function () {
|
17045 | if (this.__jsonld.canvases) {
|
17046 | return this.__jsonld.canvases;
|
17047 | }
|
17048 | else if (this.canvases) {
|
17049 | return this.canvases;
|
17050 | }
|
17051 | return [];
|
17052 | };
|
17053 | Range.prototype.getDuration = function () {
|
17054 | var start;
|
17055 | var end;
|
17056 | if (this.canvases && this.canvases.length) {
|
17057 | for (var i = 0; i < this.canvases.length; i++) {
|
17058 | var canvas = this.canvases[i];
|
17059 | var temporal = Utils_Utils.getTemporalComponent(canvas);
|
17060 | if (temporal && temporal.length > 1) {
|
17061 | if (i === 0) {
|
17062 | start = Number(temporal[0]);
|
17063 | }
|
17064 | if (i === this.canvases.length - 1) {
|
17065 | end = Number(temporal[1]);
|
17066 | }
|
17067 | }
|
17068 | }
|
17069 | }
|
17070 | else {
|
17071 |
|
17072 | var childRanges = this.getRanges();
|
17073 | for (var i = 0; i < childRanges.length; i++) {
|
17074 | var childRange = childRanges[i];
|
17075 | var duration = childRange.getDuration();
|
17076 | if (duration) {
|
17077 | if (i === 0) {
|
17078 | start = duration.start;
|
17079 | }
|
17080 | if (i === childRanges.length - 1) {
|
17081 | end = duration.end;
|
17082 | }
|
17083 | }
|
17084 | }
|
17085 | }
|
17086 | if (start !== undefined && end !== undefined) {
|
17087 | return new Duration(start, end);
|
17088 | }
|
17089 | return undefined;
|
17090 | };
|
17091 |
|
17092 |
|
17093 |
|
17094 |
|
17095 |
|
17096 |
|
17097 | Range.prototype.getRanges = function () {
|
17098 | if (this._ranges) {
|
17099 | return this._ranges;
|
17100 | }
|
17101 | return (this._ranges = this.items.filter(function (m) { return m.isRange(); }));
|
17102 | };
|
17103 | Range.prototype.getBehavior = function () {
|
17104 | var behavior = this.getProperty("behavior");
|
17105 | if (Array.isArray(behavior)) {
|
17106 | behavior = behavior[0];
|
17107 | }
|
17108 | if (behavior) {
|
17109 | return behavior;
|
17110 | }
|
17111 | return null;
|
17112 | };
|
17113 | Range.prototype.getViewingDirection = function () {
|
17114 | return this.getProperty("viewingDirection");
|
17115 | };
|
17116 | Range.prototype.getViewingHint = function () {
|
17117 | return this.getProperty("viewingHint");
|
17118 | };
|
17119 | Range.prototype.getTree = function (treeRoot) {
|
17120 | treeRoot.data = this;
|
17121 | this.treeNode = treeRoot;
|
17122 | var ranges = this.getRanges();
|
17123 | if (ranges && ranges.length) {
|
17124 | for (var i = 0; i < ranges.length; i++) {
|
17125 | var range = ranges[i];
|
17126 | var node = new TreeNode_TreeNode();
|
17127 | treeRoot.addNode(node);
|
17128 | this._parseTreeNode(node, range);
|
17129 | }
|
17130 | }
|
17131 | Utils_Utils.generateTreeNodeIds(treeRoot);
|
17132 | return treeRoot;
|
17133 | };
|
17134 | Range.prototype.spansTime = function (time) {
|
17135 | var duration = this.getDuration();
|
17136 | if (duration) {
|
17137 | if (time >= duration.start && time <= duration.end) {
|
17138 | return true;
|
17139 | }
|
17140 | }
|
17141 | return false;
|
17142 | };
|
17143 | Range.prototype._parseTreeNode = function (node, range) {
|
17144 | node.label = (LanguageMap_LanguageMap.getValue(range.getLabel(), this.options.locale));
|
17145 | node.data = range;
|
17146 | node.data.type = Utils_Utils.normaliseType(TreeNodeType.RANGE);
|
17147 | range.treeNode = node;
|
17148 | var ranges = range.getRanges();
|
17149 | if (ranges && ranges.length) {
|
17150 | for (var i = 0; i < ranges.length; i++) {
|
17151 | var childRange = ranges[i];
|
17152 | var behavior = childRange.getBehavior();
|
17153 | if (behavior === dist_commonjs["Behavior"].NO_NAV) {
|
17154 | continue;
|
17155 | }
|
17156 | else {
|
17157 | var childNode = new TreeNode_TreeNode();
|
17158 | node.addNode(childNode);
|
17159 | this._parseTreeNode(childNode, childRange);
|
17160 | }
|
17161 | }
|
17162 | }
|
17163 | };
|
17164 | return Range;
|
17165 | }(ManifestResource_ManifestResource));
|
17166 |
|
17167 |
|
17168 |
|
17169 | var Rendering_extends = (undefined && undefined.__extends) || (function () {
|
17170 | var extendStatics = function (d, b) {
|
17171 | extendStatics = Object.setPrototypeOf ||
|
17172 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
17173 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
17174 | return extendStatics(d, b);
|
17175 | };
|
17176 | return function (d, b) {
|
17177 | extendStatics(d, b);
|
17178 | function __() { this.constructor = d; }
|
17179 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
17180 | };
|
17181 | })();
|
17182 |
|
17183 | var Rendering = (function (_super) {
|
17184 | Rendering_extends(Rendering, _super);
|
17185 | function Rendering(jsonld, options) {
|
17186 | return _super.call(this, jsonld, options) || this;
|
17187 | }
|
17188 | Rendering.prototype.getFormat = function () {
|
17189 | return this.getProperty("format");
|
17190 | };
|
17191 | return Rendering;
|
17192 | }(ManifestResource_ManifestResource));
|
17193 |
|
17194 |
|
17195 |
|
17196 | var Sequence_extends = (undefined && undefined.__extends) || (function () {
|
17197 | var extendStatics = function (d, b) {
|
17198 | extendStatics = Object.setPrototypeOf ||
|
17199 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
17200 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
17201 | return extendStatics(d, b);
|
17202 | };
|
17203 | return function (d, b) {
|
17204 | extendStatics(d, b);
|
17205 | function __() { this.constructor = d; }
|
17206 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
17207 | };
|
17208 | })();
|
17209 |
|
17210 |
|
17211 | var Sequence_Sequence = (function (_super) {
|
17212 | Sequence_extends(Sequence, _super);
|
17213 | function Sequence(jsonld, options) {
|
17214 | var _this = _super.call(this, jsonld, options) || this;
|
17215 | _this.items = [];
|
17216 | _this._thumbnails = null;
|
17217 | return _this;
|
17218 | }
|
17219 | Sequence.prototype.getCanvases = function () {
|
17220 | if (this.items.length) {
|
17221 | return this.items;
|
17222 | }
|
17223 | var items = this.__jsonld.canvases || this.__jsonld.elements;
|
17224 | if (items) {
|
17225 | for (var i = 0; i < items.length; i++) {
|
17226 | var c = items[i];
|
17227 | var canvas = new Canvas_Canvas(c, this.options);
|
17228 | canvas.index = i;
|
17229 | this.items.push(canvas);
|
17230 | }
|
17231 | }
|
17232 | else if (this.__jsonld) {
|
17233 | for (var i = 0; i < this.__jsonld.length; i++) {
|
17234 | var c = this.__jsonld[i];
|
17235 | var canvas = new Canvas_Canvas(c, this.options);
|
17236 | canvas.index = i;
|
17237 | this.items.push(canvas);
|
17238 | }
|
17239 | }
|
17240 | return this.items;
|
17241 | };
|
17242 | Sequence.prototype.getCanvasById = function (id) {
|
17243 | for (var i = 0; i < this.getTotalCanvases(); i++) {
|
17244 | var canvas = this.getCanvasByIndex(i);
|
17245 |
|
17246 | var canvasId = Utils_Utils.normaliseUrl(canvas.id);
|
17247 | if (Utils_Utils.normaliseUrl(id) === canvasId) {
|
17248 | return canvas;
|
17249 | }
|
17250 | }
|
17251 | return null;
|
17252 | };
|
17253 | Sequence.prototype.getCanvasByIndex = function (canvasIndex) {
|
17254 | return this.getCanvases()[canvasIndex];
|
17255 | };
|
17256 | Sequence.prototype.getCanvasIndexById = function (id) {
|
17257 | for (var i = 0; i < this.getTotalCanvases(); i++) {
|
17258 | var canvas = this.getCanvasByIndex(i);
|
17259 | if (canvas.id === id) {
|
17260 | return i;
|
17261 | }
|
17262 | }
|
17263 | return null;
|
17264 | };
|
17265 | Sequence.prototype.getCanvasIndexByLabel = function (label, foliated) {
|
17266 | label = label.trim();
|
17267 | if (!isNaN(label)) {
|
17268 |
|
17269 | label = parseInt(label, 10).toString();
|
17270 | if (foliated)
|
17271 | label += "r";
|
17272 | }
|
17273 | var doublePageRegExp = /(\d*)\D+(\d*)/;
|
17274 | var match, regExp, regStr, labelPart1, labelPart2;
|
17275 | for (var i = 0; i < this.getTotalCanvases(); i++) {
|
17276 | var canvas = this.getCanvasByIndex(i);
|
17277 |
|
17278 | if (LanguageMap_LanguageMap.getValue(canvas.getLabel(), this.options.locale) === label) {
|
17279 | return i;
|
17280 | }
|
17281 |
|
17282 | match = doublePageRegExp.exec(label);
|
17283 | if (!match)
|
17284 | continue;
|
17285 | labelPart1 = match[1];
|
17286 | labelPart2 = match[2];
|
17287 | if (!labelPart2)
|
17288 | continue;
|
17289 | regStr = "^" + labelPart1 + "\\D+" + labelPart2 + "$";
|
17290 | regExp = new RegExp(regStr);
|
17291 | if (regExp.test(canvas.getLabel().toString())) {
|
17292 | return i;
|
17293 | }
|
17294 | }
|
17295 | return -1;
|
17296 | };
|
17297 | Sequence.prototype.getLastCanvasLabel = function (alphanumeric) {
|
17298 | for (var i = this.getTotalCanvases() - 1; i >= 0; i--) {
|
17299 | var canvas = this.getCanvasByIndex(i);
|
17300 | var label = (LanguageMap_LanguageMap.getValue(canvas.getLabel(), this.options.locale));
|
17301 | if (alphanumeric) {
|
17302 | var regExp = /^[a-zA-Z0-9]*$/;
|
17303 | if (regExp.test(label)) {
|
17304 | return label;
|
17305 | }
|
17306 | }
|
17307 | else if (label) {
|
17308 | return label;
|
17309 | }
|
17310 | }
|
17311 | return this.options.defaultLabel;
|
17312 | };
|
17313 | Sequence.prototype.getLastPageIndex = function () {
|
17314 | return this.getTotalCanvases() - 1;
|
17315 | };
|
17316 | Sequence.prototype.getNextPageIndex = function (canvasIndex, pagingEnabled) {
|
17317 | var index;
|
17318 | if (pagingEnabled) {
|
17319 | var indices = this.getPagedIndices(canvasIndex);
|
17320 | var viewingDirection = this.getViewingDirection();
|
17321 | if (viewingDirection &&
|
17322 | viewingDirection === dist_commonjs["ViewingDirection"].RIGHT_TO_LEFT) {
|
17323 | index = indices[0] + 1;
|
17324 | }
|
17325 | else {
|
17326 | index = indices[indices.length - 1] + 1;
|
17327 | }
|
17328 | }
|
17329 | else {
|
17330 | index = canvasIndex + 1;
|
17331 | }
|
17332 | if (index > this.getLastPageIndex()) {
|
17333 | return -1;
|
17334 | }
|
17335 | return index;
|
17336 | };
|
17337 | Sequence.prototype.getPagedIndices = function (canvasIndex, pagingEnabled) {
|
17338 | var indices = [];
|
17339 | if (!pagingEnabled) {
|
17340 | indices.push(canvasIndex);
|
17341 | }
|
17342 | else {
|
17343 | if (this.isFirstCanvas(canvasIndex) || this.isLastCanvas(canvasIndex)) {
|
17344 | indices = [canvasIndex];
|
17345 | }
|
17346 | else if (canvasIndex % 2) {
|
17347 | indices = [canvasIndex, canvasIndex + 1];
|
17348 | }
|
17349 | else {
|
17350 | indices = [canvasIndex - 1, canvasIndex];
|
17351 | }
|
17352 | var viewingDirection = this.getViewingDirection();
|
17353 | if (viewingDirection &&
|
17354 | viewingDirection === dist_commonjs["ViewingDirection"].RIGHT_TO_LEFT) {
|
17355 | indices = indices.reverse();
|
17356 | }
|
17357 | }
|
17358 | return indices;
|
17359 | };
|
17360 | Sequence.prototype.getPrevPageIndex = function (canvasIndex, pagingEnabled) {
|
17361 | var index;
|
17362 | if (pagingEnabled) {
|
17363 | var indices = this.getPagedIndices(canvasIndex);
|
17364 | var viewingDirection = this.getViewingDirection();
|
17365 | if (viewingDirection &&
|
17366 | viewingDirection === dist_commonjs["ViewingDirection"].RIGHT_TO_LEFT) {
|
17367 | index = indices[indices.length - 1] - 1;
|
17368 | }
|
17369 | else {
|
17370 | index = indices[0] - 1;
|
17371 | }
|
17372 | }
|
17373 | else {
|
17374 | index = canvasIndex - 1;
|
17375 | }
|
17376 | return index;
|
17377 | };
|
17378 | Sequence.prototype.getStartCanvasIndex = function () {
|
17379 | var startCanvas = this.getStartCanvas();
|
17380 | if (startCanvas) {
|
17381 |
|
17382 | for (var i = 0; i < this.getTotalCanvases(); i++) {
|
17383 | var canvas = this.getCanvasByIndex(i);
|
17384 | if (canvas.id === startCanvas)
|
17385 | return i;
|
17386 | }
|
17387 | }
|
17388 |
|
17389 | return 0;
|
17390 | };
|
17391 |
|
17392 | Sequence.prototype.getThumbs = function (width, height) {
|
17393 |
|
17394 | var thumbs = [];
|
17395 | var totalCanvases = this.getTotalCanvases();
|
17396 | for (var i = 0; i < totalCanvases; i++) {
|
17397 | var canvas = this.getCanvasByIndex(i);
|
17398 | var thumb = new Thumb_Thumb(width, canvas);
|
17399 | thumbs.push(thumb);
|
17400 | }
|
17401 | return thumbs;
|
17402 | };
|
17403 | Sequence.prototype.getThumbnails = function () {
|
17404 | if (this._thumbnails != null)
|
17405 | return this._thumbnails;
|
17406 | this._thumbnails = [];
|
17407 | var canvases = this.getCanvases();
|
17408 | for (var i = 0; i < canvases.length; i++) {
|
17409 | var thumbnail = canvases[i].getThumbnail();
|
17410 | if (thumbnail) {
|
17411 | this._thumbnails.push(thumbnail);
|
17412 | }
|
17413 | }
|
17414 | return this._thumbnails;
|
17415 | };
|
17416 | Sequence.prototype.getStartCanvas = function () {
|
17417 | return this.getProperty("startCanvas");
|
17418 | };
|
17419 | Sequence.prototype.getTotalCanvases = function () {
|
17420 | return this.getCanvases().length;
|
17421 | };
|
17422 | Sequence.prototype.getViewingDirection = function () {
|
17423 | if (this.getProperty("viewingDirection")) {
|
17424 | return this.getProperty("viewingDirection");
|
17425 | }
|
17426 | else if (this.options.resource.getViewingDirection) {
|
17427 | return this.options.resource.getViewingDirection();
|
17428 | }
|
17429 | return null;
|
17430 | };
|
17431 | Sequence.prototype.getViewingHint = function () {
|
17432 | return this.getProperty("viewingHint");
|
17433 | };
|
17434 | Sequence.prototype.isCanvasIndexOutOfRange = function (canvasIndex) {
|
17435 | return canvasIndex > this.getTotalCanvases() - 1;
|
17436 | };
|
17437 | Sequence.prototype.isFirstCanvas = function (canvasIndex) {
|
17438 | return canvasIndex === 0;
|
17439 | };
|
17440 | Sequence.prototype.isLastCanvas = function (canvasIndex) {
|
17441 | return canvasIndex === this.getTotalCanvases() - 1;
|
17442 | };
|
17443 | Sequence.prototype.isMultiCanvas = function () {
|
17444 | return this.getTotalCanvases() > 1;
|
17445 | };
|
17446 | Sequence.prototype.isPagingEnabled = function () {
|
17447 | var viewingHint = this.getViewingHint();
|
17448 | if (viewingHint) {
|
17449 | return viewingHint === dist_commonjs["ViewingHint"].PAGED;
|
17450 | }
|
17451 | return false;
|
17452 | };
|
17453 |
|
17454 | Sequence.prototype.isTotalCanvasesEven = function () {
|
17455 | return this.getTotalCanvases() % 2 === 0;
|
17456 | };
|
17457 | return Sequence;
|
17458 | }(ManifestResource_ManifestResource));
|
17459 |
|
17460 |
|
17461 |
|
17462 |
|
17463 | var Serialisation_Deserialiser = (function () {
|
17464 | function Deserialiser() {
|
17465 | }
|
17466 | Deserialiser.parse = function (manifest, options) {
|
17467 | if (typeof manifest === "string") {
|
17468 | manifest = JSON.parse(manifest);
|
17469 | }
|
17470 | return this.parseJson(manifest, options);
|
17471 | };
|
17472 | Deserialiser.parseJson = function (json, options) {
|
17473 | var resource;
|
17474 |
|
17475 | if (options) {
|
17476 | if (options.navDate && !isNaN(options.navDate.getTime())) {
|
17477 | json.navDate = options.navDate.toString();
|
17478 | }
|
17479 | }
|
17480 | if (json["@type"]) {
|
17481 | switch (json["@type"]) {
|
17482 | case "sc:Collection":
|
17483 | resource = this.parseCollection(json, options);
|
17484 | break;
|
17485 | case "sc:Manifest":
|
17486 | resource = this.parseManifest(json, options);
|
17487 | break;
|
17488 | default:
|
17489 | return null;
|
17490 | }
|
17491 | }
|
17492 | else {
|
17493 |
|
17494 | switch (json["type"]) {
|
17495 | case "Collection":
|
17496 | resource = this.parseCollection(json, options);
|
17497 | break;
|
17498 | case "Manifest":
|
17499 | resource = this.parseManifest(json, options);
|
17500 | break;
|
17501 | default:
|
17502 | return null;
|
17503 | }
|
17504 | }
|
17505 |
|
17506 |
|
17507 | resource.isLoaded = true;
|
17508 | return resource;
|
17509 | };
|
17510 | Deserialiser.parseCollection = function (json, options) {
|
17511 | var collection = new Collection_Collection(json, options);
|
17512 | if (options) {
|
17513 | collection.index = options.index || 0;
|
17514 | if (options.resource) {
|
17515 | collection.parentCollection = options.resource.parentCollection;
|
17516 | }
|
17517 | }
|
17518 | else {
|
17519 | collection.index = 0;
|
17520 | }
|
17521 | this.parseCollections(collection, options);
|
17522 | this.parseManifests(collection, options);
|
17523 | this.parseItems(collection, options);
|
17524 | return collection;
|
17525 | };
|
17526 | Deserialiser.parseCollections = function (collection, options) {
|
17527 | var items;
|
17528 | if (collection.__jsonld.collections) {
|
17529 | items = collection.__jsonld.collections;
|
17530 | }
|
17531 | else if (collection.__jsonld.items) {
|
17532 | items = collection.__jsonld.items.filter(function (m) { return m.type.toLowerCase() === "collection"; });
|
17533 | }
|
17534 | if (items) {
|
17535 | for (var i = 0; i < items.length; i++) {
|
17536 | if (options) {
|
17537 | options.index = i;
|
17538 | }
|
17539 | var item = this.parseCollection(items[i], options);
|
17540 | item.index = i;
|
17541 | item.parentCollection = collection;
|
17542 | collection.items.push(item);
|
17543 | }
|
17544 | }
|
17545 | };
|
17546 | Deserialiser.parseManifest = function (json, options) {
|
17547 | var manifest = new Manifest_Manifest(json, options);
|
17548 | return manifest;
|
17549 | };
|
17550 | Deserialiser.parseManifests = function (collection, options) {
|
17551 | var items;
|
17552 | if (collection.__jsonld.manifests) {
|
17553 | items = collection.__jsonld.manifests;
|
17554 | }
|
17555 | else if (collection.__jsonld.items) {
|
17556 | items = collection.__jsonld.items.filter(function (m) { return m.type.toLowerCase() === "manifest"; });
|
17557 | }
|
17558 | if (items) {
|
17559 | for (var i = 0; i < items.length; i++) {
|
17560 | var item = this.parseManifest(items[i], options);
|
17561 | item.index = i;
|
17562 | item.parentCollection = collection;
|
17563 | collection.items.push(item);
|
17564 | }
|
17565 | }
|
17566 | };
|
17567 | Deserialiser.parseItem = function (json, options) {
|
17568 | if (json["@type"]) {
|
17569 | if (json["@type"].toLowerCase() === "sc:manifest") {
|
17570 | return this.parseManifest(json, options);
|
17571 | }
|
17572 | else if (json["@type"].toLowerCase() === "sc:collection") {
|
17573 | return this.parseCollection(json, options);
|
17574 | }
|
17575 | }
|
17576 | else if (json.type) {
|
17577 | if (json.type.toLowerCase() === "manifest") {
|
17578 | return this.parseManifest(json, options);
|
17579 | }
|
17580 | else if (json.type.toLowerCase() === "collection") {
|
17581 | return this.parseCollection(json, options);
|
17582 | }
|
17583 | }
|
17584 | return null;
|
17585 | };
|
17586 | Deserialiser.parseItems = function (collection, options) {
|
17587 | var items = collection.__jsonld.members || collection.__jsonld.items;
|
17588 | if (items) {
|
17589 | var _loop_1 = function (i) {
|
17590 | if (options) {
|
17591 | options.index = i;
|
17592 | }
|
17593 | var item = this_1.parseItem(items[i], options);
|
17594 | if (!item)
|
17595 | return { value: void 0 };
|
17596 |
|
17597 | if (collection.items.filter(function (m) { return m.id === item.id; })[0]) {
|
17598 | return "continue";
|
17599 | }
|
17600 | item.index = i;
|
17601 | item.parentCollection = collection;
|
17602 | collection.items.push(item);
|
17603 | };
|
17604 | var this_1 = this;
|
17605 | for (var i = 0; i < items.length; i++) {
|
17606 | var state_1 = _loop_1(i);
|
17607 | if (typeof state_1 === "object")
|
17608 | return state_1.value;
|
17609 | }
|
17610 | }
|
17611 | };
|
17612 | return Deserialiser;
|
17613 | }());
|
17614 |
|
17615 |
|
17616 |
|
17617 | var Service_extends = (undefined && undefined.__extends) || (function () {
|
17618 | var extendStatics = function (d, b) {
|
17619 | extendStatics = Object.setPrototypeOf ||
|
17620 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
17621 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
17622 | return extendStatics(d, b);
|
17623 | };
|
17624 | return function (d, b) {
|
17625 | extendStatics(d, b);
|
17626 | function __() { this.constructor = d; }
|
17627 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
17628 | };
|
17629 | })();
|
17630 |
|
17631 | var Service_Service = (function (_super) {
|
17632 | Service_extends(Service, _super);
|
17633 | function Service(jsonld, options) {
|
17634 | return _super.call(this, jsonld, options) || this;
|
17635 | }
|
17636 | Service.prototype.getProfile = function () {
|
17637 | var profile = this.getProperty("profile");
|
17638 | if (!profile) {
|
17639 | profile = this.getProperty("dcterms:conformsTo");
|
17640 | }
|
17641 | if (Array.isArray(profile)) {
|
17642 | return profile[0];
|
17643 | }
|
17644 | return profile;
|
17645 | };
|
17646 | Service.prototype.getConfirmLabel = function () {
|
17647 | return Utils_Utils.getLocalisedValue(this.getProperty("confirmLabel"), this.options.locale);
|
17648 | };
|
17649 | Service.prototype.getDescription = function () {
|
17650 | return Utils_Utils.getLocalisedValue(this.getProperty("description"), this.options.locale);
|
17651 | };
|
17652 | Service.prototype.getFailureDescription = function () {
|
17653 | return Utils_Utils.getLocalisedValue(this.getProperty("failureDescription"), this.options.locale);
|
17654 | };
|
17655 | Service.prototype.getFailureHeader = function () {
|
17656 | return Utils_Utils.getLocalisedValue(this.getProperty("failureHeader"), this.options.locale);
|
17657 | };
|
17658 | Service.prototype.getHeader = function () {
|
17659 | return Utils_Utils.getLocalisedValue(this.getProperty("header"), this.options.locale);
|
17660 | };
|
17661 | Service.prototype.getServiceLabel = function () {
|
17662 | return Utils_Utils.getLocalisedValue(this.getProperty("label"), this.options.locale);
|
17663 | };
|
17664 | Service.prototype.getInfoUri = function () {
|
17665 | var infoUri = this.id;
|
17666 | if (!infoUri.endsWith("/")) {
|
17667 | infoUri += "/";
|
17668 | }
|
17669 | infoUri += "info.json";
|
17670 | return infoUri;
|
17671 | };
|
17672 | return Service;
|
17673 | }(ManifestResource_ManifestResource));
|
17674 |
|
17675 |
|
17676 |
|
17677 | var Size = (function () {
|
17678 | function Size(width, height) {
|
17679 | this.width = width;
|
17680 | this.height = height;
|
17681 | }
|
17682 | return Size;
|
17683 | }());
|
17684 |
|
17685 |
|
17686 |
|
17687 | var StatusCode;
|
17688 | (function (StatusCode) {
|
17689 | StatusCode[StatusCode["AUTHORIZATION_FAILED"] = 1] = "AUTHORIZATION_FAILED";
|
17690 | StatusCode[StatusCode["FORBIDDEN"] = 2] = "FORBIDDEN";
|
17691 | StatusCode[StatusCode["INTERNAL_SERVER_ERROR"] = 3] = "INTERNAL_SERVER_ERROR";
|
17692 | StatusCode[StatusCode["RESTRICTED"] = 4] = "RESTRICTED";
|
17693 | })(StatusCode || (StatusCode = {}));
|
17694 |
|
17695 |
|
17696 |
|
17697 |
|
17698 |
|
17699 | var Thumb_Thumb = (function () {
|
17700 | function Thumb(width, canvas) {
|
17701 | this.data = canvas;
|
17702 | this.index = canvas.index;
|
17703 | this.width = width;
|
17704 | var heightRatio = canvas.getHeight() / canvas.getWidth();
|
17705 | if (heightRatio) {
|
17706 | this.height = Math.floor(this.width * heightRatio);
|
17707 | }
|
17708 | else {
|
17709 | this.height = width;
|
17710 | }
|
17711 | this.uri = canvas.getCanonicalImageUri(width);
|
17712 | this.label = LanguageMap_LanguageMap.getValue(canvas.getLabel());
|
17713 | }
|
17714 | return Thumb;
|
17715 | }());
|
17716 |
|
17717 |
|
17718 |
|
17719 | var Thumbnail_extends = (undefined && undefined.__extends) || (function () {
|
17720 | var extendStatics = function (d, b) {
|
17721 | extendStatics = Object.setPrototypeOf ||
|
17722 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
17723 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
17724 | return extendStatics(d, b);
|
17725 | };
|
17726 | return function (d, b) {
|
17727 | extendStatics(d, b);
|
17728 | function __() { this.constructor = d; }
|
17729 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
17730 | };
|
17731 | })();
|
17732 |
|
17733 | var Thumbnail = (function (_super) {
|
17734 | Thumbnail_extends(Thumbnail, _super);
|
17735 | function Thumbnail(jsonld, options) {
|
17736 | return _super.call(this, jsonld, options) || this;
|
17737 | }
|
17738 | return Thumbnail;
|
17739 | }(Resource_Resource));
|
17740 |
|
17741 |
|
17742 |
|
17743 |
|
17744 | var TreeNode_TreeNode = (function () {
|
17745 | function TreeNode(label, data) {
|
17746 | this.label = label;
|
17747 | this.data = data || {};
|
17748 | this.nodes = [];
|
17749 | }
|
17750 | TreeNode.prototype.addNode = function (node) {
|
17751 | this.nodes.push(node);
|
17752 | node.parentNode = this;
|
17753 | };
|
17754 | TreeNode.prototype.isCollection = function () {
|
17755 | return this.data.type === Utils_Utils.normaliseType(TreeNodeType.COLLECTION);
|
17756 | };
|
17757 | TreeNode.prototype.isManifest = function () {
|
17758 | return this.data.type === Utils_Utils.normaliseType(TreeNodeType.MANIFEST);
|
17759 | };
|
17760 | TreeNode.prototype.isRange = function () {
|
17761 | return this.data.type === Utils_Utils.normaliseType(TreeNodeType.RANGE);
|
17762 | };
|
17763 | return TreeNode;
|
17764 | }());
|
17765 |
|
17766 |
|
17767 |
|
17768 | var TreeNodeType;
|
17769 | (function (TreeNodeType) {
|
17770 | TreeNodeType["COLLECTION"] = "collection";
|
17771 | TreeNodeType["MANIFEST"] = "manifest";
|
17772 | TreeNodeType["RANGE"] = "range";
|
17773 | })(TreeNodeType || (TreeNodeType = {}));
|
17774 |
|
17775 |
|
17776 |
|
17777 |
|
17778 |
|
17779 |
|
17780 |
|
17781 |
|
17782 |
|
17783 |
|
17784 |
|
17785 |
|
17786 |
|
17787 |
|
17788 |
|
17789 |
|
17790 |
|
17791 |
|
17792 |
|
17793 |
|
17794 |
|
17795 |
|
17796 |
|
17797 |
|
17798 |
|
17799 |
|
17800 |
|
17801 |
|
17802 |
|
17803 |
|
17804 |
|
17805 |
|
17806 | var http_status_codes_dist_commonjs = __webpack_require__(12);
|
17807 |
|
17808 |
|
17809 | var browser = __webpack_require__(102);
|
17810 |
|
17811 |
|
17812 | var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17813 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17814 | return new (P || (P = Promise))(function (resolve, reject) {
|
17815 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17816 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17817 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17818 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17819 | });
|
17820 | };
|
17821 | var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
17822 | var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
17823 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
17824 | function verb(n) { return function (v) { return step([n, v]); }; }
|
17825 | function step(op) {
|
17826 | if (f) throw new TypeError("Generator is already executing.");
|
17827 | while (_) try {
|
17828 | 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;
|
17829 | if (y = 0, t) op = [op[0] & 2, t.value];
|
17830 | switch (op[0]) {
|
17831 | case 0: case 1: t = op; break;
|
17832 | case 4: _.label++; return { value: op[1], done: false };
|
17833 | case 5: _.label++; y = op[1]; op = [0]; continue;
|
17834 | case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
17835 | default:
|
17836 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
17837 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
17838 | if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
17839 | if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
17840 | if (t[2]) _.ops.pop();
|
17841 | _.trys.pop(); continue;
|
17842 | }
|
17843 | op = body.call(thisArg, _);
|
17844 | } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
17845 | if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
17846 | }
|
17847 | };
|
17848 |
|
17849 |
|
17850 |
|
17851 |
|
17852 | var Utils_Utils = (function () {
|
17853 | function Utils() {
|
17854 | }
|
17855 | Utils.getMediaType = function (type) {
|
17856 | type = type.toLowerCase();
|
17857 | type = type.split(";")[0];
|
17858 | return type.trim();
|
17859 | };
|
17860 | Utils.getImageQuality = function (profile) {
|
17861 | if (profile === dist_commonjs["ServiceProfile"].IMAGE_0_COMPLIANCE_LEVEL_1 ||
|
17862 | profile === dist_commonjs["ServiceProfile"].IMAGE_0_COMPLIANCE_LEVEL_2 ||
|
17863 | profile === dist_commonjs["ServiceProfile"].IMAGE_1_COMPLIANCE_LEVEL_1 ||
|
17864 | profile === dist_commonjs["ServiceProfile"].IMAGE_1_COMPLIANCE_LEVEL_2 ||
|
17865 | profile === dist_commonjs["ServiceProfile"].IMAGE_0_CONFORMANCE_LEVEL_1 ||
|
17866 | profile === dist_commonjs["ServiceProfile"].IMAGE_0_CONFORMANCE_LEVEL_2 ||
|
17867 | profile === dist_commonjs["ServiceProfile"].IMAGE_1_CONFORMANCE_LEVEL_1 ||
|
17868 | profile === dist_commonjs["ServiceProfile"].IMAGE_1_CONFORMANCE_LEVEL_2 ||
|
17869 | profile === dist_commonjs["ServiceProfile"].IMAGE_1_LEVEL_1 ||
|
17870 | profile === dist_commonjs["ServiceProfile"].IMAGE_1_PROFILE_LEVEL_1 ||
|
17871 | profile === dist_commonjs["ServiceProfile"].IMAGE_1_LEVEL_2 ||
|
17872 | profile === dist_commonjs["ServiceProfile"].IMAGE_1_PROFILE_LEVEL_2) {
|
17873 | return "native";
|
17874 | }
|
17875 | return "default";
|
17876 | };
|
17877 | Utils.getInexactLocale = function (locale) {
|
17878 | if (locale.indexOf("-") !== -1) {
|
17879 | return locale.substr(0, locale.indexOf("-"));
|
17880 | }
|
17881 | return locale;
|
17882 | };
|
17883 | Utils.getLocalisedValue = function (resource, locale) {
|
17884 |
|
17885 | if (!Array.isArray(resource)) {
|
17886 | return resource;
|
17887 | }
|
17888 |
|
17889 | for (var i = 0; i < resource.length; i++) {
|
17890 | var value_1 = resource[i];
|
17891 | var language_1 = value_1["@language"];
|
17892 | if (locale === language_1) {
|
17893 | return value_1["@value"];
|
17894 | }
|
17895 | }
|
17896 |
|
17897 | var match = locale.substr(0, locale.indexOf("-"));
|
17898 | for (var i = 0; i < resource.length; i++) {
|
17899 | var value = resource[i];
|
17900 | var language = value["@language"];
|
17901 | if (language === match) {
|
17902 | return value["@value"];
|
17903 | }
|
17904 | }
|
17905 | return null;
|
17906 | };
|
17907 | Utils.generateTreeNodeIds = function (treeNode, index) {
|
17908 | if (index === void 0) { index = 0; }
|
17909 | var id;
|
17910 | if (!treeNode.parentNode) {
|
17911 | id = "0";
|
17912 | }
|
17913 | else {
|
17914 | id = treeNode.parentNode.id + "-" + index;
|
17915 | }
|
17916 | treeNode.id = id;
|
17917 | for (var i = 0; i < treeNode.nodes.length; i++) {
|
17918 | var n = treeNode.nodes[i];
|
17919 | Utils.generateTreeNodeIds(n, i);
|
17920 | }
|
17921 | };
|
17922 | Utils.normaliseType = function (type) {
|
17923 | type = type.toLowerCase();
|
17924 | if (type.indexOf(":") !== -1) {
|
17925 | var split = type.split(":");
|
17926 | return split[1];
|
17927 | }
|
17928 | return type;
|
17929 | };
|
17930 | Utils.normaliseUrl = function (url) {
|
17931 | url = url.substr(url.indexOf("://"));
|
17932 | if (url.indexOf("#") !== -1) {
|
17933 | url = url.split("#")[0];
|
17934 | }
|
17935 | return url;
|
17936 | };
|
17937 | Utils.normalisedUrlsMatch = function (url1, url2) {
|
17938 | return Utils.normaliseUrl(url1) === Utils.normaliseUrl(url2);
|
17939 | };
|
17940 | Utils.isImageProfile = function (profile) {
|
17941 | if (Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_COMPLIANCE_LEVEL_0) ||
|
17942 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_COMPLIANCE_LEVEL_1) ||
|
17943 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_COMPLIANCE_LEVEL_2) ||
|
17944 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_COMPLIANCE_LEVEL_0) ||
|
17945 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_COMPLIANCE_LEVEL_2) ||
|
17946 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_CONFORMANCE_LEVEL_0) ||
|
17947 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_CONFORMANCE_LEVEL_1) ||
|
17948 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_CONFORMANCE_LEVEL_2) ||
|
17949 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_CONFORMANCE_LEVEL_1) ||
|
17950 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_CONFORMANCE_LEVEL_2) ||
|
17951 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_LEVEL_0) ||
|
17952 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_PROFILE_LEVEL_0) ||
|
17953 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_LEVEL_1) ||
|
17954 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_PROFILE_LEVEL_1) ||
|
17955 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_LEVEL_2) ||
|
17956 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_PROFILE_LEVEL_2) ||
|
17957 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_LEVEL_0) ||
|
17958 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_PROFILE_LEVEL_0) ||
|
17959 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_LEVEL_1) ||
|
17960 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_PROFILE_LEVEL_1) ||
|
17961 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_LEVEL_2) ||
|
17962 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_PROFILE_LEVEL_2)) {
|
17963 | return true;
|
17964 | }
|
17965 | return false;
|
17966 | };
|
17967 | Utils.isLevel0ImageProfile = function (profile) {
|
17968 | if (Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_COMPLIANCE_LEVEL_0) ||
|
17969 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_COMPLIANCE_LEVEL_0) ||
|
17970 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_CONFORMANCE_LEVEL_0) ||
|
17971 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_CONFORMANCE_LEVEL_0) ||
|
17972 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_LEVEL_0) ||
|
17973 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_PROFILE_LEVEL_0) ||
|
17974 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_LEVEL_0) ||
|
17975 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_PROFILE_LEVEL_0)) {
|
17976 | return true;
|
17977 | }
|
17978 | return false;
|
17979 | };
|
17980 | Utils.isLevel1ImageProfile = function (profile) {
|
17981 | if (Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_COMPLIANCE_LEVEL_1) ||
|
17982 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_COMPLIANCE_LEVEL_1) ||
|
17983 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_CONFORMANCE_LEVEL_1) ||
|
17984 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_CONFORMANCE_LEVEL_1) ||
|
17985 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_LEVEL_1) ||
|
17986 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_PROFILE_LEVEL_1) ||
|
17987 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_LEVEL_1) ||
|
17988 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_PROFILE_LEVEL_1)) {
|
17989 | return true;
|
17990 | }
|
17991 | return false;
|
17992 | };
|
17993 | Utils.isLevel2ImageProfile = function (profile) {
|
17994 | if (Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_COMPLIANCE_LEVEL_2) ||
|
17995 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_COMPLIANCE_LEVEL_2) ||
|
17996 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_0_CONFORMANCE_LEVEL_2) ||
|
17997 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_CONFORMANCE_LEVEL_2) ||
|
17998 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_LEVEL_2) ||
|
17999 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_1_PROFILE_LEVEL_2) ||
|
18000 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_LEVEL_2) ||
|
18001 | Utils.normalisedUrlsMatch(profile, dist_commonjs["ServiceProfile"].IMAGE_2_PROFILE_LEVEL_2)) {
|
18002 | return true;
|
18003 | }
|
18004 | return false;
|
18005 | };
|
18006 | Utils.parseManifest = function (manifest, options) {
|
18007 | return Serialisation_Deserialiser.parse(manifest, options);
|
18008 | };
|
18009 | Utils.checkStatus = function (response) {
|
18010 | if (response.ok) {
|
18011 | return response;
|
18012 | }
|
18013 | else {
|
18014 | var error = new Error(response.statusText);
|
18015 | error.response = response;
|
18016 | return Promise.reject(error);
|
18017 | }
|
18018 | };
|
18019 | Utils.loadManifest = function (url) {
|
18020 | return new Promise(function (resolve) {
|
18021 | fetch(url)
|
18022 | .then(Utils.checkStatus)
|
18023 | .then(function (r) { return r.json(); })
|
18024 | .then(function (data) {
|
18025 | resolve(data);
|
18026 | });
|
18027 | });
|
18028 | };
|
18029 | Utils.loadExternalResourcesAuth1 = function (resources, openContentProviderInteraction, openTokenService, getStoredAccessToken, userInteractedWithContentProvider, getContentProviderInteraction, handleMovedTemporarily, showOutOfOptionsMessages) {
|
18030 | return new Promise(function (resolve, reject) {
|
18031 | var promises = resources.map(function (resource) {
|
18032 | return Utils.loadExternalResourceAuth1(resource, openContentProviderInteraction, openTokenService, getStoredAccessToken, userInteractedWithContentProvider, getContentProviderInteraction, handleMovedTemporarily, showOutOfOptionsMessages);
|
18033 | });
|
18034 | Promise.all(promises)
|
18035 | .then(function () {
|
18036 | resolve(resources);
|
18037 | })["catch"](function (error) {
|
18038 | reject(error);
|
18039 | });
|
18040 | });
|
18041 | };
|
18042 | Utils.loadExternalResourceAuth1 = function (resource, openContentProviderInteraction, openTokenService, getStoredAccessToken, userInteractedWithContentProvider, getContentProviderInteraction, handleMovedTemporarily, showOutOfOptionsMessages) {
|
18043 | return __awaiter(this, void 0, void 0, function () {
|
18044 | var storedAccessToken;
|
18045 | return __generator(this, function (_a) {
|
18046 | switch (_a.label) {
|
18047 | case 0: return [4 , getStoredAccessToken(resource)];
|
18048 | case 1:
|
18049 | storedAccessToken = _a.sent();
|
18050 | if (!storedAccessToken) return [3 , 6];
|
18051 | return [4 , resource.getData(storedAccessToken)];
|
18052 | case 2:
|
18053 | _a.sent();
|
18054 | if (!(resource.status === http_status_codes_dist_commonjs["OK"])) return [3 , 3];
|
18055 | return [2 , resource];
|
18056 | case 3:
|
18057 |
|
18058 | return [4 , Utils.doAuthChain(resource, openContentProviderInteraction, openTokenService, userInteractedWithContentProvider, getContentProviderInteraction, handleMovedTemporarily, showOutOfOptionsMessages)];
|
18059 | case 4:
|
18060 |
|
18061 | _a.sent();
|
18062 | _a.label = 5;
|
18063 | case 5:
|
18064 | if (resource.status === http_status_codes_dist_commonjs["OK"] || resource.status === http_status_codes_dist_commonjs["MOVED_TEMPORARILY"]) {
|
18065 | return [2 , resource];
|
18066 | }
|
18067 | throw Utils.createAuthorizationFailedError();
|
18068 | case 6: return [4 , resource.getData()];
|
18069 | case 7:
|
18070 | _a.sent();
|
18071 | if (!(resource.status === http_status_codes_dist_commonjs["MOVED_TEMPORARILY"] ||
|
18072 | resource.status === http_status_codes_dist_commonjs["UNAUTHORIZED"])) return [3 , 9];
|
18073 | return [4 , Utils.doAuthChain(resource, openContentProviderInteraction, openTokenService, userInteractedWithContentProvider, getContentProviderInteraction, handleMovedTemporarily, showOutOfOptionsMessages)];
|
18074 | case 8:
|
18075 | _a.sent();
|
18076 | _a.label = 9;
|
18077 | case 9:
|
18078 | if (resource.status === http_status_codes_dist_commonjs["OK"] || resource.status === http_status_codes_dist_commonjs["MOVED_TEMPORARILY"]) {
|
18079 | return [2 , resource];
|
18080 | }
|
18081 | throw Utils.createAuthorizationFailedError();
|
18082 | }
|
18083 | });
|
18084 | });
|
18085 | };
|
18086 | Utils.doAuthChain = function (resource, openContentProviderInteraction, openTokenService, userInteractedWithContentProvider, getContentProviderInteraction, handleMovedTemporarily, showOutOfOptionsMessages) {
|
18087 | return __awaiter(this, void 0, void 0, function () {
|
18088 | var externalService, kioskService, clickThroughService, loginService, serviceToTry, lastAttempted, kioskInteraction, contentProviderInteraction, contentProviderInteraction;
|
18089 | return __generator(this, function (_a) {
|
18090 | switch (_a.label) {
|
18091 | case 0:
|
18092 |
|
18093 |
|
18094 | if (!resource.isAccessControlled()) {
|
18095 | return [2 , resource];
|
18096 | }
|
18097 | externalService = resource.externalService;
|
18098 | if (externalService) {
|
18099 | externalService.options = resource.options;
|
18100 | }
|
18101 | kioskService = resource.kioskService;
|
18102 | if (kioskService) {
|
18103 | kioskService.options = resource.options;
|
18104 | }
|
18105 | clickThroughService = resource.clickThroughService;
|
18106 | if (clickThroughService) {
|
18107 | clickThroughService.options = resource.options;
|
18108 | }
|
18109 | loginService = resource.loginService;
|
18110 | if (loginService) {
|
18111 | loginService.options = resource.options;
|
18112 | }
|
18113 | if (!(!resource.isResponseHandled && resource.status === http_status_codes_dist_commonjs["MOVED_TEMPORARILY"])) return [3 , 2];
|
18114 | return [4 , handleMovedTemporarily(resource)];
|
18115 | case 1:
|
18116 | _a.sent();
|
18117 | return [2 , resource];
|
18118 | case 2:
|
18119 | serviceToTry = null;
|
18120 | lastAttempted = null;
|
18121 |
|
18122 |
|
18123 | serviceToTry = externalService;
|
18124 | if (!serviceToTry) return [3 , 4];
|
18125 | lastAttempted = serviceToTry;
|
18126 | return [4 , Utils.attemptResourceWithToken(resource, openTokenService, serviceToTry)];
|
18127 | case 3:
|
18128 | _a.sent();
|
18129 | return [2 , resource];
|
18130 | case 4:
|
18131 |
|
18132 | serviceToTry = kioskService;
|
18133 | if (!serviceToTry) return [3 , 7];
|
18134 | lastAttempted = serviceToTry;
|
18135 | kioskInteraction = openContentProviderInteraction(serviceToTry);
|
18136 | if (!kioskInteraction) return [3 , 7];
|
18137 | return [4 , userInteractedWithContentProvider(kioskInteraction)];
|
18138 | case 5:
|
18139 | _a.sent();
|
18140 | return [4 , Utils.attemptResourceWithToken(resource, openTokenService, serviceToTry)];
|
18141 | case 6:
|
18142 | _a.sent();
|
18143 | return [2 , resource];
|
18144 | case 7:
|
18145 |
|
18146 |
|
18147 |
|
18148 |
|
18149 |
|
18150 |
|
18151 |
|
18152 |
|
18153 | serviceToTry = clickThroughService;
|
18154 | if (!serviceToTry) return [3 , 11];
|
18155 | lastAttempted = serviceToTry;
|
18156 | return [4 , getContentProviderInteraction(resource, serviceToTry)];
|
18157 | case 8:
|
18158 | contentProviderInteraction = _a.sent();
|
18159 | if (!contentProviderInteraction) return [3 , 11];
|
18160 |
|
18161 | return [4 , userInteractedWithContentProvider(contentProviderInteraction)];
|
18162 | case 9:
|
18163 |
|
18164 | _a.sent();
|
18165 | return [4 , Utils.attemptResourceWithToken(resource, openTokenService, serviceToTry)];
|
18166 | case 10:
|
18167 | _a.sent();
|
18168 | return [2 , resource];
|
18169 | case 11:
|
18170 |
|
18171 | serviceToTry = loginService;
|
18172 | if (!serviceToTry) return [3 , 15];
|
18173 | lastAttempted = serviceToTry;
|
18174 | return [4 , getContentProviderInteraction(resource, serviceToTry)];
|
18175 | case 12:
|
18176 | contentProviderInteraction = _a.sent();
|
18177 | if (!contentProviderInteraction) return [3 , 15];
|
18178 |
|
18179 | return [4 , userInteractedWithContentProvider(contentProviderInteraction)];
|
18180 | case 13:
|
18181 |
|
18182 | _a.sent();
|
18183 | return [4 , Utils.attemptResourceWithToken(resource, openTokenService, serviceToTry)];
|
18184 | case 14:
|
18185 | _a.sent();
|
18186 | return [2 , resource];
|
18187 | case 15:
|
18188 |
|
18189 |
|
18190 | if (lastAttempted) {
|
18191 | showOutOfOptionsMessages(resource, lastAttempted);
|
18192 | }
|
18193 | return [2 ];
|
18194 | }
|
18195 | });
|
18196 | });
|
18197 | };
|
18198 | Utils.attemptResourceWithToken = function (resource, openTokenService, authService) {
|
18199 | return __awaiter(this, void 0, void 0, function () {
|
18200 | var tokenService, tokenMessage;
|
18201 | return __generator(this, function (_a) {
|
18202 | switch (_a.label) {
|
18203 | case 0:
|
18204 | tokenService = authService.getService(dist_commonjs["ServiceProfile"].AUTH_1_TOKEN);
|
18205 | if (!tokenService) return [3 , 3];
|
18206 | return [4 , openTokenService(resource, tokenService)];
|
18207 | case 1:
|
18208 | tokenMessage = _a.sent();
|
18209 | if (!(tokenMessage && tokenMessage.accessToken)) return [3 , 3];
|
18210 | return [4 , resource.getData(tokenMessage)];
|
18211 | case 2:
|
18212 | _a.sent();
|
18213 | return [2 , resource];
|
18214 | case 3: return [2 ];
|
18215 | }
|
18216 | });
|
18217 | });
|
18218 | };
|
18219 | Utils.loadExternalResourcesAuth09 = function (resources, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options) {
|
18220 | return new Promise(function (resolve, reject) {
|
18221 | var promises = resources.map(function (resource) {
|
18222 | return Utils.loadExternalResourceAuth09(resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options);
|
18223 | });
|
18224 | Promise.all(promises)
|
18225 | .then(function () {
|
18226 | resolve(resources);
|
18227 | })["catch"](function (error) {
|
18228 | reject(error);
|
18229 | });
|
18230 | });
|
18231 | };
|
18232 |
|
18233 |
|
18234 | Utils.loadExternalResourceAuth09 = function (resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options) {
|
18235 | return new Promise(function (resolve, reject) {
|
18236 | if (options && options.pessimisticAccessControl) {
|
18237 |
|
18238 |
|
18239 |
|
18240 | resource
|
18241 | .getData()
|
18242 | .then(function () {
|
18243 | if (resource.isAccessControlled()) {
|
18244 |
|
18245 | if (resource.clickThroughService) {
|
18246 | resolve(clickThrough(resource));
|
18247 |
|
18248 | resolve(restricted(resource));
|
18249 | }
|
18250 | else {
|
18251 | login(resource)
|
18252 | .then(function () {
|
18253 | getAccessToken(resource, true)
|
18254 | .then(function (token) {
|
18255 | resource
|
18256 | .getData(token)
|
18257 | .then(function () {
|
18258 | resolve(handleResourceResponse(resource));
|
18259 | })["catch"](function (message) {
|
18260 | reject(Utils.createInternalServerError(message));
|
18261 | });
|
18262 | })["catch"](function (message) {
|
18263 | reject(Utils.createInternalServerError(message));
|
18264 | });
|
18265 | })["catch"](function (message) {
|
18266 | reject(Utils.createInternalServerError(message));
|
18267 | });
|
18268 | }
|
18269 | }
|
18270 | else {
|
18271 |
|
18272 | resolve(resource);
|
18273 | }
|
18274 | })["catch"](function (message) {
|
18275 | reject(Utils.createInternalServerError(message));
|
18276 | });
|
18277 | }
|
18278 | else {
|
18279 |
|
18280 |
|
18281 |
|
18282 |
|
18283 |
|
18284 | getStoredAccessToken(resource, tokenStorageStrategy)
|
18285 | .then(function (storedAccessToken) {
|
18286 | if (storedAccessToken) {
|
18287 |
|
18288 | resource
|
18289 | .getData(storedAccessToken)
|
18290 | .then(function () {
|
18291 |
|
18292 | if (resource.status === http_status_codes_dist_commonjs["OK"]) {
|
18293 | resolve(handleResourceResponse(resource));
|
18294 | }
|
18295 | else {
|
18296 |
|
18297 |
|
18298 | Utils.authorize(resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken)
|
18299 | .then(function () {
|
18300 | resolve(handleResourceResponse(resource));
|
18301 | })["catch"](function (error) {
|
18302 |
|
18303 |
|
18304 |
|
18305 | reject(Utils.createAuthorizationFailedError());
|
18306 |
|
18307 | });
|
18308 | }
|
18309 | })["catch"](function (error) {
|
18310 | reject(Utils.createAuthorizationFailedError());
|
18311 | });
|
18312 | }
|
18313 | else {
|
18314 | Utils.authorize(resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken)
|
18315 | .then(function () {
|
18316 | resolve(handleResourceResponse(resource));
|
18317 | })["catch"](function (error) {
|
18318 | reject(Utils.createAuthorizationFailedError());
|
18319 | });
|
18320 | }
|
18321 | })["catch"](function (error) {
|
18322 | reject(Utils.createAuthorizationFailedError());
|
18323 | });
|
18324 | }
|
18325 | });
|
18326 | };
|
18327 | Utils.createError = function (name, message) {
|
18328 | var error = new Error();
|
18329 | error.message = message;
|
18330 | error.name = String(name);
|
18331 | return error;
|
18332 | };
|
18333 | Utils.createAuthorizationFailedError = function () {
|
18334 | return Utils.createError(StatusCode.AUTHORIZATION_FAILED, "Authorization failed");
|
18335 | };
|
18336 | Utils.createRestrictedError = function () {
|
18337 | return Utils.createError(StatusCode.RESTRICTED, "Restricted");
|
18338 | };
|
18339 | Utils.createInternalServerError = function (message) {
|
18340 | return Utils.createError(StatusCode.INTERNAL_SERVER_ERROR, message);
|
18341 | };
|
18342 | Utils.authorize = function (resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken) {
|
18343 | return new Promise(function (resolve, reject) {
|
18344 | resource.getData().then(function () {
|
18345 | if (resource.isAccessControlled()) {
|
18346 | getStoredAccessToken(resource, tokenStorageStrategy)
|
18347 | .then(function (storedAccessToken) {
|
18348 | if (storedAccessToken) {
|
18349 |
|
18350 | resource
|
18351 | .getData(storedAccessToken)
|
18352 | .then(function () {
|
18353 | if (resource.status === http_status_codes_dist_commonjs["OK"]) {
|
18354 | resolve(resource);
|
18355 | }
|
18356 | else {
|
18357 |
|
18358 | Utils.showAuthInteraction(resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, resolve, reject);
|
18359 | }
|
18360 | })["catch"](function (message) {
|
18361 | reject(Utils.createInternalServerError(message));
|
18362 | });
|
18363 | }
|
18364 | else {
|
18365 |
|
18366 | getAccessToken(resource, false).then(function (accessToken) {
|
18367 | if (accessToken) {
|
18368 | storeAccessToken(resource, accessToken, tokenStorageStrategy)
|
18369 | .then(function () {
|
18370 |
|
18371 | resource
|
18372 | .getData(accessToken)
|
18373 | .then(function () {
|
18374 | if (resource.status === http_status_codes_dist_commonjs["OK"]) {
|
18375 | resolve(resource);
|
18376 | }
|
18377 | else {
|
18378 |
|
18379 | Utils.showAuthInteraction(resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, resolve, reject);
|
18380 | }
|
18381 | })["catch"](function (message) {
|
18382 | reject(Utils.createInternalServerError(message));
|
18383 | });
|
18384 | })["catch"](function (message) {
|
18385 |
|
18386 | reject(Utils.createInternalServerError(message));
|
18387 | });
|
18388 | }
|
18389 | else {
|
18390 |
|
18391 | Utils.showAuthInteraction(resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, resolve, reject);
|
18392 | }
|
18393 | });
|
18394 | }
|
18395 | })["catch"](function (message) {
|
18396 | reject(Utils.createInternalServerError(message));
|
18397 | });
|
18398 | }
|
18399 | else {
|
18400 |
|
18401 | resolve(resource);
|
18402 | }
|
18403 | });
|
18404 | });
|
18405 | };
|
18406 | Utils.showAuthInteraction = function (resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, resolve, reject) {
|
18407 | if (resource.status === http_status_codes_dist_commonjs["MOVED_TEMPORARILY"] && !resource.isResponseHandled) {
|
18408 |
|
18409 |
|
18410 |
|
18411 |
|
18412 | resolve(resource);
|
18413 |
|
18414 |
|
18415 |
|
18416 | }
|
18417 | else if (resource.clickThroughService && !resource.isResponseHandled) {
|
18418 |
|
18419 | clickThrough(resource).then(function () {
|
18420 | getAccessToken(resource, true)
|
18421 | .then(function (accessToken) {
|
18422 | storeAccessToken(resource, accessToken, tokenStorageStrategy)
|
18423 | .then(function () {
|
18424 | resource
|
18425 | .getData(accessToken)
|
18426 | .then(function () {
|
18427 | resolve(resource);
|
18428 | })["catch"](function (message) {
|
18429 | reject(Utils.createInternalServerError(message));
|
18430 | });
|
18431 | })["catch"](function (message) {
|
18432 | reject(Utils.createInternalServerError(message));
|
18433 | });
|
18434 | })["catch"](function (message) {
|
18435 | reject(Utils.createInternalServerError(message));
|
18436 | });
|
18437 | });
|
18438 | }
|
18439 | else {
|
18440 |
|
18441 | login(resource).then(function () {
|
18442 | getAccessToken(resource, true)
|
18443 | .then(function (accessToken) {
|
18444 | storeAccessToken(resource, accessToken, tokenStorageStrategy)
|
18445 | .then(function () {
|
18446 | resource
|
18447 | .getData(accessToken)
|
18448 | .then(function () {
|
18449 | resolve(resource);
|
18450 | })["catch"](function (message) {
|
18451 | reject(Utils.createInternalServerError(message));
|
18452 | });
|
18453 | })["catch"](function (message) {
|
18454 | reject(Utils.createInternalServerError(message));
|
18455 | });
|
18456 | })["catch"](function (message) {
|
18457 | reject(Utils.createInternalServerError(message));
|
18458 | });
|
18459 | });
|
18460 | }
|
18461 | };
|
18462 | Utils.getService = function (resource, profile) {
|
18463 | var services = this.getServices(resource);
|
18464 | for (var i = 0; i < services.length; i++) {
|
18465 | var service = services[i];
|
18466 | if (service.getProfile() === profile) {
|
18467 | return service;
|
18468 | }
|
18469 | }
|
18470 | return null;
|
18471 | };
|
18472 | Utils.getResourceById = function (parentResource, id) {
|
18473 | return (Utils.traverseAndFind(parentResource.__jsonld, "@id", id));
|
18474 | };
|
18475 | |
18476 |
|
18477 |
|
18478 |
|
18479 |
|
18480 | Utils.traverseAndFind = function (object, k, v) {
|
18481 | if (object.hasOwnProperty(k) && object[k] === v) {
|
18482 | return object;
|
18483 | }
|
18484 | for (var i = 0; i < Object.keys(object).length; i++) {
|
18485 | if (typeof object[Object.keys(object)[i]] === "object") {
|
18486 | var o = Utils.traverseAndFind(object[Object.keys(object)[i]], k, v);
|
18487 | if (o != null) {
|
18488 | return o;
|
18489 | }
|
18490 | }
|
18491 | }
|
18492 | return undefined;
|
18493 | };
|
18494 | Utils.getServices = function (resource) {
|
18495 | var service;
|
18496 |
|
18497 |
|
18498 | if (resource.__jsonld) {
|
18499 | service = resource.__jsonld.service;
|
18500 | }
|
18501 | else {
|
18502 | service = resource.service;
|
18503 | }
|
18504 | var services = [];
|
18505 | if (!service)
|
18506 | return services;
|
18507 |
|
18508 | if (!Array.isArray(service)) {
|
18509 | service = [service];
|
18510 | }
|
18511 | for (var i = 0; i < service.length; i++) {
|
18512 | var s = service[i];
|
18513 | if (typeof s === "string") {
|
18514 | var r = this.getResourceById(resource.options.resource, s);
|
18515 | if (r) {
|
18516 | services.push(new Service_Service(r.__jsonld || r, resource.options));
|
18517 | }
|
18518 | }
|
18519 | else {
|
18520 | services.push(new Service_Service(s, resource.options));
|
18521 | }
|
18522 | }
|
18523 | return services;
|
18524 | };
|
18525 | Utils.getTemporalComponent = function (target) {
|
18526 | var temporal = /t=([^&]+)/g.exec(target);
|
18527 | var t = null;
|
18528 | if (temporal && temporal[1]) {
|
18529 | t = temporal[1].split(",");
|
18530 | }
|
18531 | return t;
|
18532 | };
|
18533 | return Utils;
|
18534 | }());
|
18535 |
|
18536 |
|
18537 |
|
18538 | var flatten = __webpack_require__(18);
|
18539 | var flatten_default = __webpack_require__.n(flatten);
|
18540 |
|
18541 |
|
18542 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18543 |
|
18544 | function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
18545 |
|
18546 | function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
18547 |
|
18548 |
|
18549 |
|
18550 |
|
18551 | var CanvasGroupings = function () {
|
18552 | |
18553 |
|
18554 | function CanvasGroupings(canvases) {
|
18555 | var viewType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'single';
|
18556 |
|
18557 | _classCallCheck(this, CanvasGroupings);
|
18558 |
|
18559 | this.canvases = canvases;
|
18560 | this.viewType = viewType;
|
18561 | this._groupings = null;
|
18562 | }
|
18563 | |
18564 |
|
18565 |
|
18566 |
|
18567 | _createClass(CanvasGroupings, [{
|
18568 | key: "getCanvases",
|
18569 | value: function getCanvases(index) {
|
18570 | switch (this.viewType) {
|
18571 | case 'book':
|
18572 | return this.groupings()[Math.ceil(index / 2)];
|
18573 |
|
18574 | default:
|
18575 | return this.groupings()[index];
|
18576 | }
|
18577 | }
|
18578 | |
18579 |
|
18580 |
|
18581 |
|
18582 |
|
18583 | }, {
|
18584 | key: "groupings",
|
18585 | value: function groupings() {
|
18586 | if (this._groupings) {
|
18587 |
|
18588 | return this._groupings;
|
18589 | }
|
18590 |
|
18591 | if (this.viewType === 'scroll') {
|
18592 | return [this.canvases];
|
18593 | }
|
18594 |
|
18595 | if (this.viewType !== 'book') {
|
18596 | return this.canvases.map(function (canvas) {
|
18597 | return [canvas];
|
18598 | });
|
18599 | }
|
18600 |
|
18601 | var groupings = [];
|
18602 | this.canvases.forEach(function (canvas, i) {
|
18603 | if (i === 0) {
|
18604 | groupings.push([canvas]);
|
18605 | return;
|
18606 | }
|
18607 |
|
18608 |
|
18609 | if (i % 2 !== 0) {
|
18610 | groupings.push([canvas]);
|
18611 | } else {
|
18612 |
|
18613 | groupings[Math.ceil(i / 2)].push(canvas);
|
18614 | }
|
18615 | });
|
18616 | this._groupings = groupings;
|
18617 |
|
18618 | return groupings;
|
18619 | }
|
18620 | }]);
|
18621 |
|
18622 | return CanvasGroupings;
|
18623 | }();
|
18624 |
|
18625 |
|
18626 |
|
18627 | var flattenDeep = __webpack_require__(47);
|
18628 | var flattenDeep_default = __webpack_require__.n(flattenDeep);
|
18629 |
|
18630 |
|
18631 |
|
18632 |
|
18633 | var loadManifest = function (url) {
|
18634 | return Utils_Utils.loadManifest(url);
|
18635 | };
|
18636 | var parseManifest = function (manifest, options) {
|
18637 | return Utils_Utils.parseManifest(manifest, options);
|
18638 | };
|
18639 |
|
18640 |
|
18641 | function MiradorCanvas_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18642 |
|
18643 | function MiradorCanvas_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
18644 |
|
18645 | function MiradorCanvas_createClass(Constructor, protoProps, staticProps) { if (protoProps) MiradorCanvas_defineProperties(Constructor.prototype, protoProps); if (staticProps) MiradorCanvas_defineProperties(Constructor, staticProps); return Constructor; }
|
18646 |
|
18647 |
|
18648 |
|
18649 |
|
18650 |
|
18651 |
|
18652 |
|
18653 |
|
18654 |
|
18655 | var MiradorCanvas_MiradorCanvas = function () {
|
18656 | |
18657 |
|
18658 |
|
18659 | function MiradorCanvas(canvas) {
|
18660 | MiradorCanvas_classCallCheck(this, MiradorCanvas);
|
18661 |
|
18662 | this.canvas = canvas;
|
18663 | }
|
18664 |
|
18665 |
|
18666 |
|
18667 | MiradorCanvas_createClass(MiradorCanvas, [{
|
18668 | key: "getWidth",
|
18669 |
|
18670 |
|
18671 | value: function getWidth() {
|
18672 | return this.canvas.getWidth();
|
18673 | }
|
18674 |
|
18675 |
|
18676 | }, {
|
18677 | key: "getHeight",
|
18678 | value: function getHeight() {
|
18679 | return this.canvas.getHeight();
|
18680 | }
|
18681 | |
18682 |
|
18683 |
|
18684 | }, {
|
18685 | key: "resourceAnnotation",
|
18686 |
|
18687 | |
18688 |
|
18689 |
|
18690 |
|
18691 | value: function resourceAnnotation(id) {
|
18692 | return this.resourceAnnotations.find(function (anno) {
|
18693 | return anno.getResource().id === id || anno.getBody().id === id;
|
18694 | });
|
18695 | }
|
18696 | |
18697 |
|
18698 |
|
18699 |
|
18700 |
|
18701 | }, {
|
18702 | key: "onFragment",
|
18703 | value: function onFragment(id) {
|
18704 | var resourceAnnotation = this.resourceAnnotation(id);
|
18705 | if (!resourceAnnotation) return undefined;
|
18706 | var fragmentMatch = resourceAnnotation.getProperty('on').match(/xywh=(.*)$/);
|
18707 | if (!fragmentMatch) return undefined;
|
18708 | return fragmentMatch[1].split(',').map(function (str) {
|
18709 | return parseInt(str, 10);
|
18710 | });
|
18711 | }
|
18712 |
|
18713 |
|
18714 | }, {
|
18715 | key: "getLabel",
|
18716 |
|
18717 | |
18718 |
|
18719 |
|
18720 | value: function getLabel() {
|
18721 | return this.canvas.getLabel().length > 0 ? this.canvas.getLabel().map(function (label) {
|
18722 | return label.value;
|
18723 | })[0] : String(this.canvas.index + 1);
|
18724 | }
|
18725 | }, {
|
18726 | key: "id",
|
18727 | get: function get() {
|
18728 | return this.canvas.id;
|
18729 | }
|
18730 | }, {
|
18731 | key: "aspectRatio",
|
18732 | get: function get() {
|
18733 | return this.canvas.getWidth() / this.canvas.getHeight();
|
18734 | }
|
18735 | |
18736 |
|
18737 |
|
18738 |
|
18739 |
|
18740 |
|
18741 |
|
18742 |
|
18743 | }, {
|
18744 | key: "annotationListUris",
|
18745 | get: function get() {
|
18746 | return flatten_default()(new Array(this.canvas.__jsonld.otherContent)
|
18747 | ).filter(function (otherContent) {
|
18748 | return otherContent && (typeof otherContent === 'string' || otherContent['@type'] === 'sc:AnnotationList');
|
18749 | }).map(function (otherContent) {
|
18750 | return typeof otherContent === 'string' ? otherContent : otherContent['@id'];
|
18751 | });
|
18752 | }
|
18753 |
|
18754 |
|
18755 | }, {
|
18756 | key: "canvasAnnotationPages",
|
18757 | get: function get() {
|
18758 | return flatten_default()(new Array(this.canvas.__jsonld.annotations)
|
18759 | ).filter(function (annotations) {
|
18760 | return annotations && annotations.type === 'AnnotationPage';
|
18761 | });
|
18762 | }
|
18763 | |
18764 |
|
18765 |
|
18766 |
|
18767 | }, {
|
18768 | key: "imageResource",
|
18769 | get: function get() {
|
18770 | return this.imageResources[0];
|
18771 | }
|
18772 |
|
18773 |
|
18774 | }, {
|
18775 | key: "imageResources",
|
18776 | get: function get() {
|
18777 | var _this = this;
|
18778 |
|
18779 | var resources = flattenDeep_default()([this.canvas.getImages().map(function (i) {
|
18780 | return i.getResource();
|
18781 | }), this.canvas.getContent().map(function (i) {
|
18782 | return i.getBody();
|
18783 | })]);
|
18784 | return flatten_default()(resources.map(function (resource) {
|
18785 | switch (resource.getProperty('type')) {
|
18786 | case 'oa:Choice':
|
18787 | return new Canvas_Canvas({
|
18788 | images: flatten_default()([resource.getProperty('default'), resource.getProperty('item')]).map(function (r) {
|
18789 | return {
|
18790 | resource: r
|
18791 | };
|
18792 | })
|
18793 | }, _this.canvas.options).getImages().map(function (i) {
|
18794 | return i.getResource();
|
18795 | });
|
18796 |
|
18797 | default:
|
18798 | return resource;
|
18799 | }
|
18800 | }));
|
18801 | }
|
18802 |
|
18803 |
|
18804 | }, {
|
18805 | key: "resourceAnnotations",
|
18806 | get: function get() {
|
18807 | return flattenDeep_default()([this.canvas.getImages(), this.canvas.getContent()]);
|
18808 | }
|
18809 | }, {
|
18810 | key: "iiifImageResources",
|
18811 | get: function get() {
|
18812 | return this.imageResources.filter(function (r) {
|
18813 | return r && r.getServices()[0] && r.getServices()[0].id;
|
18814 | });
|
18815 | }
|
18816 |
|
18817 |
|
18818 | }, {
|
18819 | key: "imageServiceIds",
|
18820 | get: function get() {
|
18821 | return this.iiifImageResources.map(function (r) {
|
18822 | return r.getServices()[0].id;
|
18823 | });
|
18824 | }
|
18825 | |
18826 |
|
18827 |
|
18828 |
|
18829 | }, {
|
18830 | key: "service",
|
18831 | get: function get() {
|
18832 | return this.canvas.__jsonld.service;
|
18833 | }
|
18834 | }]);
|
18835 |
|
18836 | return MiradorCanvas;
|
18837 | }();
|
18838 |
|
18839 |
|
18840 |
|
18841 |
|
18842 |
|
18843 |
|
18844 |
|
18845 |
|
18846 |
|
18847 |
|
18848 |
|
18849 | function getWindowManifests(state) {
|
18850 | return Object.values(miradorSlice(state).windows).map(function (window) {
|
18851 | return window.manifestId;
|
18852 | });
|
18853 | }
|
18854 |
|
18855 |
|
18856 | function getWindows(state) {
|
18857 | return miradorSlice(state).windows || {};
|
18858 | }
|
18859 |
|
18860 |
|
18861 | function getWindow(state, _ref) {
|
18862 | var windowId = _ref.windowId;
|
18863 | return getWindows(state)[windowId];
|
18864 | }
|
18865 | var getViewer = Object(es["createSelector"])([function (state) {
|
18866 | return miradorSlice(state).viewers;
|
18867 | }, function (state, _ref2) {
|
18868 | var windowId = _ref2.windowId;
|
18869 | return windowId;
|
18870 | }], function (viewers, windowId) {
|
18871 | return viewers[windowId];
|
18872 | });
|
18873 |
|
18874 |
|
18875 | function getWorkspace(state) {
|
18876 | return miradorSlice(state).workspace;
|
18877 | }
|
18878 |
|
18879 |
|
18880 | var getWindowIds = Object(es["createSelector"])([getWorkspace], function (_ref3) {
|
18881 | var windowIds = _ref3.windowIds;
|
18882 | return windowIds || [];
|
18883 | });
|
18884 |
|
18885 |
|
18886 | function getManifests(state) {
|
18887 | return miradorSlice(state).manifests || {};
|
18888 | }
|
18889 |
|
18890 |
|
18891 | function getManifest(state, _ref4) {
|
18892 | var manifestId = _ref4.manifestId,
|
18893 | windowId = _ref4.windowId;
|
18894 | var manifests = getManifests(state);
|
18895 | return manifests && manifests[manifestId || windowId && (getWindow(state, {
|
18896 | windowId: windowId
|
18897 | }) || {}).manifestId];
|
18898 | }
|
18899 |
|
18900 |
|
18901 | function getCatalog(state) {
|
18902 | return miradorSlice(state).catalog || {};
|
18903 | }
|
18904 |
|
18905 | var dist = __webpack_require__(82);
|
18906 | var dist_default = __webpack_require__.n(dist);
|
18907 |
|
18908 |
|
18909 | function MiradorManifest_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18910 |
|
18911 | function MiradorManifest_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
18912 |
|
18913 | function MiradorManifest_createClass(Constructor, protoProps, staticProps) { if (protoProps) MiradorManifest_defineProperties(Constructor.prototype, protoProps); if (staticProps) MiradorManifest_defineProperties(Constructor, staticProps); return Constructor; }
|
18914 |
|
18915 |
|
18916 |
|
18917 |
|
18918 |
|
18919 | var MiradorManifest = function () {
|
18920 |
|
18921 | function MiradorManifest(manifest) {
|
18922 | MiradorManifest_classCallCheck(this, MiradorManifest);
|
18923 |
|
18924 | this.manifest = manifest;
|
18925 | }
|
18926 | |
18927 |
|
18928 |
|
18929 |
|
18930 |
|
18931 |
|
18932 |
|
18933 |
|
18934 | MiradorManifest_createClass(MiradorManifest, [{
|
18935 | key: "canvasAt",
|
18936 |
|
18937 |
|
18938 | value: function canvasAt(index) {
|
18939 | var sequence = this.manifest.getSequences()[0];
|
18940 | var canvases = sequence && sequence.getCanvases();
|
18941 | return canvases && canvases[index];
|
18942 | }
|
18943 | }, {
|
18944 | key: "startCanvas",
|
18945 | get: function get() {
|
18946 | var canvasId;
|
18947 | var sequence = this.manifest.getSequences()[0];
|
18948 | if (!sequence) return undefined;
|
18949 |
|
18950 | canvasId = sequence.getProperty('startCanvas');
|
18951 |
|
18952 | if (!canvasId) {
|
18953 |
|
18954 | var start = this.manifest.getProperty('start') || sequence.getProperty('start');
|
18955 | canvasId = start && (start.id || start.source);
|
18956 | }
|
18957 |
|
18958 | return canvasId && sequence.getCanvasById(canvasId) || undefined;
|
18959 | }
|
18960 | }]);
|
18961 |
|
18962 | return MiradorManifest;
|
18963 | }();
|
18964 |
|
18965 |
|
18966 |
|
18967 | function ThumbnailFactory_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18968 |
|
18969 | function ThumbnailFactory_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
18970 |
|
18971 | function ThumbnailFactory_createClass(Constructor, protoProps, staticProps) { if (protoProps) ThumbnailFactory_defineProperties(Constructor.prototype, protoProps); if (staticProps) ThumbnailFactory_defineProperties(Constructor, staticProps); return Constructor; }
|
18972 |
|
18973 |
|
18974 |
|
18975 |
|
18976 |
|
18977 |
|
18978 | function isLevel0ImageProfile(service) {
|
18979 | var profile = service.getProfile();
|
18980 |
|
18981 | if (profile.endsWith('#level1') || profile.endsWith('#level2')) return false;
|
18982 |
|
18983 | if (profile === 'level0') return true;
|
18984 | return Utils_Utils.isLevel0ImageProfile(profile);
|
18985 | }
|
18986 |
|
18987 |
|
18988 |
|
18989 | function isLevel2ImageProfile(service) {
|
18990 | var profile = service.getProfile();
|
18991 |
|
18992 | if (profile.endsWith('#level0') || profile.endsWith('#level1')) return false;
|
18993 |
|
18994 | if (profile === 'level2') return true;
|
18995 | return Utils_Utils.isLevel2ImageProfile(profile);
|
18996 | }
|
18997 |
|
18998 |
|
18999 |
|
19000 | function iiifv3ImageServiceType(service) {
|
19001 | var type = service.getProperty('type') || [];
|
19002 | return (Array.isArray(type) ? type : [type]).some(function (v) {
|
19003 | return v.startsWith('ImageService');
|
19004 | });
|
19005 | }
|
19006 |
|
19007 |
|
19008 |
|
19009 | function iiifImageService(resource) {
|
19010 | var service = resource && resource.getServices().find(function (s) {
|
19011 | return iiifv3ImageServiceType(s) || Utils_Utils.isImageProfile(s.getProfile());
|
19012 | });
|
19013 | if (!service) return undefined;
|
19014 | return service;
|
19015 | }
|
19016 |
|
19017 |
|
19018 |
|
19019 | var ThumbnailFactory_ThumbnailFactory = function () {
|
19020 |
|
19021 | function ThumbnailFactory(resource) {
|
19022 | var iiifOpts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
19023 |
|
19024 | ThumbnailFactory_classCallCheck(this, ThumbnailFactory);
|
19025 |
|
19026 | this.resource = resource;
|
19027 | this.iiifOpts = iiifOpts;
|
19028 | }
|
19029 |
|
19030 |
|
19031 |
|
19032 | ThumbnailFactory_createClass(ThumbnailFactory, [{
|
19033 | key: "iiifThumbnailUrl",
|
19034 |
|
19035 | |
19036 |
|
19037 |
|
19038 |
|
19039 | value: function iiifThumbnailUrl(resource) {
|
19040 | var size;
|
19041 | var width;
|
19042 | var height;
|
19043 | var maxHeight;
|
19044 | var maxWidth;
|
19045 | var minDimension = 120;
|
19046 | var _this$iiifOpts = this.iiifOpts,
|
19047 | requestedMaxHeight = _this$iiifOpts.maxHeight,
|
19048 | requestedMaxWidth = _this$iiifOpts.maxWidth;
|
19049 | if (requestedMaxHeight) maxHeight = Math.max(requestedMaxHeight, minDimension);
|
19050 | if (requestedMaxWidth) maxWidth = Math.max(requestedMaxWidth, minDimension);
|
19051 | var service = iiifImageService(resource);
|
19052 | if (!service) return undefined;
|
19053 |
|
19054 | if (isLevel0ImageProfile(service)) {
|
19055 | return ThumbnailFactory.staticImageUrl(resource);
|
19056 | }
|
19057 |
|
19058 | var aspectRatio = resource.getWidth() && resource.getHeight() && resource.getWidth() / resource.getHeight();
|
19059 |
|
19060 | if (maxHeight && maxWidth) {
|
19061 |
|
19062 | if (isLevel2ImageProfile(service)) {
|
19063 | size = "!".concat(maxWidth, ",").concat(maxHeight);
|
19064 | width = maxWidth;
|
19065 | height = maxHeight;
|
19066 | if (aspectRatio && aspectRatio > 1) height = Math.round(maxWidth / aspectRatio);
|
19067 | if (aspectRatio && aspectRatio < 1) width = Math.round(maxHeight * aspectRatio);
|
19068 | } else if (maxWidth / maxHeight < aspectRatio) {
|
19069 | size = "".concat(maxWidth, ",");
|
19070 | width = maxWidth;
|
19071 | if (aspectRatio) height = Math.round(maxWidth / aspectRatio);
|
19072 | } else {
|
19073 | size = ",".concat(maxHeight);
|
19074 | height = maxHeight;
|
19075 | if (aspectRatio) width = Math.round(maxHeight * aspectRatio);
|
19076 | }
|
19077 | } else if (maxHeight && !maxWidth) {
|
19078 | size = ",".concat(maxHeight);
|
19079 | height = maxHeight;
|
19080 | if (aspectRatio) width = Math.round(maxHeight * aspectRatio);
|
19081 | } else if (!maxHeight && maxWidth) {
|
19082 | size = "".concat(maxWidth, ",");
|
19083 | width = maxWidth;
|
19084 | if (aspectRatio) height = Math.round(maxWidth / aspectRatio);
|
19085 | } else {
|
19086 | size = ",".concat(minDimension);
|
19087 | height = minDimension;
|
19088 | if (aspectRatio) width = Math.round(height * aspectRatio);
|
19089 | }
|
19090 |
|
19091 | var region = 'full';
|
19092 | var quality = Utils_Utils.getImageQuality(service.getProfile());
|
19093 | var id = service.id.replace(/\/+$/, '');
|
19094 | var format = 'jpg';
|
19095 | return {
|
19096 | height: height,
|
19097 | url: [id, region, size, 0, "".concat(quality, ".").concat(format)].join('/'),
|
19098 | width: width
|
19099 | };
|
19100 | }
|
19101 |
|
19102 |
|
19103 | }, {
|
19104 | key: "getThumbnail",
|
19105 | value: function getThumbnail(resource, _ref) {
|
19106 | var requireIiif = _ref.requireIiif,
|
19107 | quirksMode = _ref.quirksMode;
|
19108 | if (!resource) return undefined;
|
19109 | var thumb = resource.getThumbnail();
|
19110 | if (thumb && iiifImageService(thumb)) return this.iiifThumbnailUrl(thumb);
|
19111 | if (requireIiif) return undefined;
|
19112 | if (thumb && typeof thumb.__jsonld !== 'string') return ThumbnailFactory.staticImageUrl(thumb);
|
19113 | if (!quirksMode) return undefined;
|
19114 | return thumb && typeof thumb.__jsonld === 'string' ? {
|
19115 | url: thumb.__jsonld
|
19116 | } : undefined;
|
19117 | }
|
19118 |
|
19119 |
|
19120 | }, {
|
19121 | key: "getResourceThumbnail",
|
19122 | value: function getResourceThumbnail(resource) {
|
19123 | var thumb = this.getThumbnail(resource, {
|
19124 | requireIiif: true
|
19125 | });
|
19126 | if (thumb) return thumb;
|
19127 | if (iiifImageService(resource)) return this.iiifThumbnailUrl(resource);
|
19128 | if (['image', 'dctypes:Image'].includes(resource.getProperty('type'))) return ThumbnailFactory.staticImageUrl(resource);
|
19129 | return this.getThumbnail(resource, {
|
19130 | quirksMode: true,
|
19131 | requireIiif: false
|
19132 | });
|
19133 | }
|
19134 |
|
19135 |
|
19136 | }, {
|
19137 | key: "getIIIFThumbnail",
|
19138 | value: function getIIIFThumbnail(canvas) {
|
19139 | var thumb = this.getThumbnail(canvas, {
|
19140 | requireIiif: true
|
19141 | });
|
19142 | if (thumb) return thumb;
|
19143 | var miradorCanvas = new MiradorCanvas_MiradorCanvas(canvas);
|
19144 | var preferredCanvasResource = miradorCanvas.iiifImageResources[0] || canvas.imageResource;
|
19145 | return preferredCanvasResource && this.getResourceThumbnail(preferredCanvasResource) || this.getThumbnail(canvas, {
|
19146 | quirksMode: true,
|
19147 | requireIiif: false
|
19148 | });
|
19149 | }
|
19150 |
|
19151 |
|
19152 | }, {
|
19153 | key: "getManifestThumbnail",
|
19154 | value: function getManifestThumbnail(manifest) {
|
19155 | var thumb = this.getThumbnail(manifest, {
|
19156 | requireIiif: true
|
19157 | });
|
19158 | if (thumb) return thumb;
|
19159 | var miradorManifest = new MiradorManifest(manifest);
|
19160 | var canvas = miradorManifest.startCanvas || miradorManifest.canvasAt(0);
|
19161 | return canvas && this.getIIIFThumbnail(canvas) || this.getThumbnail(manifest, {
|
19162 | quirksMode: true,
|
19163 | requireIiif: false
|
19164 | });
|
19165 | }
|
19166 |
|
19167 |
|
19168 | }, {
|
19169 | key: "getCollectionThumbnail",
|
19170 | value: function getCollectionThumbnail(collection) {
|
19171 | var thumb = this.getThumbnail(collection, {
|
19172 | requireIiif: true
|
19173 | });
|
19174 | if (thumb) return thumb;
|
19175 | var firstManifest = this.resource.getManifests()[0];
|
19176 | return firstManifest && this.getManifestThumbnail(firstManifest) || this.getThumbnail(collection, {
|
19177 | quirksMode: true,
|
19178 | requireIiif: false
|
19179 | });
|
19180 | }
|
19181 |
|
19182 |
|
19183 | }, {
|
19184 | key: "get",
|
19185 | value: function get() {
|
19186 | if (!this.resource) return undefined;
|
19187 | if (this.resource.isCanvas()) return this.getIIIFThumbnail(this.resource);
|
19188 | if (this.resource.isManifest()) return this.getManifestThumbnail(this.resource);
|
19189 | if (this.resource.isCollection()) return this.getCollectionThumbnail(this.resource);
|
19190 | return this.getResourceThumbnail(this.resource, {
|
19191 | requireIiif: true
|
19192 | });
|
19193 | }
|
19194 | }], [{
|
19195 | key: "staticImageUrl",
|
19196 | value: function staticImageUrl(resource) {
|
19197 | return {
|
19198 | height: resource.getProperty('height'),
|
19199 | url: resource.id,
|
19200 | width: resource.getProperty('width')
|
19201 | };
|
19202 | }
|
19203 | }]);
|
19204 |
|
19205 | return ThumbnailFactory;
|
19206 | }();
|
19207 |
|
19208 |
|
19209 |
|
19210 | function getBestThumbnail(resource, iiifOpts) {
|
19211 | return new ThumbnailFactory_ThumbnailFactory(resource, iiifOpts).get();
|
19212 | }
|
19213 |
|
19214 | var lib_ThumbnailFactory = (getBestThumbnail);
|
19215 |
|
19216 | var groupBy = __webpack_require__(46);
|
19217 | var groupBy_default = __webpack_require__.n(groupBy);
|
19218 |
|
19219 |
|
19220 | function companionWindows_toConsumableArray(arr) { return companionWindows_arrayWithoutHoles(arr) || companionWindows_iterableToArray(arr) || companionWindows_unsupportedIterableToArray(arr) || companionWindows_nonIterableSpread(); }
|
19221 |
|
19222 | function companionWindows_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
19223 |
|
19224 | function companionWindows_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return companionWindows_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return companionWindows_arrayLikeToArray(o, minLen); }
|
19225 |
|
19226 | function companionWindows_iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
19227 |
|
19228 | function companionWindows_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return companionWindows_arrayLikeToArray(arr); }
|
19229 |
|
19230 | function companionWindows_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
19231 |
|
19232 | function companionWindows_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
19233 |
|
19234 | function companionWindows_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { companionWindows_ownKeys(Object(source), true).forEach(function (key) { companionWindows_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { companionWindows_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
19235 |
|
19236 | function companionWindows_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
19237 |
|
19238 |
|
19239 |
|
19240 |
|
19241 |
|
19242 |
|
19243 |
|
19244 | function getCompanionWindows(state) {
|
19245 | return miradorSlice(state).companionWindows || {};
|
19246 | }
|
19247 | var getCompanionWindow = Object(es["createSelector"])([getCompanionWindows, function (state, _ref) {
|
19248 | var companionWindowId = _ref.companionWindowId;
|
19249 | return companionWindowId;
|
19250 | }], function (companionWindows, companionWindowId) {
|
19251 | return companionWindowId && companionWindows[companionWindowId];
|
19252 | });
|
19253 |
|
19254 |
|
19255 |
|
19256 |
|
19257 |
|
19258 |
|
19259 | var getThumbnailNavigationPosition = Object(es["createSelector"])([getWindow, getCompanionWindows], function (window, companionWindows) {
|
19260 | return window && companionWindows[window.thumbnailNavigationId] && companionWindows[window.thumbnailNavigationId].position;
|
19261 | });
|
19262 |
|
19263 |
|
19264 |
|
19265 |
|
19266 |
|
19267 |
|
19268 | var getCompanionWindowIndexByWindowAndPosition = Object(es["createSelector"])([getWindows, getCompanionWindows], function (windows, companionWindows) {
|
19269 | return (Object.keys(windows) || []).reduce(function (obj, id) {
|
19270 | return companionWindows_objectSpread(companionWindows_objectSpread({}, obj), {}, companionWindows_defineProperty({}, id, groupBy_default()(windows[id].companionWindowIds, function (cwid) {
|
19271 | return companionWindows[cwid] && companionWindows[cwid].position;
|
19272 | })));
|
19273 | }, {});
|
19274 | });
|
19275 |
|
19276 |
|
19277 |
|
19278 |
|
19279 |
|
19280 |
|
19281 | var getCompanionWindowsByWindowAndPosition = Object(es["createSelector"])([getWindows, getCompanionWindows], function (windows, companionWindows) {
|
19282 | return (Object.keys(windows) || []).reduce(function (obj, id) {
|
19283 | return companionWindows_objectSpread(companionWindows_objectSpread({}, obj), {}, companionWindows_defineProperty({}, id, groupBy_default()(windows[id].companionWindowIds.map(function (cwid) {
|
19284 | return companionWindows[cwid];
|
19285 | }), function (cw) {
|
19286 | return cw.position;
|
19287 | })));
|
19288 | }, {});
|
19289 | });
|
19290 |
|
19291 |
|
19292 |
|
19293 |
|
19294 |
|
19295 |
|
19296 | var getCompanionWindowsOfWindow = Object(es["createSelector"])([function (state, _ref2) {
|
19297 | var windowId = _ref2.windowId;
|
19298 | return windowId;
|
19299 | }, getCompanionWindowsByWindowAndPosition], function (windowId, companionWindows) {
|
19300 | return companionWindows[windowId] || {};
|
19301 | });
|
19302 |
|
19303 |
|
19304 |
|
19305 |
|
19306 |
|
19307 |
|
19308 | var getCompanionWindowIdsOfWindow = Object(es["createSelector"])([function (state, _ref3) {
|
19309 | var windowId = _ref3.windowId;
|
19310 | return windowId;
|
19311 | }, getCompanionWindowIndexByWindowAndPosition], function (windowId, companionWindowIds) {
|
19312 | return companionWindowIds[windowId] || {};
|
19313 | });
|
19314 |
|
19315 |
|
19316 |
|
19317 |
|
19318 |
|
19319 |
|
19320 |
|
19321 |
|
19322 | var getCompanionWindowsForPosition = Object(es["createSelector"])([getCompanionWindowsOfWindow, function (state, _ref4) {
|
19323 | var position = _ref4.position;
|
19324 | return {
|
19325 | position: position
|
19326 | };
|
19327 | }], function (companionWindows, _ref5) {
|
19328 | var position = _ref5.position;
|
19329 | return companionWindows[position] || EMPTY_ARRAY;
|
19330 | });
|
19331 |
|
19332 |
|
19333 |
|
19334 |
|
19335 |
|
19336 |
|
19337 |
|
19338 |
|
19339 | var getCompanionWindowsForContent = Object(es["createSelector"])([getCompanionWindowsOfWindow, function (state, _ref6) {
|
19340 | var content = _ref6.content;
|
19341 | return {
|
19342 | content: content
|
19343 | };
|
19344 | }], function (companionWindows, _ref7) {
|
19345 | var _ref8;
|
19346 |
|
19347 | var content = _ref7.content;
|
19348 | return (_ref8 = []).concat.apply(_ref8, companionWindows_toConsumableArray(Object.values(companionWindows))).filter(function (w) {
|
19349 | return w.content === content;
|
19350 | });
|
19351 | });
|
19352 | var EMPTY_ARRAY = [];
|
19353 |
|
19354 |
|
19355 | var getCompanionWindowIdsForPosition = Object(es["createSelector"])([getCompanionWindowIdsOfWindow, function (state, _ref9) {
|
19356 | var position = _ref9.position;
|
19357 | return {
|
19358 | position: position
|
19359 | };
|
19360 | }], function (companionWindowIds, _ref10) {
|
19361 | var position = _ref10.position;
|
19362 | return companionWindowIds[position] || EMPTY_ARRAY;
|
19363 | });
|
19364 |
|
19365 |
|
19366 |
|
19367 |
|
19368 |
|
19369 |
|
19370 |
|
19371 | var getCompanionAreaVisibility = Object(es["createSelector"])([function (state, _ref11) {
|
19372 | var position = _ref11.position;
|
19373 | return position;
|
19374 | }, getWindow], function (position, window) {
|
19375 | if (!window) return false;
|
19376 | var companionAreaOpen = window.companionAreaOpen,
|
19377 | sideBarOpen = window.sideBarOpen;
|
19378 | if (position !== 'left') return true;
|
19379 | return !!(companionAreaOpen && sideBarOpen);
|
19380 | });
|
19381 | var selectCompanionWindowDimensions = Object(es["createSelector"])([getCompanionWindowsOfWindow], function (companionWindows) {
|
19382 | var _ref12;
|
19383 |
|
19384 | var width = 0;
|
19385 | var height = 0;
|
19386 |
|
19387 | (_ref12 = []).concat.apply(_ref12, companionWindows_toConsumableArray(Object.values(companionWindows))).forEach(function (cw) {
|
19388 | if (cw.position.match(/right/)) {
|
19389 | width += 235;
|
19390 | }
|
19391 |
|
19392 | if (cw.position.match(/bottom/)) {
|
19393 | height += 201;
|
19394 | }
|
19395 | });
|
19396 |
|
19397 | return {
|
19398 | height: height,
|
19399 | width: width
|
19400 | };
|
19401 | });
|
19402 |
|
19403 | var cjs = __webpack_require__(81);
|
19404 | var cjs_default = __webpack_require__.n(cjs);
|
19405 |
|
19406 |
|
19407 | function config_slicedToArray(arr, i) { return config_arrayWithHoles(arr) || config_iterableToArrayLimit(arr, i) || config_unsupportedIterableToArray(arr, i) || config_nonIterableRest(); }
|
19408 |
|
19409 | function config_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
19410 |
|
19411 | function config_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return config_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return config_arrayLikeToArray(o, minLen); }
|
19412 |
|
19413 | function config_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
19414 |
|
19415 | function config_iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
19416 |
|
19417 | function config_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
19418 |
|
19419 |
|
19420 |
|
19421 |
|
19422 |
|
19423 |
|
19424 |
|
19425 | function getConfig(state) {
|
19426 | var slice = miradorSlice(state || {});
|
19427 | return slice.config || {};
|
19428 | }
|
19429 |
|
19430 |
|
19431 |
|
19432 |
|
19433 | function getExportableState(state) {
|
19434 | var exportConfig = getConfig(state)["export"];
|
19435 | return Object.entries(exportConfig).reduce(function (acc, _ref) {
|
19436 | var _ref2 = config_slicedToArray(_ref, 2),
|
19437 | stem = _ref2[0],
|
19438 | value = _ref2[1];
|
19439 |
|
19440 | if (value === true) {
|
19441 | acc[stem] = state[stem];
|
19442 | } else if (value.filter) {
|
19443 | acc[stem] = Object.entries(state[stem]).filter(value.filter).reduce(function (stemAcc, _ref3) {
|
19444 | var _ref4 = config_slicedToArray(_ref3, 2),
|
19445 | k = _ref4[0],
|
19446 | v = _ref4[1];
|
19447 |
|
19448 | stemAcc[k] = v;
|
19449 |
|
19450 | return stemAcc;
|
19451 | }, {});
|
19452 | }
|
19453 |
|
19454 | return acc;
|
19455 | }, {});
|
19456 | }
|
19457 |
|
19458 |
|
19459 |
|
19460 |
|
19461 |
|
19462 |
|
19463 | var getLanguagesFromConfigWithCurrent = Object(es["createSelector"])([getConfig], function (_ref5) {
|
19464 | var availableLanguages = _ref5.availableLanguages,
|
19465 | language = _ref5.language;
|
19466 | return Object.keys(availableLanguages).map(function (key) {
|
19467 | return {
|
19468 | current: key === language,
|
19469 | label: availableLanguages[key],
|
19470 | locale: key
|
19471 | };
|
19472 | });
|
19473 | });
|
19474 | var getShowZoomControlsConfig = Object(es["createSelector"])([getWorkspace, getConfig], function (workspace, config) {
|
19475 | return workspace.showZoomControls === undefined ? config.workspace.showZoomControls : workspace.showZoomControls;
|
19476 | });
|
19477 | var getTheme = Object(es["createSelector"])([getConfig], function (_ref6) {
|
19478 | var theme = _ref6.theme,
|
19479 | themes = _ref6.themes,
|
19480 | selectedTheme = _ref6.selectedTheme;
|
19481 | return cjs_default()(theme, themes[selectedTheme] || {});
|
19482 | });
|
19483 | var getThemeIds = Object(es["createSelector"])([getConfig], function (_ref7) {
|
19484 | var themes = _ref7.themes;
|
19485 | return Object.keys(themes);
|
19486 | });
|
19487 | var getContainerId = Object(es["createSelector"])([getConfig], function (_ref8) {
|
19488 | var id = _ref8.id;
|
19489 | return id;
|
19490 | });
|
19491 | var getThemeDirection = Object(es["createSelector"])([getConfig], function (_ref9) {
|
19492 | var theme = _ref9.theme;
|
19493 | return theme.direction || 'ltr';
|
19494 | });
|
19495 | var getRequestsConfig = Object(es["createSelector"])([getConfig], function (_ref10) {
|
19496 | var requests = _ref10.requests;
|
19497 | return requests || {};
|
19498 | });
|
19499 |
|
19500 | function manifests_toConsumableArray(arr) { return manifests_arrayWithoutHoles(arr) || manifests_iterableToArray(arr) || manifests_unsupportedIterableToArray(arr) || manifests_nonIterableSpread(); }
|
19501 |
|
19502 | function manifests_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
19503 |
|
19504 | function manifests_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return manifests_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return manifests_arrayLikeToArray(o, minLen); }
|
19505 |
|
19506 | function manifests_iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
19507 |
|
19508 | function manifests_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return manifests_arrayLikeToArray(arr); }
|
19509 |
|
19510 | function manifests_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
19511 |
|
19512 |
|
19513 |
|
19514 |
|
19515 |
|
19516 |
|
19517 |
|
19518 |
|
19519 |
|
19520 |
|
19521 |
|
19522 | function createManifestoInstance(json, locale) {
|
19523 | if (!json) return undefined;
|
19524 | return Utils_Utils.parseManifest(json, locale ? {
|
19525 | locale: locale
|
19526 | } : undefined);
|
19527 | }
|
19528 |
|
19529 |
|
19530 |
|
19531 | var getLocale = Object(es["createSelector"])([getCompanionWindow, getConfig], function () {
|
19532 | var companionWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
19533 | var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
19534 | return companionWindow.locale || config.language;
|
19535 | });
|
19536 |
|
19537 |
|
19538 | var getManifestStatus = Object(es["createSelector"])([getManifest], function (manifest) {
|
19539 | return manifest || {
|
19540 | missing: true
|
19541 | };
|
19542 | });
|
19543 |
|
19544 |
|
19545 | var getManifestError = Object(es["createSelector"])([getManifest], function (manifest) {
|
19546 | return manifest && manifest.error;
|
19547 | });
|
19548 |
|
19549 |
|
19550 | var getContextualManifestoInstance = dist_default()(getManifest, getLocale, function (manifest, locale) {
|
19551 | return manifest && createManifestoInstance(manifest.json, locale);
|
19552 | })(function (state, _ref) {
|
19553 | var companionWindowId = _ref.companionWindowId,
|
19554 | manifestId = _ref.manifestId,
|
19555 | windowId = _ref.windowId;
|
19556 | return [manifestId, windowId, getLocale(state, {
|
19557 | companionWindowId: companionWindowId
|
19558 | })].join(' - ');
|
19559 | }
|
19560 | );
|
19561 |
|
19562 |
|
19563 | var getManifestoInstance = Object(es["createSelector"])(getContextualManifestoInstance, function (state, _ref2) {
|
19564 | var json = _ref2.json;
|
19565 | return json;
|
19566 | }, getLocale, function (manifesto, manifestJson, locale) {
|
19567 | return manifestJson && createManifestoInstance(manifestJson, locale) || manifesto;
|
19568 | });
|
19569 | var getManifestLocale = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19570 | return manifest && manifest.options && manifest.options.locale && manifest.options.locale.replace(/-.*$/, '');
|
19571 | });
|
19572 |
|
19573 |
|
19574 | function getProperty(property) {
|
19575 | return Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19576 | return manifest && manifest.getProperty(property);
|
19577 | });
|
19578 | }
|
19579 |
|
19580 |
|
19581 |
|
19582 |
|
19583 |
|
19584 |
|
19585 |
|
19586 |
|
19587 |
|
19588 |
|
19589 | var getManifestLogo = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19590 | return manifest && manifest.getLogo();
|
19591 | });
|
19592 |
|
19593 |
|
19594 |
|
19595 |
|
19596 |
|
19597 |
|
19598 |
|
19599 |
|
19600 |
|
19601 | var getManifestProvider = Object(es["createSelector"])([getProperty('provider'), getManifestLocale], function (provider, locale) {
|
19602 | return provider && provider[0].label && LanguageMap_LanguageMap.parse(provider[0].label, locale).map(function (label) {
|
19603 | return label.value;
|
19604 | })[0];
|
19605 | });
|
19606 |
|
19607 |
|
19608 |
|
19609 | function asArray(value) {
|
19610 | if (!Array.isArray(value)) {
|
19611 | return [value];
|
19612 | }
|
19613 |
|
19614 | return value;
|
19615 | }
|
19616 |
|
19617 |
|
19618 |
|
19619 |
|
19620 |
|
19621 |
|
19622 |
|
19623 |
|
19624 |
|
19625 |
|
19626 | var getManifestHomepage = Object(es["createSelector"])([getProperty('homepage'), getManifestLocale], function (homepages, locale) {
|
19627 | return homepages && asArray(homepages).map(function (homepage) {
|
19628 | return {
|
19629 | label: LanguageMap_LanguageMap.parse(homepage.label, locale).map(function (label) {
|
19630 | return label.value;
|
19631 | })[0],
|
19632 | value: homepage.id || homepage['@id']
|
19633 | };
|
19634 | });
|
19635 | });
|
19636 |
|
19637 |
|
19638 |
|
19639 |
|
19640 |
|
19641 |
|
19642 |
|
19643 |
|
19644 |
|
19645 | var getManifestRenderings = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19646 | return manifest && manifest.getRenderings().map(function (rendering) {
|
19647 | return {
|
19648 | label: rendering.getLabel().map(function (label) {
|
19649 | return label.value;
|
19650 | })[0],
|
19651 | value: rendering.id
|
19652 | };
|
19653 | });
|
19654 | });
|
19655 |
|
19656 |
|
19657 |
|
19658 |
|
19659 |
|
19660 |
|
19661 |
|
19662 |
|
19663 |
|
19664 | var getManifestRelatedContent = Object(es["createSelector"])([getProperty('seeAlso'), getManifestLocale], function (seeAlso, locale) {
|
19665 | return seeAlso && asArray(seeAlso).map(function (related) {
|
19666 | return {
|
19667 | format: related.format,
|
19668 | label: LanguageMap_LanguageMap.parse(related.label, locale).map(function (label) {
|
19669 | return label.value;
|
19670 | })[0],
|
19671 | value: related.id || related['@id']
|
19672 | };
|
19673 | });
|
19674 | });
|
19675 |
|
19676 |
|
19677 |
|
19678 |
|
19679 |
|
19680 |
|
19681 |
|
19682 |
|
19683 |
|
19684 | var getRequiredStatement = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19685 | return manifest && asArray(manifest.getRequiredStatement()).filter(function (l) {
|
19686 | return l.getValue();
|
19687 | }).map(function (labelValuePair) {
|
19688 | return {
|
19689 | label: labelValuePair.getLabel(),
|
19690 | value: labelValuePair.getValue()
|
19691 | };
|
19692 | });
|
19693 | });
|
19694 |
|
19695 |
|
19696 |
|
19697 |
|
19698 |
|
19699 |
|
19700 |
|
19701 |
|
19702 |
|
19703 | var getRights = Object(es["createSelector"])([getProperty('rights'), getProperty('license'), getManifestLocale], function (rights, license, locale) {
|
19704 | var data = rights || license;
|
19705 | return asArray(LanguageMap_LanguageMap.parse(data, locale).map(function (label) {
|
19706 | return label.value;
|
19707 | }));
|
19708 | });
|
19709 |
|
19710 |
|
19711 |
|
19712 |
|
19713 |
|
19714 |
|
19715 |
|
19716 |
|
19717 |
|
19718 | function manifests_getManifestThumbnail(state, props) {
|
19719 | var manifest = getManifestoInstance(state, props);
|
19720 | if (!manifest) return undefined;
|
19721 | var thumbnail = lib_ThumbnailFactory(manifest, {
|
19722 | maxHeight: 80,
|
19723 | maxWidth: 120
|
19724 | });
|
19725 | return thumbnail && thumbnail.url;
|
19726 | }
|
19727 |
|
19728 |
|
19729 |
|
19730 |
|
19731 |
|
19732 |
|
19733 |
|
19734 |
|
19735 |
|
19736 | var getManifestTitle = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19737 | return manifest && manifest.getLabel().map(function (label) {
|
19738 | return label.value;
|
19739 | })[0];
|
19740 | });
|
19741 |
|
19742 |
|
19743 |
|
19744 |
|
19745 |
|
19746 |
|
19747 |
|
19748 |
|
19749 |
|
19750 | var getManifestDescription = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19751 | return manifest && manifest.getDescription().map(function (label) {
|
19752 | return label.value;
|
19753 | })[0];
|
19754 | });
|
19755 |
|
19756 |
|
19757 |
|
19758 |
|
19759 |
|
19760 |
|
19761 |
|
19762 |
|
19763 |
|
19764 | var getManifestUrl = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19765 | return manifest && manifest.id;
|
19766 | });
|
19767 |
|
19768 |
|
19769 |
|
19770 |
|
19771 |
|
19772 |
|
19773 |
|
19774 |
|
19775 |
|
19776 | function getDestructuredMetadata(iiifResource) {
|
19777 | return iiifResource && iiifResource.getMetadata().map(function (labelValuePair) {
|
19778 | return {
|
19779 | label: labelValuePair.getLabel(),
|
19780 | value: labelValuePair.getValue()
|
19781 | };
|
19782 | });
|
19783 | }
|
19784 |
|
19785 |
|
19786 |
|
19787 |
|
19788 |
|
19789 |
|
19790 |
|
19791 |
|
19792 |
|
19793 | var getManifestMetadata = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19794 | return manifest && getDestructuredMetadata(manifest);
|
19795 | });
|
19796 |
|
19797 |
|
19798 | function getLocalesForStructure(item) {
|
19799 | var languages = [];
|
19800 |
|
19801 | if (Array.isArray(item)) {
|
19802 | languages.push.apply(languages, manifests_toConsumableArray(item.filter(function (i) {
|
19803 | return typeof i === 'object' && i['@language'];
|
19804 | }).map(function (i) {
|
19805 | return i['@language'];
|
19806 | })));
|
19807 | } else if (item && typeof item === 'object') {
|
19808 | if (item['@language']) languages.push(item['@language']);
|
19809 | }
|
19810 |
|
19811 | return languages;
|
19812 | }
|
19813 |
|
19814 |
|
19815 |
|
19816 | function getLocales(resource) {
|
19817 | if (!resource) return [];
|
19818 | var metadata = resource.getProperty('metadata') || [];
|
19819 | var languages = {};
|
19820 |
|
19821 | for (var i = 0; i < metadata.length; i += 1) {
|
19822 | var item = metadata[i];
|
19823 | getLocalesForStructure(item.label).forEach(function (l) {
|
19824 | languages[l] = true;
|
19825 | });
|
19826 | getLocalesForStructure(item.value).forEach(function (l) {
|
19827 | languages[l] = true;
|
19828 | });
|
19829 | }
|
19830 |
|
19831 | return Object.keys(languages);
|
19832 | }
|
19833 |
|
19834 | var getMetadataLocales = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19835 | return getLocales(manifest);
|
19836 | });
|
19837 |
|
19838 |
|
19839 | var getManifestSearchService = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19840 | if (!manifest) return null;
|
19841 | var searchService = manifest.getService('http://iiif.io/api/search/0/search') || manifest.getService('http://iiif.io/api/search/1/search');
|
19842 | if (searchService) return searchService;
|
19843 | return null;
|
19844 | });
|
19845 |
|
19846 |
|
19847 | var getManifestAutocompleteService = Object(es["createSelector"])([getManifestSearchService], function (searchService) {
|
19848 | var autocompleteService = searchService && (searchService.getService('http://iiif.io/api/search/0/autocomplete') || searchService.getService('http://iiif.io/api/search/1/autocomplete'));
|
19849 | return autocompleteService && autocompleteService;
|
19850 | });
|
19851 |
|
19852 |
|
19853 |
|
19854 |
|
19855 |
|
19856 | var getSequences = Object(es["createSelector"])([getManifestoInstance], function (manifest) {
|
19857 | if (!manifest || !manifest.getTopRanges) return null;
|
19858 | var topRangesOrRoot = manifest.getTopRanges();
|
19859 | var v2TopRanges = topRangesOrRoot.filter(function (r) {
|
19860 | return r.getProperty('viewingHint') === 'top';
|
19861 | });
|
19862 | var v3RangeSequences = [];
|
19863 |
|
19864 | if (v2TopRanges.length === 0 && topRangesOrRoot.length === 1) {
|
19865 | v3RangeSequences = topRangesOrRoot[0].getRanges().filter(function (r) {
|
19866 | return r.getBehavior() === 'sequence';
|
19867 | });
|
19868 | }
|
19869 |
|
19870 | var sequences = [].concat(
|
19871 | manifest.getSequences(),
|
19872 | v2TopRanges,
|
19873 | v3RangeSequences);
|
19874 | return sequences;
|
19875 | });
|
19876 | var getSequence = Object(es["createSelector"])([getSequences, getWindow, function (state, _ref) {
|
19877 | var sequenceId = _ref.sequenceId;
|
19878 | return sequenceId;
|
19879 | }], function (sequences, window, sequenceId) {
|
19880 | if (!sequences) return null;
|
19881 |
|
19882 | if (sequenceId || window && window.sequenceId) {
|
19883 | var currentSequence = sequences.find(function (s) {
|
19884 | return s.id === (sequenceId || window.sequenceId);
|
19885 | });
|
19886 | if (currentSequence) return currentSequence;
|
19887 | }
|
19888 |
|
19889 | return sequences[0];
|
19890 | });
|
19891 |
|
19892 |
|
19893 |
|
19894 |
|
19895 |
|
19896 |
|
19897 | var getCanvasIndex = Object(es["createSelector"])([getWindow, getSequence], function (window, sequence) {
|
19898 | return (sequence && window && window.canvasId && sequence.getCanvasById(window.canvasId) || {}).index || 0;
|
19899 | });
|
19900 |
|
19901 |
|
19902 |
|
19903 |
|
19904 |
|
19905 |
|
19906 |
|
19907 |
|
19908 |
|
19909 | var getSequenceViewingHint = Object(es["createSelector"])([getSequence, getManifestoInstance], function (sequence, manifest) {
|
19910 | if (!manifest) return null;
|
19911 | var viewingHint = sequence && sequence.getViewingHint() || manifest.getViewingHint();
|
19912 | if (viewingHint) return viewingHint;
|
19913 | return null;
|
19914 | });
|
19915 |
|
19916 |
|
19917 | var getSequenceViewingDirection = Object(es["createSelector"])([getWindow, getSequence, getManifestoInstance], function (window, sequence, manifest) {
|
19918 | var viewingDirection = window && window.viewingDirection || sequence && sequence.getViewingDirection() || manifest && manifest.getViewingDirection();
|
19919 | if (viewingDirection) return viewingDirection;
|
19920 | return null;
|
19921 | });
|
19922 |
|
19923 |
|
19924 |
|
19925 |
|
19926 |
|
19927 |
|
19928 |
|
19929 |
|
19930 |
|
19931 | var getSequenceBehaviors = Object(es["createSelector"])([getSequence, getManifestoInstance], function (sequence, manifest) {
|
19932 | if (!manifest || !sequence) return [];
|
19933 | var sequenceBehaviors = sequence && sequence.getProperty('behavior');
|
19934 |
|
19935 | if (sequenceBehaviors) {
|
19936 | if (Array.isArray(sequenceBehaviors)) return sequenceBehaviors;
|
19937 | return [sequenceBehaviors];
|
19938 | }
|
19939 |
|
19940 | var behaviors = manifest.getProperty('behavior');
|
19941 | if (!behaviors) return [];
|
19942 | if (Array.isArray(behaviors)) return behaviors;
|
19943 | return [behaviors];
|
19944 | });
|
19945 |
|
19946 |
|
19947 | var getSequenceTreeStructure = Object(es["createSelector"])([getSequence, getManifestoInstance], function (sequence, manifest) {
|
19948 | if (sequence && sequence.getProperty('type') && sequence.isRange()) return sequence.getTree(new TreeNode_TreeNode('root'));
|
19949 | return manifest && manifest.getDefaultTree();
|
19950 | });
|
19951 |
|
19952 | function workspace_slicedToArray(arr, i) { return workspace_arrayWithHoles(arr) || workspace_iterableToArrayLimit(arr, i) || workspace_unsupportedIterableToArray(arr, i) || workspace_nonIterableRest(); }
|
19953 |
|
19954 | function workspace_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
19955 |
|
19956 | function workspace_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return workspace_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return workspace_arrayLikeToArray(o, minLen); }
|
19957 |
|
19958 | function workspace_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
19959 |
|
19960 | function workspace_iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
19961 |
|
19962 | function workspace_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
19963 |
|
19964 |
|
19965 |
|
19966 |
|
19967 |
|
19968 |
|
19969 | function getElasticLayout(state) {
|
19970 | return miradorSlice(state).elasticLayout;
|
19971 | }
|
19972 | var getFullScreenEnabled = Object(es["createSelector"])([getWorkspace], function (workspace) {
|
19973 | return workspace.isFullscreenEnabled;
|
19974 | });
|
19975 |
|
19976 |
|
19977 |
|
19978 |
|
19979 | function getLatestError(state) {
|
19980 | var _miradorSlice$errors$ = workspace_slicedToArray(miradorSlice(state).errors.items, 1),
|
19981 | errorId = _miradorSlice$errors$[0];
|
19982 |
|
19983 | return miradorSlice(state).errors[errorId];
|
19984 | }
|
19985 | var getWorkspaceType = Object(es["createSelector"])([getWorkspace], function (_ref) {
|
19986 | var type = _ref.type;
|
19987 | return type;
|
19988 | });
|
19989 | var getFocusedWindowId = Object(es["createSelector"])([getWorkspace], function (_ref2) {
|
19990 | var focusedWindowId = _ref2.focusedWindowId;
|
19991 | return focusedWindowId;
|
19992 | });
|
19993 |
|
19994 |
|
19995 | var isFocused = function isFocused(state, _ref3) {
|
19996 | var windowId = _ref3.windowId;
|
19997 | return getFocusedWindowId(state) === windowId;
|
19998 | };
|
19999 |
|
20000 | function windows_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
20001 |
|
20002 | function windows_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { windows_ownKeys(Object(source), true).forEach(function (key) { windows_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { windows_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
20003 |
|
20004 | function windows_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
20005 |
|
20006 |
|
20007 |
|
20008 |
|
20009 |
|
20010 |
|
20011 |
|
20012 |
|
20013 |
|
20014 | var getWindowConfig = Object(es["createSelector"])([getConfig, getWindow], function (_ref) {
|
20015 | var defaultConfig = _ref.window;
|
20016 | var windowConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
20017 | return windows_objectSpread(windows_objectSpread({}, defaultConfig), windowConfig);
|
20018 | });
|
20019 |
|
20020 |
|
20021 |
|
20022 |
|
20023 |
|
20024 |
|
20025 | function getWindowTitles(state) {
|
20026 | var result = {};
|
20027 | Object.keys(getWindows(state)).forEach(function (windowId) {
|
20028 | result[windowId] = getManifestTitle(state, {
|
20029 | windowId: windowId
|
20030 | });
|
20031 | });
|
20032 | return result;
|
20033 | }
|
20034 |
|
20035 |
|
20036 | var getMaximizedWindowsIds = Object(es["createSelector"])([getWindows], function (windows) {
|
20037 | return Object.values(windows).filter(function (window) {
|
20038 | return window.maximized === true;
|
20039 | }).map(function (window) {
|
20040 | return window.id;
|
20041 | });
|
20042 | });
|
20043 |
|
20044 |
|
20045 |
|
20046 |
|
20047 |
|
20048 |
|
20049 |
|
20050 |
|
20051 | var getWindowViewType = Object(es["createSelector"])([getWindow, getWindowConfig, getSequenceViewingHint, getSequenceBehaviors], function (window, _ref2, manifestViewingHint, manifestBehaviors) {
|
20052 | var _ref2$views = _ref2.views,
|
20053 | views = _ref2$views === void 0 ? [] : _ref2$views,
|
20054 | defaultView = _ref2.defaultView;
|
20055 | if (window && window.view) return window.view;
|
20056 | var config = (views || []).find(function (view) {
|
20057 | return view.behaviors && view.behaviors.some(function (b) {
|
20058 | return manifestViewingHint === b || manifestBehaviors.includes(b);
|
20059 | });
|
20060 | });
|
20061 | return config && config.key || defaultView;
|
20062 | });
|
20063 |
|
20064 |
|
20065 | var getAllowedWindowViewTypes = Object(es["createSelector"])([getSequenceViewingHint, getSequenceBehaviors, getWindowConfig], function (manifestViewingHint, manifestBehaviors, _ref3) {
|
20066 | var _ref3$views = _ref3.views,
|
20067 | views = _ref3$views === void 0 ? [] : _ref3$views,
|
20068 | defaultView = _ref3.defaultView;
|
20069 | return (views || []).reduce(function (allowedViews, view) {
|
20070 | if (view.key === defaultView || !view.behaviors || view.behaviors.some(function (b) {
|
20071 | return manifestViewingHint === b || manifestBehaviors.includes(b);
|
20072 | })) allowedViews.push(view.key);
|
20073 | return allowedViews;
|
20074 | }, []);
|
20075 | });
|
20076 |
|
20077 |
|
20078 |
|
20079 |
|
20080 |
|
20081 |
|
20082 |
|
20083 | var getWindowDraggability = Object(es["createSelector"])([getWorkspaceType, getWindow, function (state) {
|
20084 | return getWindowIds(state).length > 1;
|
20085 | }], function (workspaceType, window, manyWindows) {
|
20086 | if (workspaceType === 'elastic') return true;
|
20087 | return manyWindows && window && window.maximized === false;
|
20088 | });
|
20089 |
|
20090 | function canvases_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
20091 |
|
20092 | function canvases_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { canvases_ownKeys(Object(source), true).forEach(function (key) { canvases_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { canvases_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
20093 |
|
20094 | function canvases_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
20095 |
|
20096 | function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = canvases_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
20097 |
|
20098 | function canvases_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return canvases_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return canvases_arrayLikeToArray(o, minLen); }
|
20099 |
|
20100 | function canvases_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
20101 |
|
20102 |
|
20103 |
|
20104 |
|
20105 |
|
20106 |
|
20107 |
|
20108 |
|
20109 |
|
20110 |
|
20111 |
|
20112 |
|
20113 | var canvases_selectInfoResponses = function selectInfoResponses(state) {
|
20114 | return miradorSlice(state).infoResponses;
|
20115 | };
|
20116 | var getCanvases = Object(es["createSelector"])([getSequence], function (sequence) {
|
20117 | return sequence && sequence.getCanvases() || [];
|
20118 | });
|
20119 |
|
20120 |
|
20121 |
|
20122 |
|
20123 |
|
20124 |
|
20125 |
|
20126 |
|
20127 |
|
20128 | var getCanvas = Object(es["createSelector"])([getSequence, function (state, _ref) {
|
20129 | var canvasId = _ref.canvasId;
|
20130 | return canvasId;
|
20131 | }], function (sequence, canvasId) {
|
20132 | if (!sequence || !canvasId) return undefined;
|
20133 | return sequence.getCanvasById(canvasId);
|
20134 | });
|
20135 | var getCurrentCanvas = Object(es["createSelector"])([getSequence, getWindow], function (sequence, window) {
|
20136 | if (!sequence || !window) return undefined;
|
20137 | if (!window.canvasId) return sequence.getCanvasByIndex(0);
|
20138 | return sequence.getCanvasById(window.canvasId);
|
20139 | });
|
20140 |
|
20141 |
|
20142 | var getVisibleCanvasIds = Object(es["createSelector"])([getWindow], function (window) {
|
20143 | return window && (window.visibleCanvases || window.canvasId && [window.canvasId]) || [];
|
20144 | });
|
20145 |
|
20146 |
|
20147 | var getVisibleCanvases = Object(es["createSelector"])([getVisibleCanvasIds, getCanvases], function (canvasIds, canvases) {
|
20148 | return (canvases || []).filter(function (c) {
|
20149 | return canvasIds.includes(c.id);
|
20150 | });
|
20151 | });
|
20152 |
|
20153 |
|
20154 |
|
20155 |
|
20156 |
|
20157 |
|
20158 |
|
20159 |
|
20160 |
|
20161 |
|
20162 | var getCanvasGroupings = Object(es["createSelector"])([getCanvases, getWindowViewType], function (canvases, view) {
|
20163 | return canvases && new CanvasGroupings(canvases, view).groupings();
|
20164 | });
|
20165 |
|
20166 |
|
20167 |
|
20168 |
|
20169 |
|
20170 |
|
20171 |
|
20172 |
|
20173 |
|
20174 |
|
20175 | var getCanvasGrouping = Object(es["createSelector"])([getCanvasGroupings, function (state, _ref2) {
|
20176 | var canvasId = _ref2.canvasId;
|
20177 | return canvasId;
|
20178 | }], function (groupings, canvasId) {
|
20179 | return groupings && groupings.find(function (group) {
|
20180 | return group.some(function (c) {
|
20181 | return c.id === canvasId;
|
20182 | });
|
20183 | }) || [];
|
20184 | });
|
20185 |
|
20186 |
|
20187 |
|
20188 |
|
20189 |
|
20190 |
|
20191 |
|
20192 |
|
20193 |
|
20194 |
|
20195 | var getNextCanvasGrouping = Object(es["createSelector"])([getCanvasGroupings, getCurrentCanvas], function (groupings, canvas, view) {
|
20196 | if (!groupings || !canvas) return undefined;
|
20197 | var currentGroupIndex = groupings.findIndex(function (group) {
|
20198 | return group.some(function (c) {
|
20199 | return c.id === canvas.id;
|
20200 | });
|
20201 | });
|
20202 | if (currentGroupIndex < 0 || currentGroupIndex + 1 >= groupings.length) return undefined;
|
20203 | var newGroup = groupings[currentGroupIndex + 1];
|
20204 | return newGroup;
|
20205 | });
|
20206 |
|
20207 |
|
20208 |
|
20209 |
|
20210 |
|
20211 |
|
20212 |
|
20213 |
|
20214 |
|
20215 |
|
20216 | var getPreviousCanvasGrouping = Object(es["createSelector"])([getCanvasGroupings, getCurrentCanvas], function (groupings, canvas, view) {
|
20217 | if (!groupings || !canvas) return undefined;
|
20218 | var currentGroupIndex = groupings.findIndex(function (group) {
|
20219 | return group.some(function (c) {
|
20220 | return c.id === canvas.id;
|
20221 | });
|
20222 | });
|
20223 | if (currentGroupIndex < 1) return undefined;
|
20224 | var newGroup = groupings[currentGroupIndex - 1];
|
20225 | return newGroup;
|
20226 | });
|
20227 |
|
20228 |
|
20229 |
|
20230 |
|
20231 |
|
20232 |
|
20233 | var getCanvasLabel = Object(es["createSelector"])([getCanvas], function (canvas) {
|
20234 | return canvas && (canvas.getLabel().length > 0 ? canvas.getLabel().map(function (label) {
|
20235 | return label.value;
|
20236 | })[0] : String(canvas.index + 1));
|
20237 | });
|
20238 |
|
20239 |
|
20240 |
|
20241 |
|
20242 |
|
20243 |
|
20244 | var getCanvasDescription = Object(es["createSelector"])([getCanvas], function (canvas) {
|
20245 | return canvas && canvas.getProperty('description');
|
20246 | });
|
20247 | var getVisibleCanvasNonTiledResources = Object(es["createSelector"])([getVisibleCanvases], function (canvases) {
|
20248 | return flatten_default()(canvases.map(function (canvas) {
|
20249 | return new MiradorCanvas_MiradorCanvas(canvas).imageResources;
|
20250 | })).filter(function (resource) {
|
20251 | return resource.getServices().length < 1;
|
20252 | });
|
20253 | });
|
20254 | var selectInfoResponse = Object(es["createSelector"])([function (state, _ref3) {
|
20255 | var infoId = _ref3.infoId;
|
20256 | return infoId;
|
20257 | }, getCanvas, canvases_selectInfoResponses], function (infoId, canvas, infoResponses) {
|
20258 | var iiifServiceId = infoId;
|
20259 |
|
20260 | if (!infoId) {
|
20261 | if (!canvas) return undefined;
|
20262 | var miradorCanvas = new MiradorCanvas_MiradorCanvas(canvas);
|
20263 | var image = miradorCanvas.iiifImageResources[0];
|
20264 | iiifServiceId = image && image.getServices()[0].id;
|
20265 | }
|
20266 |
|
20267 | return iiifServiceId && infoResponses[iiifServiceId] && !infoResponses[iiifServiceId].isFetching && infoResponses[iiifServiceId];
|
20268 | });
|
20269 | var authServiceProfiles = {
|
20270 | clickthrough: true,
|
20271 | external: true,
|
20272 | kiosk: true,
|
20273 | login: true
|
20274 | };
|
20275 |
|
20276 |
|
20277 |
|
20278 |
|
20279 | function selectNextAuthService(_ref4, resource) {
|
20280 | var auth = _ref4.auth;
|
20281 | var filter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : authServiceProfiles;
|
20282 | var orderedAuthServiceProfiles = ['http://iiif.io/api/auth/1/external', 'http://iiif.io/api/auth/1/kiosk', 'http://iiif.io/api/auth/1/clickthrough', 'http://iiif.io/api/auth/1/login'];
|
20283 | var mapFilterToProfiles = {
|
20284 | 'http://iiif.io/api/auth/1/clickthrough': 'clickthrough',
|
20285 | 'http://iiif.io/api/auth/1/external': 'external',
|
20286 | 'http://iiif.io/api/auth/1/kiosk': 'kiosk',
|
20287 | 'http://iiif.io/api/auth/1/login': 'login'
|
20288 | };
|
20289 |
|
20290 | for (var _i = 0, _orderedAuthServicePr = orderedAuthServiceProfiles; _i < _orderedAuthServicePr.length; _i++) {
|
20291 | var profile = _orderedAuthServicePr[_i];
|
20292 | var services = getServices(resource, profile);
|
20293 |
|
20294 | var _iterator = _createForOfIteratorHelper(services),
|
20295 | _step;
|
20296 |
|
20297 | try {
|
20298 | for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
20299 | var service = _step.value;
|
20300 |
|
20301 | if (!auth[service.id]) {
|
20302 | return filter[mapFilterToProfiles[profile]] && service;
|
20303 | }
|
20304 |
|
20305 | if (auth[service.id].isFetching || auth[service.id].ok) return null;
|
20306 | }
|
20307 | } catch (err) {
|
20308 | _iterator.e(err);
|
20309 | } finally {
|
20310 | _iterator.f();
|
20311 | }
|
20312 | }
|
20313 |
|
20314 | return null;
|
20315 | }
|
20316 |
|
20317 |
|
20318 | function selectActiveAuthService(state, resource) {
|
20319 | var orderedAuthServiceProfiles = ['http://iiif.io/api/auth/1/login', 'http://iiif.io/api/auth/1/clickthrough', 'http://iiif.io/api/auth/1/kiosk', 'http://iiif.io/api/auth/1/external'];
|
20320 |
|
20321 | for (var _i2 = 0, _orderedAuthServicePr2 = orderedAuthServiceProfiles; _i2 < _orderedAuthServicePr2.length; _i2++) {
|
20322 | var profile = _orderedAuthServicePr2[_i2];
|
20323 | var services = getServices(resource, profile);
|
20324 | var service = services.find(function (s) {
|
20325 | return selectAuthStatus(state, s);
|
20326 | });
|
20327 | if (service) return service;
|
20328 | }
|
20329 |
|
20330 | return null;
|
20331 | }
|
20332 | var selectCanvasAuthService = Object(es["createSelector"])([selectInfoResponse, function (state) {
|
20333 | return state;
|
20334 | }], function (infoResponse, state) {
|
20335 | var resource = infoResponse && infoResponse.json;
|
20336 | if (!resource) return undefined;
|
20337 | return selectNextAuthService(state, resource) || selectActiveAuthService(state, resource);
|
20338 | });
|
20339 | var selectLogoutAuthService = Object(es["createSelector"])([selectInfoResponse, function (state) {
|
20340 | return state;
|
20341 | }], function (infoResponse, state) {
|
20342 | if (!infoResponse) return undefined;
|
20343 | var authService = selectActiveAuthService(state, infoResponse.json);
|
20344 | if (!authService) return undefined;
|
20345 | return authService.getService('http://iiif.io/api/auth/1/logout');
|
20346 | });
|
20347 |
|
20348 |
|
20349 | function selectAuthStatus(_ref5, service) {
|
20350 | var auth = _ref5.auth;
|
20351 | if (!service) return null;
|
20352 | if (!auth[service.id]) return null;
|
20353 | if (auth[service.id].isFetching) return 'fetching';
|
20354 | if (auth[service.id].ok) return 'ok';
|
20355 | return 'failed';
|
20356 | }
|
20357 |
|
20358 |
|
20359 | function getServices(resource, profile) {
|
20360 | var services = Utils_Utils.getServices(canvases_objectSpread(canvases_objectSpread({}, resource), {}, {
|
20361 | options: {}
|
20362 | }));
|
20363 | return services.filter(function (service) {
|
20364 | return service.getProfile() === profile;
|
20365 | });
|
20366 | }
|
20367 |
|
20368 | function canvas_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
20369 |
|
20370 | function canvas_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { canvas_ownKeys(Object(source), true).forEach(function (key) { canvas_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { canvas_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
20371 |
|
20372 | function canvas_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
20373 |
|
20374 |
|
20375 |
|
20376 |
|
20377 |
|
20378 |
|
20379 |
|
20380 |
|
20381 |
|
20382 |
|
20383 |
|
20384 | function setCanvas(windowId, canvasId) {
|
20385 | var newGroup = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
20386 | var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
20387 | return function (dispatch, getState) {
|
20388 | var state = getState();
|
20389 | var visibleCanvases = newGroup;
|
20390 |
|
20391 | if (!visibleCanvases) {
|
20392 | var group = getCanvasGrouping(state, {
|
20393 | canvasId: canvasId,
|
20394 | windowId: windowId
|
20395 | });
|
20396 | visibleCanvases = (group || []).map(function (c) {
|
20397 | return c.id;
|
20398 | });
|
20399 | }
|
20400 |
|
20401 | dispatch(canvas_objectSpread(canvas_objectSpread({}, options), {}, {
|
20402 | canvasId: canvasId,
|
20403 | type: action_types.SET_CANVAS,
|
20404 | visibleCanvases: visibleCanvases,
|
20405 | windowId: windowId
|
20406 | }));
|
20407 | };
|
20408 | }
|
20409 |
|
20410 |
|
20411 | function setNextCanvas(windowId) {
|
20412 | return function (dispatch, getState) {
|
20413 | var state = getState();
|
20414 | var newGroup = getNextCanvasGrouping(state, {
|
20415 | windowId: windowId
|
20416 | });
|
20417 | var ids = (newGroup || []).map(function (c) {
|
20418 | return c.id;
|
20419 | });
|
20420 | newGroup && dispatch(setCanvas(windowId, ids[0], ids));
|
20421 | };
|
20422 | }
|
20423 |
|
20424 |
|
20425 | function setPreviousCanvas(windowId) {
|
20426 | return function (dispatch, getState) {
|
20427 | var state = getState();
|
20428 | var newGroup = getPreviousCanvasGrouping(state, {
|
20429 | windowId: windowId
|
20430 | });
|
20431 | var ids = (newGroup || []).map(function (c) {
|
20432 | return c.id;
|
20433 | });
|
20434 | newGroup && dispatch(setCanvas(windowId, ids[0], ids));
|
20435 | };
|
20436 | }
|
20437 |
|
20438 |
|
20439 |
|
20440 |
|
20441 |
|
20442 |
|
20443 |
|
20444 | function updateViewport(windowId, payload) {
|
20445 | return {
|
20446 | payload: payload,
|
20447 | type: action_types.UPDATE_VIEWPORT,
|
20448 | windowId: windowId
|
20449 | };
|
20450 | }
|
20451 |
|
20452 | var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(0);
|
20453 | var external_root_React_commonjs2_react_commonjs_react_amd_react_default = __webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
20454 |
|
20455 |
|
20456 | var prop_types = __webpack_require__(4);
|
20457 | var prop_types_default = __webpack_require__.n(prop_types);
|
20458 |
|
20459 |
|
20460 | var Brightness5 = __webpack_require__(74);
|
20461 | var Brightness5_default = __webpack_require__.n(Brightness5);
|
20462 |
|
20463 |
|
20464 | var Tonality = __webpack_require__(77);
|
20465 | var Tonality_default = __webpack_require__.n(Tonality);
|
20466 |
|
20467 |
|
20468 | var Gradient = __webpack_require__(76);
|
20469 | var Gradient_default = __webpack_require__.n(Gradient);
|
20470 |
|
20471 |
|
20472 | var ExposureSharp = __webpack_require__(75);
|
20473 | var ExposureSharp_default = __webpack_require__.n(ExposureSharp);
|
20474 |
|
20475 |
|
20476 | var InvertColors = __webpack_require__(78);
|
20477 | var InvertColors_default = __webpack_require__.n(InvertColors);
|
20478 |
|
20479 |
|
20480 | var TuneSharp = __webpack_require__(36);
|
20481 | var TuneSharp_default = __webpack_require__.n(TuneSharp);
|
20482 |
|
20483 |
|
20484 | var CloseSharp = __webpack_require__(80);
|
20485 | var CloseSharp_default = __webpack_require__.n(CloseSharp);
|
20486 |
|
20487 |
|
20488 | var ReplaySharp = __webpack_require__(79);
|
20489 | var ReplaySharp_default = __webpack_require__.n(ReplaySharp);
|
20490 |
|
20491 |
|
20492 | var esm_extends = __webpack_require__(1);
|
20493 |
|
20494 |
|
20495 | var objectWithoutProperties = __webpack_require__(5);
|
20496 |
|
20497 |
|
20498 | var clsx_m = __webpack_require__(6);
|
20499 |
|
20500 |
|
20501 | var withStyles = __webpack_require__(7);
|
20502 |
|
20503 |
|
20504 | var capitalize = __webpack_require__(8);
|
20505 |
|
20506 |
|
20507 |
|
20508 |
|
20509 |
|
20510 |
|
20511 |
|
20512 |
|
20513 |
|
20514 | var RADIUS_STANDARD = 10;
|
20515 | var RADIUS_DOT = 4;
|
20516 | var Badge_styles = function styles(theme) {
|
20517 | return {
|
20518 |
|
20519 | root: {
|
20520 | position: 'relative',
|
20521 | display: 'inline-flex',
|
20522 |
|
20523 | verticalAlign: 'middle',
|
20524 | flexShrink: 0
|
20525 | },
|
20526 |
|
20527 |
|
20528 | badge: {
|
20529 | display: 'flex',
|
20530 | flexDirection: 'row',
|
20531 | flexWrap: 'wrap',
|
20532 | justifyContent: 'center',
|
20533 | alignContent: 'center',
|
20534 | alignItems: 'center',
|
20535 | position: 'absolute',
|
20536 | boxSizing: 'border-box',
|
20537 | fontFamily: theme.typography.fontFamily,
|
20538 | fontWeight: theme.typography.fontWeightMedium,
|
20539 | fontSize: theme.typography.pxToRem(12),
|
20540 | minWidth: RADIUS_STANDARD * 2,
|
20541 | lineHeight: 1,
|
20542 | padding: '0 6px',
|
20543 | height: RADIUS_STANDARD * 2,
|
20544 | borderRadius: RADIUS_STANDARD,
|
20545 | zIndex: 1,
|
20546 |
|
20547 | transition: theme.transitions.create('transform', {
|
20548 | easing: theme.transitions.easing.easeInOut,
|
20549 | duration: theme.transitions.duration.enteringScreen
|
20550 | })
|
20551 | },
|
20552 |
|
20553 |
|
20554 | colorPrimary: {
|
20555 | backgroundColor: theme.palette.primary.main,
|
20556 | color: theme.palette.primary.contrastText
|
20557 | },
|
20558 |
|
20559 |
|
20560 | colorSecondary: {
|
20561 | backgroundColor: theme.palette.secondary.main,
|
20562 | color: theme.palette.secondary.contrastText
|
20563 | },
|
20564 |
|
20565 |
|
20566 | colorError: {
|
20567 | backgroundColor: theme.palette.error.main,
|
20568 | color: theme.palette.error.contrastText
|
20569 | },
|
20570 |
|
20571 |
|
20572 | dot: {
|
20573 | borderRadius: RADIUS_DOT,
|
20574 | height: RADIUS_DOT * 2,
|
20575 | minWidth: RADIUS_DOT * 2,
|
20576 | padding: 0
|
20577 | },
|
20578 |
|
20579 |
|
20580 | anchorOriginTopRightRectangle: {
|
20581 | top: 0,
|
20582 | right: 0,
|
20583 | transform: 'scale(1) translate(50%, -50%)',
|
20584 | transformOrigin: '100% 0%',
|
20585 | '&$invisible': {
|
20586 | transform: 'scale(0) translate(50%, -50%)'
|
20587 | }
|
20588 | },
|
20589 |
|
20590 |
|
20591 | anchorOriginBottomRightRectangle: {
|
20592 | bottom: 0,
|
20593 | right: 0,
|
20594 | transform: 'scale(1) translate(50%, 50%)',
|
20595 | transformOrigin: '100% 100%',
|
20596 | '&$invisible': {
|
20597 | transform: 'scale(0) translate(50%, 50%)'
|
20598 | }
|
20599 | },
|
20600 |
|
20601 |
|
20602 | anchorOriginTopLeftRectangle: {
|
20603 | top: 0,
|
20604 | left: 0,
|
20605 | transform: 'scale(1) translate(-50%, -50%)',
|
20606 | transformOrigin: '0% 0%',
|
20607 | '&$invisible': {
|
20608 | transform: 'scale(0) translate(-50%, -50%)'
|
20609 | }
|
20610 | },
|
20611 |
|
20612 |
|
20613 | anchorOriginBottomLeftRectangle: {
|
20614 | bottom: 0,
|
20615 | left: 0,
|
20616 | transform: 'scale(1) translate(-50%, 50%)',
|
20617 | transformOrigin: '0% 100%',
|
20618 | '&$invisible': {
|
20619 | transform: 'scale(0) translate(-50%, 50%)'
|
20620 | }
|
20621 | },
|
20622 |
|
20623 |
|
20624 | anchorOriginTopRightCircle: {
|
20625 | top: '14%',
|
20626 | right: '14%',
|
20627 | transform: 'scale(1) translate(50%, -50%)',
|
20628 | transformOrigin: '100% 0%',
|
20629 | '&$invisible': {
|
20630 | transform: 'scale(0) translate(50%, -50%)'
|
20631 | }
|
20632 | },
|
20633 |
|
20634 |
|
20635 | anchorOriginBottomRightCircle: {
|
20636 | bottom: '14%',
|
20637 | right: '14%',
|
20638 | transform: 'scale(1) translate(50%, 50%)',
|
20639 | transformOrigin: '100% 100%',
|
20640 | '&$invisible': {
|
20641 | transform: 'scale(0) translate(50%, 50%)'
|
20642 | }
|
20643 | },
|
20644 |
|
20645 |
|
20646 | anchorOriginTopLeftCircle: {
|
20647 | top: '14%',
|
20648 | left: '14%',
|
20649 | transform: 'scale(1) translate(-50%, -50%)',
|
20650 | transformOrigin: '0% 0%',
|
20651 | '&$invisible': {
|
20652 | transform: 'scale(0) translate(-50%, -50%)'
|
20653 | }
|
20654 | },
|
20655 |
|
20656 |
|
20657 | anchorOriginBottomLeftCircle: {
|
20658 | bottom: '14%',
|
20659 | left: '14%',
|
20660 | transform: 'scale(1) translate(-50%, 50%)',
|
20661 | transformOrigin: '0% 100%',
|
20662 | '&$invisible': {
|
20663 | transform: 'scale(0) translate(-50%, 50%)'
|
20664 | }
|
20665 | },
|
20666 |
|
20667 |
|
20668 | invisible: {
|
20669 | transition: theme.transitions.create('transform', {
|
20670 | easing: theme.transitions.easing.easeInOut,
|
20671 | duration: theme.transitions.duration.leavingScreen
|
20672 | })
|
20673 | }
|
20674 | };
|
20675 | };
|
20676 | var Badge_Badge = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function Badge(props, ref) {
|
20677 | var _props$anchorOrigin = props.anchorOrigin,
|
20678 | anchorOrigin = _props$anchorOrigin === void 0 ? {
|
20679 | vertical: 'top',
|
20680 | horizontal: 'right'
|
20681 | } : _props$anchorOrigin,
|
20682 | badgeContent = props.badgeContent,
|
20683 | children = props.children,
|
20684 | classes = props.classes,
|
20685 | className = props.className,
|
20686 | _props$color = props.color,
|
20687 | color = _props$color === void 0 ? 'default' : _props$color,
|
20688 | _props$component = props.component,
|
20689 | ComponentProp = _props$component === void 0 ? 'span' : _props$component,
|
20690 | invisibleProp = props.invisible,
|
20691 | _props$max = props.max,
|
20692 | max = _props$max === void 0 ? 99 : _props$max,
|
20693 | _props$overlap = props.overlap,
|
20694 | overlap = _props$overlap === void 0 ? 'rectangle' : _props$overlap,
|
20695 | _props$showZero = props.showZero,
|
20696 | showZero = _props$showZero === void 0 ? false : _props$showZero,
|
20697 | _props$variant = props.variant,
|
20698 | variant = _props$variant === void 0 ? 'standard' : _props$variant,
|
20699 | other = Object(objectWithoutProperties["a" ])(props, ["anchorOrigin", "badgeContent", "children", "classes", "className", "color", "component", "invisible", "max", "overlap", "showZero", "variant"]);
|
20700 |
|
20701 | var invisible = invisibleProp;
|
20702 |
|
20703 | if (invisibleProp == null && (badgeContent === 0 && !showZero || badgeContent == null && variant !== 'dot')) {
|
20704 | invisible = true;
|
20705 | }
|
20706 |
|
20707 | var displayValue = '';
|
20708 |
|
20709 | if (variant !== 'dot') {
|
20710 | displayValue = badgeContent > max ? "".concat(max, "+") : badgeContent;
|
20711 | }
|
20712 |
|
20713 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](ComponentProp, Object(esm_extends["a" ])({
|
20714 | className: Object(clsx_m["a" ])(classes.root, className),
|
20715 | ref: ref
|
20716 | }, other), children, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
20717 | className: Object(clsx_m["a" ])(classes.badge, classes["".concat(anchorOrigin.horizontal).concat(Object(capitalize["a" ])(anchorOrigin.vertical), "}")], classes["anchorOrigin".concat(Object(capitalize["a" ])(anchorOrigin.vertical)).concat(Object(capitalize["a" ])(anchorOrigin.horizontal)).concat(Object(capitalize["a" ])(overlap))], color !== 'default' && classes["color".concat(Object(capitalize["a" ])(color))], invisible && classes.invisible, variant === 'dot' && classes.dot)
|
20718 | }, displayValue));
|
20719 | });
|
20720 | false ? undefined : void 0;
|
20721 | var esm_Badge_Badge = (Object(withStyles["a" ])(Badge_styles, {
|
20722 | name: 'MuiBadge'
|
20723 | })(Badge_Badge));
|
20724 |
|
20725 | var colorManipulator = __webpack_require__(9);
|
20726 |
|
20727 |
|
20728 | var react_dom = __webpack_require__(11);
|
20729 | var react_dom_default = __webpack_require__.n(react_dom);
|
20730 |
|
20731 |
|
20732 |
|
20733 | function setRef(ref, value) {
|
20734 | if (typeof ref === 'function') {
|
20735 | ref(value);
|
20736 | } else if (ref) {
|
20737 | ref.current = value;
|
20738 | }
|
20739 | }
|
20740 |
|
20741 |
|
20742 |
|
20743 | function useForkRef(refA, refB) {
|
20744 | |
20745 |
|
20746 |
|
20747 |
|
20748 |
|
20749 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"](function () {
|
20750 | if (refA == null && refB == null) {
|
20751 | return null;
|
20752 | }
|
20753 |
|
20754 | return function (refValue) {
|
20755 | setRef(refA, refValue);
|
20756 | setRef(refB, refValue);
|
20757 | };
|
20758 | }, [refA, refB]);
|
20759 | }
|
20760 |
|
20761 |
|
20762 | var useEnhancedEffect = typeof window !== 'undefined' ? external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"] : external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"];
|
20763 |
|
20764 |
|
20765 |
|
20766 |
|
20767 |
|
20768 |
|
20769 | function useEventCallback(fn) {
|
20770 | var ref = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](fn);
|
20771 | useEnhancedEffect(function () {
|
20772 | ref.current = fn;
|
20773 | });
|
20774 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function () {
|
20775 | return (0, ref.current).apply(void 0, arguments);
|
20776 | }, []);
|
20777 | }
|
20778 |
|
20779 |
|
20780 |
|
20781 |
|
20782 | var hadKeyboardEvent = true;
|
20783 | var hadFocusVisibleRecently = false;
|
20784 | var hadFocusVisibleRecentlyTimeout = null;
|
20785 | var inputTypesWhitelist = {
|
20786 | text: true,
|
20787 | search: true,
|
20788 | url: true,
|
20789 | tel: true,
|
20790 | email: true,
|
20791 | password: true,
|
20792 | number: true,
|
20793 | date: true,
|
20794 | month: true,
|
20795 | week: true,
|
20796 | time: true,
|
20797 | datetime: true,
|
20798 | 'datetime-local': true
|
20799 | };
|
20800 |
|
20801 |
|
20802 |
|
20803 |
|
20804 |
|
20805 |
|
20806 |
|
20807 |
|
20808 | function focusTriggersKeyboardModality(node) {
|
20809 | var type = node.type,
|
20810 | tagName = node.tagName;
|
20811 |
|
20812 | if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {
|
20813 | return true;
|
20814 | }
|
20815 |
|
20816 | if (tagName === 'TEXTAREA' && !node.readOnly) {
|
20817 | return true;
|
20818 | }
|
20819 |
|
20820 | if (node.isContentEditable) {
|
20821 | return true;
|
20822 | }
|
20823 |
|
20824 | return false;
|
20825 | }
|
20826 |
|
20827 |
|
20828 |
|
20829 |
|
20830 |
|
20831 |
|
20832 |
|
20833 |
|
20834 |
|
20835 | function useIsFocusVisible_handleKeyDown(event) {
|
20836 | if (event.metaKey || event.altKey || event.ctrlKey) {
|
20837 | return;
|
20838 | }
|
20839 |
|
20840 | hadKeyboardEvent = true;
|
20841 | }
|
20842 |
|
20843 |
|
20844 |
|
20845 |
|
20846 |
|
20847 |
|
20848 |
|
20849 |
|
20850 |
|
20851 | function handlePointerDown() {
|
20852 | hadKeyboardEvent = false;
|
20853 | }
|
20854 |
|
20855 | function handleVisibilityChange() {
|
20856 | if (this.visibilityState === 'hidden') {
|
20857 |
|
20858 |
|
20859 |
|
20860 |
|
20861 | if (hadFocusVisibleRecently) {
|
20862 | hadKeyboardEvent = true;
|
20863 | }
|
20864 | }
|
20865 | }
|
20866 |
|
20867 | function prepare(doc) {
|
20868 | doc.addEventListener('keydown', useIsFocusVisible_handleKeyDown, true);
|
20869 | doc.addEventListener('mousedown', handlePointerDown, true);
|
20870 | doc.addEventListener('pointerdown', handlePointerDown, true);
|
20871 | doc.addEventListener('touchstart', handlePointerDown, true);
|
20872 | doc.addEventListener('visibilitychange', handleVisibilityChange, true);
|
20873 | }
|
20874 |
|
20875 | function teardown(doc) {
|
20876 | doc.removeEventListener('keydown', useIsFocusVisible_handleKeyDown, true);
|
20877 | doc.removeEventListener('mousedown', handlePointerDown, true);
|
20878 | doc.removeEventListener('pointerdown', handlePointerDown, true);
|
20879 | doc.removeEventListener('touchstart', handlePointerDown, true);
|
20880 | doc.removeEventListener('visibilitychange', handleVisibilityChange, true);
|
20881 | }
|
20882 |
|
20883 | function useIsFocusVisible_isFocusVisible(event) {
|
20884 | var target = event.target;
|
20885 |
|
20886 | try {
|
20887 | return target.matches(':focus-visible');
|
20888 | } catch (error) {}
|
20889 |
|
20890 |
|
20891 |
|
20892 |
|
20893 |
|
20894 |
|
20895 |
|
20896 | return hadKeyboardEvent || focusTriggersKeyboardModality(target);
|
20897 | }
|
20898 |
|
20899 |
|
20900 |
|
20901 |
|
20902 |
|
20903 | function handleBlurVisible() {
|
20904 |
|
20905 |
|
20906 |
|
20907 |
|
20908 | hadFocusVisibleRecently = true;
|
20909 | window.clearTimeout(hadFocusVisibleRecentlyTimeout);
|
20910 | hadFocusVisibleRecentlyTimeout = window.setTimeout(function () {
|
20911 | hadFocusVisibleRecently = false;
|
20912 | }, 100);
|
20913 | }
|
20914 |
|
20915 | function useIsFocusVisible() {
|
20916 | var ref = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function (instance) {
|
20917 | var node = react_dom["findDOMNode"](instance);
|
20918 |
|
20919 | if (node != null) {
|
20920 | prepare(node.ownerDocument);
|
20921 | }
|
20922 | }, []);
|
20923 |
|
20924 | if (false) {}
|
20925 |
|
20926 | return {
|
20927 | isFocusVisible: useIsFocusVisible_isFocusVisible,
|
20928 | onBlurVisible: handleBlurVisible,
|
20929 | ref: ref
|
20930 | };
|
20931 | }
|
20932 |
|
20933 | var toConsumableArray = __webpack_require__(20);
|
20934 |
|
20935 |
|
20936 | var objectWithoutPropertiesLoose = __webpack_require__(19);
|
20937 |
|
20938 |
|
20939 | var assertThisInitialized = __webpack_require__(29);
|
20940 |
|
20941 |
|
20942 | var inheritsLoose = __webpack_require__(23);
|
20943 |
|
20944 |
|
20945 |
|
20946 | var TransitionGroupContext = (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createContext(null));
|
20947 |
|
20948 |
|
20949 |
|
20950 |
|
20951 |
|
20952 |
|
20953 |
|
20954 |
|
20955 |
|
20956 | function getChildMapping(children, mapFn) {
|
20957 | var mapper = function mapper(child) {
|
20958 | return mapFn && Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child) ? mapFn(child) : child;
|
20959 | };
|
20960 |
|
20961 | var result = Object.create(null);
|
20962 | if (children) external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].map(children, function (c) {
|
20963 | return c;
|
20964 | }).forEach(function (child) {
|
20965 |
|
20966 | result[child.key] = mapper(child);
|
20967 | });
|
20968 | return result;
|
20969 | }
|
20970 |
|
20971 |
|
20972 |
|
20973 |
|
20974 |
|
20975 |
|
20976 |
|
20977 |
|
20978 |
|
20979 |
|
20980 |
|
20981 |
|
20982 |
|
20983 |
|
20984 |
|
20985 |
|
20986 |
|
20987 |
|
20988 | function mergeChildMappings(prev, next) {
|
20989 | prev = prev || {};
|
20990 | next = next || {};
|
20991 |
|
20992 | function getValueForKey(key) {
|
20993 | return key in next ? next[key] : prev[key];
|
20994 | }
|
20995 |
|
20996 |
|
20997 |
|
20998 | var nextKeysPending = Object.create(null);
|
20999 | var pendingKeys = [];
|
21000 |
|
21001 | for (var prevKey in prev) {
|
21002 | if (prevKey in next) {
|
21003 | if (pendingKeys.length) {
|
21004 | nextKeysPending[prevKey] = pendingKeys;
|
21005 | pendingKeys = [];
|
21006 | }
|
21007 | } else {
|
21008 | pendingKeys.push(prevKey);
|
21009 | }
|
21010 | }
|
21011 |
|
21012 | var i;
|
21013 | var childMapping = {};
|
21014 |
|
21015 | for (var nextKey in next) {
|
21016 | if (nextKeysPending[nextKey]) {
|
21017 | for (i = 0; i < nextKeysPending[nextKey].length; i++) {
|
21018 | var pendingNextKey = nextKeysPending[nextKey][i];
|
21019 | childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
|
21020 | }
|
21021 | }
|
21022 |
|
21023 | childMapping[nextKey] = getValueForKey(nextKey);
|
21024 | }
|
21025 |
|
21026 |
|
21027 | for (i = 0; i < pendingKeys.length; i++) {
|
21028 | childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
|
21029 | }
|
21030 |
|
21031 | return childMapping;
|
21032 | }
|
21033 |
|
21034 | function getProp(child, prop, props) {
|
21035 | return props[prop] != null ? props[prop] : child.props[prop];
|
21036 | }
|
21037 |
|
21038 | function getInitialChildMapping(props, onExited) {
|
21039 | return getChildMapping(props.children, function (child) {
|
21040 | return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(child, {
|
21041 | onExited: onExited.bind(null, child),
|
21042 | in: true,
|
21043 | appear: getProp(child, 'appear', props),
|
21044 | enter: getProp(child, 'enter', props),
|
21045 | exit: getProp(child, 'exit', props)
|
21046 | });
|
21047 | });
|
21048 | }
|
21049 | function getNextChildMapping(nextProps, prevChildMapping, onExited) {
|
21050 | var nextChildMapping = getChildMapping(nextProps.children);
|
21051 | var children = mergeChildMappings(prevChildMapping, nextChildMapping);
|
21052 | Object.keys(children).forEach(function (key) {
|
21053 | var child = children[key];
|
21054 | if (!Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(child)) return;
|
21055 | var hasPrev = (key in prevChildMapping);
|
21056 | var hasNext = (key in nextChildMapping);
|
21057 | var prevChild = prevChildMapping[key];
|
21058 | var isLeaving = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(prevChild) && !prevChild.props.in;
|
21059 |
|
21060 | if (hasNext && (!hasPrev || isLeaving)) {
|
21061 |
|
21062 | children[key] = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(child, {
|
21063 | onExited: onExited.bind(null, child),
|
21064 | in: true,
|
21065 | exit: getProp(child, 'exit', nextProps),
|
21066 | enter: getProp(child, 'enter', nextProps)
|
21067 | });
|
21068 | } else if (!hasNext && hasPrev && !isLeaving) {
|
21069 |
|
21070 |
|
21071 | children[key] = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(child, {
|
21072 | in: false
|
21073 | });
|
21074 | } else if (hasNext && hasPrev && Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(prevChild)) {
|
21075 |
|
21076 |
|
21077 |
|
21078 | children[key] = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"])(child, {
|
21079 | onExited: onExited.bind(null, child),
|
21080 | in: prevChild.props.in,
|
21081 | exit: getProp(child, 'exit', nextProps),
|
21082 | enter: getProp(child, 'enter', nextProps)
|
21083 | });
|
21084 | }
|
21085 | });
|
21086 | return children;
|
21087 | }
|
21088 |
|
21089 |
|
21090 |
|
21091 |
|
21092 |
|
21093 |
|
21094 |
|
21095 |
|
21096 |
|
21097 |
|
21098 | var TransitionGroup_values = Object.values || function (obj) {
|
21099 | return Object.keys(obj).map(function (k) {
|
21100 | return obj[k];
|
21101 | });
|
21102 | };
|
21103 |
|
21104 | var defaultProps = {
|
21105 | component: 'div',
|
21106 | childFactory: function childFactory(child) {
|
21107 | return child;
|
21108 | }
|
21109 | };
|
21110 |
|
21111 |
|
21112 |
|
21113 |
|
21114 |
|
21115 |
|
21116 |
|
21117 |
|
21118 |
|
21119 |
|
21120 |
|
21121 |
|
21122 |
|
21123 |
|
21124 |
|
21125 | var TransitionGroup_TransitionGroup = function (_React$Component) {
|
21126 | Object(inheritsLoose["a" ])(TransitionGroup, _React$Component);
|
21127 |
|
21128 | function TransitionGroup(props, context) {
|
21129 | var _this;
|
21130 |
|
21131 | _this = _React$Component.call(this, props, context) || this;
|
21132 |
|
21133 | var handleExited = _this.handleExited.bind(Object(assertThisInitialized["a" ])(_this));
|
21134 |
|
21135 |
|
21136 | _this.state = {
|
21137 | contextValue: {
|
21138 | isMounting: true
|
21139 | },
|
21140 | handleExited: handleExited,
|
21141 | firstRender: true
|
21142 | };
|
21143 | return _this;
|
21144 | }
|
21145 |
|
21146 | var _proto = TransitionGroup.prototype;
|
21147 |
|
21148 | _proto.componentDidMount = function componentDidMount() {
|
21149 | this.mounted = true;
|
21150 | this.setState({
|
21151 | contextValue: {
|
21152 | isMounting: false
|
21153 | }
|
21154 | });
|
21155 | };
|
21156 |
|
21157 | _proto.componentWillUnmount = function componentWillUnmount() {
|
21158 | this.mounted = false;
|
21159 | };
|
21160 |
|
21161 | TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
|
21162 | var prevChildMapping = _ref.children,
|
21163 | handleExited = _ref.handleExited,
|
21164 | firstRender = _ref.firstRender;
|
21165 | return {
|
21166 | children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
|
21167 | firstRender: false
|
21168 | };
|
21169 | }
|
21170 | ;
|
21171 |
|
21172 | _proto.handleExited = function handleExited(child, node) {
|
21173 | var currentChildMapping = getChildMapping(this.props.children);
|
21174 | if (child.key in currentChildMapping) return;
|
21175 |
|
21176 | if (child.props.onExited) {
|
21177 | child.props.onExited(node);
|
21178 | }
|
21179 |
|
21180 | if (this.mounted) {
|
21181 | this.setState(function (state) {
|
21182 | var children = Object(esm_extends["a" ])({}, state.children);
|
21183 |
|
21184 | delete children[child.key];
|
21185 | return {
|
21186 | children: children
|
21187 | };
|
21188 | });
|
21189 | }
|
21190 | };
|
21191 |
|
21192 | _proto.render = function render() {
|
21193 | var _this$props = this.props,
|
21194 | Component = _this$props.component,
|
21195 | childFactory = _this$props.childFactory,
|
21196 | props = Object(objectWithoutPropertiesLoose["a" ])(_this$props, ["component", "childFactory"]);
|
21197 |
|
21198 | var contextValue = this.state.contextValue;
|
21199 | var children = TransitionGroup_values(this.state.children).map(childFactory);
|
21200 | delete props.appear;
|
21201 | delete props.enter;
|
21202 | delete props.exit;
|
21203 |
|
21204 | if (Component === null) {
|
21205 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(TransitionGroupContext.Provider, {
|
21206 | value: contextValue
|
21207 | }, children);
|
21208 | }
|
21209 |
|
21210 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(TransitionGroupContext.Provider, {
|
21211 | value: contextValue
|
21212 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Component, props, children));
|
21213 | };
|
21214 |
|
21215 | return TransitionGroup;
|
21216 | }(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Component);
|
21217 |
|
21218 | TransitionGroup_TransitionGroup.propTypes = false ? undefined : {};
|
21219 | TransitionGroup_TransitionGroup.defaultProps = defaultProps;
|
21220 | var esm_TransitionGroup = (TransitionGroup_TransitionGroup);
|
21221 |
|
21222 |
|
21223 |
|
21224 |
|
21225 |
|
21226 | var Ripple_useEnhancedEffect = typeof window === 'undefined' ? external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"] : external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"];
|
21227 |
|
21228 |
|
21229 |
|
21230 |
|
21231 | function Ripple(props) {
|
21232 | var classes = props.classes,
|
21233 | _props$pulsate = props.pulsate,
|
21234 | pulsate = _props$pulsate === void 0 ? false : _props$pulsate,
|
21235 | rippleX = props.rippleX,
|
21236 | rippleY = props.rippleY,
|
21237 | rippleSize = props.rippleSize,
|
21238 | inProp = props.in,
|
21239 | _props$onExited = props.onExited,
|
21240 | onExited = _props$onExited === void 0 ? function () {} : _props$onExited,
|
21241 | timeout = props.timeout;
|
21242 |
|
21243 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](false),
|
21244 | leaving = _React$useState[0],
|
21245 | setLeaving = _React$useState[1];
|
21246 |
|
21247 | var rippleClassName = Object(clsx_m["a" ])(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);
|
21248 | var rippleStyles = {
|
21249 | width: rippleSize,
|
21250 | height: rippleSize,
|
21251 | top: -(rippleSize / 2) + rippleY,
|
21252 | left: -(rippleSize / 2) + rippleX
|
21253 | };
|
21254 | var childClassName = Object(clsx_m["a" ])(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);
|
21255 | var handleExited = useEventCallback(onExited);
|
21256 |
|
21257 | Ripple_useEnhancedEffect(function () {
|
21258 | if (!inProp) {
|
21259 |
|
21260 | setLeaving(true);
|
21261 |
|
21262 | var timeoutId = setTimeout(handleExited, timeout);
|
21263 | return function () {
|
21264 | clearTimeout(timeoutId);
|
21265 | };
|
21266 | }
|
21267 |
|
21268 | return undefined;
|
21269 | }, [handleExited, inProp, timeout]);
|
21270 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
21271 | className: rippleClassName,
|
21272 | style: rippleStyles
|
21273 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
21274 | className: childClassName
|
21275 | }));
|
21276 | }
|
21277 |
|
21278 | false ? undefined : void 0;
|
21279 | var ButtonBase_Ripple = (Ripple);
|
21280 |
|
21281 |
|
21282 |
|
21283 |
|
21284 |
|
21285 |
|
21286 |
|
21287 |
|
21288 |
|
21289 |
|
21290 | var DURATION = 550;
|
21291 | var DELAY_RIPPLE = 80;
|
21292 | var TouchRipple_styles = function styles(theme) {
|
21293 | return {
|
21294 |
|
21295 | root: {
|
21296 | overflow: 'hidden',
|
21297 | pointerEvents: 'none',
|
21298 | position: 'absolute',
|
21299 | zIndex: 0,
|
21300 | top: 0,
|
21301 | right: 0,
|
21302 | bottom: 0,
|
21303 | left: 0,
|
21304 | borderRadius: 'inherit'
|
21305 | },
|
21306 |
|
21307 |
|
21308 | ripple: {
|
21309 | opacity: 0,
|
21310 | position: 'absolute'
|
21311 | },
|
21312 |
|
21313 |
|
21314 | rippleVisible: {
|
21315 | opacity: 0.3,
|
21316 | transform: 'scale(1)',
|
21317 | animation: "$enter ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut)
|
21318 | },
|
21319 |
|
21320 |
|
21321 | ripplePulsate: {
|
21322 | animationDuration: "".concat(theme.transitions.duration.shorter, "ms")
|
21323 | },
|
21324 |
|
21325 |
|
21326 | child: {
|
21327 | opacity: 1,
|
21328 | display: 'block',
|
21329 | width: '100%',
|
21330 | height: '100%',
|
21331 | borderRadius: '50%',
|
21332 | backgroundColor: 'currentColor'
|
21333 | },
|
21334 |
|
21335 |
|
21336 | childLeaving: {
|
21337 | opacity: 0,
|
21338 | animation: "$exit ".concat(DURATION, "ms ").concat(theme.transitions.easing.easeInOut)
|
21339 | },
|
21340 |
|
21341 |
|
21342 | childPulsate: {
|
21343 | position: 'absolute',
|
21344 | left: 0,
|
21345 | top: 0,
|
21346 | animation: "$pulsate 2500ms ".concat(theme.transitions.easing.easeInOut, " 200ms infinite")
|
21347 | },
|
21348 | '@keyframes enter': {
|
21349 | '0%': {
|
21350 | transform: 'scale(0)',
|
21351 | opacity: 0.1
|
21352 | },
|
21353 | '100%': {
|
21354 | transform: 'scale(1)',
|
21355 | opacity: 0.3
|
21356 | }
|
21357 | },
|
21358 | '@keyframes exit': {
|
21359 | '0%': {
|
21360 | opacity: 1
|
21361 | },
|
21362 | '100%': {
|
21363 | opacity: 0
|
21364 | }
|
21365 | },
|
21366 | '@keyframes pulsate': {
|
21367 | '0%': {
|
21368 | transform: 'scale(1)'
|
21369 | },
|
21370 | '50%': {
|
21371 | transform: 'scale(0.92)'
|
21372 | },
|
21373 | '100%': {
|
21374 | transform: 'scale(1)'
|
21375 | }
|
21376 | }
|
21377 | };
|
21378 | };
|
21379 |
|
21380 |
|
21381 |
|
21382 |
|
21383 |
|
21384 |
|
21385 | var TouchRipple_TouchRipple = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function TouchRipple(props, ref) {
|
21386 | var _props$center = props.center,
|
21387 | centerProp = _props$center === void 0 ? false : _props$center,
|
21388 | classes = props.classes,
|
21389 | className = props.className,
|
21390 | other = Object(objectWithoutProperties["a" ])(props, ["center", "classes", "className"]);
|
21391 |
|
21392 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"]([]),
|
21393 | ripples = _React$useState[0],
|
21394 | setRipples = _React$useState[1];
|
21395 |
|
21396 | var nextKey = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](0);
|
21397 | var rippleCallback = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
21398 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
21399 | if (rippleCallback.current) {
|
21400 | rippleCallback.current();
|
21401 | rippleCallback.current = null;
|
21402 | }
|
21403 | }, [ripples]);
|
21404 |
|
21405 | var ignoringMouseDown = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](false);
|
21406 |
|
21407 |
|
21408 | var startTimer = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
21409 |
|
21410 | var startTimerCommit = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
21411 | var container = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
21412 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
21413 | return function () {
|
21414 | clearTimeout(startTimer.current);
|
21415 | };
|
21416 | }, []);
|
21417 | var startCommit = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function (params) {
|
21418 | var pulsate = params.pulsate,
|
21419 | rippleX = params.rippleX,
|
21420 | rippleY = params.rippleY,
|
21421 | rippleSize = params.rippleSize,
|
21422 | cb = params.cb;
|
21423 | setRipples(function (oldRipples) {
|
21424 | return [].concat(Object(toConsumableArray["a" ])(oldRipples), [external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](ButtonBase_Ripple, {
|
21425 | key: nextKey.current,
|
21426 | classes: classes,
|
21427 | timeout: DURATION,
|
21428 | pulsate: pulsate,
|
21429 | rippleX: rippleX,
|
21430 | rippleY: rippleY,
|
21431 | rippleSize: rippleSize
|
21432 | })]);
|
21433 | });
|
21434 | nextKey.current += 1;
|
21435 | rippleCallback.current = cb;
|
21436 | }, [classes]);
|
21437 | var start = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function () {
|
21438 | var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
21439 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
21440 | var cb = arguments.length > 2 ? arguments[2] : undefined;
|
21441 | var _options$pulsate = options.pulsate,
|
21442 | pulsate = _options$pulsate === void 0 ? false : _options$pulsate,
|
21443 | _options$center = options.center,
|
21444 | center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,
|
21445 | _options$fakeElement = options.fakeElement,
|
21446 | fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;
|
21447 |
|
21448 | if (event.type === 'mousedown' && ignoringMouseDown.current) {
|
21449 | ignoringMouseDown.current = false;
|
21450 | return;
|
21451 | }
|
21452 |
|
21453 | if (event.type === 'touchstart') {
|
21454 | ignoringMouseDown.current = true;
|
21455 | }
|
21456 |
|
21457 | var element = fakeElement ? null : container.current;
|
21458 | var rect = element ? element.getBoundingClientRect() : {
|
21459 | width: 0,
|
21460 | height: 0,
|
21461 | left: 0,
|
21462 | top: 0
|
21463 | };
|
21464 |
|
21465 | var rippleX;
|
21466 | var rippleY;
|
21467 | var rippleSize;
|
21468 |
|
21469 | if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
|
21470 | rippleX = Math.round(rect.width / 2);
|
21471 | rippleY = Math.round(rect.height / 2);
|
21472 | } else {
|
21473 | var _ref = event.touches ? event.touches[0] : event,
|
21474 | clientX = _ref.clientX,
|
21475 | clientY = _ref.clientY;
|
21476 |
|
21477 | rippleX = Math.round(clientX - rect.left);
|
21478 | rippleY = Math.round(clientY - rect.top);
|
21479 | }
|
21480 |
|
21481 | if (center) {
|
21482 | rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3);
|
21483 |
|
21484 | if (rippleSize % 2 === 0) {
|
21485 | rippleSize += 1;
|
21486 | }
|
21487 | } else {
|
21488 | var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;
|
21489 | var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;
|
21490 | rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));
|
21491 | }
|
21492 |
|
21493 |
|
21494 | if (event.touches) {
|
21495 |
|
21496 |
|
21497 |
|
21498 | if (startTimerCommit.current === null) {
|
21499 |
|
21500 | startTimerCommit.current = function () {
|
21501 | startCommit({
|
21502 | pulsate: pulsate,
|
21503 | rippleX: rippleX,
|
21504 | rippleY: rippleY,
|
21505 | rippleSize: rippleSize,
|
21506 | cb: cb
|
21507 | });
|
21508 | };
|
21509 |
|
21510 |
|
21511 | startTimer.current = setTimeout(function () {
|
21512 | if (startTimerCommit.current) {
|
21513 | startTimerCommit.current();
|
21514 | startTimerCommit.current = null;
|
21515 | }
|
21516 | }, DELAY_RIPPLE);
|
21517 | }
|
21518 | } else {
|
21519 | startCommit({
|
21520 | pulsate: pulsate,
|
21521 | rippleX: rippleX,
|
21522 | rippleY: rippleY,
|
21523 | rippleSize: rippleSize,
|
21524 | cb: cb
|
21525 | });
|
21526 | }
|
21527 | }, [centerProp, startCommit]);
|
21528 | var pulsate = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function () {
|
21529 | start({}, {
|
21530 | pulsate: true
|
21531 | });
|
21532 | }, [start]);
|
21533 | var stop = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function (event, cb) {
|
21534 | clearTimeout(startTimer.current);
|
21535 |
|
21536 |
|
21537 | if (event.type === 'touchend' && startTimerCommit.current) {
|
21538 | event.persist();
|
21539 | startTimerCommit.current();
|
21540 | startTimerCommit.current = null;
|
21541 | startTimer.current = setTimeout(function () {
|
21542 | stop(event, cb);
|
21543 | });
|
21544 | return;
|
21545 | }
|
21546 |
|
21547 | startTimerCommit.current = null;
|
21548 | setRipples(function (oldRipples) {
|
21549 | if (oldRipples.length > 0) {
|
21550 | return oldRipples.slice(1);
|
21551 | }
|
21552 |
|
21553 | return oldRipples;
|
21554 | });
|
21555 | rippleCallback.current = cb;
|
21556 | }, []);
|
21557 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useImperativeHandle"](ref, function () {
|
21558 | return {
|
21559 | pulsate: pulsate,
|
21560 | start: start,
|
21561 | stop: stop
|
21562 | };
|
21563 | }, [pulsate, start, stop]);
|
21564 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", Object(esm_extends["a" ])({
|
21565 | className: Object(clsx_m["a" ])(classes.root, className),
|
21566 | ref: container
|
21567 | }, other), external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](esm_TransitionGroup, {
|
21568 | component: null,
|
21569 | exit: true
|
21570 | }, ripples));
|
21571 | });
|
21572 | false ? undefined : void 0;
|
21573 | var ButtonBase_TouchRipple = (Object(withStyles["a" ])(TouchRipple_styles, {
|
21574 | flip: false,
|
21575 | name: 'MuiTouchRipple'
|
21576 | })( external_root_React_commonjs2_react_commonjs_react_amd_react_["memo"](TouchRipple_TouchRipple)));
|
21577 |
|
21578 |
|
21579 |
|
21580 |
|
21581 |
|
21582 |
|
21583 |
|
21584 |
|
21585 |
|
21586 |
|
21587 |
|
21588 |
|
21589 |
|
21590 | var ButtonBase_styles = {
|
21591 |
|
21592 | root: {
|
21593 | display: 'inline-flex',
|
21594 | alignItems: 'center',
|
21595 | justifyContent: 'center',
|
21596 | position: 'relative',
|
21597 | WebkitTapHighlightColor: 'transparent',
|
21598 | backgroundColor: 'transparent',
|
21599 |
|
21600 |
|
21601 | outline: 0,
|
21602 | border: 0,
|
21603 | margin: 0,
|
21604 |
|
21605 | borderRadius: 0,
|
21606 | padding: 0,
|
21607 |
|
21608 | cursor: 'pointer',
|
21609 | userSelect: 'none',
|
21610 | verticalAlign: 'middle',
|
21611 | '-moz-appearance': 'none',
|
21612 |
|
21613 | '-webkit-appearance': 'none',
|
21614 |
|
21615 | textDecoration: 'none',
|
21616 |
|
21617 | color: 'inherit',
|
21618 | '&::-moz-focus-inner': {
|
21619 | borderStyle: 'none'
|
21620 |
|
21621 | },
|
21622 | '&$disabled': {
|
21623 | pointerEvents: 'none',
|
21624 |
|
21625 | cursor: 'default'
|
21626 | },
|
21627 | '@media print': {
|
21628 | colorAdjust: 'exact'
|
21629 | }
|
21630 | },
|
21631 |
|
21632 |
|
21633 | disabled: {},
|
21634 |
|
21635 |
|
21636 | focusVisible: {}
|
21637 | };
|
21638 |
|
21639 |
|
21640 |
|
21641 |
|
21642 |
|
21643 |
|
21644 | var ButtonBase_ButtonBase = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function ButtonBase(props, ref) {
|
21645 | var action = props.action,
|
21646 | buttonRefProp = props.buttonRef,
|
21647 | _props$centerRipple = props.centerRipple,
|
21648 | centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,
|
21649 | children = props.children,
|
21650 | classes = props.classes,
|
21651 | className = props.className,
|
21652 | _props$component = props.component,
|
21653 | component = _props$component === void 0 ? 'button' : _props$component,
|
21654 | _props$disabled = props.disabled,
|
21655 | disabled = _props$disabled === void 0 ? false : _props$disabled,
|
21656 | _props$disableRipple = props.disableRipple,
|
21657 | disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,
|
21658 | _props$disableTouchRi = props.disableTouchRipple,
|
21659 | disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,
|
21660 | _props$focusRipple = props.focusRipple,
|
21661 | focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,
|
21662 | focusVisibleClassName = props.focusVisibleClassName,
|
21663 | onBlur = props.onBlur,
|
21664 | onClick = props.onClick,
|
21665 | onFocus = props.onFocus,
|
21666 | onFocusVisible = props.onFocusVisible,
|
21667 | onKeyDown = props.onKeyDown,
|
21668 | onKeyUp = props.onKeyUp,
|
21669 | onMouseDown = props.onMouseDown,
|
21670 | onMouseLeave = props.onMouseLeave,
|
21671 | onMouseUp = props.onMouseUp,
|
21672 | onTouchEnd = props.onTouchEnd,
|
21673 | onTouchMove = props.onTouchMove,
|
21674 | onTouchStart = props.onTouchStart,
|
21675 | onDragLeave = props.onDragLeave,
|
21676 | _props$tabIndex = props.tabIndex,
|
21677 | tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,
|
21678 | TouchRippleProps = props.TouchRippleProps,
|
21679 | _props$type = props.type,
|
21680 | type = _props$type === void 0 ? 'button' : _props$type,
|
21681 | other = Object(objectWithoutProperties["a" ])(props, ["action", "buttonRef", "centerRipple", "children", "classes", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "onBlur", "onClick", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "onDragLeave", "tabIndex", "TouchRippleProps", "type"]);
|
21682 |
|
21683 | var buttonRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
21684 |
|
21685 | function getButtonNode() {
|
21686 |
|
21687 | return react_dom["findDOMNode"](buttonRef.current);
|
21688 | }
|
21689 |
|
21690 | var rippleRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
21691 |
|
21692 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](false),
|
21693 | focusVisible = _React$useState[0],
|
21694 | setFocusVisible = _React$useState[1];
|
21695 |
|
21696 | if (disabled && focusVisible) {
|
21697 | setFocusVisible(false);
|
21698 | }
|
21699 |
|
21700 | var _useIsFocusVisible = useIsFocusVisible(),
|
21701 | isFocusVisible = _useIsFocusVisible.isFocusVisible,
|
21702 | onBlurVisible = _useIsFocusVisible.onBlurVisible,
|
21703 | focusVisibleRef = _useIsFocusVisible.ref;
|
21704 |
|
21705 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useImperativeHandle"](action, function () {
|
21706 | return {
|
21707 | focusVisible: function focusVisible() {
|
21708 | setFocusVisible(true);
|
21709 | buttonRef.current.focus();
|
21710 | }
|
21711 | };
|
21712 | }, []);
|
21713 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
21714 | if (focusVisible && focusRipple && !disableRipple) {
|
21715 | rippleRef.current.pulsate();
|
21716 | }
|
21717 | }, [disableRipple, focusRipple, focusVisible]);
|
21718 |
|
21719 | function useRippleHandler(rippleAction, eventCallback) {
|
21720 | var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;
|
21721 | return useEventCallback(function (event) {
|
21722 | if (eventCallback) {
|
21723 | eventCallback(event);
|
21724 | }
|
21725 |
|
21726 | var ignore = skipRippleAction;
|
21727 |
|
21728 | if (!ignore && rippleRef.current) {
|
21729 | rippleRef.current[rippleAction](event);
|
21730 | }
|
21731 |
|
21732 | return true;
|
21733 | });
|
21734 | }
|
21735 |
|
21736 | var handleMouseDown = useRippleHandler('start', onMouseDown);
|
21737 | var handleDragLeave = useRippleHandler('stop', onDragLeave);
|
21738 | var handleMouseUp = useRippleHandler('stop', onMouseUp);
|
21739 | var handleMouseLeave = useRippleHandler('stop', function (event) {
|
21740 | if (focusVisible) {
|
21741 | event.preventDefault();
|
21742 | }
|
21743 |
|
21744 | if (onMouseLeave) {
|
21745 | onMouseLeave(event);
|
21746 | }
|
21747 | });
|
21748 | var handleTouchStart = useRippleHandler('start', onTouchStart);
|
21749 | var handleTouchEnd = useRippleHandler('stop', onTouchEnd);
|
21750 | var handleTouchMove = useRippleHandler('stop', onTouchMove);
|
21751 | var handleBlur = useRippleHandler('stop', function (event) {
|
21752 | if (focusVisible) {
|
21753 | onBlurVisible(event);
|
21754 | setFocusVisible(false);
|
21755 | }
|
21756 |
|
21757 | if (onBlur) {
|
21758 | onBlur(event);
|
21759 | }
|
21760 | }, false);
|
21761 | var handleFocus = useEventCallback(function (event) {
|
21762 |
|
21763 | if (!buttonRef.current) {
|
21764 | buttonRef.current = event.currentTarget;
|
21765 | }
|
21766 |
|
21767 | if (isFocusVisible(event)) {
|
21768 | setFocusVisible(true);
|
21769 |
|
21770 | if (onFocusVisible) {
|
21771 | onFocusVisible(event);
|
21772 | }
|
21773 | }
|
21774 |
|
21775 | if (onFocus) {
|
21776 | onFocus(event);
|
21777 | }
|
21778 | });
|
21779 |
|
21780 | var isNonNativeButton = function isNonNativeButton() {
|
21781 | var button = getButtonNode();
|
21782 | return component && component !== 'button' && !(button.tagName === 'A' && button.href);
|
21783 | };
|
21784 | |
21785 |
|
21786 |
|
21787 |
|
21788 |
|
21789 | var keydownRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](false);
|
21790 | var handleKeyDown = useEventCallback(function (event) {
|
21791 |
|
21792 | if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {
|
21793 | keydownRef.current = true;
|
21794 | event.persist();
|
21795 | rippleRef.current.stop(event, function () {
|
21796 | rippleRef.current.start(event);
|
21797 | });
|
21798 | }
|
21799 |
|
21800 | if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {
|
21801 | event.preventDefault();
|
21802 | }
|
21803 |
|
21804 | if (onKeyDown) {
|
21805 | onKeyDown(event);
|
21806 | }
|
21807 |
|
21808 |
|
21809 | if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {
|
21810 | event.preventDefault();
|
21811 |
|
21812 | if (onClick) {
|
21813 | onClick(event);
|
21814 | }
|
21815 | }
|
21816 | });
|
21817 | var handleKeyUp = useEventCallback(function (event) {
|
21818 |
|
21819 |
|
21820 | if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {
|
21821 | keydownRef.current = false;
|
21822 | event.persist();
|
21823 | rippleRef.current.stop(event, function () {
|
21824 | rippleRef.current.pulsate(event);
|
21825 | });
|
21826 | }
|
21827 |
|
21828 | if (onKeyUp) {
|
21829 | onKeyUp(event);
|
21830 | }
|
21831 |
|
21832 |
|
21833 | if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {
|
21834 | onClick(event);
|
21835 | }
|
21836 | });
|
21837 | var ComponentProp = component;
|
21838 |
|
21839 | if (ComponentProp === 'button' && other.href) {
|
21840 | ComponentProp = 'a';
|
21841 | }
|
21842 |
|
21843 | var buttonProps = {};
|
21844 |
|
21845 | if (ComponentProp === 'button') {
|
21846 | buttonProps.type = type;
|
21847 | buttonProps.disabled = disabled;
|
21848 | } else {
|
21849 | if (ComponentProp !== 'a' || !other.href) {
|
21850 | buttonProps.role = 'button';
|
21851 | }
|
21852 |
|
21853 | buttonProps['aria-disabled'] = disabled;
|
21854 | }
|
21855 |
|
21856 | var handleUserRef = useForkRef(buttonRefProp, ref);
|
21857 | var handleOwnRef = useForkRef(focusVisibleRef, buttonRef);
|
21858 | var handleRef = useForkRef(handleUserRef, handleOwnRef);
|
21859 |
|
21860 | var _React$useState2 = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](false),
|
21861 | mountedState = _React$useState2[0],
|
21862 | setMountedState = _React$useState2[1];
|
21863 |
|
21864 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
21865 | setMountedState(true);
|
21866 | }, []);
|
21867 | var enableTouchRipple = mountedState && !disableRipple && !disabled;
|
21868 |
|
21869 | if (false) {}
|
21870 |
|
21871 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](ComponentProp, Object(esm_extends["a" ])({
|
21872 | className: Object(clsx_m["a" ])(classes.root, className, focusVisible && [classes.focusVisible, focusVisibleClassName], disabled && classes.disabled),
|
21873 | onBlur: handleBlur,
|
21874 | onClick: onClick,
|
21875 | onFocus: handleFocus,
|
21876 | onKeyDown: handleKeyDown,
|
21877 | onKeyUp: handleKeyUp,
|
21878 | onMouseDown: handleMouseDown,
|
21879 | onMouseLeave: handleMouseLeave,
|
21880 | onMouseUp: handleMouseUp,
|
21881 | onDragLeave: handleDragLeave,
|
21882 | onTouchEnd: handleTouchEnd,
|
21883 | onTouchMove: handleTouchMove,
|
21884 | onTouchStart: handleTouchStart,
|
21885 | ref: handleRef,
|
21886 | tabIndex: disabled ? -1 : tabIndex
|
21887 | }, buttonProps, other), children, enableTouchRipple ?
|
21888 |
|
21889 |
|
21890 |
|
21891 | external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](ButtonBase_TouchRipple, Object(esm_extends["a" ])({
|
21892 | ref: rippleRef,
|
21893 | center: centerRipple
|
21894 | }, TouchRippleProps)) : null);
|
21895 | });
|
21896 | false ? undefined : void 0;
|
21897 | var esm_ButtonBase_ButtonBase = (Object(withStyles["a" ])(ButtonBase_styles, {
|
21898 | name: 'MuiButtonBase'
|
21899 | })(ButtonBase_ButtonBase));
|
21900 |
|
21901 |
|
21902 |
|
21903 |
|
21904 |
|
21905 |
|
21906 |
|
21907 |
|
21908 |
|
21909 |
|
21910 |
|
21911 | var IconButton_styles = function styles(theme) {
|
21912 | return {
|
21913 |
|
21914 | root: {
|
21915 | textAlign: 'center',
|
21916 | flex: '0 0 auto',
|
21917 | fontSize: theme.typography.pxToRem(24),
|
21918 | padding: 12,
|
21919 | borderRadius: '50%',
|
21920 | overflow: 'visible',
|
21921 |
|
21922 | color: theme.palette.action.active,
|
21923 | transition: theme.transitions.create('background-color', {
|
21924 | duration: theme.transitions.duration.shortest
|
21925 | }),
|
21926 | '&:hover': {
|
21927 | backgroundColor: Object(colorManipulator["b" ])(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
21928 |
|
21929 | '@media (hover: none)': {
|
21930 | backgroundColor: 'transparent'
|
21931 | }
|
21932 | },
|
21933 | '&$disabled': {
|
21934 | backgroundColor: 'transparent',
|
21935 | color: theme.palette.action.disabled
|
21936 | }
|
21937 | },
|
21938 |
|
21939 |
|
21940 | edgeStart: {
|
21941 | marginLeft: -12,
|
21942 | '$sizeSmall&': {
|
21943 | marginLeft: -3
|
21944 | }
|
21945 | },
|
21946 |
|
21947 |
|
21948 | edgeEnd: {
|
21949 | marginRight: -12,
|
21950 | '$sizeSmall&': {
|
21951 | marginRight: -3
|
21952 | }
|
21953 | },
|
21954 |
|
21955 |
|
21956 | colorInherit: {
|
21957 | color: 'inherit'
|
21958 | },
|
21959 |
|
21960 |
|
21961 | colorPrimary: {
|
21962 | color: theme.palette.primary.main,
|
21963 | '&:hover': {
|
21964 | backgroundColor: Object(colorManipulator["b" ])(theme.palette.primary.main, theme.palette.action.hoverOpacity),
|
21965 |
|
21966 | '@media (hover: none)': {
|
21967 | backgroundColor: 'transparent'
|
21968 | }
|
21969 | }
|
21970 | },
|
21971 |
|
21972 |
|
21973 | colorSecondary: {
|
21974 | color: theme.palette.secondary.main,
|
21975 | '&:hover': {
|
21976 | backgroundColor: Object(colorManipulator["b" ])(theme.palette.secondary.main, theme.palette.action.hoverOpacity),
|
21977 |
|
21978 | '@media (hover: none)': {
|
21979 | backgroundColor: 'transparent'
|
21980 | }
|
21981 | }
|
21982 | },
|
21983 |
|
21984 |
|
21985 | disabled: {},
|
21986 |
|
21987 |
|
21988 | sizeSmall: {
|
21989 | padding: 3,
|
21990 | fontSize: theme.typography.pxToRem(18)
|
21991 | },
|
21992 |
|
21993 |
|
21994 | label: {
|
21995 | width: '100%',
|
21996 | display: 'flex',
|
21997 | alignItems: 'inherit',
|
21998 | justifyContent: 'inherit'
|
21999 | }
|
22000 | };
|
22001 | };
|
22002 |
|
22003 |
|
22004 |
|
22005 |
|
22006 |
|
22007 | var IconButton_IconButton = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function IconButton(props, ref) {
|
22008 | var _props$edge = props.edge,
|
22009 | edge = _props$edge === void 0 ? false : _props$edge,
|
22010 | children = props.children,
|
22011 | classes = props.classes,
|
22012 | className = props.className,
|
22013 | _props$color = props.color,
|
22014 | color = _props$color === void 0 ? 'default' : _props$color,
|
22015 | _props$disabled = props.disabled,
|
22016 | disabled = _props$disabled === void 0 ? false : _props$disabled,
|
22017 | _props$disableFocusRi = props.disableFocusRipple,
|
22018 | disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,
|
22019 | _props$size = props.size,
|
22020 | size = _props$size === void 0 ? 'medium' : _props$size,
|
22021 | other = Object(objectWithoutProperties["a" ])(props, ["edge", "children", "classes", "className", "color", "disabled", "disableFocusRipple", "size"]);
|
22022 |
|
22023 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](esm_ButtonBase_ButtonBase, Object(esm_extends["a" ])({
|
22024 | className: Object(clsx_m["a" ])(classes.root, className, color !== 'default' && classes["color".concat(Object(capitalize["a" ])(color))], disabled && classes.disabled, size === "small" && classes["size".concat(Object(capitalize["a" ])(size))], {
|
22025 | 'start': classes.edgeStart,
|
22026 | 'end': classes.edgeEnd
|
22027 | }[edge]),
|
22028 | centerRipple: true,
|
22029 | focusRipple: !disableFocusRipple,
|
22030 | disabled: disabled,
|
22031 | ref: ref
|
22032 | }, other), external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
22033 | className: classes.label
|
22034 | }, children));
|
22035 | });
|
22036 | false ? undefined : void 0;
|
22037 | var esm_IconButton_IconButton = (Object(withStyles["a" ])(IconButton_styles, {
|
22038 | name: 'MuiIconButton'
|
22039 | })(IconButton_IconButton));
|
22040 |
|
22041 | var slicedToArray = __webpack_require__(21);
|
22042 |
|
22043 |
|
22044 | var defineProperty = __webpack_require__(14);
|
22045 |
|
22046 |
|
22047 | var deepmerge = __webpack_require__(215);
|
22048 |
|
22049 |
|
22050 | var esm_config = ({
|
22051 | disabled: false
|
22052 | });
|
22053 |
|
22054 |
|
22055 |
|
22056 |
|
22057 |
|
22058 |
|
22059 |
|
22060 |
|
22061 |
|
22062 | var UNMOUNTED = 'unmounted';
|
22063 | var EXITED = 'exited';
|
22064 | var ENTERING = 'entering';
|
22065 | var ENTERED = 'entered';
|
22066 | var EXITING = 'exiting';
|
22067 |
|
22068 |
|
22069 |
|
22070 |
|
22071 |
|
22072 |
|
22073 |
|
22074 |
|
22075 |
|
22076 |
|
22077 |
|
22078 |
|
22079 |
|
22080 |
|
22081 |
|
22082 |
|
22083 |
|
22084 |
|
22085 |
|
22086 |
|
22087 |
|
22088 |
|
22089 |
|
22090 |
|
22091 |
|
22092 |
|
22093 |
|
22094 |
|
22095 |
|
22096 |
|
22097 |
|
22098 |
|
22099 |
|
22100 |
|
22101 |
|
22102 |
|
22103 |
|
22104 |
|
22105 |
|
22106 |
|
22107 |
|
22108 |
|
22109 |
|
22110 |
|
22111 |
|
22112 |
|
22113 |
|
22114 |
|
22115 |
|
22116 |
|
22117 |
|
22118 |
|
22119 |
|
22120 |
|
22121 |
|
22122 |
|
22123 |
|
22124 |
|
22125 |
|
22126 |
|
22127 |
|
22128 |
|
22129 |
|
22130 |
|
22131 |
|
22132 |
|
22133 |
|
22134 |
|
22135 |
|
22136 |
|
22137 |
|
22138 |
|
22139 |
|
22140 |
|
22141 |
|
22142 |
|
22143 |
|
22144 |
|
22145 |
|
22146 |
|
22147 |
|
22148 |
|
22149 |
|
22150 |
|
22151 |
|
22152 |
|
22153 |
|
22154 |
|
22155 |
|
22156 |
|
22157 |
|
22158 |
|
22159 | var Transition_Transition = function (_React$Component) {
|
22160 | Object(inheritsLoose["a" ])(Transition, _React$Component);
|
22161 |
|
22162 | function Transition(props, context) {
|
22163 | var _this;
|
22164 |
|
22165 | _this = _React$Component.call(this, props, context) || this;
|
22166 | var parentGroup = context;
|
22167 |
|
22168 | var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
22169 | var initialStatus;
|
22170 | _this.appearStatus = null;
|
22171 |
|
22172 | if (props.in) {
|
22173 | if (appear) {
|
22174 | initialStatus = EXITED;
|
22175 | _this.appearStatus = ENTERING;
|
22176 | } else {
|
22177 | initialStatus = ENTERED;
|
22178 | }
|
22179 | } else {
|
22180 | if (props.unmountOnExit || props.mountOnEnter) {
|
22181 | initialStatus = UNMOUNTED;
|
22182 | } else {
|
22183 | initialStatus = EXITED;
|
22184 | }
|
22185 | }
|
22186 |
|
22187 | _this.state = {
|
22188 | status: initialStatus
|
22189 | };
|
22190 | _this.nextCallback = null;
|
22191 | return _this;
|
22192 | }
|
22193 |
|
22194 | Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
|
22195 | var nextIn = _ref.in;
|
22196 |
|
22197 | if (nextIn && prevState.status === UNMOUNTED) {
|
22198 | return {
|
22199 | status: EXITED
|
22200 | };
|
22201 | }
|
22202 |
|
22203 | return null;
|
22204 | }
|
22205 |
|
22206 |
|
22207 |
|
22208 |
|
22209 |
|
22210 |
|
22211 |
|
22212 |
|
22213 |
|
22214 |
|
22215 |
|
22216 |
|
22217 |
|
22218 |
|
22219 |
|
22220 | ;
|
22221 |
|
22222 | var _proto = Transition.prototype;
|
22223 |
|
22224 | _proto.componentDidMount = function componentDidMount() {
|
22225 | this.updateStatus(true, this.appearStatus);
|
22226 | };
|
22227 |
|
22228 | _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
22229 | var nextStatus = null;
|
22230 |
|
22231 | if (prevProps !== this.props) {
|
22232 | var status = this.state.status;
|
22233 |
|
22234 | if (this.props.in) {
|
22235 | if (status !== ENTERING && status !== ENTERED) {
|
22236 | nextStatus = ENTERING;
|
22237 | }
|
22238 | } else {
|
22239 | if (status === ENTERING || status === ENTERED) {
|
22240 | nextStatus = EXITING;
|
22241 | }
|
22242 | }
|
22243 | }
|
22244 |
|
22245 | this.updateStatus(false, nextStatus);
|
22246 | };
|
22247 |
|
22248 | _proto.componentWillUnmount = function componentWillUnmount() {
|
22249 | this.cancelNextCallback();
|
22250 | };
|
22251 |
|
22252 | _proto.getTimeouts = function getTimeouts() {
|
22253 | var timeout = this.props.timeout;
|
22254 | var exit, enter, appear;
|
22255 | exit = enter = appear = timeout;
|
22256 |
|
22257 | if (timeout != null && typeof timeout !== 'number') {
|
22258 | exit = timeout.exit;
|
22259 | enter = timeout.enter;
|
22260 |
|
22261 | appear = timeout.appear !== undefined ? timeout.appear : enter;
|
22262 | }
|
22263 |
|
22264 | return {
|
22265 | exit: exit,
|
22266 | enter: enter,
|
22267 | appear: appear
|
22268 | };
|
22269 | };
|
22270 |
|
22271 | _proto.updateStatus = function updateStatus(mounting, nextStatus) {
|
22272 | if (mounting === void 0) {
|
22273 | mounting = false;
|
22274 | }
|
22275 |
|
22276 | if (nextStatus !== null) {
|
22277 |
|
22278 | this.cancelNextCallback();
|
22279 |
|
22280 | if (nextStatus === ENTERING) {
|
22281 | this.performEnter(mounting);
|
22282 | } else {
|
22283 | this.performExit();
|
22284 | }
|
22285 | } else if (this.props.unmountOnExit && this.state.status === EXITED) {
|
22286 | this.setState({
|
22287 | status: UNMOUNTED
|
22288 | });
|
22289 | }
|
22290 | };
|
22291 |
|
22292 | _proto.performEnter = function performEnter(mounting) {
|
22293 | var _this2 = this;
|
22294 |
|
22295 | var enter = this.props.enter;
|
22296 | var appearing = this.context ? this.context.isMounting : mounting;
|
22297 |
|
22298 | var _ref2 = this.props.nodeRef ? [appearing] : [react_dom_default.a.findDOMNode(this), appearing],
|
22299 | maybeNode = _ref2[0],
|
22300 | maybeAppearing = _ref2[1];
|
22301 |
|
22302 | var timeouts = this.getTimeouts();
|
22303 | var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
|
22304 |
|
22305 |
|
22306 | if (!mounting && !enter || esm_config.disabled) {
|
22307 | this.safeSetState({
|
22308 | status: ENTERED
|
22309 | }, function () {
|
22310 | _this2.props.onEntered(maybeNode);
|
22311 | });
|
22312 | return;
|
22313 | }
|
22314 |
|
22315 | this.props.onEnter(maybeNode, maybeAppearing);
|
22316 | this.safeSetState({
|
22317 | status: ENTERING
|
22318 | }, function () {
|
22319 | _this2.props.onEntering(maybeNode, maybeAppearing);
|
22320 |
|
22321 | _this2.onTransitionEnd(enterTimeout, function () {
|
22322 | _this2.safeSetState({
|
22323 | status: ENTERED
|
22324 | }, function () {
|
22325 | _this2.props.onEntered(maybeNode, maybeAppearing);
|
22326 | });
|
22327 | });
|
22328 | });
|
22329 | };
|
22330 |
|
22331 | _proto.performExit = function performExit() {
|
22332 | var _this3 = this;
|
22333 |
|
22334 | var exit = this.props.exit;
|
22335 | var timeouts = this.getTimeouts();
|
22336 | var maybeNode = this.props.nodeRef ? undefined : react_dom_default.a.findDOMNode(this);
|
22337 |
|
22338 | if (!exit || esm_config.disabled) {
|
22339 | this.safeSetState({
|
22340 | status: EXITED
|
22341 | }, function () {
|
22342 | _this3.props.onExited(maybeNode);
|
22343 | });
|
22344 | return;
|
22345 | }
|
22346 |
|
22347 | this.props.onExit(maybeNode);
|
22348 | this.safeSetState({
|
22349 | status: EXITING
|
22350 | }, function () {
|
22351 | _this3.props.onExiting(maybeNode);
|
22352 |
|
22353 | _this3.onTransitionEnd(timeouts.exit, function () {
|
22354 | _this3.safeSetState({
|
22355 | status: EXITED
|
22356 | }, function () {
|
22357 | _this3.props.onExited(maybeNode);
|
22358 | });
|
22359 | });
|
22360 | });
|
22361 | };
|
22362 |
|
22363 | _proto.cancelNextCallback = function cancelNextCallback() {
|
22364 | if (this.nextCallback !== null) {
|
22365 | this.nextCallback.cancel();
|
22366 | this.nextCallback = null;
|
22367 | }
|
22368 | };
|
22369 |
|
22370 | _proto.safeSetState = function safeSetState(nextState, callback) {
|
22371 |
|
22372 |
|
22373 |
|
22374 | callback = this.setNextCallback(callback);
|
22375 | this.setState(nextState, callback);
|
22376 | };
|
22377 |
|
22378 | _proto.setNextCallback = function setNextCallback(callback) {
|
22379 | var _this4 = this;
|
22380 |
|
22381 | var active = true;
|
22382 |
|
22383 | this.nextCallback = function (event) {
|
22384 | if (active) {
|
22385 | active = false;
|
22386 | _this4.nextCallback = null;
|
22387 | callback(event);
|
22388 | }
|
22389 | };
|
22390 |
|
22391 | this.nextCallback.cancel = function () {
|
22392 | active = false;
|
22393 | };
|
22394 |
|
22395 | return this.nextCallback;
|
22396 | };
|
22397 |
|
22398 | _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
|
22399 | this.setNextCallback(handler);
|
22400 | var node = this.props.nodeRef ? this.props.nodeRef.current : react_dom_default.a.findDOMNode(this);
|
22401 | var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
|
22402 |
|
22403 | if (!node || doesNotHaveTimeoutOrListener) {
|
22404 | setTimeout(this.nextCallback, 0);
|
22405 | return;
|
22406 | }
|
22407 |
|
22408 | if (this.props.addEndListener) {
|
22409 | var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
|
22410 | maybeNode = _ref3[0],
|
22411 | maybeNextCallback = _ref3[1];
|
22412 |
|
22413 | this.props.addEndListener(maybeNode, maybeNextCallback);
|
22414 | }
|
22415 |
|
22416 | if (timeout != null) {
|
22417 | setTimeout(this.nextCallback, timeout);
|
22418 | }
|
22419 | };
|
22420 |
|
22421 | _proto.render = function render() {
|
22422 | var status = this.state.status;
|
22423 |
|
22424 | if (status === UNMOUNTED) {
|
22425 | return null;
|
22426 | }
|
22427 |
|
22428 | var _this$props = this.props,
|
22429 | children = _this$props.children,
|
22430 | _in = _this$props.in,
|
22431 | _mountOnEnter = _this$props.mountOnEnter,
|
22432 | _unmountOnExit = _this$props.unmountOnExit,
|
22433 | _appear = _this$props.appear,
|
22434 | _enter = _this$props.enter,
|
22435 | _exit = _this$props.exit,
|
22436 | _timeout = _this$props.timeout,
|
22437 | _addEndListener = _this$props.addEndListener,
|
22438 | _onEnter = _this$props.onEnter,
|
22439 | _onEntering = _this$props.onEntering,
|
22440 | _onEntered = _this$props.onEntered,
|
22441 | _onExit = _this$props.onExit,
|
22442 | _onExiting = _this$props.onExiting,
|
22443 | _onExited = _this$props.onExited,
|
22444 | _nodeRef = _this$props.nodeRef,
|
22445 | childProps = Object(objectWithoutPropertiesLoose["a" ])(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
22446 |
|
22447 | return (
|
22448 |
|
22449 |
|
22450 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(TransitionGroupContext.Provider, {
|
22451 | value: null
|
22452 | }, typeof children === 'function' ? children(status, childProps) : external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.only(children), childProps))
|
22453 | );
|
22454 | };
|
22455 |
|
22456 | return Transition;
|
22457 | }(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Component);
|
22458 |
|
22459 | Transition_Transition.contextType = TransitionGroupContext;
|
22460 | Transition_Transition.propTypes = false ? undefined : {};
|
22461 |
|
22462 | function noop() {}
|
22463 |
|
22464 | Transition_Transition.defaultProps = {
|
22465 | in: false,
|
22466 | mountOnEnter: false,
|
22467 | unmountOnExit: false,
|
22468 | appear: false,
|
22469 | enter: true,
|
22470 | exit: true,
|
22471 | onEnter: noop,
|
22472 | onEntering: noop,
|
22473 | onEntered: noop,
|
22474 | onExit: noop,
|
22475 | onExiting: noop,
|
22476 | onExited: noop
|
22477 | };
|
22478 | Transition_Transition.UNMOUNTED = UNMOUNTED;
|
22479 | Transition_Transition.EXITED = EXITED;
|
22480 | Transition_Transition.ENTERING = ENTERING;
|
22481 | Transition_Transition.ENTERED = ENTERED;
|
22482 | Transition_Transition.EXITING = EXITING;
|
22483 | var esm_Transition = (Transition_Transition);
|
22484 |
|
22485 | var useTheme = __webpack_require__(216);
|
22486 |
|
22487 |
|
22488 | var defaultTheme = __webpack_require__(37);
|
22489 |
|
22490 |
|
22491 |
|
22492 |
|
22493 |
|
22494 | function useTheme_useTheme() {
|
22495 | var theme = Object(useTheme["a" ])() || defaultTheme["a" ];
|
22496 |
|
22497 | if (false) {}
|
22498 |
|
22499 | return theme;
|
22500 | }
|
22501 |
|
22502 | var reflow = function reflow(node) {
|
22503 | return node.scrollTop;
|
22504 | };
|
22505 | function getTransitionProps(props, options) {
|
22506 | var timeout = props.timeout,
|
22507 | _props$style = props.style,
|
22508 | style = _props$style === void 0 ? {} : _props$style;
|
22509 | return {
|
22510 | duration: style.transitionDuration || typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,
|
22511 | delay: style.transitionDelay
|
22512 | };
|
22513 | }
|
22514 |
|
22515 |
|
22516 |
|
22517 |
|
22518 |
|
22519 |
|
22520 |
|
22521 |
|
22522 |
|
22523 |
|
22524 |
|
22525 | function getScale(value) {
|
22526 | return "scale(".concat(value, ", ").concat(Math.pow(value, 2), ")");
|
22527 | }
|
22528 |
|
22529 | var Grow_styles = {
|
22530 | entering: {
|
22531 | opacity: 1,
|
22532 | transform: getScale(1)
|
22533 | },
|
22534 | entered: {
|
22535 | opacity: 1,
|
22536 | transform: 'none'
|
22537 | }
|
22538 | };
|
22539 |
|
22540 |
|
22541 |
|
22542 |
|
22543 |
|
22544 |
|
22545 | var Grow_Grow = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function Grow(props, ref) {
|
22546 | var children = props.children,
|
22547 | _props$disableStrictM = props.disableStrictModeCompat,
|
22548 | disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,
|
22549 | inProp = props.in,
|
22550 | onEnter = props.onEnter,
|
22551 | onEntered = props.onEntered,
|
22552 | onEntering = props.onEntering,
|
22553 | onExit = props.onExit,
|
22554 | onExited = props.onExited,
|
22555 | onExiting = props.onExiting,
|
22556 | style = props.style,
|
22557 | _props$timeout = props.timeout,
|
22558 | timeout = _props$timeout === void 0 ? 'auto' : _props$timeout,
|
22559 | _props$TransitionComp = props.TransitionComponent,
|
22560 | TransitionComponent = _props$TransitionComp === void 0 ? esm_Transition : _props$TransitionComp,
|
22561 | other = Object(objectWithoutProperties["a" ])(props, ["children", "disableStrictModeCompat", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"]);
|
22562 |
|
22563 | var timer = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
22564 | var autoTimeout = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
22565 | var theme = useTheme_useTheme();
|
22566 | var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;
|
22567 | var nodeRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
22568 | var foreignRef = useForkRef(children.ref, ref);
|
22569 | var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);
|
22570 |
|
22571 | var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
|
22572 | return function (nodeOrAppearing, maybeAppearing) {
|
22573 | if (callback) {
|
22574 | var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],
|
22575 | _ref2 = Object(slicedToArray["a" ])(_ref, 2),
|
22576 | node = _ref2[0],
|
22577 | isAppearing = _ref2[1];
|
22578 |
|
22579 |
|
22580 | if (isAppearing === undefined) {
|
22581 | callback(node);
|
22582 | } else {
|
22583 | callback(node, isAppearing);
|
22584 | }
|
22585 | }
|
22586 | };
|
22587 | };
|
22588 |
|
22589 | var handleEntering = normalizedTransitionCallback(onEntering);
|
22590 | var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {
|
22591 | reflow(node);
|
22592 |
|
22593 | var _getTransitionProps = getTransitionProps({
|
22594 | style: style,
|
22595 | timeout: timeout
|
22596 | }, {
|
22597 | mode: 'enter'
|
22598 | }),
|
22599 | transitionDuration = _getTransitionProps.duration,
|
22600 | delay = _getTransitionProps.delay;
|
22601 |
|
22602 | var duration;
|
22603 |
|
22604 | if (timeout === 'auto') {
|
22605 | duration = theme.transitions.getAutoHeightDuration(node.clientHeight);
|
22606 | autoTimeout.current = duration;
|
22607 | } else {
|
22608 | duration = transitionDuration;
|
22609 | }
|
22610 |
|
22611 | node.style.transition = [theme.transitions.create('opacity', {
|
22612 | duration: duration,
|
22613 | delay: delay
|
22614 | }), theme.transitions.create('transform', {
|
22615 | duration: duration * 0.666,
|
22616 | delay: delay
|
22617 | })].join(',');
|
22618 |
|
22619 | if (onEnter) {
|
22620 | onEnter(node, isAppearing);
|
22621 | }
|
22622 | });
|
22623 | var handleEntered = normalizedTransitionCallback(onEntered);
|
22624 | var handleExiting = normalizedTransitionCallback(onExiting);
|
22625 | var handleExit = normalizedTransitionCallback(function (node) {
|
22626 | var _getTransitionProps2 = getTransitionProps({
|
22627 | style: style,
|
22628 | timeout: timeout
|
22629 | }, {
|
22630 | mode: 'exit'
|
22631 | }),
|
22632 | transitionDuration = _getTransitionProps2.duration,
|
22633 | delay = _getTransitionProps2.delay;
|
22634 |
|
22635 | var duration;
|
22636 |
|
22637 | if (timeout === 'auto') {
|
22638 | duration = theme.transitions.getAutoHeightDuration(node.clientHeight);
|
22639 | autoTimeout.current = duration;
|
22640 | } else {
|
22641 | duration = transitionDuration;
|
22642 | }
|
22643 |
|
22644 | node.style.transition = [theme.transitions.create('opacity', {
|
22645 | duration: duration,
|
22646 | delay: delay
|
22647 | }), theme.transitions.create('transform', {
|
22648 | duration: duration * 0.666,
|
22649 | delay: delay || duration * 0.333
|
22650 | })].join(',');
|
22651 | node.style.opacity = '0';
|
22652 | node.style.transform = getScale(0.75);
|
22653 |
|
22654 | if (onExit) {
|
22655 | onExit(node);
|
22656 | }
|
22657 | });
|
22658 | var handleExited = normalizedTransitionCallback(onExited);
|
22659 |
|
22660 | var addEndListener = function addEndListener(nodeOrNext, maybeNext) {
|
22661 | var next = enableStrictModeCompat ? nodeOrNext : maybeNext;
|
22662 |
|
22663 | if (timeout === 'auto') {
|
22664 | timer.current = setTimeout(next, autoTimeout.current || 0);
|
22665 | }
|
22666 | };
|
22667 |
|
22668 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
22669 | return function () {
|
22670 | clearTimeout(timer.current);
|
22671 | };
|
22672 | }, []);
|
22673 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](TransitionComponent, Object(esm_extends["a" ])({
|
22674 | appear: true,
|
22675 | in: inProp,
|
22676 | nodeRef: enableStrictModeCompat ? nodeRef : undefined,
|
22677 | onEnter: handleEnter,
|
22678 | onEntered: handleEntered,
|
22679 | onEntering: handleEntering,
|
22680 | onExit: handleExit,
|
22681 | onExited: handleExited,
|
22682 | onExiting: handleExiting,
|
22683 | addEndListener: addEndListener,
|
22684 | timeout: timeout === 'auto' ? null : timeout
|
22685 | }, other), function (state, childProps) {
|
22686 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"](children, Object(esm_extends["a" ])({
|
22687 | style: Object(esm_extends["a" ])({
|
22688 | opacity: 0,
|
22689 | transform: getScale(0.75),
|
22690 | visibility: state === 'exited' && !inProp ? 'hidden' : undefined
|
22691 | }, Grow_styles[state], style, children.props.style),
|
22692 | ref: handleRef
|
22693 | }, childProps));
|
22694 | });
|
22695 | });
|
22696 | false ? undefined : void 0;
|
22697 | Grow_Grow.muiSupportAuto = true;
|
22698 | var esm_Grow_Grow = (Grow_Grow);
|
22699 |
|
22700 | var esm_popper = __webpack_require__(70);
|
22701 |
|
22702 |
|
22703 |
|
22704 |
|
22705 |
|
22706 |
|
22707 |
|
22708 |
|
22709 |
|
22710 | function getContainer(container) {
|
22711 | container = typeof container === 'function' ? container() : container;
|
22712 |
|
22713 | return react_dom["findDOMNode"](container);
|
22714 | }
|
22715 |
|
22716 | var Portal_useEnhancedEffect = typeof window !== 'undefined' ? external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"] : external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"];
|
22717 |
|
22718 |
|
22719 |
|
22720 |
|
22721 |
|
22722 | var Portal_Portal = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function Portal(props, ref) {
|
22723 | var children = props.children,
|
22724 | container = props.container,
|
22725 | _props$disablePortal = props.disablePortal,
|
22726 | disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,
|
22727 | onRendered = props.onRendered;
|
22728 |
|
22729 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](null),
|
22730 | mountNode = _React$useState[0],
|
22731 | setMountNode = _React$useState[1];
|
22732 |
|
22733 | var handleRef = useForkRef( external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"](children) ? children.ref : null, ref);
|
22734 | Portal_useEnhancedEffect(function () {
|
22735 | if (!disablePortal) {
|
22736 | setMountNode(getContainer(container) || document.body);
|
22737 | }
|
22738 | }, [container, disablePortal]);
|
22739 | Portal_useEnhancedEffect(function () {
|
22740 | if (mountNode && !disablePortal) {
|
22741 | setRef(ref, mountNode);
|
22742 | return function () {
|
22743 | setRef(ref, null);
|
22744 | };
|
22745 | }
|
22746 |
|
22747 | return undefined;
|
22748 | }, [ref, mountNode, disablePortal]);
|
22749 | Portal_useEnhancedEffect(function () {
|
22750 | if (onRendered && (mountNode || disablePortal)) {
|
22751 | onRendered();
|
22752 | }
|
22753 | }, [onRendered, mountNode, disablePortal]);
|
22754 |
|
22755 | if (disablePortal) {
|
22756 | if ( external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"](children)) {
|
22757 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"](children, {
|
22758 | ref: handleRef
|
22759 | });
|
22760 | }
|
22761 |
|
22762 | return children;
|
22763 | }
|
22764 |
|
22765 | return mountNode ? react_dom["createPortal"](children, mountNode) : mountNode;
|
22766 | });
|
22767 | false ? undefined : void 0;
|
22768 |
|
22769 | if (false) {}
|
22770 |
|
22771 | var esm_Portal_Portal = (Portal_Portal);
|
22772 |
|
22773 |
|
22774 |
|
22775 |
|
22776 |
|
22777 |
|
22778 |
|
22779 |
|
22780 |
|
22781 |
|
22782 | function createChainedFunction() {
|
22783 | for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
22784 | funcs[_key] = arguments[_key];
|
22785 | }
|
22786 |
|
22787 | return funcs.reduce(function (acc, func) {
|
22788 | if (func == null) {
|
22789 | return acc;
|
22790 | }
|
22791 |
|
22792 | if (false) {}
|
22793 |
|
22794 | return function chainedFunction() {
|
22795 | for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
22796 | args[_key2] = arguments[_key2];
|
22797 | }
|
22798 |
|
22799 | acc.apply(this, args);
|
22800 | func.apply(this, args);
|
22801 | };
|
22802 | }, function () {});
|
22803 | }
|
22804 |
|
22805 |
|
22806 |
|
22807 |
|
22808 |
|
22809 |
|
22810 |
|
22811 |
|
22812 |
|
22813 |
|
22814 |
|
22815 |
|
22816 |
|
22817 | function flipPlacement(placement, theme) {
|
22818 | var direction = theme && theme.direction || 'ltr';
|
22819 |
|
22820 | if (direction === 'ltr') {
|
22821 | return placement;
|
22822 | }
|
22823 |
|
22824 | switch (placement) {
|
22825 | case 'bottom-end':
|
22826 | return 'bottom-start';
|
22827 |
|
22828 | case 'bottom-start':
|
22829 | return 'bottom-end';
|
22830 |
|
22831 | case 'top-end':
|
22832 | return 'top-start';
|
22833 |
|
22834 | case 'top-start':
|
22835 | return 'top-end';
|
22836 |
|
22837 | default:
|
22838 | return placement;
|
22839 | }
|
22840 | }
|
22841 |
|
22842 | function getAnchorEl(anchorEl) {
|
22843 | return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
|
22844 | }
|
22845 |
|
22846 | var Popper_useEnhancedEffect = typeof window !== 'undefined' ? external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"] : external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"];
|
22847 | var defaultPopperOptions = {};
|
22848 |
|
22849 |
|
22850 |
|
22851 |
|
22852 | var Popper_Popper = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function Popper(props, ref) {
|
22853 | var anchorEl = props.anchorEl,
|
22854 | children = props.children,
|
22855 | container = props.container,
|
22856 | _props$disablePortal = props.disablePortal,
|
22857 | disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,
|
22858 | _props$keepMounted = props.keepMounted,
|
22859 | keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
|
22860 | modifiers = props.modifiers,
|
22861 | open = props.open,
|
22862 | _props$placement = props.placement,
|
22863 | initialPlacement = _props$placement === void 0 ? 'bottom' : _props$placement,
|
22864 | _props$popperOptions = props.popperOptions,
|
22865 | popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions,
|
22866 | popperRefProp = props.popperRef,
|
22867 | style = props.style,
|
22868 | _props$transition = props.transition,
|
22869 | transition = _props$transition === void 0 ? false : _props$transition,
|
22870 | other = Object(objectWithoutProperties["a" ])(props, ["anchorEl", "children", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition"]);
|
22871 |
|
22872 | var tooltipRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
22873 | var ownRef = useForkRef(tooltipRef, ref);
|
22874 | var popperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
22875 | var handlePopperRef = useForkRef(popperRef, popperRefProp);
|
22876 | var handlePopperRefRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](handlePopperRef);
|
22877 | Popper_useEnhancedEffect(function () {
|
22878 | handlePopperRefRef.current = handlePopperRef;
|
22879 | }, [handlePopperRef]);
|
22880 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useImperativeHandle"](popperRefProp, function () {
|
22881 | return popperRef.current;
|
22882 | }, []);
|
22883 |
|
22884 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](true),
|
22885 | exited = _React$useState[0],
|
22886 | setExited = _React$useState[1];
|
22887 |
|
22888 | var theme = Object(useTheme["a" ])();
|
22889 | var rtlPlacement = flipPlacement(initialPlacement, theme);
|
22890 | |
22891 |
|
22892 |
|
22893 |
|
22894 |
|
22895 | var _React$useState2 = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](rtlPlacement),
|
22896 | placement = _React$useState2[0],
|
22897 | setPlacement = _React$useState2[1];
|
22898 |
|
22899 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
22900 | if (popperRef.current) {
|
22901 | popperRef.current.update();
|
22902 | }
|
22903 | });
|
22904 | var handleOpen = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function () {
|
22905 | if (!tooltipRef.current || !anchorEl || !open) {
|
22906 | return;
|
22907 | }
|
22908 |
|
22909 | if (popperRef.current) {
|
22910 | popperRef.current.destroy();
|
22911 | handlePopperRefRef.current(null);
|
22912 | }
|
22913 |
|
22914 | var handlePopperUpdate = function handlePopperUpdate(data) {
|
22915 | setPlacement(data.placement);
|
22916 | };
|
22917 |
|
22918 | var resolvedAnchorEl = getAnchorEl(anchorEl);
|
22919 |
|
22920 | if (false) { var box; }
|
22921 |
|
22922 | var popper = new esm_popper["a" ](getAnchorEl(anchorEl), tooltipRef.current, Object(esm_extends["a" ])({
|
22923 | placement: rtlPlacement
|
22924 | }, popperOptions, {
|
22925 | modifiers: Object(esm_extends["a" ])({}, disablePortal ? {} : {
|
22926 |
|
22927 | preventOverflow: {
|
22928 | boundariesElement: 'window'
|
22929 | }
|
22930 | }, modifiers, popperOptions.modifiers),
|
22931 |
|
22932 |
|
22933 | onCreate: createChainedFunction(handlePopperUpdate, popperOptions.onCreate),
|
22934 | onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate)
|
22935 | }));
|
22936 | handlePopperRefRef.current(popper);
|
22937 | }, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]);
|
22938 | var handleRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function (node) {
|
22939 | setRef(ownRef, node);
|
22940 | handleOpen();
|
22941 | }, [ownRef, handleOpen]);
|
22942 |
|
22943 | var handleEnter = function handleEnter() {
|
22944 | setExited(false);
|
22945 | };
|
22946 |
|
22947 | var handleClose = function handleClose() {
|
22948 | if (!popperRef.current) {
|
22949 | return;
|
22950 | }
|
22951 |
|
22952 | popperRef.current.destroy();
|
22953 | handlePopperRefRef.current(null);
|
22954 | };
|
22955 |
|
22956 | var handleExited = function handleExited() {
|
22957 | setExited(true);
|
22958 | handleClose();
|
22959 | };
|
22960 |
|
22961 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
22962 | return function () {
|
22963 | handleClose();
|
22964 | };
|
22965 | }, []);
|
22966 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
22967 | if (!open && !transition) {
|
22968 |
|
22969 | handleClose();
|
22970 | }
|
22971 | }, [open, transition]);
|
22972 |
|
22973 | if (!keepMounted && !open && (!transition || exited)) {
|
22974 | return null;
|
22975 | }
|
22976 |
|
22977 | var childProps = {
|
22978 | placement: placement
|
22979 | };
|
22980 |
|
22981 | if (transition) {
|
22982 | childProps.TransitionProps = {
|
22983 | in: open,
|
22984 | onEnter: handleEnter,
|
22985 | onExited: handleExited
|
22986 | };
|
22987 | }
|
22988 |
|
22989 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](esm_Portal_Portal, {
|
22990 | disablePortal: disablePortal,
|
22991 | container: container
|
22992 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", Object(esm_extends["a" ])({
|
22993 | ref: handleRef,
|
22994 | role: "tooltip"
|
22995 | }, other, {
|
22996 | style: Object(esm_extends["a" ])({
|
22997 |
|
22998 | position: 'fixed',
|
22999 |
|
23000 | top: 0,
|
23001 | left: 0,
|
23002 | display: !open && keepMounted && !transition ? 'none' : null
|
23003 | }, style)
|
23004 | }), typeof children === 'function' ? children(childProps) : children));
|
23005 | });
|
23006 | false ? undefined : void 0;
|
23007 | var esm_Popper_Popper = (Popper_Popper);
|
23008 |
|
23009 |
|
23010 |
|
23011 |
|
23012 |
|
23013 |
|
23014 | function useId(idOverride) {
|
23015 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](idOverride),
|
23016 | defaultId = _React$useState[0],
|
23017 | setDefaultId = _React$useState[1];
|
23018 |
|
23019 | var id = idOverride || defaultId;
|
23020 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
23021 | if (defaultId == null) {
|
23022 |
|
23023 |
|
23024 |
|
23025 | setDefaultId("mui-".concat(Math.round(Math.random() * 1e5)));
|
23026 | }
|
23027 | }, [defaultId]);
|
23028 | return id;
|
23029 | }
|
23030 |
|
23031 |
|
23032 |
|
23033 | function useControlled(_ref) {
|
23034 | var controlled = _ref.controlled,
|
23035 | defaultProp = _ref.default,
|
23036 | name = _ref.name,
|
23037 | _ref$state = _ref.state,
|
23038 | state = _ref$state === void 0 ? 'value' : _ref$state;
|
23039 |
|
23040 | var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](controlled !== undefined),
|
23041 | isControlled = _React$useRef.current;
|
23042 |
|
23043 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](defaultProp),
|
23044 | valueState = _React$useState[0],
|
23045 | setValue = _React$useState[1];
|
23046 |
|
23047 | var value = isControlled ? controlled : valueState;
|
23048 |
|
23049 | if (false) { var _React$useRef2, defaultValue; }
|
23050 |
|
23051 | var setValueIfUncontrolled = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function (newValue) {
|
23052 | if (!isControlled) {
|
23053 | setValue(newValue);
|
23054 | }
|
23055 | }, []);
|
23056 | return [value, setValueIfUncontrolled];
|
23057 | }
|
23058 |
|
23059 |
|
23060 |
|
23061 |
|
23062 |
|
23063 |
|
23064 |
|
23065 |
|
23066 |
|
23067 |
|
23068 |
|
23069 |
|
23070 |
|
23071 |
|
23072 |
|
23073 |
|
23074 |
|
23075 |
|
23076 |
|
23077 |
|
23078 |
|
23079 |
|
23080 | function round(value) {
|
23081 | return Math.round(value * 1e5) / 1e5;
|
23082 | }
|
23083 |
|
23084 | function arrowGenerator() {
|
23085 | return {
|
23086 | '&[x-placement*="bottom"] $arrow': {
|
23087 | top: 0,
|
23088 | left: 0,
|
23089 | marginTop: '-0.71em',
|
23090 | marginLeft: 4,
|
23091 | marginRight: 4,
|
23092 | '&::before': {
|
23093 | transformOrigin: '0 100%'
|
23094 | }
|
23095 | },
|
23096 | '&[x-placement*="top"] $arrow': {
|
23097 | bottom: 0,
|
23098 | left: 0,
|
23099 | marginBottom: '-0.71em',
|
23100 | marginLeft: 4,
|
23101 | marginRight: 4,
|
23102 | '&::before': {
|
23103 | transformOrigin: '100% 0'
|
23104 | }
|
23105 | },
|
23106 | '&[x-placement*="right"] $arrow': {
|
23107 | left: 0,
|
23108 | marginLeft: '-0.71em',
|
23109 | height: '1em',
|
23110 | width: '0.71em',
|
23111 | marginTop: 4,
|
23112 | marginBottom: 4,
|
23113 | '&::before': {
|
23114 | transformOrigin: '100% 100%'
|
23115 | }
|
23116 | },
|
23117 | '&[x-placement*="left"] $arrow': {
|
23118 | right: 0,
|
23119 | marginRight: '-0.71em',
|
23120 | height: '1em',
|
23121 | width: '0.71em',
|
23122 | marginTop: 4,
|
23123 | marginBottom: 4,
|
23124 | '&::before': {
|
23125 | transformOrigin: '0 0'
|
23126 | }
|
23127 | }
|
23128 | };
|
23129 | }
|
23130 |
|
23131 | var Tooltip_styles = function styles(theme) {
|
23132 | return {
|
23133 |
|
23134 | popper: {
|
23135 | zIndex: theme.zIndex.tooltip,
|
23136 | pointerEvents: 'none'
|
23137 |
|
23138 | },
|
23139 |
|
23140 |
|
23141 | popperInteractive: {
|
23142 | pointerEvents: 'auto'
|
23143 | },
|
23144 |
|
23145 |
|
23146 | popperArrow: arrowGenerator(),
|
23147 |
|
23148 |
|
23149 | tooltip: {
|
23150 | backgroundColor: Object(colorManipulator["b" ])(theme.palette.grey[700], 0.9),
|
23151 | borderRadius: theme.shape.borderRadius,
|
23152 | color: theme.palette.common.white,
|
23153 | fontFamily: theme.typography.fontFamily,
|
23154 | padding: '4px 8px',
|
23155 | fontSize: theme.typography.pxToRem(10),
|
23156 | lineHeight: "".concat(round(14 / 10), "em"),
|
23157 | maxWidth: 300,
|
23158 | wordWrap: 'break-word',
|
23159 | fontWeight: theme.typography.fontWeightMedium
|
23160 | },
|
23161 |
|
23162 |
|
23163 | tooltipArrow: {
|
23164 | position: 'relative',
|
23165 | margin: '0'
|
23166 | },
|
23167 |
|
23168 |
|
23169 | arrow: {
|
23170 | overflow: 'hidden',
|
23171 | position: 'absolute',
|
23172 | width: '1em',
|
23173 | height: '0.71em'
|
23174 |
|
23175 | ,
|
23176 | boxSizing: 'border-box',
|
23177 | color: Object(colorManipulator["b" ])(theme.palette.grey[700], 0.9),
|
23178 | '&::before': {
|
23179 | content: '""',
|
23180 | margin: 'auto',
|
23181 | display: 'block',
|
23182 | width: '100%',
|
23183 | height: '100%',
|
23184 | backgroundColor: 'currentColor',
|
23185 | transform: 'rotate(45deg)'
|
23186 | }
|
23187 | },
|
23188 |
|
23189 |
|
23190 | touch: {
|
23191 | padding: '8px 16px',
|
23192 | fontSize: theme.typography.pxToRem(14),
|
23193 | lineHeight: "".concat(round(16 / 14), "em"),
|
23194 | fontWeight: theme.typography.fontWeightRegular
|
23195 | },
|
23196 |
|
23197 |
|
23198 | tooltipPlacementLeft: Object(defineProperty["a" ])({
|
23199 | transformOrigin: 'right center',
|
23200 | margin: '0 24px '
|
23201 | }, theme.breakpoints.up('sm'), {
|
23202 | margin: '0 14px'
|
23203 | }),
|
23204 |
|
23205 |
|
23206 | tooltipPlacementRight: Object(defineProperty["a" ])({
|
23207 | transformOrigin: 'left center',
|
23208 | margin: '0 24px'
|
23209 | }, theme.breakpoints.up('sm'), {
|
23210 | margin: '0 14px'
|
23211 | }),
|
23212 |
|
23213 |
|
23214 | tooltipPlacementTop: Object(defineProperty["a" ])({
|
23215 | transformOrigin: 'center bottom',
|
23216 | margin: '24px 0'
|
23217 | }, theme.breakpoints.up('sm'), {
|
23218 | margin: '14px 0'
|
23219 | }),
|
23220 |
|
23221 |
|
23222 | tooltipPlacementBottom: Object(defineProperty["a" ])({
|
23223 | transformOrigin: 'center top',
|
23224 | margin: '24px 0'
|
23225 | }, theme.breakpoints.up('sm'), {
|
23226 | margin: '14px 0'
|
23227 | })
|
23228 | };
|
23229 | };
|
23230 | var hystersisOpen = false;
|
23231 | var hystersisTimer = null;
|
23232 | function testReset() {
|
23233 | hystersisOpen = false;
|
23234 | clearTimeout(hystersisTimer);
|
23235 | }
|
23236 | var Tooltip_Tooltip = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function Tooltip(props, ref) {
|
23237 | var _props$arrow = props.arrow,
|
23238 | arrow = _props$arrow === void 0 ? false : _props$arrow,
|
23239 | children = props.children,
|
23240 | classes = props.classes,
|
23241 | _props$disableFocusLi = props.disableFocusListener,
|
23242 | disableFocusListener = _props$disableFocusLi === void 0 ? false : _props$disableFocusLi,
|
23243 | _props$disableHoverLi = props.disableHoverListener,
|
23244 | disableHoverListener = _props$disableHoverLi === void 0 ? false : _props$disableHoverLi,
|
23245 | _props$disableTouchLi = props.disableTouchListener,
|
23246 | disableTouchListener = _props$disableTouchLi === void 0 ? false : _props$disableTouchLi,
|
23247 | _props$enterDelay = props.enterDelay,
|
23248 | enterDelay = _props$enterDelay === void 0 ? 100 : _props$enterDelay,
|
23249 | _props$enterNextDelay = props.enterNextDelay,
|
23250 | enterNextDelay = _props$enterNextDelay === void 0 ? 0 : _props$enterNextDelay,
|
23251 | _props$enterTouchDela = props.enterTouchDelay,
|
23252 | enterTouchDelay = _props$enterTouchDela === void 0 ? 700 : _props$enterTouchDela,
|
23253 | idProp = props.id,
|
23254 | _props$interactive = props.interactive,
|
23255 | interactive = _props$interactive === void 0 ? false : _props$interactive,
|
23256 | _props$leaveDelay = props.leaveDelay,
|
23257 | leaveDelay = _props$leaveDelay === void 0 ? 0 : _props$leaveDelay,
|
23258 | _props$leaveTouchDela = props.leaveTouchDelay,
|
23259 | leaveTouchDelay = _props$leaveTouchDela === void 0 ? 1500 : _props$leaveTouchDela,
|
23260 | onClose = props.onClose,
|
23261 | onOpen = props.onOpen,
|
23262 | openProp = props.open,
|
23263 | _props$placement = props.placement,
|
23264 | placement = _props$placement === void 0 ? 'bottom' : _props$placement,
|
23265 | _props$PopperComponen = props.PopperComponent,
|
23266 | PopperComponent = _props$PopperComponen === void 0 ? esm_Popper_Popper : _props$PopperComponen,
|
23267 | PopperProps = props.PopperProps,
|
23268 | title = props.title,
|
23269 | _props$TransitionComp = props.TransitionComponent,
|
23270 | TransitionComponent = _props$TransitionComp === void 0 ? esm_Grow_Grow : _props$TransitionComp,
|
23271 | TransitionProps = props.TransitionProps,
|
23272 | other = Object(objectWithoutProperties["a" ])(props, ["arrow", "children", "classes", "disableFocusListener", "disableHoverListener", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "id", "interactive", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "title", "TransitionComponent", "TransitionProps"]);
|
23273 |
|
23274 | var theme = useTheme_useTheme();
|
23275 |
|
23276 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](),
|
23277 | childNode = _React$useState[0],
|
23278 | setChildNode = _React$useState[1];
|
23279 |
|
23280 | var _React$useState2 = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](null),
|
23281 | arrowRef = _React$useState2[0],
|
23282 | setArrowRef = _React$useState2[1];
|
23283 |
|
23284 | var ignoreNonTouchEvents = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](false);
|
23285 | var closeTimer = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
23286 | var enterTimer = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
23287 | var leaveTimer = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
23288 | var touchTimer = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
23289 |
|
23290 | var _useControlled = useControlled({
|
23291 | controlled: openProp,
|
23292 | default: false,
|
23293 | name: 'Tooltip',
|
23294 | state: 'open'
|
23295 | }),
|
23296 | _useControlled2 = Object(slicedToArray["a" ])(_useControlled, 2),
|
23297 | openState = _useControlled2[0],
|
23298 | setOpenState = _useControlled2[1];
|
23299 |
|
23300 | var open = openState;
|
23301 |
|
23302 | if (false) { var _React$useRef, isControlled; }
|
23303 |
|
23304 | var id = useId(idProp);
|
23305 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
23306 | return function () {
|
23307 | clearTimeout(closeTimer.current);
|
23308 | clearTimeout(enterTimer.current);
|
23309 | clearTimeout(leaveTimer.current);
|
23310 | clearTimeout(touchTimer.current);
|
23311 | };
|
23312 | }, []);
|
23313 |
|
23314 | var handleOpen = function handleOpen(event) {
|
23315 | clearTimeout(hystersisTimer);
|
23316 | hystersisOpen = true;
|
23317 |
|
23318 |
|
23319 |
|
23320 | setOpenState(true);
|
23321 |
|
23322 | if (onOpen) {
|
23323 | onOpen(event);
|
23324 | }
|
23325 | };
|
23326 |
|
23327 | var handleEnter = function handleEnter() {
|
23328 | var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
23329 | return function (event) {
|
23330 | var childrenProps = children.props;
|
23331 |
|
23332 | if (event.type === 'mouseover' && childrenProps.onMouseOver && forward) {
|
23333 | childrenProps.onMouseOver(event);
|
23334 | }
|
23335 |
|
23336 | if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
|
23337 | return;
|
23338 | }
|
23339 |
|
23340 |
|
23341 |
|
23342 |
|
23343 | if (childNode) {
|
23344 | childNode.removeAttribute('title');
|
23345 | }
|
23346 |
|
23347 | clearTimeout(enterTimer.current);
|
23348 | clearTimeout(leaveTimer.current);
|
23349 |
|
23350 | if (enterDelay || hystersisOpen && enterNextDelay) {
|
23351 | event.persist();
|
23352 | enterTimer.current = setTimeout(function () {
|
23353 | handleOpen(event);
|
23354 | }, hystersisOpen ? enterNextDelay : enterDelay);
|
23355 | } else {
|
23356 | handleOpen(event);
|
23357 | }
|
23358 | };
|
23359 | };
|
23360 |
|
23361 | var _useIsFocusVisible = useIsFocusVisible(),
|
23362 | isFocusVisible = _useIsFocusVisible.isFocusVisible,
|
23363 | onBlurVisible = _useIsFocusVisible.onBlurVisible,
|
23364 | focusVisibleRef = _useIsFocusVisible.ref;
|
23365 |
|
23366 | var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](false),
|
23367 | childIsFocusVisible = _React$useState3[0],
|
23368 | setChildIsFocusVisible = _React$useState3[1];
|
23369 |
|
23370 | var handleBlur = function handleBlur() {
|
23371 | if (childIsFocusVisible) {
|
23372 | setChildIsFocusVisible(false);
|
23373 | onBlurVisible();
|
23374 | }
|
23375 | };
|
23376 |
|
23377 | var handleFocus = function handleFocus() {
|
23378 | var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
23379 | return function (event) {
|
23380 |
|
23381 |
|
23382 |
|
23383 | if (!childNode) {
|
23384 | setChildNode(event.currentTarget);
|
23385 | }
|
23386 |
|
23387 | if (isFocusVisible(event)) {
|
23388 | setChildIsFocusVisible(true);
|
23389 | handleEnter()(event);
|
23390 | }
|
23391 |
|
23392 | var childrenProps = children.props;
|
23393 |
|
23394 | if (childrenProps.onFocus && forward) {
|
23395 | childrenProps.onFocus(event);
|
23396 | }
|
23397 | };
|
23398 | };
|
23399 |
|
23400 | var handleClose = function handleClose(event) {
|
23401 | clearTimeout(hystersisTimer);
|
23402 | hystersisTimer = setTimeout(function () {
|
23403 | hystersisOpen = false;
|
23404 | }, 800 + leaveDelay);
|
23405 | setOpenState(false);
|
23406 |
|
23407 | if (onClose) {
|
23408 | onClose(event);
|
23409 | }
|
23410 |
|
23411 | clearTimeout(closeTimer.current);
|
23412 | closeTimer.current = setTimeout(function () {
|
23413 | ignoreNonTouchEvents.current = false;
|
23414 | }, theme.transitions.duration.shortest);
|
23415 | };
|
23416 |
|
23417 | var handleLeave = function handleLeave() {
|
23418 | var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
23419 | return function (event) {
|
23420 | var childrenProps = children.props;
|
23421 |
|
23422 | if (event.type === 'blur') {
|
23423 | if (childrenProps.onBlur && forward) {
|
23424 | childrenProps.onBlur(event);
|
23425 | }
|
23426 |
|
23427 | handleBlur();
|
23428 | }
|
23429 |
|
23430 | if (event.type === 'mouseleave' && childrenProps.onMouseLeave && event.currentTarget === childNode) {
|
23431 | childrenProps.onMouseLeave(event);
|
23432 | }
|
23433 |
|
23434 | clearTimeout(enterTimer.current);
|
23435 | clearTimeout(leaveTimer.current);
|
23436 | event.persist();
|
23437 | leaveTimer.current = setTimeout(function () {
|
23438 | handleClose(event);
|
23439 | }, leaveDelay);
|
23440 | };
|
23441 | };
|
23442 |
|
23443 | var detectTouchStart = function detectTouchStart(event) {
|
23444 | ignoreNonTouchEvents.current = true;
|
23445 | var childrenProps = children.props;
|
23446 |
|
23447 | if (childrenProps.onTouchStart) {
|
23448 | childrenProps.onTouchStart(event);
|
23449 | }
|
23450 | };
|
23451 |
|
23452 | var handleTouchStart = function handleTouchStart(event) {
|
23453 | detectTouchStart(event);
|
23454 | clearTimeout(leaveTimer.current);
|
23455 | clearTimeout(closeTimer.current);
|
23456 | clearTimeout(touchTimer.current);
|
23457 | event.persist();
|
23458 | touchTimer.current = setTimeout(function () {
|
23459 | handleEnter()(event);
|
23460 | }, enterTouchDelay);
|
23461 | };
|
23462 |
|
23463 | var handleTouchEnd = function handleTouchEnd(event) {
|
23464 | if (children.props.onTouchEnd) {
|
23465 | children.props.onTouchEnd(event);
|
23466 | }
|
23467 |
|
23468 | clearTimeout(touchTimer.current);
|
23469 | clearTimeout(leaveTimer.current);
|
23470 | event.persist();
|
23471 | leaveTimer.current = setTimeout(function () {
|
23472 | handleClose(event);
|
23473 | }, leaveTouchDelay);
|
23474 | };
|
23475 |
|
23476 | var handleUseRef = useForkRef(setChildNode, ref);
|
23477 | var handleFocusRef = useForkRef(focusVisibleRef, handleUseRef);
|
23478 |
|
23479 | var handleOwnRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function (instance) {
|
23480 |
|
23481 | setRef(handleFocusRef, react_dom["findDOMNode"](instance));
|
23482 | }, [handleFocusRef]);
|
23483 | var handleRef = useForkRef(children.ref, handleOwnRef);
|
23484 |
|
23485 | if (title === '') {
|
23486 | open = false;
|
23487 | }
|
23488 |
|
23489 |
|
23490 |
|
23491 |
|
23492 |
|
23493 |
|
23494 | var shouldShowNativeTitle = !open && !disableHoverListener;
|
23495 |
|
23496 | var childrenProps = Object(esm_extends["a" ])({
|
23497 | 'aria-describedby': open ? id : null,
|
23498 | title: shouldShowNativeTitle && typeof title === 'string' ? title : null
|
23499 | }, other, children.props, {
|
23500 | className: Object(clsx_m["a" ])(other.className, children.props.className),
|
23501 | onTouchStart: detectTouchStart,
|
23502 | ref: handleRef
|
23503 | });
|
23504 |
|
23505 | var interactiveWrapperListeners = {};
|
23506 |
|
23507 | if (!disableTouchListener) {
|
23508 | childrenProps.onTouchStart = handleTouchStart;
|
23509 | childrenProps.onTouchEnd = handleTouchEnd;
|
23510 | }
|
23511 |
|
23512 | if (!disableHoverListener) {
|
23513 | childrenProps.onMouseOver = handleEnter();
|
23514 | childrenProps.onMouseLeave = handleLeave();
|
23515 |
|
23516 | if (interactive) {
|
23517 | interactiveWrapperListeners.onMouseOver = handleEnter(false);
|
23518 | interactiveWrapperListeners.onMouseLeave = handleLeave(false);
|
23519 | }
|
23520 | }
|
23521 |
|
23522 | if (!disableFocusListener) {
|
23523 | childrenProps.onFocus = handleFocus();
|
23524 | childrenProps.onBlur = handleLeave();
|
23525 |
|
23526 | if (interactive) {
|
23527 | interactiveWrapperListeners.onFocus = handleFocus(false);
|
23528 | interactiveWrapperListeners.onBlur = handleLeave(false);
|
23529 | }
|
23530 | }
|
23531 |
|
23532 | if (false) {}
|
23533 |
|
23534 | var mergedPopperProps = external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"](function () {
|
23535 | return Object(deepmerge["a" ])({
|
23536 | popperOptions: {
|
23537 | modifiers: {
|
23538 | arrow: {
|
23539 | enabled: Boolean(arrowRef),
|
23540 | element: arrowRef
|
23541 | }
|
23542 | }
|
23543 | }
|
23544 | }, PopperProps);
|
23545 | }, [arrowRef, PopperProps]);
|
23546 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], null, external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"](children, childrenProps), external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](PopperComponent, Object(esm_extends["a" ])({
|
23547 | className: Object(clsx_m["a" ])(classes.popper, interactive && classes.popperInteractive, arrow && classes.popperArrow),
|
23548 | placement: placement,
|
23549 | anchorEl: childNode,
|
23550 | open: childNode ? open : false,
|
23551 | id: childrenProps['aria-describedby'],
|
23552 | transition: true
|
23553 | }, interactiveWrapperListeners, mergedPopperProps), function (_ref) {
|
23554 | var placementInner = _ref.placement,
|
23555 | TransitionPropsInner = _ref.TransitionProps;
|
23556 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](TransitionComponent, Object(esm_extends["a" ])({
|
23557 | timeout: theme.transitions.duration.shorter
|
23558 | }, TransitionPropsInner, TransitionProps), external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", {
|
23559 | className: Object(clsx_m["a" ])(classes.tooltip, classes["tooltipPlacement".concat(Object(capitalize["a" ])(placementInner.split('-')[0]))], ignoreNonTouchEvents.current && classes.touch, arrow && classes.tooltipArrow)
|
23560 | }, title, arrow ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
23561 | className: classes.arrow,
|
23562 | ref: setArrowRef
|
23563 | }) : null));
|
23564 | }));
|
23565 | });
|
23566 | false ? undefined : void 0;
|
23567 | var esm_Tooltip_Tooltip = (Object(withStyles["a" ])(Tooltip_styles, {
|
23568 | name: 'MuiTooltip',
|
23569 | flip: false
|
23570 | })(Tooltip_Tooltip));
|
23571 |
|
23572 |
|
23573 |
|
23574 |
|
23575 |
|
23576 |
|
23577 |
|
23578 | var css_ns_ns = function ns(classNames) {
|
23579 | return flatten_default()([classNames]).map(function (className) {
|
23580 | return [settings.classPrefix, className].join('-');
|
23581 | }).join(' ');
|
23582 | };
|
23583 |
|
23584 | var css_ns = (css_ns_ns);
|
23585 |
|
23586 | function MiradorMenuButton_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = MiradorMenuButton_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
23587 |
|
23588 | function MiradorMenuButton_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
23589 |
|
23590 |
|
23591 |
|
23592 |
|
23593 |
|
23594 |
|
23595 |
|
23596 |
|
23597 |
|
23598 |
|
23599 |
|
23600 |
|
23601 | function MiradorMenuButton(props) {
|
23602 | var ariaLabel = props['aria-label'];
|
23603 |
|
23604 | var badge = props.badge,
|
23605 | children = props.children,
|
23606 | containerId = props.containerId,
|
23607 | dispatch = props.dispatch,
|
23608 | BadgeProps = props.BadgeProps,
|
23609 | TooltipProps = props.TooltipProps,
|
23610 | iconButtonProps = MiradorMenuButton_objectWithoutProperties(props, ["badge", "children", "containerId", "dispatch", "BadgeProps", "TooltipProps"]);
|
23611 |
|
23612 | var button = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(esm_IconButton_IconButton, iconButtonProps, badge ? external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(esm_Badge_Badge, BadgeProps, children) : children);
|
23613 | if (iconButtonProps.disabled) return button;
|
23614 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(esm_Tooltip_Tooltip, Object.assign({
|
23615 | PopperProps: {
|
23616 | container: document.querySelector("#".concat(containerId, " .").concat(css_ns('viewer')))
|
23617 | },
|
23618 | title: ariaLabel
|
23619 | }, TooltipProps), button);
|
23620 | }
|
23621 | MiradorMenuButton.defaultProps = {
|
23622 | badge: false,
|
23623 | BadgeProps: {},
|
23624 | dispatch: function dispatch() {},
|
23625 | TooltipProps: {}
|
23626 | };
|
23627 |
|
23628 | function ownerDocument(node) {
|
23629 | return node && node.ownerDocument || document;
|
23630 | }
|
23631 |
|
23632 |
|
23633 |
|
23634 |
|
23635 |
|
23636 |
|
23637 | var ValueLabel_styles = function styles(theme) {
|
23638 | return {
|
23639 | thumb: {
|
23640 | '&$open': {
|
23641 | '& $offset': {
|
23642 | transform: 'scale(1) translateY(-10px)'
|
23643 | }
|
23644 | }
|
23645 | },
|
23646 | open: {},
|
23647 | offset: Object(esm_extends["a" ])({
|
23648 | zIndex: 1
|
23649 | }, theme.typography.body2, {
|
23650 | fontSize: theme.typography.pxToRem(12),
|
23651 | lineHeight: 1.2,
|
23652 | transition: theme.transitions.create(['transform'], {
|
23653 | duration: theme.transitions.duration.shortest
|
23654 | }),
|
23655 | top: -34,
|
23656 | transformOrigin: 'bottom center',
|
23657 | transform: 'scale(0)',
|
23658 | position: 'absolute'
|
23659 | }),
|
23660 | circle: {
|
23661 | display: 'flex',
|
23662 | alignItems: 'center',
|
23663 | justifyContent: 'center',
|
23664 | width: 32,
|
23665 | height: 32,
|
23666 | borderRadius: '50% 50% 50% 0',
|
23667 | backgroundColor: 'currentColor',
|
23668 | transform: 'rotate(-45deg)'
|
23669 | },
|
23670 | label: {
|
23671 | color: theme.palette.primary.contrastText,
|
23672 | transform: 'rotate(45deg)'
|
23673 | }
|
23674 | };
|
23675 | };
|
23676 |
|
23677 |
|
23678 |
|
23679 |
|
23680 |
|
23681 | function ValueLabel(props) {
|
23682 | var children = props.children,
|
23683 | classes = props.classes,
|
23684 | className = props.className,
|
23685 | open = props.open,
|
23686 | value = props.value,
|
23687 | valueLabelDisplay = props.valueLabelDisplay;
|
23688 |
|
23689 | if (valueLabelDisplay === 'off') {
|
23690 | return children;
|
23691 | }
|
23692 |
|
23693 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["cloneElement"](children, {
|
23694 | className: Object(clsx_m["a" ])(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb)
|
23695 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
23696 | className: Object(clsx_m["a" ])(classes.offset, className)
|
23697 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
23698 | className: classes.circle
|
23699 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
23700 | className: classes.label
|
23701 | }, value))));
|
23702 | }
|
23703 |
|
23704 | var Slider_ValueLabel = (Object(withStyles["a" ])(ValueLabel_styles, {
|
23705 | name: 'PrivateValueLabel'
|
23706 | })(ValueLabel));
|
23707 |
|
23708 |
|
23709 |
|
23710 |
|
23711 |
|
23712 |
|
23713 |
|
23714 |
|
23715 |
|
23716 |
|
23717 |
|
23718 |
|
23719 |
|
23720 |
|
23721 |
|
23722 |
|
23723 |
|
23724 |
|
23725 |
|
23726 |
|
23727 | function asc(a, b) {
|
23728 | return a - b;
|
23729 | }
|
23730 |
|
23731 | function clamp(value, min, max) {
|
23732 | return Math.min(Math.max(min, value), max);
|
23733 | }
|
23734 |
|
23735 | function findClosest(values, currentValue) {
|
23736 | var _values$reduce = values.reduce(function (acc, value, index) {
|
23737 | var distance = Math.abs(currentValue - value);
|
23738 |
|
23739 | if (acc === null || distance < acc.distance || distance === acc.distance) {
|
23740 | return {
|
23741 | distance: distance,
|
23742 | index: index
|
23743 | };
|
23744 | }
|
23745 |
|
23746 | return acc;
|
23747 | }, null),
|
23748 | closestIndex = _values$reduce.index;
|
23749 |
|
23750 | return closestIndex;
|
23751 | }
|
23752 |
|
23753 | function trackFinger(event, touchId) {
|
23754 | if (touchId.current !== undefined && event.changedTouches) {
|
23755 | for (var i = 0; i < event.changedTouches.length; i += 1) {
|
23756 | var touch = event.changedTouches[i];
|
23757 |
|
23758 | if (touch.identifier === touchId.current) {
|
23759 | return {
|
23760 | x: touch.clientX,
|
23761 | y: touch.clientY
|
23762 | };
|
23763 | }
|
23764 | }
|
23765 |
|
23766 | return false;
|
23767 | }
|
23768 |
|
23769 | return {
|
23770 | x: event.clientX,
|
23771 | y: event.clientY
|
23772 | };
|
23773 | }
|
23774 |
|
23775 | function valueToPercent(value, min, max) {
|
23776 | return (value - min) * 100 / (max - min);
|
23777 | }
|
23778 |
|
23779 | function percentToValue(percent, min, max) {
|
23780 | return (max - min) * percent + min;
|
23781 | }
|
23782 |
|
23783 | function getDecimalPrecision(num) {
|
23784 |
|
23785 |
|
23786 | if (Math.abs(num) < 1) {
|
23787 | var parts = num.toExponential().split('e-');
|
23788 | var matissaDecimalPart = parts[0].split('.')[1];
|
23789 | return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);
|
23790 | }
|
23791 |
|
23792 | var decimalPart = num.toString().split('.')[1];
|
23793 | return decimalPart ? decimalPart.length : 0;
|
23794 | }
|
23795 |
|
23796 | function roundValueToStep(value, step, min) {
|
23797 | var nearest = Math.round((value - min) / step) * step + min;
|
23798 | return Number(nearest.toFixed(getDecimalPrecision(step)));
|
23799 | }
|
23800 |
|
23801 | function setValueIndex(_ref) {
|
23802 | var values = _ref.values,
|
23803 | source = _ref.source,
|
23804 | newValue = _ref.newValue,
|
23805 | index = _ref.index;
|
23806 |
|
23807 |
|
23808 | if (values[index] === newValue) {
|
23809 | return source;
|
23810 | }
|
23811 |
|
23812 | var output = values.slice();
|
23813 | output[index] = newValue;
|
23814 | return output;
|
23815 | }
|
23816 |
|
23817 | function focusThumb(_ref2) {
|
23818 | var sliderRef = _ref2.sliderRef,
|
23819 | activeIndex = _ref2.activeIndex,
|
23820 | setActive = _ref2.setActive;
|
23821 |
|
23822 | if (!sliderRef.current.contains(document.activeElement) || Number(document.activeElement.getAttribute('data-index')) !== activeIndex) {
|
23823 | sliderRef.current.querySelector("[role=\"slider\"][data-index=\"".concat(activeIndex, "\"]")).focus();
|
23824 | }
|
23825 |
|
23826 | if (setActive) {
|
23827 | setActive(activeIndex);
|
23828 | }
|
23829 | }
|
23830 |
|
23831 | var axisProps = {
|
23832 | horizontal: {
|
23833 | offset: function offset(percent) {
|
23834 | return {
|
23835 | left: "".concat(percent, "%")
|
23836 | };
|
23837 | },
|
23838 | leap: function leap(percent) {
|
23839 | return {
|
23840 | width: "".concat(percent, "%")
|
23841 | };
|
23842 | }
|
23843 | },
|
23844 | 'horizontal-reverse': {
|
23845 | offset: function offset(percent) {
|
23846 | return {
|
23847 | right: "".concat(percent, "%")
|
23848 | };
|
23849 | },
|
23850 | leap: function leap(percent) {
|
23851 | return {
|
23852 | width: "".concat(percent, "%")
|
23853 | };
|
23854 | }
|
23855 | },
|
23856 | vertical: {
|
23857 | offset: function offset(percent) {
|
23858 | return {
|
23859 | bottom: "".concat(percent, "%")
|
23860 | };
|
23861 | },
|
23862 | leap: function leap(percent) {
|
23863 | return {
|
23864 | height: "".concat(percent, "%")
|
23865 | };
|
23866 | }
|
23867 | }
|
23868 | };
|
23869 |
|
23870 | var Identity = function Identity(x) {
|
23871 | return x;
|
23872 | };
|
23873 |
|
23874 | var Slider_styles = function styles(theme) {
|
23875 | return {
|
23876 |
|
23877 | root: {
|
23878 | height: 2,
|
23879 | width: '100%',
|
23880 | boxSizing: 'content-box',
|
23881 | padding: '13px 0',
|
23882 | display: 'inline-block',
|
23883 | position: 'relative',
|
23884 | cursor: 'pointer',
|
23885 | touchAction: 'none',
|
23886 | color: theme.palette.primary.main,
|
23887 | WebkitTapHighlightColor: 'transparent',
|
23888 | '&$disabled': {
|
23889 | pointerEvents: 'none',
|
23890 | cursor: 'default',
|
23891 | color: theme.palette.grey[400]
|
23892 | },
|
23893 | '&$vertical': {
|
23894 | width: 2,
|
23895 | height: '100%',
|
23896 | padding: '0 13px'
|
23897 | },
|
23898 |
|
23899 | '@media (pointer: coarse)': {
|
23900 |
|
23901 | padding: '20px 0',
|
23902 | '&$vertical': {
|
23903 | padding: '0 20px'
|
23904 | }
|
23905 | },
|
23906 | '@media print': {
|
23907 | colorAdjust: 'exact'
|
23908 | }
|
23909 | },
|
23910 |
|
23911 |
|
23912 | colorPrimary: {
|
23913 | },
|
23914 |
|
23915 |
|
23916 | colorSecondary: {
|
23917 | color: theme.palette.secondary.main
|
23918 | },
|
23919 |
|
23920 |
|
23921 | marked: {
|
23922 | marginBottom: 20,
|
23923 | '&$vertical': {
|
23924 | marginBottom: 'auto',
|
23925 | marginRight: 20
|
23926 | }
|
23927 | },
|
23928 |
|
23929 |
|
23930 | vertical: {},
|
23931 |
|
23932 |
|
23933 | disabled: {},
|
23934 |
|
23935 |
|
23936 | rail: {
|
23937 | display: 'block',
|
23938 | position: 'absolute',
|
23939 | width: '100%',
|
23940 | height: 2,
|
23941 | borderRadius: 1,
|
23942 | backgroundColor: 'currentColor',
|
23943 | opacity: 0.38,
|
23944 | '$vertical &': {
|
23945 | height: '100%',
|
23946 | width: 2
|
23947 | }
|
23948 | },
|
23949 |
|
23950 |
|
23951 | track: {
|
23952 | display: 'block',
|
23953 | position: 'absolute',
|
23954 | height: 2,
|
23955 | borderRadius: 1,
|
23956 | backgroundColor: 'currentColor',
|
23957 | '$vertical &': {
|
23958 | width: 2
|
23959 | }
|
23960 | },
|
23961 |
|
23962 |
|
23963 | trackFalse: {
|
23964 | '& $track': {
|
23965 | display: 'none'
|
23966 | }
|
23967 | },
|
23968 |
|
23969 |
|
23970 | trackInverted: {
|
23971 | '& $track': {
|
23972 | backgroundColor:
|
23973 | theme.palette.type === 'light' ? Object(colorManipulator["d" ])(theme.palette.primary.main, 0.62) : Object(colorManipulator["a" ])(theme.palette.primary.main, 0.5)
|
23974 | },
|
23975 | '& $rail': {
|
23976 | opacity: 1
|
23977 | }
|
23978 | },
|
23979 |
|
23980 |
|
23981 | thumb: {
|
23982 | position: 'absolute',
|
23983 | width: 12,
|
23984 | height: 12,
|
23985 | marginLeft: -6,
|
23986 | marginTop: -5,
|
23987 | boxSizing: 'border-box',
|
23988 | borderRadius: '50%',
|
23989 | outline: 0,
|
23990 | backgroundColor: 'currentColor',
|
23991 | display: 'flex',
|
23992 | alignItems: 'center',
|
23993 | justifyContent: 'center',
|
23994 | transition: theme.transitions.create(['box-shadow'], {
|
23995 | duration: theme.transitions.duration.shortest
|
23996 | }),
|
23997 | '&::after': {
|
23998 | position: 'absolute',
|
23999 | content: '""',
|
24000 | borderRadius: '50%',
|
24001 |
|
24002 | left: -15,
|
24003 | top: -15,
|
24004 | right: -15,
|
24005 | bottom: -15
|
24006 | },
|
24007 | '&$focusVisible,&:hover': {
|
24008 | boxShadow: "0px 0px 0px 8px ".concat(Object(colorManipulator["b" ])(theme.palette.primary.main, 0.16)),
|
24009 | '@media (hover: none)': {
|
24010 | boxShadow: 'none'
|
24011 | }
|
24012 | },
|
24013 | '&$active': {
|
24014 | boxShadow: "0px 0px 0px 14px ".concat(Object(colorManipulator["b" ])(theme.palette.primary.main, 0.16))
|
24015 | },
|
24016 | '&$disabled': {
|
24017 | width: 8,
|
24018 | height: 8,
|
24019 | marginLeft: -4,
|
24020 | marginTop: -3,
|
24021 | '&:hover': {
|
24022 | boxShadow: 'none'
|
24023 | }
|
24024 | },
|
24025 | '$vertical &': {
|
24026 | marginLeft: -5,
|
24027 | marginBottom: -6
|
24028 | },
|
24029 | '$vertical &$disabled': {
|
24030 | marginLeft: -3,
|
24031 | marginBottom: -4
|
24032 | }
|
24033 | },
|
24034 |
|
24035 |
|
24036 | thumbColorPrimary: {
|
24037 | },
|
24038 |
|
24039 |
|
24040 | thumbColorSecondary: {
|
24041 | '&$focusVisible,&:hover': {
|
24042 | boxShadow: "0px 0px 0px 8px ".concat(Object(colorManipulator["b" ])(theme.palette.secondary.main, 0.16))
|
24043 | },
|
24044 | '&$active': {
|
24045 | boxShadow: "0px 0px 0px 14px ".concat(Object(colorManipulator["b" ])(theme.palette.secondary.main, 0.16))
|
24046 | }
|
24047 | },
|
24048 |
|
24049 |
|
24050 | active: {},
|
24051 |
|
24052 |
|
24053 | focusVisible: {},
|
24054 |
|
24055 |
|
24056 | valueLabel: {
|
24057 |
|
24058 | left: 'calc(-50% - 4px)'
|
24059 | },
|
24060 |
|
24061 |
|
24062 | mark: {
|
24063 | position: 'absolute',
|
24064 | width: 2,
|
24065 | height: 2,
|
24066 | borderRadius: 1,
|
24067 | backgroundColor: 'currentColor'
|
24068 | },
|
24069 |
|
24070 |
|
24071 | markActive: {
|
24072 | backgroundColor: theme.palette.background.paper,
|
24073 | opacity: 0.8
|
24074 | },
|
24075 |
|
24076 |
|
24077 | markLabel: Object(esm_extends["a" ])({}, theme.typography.body2, {
|
24078 | color: theme.palette.text.secondary,
|
24079 | position: 'absolute',
|
24080 | top: 26,
|
24081 | transform: 'translateX(-50%)',
|
24082 | whiteSpace: 'nowrap',
|
24083 | '$vertical &': {
|
24084 | top: 'auto',
|
24085 | left: 26,
|
24086 | transform: 'translateY(50%)'
|
24087 | },
|
24088 | '@media (pointer: coarse)': {
|
24089 | top: 40,
|
24090 | '$vertical &': {
|
24091 | left: 31
|
24092 | }
|
24093 | }
|
24094 | }),
|
24095 |
|
24096 |
|
24097 | markLabelActive: {
|
24098 | color: theme.palette.text.primary
|
24099 | }
|
24100 | };
|
24101 | };
|
24102 | var Slider_Slider = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function Slider(props, ref) {
|
24103 | var ariaLabel = props['aria-label'],
|
24104 | ariaLabelledby = props['aria-labelledby'],
|
24105 | ariaValuetext = props['aria-valuetext'],
|
24106 | classes = props.classes,
|
24107 | className = props.className,
|
24108 | _props$color = props.color,
|
24109 | color = _props$color === void 0 ? 'primary' : _props$color,
|
24110 | _props$component = props.component,
|
24111 | Component = _props$component === void 0 ? 'span' : _props$component,
|
24112 | defaultValue = props.defaultValue,
|
24113 | _props$disabled = props.disabled,
|
24114 | disabled = _props$disabled === void 0 ? false : _props$disabled,
|
24115 | getAriaLabel = props.getAriaLabel,
|
24116 | getAriaValueText = props.getAriaValueText,
|
24117 | _props$marks = props.marks,
|
24118 | marksProp = _props$marks === void 0 ? false : _props$marks,
|
24119 | _props$max = props.max,
|
24120 | max = _props$max === void 0 ? 100 : _props$max,
|
24121 | _props$min = props.min,
|
24122 | min = _props$min === void 0 ? 0 : _props$min,
|
24123 | name = props.name,
|
24124 | onChange = props.onChange,
|
24125 | onChangeCommitted = props.onChangeCommitted,
|
24126 | onMouseDown = props.onMouseDown,
|
24127 | _props$orientation = props.orientation,
|
24128 | orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,
|
24129 | _props$scale = props.scale,
|
24130 | scale = _props$scale === void 0 ? Identity : _props$scale,
|
24131 | _props$step = props.step,
|
24132 | step = _props$step === void 0 ? 1 : _props$step,
|
24133 | _props$ThumbComponent = props.ThumbComponent,
|
24134 | ThumbComponent = _props$ThumbComponent === void 0 ? 'span' : _props$ThumbComponent,
|
24135 | _props$track = props.track,
|
24136 | track = _props$track === void 0 ? 'normal' : _props$track,
|
24137 | valueProp = props.value,
|
24138 | _props$ValueLabelComp = props.ValueLabelComponent,
|
24139 | ValueLabelComponent = _props$ValueLabelComp === void 0 ? Slider_ValueLabel : _props$ValueLabelComp,
|
24140 | _props$valueLabelDisp = props.valueLabelDisplay,
|
24141 | valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp,
|
24142 | _props$valueLabelForm = props.valueLabelFormat,
|
24143 | valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm,
|
24144 | other = Object(objectWithoutProperties["a" ])(props, ["aria-label", "aria-labelledby", "aria-valuetext", "classes", "className", "color", "component", "defaultValue", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "ThumbComponent", "track", "value", "ValueLabelComponent", "valueLabelDisplay", "valueLabelFormat"]);
|
24145 |
|
24146 | var theme = useTheme_useTheme();
|
24147 | var touchId = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
24148 |
|
24149 |
|
24150 |
|
24151 | var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](-1),
|
24152 | active = _React$useState[0],
|
24153 | setActive = _React$useState[1];
|
24154 |
|
24155 | var _React$useState2 = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](-1),
|
24156 | open = _React$useState2[0],
|
24157 | setOpen = _React$useState2[1];
|
24158 |
|
24159 | var _useControlled = useControlled({
|
24160 | controlled: valueProp,
|
24161 | default: defaultValue,
|
24162 | name: 'Slider'
|
24163 | }),
|
24164 | _useControlled2 = Object(slicedToArray["a" ])(_useControlled, 2),
|
24165 | valueDerived = _useControlled2[0],
|
24166 | setValueState = _useControlled2[1];
|
24167 |
|
24168 | var range = Array.isArray(valueDerived);
|
24169 | var values = range ? valueDerived.slice().sort(asc) : [valueDerived];
|
24170 | values = values.map(function (value) {
|
24171 | return clamp(value, min, max);
|
24172 | });
|
24173 | var marks = marksProp === true && step !== null ? Object(toConsumableArray["a" ])(Array(Math.floor((max - min) / step) + 1)).map(function (_, index) {
|
24174 | return {
|
24175 | value: min + step * index
|
24176 | };
|
24177 | }) : marksProp || [];
|
24178 |
|
24179 | var _useIsFocusVisible = useIsFocusVisible(),
|
24180 | isFocusVisible = _useIsFocusVisible.isFocusVisible,
|
24181 | onBlurVisible = _useIsFocusVisible.onBlurVisible,
|
24182 | focusVisibleRef = _useIsFocusVisible.ref;
|
24183 |
|
24184 | var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_["useState"](-1),
|
24185 | focusVisible = _React$useState3[0],
|
24186 | setFocusVisible = _React$useState3[1];
|
24187 |
|
24188 | var sliderRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
24189 | var handleFocusRef = useForkRef(focusVisibleRef, sliderRef);
|
24190 | var handleRef = useForkRef(ref, handleFocusRef);
|
24191 | var handleFocus = useEventCallback(function (event) {
|
24192 | var index = Number(event.currentTarget.getAttribute('data-index'));
|
24193 |
|
24194 | if (isFocusVisible(event)) {
|
24195 | setFocusVisible(index);
|
24196 | }
|
24197 |
|
24198 | setOpen(index);
|
24199 | });
|
24200 | var handleBlur = useEventCallback(function () {
|
24201 | if (focusVisible !== -1) {
|
24202 | setFocusVisible(-1);
|
24203 | onBlurVisible();
|
24204 | }
|
24205 |
|
24206 | setOpen(-1);
|
24207 | });
|
24208 | var handleMouseOver = useEventCallback(function (event) {
|
24209 | var index = Number(event.currentTarget.getAttribute('data-index'));
|
24210 | setOpen(index);
|
24211 | });
|
24212 | var handleMouseLeave = useEventCallback(function () {
|
24213 | setOpen(-1);
|
24214 | });
|
24215 | var isRtl = theme.direction === 'rtl';
|
24216 | var handleKeyDown = useEventCallback(function (event) {
|
24217 | var index = Number(event.currentTarget.getAttribute('data-index'));
|
24218 | var value = values[index];
|
24219 | var tenPercents = (max - min) / 10;
|
24220 | var marksValues = marks.map(function (mark) {
|
24221 | return mark.value;
|
24222 | });
|
24223 | var marksIndex = marksValues.indexOf(value);
|
24224 | var newValue;
|
24225 | var increaseKey = isRtl ? 'ArrowLeft' : 'ArrowRight';
|
24226 | var decreaseKey = isRtl ? 'ArrowRight' : 'ArrowLeft';
|
24227 |
|
24228 | switch (event.key) {
|
24229 | case 'Home':
|
24230 | newValue = min;
|
24231 | break;
|
24232 |
|
24233 | case 'End':
|
24234 | newValue = max;
|
24235 | break;
|
24236 |
|
24237 | case 'PageUp':
|
24238 | if (step) {
|
24239 | newValue = value + tenPercents;
|
24240 | }
|
24241 |
|
24242 | break;
|
24243 |
|
24244 | case 'PageDown':
|
24245 | if (step) {
|
24246 | newValue = value - tenPercents;
|
24247 | }
|
24248 |
|
24249 | break;
|
24250 |
|
24251 | case increaseKey:
|
24252 | case 'ArrowUp':
|
24253 | if (step) {
|
24254 | newValue = value + step;
|
24255 | } else {
|
24256 | newValue = marksValues[marksIndex + 1] || marksValues[marksValues.length - 1];
|
24257 | }
|
24258 |
|
24259 | break;
|
24260 |
|
24261 | case decreaseKey:
|
24262 | case 'ArrowDown':
|
24263 | if (step) {
|
24264 | newValue = value - step;
|
24265 | } else {
|
24266 | newValue = marksValues[marksIndex - 1] || marksValues[0];
|
24267 | }
|
24268 |
|
24269 | break;
|
24270 |
|
24271 | default:
|
24272 | return;
|
24273 | }
|
24274 |
|
24275 |
|
24276 | event.preventDefault();
|
24277 |
|
24278 | if (step) {
|
24279 | newValue = roundValueToStep(newValue, step, min);
|
24280 | }
|
24281 |
|
24282 | newValue = clamp(newValue, min, max);
|
24283 |
|
24284 | if (range) {
|
24285 | var previousValue = newValue;
|
24286 | newValue = setValueIndex({
|
24287 | values: values,
|
24288 | source: valueDerived,
|
24289 | newValue: newValue,
|
24290 | index: index
|
24291 | }).sort(asc);
|
24292 | focusThumb({
|
24293 | sliderRef: sliderRef,
|
24294 | activeIndex: newValue.indexOf(previousValue)
|
24295 | });
|
24296 | }
|
24297 |
|
24298 | setValueState(newValue);
|
24299 | setFocusVisible(index);
|
24300 |
|
24301 | if (onChange) {
|
24302 | onChange(event, newValue);
|
24303 | }
|
24304 |
|
24305 | if (onChangeCommitted) {
|
24306 | onChangeCommitted(event, newValue);
|
24307 | }
|
24308 | });
|
24309 | var previousIndex = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"]();
|
24310 | var axis = orientation;
|
24311 |
|
24312 | if (isRtl && orientation !== "vertical") {
|
24313 | axis += '-reverse';
|
24314 | }
|
24315 |
|
24316 | var getFingerNewValue = function getFingerNewValue(_ref3) {
|
24317 | var finger = _ref3.finger,
|
24318 | _ref3$move = _ref3.move,
|
24319 | move = _ref3$move === void 0 ? false : _ref3$move,
|
24320 | values2 = _ref3.values,
|
24321 | source = _ref3.source;
|
24322 | var slider = sliderRef.current;
|
24323 |
|
24324 | var _slider$getBoundingCl = slider.getBoundingClientRect(),
|
24325 | width = _slider$getBoundingCl.width,
|
24326 | height = _slider$getBoundingCl.height,
|
24327 | bottom = _slider$getBoundingCl.bottom,
|
24328 | left = _slider$getBoundingCl.left;
|
24329 |
|
24330 | var percent;
|
24331 |
|
24332 | if (axis.indexOf('vertical') === 0) {
|
24333 | percent = (bottom - finger.y) / height;
|
24334 | } else {
|
24335 | percent = (finger.x - left) / width;
|
24336 | }
|
24337 |
|
24338 | if (axis.indexOf('-reverse') !== -1) {
|
24339 | percent = 1 - percent;
|
24340 | }
|
24341 |
|
24342 | var newValue;
|
24343 | newValue = percentToValue(percent, min, max);
|
24344 |
|
24345 | if (step) {
|
24346 | newValue = roundValueToStep(newValue, step, min);
|
24347 | } else {
|
24348 | var marksValues = marks.map(function (mark) {
|
24349 | return mark.value;
|
24350 | });
|
24351 | var closestIndex = findClosest(marksValues, newValue);
|
24352 | newValue = marksValues[closestIndex];
|
24353 | }
|
24354 |
|
24355 | newValue = clamp(newValue, min, max);
|
24356 | var activeIndex = 0;
|
24357 |
|
24358 | if (range) {
|
24359 | if (!move) {
|
24360 | activeIndex = findClosest(values2, newValue);
|
24361 | } else {
|
24362 | activeIndex = previousIndex.current;
|
24363 | }
|
24364 |
|
24365 | var previousValue = newValue;
|
24366 | newValue = setValueIndex({
|
24367 | values: values2,
|
24368 | source: source,
|
24369 | newValue: newValue,
|
24370 | index: activeIndex
|
24371 | }).sort(asc);
|
24372 | activeIndex = newValue.indexOf(previousValue);
|
24373 | previousIndex.current = activeIndex;
|
24374 | }
|
24375 |
|
24376 | return {
|
24377 | newValue: newValue,
|
24378 | activeIndex: activeIndex
|
24379 | };
|
24380 | };
|
24381 |
|
24382 | var handleTouchMove = useEventCallback(function (event) {
|
24383 | var finger = trackFinger(event, touchId);
|
24384 |
|
24385 | if (!finger) {
|
24386 | return;
|
24387 | }
|
24388 |
|
24389 | var _getFingerNewValue = getFingerNewValue({
|
24390 | finger: finger,
|
24391 | move: true,
|
24392 | values: values,
|
24393 | source: valueDerived
|
24394 | }),
|
24395 | newValue = _getFingerNewValue.newValue,
|
24396 | activeIndex = _getFingerNewValue.activeIndex;
|
24397 |
|
24398 | focusThumb({
|
24399 | sliderRef: sliderRef,
|
24400 | activeIndex: activeIndex,
|
24401 | setActive: setActive
|
24402 | });
|
24403 | setValueState(newValue);
|
24404 |
|
24405 | if (onChange) {
|
24406 | onChange(event, newValue);
|
24407 | }
|
24408 | });
|
24409 | var handleTouchEnd = useEventCallback(function (event) {
|
24410 | var finger = trackFinger(event, touchId);
|
24411 |
|
24412 | if (!finger) {
|
24413 | return;
|
24414 | }
|
24415 |
|
24416 | var _getFingerNewValue2 = getFingerNewValue({
|
24417 | finger: finger,
|
24418 | values: values,
|
24419 | source: valueDerived
|
24420 | }),
|
24421 | newValue = _getFingerNewValue2.newValue;
|
24422 |
|
24423 | setActive(-1);
|
24424 |
|
24425 | if (event.type === 'touchend') {
|
24426 | setOpen(-1);
|
24427 | }
|
24428 |
|
24429 | if (onChangeCommitted) {
|
24430 | onChangeCommitted(event, newValue);
|
24431 | }
|
24432 |
|
24433 | touchId.current = undefined;
|
24434 | var doc = ownerDocument(sliderRef.current);
|
24435 | doc.removeEventListener('mousemove', handleTouchMove);
|
24436 | doc.removeEventListener('mouseup', handleTouchEnd);
|
24437 | doc.removeEventListener('touchmove', handleTouchMove);
|
24438 | doc.removeEventListener('touchend', handleTouchEnd);
|
24439 | });
|
24440 | var handleTouchStart = useEventCallback(function (event) {
|
24441 |
|
24442 | event.preventDefault();
|
24443 | var touch = event.changedTouches[0];
|
24444 |
|
24445 | if (touch != null) {
|
24446 |
|
24447 | touchId.current = touch.identifier;
|
24448 | }
|
24449 |
|
24450 | var finger = trackFinger(event, touchId);
|
24451 |
|
24452 | var _getFingerNewValue3 = getFingerNewValue({
|
24453 | finger: finger,
|
24454 | values: values,
|
24455 | source: valueDerived
|
24456 | }),
|
24457 | newValue = _getFingerNewValue3.newValue,
|
24458 | activeIndex = _getFingerNewValue3.activeIndex;
|
24459 |
|
24460 | focusThumb({
|
24461 | sliderRef: sliderRef,
|
24462 | activeIndex: activeIndex,
|
24463 | setActive: setActive
|
24464 | });
|
24465 | setValueState(newValue);
|
24466 |
|
24467 | if (onChange) {
|
24468 | onChange(event, newValue);
|
24469 | }
|
24470 |
|
24471 | var doc = ownerDocument(sliderRef.current);
|
24472 | doc.addEventListener('touchmove', handleTouchMove);
|
24473 | doc.addEventListener('touchend', handleTouchEnd);
|
24474 | });
|
24475 | external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"](function () {
|
24476 | var slider = sliderRef.current;
|
24477 | slider.addEventListener('touchstart', handleTouchStart);
|
24478 | var doc = ownerDocument(slider);
|
24479 | return function () {
|
24480 | slider.removeEventListener('touchstart', handleTouchStart);
|
24481 | doc.removeEventListener('mousemove', handleTouchMove);
|
24482 | doc.removeEventListener('mouseup', handleTouchEnd);
|
24483 | doc.removeEventListener('touchmove', handleTouchMove);
|
24484 | doc.removeEventListener('touchend', handleTouchEnd);
|
24485 | };
|
24486 | }, [handleTouchEnd, handleTouchMove, handleTouchStart]);
|
24487 | var handleMouseDown = useEventCallback(function (event) {
|
24488 | if (onMouseDown) {
|
24489 | onMouseDown(event);
|
24490 | }
|
24491 |
|
24492 | event.preventDefault();
|
24493 | var finger = trackFinger(event, touchId);
|
24494 |
|
24495 | var _getFingerNewValue4 = getFingerNewValue({
|
24496 | finger: finger,
|
24497 | values: values,
|
24498 | source: valueDerived
|
24499 | }),
|
24500 | newValue = _getFingerNewValue4.newValue,
|
24501 | activeIndex = _getFingerNewValue4.activeIndex;
|
24502 |
|
24503 | focusThumb({
|
24504 | sliderRef: sliderRef,
|
24505 | activeIndex: activeIndex,
|
24506 | setActive: setActive
|
24507 | });
|
24508 | setValueState(newValue);
|
24509 |
|
24510 | if (onChange) {
|
24511 | onChange(event, newValue);
|
24512 | }
|
24513 |
|
24514 | var doc = ownerDocument(sliderRef.current);
|
24515 | doc.addEventListener('mousemove', handleTouchMove);
|
24516 | doc.addEventListener('mouseup', handleTouchEnd);
|
24517 | });
|
24518 | var trackOffset = valueToPercent(range ? values[0] : min, min, max);
|
24519 | var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;
|
24520 |
|
24521 | var trackStyle = Object(esm_extends["a" ])({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));
|
24522 |
|
24523 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](Component, Object(esm_extends["a" ])({
|
24524 | ref: handleRef,
|
24525 | className: Object(clsx_m["a" ])(classes.root, classes["color".concat(Object(capitalize["a" ])(color))], className, disabled && classes.disabled, marks.length > 0 && marks.some(function (mark) {
|
24526 | return mark.label;
|
24527 | }) && classes.marked, track === false && classes.trackFalse, orientation === 'vertical' && classes.vertical, track === 'inverted' && classes.trackInverted),
|
24528 | onMouseDown: handleMouseDown
|
24529 | }, other), external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
24530 | className: classes.rail
|
24531 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
24532 | className: classes.track,
|
24533 | style: trackStyle
|
24534 | }), external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("input", {
|
24535 | value: values.join(','),
|
24536 | name: name,
|
24537 | type: "hidden"
|
24538 | }), marks.map(function (mark, index) {
|
24539 | var percent = valueToPercent(mark.value, min, max);
|
24540 | var style = axisProps[axis].offset(percent);
|
24541 | var markActive;
|
24542 |
|
24543 | if (track === false) {
|
24544 | markActive = values.indexOf(mark.value) !== -1;
|
24545 | } else {
|
24546 | markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);
|
24547 | }
|
24548 |
|
24549 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], {
|
24550 | key: mark.value
|
24551 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
24552 | style: style,
|
24553 | "data-index": index,
|
24554 | className: Object(clsx_m["a" ])(classes.mark, markActive && classes.markActive)
|
24555 | }), mark.label != null ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", {
|
24556 | "aria-hidden": true,
|
24557 | "data-index": index,
|
24558 | style: style,
|
24559 | className: Object(clsx_m["a" ])(classes.markLabel, markActive && classes.markLabelActive)
|
24560 | }, mark.label) : null);
|
24561 | }), values.map(function (value, index) {
|
24562 | var percent = valueToPercent(value, min, max);
|
24563 | var style = axisProps[axis].offset(percent);
|
24564 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](ValueLabelComponent, {
|
24565 | key: index,
|
24566 | valueLabelFormat: valueLabelFormat,
|
24567 | valueLabelDisplay: valueLabelDisplay,
|
24568 | className: classes.valueLabel,
|
24569 | value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,
|
24570 | index: index,
|
24571 | open: open === index || active === index || valueLabelDisplay === 'on',
|
24572 | disabled: disabled
|
24573 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](ThumbComponent, {
|
24574 | className: Object(clsx_m["a" ])(classes.thumb, classes["thumbColor".concat(Object(capitalize["a" ])(color))], active === index && classes.active, disabled && classes.disabled, focusVisible === index && classes.focusVisible),
|
24575 | tabIndex: disabled ? null : 0,
|
24576 | role: "slider",
|
24577 | style: style,
|
24578 | "data-index": index,
|
24579 | "aria-label": getAriaLabel ? getAriaLabel(index) : ariaLabel,
|
24580 | "aria-labelledby": ariaLabelledby,
|
24581 | "aria-orientation": orientation,
|
24582 | "aria-valuemax": scale(max),
|
24583 | "aria-valuemin": scale(min),
|
24584 | "aria-valuenow": scale(value),
|
24585 | "aria-valuetext": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,
|
24586 | onKeyDown: handleKeyDown,
|
24587 | onFocus: handleFocus,
|
24588 | onBlur: handleBlur,
|
24589 | onMouseOver: handleMouseOver,
|
24590 | onMouseLeave: handleMouseLeave
|
24591 | }));
|
24592 | }));
|
24593 | });
|
24594 | false ? undefined : void 0;
|
24595 | var esm_Slider_Slider = (Object(withStyles["a" ])(Slider_styles, {
|
24596 | name: 'MuiSlider'
|
24597 | })(Slider_Slider));
|
24598 |
|
24599 | function ImageTool_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
24600 |
|
24601 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
24602 |
|
24603 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
24604 |
|
24605 |
|
24606 |
|
24607 |
|
24608 |
|
24609 |
|
24610 | var ImageTool_ImageTool = function (_Component) {
|
24611 | _inherits(ImageTool, _Component);
|
24612 |
|
24613 | function ImageTool(props) {
|
24614 | ImageTool_classCallCheck(this, ImageTool);
|
24615 |
|
24616 | var _this = _possibleConstructorReturn(this, _Component.call(this, props));
|
24617 |
|
24618 | _this.state = {
|
24619 | open: props.open
|
24620 | };
|
24621 | _this.handleChange = _this.handleChange.bind(_this);
|
24622 | _this.handleClick = _this.handleClick.bind(_this);
|
24623 | return _this;
|
24624 | }
|
24625 |
|
24626 | ImageTool.prototype.handleClick = function handleClick() {
|
24627 | var _props = this.props,
|
24628 | value = _props.value,
|
24629 | variant = _props.variant;
|
24630 |
|
24631 | switch (variant) {
|
24632 | case 'toggle':
|
24633 | this.handleChange({}, value === 0 ? 100 : 0);
|
24634 | break;
|
24635 | default:
|
24636 | this.setState(function (state) {
|
24637 | return {
|
24638 | open: !state.open
|
24639 | };
|
24640 | });
|
24641 | }
|
24642 | };
|
24643 |
|
24644 | ImageTool.prototype.handleChange = function handleChange(e, val) {
|
24645 | var onChange = this.props.onChange;
|
24646 |
|
24647 | onChange(val);
|
24648 | };
|
24649 |
|
24650 | ImageTool.prototype.render = function render() {
|
24651 | var _props2 = this.props,
|
24652 | children = _props2.children,
|
24653 | label = _props2.label,
|
24654 | max = _props2.max,
|
24655 | min = _props2.min,
|
24656 | value = _props2.value,
|
24657 | type = _props2.type,
|
24658 | variant = _props2.variant,
|
24659 | windowId = _props2.windowId;
|
24660 | var open = this.state.open;
|
24661 |
|
24662 |
|
24663 | var toggled = variant === 'toggle' && value > 0;
|
24664 |
|
24665 | var id = windowId + '-' + type;
|
24666 |
|
24667 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
24668 | 'div',
|
24669 | { style: { display: 'inline-block' } },
|
24670 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
24671 | MiradorMenuButton,
|
24672 | {
|
24673 | id: id + '-label',
|
24674 | 'aria-label': label,
|
24675 | onClick: this.handleClick,
|
24676 | 'aria-expanded': open,
|
24677 | 'aria-controls': id,
|
24678 | style: { backgroundColor: open && 'rgba(0, 0, 0, 0.1)' || toggled && 'rgba(0, 0, 0, 0.25)' }
|
24679 | },
|
24680 | children
|
24681 | ),
|
24682 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
24683 | 'div',
|
24684 | {
|
24685 | id: id,
|
24686 | 'aria-labelledby': id + '-label',
|
24687 | style: {
|
24688 | backgroundColor: 'rgba(255, 255, 255, 0.8)', borderRadius: 25, padding: 8, top: 48, marginTop: 2, position: 'absolute', display: open ? 'block' : 'none', height: '150px', zIndex: 100
|
24689 | }
|
24690 | },
|
24691 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(esm_Slider_Slider, {
|
24692 | orientation: 'vertical',
|
24693 | min: min,
|
24694 | max: max,
|
24695 | value: value,
|
24696 | onChange: this.handleChange
|
24697 | })
|
24698 | )
|
24699 | );
|
24700 | };
|
24701 |
|
24702 | return ImageTool;
|
24703 | }(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]);
|
24704 |
|
24705 |
|
24706 |
|
24707 |
|
24708 | ImageTool_ImageTool.propTypes = {
|
24709 | children: prop_types_default.a.node.isRequired,
|
24710 | label: prop_types_default.a.string.isRequired,
|
24711 | min: prop_types_default.a.number,
|
24712 | max: prop_types_default.a.number,
|
24713 | onChange: prop_types_default.a.func.isRequired,
|
24714 | open: prop_types_default.a.bool,
|
24715 | type: prop_types_default.a.string.isRequired,
|
24716 | value: prop_types_default.a.number.isRequired,
|
24717 | variant: prop_types_default.a.string,
|
24718 | windowId: prop_types_default.a.string.isRequired
|
24719 | };
|
24720 |
|
24721 | ImageTool_ImageTool.defaultProps = {
|
24722 | min: 0,
|
24723 | max: 100,
|
24724 | open: false,
|
24725 | variant: 'slider'
|
24726 | };
|
24727 |
|
24728 | var RotateRight = __webpack_require__(72);
|
24729 | var RotateRight_default = __webpack_require__.n(RotateRight);
|
24730 |
|
24731 |
|
24732 | var RotateLeft = __webpack_require__(71);
|
24733 | var RotateLeft_default = __webpack_require__.n(RotateLeft);
|
24734 |
|
24735 |
|
24736 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
24737 |
|
24738 | function ImageRotation_objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
24739 |
|
24740 | function ImageRotation_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
24741 |
|
24742 | function ImageRotation_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
24743 |
|
24744 | function ImageRotation_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
24745 |
|
24746 |
|
24747 |
|
24748 |
|
24749 |
|
24750 |
|
24751 |
|
24752 | var ImageRotation_ImageRotation = function (_Component) {
|
24753 | ImageRotation_inherits(ImageRotation, _Component);
|
24754 |
|
24755 | function ImageRotation() {
|
24756 | ImageRotation_classCallCheck(this, ImageRotation);
|
24757 |
|
24758 | return ImageRotation_possibleConstructorReturn(this, _Component.apply(this, arguments));
|
24759 | }
|
24760 |
|
24761 | ImageRotation.prototype.render = function render() {
|
24762 | var _props = this.props,
|
24763 | label = _props.label,
|
24764 | variant = _props.variant,
|
24765 | otherProps = ImageRotation_objectWithoutProperties(_props, ['label', 'variant']);
|
24766 |
|
24767 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
24768 | MiradorMenuButton,
|
24769 | _extends({
|
24770 | 'aria-label': label
|
24771 | }, otherProps),
|
24772 | variant === 'left' ? external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(RotateLeft_default.a, null) : external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(RotateRight_default.a, null)
|
24773 | );
|
24774 | };
|
24775 |
|
24776 | return ImageRotation;
|
24777 | }(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]);
|
24778 |
|
24779 |
|
24780 |
|
24781 |
|
24782 | ImageRotation_ImageRotation.propTypes = {
|
24783 | label: prop_types_default.a.string.isRequired,
|
24784 | variant: prop_types_default.a.string.isRequired
|
24785 | };
|
24786 |
|
24787 | var SwapHoriz = __webpack_require__(73);
|
24788 | var SwapHoriz_default = __webpack_require__.n(SwapHoriz);
|
24789 |
|
24790 |
|
24791 | var ImageFlip_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
24792 |
|
24793 | function ImageFlip_objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
24794 |
|
24795 | function ImageFlip_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
24796 |
|
24797 | function ImageFlip_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
24798 |
|
24799 | function ImageFlip_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
24800 |
|
24801 |
|
24802 |
|
24803 |
|
24804 |
|
24805 |
|
24806 | var ImageFlip_ImageFlip = function (_Component) {
|
24807 | ImageFlip_inherits(ImageFlip, _Component);
|
24808 |
|
24809 | function ImageFlip() {
|
24810 | ImageFlip_classCallCheck(this, ImageFlip);
|
24811 |
|
24812 | return ImageFlip_possibleConstructorReturn(this, _Component.apply(this, arguments));
|
24813 | }
|
24814 |
|
24815 | ImageFlip.prototype.render = function render() {
|
24816 | var _props = this.props,
|
24817 | flipped = _props.flipped,
|
24818 | label = _props.label,
|
24819 | otherProps = ImageFlip_objectWithoutProperties(_props, ['flipped', 'label']);
|
24820 |
|
24821 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
24822 | MiradorMenuButton,
|
24823 | ImageFlip_extends({
|
24824 | 'aria-label': label,
|
24825 | style: { backgroundColor: flipped && 'rgba(0, 0, 0, 0.25)' }
|
24826 | }, otherProps),
|
24827 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(SwapHoriz_default.a, { style: { color: flipped && '#fff' } })
|
24828 | );
|
24829 | };
|
24830 |
|
24831 | return ImageFlip;
|
24832 | }(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]);
|
24833 |
|
24834 |
|
24835 |
|
24836 |
|
24837 | ImageFlip_ImageFlip.propTypes = {
|
24838 | flipped: prop_types_default.a.bool.isRequired,
|
24839 | label: prop_types_default.a.string.isRequired
|
24840 | };
|
24841 |
|
24842 | function MiradorImageTools_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
24843 |
|
24844 | function MiradorImageTools_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
24845 |
|
24846 | function MiradorImageTools_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
24847 |
|
24848 |
|
24849 |
|
24850 |
|
24851 |
|
24852 |
|
24853 |
|
24854 |
|
24855 |
|
24856 |
|
24857 |
|
24858 |
|
24859 |
|
24860 |
|
24861 |
|
24862 |
|
24863 | var MiradorImageTools_MiradorImageTools = function (_Component) {
|
24864 | MiradorImageTools_inherits(MiradorImageTools, _Component);
|
24865 |
|
24866 | function MiradorImageTools(props) {
|
24867 | MiradorImageTools_classCallCheck(this, MiradorImageTools);
|
24868 |
|
24869 | var _this = MiradorImageTools_possibleConstructorReturn(this, _Component.call(this, props));
|
24870 |
|
24871 | _this.toggleState = _this.toggleState.bind(_this);
|
24872 | _this.toggleRotate = _this.toggleRotate.bind(_this);
|
24873 | _this.toggleFlip = _this.toggleFlip.bind(_this);
|
24874 | _this.handleChange = _this.handleChange.bind(_this);
|
24875 | _this.handleReset = _this.handleReset.bind(_this);
|
24876 | return _this;
|
24877 | }
|
24878 |
|
24879 | MiradorImageTools.prototype.componentDidMount = function componentDidMount() {
|
24880 | var viewer = this.props.viewer;
|
24881 |
|
24882 | if (viewer) this.applyFilters();
|
24883 | };
|
24884 |
|
24885 | MiradorImageTools.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
|
24886 | var _props = this.props,
|
24887 | viewConfig = _props.viewConfig,
|
24888 | viewer = _props.viewer;
|
24889 |
|
24890 | if (viewer && viewConfig !== prevProps.viewConfig) this.applyFilters();
|
24891 | };
|
24892 |
|
24893 | MiradorImageTools.prototype.applyFilters = function applyFilters() {
|
24894 | var _props2 = this.props,
|
24895 | _props2$viewConfig = _props2.viewConfig,
|
24896 | _props2$viewConfig$br = _props2$viewConfig.brightness,
|
24897 | brightness = _props2$viewConfig$br === undefined ? 100 : _props2$viewConfig$br,
|
24898 | _props2$viewConfig$co = _props2$viewConfig.contrast,
|
24899 | contrast = _props2$viewConfig$co === undefined ? 100 : _props2$viewConfig$co,
|
24900 | _props2$viewConfig$sa = _props2$viewConfig.saturate,
|
24901 | saturate = _props2$viewConfig$sa === undefined ? 100 : _props2$viewConfig$sa,
|
24902 | _props2$viewConfig$gr = _props2$viewConfig.grayscale,
|
24903 | grayscale = _props2$viewConfig$gr === undefined ? 0 : _props2$viewConfig$gr,
|
24904 | _props2$viewConfig$in = _props2$viewConfig.invert,
|
24905 | invert = _props2$viewConfig$in === undefined ? 0 : _props2$viewConfig$in,
|
24906 | canvas = _props2.viewer.canvas;
|
24907 |
|
24908 |
|
24909 | if (!canvas) return;
|
24910 |
|
24911 | var controlledFilters = ['brightness', 'contrast', 'saturate', 'grayscale', 'invert'];
|
24912 |
|
24913 | var currentFilters = canvas.style.filter.split(' ');
|
24914 | var newFilters = currentFilters.filter(function (filter) {
|
24915 | return !controlledFilters.some(function (type) {
|
24916 | return filter.includes(type);
|
24917 | });
|
24918 | });
|
24919 | newFilters.push('brightness(' + brightness + '%)');
|
24920 | newFilters.push('contrast(' + contrast + '%)');
|
24921 | newFilters.push('saturate(' + saturate + '%)');
|
24922 | newFilters.push('grayscale(' + grayscale + '%)');
|
24923 | newFilters.push('invert(' + invert + '%)');
|
24924 | canvas.style.filter = newFilters.join(' ');
|
24925 | };
|
24926 |
|
24927 | MiradorImageTools.prototype.toggleState = function toggleState() {
|
24928 | var _props3 = this.props,
|
24929 | open = _props3.open,
|
24930 | updateWindow = _props3.updateWindow,
|
24931 | windowId = _props3.windowId;
|
24932 |
|
24933 |
|
24934 | updateWindow(windowId, { imageToolsOpen: !open });
|
24935 | };
|
24936 |
|
24937 | MiradorImageTools.prototype.toggleRotate = function toggleRotate(value) {
|
24938 | var _props4 = this.props,
|
24939 | updateViewport = _props4.updateViewport,
|
24940 | _props4$viewConfig = _props4.viewConfig,
|
24941 | _props4$viewConfig$fl = _props4$viewConfig.flip,
|
24942 | flip = _props4$viewConfig$fl === undefined ? false : _props4$viewConfig$fl,
|
24943 | _props4$viewConfig$ro = _props4$viewConfig.rotation,
|
24944 | rotation = _props4$viewConfig$ro === undefined ? 0 : _props4$viewConfig$ro,
|
24945 | windowId = _props4.windowId;
|
24946 |
|
24947 |
|
24948 | var offset = flip ? -1 * value : value;
|
24949 |
|
24950 | updateViewport(windowId, { rotation: (rotation + offset) % 360 });
|
24951 | };
|
24952 |
|
24953 | MiradorImageTools.prototype.toggleFlip = function toggleFlip() {
|
24954 | var _props5 = this.props,
|
24955 | updateViewport = _props5.updateViewport,
|
24956 | _props5$viewConfig$fl = _props5.viewConfig.flip,
|
24957 | flip = _props5$viewConfig$fl === undefined ? false : _props5$viewConfig$fl,
|
24958 | windowId = _props5.windowId;
|
24959 |
|
24960 |
|
24961 | updateViewport(windowId, { flip: !flip });
|
24962 | };
|
24963 |
|
24964 | MiradorImageTools.prototype.handleChange = function handleChange(param) {
|
24965 | var _props6 = this.props,
|
24966 | updateViewport = _props6.updateViewport,
|
24967 | windowId = _props6.windowId;
|
24968 |
|
24969 | return function (value) {
|
24970 | var _updateViewport;
|
24971 |
|
24972 | return updateViewport(windowId, (_updateViewport = {}, _updateViewport[param] = value, _updateViewport));
|
24973 | };
|
24974 | };
|
24975 |
|
24976 | MiradorImageTools.prototype.handleReset = function handleReset() {
|
24977 | var _props7 = this.props,
|
24978 | updateViewport = _props7.updateViewport,
|
24979 | windowId = _props7.windowId;
|
24980 |
|
24981 | var viewConfig = {
|
24982 | rotation: 0,
|
24983 | flip: false,
|
24984 | brightness: 100,
|
24985 | contrast: 100,
|
24986 | saturate: 100,
|
24987 | grayscale: 0,
|
24988 | invert: 0
|
24989 | };
|
24990 |
|
24991 | updateViewport(windowId, viewConfig);
|
24992 | };
|
24993 |
|
24994 | MiradorImageTools.prototype.render = function render() {
|
24995 | var _this2 = this;
|
24996 |
|
24997 | var _props8 = this.props,
|
24998 | enabled = _props8.enabled,
|
24999 | open = _props8.open,
|
25000 | viewer = _props8.viewer,
|
25001 | windowId = _props8.windowId,
|
25002 | _props8$viewConfig = _props8.viewConfig,
|
25003 | _props8$viewConfig$fl = _props8$viewConfig.flip,
|
25004 | flip = _props8$viewConfig$fl === undefined ? false : _props8$viewConfig$fl,
|
25005 | _props8$viewConfig$br = _props8$viewConfig.brightness,
|
25006 | brightness = _props8$viewConfig$br === undefined ? 100 : _props8$viewConfig$br,
|
25007 | _props8$viewConfig$co = _props8$viewConfig.contrast,
|
25008 | contrast = _props8$viewConfig$co === undefined ? 100 : _props8$viewConfig$co,
|
25009 | _props8$viewConfig$sa = _props8$viewConfig.saturate,
|
25010 | saturate = _props8$viewConfig$sa === undefined ? 100 : _props8$viewConfig$sa,
|
25011 | _props8$viewConfig$gr = _props8$viewConfig.grayscale,
|
25012 | grayscale = _props8$viewConfig$gr === undefined ? 0 : _props8$viewConfig$gr,
|
25013 | _props8$viewConfig$in = _props8$viewConfig.invert,
|
25014 | invert = _props8$viewConfig$in === undefined ? 0 : _props8$viewConfig$in;
|
25015 |
|
25016 |
|
25017 | if (!viewer || !enabled) return null;
|
25018 |
|
25019 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25020 | 'div',
|
25021 | { style: {
|
25022 | backgroundColor: 'rgba(255, 255, 255, 0.8)',
|
25023 | borderRadius: 25,
|
25024 | position: 'absolute',
|
25025 | top: 8,
|
25026 | right: 8,
|
25027 | zIndex: 999
|
25028 | }
|
25029 | },
|
25030 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25031 | 'div',
|
25032 | { style: {
|
25033 | border: 0,
|
25034 | borderRight: '1px solid rgba(0, 0, 0, 0.2)',
|
25035 | borderImageSlice: 1,
|
25036 | borderImageSource: 'linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.2) 20% 80%, rgba(0, 0, 0, 0) 80% )',
|
25037 | display: open ? 'inline-block' : 'none'
|
25038 | }
|
25039 | },
|
25040 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ImageRotation_ImageRotation, {
|
25041 | label: 'Rotate right',
|
25042 | onClick: function onClick() {
|
25043 | return _this2.toggleRotate(90);
|
25044 | },
|
25045 | variant: 'right'
|
25046 | }),
|
25047 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ImageRotation_ImageRotation, {
|
25048 | label: 'Rotate left',
|
25049 | onClick: function onClick() {
|
25050 | return _this2.toggleRotate(-90);
|
25051 | },
|
25052 | variant: 'left'
|
25053 | }),
|
25054 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ImageFlip_ImageFlip, {
|
25055 | label: 'Flip',
|
25056 | onClick: this.toggleFlip,
|
25057 | flipped: flip
|
25058 | })
|
25059 | ),
|
25060 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25061 | 'div',
|
25062 | { style: {
|
25063 | border: 0,
|
25064 | borderRight: '1px solid rgba(0, 0, 0, 0.2)',
|
25065 | borderImageSlice: 1,
|
25066 | borderImageSource: 'linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.2) 20% 80%, rgba(0, 0, 0, 0) 80% )',
|
25067 | display: open ? 'inline-block' : 'none'
|
25068 | }
|
25069 | },
|
25070 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25071 | ImageTool_ImageTool,
|
25072 | {
|
25073 | type: 'brightness',
|
25074 | label: 'Brightness',
|
25075 | max: 200,
|
25076 | windowId: windowId,
|
25077 | value: brightness,
|
25078 | onChange: this.handleChange('brightness')
|
25079 | },
|
25080 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Brightness5_default.a, null)
|
25081 | ),
|
25082 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25083 | ImageTool_ImageTool,
|
25084 | {
|
25085 | type: 'contrast',
|
25086 | label: 'Contrast',
|
25087 | max: 200,
|
25088 | windowId: windowId,
|
25089 | value: contrast,
|
25090 | onChange: this.handleChange('contrast')
|
25091 | },
|
25092 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ExposureSharp_default.a, { style: { transform: 'rotate(180deg)' } })
|
25093 | ),
|
25094 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25095 | ImageTool_ImageTool,
|
25096 | {
|
25097 | type: 'saturate',
|
25098 | label: 'Saturation',
|
25099 | max: 200,
|
25100 | windowId: windowId,
|
25101 | value: saturate,
|
25102 | onChange: this.handleChange('saturate')
|
25103 | },
|
25104 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Gradient_default.a, null)
|
25105 | ),
|
25106 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25107 | ImageTool_ImageTool,
|
25108 | {
|
25109 | type: 'grayscale',
|
25110 | variant: 'toggle',
|
25111 | label: 'Greyscale',
|
25112 | windowId: windowId,
|
25113 | value: grayscale,
|
25114 | onChange: this.handleChange('grayscale')
|
25115 | },
|
25116 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(Tonality_default.a, null)
|
25117 | ),
|
25118 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25119 | ImageTool_ImageTool,
|
25120 | {
|
25121 | type: 'invert',
|
25122 | variant: 'toggle',
|
25123 | label: 'Invert Colors',
|
25124 | windowId: windowId,
|
25125 | value: invert,
|
25126 | onChange: this.handleChange('invert')
|
25127 | },
|
25128 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(InvertColors_default.a, null)
|
25129 | )
|
25130 | ),
|
25131 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25132 | 'div',
|
25133 | { style: {
|
25134 | border: 0,
|
25135 | borderRight: '1px solid rgba(0, 0, 0, 0.2)',
|
25136 | borderImageSlice: 1,
|
25137 | borderImageSource: 'linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.2) 20% 80%, rgba(0, 0, 0, 0) 80% )',
|
25138 | display: open ? 'inline-block' : 'none'
|
25139 | }
|
25140 | },
|
25141 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25142 | MiradorMenuButton,
|
25143 | {
|
25144 | 'aria-label': 'Revert image',
|
25145 | onClick: this.handleReset
|
25146 | },
|
25147 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ReplaySharp_default.a, null)
|
25148 | )
|
25149 | ),
|
25150 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25151 | MiradorMenuButton,
|
25152 | {
|
25153 | 'aria-label': open ? 'Collapse image tools' : 'Expand image tools',
|
25154 | onClick: this.toggleState
|
25155 | },
|
25156 | open ? external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(CloseSharp_default.a, null) : external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(TuneSharp_default.a, null)
|
25157 | )
|
25158 | );
|
25159 | };
|
25160 |
|
25161 | return MiradorImageTools;
|
25162 | }(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]);
|
25163 |
|
25164 | MiradorImageTools_MiradorImageTools.propTypes = {
|
25165 | enabled: prop_types_default.a.bool,
|
25166 | open: prop_types_default.a.bool,
|
25167 | updateViewport: prop_types_default.a.func.isRequired,
|
25168 | updateWindow: prop_types_default.a.func.isRequired,
|
25169 | viewer: prop_types_default.a.object,
|
25170 | viewConfig: prop_types_default.a.object,
|
25171 | windowId: prop_types_default.a.string.isRequired
|
25172 | };
|
25173 |
|
25174 | MiradorImageTools_MiradorImageTools.defaultProps = {
|
25175 | enabled: true,
|
25176 | open: true,
|
25177 | viewer: undefined,
|
25178 | viewConfig: {}
|
25179 | };
|
25180 |
|
25181 | var plugins_MiradorImageTools = (MiradorImageTools_MiradorImageTools);
|
25182 |
|
25183 |
|
25184 | function isMuiElement(element, muiNames) {
|
25185 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"](element) && muiNames.indexOf(element.type.muiName) !== -1;
|
25186 | }
|
25187 |
|
25188 |
|
25189 |
|
25190 |
|
25191 |
|
25192 |
|
25193 | var ListContext = external_root_React_commonjs2_react_commonjs_react_amd_react_["createContext"]({});
|
25194 |
|
25195 | if (false) {}
|
25196 |
|
25197 | var List_ListContext = (ListContext);
|
25198 |
|
25199 |
|
25200 |
|
25201 |
|
25202 |
|
25203 |
|
25204 |
|
25205 |
|
25206 |
|
25207 |
|
25208 |
|
25209 |
|
25210 |
|
25211 | var ListItem_styles = function styles(theme) {
|
25212 | return {
|
25213 |
|
25214 | root: {
|
25215 | display: 'flex',
|
25216 | justifyContent: 'flex-start',
|
25217 | alignItems: 'center',
|
25218 | position: 'relative',
|
25219 | textDecoration: 'none',
|
25220 | width: '100%',
|
25221 | boxSizing: 'border-box',
|
25222 | textAlign: 'left',
|
25223 | paddingTop: 8,
|
25224 | paddingBottom: 8,
|
25225 | '&$focusVisible': {
|
25226 | backgroundColor: theme.palette.action.selected
|
25227 | },
|
25228 | '&$selected, &$selected:hover': {
|
25229 | backgroundColor: theme.palette.action.selected
|
25230 | },
|
25231 | '&$disabled': {
|
25232 | opacity: 0.5
|
25233 | }
|
25234 | },
|
25235 |
|
25236 |
|
25237 | container: {
|
25238 | position: 'relative'
|
25239 | },
|
25240 |
|
25241 |
|
25242 | focusVisible: {},
|
25243 |
|
25244 |
|
25245 | dense: {
|
25246 | paddingTop: 4,
|
25247 | paddingBottom: 4
|
25248 | },
|
25249 |
|
25250 |
|
25251 | alignItemsFlexStart: {
|
25252 | alignItems: 'flex-start'
|
25253 | },
|
25254 |
|
25255 |
|
25256 | disabled: {},
|
25257 |
|
25258 |
|
25259 | divider: {
|
25260 | borderBottom: "1px solid ".concat(theme.palette.divider),
|
25261 | backgroundClip: 'padding-box'
|
25262 | },
|
25263 |
|
25264 |
|
25265 | gutters: {
|
25266 | paddingLeft: 16,
|
25267 | paddingRight: 16
|
25268 | },
|
25269 |
|
25270 |
|
25271 | button: {
|
25272 | transition: theme.transitions.create('background-color', {
|
25273 | duration: theme.transitions.duration.shortest
|
25274 | }),
|
25275 | '&:hover': {
|
25276 | textDecoration: 'none',
|
25277 | backgroundColor: theme.palette.action.hover,
|
25278 |
|
25279 | '@media (hover: none)': {
|
25280 | backgroundColor: 'transparent'
|
25281 | }
|
25282 | }
|
25283 | },
|
25284 |
|
25285 |
|
25286 | secondaryAction: {
|
25287 |
|
25288 |
|
25289 | paddingRight: 48
|
25290 | },
|
25291 |
|
25292 |
|
25293 | selected: {}
|
25294 | };
|
25295 | };
|
25296 | var ListItem_useEnhancedEffect = typeof window === 'undefined' ? external_root_React_commonjs2_react_commonjs_react_amd_react_["useEffect"] : external_root_React_commonjs2_react_commonjs_react_amd_react_["useLayoutEffect"];
|
25297 |
|
25298 |
|
25299 |
|
25300 |
|
25301 | var ListItem_ListItem = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function ListItem(props, ref) {
|
25302 | var _props$alignItems = props.alignItems,
|
25303 | alignItems = _props$alignItems === void 0 ? 'center' : _props$alignItems,
|
25304 | _props$autoFocus = props.autoFocus,
|
25305 | autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,
|
25306 | _props$button = props.button,
|
25307 | button = _props$button === void 0 ? false : _props$button,
|
25308 | childrenProp = props.children,
|
25309 | classes = props.classes,
|
25310 | className = props.className,
|
25311 | componentProp = props.component,
|
25312 | _props$ContainerCompo = props.ContainerComponent,
|
25313 | ContainerComponent = _props$ContainerCompo === void 0 ? 'li' : _props$ContainerCompo,
|
25314 | _props$ContainerProps = props.ContainerProps;
|
25315 | _props$ContainerProps = _props$ContainerProps === void 0 ? {} : _props$ContainerProps;
|
25316 |
|
25317 | var ContainerClassName = _props$ContainerProps.className,
|
25318 | ContainerProps = Object(objectWithoutProperties["a" ])(_props$ContainerProps, ["className"]),
|
25319 | _props$dense = props.dense,
|
25320 | dense = _props$dense === void 0 ? false : _props$dense,
|
25321 | _props$disabled = props.disabled,
|
25322 | disabled = _props$disabled === void 0 ? false : _props$disabled,
|
25323 | _props$disableGutters = props.disableGutters,
|
25324 | disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,
|
25325 | _props$divider = props.divider,
|
25326 | divider = _props$divider === void 0 ? false : _props$divider,
|
25327 | focusVisibleClassName = props.focusVisibleClassName,
|
25328 | _props$selected = props.selected,
|
25329 | selected = _props$selected === void 0 ? false : _props$selected,
|
25330 | other = Object(objectWithoutProperties["a" ])(props, ["alignItems", "autoFocus", "button", "children", "classes", "className", "component", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "divider", "focusVisibleClassName", "selected"]);
|
25331 |
|
25332 | var context = external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"](List_ListContext);
|
25333 | var childContext = {
|
25334 | dense: dense || context.dense || false,
|
25335 | alignItems: alignItems
|
25336 | };
|
25337 | var listItemRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useRef"](null);
|
25338 | ListItem_useEnhancedEffect(function () {
|
25339 | if (autoFocus) {
|
25340 | if (listItemRef.current) {
|
25341 | listItemRef.current.focus();
|
25342 | } else if (false) {}
|
25343 | }
|
25344 | }, [autoFocus]);
|
25345 | var children = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(childrenProp);
|
25346 | var hasSecondaryAction = children.length && isMuiElement(children[children.length - 1], ['ListItemSecondaryAction']);
|
25347 | var handleOwnRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["useCallback"](function (instance) {
|
25348 |
|
25349 | listItemRef.current = react_dom["findDOMNode"](instance);
|
25350 | }, []);
|
25351 | var handleRef = useForkRef(handleOwnRef, ref);
|
25352 |
|
25353 | var componentProps = Object(esm_extends["a" ])({
|
25354 | className: Object(clsx_m["a" ])(classes.root, className, childContext.dense && classes.dense, !disableGutters && classes.gutters, divider && classes.divider, disabled && classes.disabled, button && classes.button, alignItems !== "center" && classes.alignItemsFlexStart, hasSecondaryAction && classes.secondaryAction, selected && classes.selected),
|
25355 | disabled: disabled
|
25356 | }, other);
|
25357 |
|
25358 | var Component = componentProp || 'li';
|
25359 |
|
25360 | if (button) {
|
25361 | componentProps.component = componentProp || 'div';
|
25362 | componentProps.focusVisibleClassName = Object(clsx_m["a" ])(classes.focusVisible, focusVisibleClassName);
|
25363 | Component = esm_ButtonBase_ButtonBase;
|
25364 | }
|
25365 |
|
25366 | if (hasSecondaryAction) {
|
25367 |
|
25368 | Component = !componentProps.component && !componentProp ? 'div' : Component;
|
25369 |
|
25370 | if (ContainerComponent === 'li') {
|
25371 | if (Component === 'li') {
|
25372 | Component = 'div';
|
25373 | } else if (componentProps.component === 'li') {
|
25374 | componentProps.component = 'div';
|
25375 | }
|
25376 | }
|
25377 |
|
25378 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](List_ListContext.Provider, {
|
25379 | value: childContext
|
25380 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](ContainerComponent, Object(esm_extends["a" ])({
|
25381 | className: Object(clsx_m["a" ])(classes.container, ContainerClassName),
|
25382 | ref: handleRef
|
25383 | }, ContainerProps), external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](Component, componentProps, children), children.pop()));
|
25384 | }
|
25385 |
|
25386 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](List_ListContext.Provider, {
|
25387 | value: childContext
|
25388 | }, external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](Component, Object(esm_extends["a" ])({
|
25389 | ref: handleRef
|
25390 | }, componentProps), children));
|
25391 | });
|
25392 | false ? undefined : void 0;
|
25393 | var esm_ListItem_ListItem = (Object(withStyles["a" ])(ListItem_styles, {
|
25394 | name: 'MuiListItem'
|
25395 | })(ListItem_ListItem));
|
25396 |
|
25397 |
|
25398 |
|
25399 |
|
25400 |
|
25401 |
|
25402 |
|
25403 |
|
25404 |
|
25405 | var MenuItem_styles = function styles(theme) {
|
25406 | return {
|
25407 |
|
25408 | root: Object(esm_extends["a" ])({}, theme.typography.body1, Object(defineProperty["a" ])({
|
25409 | minHeight: 48,
|
25410 | paddingTop: 6,
|
25411 | paddingBottom: 6,
|
25412 | boxSizing: 'border-box',
|
25413 | width: 'auto',
|
25414 | overflow: 'hidden',
|
25415 | whiteSpace: 'nowrap'
|
25416 | }, theme.breakpoints.up('sm'), {
|
25417 | minHeight: 'auto'
|
25418 | })),
|
25419 |
|
25420 |
|
25421 |
|
25422 | gutters: {},
|
25423 |
|
25424 |
|
25425 | selected: {},
|
25426 |
|
25427 |
|
25428 | dense: Object(esm_extends["a" ])({}, theme.typography.body2, {
|
25429 | minHeight: 'auto'
|
25430 | })
|
25431 | };
|
25432 | };
|
25433 | var MenuItem_MenuItem = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function MenuItem(props, ref) {
|
25434 | var classes = props.classes,
|
25435 | className = props.className,
|
25436 | _props$component = props.component,
|
25437 | component = _props$component === void 0 ? 'li' : _props$component,
|
25438 | _props$disableGutters = props.disableGutters,
|
25439 | disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,
|
25440 | ListItemClasses = props.ListItemClasses,
|
25441 | _props$role = props.role,
|
25442 | role = _props$role === void 0 ? 'menuitem' : _props$role,
|
25443 | selected = props.selected,
|
25444 | tabIndexProp = props.tabIndex,
|
25445 | other = Object(objectWithoutProperties["a" ])(props, ["classes", "className", "component", "disableGutters", "ListItemClasses", "role", "selected", "tabIndex"]);
|
25446 |
|
25447 | var tabIndex;
|
25448 |
|
25449 | if (!props.disabled) {
|
25450 | tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;
|
25451 | }
|
25452 |
|
25453 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](esm_ListItem_ListItem, Object(esm_extends["a" ])({
|
25454 | button: true,
|
25455 | role: role,
|
25456 | tabIndex: tabIndex,
|
25457 | component: component,
|
25458 | selected: selected,
|
25459 | disableGutters: disableGutters,
|
25460 | classes: Object(esm_extends["a" ])({
|
25461 | dense: classes.dense
|
25462 | }, ListItemClasses),
|
25463 | className: Object(clsx_m["a" ])(classes.root, className, selected && classes.selected, !disableGutters && classes.gutters),
|
25464 | ref: ref
|
25465 | }, other));
|
25466 | });
|
25467 | false ? undefined : void 0;
|
25468 | var esm_MenuItem_MenuItem = (Object(withStyles["a" ])(MenuItem_styles, {
|
25469 | name: 'MuiMenuItem'
|
25470 | })(MenuItem_MenuItem));
|
25471 |
|
25472 |
|
25473 |
|
25474 |
|
25475 |
|
25476 |
|
25477 |
|
25478 |
|
25479 | var ListItemIcon_styles = function styles(theme) {
|
25480 | return {
|
25481 |
|
25482 | root: {
|
25483 | minWidth: 56,
|
25484 | color: theme.palette.action.active,
|
25485 | flexShrink: 0,
|
25486 | display: 'inline-flex'
|
25487 | },
|
25488 |
|
25489 |
|
25490 | alignItemsFlexStart: {
|
25491 | marginTop: 8
|
25492 | }
|
25493 | };
|
25494 | };
|
25495 |
|
25496 |
|
25497 |
|
25498 |
|
25499 | var ListItemIcon_ListItemIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function ListItemIcon(props, ref) {
|
25500 | var classes = props.classes,
|
25501 | className = props.className,
|
25502 | other = Object(objectWithoutProperties["a" ])(props, ["classes", "className"]);
|
25503 |
|
25504 | var context = external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"](List_ListContext);
|
25505 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", Object(esm_extends["a" ])({
|
25506 | className: Object(clsx_m["a" ])(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),
|
25507 | ref: ref
|
25508 | }, other));
|
25509 | });
|
25510 | false ? undefined : void 0;
|
25511 | var esm_ListItemIcon_ListItemIcon = (Object(withStyles["a" ])(ListItemIcon_styles, {
|
25512 | name: 'MuiListItemIcon'
|
25513 | })(ListItemIcon_ListItemIcon));
|
25514 |
|
25515 |
|
25516 |
|
25517 |
|
25518 |
|
25519 |
|
25520 |
|
25521 |
|
25522 | var Typography_styles = function styles(theme) {
|
25523 | return {
|
25524 |
|
25525 | root: {
|
25526 | margin: 0
|
25527 | },
|
25528 |
|
25529 |
|
25530 | body2: theme.typography.body2,
|
25531 |
|
25532 |
|
25533 | body1: theme.typography.body1,
|
25534 |
|
25535 |
|
25536 | caption: theme.typography.caption,
|
25537 |
|
25538 |
|
25539 | button: theme.typography.button,
|
25540 |
|
25541 |
|
25542 | h1: theme.typography.h1,
|
25543 |
|
25544 |
|
25545 | h2: theme.typography.h2,
|
25546 |
|
25547 |
|
25548 | h3: theme.typography.h3,
|
25549 |
|
25550 |
|
25551 | h4: theme.typography.h4,
|
25552 |
|
25553 |
|
25554 | h5: theme.typography.h5,
|
25555 |
|
25556 |
|
25557 | h6: theme.typography.h6,
|
25558 |
|
25559 |
|
25560 | subtitle1: theme.typography.subtitle1,
|
25561 |
|
25562 |
|
25563 | subtitle2: theme.typography.subtitle2,
|
25564 |
|
25565 |
|
25566 | overline: theme.typography.overline,
|
25567 |
|
25568 |
|
25569 | srOnly: {
|
25570 | position: 'absolute',
|
25571 | height: 1,
|
25572 | width: 1,
|
25573 | overflow: 'hidden'
|
25574 | },
|
25575 |
|
25576 |
|
25577 | alignLeft: {
|
25578 | textAlign: 'left'
|
25579 | },
|
25580 |
|
25581 |
|
25582 | alignCenter: {
|
25583 | textAlign: 'center'
|
25584 | },
|
25585 |
|
25586 |
|
25587 | alignRight: {
|
25588 | textAlign: 'right'
|
25589 | },
|
25590 |
|
25591 |
|
25592 | alignJustify: {
|
25593 | textAlign: 'justify'
|
25594 | },
|
25595 |
|
25596 |
|
25597 | noWrap: {
|
25598 | overflow: 'hidden',
|
25599 | textOverflow: 'ellipsis',
|
25600 | whiteSpace: 'nowrap'
|
25601 | },
|
25602 |
|
25603 |
|
25604 | gutterBottom: {
|
25605 | marginBottom: '0.35em'
|
25606 | },
|
25607 |
|
25608 |
|
25609 | paragraph: {
|
25610 | marginBottom: 16
|
25611 | },
|
25612 |
|
25613 |
|
25614 | colorInherit: {
|
25615 | color: 'inherit'
|
25616 | },
|
25617 |
|
25618 |
|
25619 | colorPrimary: {
|
25620 | color: theme.palette.primary.main
|
25621 | },
|
25622 |
|
25623 |
|
25624 | colorSecondary: {
|
25625 | color: theme.palette.secondary.main
|
25626 | },
|
25627 |
|
25628 |
|
25629 | colorTextPrimary: {
|
25630 | color: theme.palette.text.primary
|
25631 | },
|
25632 |
|
25633 |
|
25634 | colorTextSecondary: {
|
25635 | color: theme.palette.text.secondary
|
25636 | },
|
25637 |
|
25638 |
|
25639 | colorError: {
|
25640 | color: theme.palette.error.main
|
25641 | },
|
25642 |
|
25643 |
|
25644 | displayInline: {
|
25645 | display: 'inline'
|
25646 | },
|
25647 |
|
25648 |
|
25649 | displayBlock: {
|
25650 | display: 'block'
|
25651 | }
|
25652 | };
|
25653 | };
|
25654 | var defaultVariantMapping = {
|
25655 | h1: 'h1',
|
25656 | h2: 'h2',
|
25657 | h3: 'h3',
|
25658 | h4: 'h4',
|
25659 | h5: 'h5',
|
25660 | h6: 'h6',
|
25661 | subtitle1: 'h6',
|
25662 | subtitle2: 'h6',
|
25663 | body1: 'p',
|
25664 | body2: 'p'
|
25665 | };
|
25666 | var Typography_Typography = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function Typography(props, ref) {
|
25667 | var _props$align = props.align,
|
25668 | align = _props$align === void 0 ? 'inherit' : _props$align,
|
25669 | classes = props.classes,
|
25670 | className = props.className,
|
25671 | _props$color = props.color,
|
25672 | color = _props$color === void 0 ? 'initial' : _props$color,
|
25673 | component = props.component,
|
25674 | _props$display = props.display,
|
25675 | display = _props$display === void 0 ? 'initial' : _props$display,
|
25676 | _props$gutterBottom = props.gutterBottom,
|
25677 | gutterBottom = _props$gutterBottom === void 0 ? false : _props$gutterBottom,
|
25678 | _props$noWrap = props.noWrap,
|
25679 | noWrap = _props$noWrap === void 0 ? false : _props$noWrap,
|
25680 | _props$paragraph = props.paragraph,
|
25681 | paragraph = _props$paragraph === void 0 ? false : _props$paragraph,
|
25682 | _props$variant = props.variant,
|
25683 | variant = _props$variant === void 0 ? 'body1' : _props$variant,
|
25684 | _props$variantMapping = props.variantMapping,
|
25685 | variantMapping = _props$variantMapping === void 0 ? defaultVariantMapping : _props$variantMapping,
|
25686 | other = Object(objectWithoutProperties["a" ])(props, ["align", "classes", "className", "color", "component", "display", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"]);
|
25687 |
|
25688 | var Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';
|
25689 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](Component, Object(esm_extends["a" ])({
|
25690 | className: Object(clsx_m["a" ])(classes.root, className, variant !== 'inherit' && classes[variant], color !== 'initial' && classes["color".concat(Object(capitalize["a" ])(color))], noWrap && classes.noWrap, gutterBottom && classes.gutterBottom, paragraph && classes.paragraph, align !== 'inherit' && classes["align".concat(Object(capitalize["a" ])(align))], display !== 'initial' && classes["display".concat(Object(capitalize["a" ])(display))]),
|
25691 | ref: ref
|
25692 | }, other));
|
25693 | });
|
25694 | false ? undefined : void 0;
|
25695 | var esm_Typography_Typography = (Object(withStyles["a" ])(Typography_styles, {
|
25696 | name: 'MuiTypography'
|
25697 | })(Typography_Typography));
|
25698 |
|
25699 |
|
25700 |
|
25701 |
|
25702 |
|
25703 |
|
25704 |
|
25705 |
|
25706 |
|
25707 | var ListItemText_styles = {
|
25708 |
|
25709 | root: {
|
25710 | flex: '1 1 auto',
|
25711 | minWidth: 0,
|
25712 | marginTop: 4,
|
25713 | marginBottom: 4
|
25714 | },
|
25715 |
|
25716 |
|
25717 | multiline: {
|
25718 | marginTop: 6,
|
25719 | marginBottom: 6
|
25720 | },
|
25721 |
|
25722 |
|
25723 | dense: {},
|
25724 |
|
25725 |
|
25726 | inset: {
|
25727 | paddingLeft: 56
|
25728 | },
|
25729 |
|
25730 |
|
25731 | primary: {},
|
25732 |
|
25733 |
|
25734 | secondary: {}
|
25735 | };
|
25736 | var ListItemText_ListItemText = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function ListItemText(props, ref) {
|
25737 | var children = props.children,
|
25738 | classes = props.classes,
|
25739 | className = props.className,
|
25740 | _props$disableTypogra = props.disableTypography,
|
25741 | disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,
|
25742 | _props$inset = props.inset,
|
25743 | inset = _props$inset === void 0 ? false : _props$inset,
|
25744 | primaryProp = props.primary,
|
25745 | primaryTypographyProps = props.primaryTypographyProps,
|
25746 | secondaryProp = props.secondary,
|
25747 | secondaryTypographyProps = props.secondaryTypographyProps,
|
25748 | other = Object(objectWithoutProperties["a" ])(props, ["children", "classes", "className", "disableTypography", "inset", "primary", "primaryTypographyProps", "secondary", "secondaryTypographyProps"]);
|
25749 |
|
25750 | var _React$useContext = external_root_React_commonjs2_react_commonjs_react_amd_react_["useContext"](List_ListContext),
|
25751 | dense = _React$useContext.dense;
|
25752 |
|
25753 | var primary = primaryProp != null ? primaryProp : children;
|
25754 |
|
25755 | if (primary != null && primary.type !== esm_Typography_Typography && !disableTypography) {
|
25756 | primary = external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](esm_Typography_Typography, Object(esm_extends["a" ])({
|
25757 | variant: dense ? 'body2' : 'body1',
|
25758 | className: classes.primary,
|
25759 | component: "span",
|
25760 | display: "block"
|
25761 | }, primaryTypographyProps), primary);
|
25762 | }
|
25763 |
|
25764 | var secondary = secondaryProp;
|
25765 |
|
25766 | if (secondary != null && secondary.type !== esm_Typography_Typography && !disableTypography) {
|
25767 | secondary = external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](esm_Typography_Typography, Object(esm_extends["a" ])({
|
25768 | variant: "body2",
|
25769 | className: classes.secondary,
|
25770 | color: "textSecondary",
|
25771 | display: "block"
|
25772 | }, secondaryTypographyProps), secondary);
|
25773 | }
|
25774 |
|
25775 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", Object(esm_extends["a" ])({
|
25776 | className: Object(clsx_m["a" ])(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline),
|
25777 | ref: ref
|
25778 | }, other), primary, secondary);
|
25779 | });
|
25780 | false ? undefined : void 0;
|
25781 | var esm_ListItemText_ListItemText = (Object(withStyles["a" ])(ListItemText_styles, {
|
25782 | name: 'MuiListItemText'
|
25783 | })(ListItemText_ListItemText));
|
25784 |
|
25785 |
|
25786 |
|
25787 |
|
25788 |
|
25789 |
|
25790 |
|
25791 |
|
25792 | var MiradorImageToolsMenuItem_MiradorImageToolsMenuItem = function MiradorImageToolsMenuItem(_ref) {
|
25793 | var enabled = _ref.enabled,
|
25794 | handleClose = _ref.handleClose,
|
25795 | updateWindow = _ref.updateWindow,
|
25796 | windowId = _ref.windowId;
|
25797 |
|
25798 | var handleClickOpen = function handleClickOpen() {
|
25799 | handleClose();
|
25800 | updateWindow(windowId, { imageToolsEnabled: !enabled });
|
25801 | };
|
25802 |
|
25803 | return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25804 | esm_MenuItem_MenuItem,
|
25805 | { onClick: handleClickOpen },
|
25806 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25807 | esm_ListItemIcon_ListItemIcon,
|
25808 | null,
|
25809 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(TuneSharp_default.a, null)
|
25810 | ),
|
25811 | external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
25812 | esm_ListItemText_ListItemText,
|
25813 | { primaryTypographyProps: { variant: 'body1' } },
|
25814 | enabled ? 'Hide image tools' : 'Show image tools'
|
25815 | )
|
25816 | );
|
25817 | };
|
25818 |
|
25819 | MiradorImageToolsMenuItem_MiradorImageToolsMenuItem.propTypes = {
|
25820 | enabled: prop_types_default.a.bool,
|
25821 | handleClose: prop_types_default.a.func.isRequired,
|
25822 | updateWindow: prop_types_default.a.func.isRequired,
|
25823 | windowId: prop_types_default.a.string.isRequired
|
25824 | };
|
25825 |
|
25826 | MiradorImageToolsMenuItem_MiradorImageToolsMenuItem.defaultProps = {
|
25827 | enabled: true
|
25828 | };
|
25829 |
|
25830 | var plugins_MiradorImageToolsMenuItem = (MiradorImageToolsMenuItem_MiradorImageToolsMenuItem);
|
25831 |
|
25832 |
|
25833 |
|
25834 |
|
25835 |
|
25836 |
|
25837 | var miradorImageToolsPlugin = ([{
|
25838 | target: 'OpenSeadragonViewer',
|
25839 | mapDispatchToProps: {
|
25840 | updateWindow: window_updateWindow,
|
25841 | updateViewport: updateViewport
|
25842 | },
|
25843 | mapStateToProps: function mapStateToProps(state, _ref) {
|
25844 | var windowId = _ref.windowId;
|
25845 | return {
|
25846 | enabled: getWindowConfig(state, { windowId: windowId }).imageToolsEnabled,
|
25847 | open: getWindowConfig(state, { windowId: windowId }).imageToolsOpen,
|
25848 | viewConfig: getViewer(state, { windowId: windowId }) || {}
|
25849 | };
|
25850 | },
|
25851 | mode: 'add',
|
25852 | component: plugins_MiradorImageTools
|
25853 | }, {
|
25854 | target: 'WindowTopBarPluginMenu',
|
25855 | component: plugins_MiradorImageToolsMenuItem,
|
25856 | mode: 'add',
|
25857 | mapDispatchToProps: {
|
25858 | updateWindow: window_updateWindow
|
25859 | },
|
25860 | mapStateToProps: function mapStateToProps(state, _ref2) {
|
25861 | var windowId = _ref2.windowId;
|
25862 | return {
|
25863 | enabled: getWindowConfig(state, { windowId: windowId }).imageToolsEnabled
|
25864 | };
|
25865 | }
|
25866 | }]);
|
25867 |
|
25868 | __webpack_require__.d(__webpack_exports__, "miradorImageToolsPlugin", function() { return miradorImageToolsPlugin; });
|
25869 |
|
25870 |
|
25871 |
|
25872 | }),
|
25873 |
|
25874 | (function(module, __webpack_exports__, __webpack_require__) {
|
25875 |
|
25876 | "use strict";
|
25877 | __webpack_require__.r(__webpack_exports__);
|
25878 |
|
25879 |
|
25880 | var esm_extends = __webpack_require__(1);
|
25881 |
|
25882 |
|
25883 | var objectWithoutProperties = __webpack_require__(5);
|
25884 |
|
25885 |
|
25886 | var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(0);
|
25887 |
|
25888 |
|
25889 | var prop_types = __webpack_require__(4);
|
25890 |
|
25891 |
|
25892 | var clsx_m = __webpack_require__(6);
|
25893 |
|
25894 |
|
25895 | var withStyles = __webpack_require__(7);
|
25896 |
|
25897 |
|
25898 | var capitalize = __webpack_require__(8);
|
25899 |
|
25900 |
|
25901 |
|
25902 |
|
25903 |
|
25904 |
|
25905 |
|
25906 |
|
25907 |
|
25908 | var styles = function styles(theme) {
|
25909 | return {
|
25910 |
|
25911 | root: {
|
25912 | userSelect: 'none',
|
25913 | width: '1em',
|
25914 | height: '1em',
|
25915 | display: 'inline-block',
|
25916 | fill: 'currentColor',
|
25917 | flexShrink: 0,
|
25918 | fontSize: theme.typography.pxToRem(24),
|
25919 | transition: theme.transitions.create('fill', {
|
25920 | duration: theme.transitions.duration.shorter
|
25921 | })
|
25922 | },
|
25923 |
|
25924 |
|
25925 | colorPrimary: {
|
25926 | color: theme.palette.primary.main
|
25927 | },
|
25928 |
|
25929 |
|
25930 | colorSecondary: {
|
25931 | color: theme.palette.secondary.main
|
25932 | },
|
25933 |
|
25934 |
|
25935 | colorAction: {
|
25936 | color: theme.palette.action.active
|
25937 | },
|
25938 |
|
25939 |
|
25940 | colorError: {
|
25941 | color: theme.palette.error.main
|
25942 | },
|
25943 |
|
25944 |
|
25945 | colorDisabled: {
|
25946 | color: theme.palette.action.disabled
|
25947 | },
|
25948 |
|
25949 |
|
25950 | fontSizeInherit: {
|
25951 | fontSize: 'inherit'
|
25952 | },
|
25953 |
|
25954 |
|
25955 | fontSizeSmall: {
|
25956 | fontSize: theme.typography.pxToRem(20)
|
25957 | },
|
25958 |
|
25959 |
|
25960 | fontSizeLarge: {
|
25961 | fontSize: theme.typography.pxToRem(35)
|
25962 | }
|
25963 | };
|
25964 | };
|
25965 | var SvgIcon_SvgIcon = external_root_React_commonjs2_react_commonjs_react_amd_react_["forwardRef"](function SvgIcon(props, ref) {
|
25966 | var children = props.children,
|
25967 | classes = props.classes,
|
25968 | className = props.className,
|
25969 | _props$color = props.color,
|
25970 | color = _props$color === void 0 ? 'inherit' : _props$color,
|
25971 | _props$component = props.component,
|
25972 | Component = _props$component === void 0 ? 'svg' : _props$component,
|
25973 | _props$fontSize = props.fontSize,
|
25974 | fontSize = _props$fontSize === void 0 ? 'default' : _props$fontSize,
|
25975 | htmlColor = props.htmlColor,
|
25976 | titleAccess = props.titleAccess,
|
25977 | _props$viewBox = props.viewBox,
|
25978 | viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,
|
25979 | other = Object(objectWithoutProperties["a" ])(props, ["children", "classes", "className", "color", "component", "fontSize", "htmlColor", "titleAccess", "viewBox"]);
|
25980 |
|
25981 | return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](Component, Object(esm_extends["a" ])({
|
25982 | className: Object(clsx_m["a" ])(classes.root, className, color !== 'inherit' && classes["color".concat(Object(capitalize["a" ])(color))], fontSize !== 'default' && classes["fontSize".concat(Object(capitalize["a" ])(fontSize))]),
|
25983 | focusable: "false",
|
25984 | viewBox: viewBox,
|
25985 | color: htmlColor,
|
25986 | "aria-hidden": titleAccess ? undefined : true,
|
25987 | role: titleAccess ? 'img' : undefined,
|
25988 | ref: ref
|
25989 | }, other), children, titleAccess ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("title", null, titleAccess) : null);
|
25990 | });
|
25991 | false ? undefined : void 0;
|
25992 | SvgIcon_SvgIcon.muiName = 'SvgIcon';
|
25993 | var esm_SvgIcon_SvgIcon = (Object(withStyles["a" ])(styles, {
|
25994 | name: 'MuiSvgIcon'
|
25995 | })(SvgIcon_SvgIcon));
|
25996 |
|
25997 | __webpack_require__.d(__webpack_exports__, "default", function() { return esm_SvgIcon_SvgIcon; });
|
25998 |
|
25999 |
|
26000 | }),
|
26001 | ,
|
26002 | ,
|
26003 | ,
|
26004 | ,
|
26005 | ,
|
26006 | ,
|
26007 | ,
|
26008 | ,
|
26009 | ,
|
26010 | ,
|
26011 | ,
|
26012 | ,
|
26013 | ,
|
26014 | ,
|
26015 | ,
|
26016 | ,
|
26017 | ,
|
26018 | ,
|
26019 | ,
|
26020 | ,
|
26021 | ,
|
26022 | ,
|
26023 | ,
|
26024 |
|
26025 | (function(module, __webpack_exports__, __webpack_require__) {
|
26026 |
|
26027 | "use strict";
|
26028 | __webpack_require__.d(__webpack_exports__, "a", function() { return formatMuiErrorMessage; });
|
26029 |
|
26030 |
|
26031 |
|
26032 |
|
26033 |
|
26034 | function formatMuiErrorMessage(code) {
|
26035 |
|
26036 |
|
26037 |
|
26038 |
|
26039 |
|
26040 | var url = 'https://material-ui.com/production-error/?code=' + code;
|
26041 |
|
26042 | for (var i = 1; i < arguments.length; i += 1) {
|
26043 |
|
26044 |
|
26045 | url += '&args[]=' + encodeURIComponent(arguments[i]);
|
26046 | }
|
26047 |
|
26048 | return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.';
|
26049 |
|
26050 | }
|
26051 |
|
26052 | }),
|
26053 |
|
26054 | (function(module, __webpack_exports__, __webpack_require__) {
|
26055 |
|
26056 | "use strict";
|
26057 |
|
26058 | __webpack_require__.d(__webpack_exports__, "a", function() { return deepmerge; });
|
26059 | var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
26060 | var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27);
|
26061 |
|
26062 |
|
26063 | function isPlainObject(item) {
|
26064 | return item && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[ "a"])(item) === 'object' && item.constructor === Object;
|
26065 | }
|
26066 | function deepmerge(target, source) {
|
26067 | var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
26068 | clone: true
|
26069 | };
|
26070 | var output = options.clone ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[ "a"])({}, target) : target;
|
26071 |
|
26072 | if (isPlainObject(target) && isPlainObject(source)) {
|
26073 | Object.keys(source).forEach(function (key) {
|
26074 |
|
26075 | if (key === '__proto__') {
|
26076 | return;
|
26077 | }
|
26078 |
|
26079 | if (isPlainObject(source[key]) && key in target) {
|
26080 | output[key] = deepmerge(target[key], source[key], options);
|
26081 | } else {
|
26082 | output[key] = source[key];
|
26083 | }
|
26084 | });
|
26085 | }
|
26086 |
|
26087 | return output;
|
26088 | }
|
26089 |
|
26090 | }),
|
26091 |
|
26092 | (function(module, __webpack_exports__, __webpack_require__) {
|
26093 |
|
26094 | "use strict";
|
26095 |
|
26096 |
|
26097 | var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(0);
|
26098 | var external_root_React_commonjs2_react_commonjs_react_amd_react_default = __webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
26099 |
|
26100 |
|
26101 |
|
26102 | var ThemeContext = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createContext(null);
|
26103 |
|
26104 | if (false) {}
|
26105 |
|
26106 | var useTheme_ThemeContext = (ThemeContext);
|
26107 |
|
26108 | __webpack_require__.d(__webpack_exports__, "a", function() { return useTheme; });
|
26109 |
|
26110 |
|
26111 | function useTheme() {
|
26112 | var theme = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.useContext(useTheme_ThemeContext);
|
26113 |
|
26114 | if (false) {}
|
26115 |
|
26116 | return theme;
|
26117 | }
|
26118 |
|
26119 | })
|
26120 | ])["default"];
|
26121 | }); |
\ | No newline at end of file |