vendor: 3,826 bytes, lines 1-140
1"use strict"; 2(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[35],{ 3 4/***/ 8711: 5/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 6 7 8// EXPORTS 9__webpack_require__.d(__webpack_exports__, { 10 "Z": function() { return /* binding */ createCache; } 11}); 12 13;// CONCATENATED MODULE: ./node_modules/@emotion/sheet/dist/emotion-sheet.esm.js 14var isDevelopment = false; 15 16/* 17 18Based off glamor's StyleSheet, thanks Sunil â¤ï¸ 19 20high performance StyleSheet for css-in-js systems 21 22- uses multiple style tags behind the scenes for millions of rules 23- uses `insertRule` for appending in production for *much* faster performance 24 25// usage 26 27import { StyleSheet } from '@emotion/sheet' 28 29let styleSheet = new StyleSheet({ key: '', container: document.head }) 30 31styleSheet.insert('#box { border: 1px solid red; }') 32- appends a css rule into the stylesheet 33 34styleSheet.flush() 35- empties the stylesheet of all its contents 36 37*/ 38 39function sheetForTag(tag) { 40 if (tag.sheet) { 41 return tag.sheet; 42 } // this weirdness brought to you by firefox 43 44 /* istanbul ignore next */ 45 46 47 for (var i = 0; i < document.styleSheets.length; i++) { 48 if (document.styleSheets[i].ownerNode === tag) { 49 return document.styleSheets[i]; 50 } 51 } // this function should always return with a value 52 // TS can't understand it though so we make it stop complaining here 53 54 55 return undefined; 56} 57 58function createStyleElement(options) { 59 var tag = document.createElement('style'); 60 tag.setAttribute('data-emotion', options.key); 61 62 if (options.nonce !== undefined) { 63 tag.setAttribute('nonce', options.nonce); 64 } 65 66 tag.appendChild(document.createTextNode('')); 67 tag.setAttribute('data-s', ''); 68 return tag; 69} 70 71var StyleSheet = /*#__PURE__*/function () { 72 // Using Node instead of HTMLElement since container may be a ShadowRoot 73 function StyleSheet(options) { 74 var _this = this; 75 76 this._insertTag = function (tag) { 77 var before; 78 79 if (_this.tags.length === 0) { 80 if (_this.insertionPoint) { 81 before = _this.insertionPoint.nextSibling; 82 } else if (_this.prepend) { 83 before = _this.container.firstChild; 84 } else { 85 before = _this.before; 86 } 87 } else { 88 before = _this.tags[_this.tags.length - 1].nextSibling; 89 } 90 91 _this.container.insertBefore(tag, before); 92 93 _this.tags.push(tag); 94 }; 95 96 this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy; 97 this.tags = []; 98 this.ctr = 0; 99 this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets 100 101 this.key = options.key; 102 this.container = options.container; 103 this.prepend = options.prepend; 104 this.insertionPoint = options.insertionPoint; 105 this.before = null; 106 } 107 108 var _proto = StyleSheet.prototype; 109 110 _proto.hydrate = function hydrate(nodes) { 111 nodes.forEach(this._insertTag); 112 }; 113 114 _proto.insert = function insert(rule) { 115 // the max length is how many rules we have per style tag, it's 65000 in speedy mode 116 // it's 1 in dev because we insert source maps that map a single rule to a location 117 // and you can only have one source map per style tag 118 if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) { 119 this._insertTag(createStyleElement(this)); 120 } 121 122 var tag = this.tags[this.tags.length - 1]; 123 124 if (this.isSpeedy) { 125 var sheet = sheetForTag(tag); 126 127 try { 128 // this is the ultrafast version, works across browsers 129 // the big drawback is that the css won't be editable in devtools 130 sheet.insertRule(rule, sheet.cssRules.length); 131 } catch (e) { 132 } 133 } else { 134 tag.appendChild(document.createTextNode(rule)); 135 } 136 137 this.ctr++; 138 }; 139 140 _proto.flush = function flush() {
141 this.tags.forEach(function (tag) { 142 var _tag$parentNode; 143 144 return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag); 145 }); 146 this.tags = []; 147 this.ctr = 0; 148 }; 149 150 return StyleSheet; 151}(); 152 153 154 155;// CONCATENATED MODULE: ./node_modules/stylis/src/Utility.js 156/** 157 * @param {number} 158 * @return {number} 159 */ 160var abs = Math.abs 161 162/** 163 * @param {number} 164 * @return {string} 165 */ 166var Utility_from = String.fromCharCode 167 168/** 169 * @param {object} 170 * @return {object} 171 */ 172var Utility_assign = Object.assign 173 174/** 175 * @param {string} value 176 * @param {number} length 177 * @return {number} 178 */ 179function hash (value, length) { 180 return Utility_charat(value, 0) ^ 45 ? (((((((length << 2) ^ Utility_charat(value, 0)) << 2) ^ Utility_charat(value, 1)) << 2) ^ Utility_charat(value, 2)) << 2) ^ Utility_charat(value, 3) : 0 181} 182 183/** 184 * @param {string} value 185 * @return {string} 186 */ 187function trim (value) { 188 return value.trim() 189} 190 191/** 192 * @param {string} value 193 * @param {RegExp} pattern 194 * @return {string?} 195 */ 196function Utility_match (value, pattern) { 197 return (value = pattern.exec(value)) ? value[0] : value 198} 199 200/** 201 * @param {string} value 202 * @param {(string|RegExp)} pattern 203 * @param {string} replacement 204 * @return {string} 205 */ 206function Utility_replace (value, pattern, replacement) { 207 return value.replace(pattern, replacement) 208} 209 210/** 211 * @param {string} value 212 * @param {string} search 213 * @return {number} 214 */ 215function indexof (value, search) { 216 return value.indexOf(search) 217} 218 219/** 220 * @param {string} value 221 * @param {number} index 222 * @return {number} 223 */ 224function Utility_charat (value, index) { 225 return value.charCodeAt(index) | 0 226} 227 228/** 229 * @param {string} value 230 * @param {number} begin 231 * @param {number} end 232 * @return {string} 233 */ 234function Utility_substr (value, begin, end) { 235 return value.slice(begin, end) 236} 237 238/** 239 * @param {string} value 240 * @return {number} 241 */ 242function Utility_strlen (value) { 243 return value.length 244} 245 246/** 247 * @param {any[]} value 248 * @return {number} 249 */ 250function Utility_sizeof (value) { 251 return value.length 252} 253 254/** 255 * @param {any} value 256 * @param {any[]} array 257 * @return {any} 258 */ 259function Utility_append (value, array) { 260 return array.push(value), value 261} 262 263/** 264 * @param {string[]} array 265 * @param {function} callback 266 * @return {string} 267 */ 268function Utility_combine (array, callback) { 269 return array.map(callback).join('') 270} 271 272;// CONCATENATED MODULE: ./node_modules/stylis/src/Tokenizer.js 273 274 275var line = 1 276var column = 1 277var Tokenizer_length = 0 278var position = 0 279var character = 0 280var characters = '' 281 282/** 283 * @param {string} value 284 * @param {object | null} root 285 * @param {object | null} parent 286 * @param {string} type 287 * @param {string[] | string} props 288 * @param {object[] | string} children 289 * @param {number} length 290 */ 291function node (value, root, parent, type, props, children, length) { 292 return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''} 293} 294 295/** 296 * @param {object} root 297 * @param {object} props 298 * @return {object} 299 */ 300function Tokenizer_copy (root, props) { 301 return Utility_assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props) 302} 303 304/** 305 * @return {number} 306 */ 307function Tokenizer_char () { 308 return character 309} 310 311/** 312 * @return {number} 313 */ 314function prev () { 315 character = position > 0 ? Utility_charat(characters, --position) : 0 316 317 if (column--, character === 10) 318 column = 1, line-- 319 320 return character 321} 322 323/** 324 * @return {number} 325 */ 326function next () { 327 character = position < Tokenizer_length ? Utility_charat(characters, position++) : 0 328 329 if (column++, character === 10) 330 column = 1, line++ 331 332 return character 333} 334 335/** 336 * @return {number} 337 */ 338function peek () { 339 return Utility_charat(characters, position) 340} 341 342/** 343 * @return {number} 344 */ 345function caret () { 346 return position 347} 348 349/** 350 * @param {number} begin 351 * @param {number} end 352 * @return {string} 353 */ 354function slice (begin, end) { 355 return Utility_substr(characters, begin, end) 356} 357 358/** 359 * @param {number} type 360 * @return {number} 361 */ 362function token (type) { 363 switch (type) { 364 // \0 \t \n \r \s whitespace token 365 case 0: case 9: case 10: case 13: case 32: 366 return 5 367 // ! + , / > @ ~ isolate token 368 case 33: case 43: case 44: case 47: case 62: case 64: case 126: 369 // ; { } breakpoint token 370 case 59: case 123: case 125: 371 return 4 372 // : accompanied token 373 case 58: 374 return 3 375 // " ' ( [ opening delimit token 376 case 34: case 39: case 40: case 91: 377 return 2 378 // ) ] closing delimit token 379 case 41: case 93: 380 return 1 381 } 382 383 return 0 384} 385 386/** 387 * @param {string} value 388 * @return {any[]} 389 */ 390function alloc (value) { 391 return line = column = 1, Tokenizer_length = Utility_strlen(characters = value), position = 0, [] 392}
392 393 394/** 395 * @param {any} value 396 * @return {any} 397 */ 398function dealloc (value) { 399 return characters = '', value 400} 401 402/** 403 * @param {number} type 404 * @return {string} 405 */ 406function delimit (type) { 407 return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type))) 408} 409 410/** 411 * @param {string} value 412 * @return {string[]} 413 */ 414function Tokenizer_tokenize (value) { 415 return dealloc(tokenizer(alloc(value))) 416} 417 418/** 419 * @param {number} type 420 * @return {string} 421 */ 422function whitespace (type) { 423 while (character = peek()) 424 if (character < 33) 425 next() 426 else 427 break 428 429 return token(type) > 2 || token(character) > 3 ? '' : ' ' 430} 431 432/** 433 * @param {string[]} children 434 * @return {string[]} 435 */ 436function tokenizer (children) { 437 while (next()) 438 switch (token(character)) { 439 case 0: append(identifier(position - 1), children) 440 break 441 case 2: append(delimit(character), children) 442 break 443 default: append(from(character), children) 444 } 445 446 return children 447} 448 449/** 450 * @param {number} index 451 * @param {number} count 452 * @return {string} 453 */ 454function escaping (index, count) { 455 while (--count && next()) 456 // not 0-9 A-F a-f 457 if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97)) 458 break 459 460 return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32)) 461} 462 463/** 464 * @param {number} type 465 * @return {number} 466 */ 467function delimiter (type) { 468 while (next()) 469 switch (character) { 470 // ] ) " ' 471 case type: 472 return position 473 // " ' 474 case 34: case 39: 475 if (type !== 34 && type !== 39) 476 delimiter(character) 477 break 478 // ( 479 case 40: 480 if (type === 41) 481 delimiter(type) 482 break 483 // \ 484 case 92: 485 next() 486 break 487 } 488 489 return position 490} 491 492/** 493 * @param {number} type 494 * @param {number} index 495 * @return {number} 496 */ 497function commenter (type, index) { 498 while (next()) 499 // // 500 if (type + character === 47 + 10) 501 break 502 // /* 503 else if (type + character === 42 + 42 && peek() === 47) 504 break 505 506 return '/*' + slice(index, position - 1) + '*' + Utility_from(type === 47 ? type : next()) 507} 508 509/** 510 * @param {number} index 511 * @return {string} 512 */ 513function identifier (index) { 514 while (!token(peek())) 515 next() 516 517 return slice(index, position) 518} 519 520;// CONCATENATED MODULE: ./node_modules/stylis/src/Enum.js 521var Enum_MS = '-ms-' 522var Enum_MOZ = '-moz-' 523var Enum_WEBKIT = '-webkit-' 524 525var COMMENT = 'comm' 526var Enum_RULESET = 'rule' 527var Enum_DECLARATION = 'decl' 528 529var PAGE = '@page' 530var MEDIA = '@media' 531var IMPORT = '@import' 532var CHARSET = '@charset' 533var VIEWPORT = '@viewport' 534var SUPPORTS = '@supports' 535var DOCUMENT = '@document' 536var NAMESPACE = '@namespace' 537var Enum_KEYFRAMES = '@keyframes' 538var FONT_FACE = '@font-face' 539var COUNTER_STYLE = '@counter-style' 540var FONT_FEATURE_VALUES = '@font-feature-values' 541var LAYER = '@layer' 542 543;// CONCATENATED MODULE: ./node_modules/stylis/src/Serializer.js 544 545 546 547/** 548 * @param {object[]} children 549 * @param {function} callback 550 * @return {string} 551 */ 552function Serializer_serialize (children, callback) { 553 var output = '' 554 var length = Utility_sizeof(children) 555 556 for (var i = 0; i < length; i++) 557 output += callback(children[i], i, children, callback) || '' 558 559 return output 560} 561 562/** 563 * @param {object} element 564 * @param {number} index 565 * @param {object[]} children 566 * @param {function} callback 567 * @return {string} 568 */ 569function stringify (element, index, children, callback) { 570 switch (element.type) { 571 case LAYER: if (element.children.length) break 572 case IMPORT: case Enum_DECLARATION: return element.return = element.return || element.value 573 case COMMENT: return '' 574 case Enum_KEYFRAMES: return element.return = element.value + '{' + Serializer_serialize(element.children, callback) + '}' 575 case Enum_RULESET: element.value = element.props.join(',') 576 } 577 578 return Utility_strlen(children = Serializer_serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '' 579} 580 581;// CONCATENATED MODULE: ./node_modules/stylis/src/Middleware.js 582 583 584 585 586 587 588/** 589 * @param {function[]} collection 590 * @return {function} 591 */ 592function middleware (collection) { 593 var length = Utility_sizeof(collection) 594
595 return function (element, index, children, callback) { 596 var output = '' 597 598 for (var i = 0; i < length; i++) 599 output += collection[i](element, index, children, callback) || '' 600 601 return output 602 } 603} 604 605/** 606 * @param {function} callback 607 * @return {function} 608 */ 609function rulesheet (callback) { 610 return function (element) { 611 if (!element.root) 612 if (element = element.return) 613 callback(element) 614 } 615} 616 617/** 618 * @param {object} element 619 * @param {number} index 620 * @param {object[]} children 621 * @param {function} callback 622 */ 623function prefixer (element, index, children, callback) { 624 if (element.length > -1) 625 if (!element.return) 626 switch (element.type) { 627 case DECLARATION: element.return = prefix(element.value, element.length, children) 628 return 629 case KEYFRAMES: 630 return serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback) 631 case RULESET: 632 if (element.length) 633 return combine(element.props, function (value) { 634 switch (match(value, /(::plac\w+|:read-\w+)/)) { 635 // :read-(only|write) 636 case ':read-only': case ':read-write': 637 return serialize([copy(element, {props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]})], callback) 638 // :placeholder 639 case '::placeholder': 640 return serialize([ 641 copy(element, {props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]}), 642 copy(element, {props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]}), 643 copy(element, {props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]}) 644 ], callback) 645 } 646 647 return '' 648 }) 649 } 650} 651 652/** 653 * @param {object} element 654 * @param {number} index 655 * @param {object[]} children 656 */ 657function namespace (element) { 658 switch (element.type) { 659 case RULESET: 660 element.props = element.props.map(function (value) { 661 return combine(tokenize(value), function (value, index, children) { 662 switch (charat(value, 0)) { 663 // \f 664 case 12: 665 return substr(value, 1, strlen(value)) 666 // \0 ( + > ~ 667 case 0: case 40: case 43: case 62: case 126: 668 return value 669 // : 670 case 58: 671 if (children[++index] === 'global') 672 children[index] = '', children[++index] = '\f' + substr(children[index], index = 1, -1) 673 // \s 674 case 32: 675 return index === 1 ? '' : value 676 default: 677 switch (index) { 678 case 0: element = value 679 return sizeof(children) > 1 ? '' : value 680 case index = sizeof(children) - 1: case 2: 681 return index === 2 ? value + element + element : value + element 682 default: 683 return value 684 } 685 } 686 }) 687 }) 688 } 689} 690 691;// CONCATENATED MODULE: ./node_modules/stylis/src/Parser.js 692 693 694 695 696/** 697 * @param {string} value 698 * @return {object[]} 699 */ 700function compile (value) { 701 return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value)) 702} 703 704/** 705 * @param {string} value 706 * @param {object} root 707 * @param {object?} parent 708 * @param {string[]} rule 709 * @param {string[]} rules 710 * @param {string[]} rulesets 711 * @param {number[]} pseudo 712 * @param {number[]} points 713 * @param {string[]} declarations 714 * @return {object} 715 */ 716function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) { 717 var index = 0 718 var offset = 0 719 var length = pseudo 720 var atrule = 0 721 var property = 0 722 var previous = 0 723 var variable = 1 724 var scanning = 1 725 var ampersand = 1 726 var character = 0 727 var type = '' 728 var props = rules 729 var children = rulesets 730 var reference = rule 731 var characters = type 732 733 while (scanning) 734 switch (previous = character, character = next()) { 735 // ( 736 case 40: 737 if (previous != 108 && Utility_charat(characters, length - 1) == 58) { 738 if (indexof(characters += Utility_replace(delimit(character), '&', '&\f'), '&\f') != -1) 739 ampersand = -1 740 break 741 } 742 // " ' [ 743 case 34: case 39: case 91: 744 characters += delimit(character) 745 break 746 // \t \n \r \s 747 case 9: case 10: case 13: case 32: 748 characters += whitespace(previous) 749 break 750 // \ 751 case 92: 752 characters += escaping(caret() - 1, 7) 753 continue 754 // / 755 case 47: 756 switch (peek()) { 757 case 42: case 47: 758 Utility_append(comment(commenter(next(), caret()), root, parent), declarations) 759 break 760 default: 761 characters += '/' 762 } 763 break 764 // { 765 case 123 * variable: 766 points[index++] = Utility_strlen(characters) * ampersand 767 // } ; \0 768 case 125 * variable: case 59: case 0: 769 switch (character) { 770 // \0 } 771 case 0: case 125: scanning = 0 772 // ; 773 case 59 + offset: if (ampersand == -1) characters = Utility_replace(characters, /\f/g, '') 774 if (property > 0 && (Utility_strlen(characters) - length)) 775 Utility_append(property >
775 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(Utility_replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations) 776 break 777 // @ ; 778 case 59: characters += ';' 779 // { rule/at-rule 780 default: 781 Utility_append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets) 782 783 if (character === 123) 784 if (offset === 0) 785 parse(characters, root, reference, reference, props, rulesets, length, points, children) 786 else 787 switch (atrule === 99 && Utility_charat(characters, 3) === 110 ? 100 : atrule) { 788 // d l m s 789 case 100: case 108: case 109: case 115: 790 parse(value, reference, reference, rule && Utility_append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children) 791 break 792 default: 793 parse(characters, reference, reference, reference, [''], children, 0, points, children) 794 } 795 } 796 797 index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo 798 break 799 // : 800 case 58: 801 length = 1 + Utility_strlen(characters), property = previous 802 default: 803 if (variable < 1) 804 if (character == 123) 805 --variable 806 else if (character == 125 && variable++ == 0 && prev() == 125) 807 continue 808 809 switch (characters += Utility_from(character), character * variable) { 810 // & 811 case 38: 812 ampersand = offset > 0 ? 1 : (characters += '\f', -1) 813 break 814 // , 815 case 44: 816 points[index++] = (Utility_strlen(characters) - 1) * ampersand, ampersand = 1 817 break 818 // @ 819 case 64: 820 // - 821 if (peek() === 45) 822 characters += delimit(next()) 823 824 atrule = peek(), offset = length = Utility_strlen(type = characters += identifier(caret())), character++ 825 break 826 // - 827 case 45: 828 if (previous === 45 && Utility_strlen(characters) == 2) 829 variable = 0 830 } 831 } 832 833 return rulesets 834} 835 836/** 837 * @param {string} value 838 * @param {object} root 839 * @param {object?} parent 840 * @param {number} index 841 * @param {number} offset 842 * @param {string[]} rules 843 * @param {number[]} points 844 * @param {string} type 845 * @param {string[]} props 846 * @param {string[]} children 847 * @param {number} length 848 * @return {object} 849 */ 850function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) { 851 var post = offset - 1 852 var rule = offset === 0 ? rules : [''] 853 var size = Utility_sizeof(rule) 854 855 for (var i = 0, j = 0, k = 0; i < index; ++i) 856 for (var x = 0, y = Utility_substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) 857 if (z = trim(j > 0 ? rule[x] + ' ' + y : Utility_replace(y, /&\f/g, rule[x]))) 858 props[k++] = z 859 860 return node(value, root, parent, offset === 0 ? Enum_RULESET : type, props, children, length) 861} 862 863/** 864 * @param {number} value 865 * @param {object} root 866 * @param {object?} parent 867 * @return {object} 868 */ 869function comment (value, root, parent) { 870 return node(value, root, parent, COMMENT, Utility_from(Tokenizer_char()), Utility_substr(value, 2, -2), 0) 871} 872 873/** 874 * @param {string} value 875 * @param {object} root 876 * @param {object?} parent 877 * @param {number} length 878 * @return {object} 879 */ 880function declaration (value, root, parent, length) { 881 return node(value, root, parent, Enum_DECLARATION, Utility_substr(value, 0, length), Utility_substr(value, length + 1, -1), length) 882} 883 884;// CONCATENATED MODULE: ./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js 885 886 887 888 889 890var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) { 891 var previous = 0; 892 var character = 0; 893 894 while (true) { 895 previous = character; 896 character = peek(); // &\f 897 898 if (previous === 38 && character === 12) { 899 points[index] = 1; 900 } 901 902 if (token(character)) { 903 break; 904 } 905 906 next(); 907 } 908 909 return slice(begin, position); 910}; 911 912var toRules = function toRules(parsed, points) { 913 // pretend we've started with a comma 914 var index = -1; 915 var character = 44; 916 917 do { 918 switch (token(character)) { 919 case 0: 920 // &\f 921 if (character === 38 && peek() === 12) { 922 // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings 923 // stylis inserts \f after & to know when & where it should replace this sequence with the context selector 924 // and when it should just concatenate the outer and inner selectors 925 // it's very unlikely for this sequence to actually appear in a different c
vendor: 4,310 bytes, lines 925-1080
925ontext, so we just leverage this fact here 926 points[index] = 1; 927 } 928 929 parsed[index] += identifierWithPointTracking(position - 1, points, index); 930 break; 931 932 case 2: 933 parsed[index] += delimit(character); 934 break; 935 936 case 4: 937 // comma 938 if (character === 44) { 939 // colon 940 parsed[++index] = peek() === 58 ? '&\f' : ''; 941 points[index] = parsed[index].length; 942 break; 943 } 944 945 // fallthrough 946 947 default: 948 parsed[index] += Utility_from(character); 949 } 950 } while (character = next()); 951 952 return parsed; 953}; 954 955var getRules = function getRules(value, points) { 956 return dealloc(toRules(alloc(value), points)); 957}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11 958 959 960var fixedElements = /* #__PURE__ */new WeakMap(); 961var compat = function compat(element) { 962 if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo 963 // negative .length indicates that this rule has been already prefixed 964 element.length < 1) { 965 return; 966 } 967 968 var value = element.value; 969 var parent = element.parent; 970 var isImplicitRule = element.column === parent.column && element.line === parent.line; 971 972 while (parent.type !== 'rule') { 973 parent = parent.parent; 974 if (!parent) return; 975 } // short-circuit for the simplest case 976 977 978 if (element.props.length === 1 && value.charCodeAt(0) !== 58 979 /* colon */ 980 && !fixedElements.get(parent)) { 981 return; 982 } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level) 983 // then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent" 984 985 986 if (isImplicitRule) { 987 return; 988 } 989 990 fixedElements.set(element, true); 991 var points = []; 992 var rules = getRules(value, points); 993 var parentRules = parent.props; 994 995 for (var i = 0, k = 0; i < rules.length; i++) { 996 for (var j = 0; j < parentRules.length; j++, k++) { 997 element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i]; 998 } 999 } 1000}; 1001var removeLabel = function removeLabel(element) { 1002 if (element.type === 'decl') { 1003 var value = element.value; 1004 1005 if ( // charcode for l 1006 value.charCodeAt(0) === 108 && // charcode for b 1007 value.charCodeAt(2) === 98) { 1008 // this ignores label 1009 element["return"] = ''; 1010 element.value = ''; 1011 } 1012 } 1013}; 1014 1015/* eslint-disable no-fallthrough */ 1016 1017function emotion_cache_browser_esm_prefix(value, length) { 1018 switch (hash(value, length)) { 1019 // color-adjust 1020 case 5103: 1021 return Enum_WEBKIT + 'print-' + value + value; 1022 // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) 1023 1024 case 5737: 1025 case 4201: 1026 case 3177: 1027 case 3433: 1028 case 1641: 1029 case 4457: 1030 case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break 1031 1032 case 5572: 1033 case 6356: 1034 case 5844: 1035 case 3191: 1036 case 6645: 1037 case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, 1038 1039 case 6391: 1040 case 5879: 1041 case 5623: 1042 case 6135: 1043 case 4599: 1044 case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) 1045 1046 case 4215: 1047 case 6389: 1048 case 5109: 1049 case 5365: 1050 case 5621: 1051 case 3829: 1052 return Enum_WEBKIT + value + value; 1053 // appearance, user-select, transform, hyphens, text-size-adjust 1054 1055 case 5349: 1056 case 4246: 1057 case 4810: 1058 case 6968: 1059 case 2756: 1060 return Enum_WEBKIT + value + Enum_MOZ + value + Enum_MS + value + value; 1061 // flex, flex-direction 1062 1063 case 6828: 1064 case 4268: 1065 return Enum_WEBKIT + value + Enum_MS + value + value; 1066 // order 1067 1068 case 6165: 1069 return Enum_WEBKIT + value + Enum_MS + 'flex-' + value + value; 1070 // align-items 1071 1072 case 5187: 1073 return Enum_WEBKIT + value + Utility_replace(value, /(\w+).+(:[^]+)/, Enum_WEBKIT + 'box-$1$2' + Enum_MS + 'flex-$1$2') + value; 1074 // align-self 1075 1076 case 5443: 1077 return Enum_WEBKIT + value + Enum_MS + 'flex-item-' + Utility_replace(value, /flex-|-self/, '') + value; 1078 // align-content 1079 1080 case 4675:
vendor: 4,124 bytes, lines 1081-1196
1081 return Enum_WEBKIT + value + Enum_MS + 'flex-line-pack' + Utility_replace(value, /align-content|flex-|-self/, '') + value; 1082 // flex-shrink 1083 1084 case 5548: 1085 return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'shrink', 'negative') + value; 1086 // flex-basis 1087 1088 case 5292: 1089 return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'basis', 'preferred-size') + value; 1090 // flex-grow 1091 1092 case 6060: 1093 return Enum_WEBKIT + 'box-' + Utility_replace(value, '-grow', '') + Enum_WEBKIT + value + Enum_MS + Utility_replace(value, 'grow', 'positive') + value; 1094 // transition 1095 1096 case 4554: 1097 return Enum_WEBKIT + Utility_replace(value, /([^-])(transform)/g, '$1' + Enum_WEBKIT + '$2') + value; 1098 // cursor 1099 1100 case 6187: 1101 return Utility_replace(Utility_replace(Utility_replace(value, /(zoom-|grab)/, Enum_WEBKIT + '$1'), /(image-set)/, Enum_WEBKIT + '$1'), value, '') + value; 1102 // background, background-image 1103 1104 case 5495: 1105 case 3959: 1106 return Utility_replace(value, /(image-set\([^]*)/, Enum_WEBKIT + '$1' + '$`$1'); 1107 // justify-content 1108 1109 case 4968: 1110 return Utility_replace(Utility_replace(value, /(.+:)(flex-)?(.*)/, Enum_WEBKIT + 'box-pack:$3' + Enum_MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + Enum_WEBKIT + value + value; 1111 // (margin|padding)-inline-(start|end) 1112 1113 case 4095: 1114 case 3583: 1115 case 4068: 1116 case 2532: 1117 return Utility_replace(value, /(.+)-inline(.+)/, Enum_WEBKIT + '$1$2') + value; 1118 // (min|max)?(width|height|inline-size|block-size) 1119 1120 case 8116: 1121 case 7059: 1122 case 5753: 1123 case 5535: 1124 case 5445: 1125 case 5701: 1126 case 4933: 1127 case 4677: 1128 case 5533: 1129 case 5789: 1130 case 5021: 1131 case 4765: 1132 // stretch, max-content, min-content, fill-available 1133 if (Utility_strlen(value) - 1 - length > 6) switch (Utility_charat(value, length + 1)) { 1134 // (m)ax-content, (m)in-content 1135 case 109: 1136 // - 1137 if (Utility_charat(value, length + 4) !== 45) break; 1138 // (f)ill-available, (f)it-content 1139 1140 case 102: 1141 return Utility_replace(value, /(.+:)(.+)-([^]+)/, '$1' + Enum_WEBKIT + '$2-$3' + '$1' + Enum_MOZ + (Utility_charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value; 1142 // (s)tretch 1143 1144 case 115: 1145 return ~indexof(value, 'stretch') ? emotion_cache_browser_esm_prefix(Utility_replace(value, 'stretch', 'fill-available'), length) + value : value; 1146 } 1147 break; 1148 // position: sticky 1149 1150 case 4949: 1151 // (s)ticky? 1152 if (Utility_charat(value, length + 1) !== 115) break; 1153 // display: (flex|inline-flex) 1154 1155 case 6444: 1156 switch (Utility_charat(value, Utility_strlen(value) - 3 - (~indexof(value, '!important') && 10))) { 1157 // stic(k)y 1158 case 107: 1159 return Utility_replace(value, ':', ':' + Enum_WEBKIT) + value; 1160 // (inline-)?fl(e)x 1161 1162 case 101: 1163 return Utility_replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + Enum_WEBKIT + (Utility_charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + Enum_WEBKIT + '$2$3' + '$1' + Enum_MS + '$2box$3') + value; 1164 } 1165 1166 break; 1167 // writing-mode 1168 1169 case 5936: 1170 switch (Utility_charat(value, length + 11)) { 1171 // vertical-l(r) 1172 case 114: 1173 return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value; 1174 // vertical-r(l) 1175 1176 case 108: 1177 return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value; 1178 // horizontal(-)tb 1179 1180 case 45: 1181 return Enum_WEBKIT + value + Enum_MS + Utility_replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value; 1182 } 1183 1184 return Enum_WEBKIT + value + Enum_MS + value + value; 1185 } 1186 1187 return value; 1188} 1189 1190var emotion_cache_browser_esm_prefixer = function prefixer(element, index, children, callback) { 1191 if (element.length > -1) if (!element["return"]) switch (element.type) { 1192 case Enum_DECLARATION: 1193 element["return"] = emotion_cache_browser_esm_prefix(element.value, element.length); 1194 break; 1195 1196 case Enum_KEYFRAMES:
1197 return Serializer_serialize([Tokenizer_copy(element, { 1198 value: Utility_replace(element.value, '@', '@' + Enum_WEBKIT) 1199 })], callback); 1200 1201 case Enum_RULESET: 1202 if (element.length) return Utility_combine(element.props, function (value) { 1203 switch (Utility_match(value, /(::plac\w+|:read-\w+)/)) { 1204 // :read-(only|write) 1205 case ':read-only': 1206 case ':read-write': 1207 return Serializer_serialize([Tokenizer_copy(element, { 1208 props: [Utility_replace(value, /:(read-\w+)/, ':' + Enum_MOZ + '$1')] 1209 })], callback); 1210 // :placeholder 1211 1212 case '::placeholder': 1213 return Serializer_serialize([Tokenizer_copy(element, { 1214 props: [Utility_replace(value, /:(plac\w+)/, ':' + Enum_WEBKIT + 'input-$1')] 1215 }), Tokenizer_copy(element, { 1216 props: [Utility_replace(value, /:(plac\w+)/, ':' + Enum_MOZ + '$1')] 1217 }), Tokenizer_copy(element, { 1218 props: [Utility_replace(value, /:(plac\w+)/, Enum_MS + 'input-$1')] 1219 })], callback); 1220 } 1221 1222 return ''; 1223 }); 1224 } 1225}; 1226 1227var defaultStylisPlugins = [emotion_cache_browser_esm_prefixer]; 1228 1229var createCache = function createCache(options) { 1230 var key = options.key; 1231 1232 if (key === 'css') { 1233 var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration 1234 // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be) 1235 // note this very very intentionally targets all style elements regardless of the key to ensure 1236 // that creating a cache works inside of render of a React component 1237 1238 Array.prototype.forEach.call(ssrStyles, function (node) { 1239 // we want to only move elements which have a space in the data-emotion attribute value 1240 // because that indicates that it is an Emotion 11 server-side rendered style elements 1241 // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector 1242 // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes) 1243 // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles 1244 // will not result in the Emotion 10 styles being destroyed 1245 var dataEmotionAttribute = node.getAttribute('data-emotion'); 1246 1247 if (dataEmotionAttribute.indexOf(' ') === -1) { 1248 return; 1249 } 1250 1251 document.head.appendChild(node); 1252 node.setAttribute('data-s', ''); 1253 }); 1254 } 1255 1256 var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; 1257 1258 var inserted = {}; 1259 var container; 1260 var nodesToHydrate = []; 1261 1262 { 1263 container = options.container || document.head; 1264 Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which 1265 // means that the style elements we're looking at are only Emotion 11 server-rendered style elements 1266 document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) { 1267 var attrib = node.getAttribute("data-emotion").split(' '); 1268 1269 for (var i = 1; i < attrib.length; i++) { 1270 inserted[attrib[i]] = true; 1271 } 1272 1273 nodesToHydrate.push(node); 1274 }); 1275 } 1276 1277 var _insert; 1278 1279 var omnipresentPlugins = [compat, removeLabel]; 1280 1281 { 1282 var currentSheet; 1283 var finalizingPlugins = [stringify, rulesheet(function (rule) { 1284 currentSheet.insert(rule); 1285 })]; 1286 var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); 1287 1288 var stylis = function stylis(styles) { 1289 return Serializer_serialize(compile(styles), serializer); 1290 }; 1291 1292 _insert = function insert(selector, serialized, sheet, shouldCache) { 1293 currentSheet = sheet; 1294 1295 stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); 1296 1297 if (shouldCache) { 1298 cache.inserted[serialized.name] = true; 1299 } 1300 }; 1301 } 1302 1303 var cache = { 1304 key: key, 1305 sheet: new StyleSheet({ 1306 key: key, 1307 container: container, 1308 nonce: options.nonce, 1309 speedy: options.speedy, 1310 prepend: options.prepend, 1311 insertionPoint: options.insertionPoint 1312 }), 1313 nonce: options.nonce, 1314 inserted: inserted, 1315 registered: {}, 1316 insert: _insert 1317 }; 1318 cache.sheet.hydrate(nodesToHydrate); 1319 return cache; 1320}; 1321 1322 1323 1324 1325/***/ }), 1326 1327/***/ 3365: 1328/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 1329 1330 1331// EXPORTS 1332__webpack_require__.d(__webpack_exports__, { 1333 "S": function() { return /* binding */ Select; } 1334}); 1335 1336// UNUSED EXPORTS: a, b, c, d, g, m 1337 1338// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js 1339var esm_extends = __webpack_require__(7462); 1340// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js 1341var objectSpread2 = __webpack_require__(1413); 1342;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js 1343function _classCallCheck(a, n) { 1344 if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); 1345} 1346 1347// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js + 1 modules 1348var toPropertyKey = __webpack_require__(3997); 1349;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js 1350 1351function _defineProperties(e, r) { 1352 for (var t = 0; t < r.length; t++) { 1353 var o = r[t]; 1354 o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, (0,toPropertyKey/* default */.Z)(o.key), o); 1355 } 1356} 1357function _createClass(e, r, t) { 1358 return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { 1359 writable: !1 1360 }), e; 1361} 1362 1363// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js 1364var setPrototypeOf = __webpack_require__(9611); 1365;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js 1366 1367function _inherits(t, e) { 1368 if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); 1369 t.prototype = Object.create(e && e.prototype, { 1370 constructor: { 1371 value: t, 1372 writable: !0, 1373 configurable: !0 1374 } 1375 }), Object.defineProperty(t, "prototype", { 1376 writable: !1 1377 }), e && (0,setPrototypeOf/* default */.Z)(t, e); 1378} 1379 1380;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js 1381function _getPrototypeOf(t) { 1382 return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { 1383 return t.__proto__ || Object.getPrototypeOf(t); 1384 }, _getPrototypeOf(t); 1385} 1386 1387;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js 1388function _isNativeReflectConstruct() { 1389 try { 1390 var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); 1391 } catch (t) {} 1392 return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { 1393 return !!t; 1394 })(); 1395} 1396 1397// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js 1398var esm_typeof = __webpack_require__(1002); 1399;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js 1400function _assertThisInitialized(e) { 1401 if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 1402 return e; 1403} 1404 1405;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js 1406 1407 1408function _possibleConstructorReturn(t, e) { 1409 if (e && ("object" == (0,esm_typeof/* default */.Z)(e) || "function" == typeof e)) return e; 1410 if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); 1411 return _assertThisInitialized(t); 1412} 1413 1414;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js 1415 1416 1417 1418function _createSuper(t) { 1419 var r = _isNativeReflectConstruct(); 1420 return function () { 1421 var e, 1422 o = _getPrototypeOf(t); 1423 if (r) { 1424 var s = _getPrototypeOf(this).constructor; 1425 e = Reflect.construct(o, arguments, s); 1426 } else e = o.apply(this, arguments); 1427 return _possibleConstructorReturn(this, e); 1428 }; 1429} 1430 1431// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js 1432var arrayLikeToArray = __webpack_require__(907); 1433;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js 1434 1435function _arrayWithoutHoles(r) { 1436 if (Array.isArray(r)) return (0,arrayLikeToArray/* default */.Z)(r); 1437} 1438 1439;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js 1440function _iterableToArray(r) { 1441 if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); 1442} 1443 1444// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js 1445var unsupportedIterableToArray = __webpack_require__(181); 1446;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js 1447function _nonIterableSpread() { 1448 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 1449} 1450 1451;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js 1452 1453 1454 1455 1456function _toConsumableArray(r) { 1457 return _arrayWithoutHoles(r) || _iterableToArray(r) || (0,unsupportedIterableToArray/* default */.Z)(r) || _nonIterableSpread(); 1458} 1459 1460// EXTERNAL MODULE: ./node_modules/react/index.js 1461var react = __webpack_require__(7294); 1462var react_namespaceObject = /*#__PURE__*/__webpack_require__.t(react, 2); 1463// EXTERNAL MODULE: ./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js + 7 modules 1464var emotion_cache_browser_esm = __webpack_require__(8711); 1465;// CONCATENATED MODULE: ./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js 1466var isBrowser = true; 1467 1468function emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, classNames) { 1469 var rawClassName = ''; 1470 classNames.split(' ').forEach(function (className) { 1471 if (registered[className] !== undefined) { 1472 registeredStyles.push(registered[className] + ";"); 1473 } else if (className) { 1474 rawClassName += className + " "; 1475 } 1476 }); 1477 return rawClassName; 1478} 1479var emotion_utils_browser_esm_registerStyles = function registerStyles(cache, serialized, isStringTag) { 1480 var className = cache.key + "-" + serialized.name; 1481 1482 if ( // we only need to add the styles to the registered cache if the
vendor: 4,255 bytes, lines 1483-1639
1483 // class name could be used further down 1484 // the tree but if it's a string tag, we know it won't 1485 // so we don't have to add it to registered cache. 1486 // this improves memory usage since we can avoid storing the whole style string 1487 (isStringTag === false || // we need to always store it if we're in compat mode and 1488 // in node since emotion-server relies on whether a style is in 1489 // the registered cache to know whether a style is global or not 1490 // also, note that this check will be dead code eliminated in the browser 1491 isBrowser === false ) && cache.registered[className] === undefined) { 1492 cache.registered[className] = serialized.styles; 1493 } 1494}; 1495var emotion_utils_browser_esm_insertStyles = function insertStyles(cache, serialized, isStringTag) { 1496 emotion_utils_browser_esm_registerStyles(cache, serialized, isStringTag); 1497 var className = cache.key + "-" + serialized.name; 1498 1499 if (cache.inserted[serialized.name] === undefined) { 1500 var current = serialized; 1501 1502 do { 1503 cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true); 1504 1505 current = current.next; 1506 } while (current !== undefined); 1507 } 1508}; 1509 1510 1511 1512;// CONCATENATED MODULE: ./node_modules/@emotion/hash/dist/emotion-hash.esm.js 1513/* eslint-disable */ 1514// Inspired by https://github.com/garycourt/murmurhash-js 1515// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86 1516function murmur2(str) { 1517 // 'm' and 'r' are mixing constants generated offline. 1518 // They're not really 'magic', they just happen to work well. 1519 // const m = 0x5bd1e995; 1520 // const r = 24; 1521 // Initialize the hash 1522 var h = 0; // Mix 4 bytes at a time into the hash 1523 1524 var k, 1525 i = 0, 1526 len = str.length; 1527 1528 for (; len >= 4; ++i, len -= 4) { 1529 k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; 1530 k = 1531 /* Math.imul(k, m): */ 1532 (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16); 1533 k ^= 1534 /* k >>> r: */ 1535 k >>> 24; 1536 h = 1537 /* Math.imul(k, m): */ 1538 (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ 1539 /* Math.imul(h, m): */ 1540 (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); 1541 } // Handle the last few bytes of the input array 1542 1543 1544 switch (len) { 1545 case 3: 1546 h ^= (str.charCodeAt(i + 2) & 0xff) << 16; 1547 1548 case 2: 1549 h ^= (str.charCodeAt(i + 1) & 0xff) << 8; 1550 1551 case 1: 1552 h ^= str.charCodeAt(i) & 0xff; 1553 h = 1554 /* Math.imul(h, m): */ 1555 (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); 1556 } // Do a few final mixes of the hash to ensure the last few 1557 // bytes are well-incorporated. 1558 1559 1560 h ^= h >>> 13; 1561 h = 1562 /* Math.imul(h, m): */ 1563 (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); 1564 return ((h ^ h >>> 15) >>> 0).toString(36); 1565} 1566 1567 1568 1569;// CONCATENATED MODULE: ./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js 1570var unitlessKeys = { 1571 animationIterationCount: 1, 1572 aspectRatio: 1, 1573 borderImageOutset: 1, 1574 borderImageSlice: 1, 1575 borderImageWidth: 1, 1576 boxFlex: 1, 1577 boxFlexGroup: 1, 1578 boxOrdinalGroup: 1, 1579 columnCount: 1, 1580 columns: 1, 1581 flex: 1, 1582 flexGrow: 1, 1583 flexPositive: 1, 1584 flexShrink: 1, 1585 flexNegative: 1, 1586 flexOrder: 1, 1587 gridRow: 1, 1588 gridRowEnd: 1, 1589 gridRowSpan: 1, 1590 gridRowStart: 1, 1591 gridColumn: 1, 1592 gridColumnEnd: 1, 1593 gridColumnSpan: 1, 1594 gridColumnStart: 1, 1595 msGridRow: 1, 1596 msGridRowSpan: 1, 1597 msGridColumn: 1, 1598 msGridColumnSpan: 1, 1599 fontWeight: 1, 1600 lineHeight: 1, 1601 opacity: 1, 1602 order: 1, 1603 orphans: 1, 1604 scale: 1, 1605 tabSize: 1, 1606 widows: 1, 1607 zIndex: 1, 1608 zoom: 1, 1609 WebkitLineClamp: 1, 1610 // SVG-related properties 1611 fillOpacity: 1, 1612 floodOpacity: 1, 1613 stopOpacity: 1, 1614 strokeDasharray: 1, 1615 strokeDashoffset: 1, 1616 strokeMiterlimit: 1, 1617 strokeOpacity: 1, 1618 strokeWidth: 1 1619}; 1620 1621 1622 1623;// CONCATENATED MODULE: ./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js 1624function memoize(fn) { 1625 var cache = Object.create(null); 1626 return function (arg) { 1627 if (cache[arg] === undefined) cache[arg] = fn(arg); 1628 return cache[arg]; 1629 }; 1630} 1631 1632 1633 1634;// CONCATENATED MODULE: ./node_modules/@emotion/serialize/dist/emotion-serialize.esm.js 1635 1636 1637 1638 1639var emotion_serialize_esm_isDevelopment = false;
vendor: 4,227 bytes, lines 1640-1788
1640 1641var hyphenateRegex = /[A-Z]|^ms/g; 1642var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g; 1643 1644var isCustomProperty = function isCustomProperty(property) { 1645 return property.charCodeAt(1) === 45; 1646}; 1647 1648var isProcessableValue = function isProcessableValue(value) { 1649 return value != null && typeof value !== 'boolean'; 1650}; 1651 1652var processStyleName = /* #__PURE__ */memoize(function (styleName) { 1653 return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase(); 1654}); 1655 1656var processStyleValue = function processStyleValue(key, value) { 1657 switch (key) { 1658 case 'animation': 1659 case 'animationName': 1660 { 1661 if (typeof value === 'string') { 1662 return value.replace(animationRegex, function (match, p1, p2) { 1663 cursor = { 1664 name: p1, 1665 styles: p2, 1666 next: cursor 1667 }; 1668 return p1; 1669 }); 1670 } 1671 } 1672 } 1673 1674 if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) { 1675 return value + 'px'; 1676 } 1677 1678 return value; 1679}; 1680 1681var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.'; 1682 1683function handleInterpolation(mergedProps, registered, interpolation) { 1684 if (interpolation == null) { 1685 return ''; 1686 } 1687 1688 var componentSelector = interpolation; 1689 1690 if (componentSelector.__emotion_styles !== undefined) { 1691 1692 return componentSelector; 1693 } 1694 1695 switch (typeof interpolation) { 1696 case 'boolean': 1697 { 1698 return ''; 1699 } 1700 1701 case 'object': 1702 { 1703 var keyframes = interpolation; 1704 1705 if (keyframes.anim === 1) { 1706 cursor = { 1707 name: keyframes.name, 1708 styles: keyframes.styles, 1709 next: cursor 1710 }; 1711 return keyframes.name; 1712 } 1713 1714 var serializedStyles = interpolation; 1715 1716 if (serializedStyles.styles !== undefined) { 1717 var next = serializedStyles.next; 1718 1719 if (next !== undefined) { 1720 // not the most efficient thing ever but this is a pretty rare case 1721 // and there will be very few iterations of this generally 1722 while (next !== undefined) { 1723 cursor = { 1724 name: next.name, 1725 styles: next.styles, 1726 next: cursor 1727 }; 1728 next = next.next; 1729 } 1730 } 1731 1732 var styles = serializedStyles.styles + ";"; 1733 return styles; 1734 } 1735 1736 return createStringFromObject(mergedProps, registered, interpolation); 1737 } 1738 1739 case 'function': 1740 { 1741 if (mergedProps !== undefined) { 1742 var previousCursor = cursor; 1743 var result = interpolation(mergedProps); 1744 cursor = previousCursor; 1745 return handleInterpolation(mergedProps, registered, result); 1746 } 1747 1748 break; 1749 } 1750 } // finalize string values (regular strings and functions interpolated into css calls) 1751 1752 1753 var asString = interpolation; 1754 1755 if (registered == null) { 1756 return asString; 1757 } 1758 1759 var cached = registered[asString]; 1760 return cached !== undefined ? cached : asString; 1761} 1762 1763function createStringFromObject(mergedProps, registered, obj) { 1764 var string = ''; 1765 1766 if (Array.isArray(obj)) { 1767 for (var i = 0; i < obj.length; i++) { 1768 string += handleInterpolation(mergedProps, registered, obj[i]) + ";"; 1769 } 1770 } else { 1771 for (var key in obj) { 1772 var value = obj[key]; 1773 1774 if (typeof value !== 'object') { 1775 var asString = value; 1776 1777 if (registered != null && registered[asString] !== undefined) { 1778 string += key + "{" + registered[asString] + "}"; 1779 } else if (isProcessableValue(asString)) { 1780 string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";"; 1781 } 1782 } else { 1783 if (key === 'NO_COMPONENT_SELECTOR' && emotion_serialize_esm_isDevelopment) { 1784 throw new Error(noComponentSelectorMessage); 1785 } 1786 1787 if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) { 1788 for (var _i = 0; _i < value.length; _i++) {
1789 if (isProcessableValue(value[_i])) { 1790 string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";"; 1791 } 1792 } 1793 } else { 1794 var interpolated = handleInterpolation(mergedProps, registered, value); 1795 1796 switch (key) { 1797 case 'animation': 1798 case 'animationName': 1799 { 1800 string += processStyleName(key) + ":" + interpolated + ";"; 1801 break; 1802 } 1803 1804 default: 1805 { 1806 1807 string += key + "{" + interpolated + "}"; 1808 } 1809 } 1810 } 1811 } 1812 } 1813 } 1814 1815 return string; 1816} 1817 1818var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; // this is the cursor for keyframes 1819// keyframes are stored on the SerializedStyles object as a linked list 1820 1821var cursor; 1822function emotion_serialize_esm_serializeStyles(args, registered, mergedProps) { 1823 if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) { 1824 return args[0]; 1825 } 1826 1827 var stringMode = true; 1828 var styles = ''; 1829 cursor = undefined; 1830 var strings = args[0]; 1831 1832 if (strings == null || strings.raw === undefined) { 1833 stringMode = false; 1834 styles += handleInterpolation(mergedProps, registered, strings); 1835 } else { 1836 var asTemplateStringsArr = strings; 1837 1838 styles += asTemplateStringsArr[0]; 1839 } // we start at 1 since we've already handled the first arg 1840 1841 1842 for (var i = 1; i < args.length; i++) { 1843 styles += handleInterpolation(mergedProps, registered, args[i]); 1844 1845 if (stringMode) { 1846 var templateStringsArr = strings; 1847 1848 styles += templateStringsArr[i]; 1849 } 1850 } // using a global regex with .exec is stateful so lastIndex has to be reset each time 1851 1852 1853 labelPattern.lastIndex = 0; 1854 var identifierName = ''; 1855 var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5 1856 1857 while ((match = labelPattern.exec(styles)) !== null) { 1858 identifierName += '-' + match[1]; 1859 } 1860 1861 var name = murmur2(styles) + identifierName; 1862 1863 return { 1864 name: name, 1865 styles: styles, 1866 next: cursor 1867 }; 1868} 1869 1870 1871 1872;// CONCATENATED MODULE: ./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js 1873 1874 1875var syncFallback = function syncFallback(create) { 1876 return create(); 1877}; 1878 1879var useInsertionEffect = react_namespaceObject['useInsertion' + 'Effect'] ? react_namespaceObject['useInsertion' + 'Effect'] : false; 1880var emotion_use_insertion_effect_with_fallbacks_browser_esm_useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback; 1881var emotion_use_insertion_effect_with_fallbacks_browser_esm_useInsertionEffectWithLayoutFallback = useInsertionEffect || react.useLayoutEffect; 1882 1883 1884 1885;// CONCATENATED MODULE: ./node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896var emotion_element_f0de968e_browser_esm_isDevelopment = false; 1897 1898var EmotionCacheContext = /* #__PURE__ */react.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case 1899// because this module is primarily intended for the browser and node 1900// but it's also required in react native and similar environments sometimes 1901// and we could have a special build just for that 1902// but this is much easier and the native packages 1903// might use a different theme context in the future anyway 1904typeof HTMLElement !== 'undefined' ? /* #__PURE__ */(0,emotion_cache_browser_esm/* default */.Z)({ 1905 key: 'css' 1906}) : null); 1907 1908var CacheProvider = EmotionCacheContext.Provider; 1909var __unsafe_useEmotionCache = function useEmotionCache() { 1910 return useContext(EmotionCacheContext); 1911}; 1912 1913var emotion_element_f0de968e_browser_esm_withEmotionCache = function withEmotionCache(func) { 1914 return /*#__PURE__*/(0,react.forwardRef)(function (props, ref) { 1915 // the cache will never be null in the browser 1916 var cache = (0,react.useContext)(EmotionCacheContext); 1917 return func(props, cache, ref); 1918 }); 1919}; 1920 1921var emotion_element_f0de968e_browser_esm_ThemeContext = /* #__PURE__ */react.createContext({}); 1922 1923var useTheme = function useTheme() { 1924 return React.useContext(emotion_element_f0de968e_browser_esm_ThemeContext); 1925}; 1926 1927var getTheme = function getTheme(outerTheme, theme) { 1928 if (typeof theme === 'function') { 1929 var mergedTheme = theme(outerTheme); 1930 1931 return mergedTheme; 1932 } 1933 1934 return _extends({}, outerTheme, theme); 1935}; 1936 1937var createCacheWithTheme = /* #__PURE__ */(/* unused pure expression or super */ null && (weakMemoize(function (outerTheme) { 1938 return weakMemoize(function (theme) { 1939 return getTheme(outerTheme, theme); 1940 }); 1941}))); 1942var ThemeProvider = function ThemeProvider(props) { 1943 var theme = React.useContext(emotion_element_f0de968e_browser_esm_ThemeContext); 1944 1945 if (props.theme !== theme) { 1946 theme = createCacheWithTheme(theme)(props.theme); 1947 } 1948 1949 return /*#__PURE__*/React.createElement(emotion_element_f0de968e_browser_esm_ThemeContext.Provider, { 1950 value: theme 1951 }, props.children); 1952}; 1953function withTheme(Component) { 1954 var componentName = Component.displayName || Component.name || 'Component'; 1955 var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) { 1956 var theme = React.useContext(emotion_element_f0de968e_browser_esm_ThemeContext); 1957 return /*#__PURE__*/React.createElement(Component, _extends({ 1958 theme: theme, 1959 ref: ref 1960 }, props)); 1961 }); 1962 WithTheme.displayName = "WithTheme(" + componentName + ")"; 1963 return hoistNonReactStatics(WithTheme, Component); 1964} 1965 1966var hasOwn = {}.hasOwnProperty; 1967 1968var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__'; 1969var createEmotionProps = function createEmotionProps(type, props) { 1970 1971 var newProps = {}; 1972 1973 for (var _key in props) { 1974 if (hasOwn.call(props, _key)) { 1975 newProps[_key] = props[_key]; 1976 } 1977 } 1978 1979 newProps[typePropName] = type; // Runtime labeling is an opt-in feature because: 1980 1981 return newProps; 1982}; 1983 1984var Insertion = function Insertion(_ref) {
vendor: 4,782 bytes, lines 1985-2131
1985 var cache = _ref.cache, 1986 serialized = _ref.serialized, 1987 isStringTag = _ref.isStringTag; 1988 emotion_utils_browser_esm_registerStyles(cache, serialized, isStringTag); 1989 emotion_use_insertion_effect_with_fallbacks_browser_esm_useInsertionEffectAlwaysWithSyncFallback(function () { 1990 return emotion_utils_browser_esm_insertStyles(cache, serialized, isStringTag); 1991 }); 1992 1993 return null; 1994}; 1995 1996var Emotion = /* #__PURE__ */emotion_element_f0de968e_browser_esm_withEmotionCache(function (props, cache, ref) { 1997 var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works 1998 // not passing the registered cache to serializeStyles because it would 1999 // make certain babel optimisations not possible 2000 2001 if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) { 2002 cssProp = cache.registered[cssProp]; 2003 } 2004 2005 var WrappedComponent = props[typePropName]; 2006 var registeredStyles = [cssProp]; 2007 var className = ''; 2008 2009 if (typeof props.className === 'string') { 2010 className = emotion_utils_browser_esm_getRegisteredStyles(cache.registered, registeredStyles, props.className); 2011 } else if (props.className != null) { 2012 className = props.className + " "; 2013 } 2014 2015 var serialized = emotion_serialize_esm_serializeStyles(registeredStyles, undefined, react.useContext(emotion_element_f0de968e_browser_esm_ThemeContext)); 2016 2017 className += cache.key + "-" + serialized.name; 2018 var newProps = {}; 2019 2020 for (var _key2 in props) { 2021 if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!emotion_element_f0de968e_browser_esm_isDevelopment )) { 2022 newProps[_key2] = props[_key2]; 2023 } 2024 } 2025 2026 newProps.className = className; 2027 2028 if (ref) { 2029 newProps.ref = ref; 2030 } 2031 2032 return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(Insertion, { 2033 cache: cache, 2034 serialized: serialized, 2035 isStringTag: typeof WrappedComponent === 'string' 2036 }), /*#__PURE__*/react.createElement(WrappedComponent, newProps)); 2037}); 2038 2039var Emotion$1 = Emotion; 2040 2041 2042 2043// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js 2044var hoist_non_react_statics_cjs = __webpack_require__(8679); 2045;// CONCATENATED MODULE: ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058var jsx = function jsx(type, props) { 2059 // eslint-disable-next-line prefer-rest-params 2060 var args = arguments; 2061 2062 if (props == null || !hasOwn.call(props, 'css')) { 2063 return react.createElement.apply(undefined, args); 2064 } 2065 2066 var argsLength = args.length; 2067 var createElementArgArray = new Array(argsLength); 2068 createElementArgArray[0] = Emotion$1; 2069 createElementArgArray[1] = createEmotionProps(type, props); 2070 2071 for (var i = 2; i < argsLength; i++) { 2072 createElementArgArray[i] = args[i]; 2073 } 2074 2075 return react.createElement.apply(null, createElementArgArray); 2076}; 2077 2078(function (_jsx) { 2079 var JSX; 2080 2081 (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {}))); 2082})(jsx || (jsx = {})); 2083 2084// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild 2085// initial client-side render from SSR, use place of hydrating tag 2086 2087var Global = /* #__PURE__ */(/* unused pure expression or super */ null && (withEmotionCache(function (props, cache) { 2088 2089 var styles = props.styles; 2090 var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext)); 2091 // but it is based on a constant that will never change at runtime 2092 // it's effectively like having two implementations and switching them out 2093 // so it's not actually breaking anything 2094 2095 2096 var sheetRef = React.useRef(); 2097 useInsertionEffectWithLayoutFallback(function () { 2098 var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675 2099 2100 var sheet = new cache.sheet.constructor({ 2101 key: key, 2102 nonce: cache.sheet.nonce, 2103 container: cache.sheet.container, 2104 speedy: cache.sheet.isSpeedy 2105 }); 2106 var rehydrating = false; 2107 var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]"); 2108 2109 if (cache.sheet.tags.length) { 2110 sheet.before = cache.sheet.tags[0]; 2111 } 2112 2113 if (node !== null) { 2114 rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s 2115 2116 node.setAttribute('data-emotion', key); 2117 sheet.hydrate([node]); 2118 } 2119 2120 sheetRef.current = [sheet, rehydrating]; 2121 return function () { 2122 sheet.flush(); 2123 }; 2124 }, [cache]); 2125 useInsertionEffectWithLayoutFallback(function () { 2126 var sheetRefCurrent = sheetRef.current; 2127 var sheet = sheetRefCurrent[0], 2128 rehydrating = sheetRefCurrent[1]; 2129 2130 if (rehydrating) { 2131 sheetRefCurrent[1] = false;
vendor: 4,925 bytes, lines 2132-2315
2132 return; 2133 } 2134 2135 if (serialized.next !== undefined) { 2136 // insert keyframes 2137 insertStyles(cache, serialized.next, true); 2138 } 2139 2140 if (sheet.tags.length) { 2141 // if this doesn't exist then it will be null so the style element will be appended 2142 var element = sheet.tags[sheet.tags.length - 1].nextElementSibling; 2143 sheet.before = element; 2144 sheet.flush(); 2145 } 2146 2147 cache.insert("", serialized, sheet, false); 2148 }, [cache, serialized.name]); 2149 return null; 2150}))); 2151 2152function css() { 2153 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 2154 args[_key] = arguments[_key]; 2155 } 2156 2157 return emotion_serialize_esm_serializeStyles(args); 2158} 2159 2160function keyframes() { 2161 var insertable = css.apply(void 0, arguments); 2162 var name = "animation-" + insertable.name; 2163 return { 2164 name: name, 2165 styles: "@keyframes " + name + "{" + insertable.styles + "}", 2166 anim: 1, 2167 toString: function toString() { 2168 return "_EMO_" + this.name + "_" + this.styles + "_EMO_"; 2169 } 2170 }; 2171} 2172 2173var classnames = function classnames(args) { 2174 var len = args.length; 2175 var i = 0; 2176 var cls = ''; 2177 2178 for (; i < len; i++) { 2179 var arg = args[i]; 2180 if (arg == null) continue; 2181 var toAdd = void 0; 2182 2183 switch (typeof arg) { 2184 case 'boolean': 2185 break; 2186 2187 case 'object': 2188 { 2189 if (Array.isArray(arg)) { 2190 toAdd = classnames(arg); 2191 } else { 2192 2193 toAdd = ''; 2194 2195 for (var k in arg) { 2196 if (arg[k] && k) { 2197 toAdd && (toAdd += ' '); 2198 toAdd += k; 2199 } 2200 } 2201 } 2202 2203 break; 2204 } 2205 2206 default: 2207 { 2208 toAdd = arg; 2209 } 2210 } 2211 2212 if (toAdd) { 2213 cls && (cls += ' '); 2214 cls += toAdd; 2215 } 2216 } 2217 2218 return cls; 2219}; 2220 2221function merge(registered, css, className) { 2222 var registeredStyles = []; 2223 var rawClassName = getRegisteredStyles(registered, registeredStyles, className); 2224 2225 if (registeredStyles.length < 2) { 2226 return className; 2227 } 2228 2229 return rawClassName + css(registeredStyles); 2230} 2231 2232var emotion_react_browser_esm_Insertion = function Insertion(_ref) { 2233 var cache = _ref.cache, 2234 serializedArr = _ref.serializedArr; 2235 useInsertionEffectAlwaysWithSyncFallback(function () { 2236 2237 for (var i = 0; i < serializedArr.length; i++) { 2238 insertStyles(cache, serializedArr[i], false); 2239 } 2240 }); 2241 2242 return null; 2243}; 2244 2245var ClassNames = /* #__PURE__ */(/* unused pure expression or super */ null && (withEmotionCache(function (props, cache) { 2246 var hasRendered = false; 2247 var serializedArr = []; 2248 2249 var css = function css() { 2250 if (hasRendered && isDevelopment) { 2251 throw new Error('css can only be used during render'); 2252 } 2253 2254 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 2255 args[_key] = arguments[_key]; 2256 } 2257 2258 var serialized = serializeStyles(args, cache.registered); 2259 serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx` 2260 2261 registerStyles(cache, serialized, false); 2262 return cache.key + "-" + serialized.name; 2263 }; 2264 2265 var cx = function cx() { 2266 if (hasRendered && isDevelopment) { 2267 throw new Error('cx can only be used during render'); 2268 } 2269 2270 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 2271 args[_key2] = arguments[_key2]; 2272 } 2273 2274 return merge(cache.registered, css, classnames(args)); 2275 }; 2276 2277 var content = { 2278 css: css, 2279 cx: cx, 2280 theme: React.useContext(ThemeContext) 2281 }; 2282 var ele = props.children(content); 2283 hasRendered = true; 2284 return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(emotion_react_browser_esm_Insertion, { 2285 cache: cache, 2286 serializedArr: serializedArr 2287 }), ele); 2288}))); 2289 2290 2291 2292// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 3 modules 2293var slicedToArray = __webpack_require__(6854); 2294// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js 2295var objectWithoutProperties = __webpack_require__(5987); 2296;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js 2297function _taggedTemplateLiteral(e, t) { 2298 return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { 2299 raw: { 2300 value: Object.freeze(t) 2301 } 2302 })); 2303} 2304 2305// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js 2306var defineProperty = __webpack_require__(4942); 2307// EXTERNAL MODULE: ./node_modules/react-dom/index.js 2308var react_dom = __webpack_require__(3935); 2309;// CONCATENATED MODULE: ./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs 2310/** 2311 * Custom positioning reference element. 2312 * @see https://floating-ui.com/docs/virtual-elements 2313 */ 2314 2315const sides = (/* unused pure expression or super */ null && (['top', 'right', 'bottom', 'left']));
vendor: 4,564 bytes, lines 2316-2472
2316const alignments = (/* unused pure expression or super */ null && (['start', 'end'])); 2317const placements = /*#__PURE__*/(/* unused pure expression or super */ null && (sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []))); 2318const min = Math.min; 2319const max = Math.max; 2320const round = Math.round; 2321const floor = Math.floor; 2322const createCoords = v => ({ 2323 x: v, 2324 y: v 2325}); 2326const oppositeSideMap = { 2327 left: 'right', 2328 right: 'left', 2329 bottom: 'top', 2330 top: 'bottom' 2331}; 2332const oppositeAlignmentMap = { 2333 start: 'end', 2334 end: 'start' 2335}; 2336function clamp(start, value, end) { 2337 return max(start, min(value, end)); 2338} 2339function evaluate(value, param) { 2340 return typeof value === 'function' ? value(param) : value; 2341} 2342function getSide(placement) { 2343 return placement.split('-')[0]; 2344} 2345function getAlignment(placement) { 2346 return placement.split('-')[1]; 2347} 2348function getOppositeAxis(axis) { 2349 return axis === 'x' ? 'y' : 'x'; 2350} 2351function getAxisLength(axis) { 2352 return axis === 'y' ? 'height' : 'width'; 2353} 2354function getSideAxis(placement) { 2355 return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x'; 2356} 2357function getAlignmentAxis(placement) { 2358 return getOppositeAxis(getSideAxis(placement)); 2359} 2360function getAlignmentSides(placement, rects, rtl) { 2361 if (rtl === void 0) { 2362 rtl = false; 2363 } 2364 const alignment = getAlignment(placement); 2365 const alignmentAxis = getAlignmentAxis(placement); 2366 const length = getAxisLength(alignmentAxis); 2367 let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top'; 2368 if (rects.reference[length] > rects.floating[length]) { 2369 mainAlignmentSide = getOppositePlacement(mainAlignmentSide); 2370 } 2371 return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)]; 2372} 2373function getExpandedPlacements(placement) { 2374 const oppositePlacement = getOppositePlacement(placement); 2375 return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)]; 2376} 2377function getOppositeAlignmentPlacement(placement) { 2378 return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]); 2379} 2380function getSideList(side, isStart, rtl) { 2381 const lr = ['left', 'right']; 2382 const rl = ['right', 'left']; 2383 const tb = ['top', 'bottom']; 2384 const bt = ['bottom', 'top']; 2385 switch (side) { 2386 case 'top': 2387 case 'bottom': 2388 if (rtl) return isStart ? rl : lr; 2389 return isStart ? lr : rl; 2390 case 'left': 2391 case 'right': 2392 return isStart ? tb : bt; 2393 default: 2394 return []; 2395 } 2396} 2397function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) { 2398 const alignment = getAlignment(placement); 2399 let list = getSideList(getSide(placement), direction === 'start', rtl); 2400 if (alignment) { 2401 list = list.map(side => side + "-" + alignment); 2402 if (flipAlignment) { 2403 list = list.concat(list.map(getOppositeAlignmentPlacement)); 2404 } 2405 } 2406 return list; 2407} 2408function getOppositePlacement(placement) { 2409 return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]); 2410} 2411function expandPaddingObject(padding) { 2412 return { 2413 top: 0, 2414 right: 0, 2415 bottom: 0, 2416 left: 0, 2417 ...padding 2418 }; 2419} 2420function getPaddingObject(padding) { 2421 return typeof padding !== 'number' ? expandPaddingObject(padding) : { 2422 top: padding, 2423 right: padding, 2424 bottom: padding, 2425 left: padding 2426 }; 2427} 2428function rectToClientRect(rect) { 2429 const { 2430 x, 2431 y, 2432 width, 2433 height 2434 } = rect; 2435 return { 2436 width, 2437 height, 2438 top: y, 2439 left: x, 2440 right: x + width, 2441 bottom: y + height, 2442 x, 2443 y 2444 }; 2445} 2446 2447 2448 2449;// CONCATENATED MODULE: ./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs 2450function hasWindow() { 2451 return typeof window !== 'undefined'; 2452} 2453function getNodeName(node) { 2454 if (isNode(node)) { 2455 return (node.nodeName || '').toLowerCase(); 2456 } 2457 // Mocked nodes in testing environments may not be instances of Node. By 2458 // returning `#document` an infinite loop won't occur. 2459 // https://github.com/floating-ui/floating-ui/issues/2317 2460 return '#document'; 2461} 2462function getWindow(node) { 2463 var _node$ownerDocument; 2464 return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window; 2465} 2466function getDocumentElement(node) { 2467 var _ref; 2468 return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement; 2469} 2470function isNode(value) { 2471 if (!hasWindow()) { 2472 return false;
vendor: 4,077 bytes, lines 2473-2590
2473 } 2474 return value instanceof Node || value instanceof getWindow(value).Node; 2475} 2476function isElement(value) { 2477 if (!hasWindow()) { 2478 return false; 2479 } 2480 return value instanceof Element || value instanceof getWindow(value).Element; 2481} 2482function isHTMLElement(value) { 2483 if (!hasWindow()) { 2484 return false; 2485 } 2486 return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement; 2487} 2488function isShadowRoot(value) { 2489 if (!hasWindow() || typeof ShadowRoot === 'undefined') { 2490 return false; 2491 } 2492 return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot; 2493} 2494function isOverflowElement(element) { 2495 const { 2496 overflow, 2497 overflowX, 2498 overflowY, 2499 display 2500 } = floating_ui_utils_dom_getComputedStyle(element); 2501 return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display); 2502} 2503function isTableElement(element) { 2504 return ['table', 'td', 'th'].includes(getNodeName(element)); 2505} 2506function isTopLayer(element) { 2507 return [':popover-open', ':modal'].some(selector => { 2508 try { 2509 return element.matches(selector); 2510 } catch (e) { 2511 return false; 2512 } 2513 }); 2514} 2515function isContainingBlock(elementOrCss) { 2516 const webkit = isWebKit(); 2517 const css = isElement(elementOrCss) ? floating_ui_utils_dom_getComputedStyle(elementOrCss) : elementOrCss; 2518 2519 // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block 2520 // https://drafts.csswg.org/css-transforms-2/#individual-transforms 2521 return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value)); 2522} 2523function getContainingBlock(element) { 2524 let currentNode = getParentNode(element); 2525 while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) { 2526 if (isContainingBlock(currentNode)) { 2527 return currentNode; 2528 } else if (isTopLayer(currentNode)) { 2529 return null; 2530 } 2531 currentNode = getParentNode(currentNode); 2532 } 2533 return null; 2534} 2535function isWebKit() { 2536 if (typeof CSS === 'undefined' || !CSS.supports) return false; 2537 return CSS.supports('-webkit-backdrop-filter', 'none'); 2538} 2539function isLastTraversableNode(node) { 2540 return ['html', 'body', '#document'].includes(getNodeName(node)); 2541} 2542function floating_ui_utils_dom_getComputedStyle(element) { 2543 return getWindow(element).getComputedStyle(element); 2544} 2545function getNodeScroll(element) { 2546 if (isElement(element)) { 2547 return { 2548 scrollLeft: element.scrollLeft, 2549 scrollTop: element.scrollTop 2550 }; 2551 } 2552 return { 2553 scrollLeft: element.scrollX, 2554 scrollTop: element.scrollY 2555 }; 2556} 2557function getParentNode(node) { 2558 if (getNodeName(node) === 'html') { 2559 return node; 2560 } 2561 const result = 2562 // Step into the shadow DOM of the parent of a slotted node. 2563 node.assignedSlot || 2564 // DOM Element detected. 2565 node.parentNode || 2566 // ShadowRoot detected. 2567 isShadowRoot(node) && node.host || 2568 // Fallback. 2569 getDocumentElement(node); 2570 return isShadowRoot(result) ? result.host : result; 2571} 2572function getNearestOverflowAncestor(node) { 2573 const parentNode = getParentNode(node); 2574 if (isLastTraversableNode(parentNode)) { 2575 return node.ownerDocument ? node.ownerDocument.body : node.body; 2576 } 2577 if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) { 2578 return parentNode; 2579 } 2580 return getNearestOverflowAncestor(parentNode); 2581} 2582function getOverflowAncestors(node, list, traverseIframes) { 2583 var _node$ownerDocument2; 2584 if (list === void 0) { 2585 list = []; 2586 } 2587 if (traverseIframes === void 0) { 2588 traverseIframes = true; 2589 } 2590 const scrollableAncestor = getNearestOverflowAncestor(node);
vendor: 3,749 bytes, lines 2591-2711
2591 const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body); 2592 const win = getWindow(scrollableAncestor); 2593 if (isBody) { 2594 const frameElement = getFrameElement(win); 2595 return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []); 2596 } 2597 return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes)); 2598} 2599function getFrameElement(win) { 2600 return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null; 2601} 2602 2603 2604 2605;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs 2606 2607 2608 2609 2610 2611function getCssDimensions(element) { 2612 const css = floating_ui_utils_dom_getComputedStyle(element); 2613 // In testing environments, the `width` and `height` properties are empty 2614 // strings for SVG elements, returning NaN. Fallback to `0` in this case. 2615 let width = parseFloat(css.width) || 0; 2616 let height = parseFloat(css.height) || 0; 2617 const hasOffset = isHTMLElement(element); 2618 const offsetWidth = hasOffset ? element.offsetWidth : width; 2619 const offsetHeight = hasOffset ? element.offsetHeight : height; 2620 const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight; 2621 if (shouldFallback) { 2622 width = offsetWidth; 2623 height = offsetHeight; 2624 } 2625 return { 2626 width, 2627 height, 2628 $: shouldFallback 2629 }; 2630} 2631 2632function unwrapElement(element) { 2633 return !isElement(element) ? element.contextElement : element; 2634} 2635 2636function getScale(element) { 2637 const domElement = unwrapElement(element); 2638 if (!isHTMLElement(domElement)) { 2639 return createCoords(1); 2640 } 2641 const rect = domElement.getBoundingClientRect(); 2642 const { 2643 width, 2644 height, 2645 $ 2646 } = getCssDimensions(domElement); 2647 let x = ($ ? round(rect.width) : rect.width) / width; 2648 let y = ($ ? round(rect.height) : rect.height) / height; 2649 2650 // 0, NaN, or Infinity should always fallback to 1. 2651 2652 if (!x || !Number.isFinite(x)) { 2653 x = 1; 2654 } 2655 if (!y || !Number.isFinite(y)) { 2656 y = 1; 2657 } 2658 return { 2659 x, 2660 y 2661 }; 2662} 2663 2664const noOffsets = /*#__PURE__*/createCoords(0); 2665function getVisualOffsets(element) { 2666 const win = getWindow(element); 2667 if (!isWebKit() || !win.visualViewport) { 2668 return noOffsets; 2669 } 2670 return { 2671 x: win.visualViewport.offsetLeft, 2672 y: win.visualViewport.offsetTop 2673 }; 2674} 2675function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) { 2676 if (isFixed === void 0) { 2677 isFixed = false; 2678 } 2679 if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) { 2680 return false; 2681 } 2682 return isFixed; 2683} 2684 2685function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) { 2686 if (includeScale === void 0) { 2687 includeScale = false; 2688 } 2689 if (isFixedStrategy === void 0) { 2690 isFixedStrategy = false; 2691 } 2692 const clientRect = element.getBoundingClientRect(); 2693 const domElement = unwrapElement(element); 2694 let scale = createCoords(1); 2695 if (includeScale) { 2696 if (offsetParent) { 2697 if (isElement(offsetParent)) { 2698 scale = getScale(offsetParent); 2699 } 2700 } else { 2701 scale = getScale(element); 2702 } 2703 } 2704 const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0); 2705 let x = (clientRect.left + visualOffsets.x) / scale.x; 2706 let y = (clientRect.top + visualOffsets.y) / scale.y; 2707 let width = clientRect.width / scale.x; 2708 let height = clientRect.height / scale.y; 2709 if (domElement) { 2710 const win = getWindow(domElement); 2711 const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
vendor: 8,238 bytes, lines 2712-2932
2712 let currentWin = win; 2713 let currentIFrame = getFrameElement(currentWin); 2714 while (currentIFrame && offsetParent && offsetWin !== currentWin) { 2715 const iframeScale = getScale(currentIFrame); 2716 const iframeRect = currentIFrame.getBoundingClientRect(); 2717 const css = floating_ui_utils_dom_getComputedStyle(currentIFrame); 2718 const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x; 2719 const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y; 2720 x *= iframeScale.x; 2721 y *= iframeScale.y; 2722 width *= iframeScale.x; 2723 height *= iframeScale.y; 2724 x += left; 2725 y += top; 2726 currentWin = getWindow(currentIFrame); 2727 currentIFrame = getFrameElement(currentWin); 2728 } 2729 } 2730 return rectToClientRect({ 2731 width, 2732 height, 2733 x, 2734 y 2735 }); 2736} 2737 2738// If <html> has a CSS width greater than the viewport, then this will be 2739// incorrect for RTL. 2740function getWindowScrollBarX(element, rect) { 2741 const leftScroll = getNodeScroll(element).scrollLeft; 2742 if (!rect) { 2743 return getBoundingClientRect(getDocumentElement(element)).left + leftScroll; 2744 } 2745 return rect.left + leftScroll; 2746} 2747 2748function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) { 2749 if (ignoreScrollbarX === void 0) { 2750 ignoreScrollbarX = false; 2751 } 2752 const htmlRect = documentElement.getBoundingClientRect(); 2753 const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : 2754 // RTL <body> scrollbar. 2755 getWindowScrollBarX(documentElement, htmlRect)); 2756 const y = htmlRect.top + scroll.scrollTop; 2757 return { 2758 x, 2759 y 2760 }; 2761} 2762 2763function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) { 2764 let { 2765 elements, 2766 rect, 2767 offsetParent, 2768 strategy 2769 } = _ref; 2770 const isFixed = strategy === 'fixed'; 2771 const documentElement = getDocumentElement(offsetParent); 2772 const topLayer = elements ? isTopLayer(elements.floating) : false; 2773 if (offsetParent === documentElement || topLayer && isFixed) { 2774 return rect; 2775 } 2776 let scroll = { 2777 scrollLeft: 0, 2778 scrollTop: 0 2779 }; 2780 let scale = createCoords(1); 2781 const offsets = createCoords(0); 2782 const isOffsetParentAnElement = isHTMLElement(offsetParent); 2783 if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { 2784 if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { 2785 scroll = getNodeScroll(offsetParent); 2786 } 2787 if (isHTMLElement(offsetParent)) { 2788 const offsetRect = getBoundingClientRect(offsetParent); 2789 scale = getScale(offsetParent); 2790 offsets.x = offsetRect.x + offsetParent.clientLeft; 2791 offsets.y = offsetRect.y + offsetParent.clientTop; 2792 } 2793 } 2794 const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0); 2795 return { 2796 width: rect.width * scale.x, 2797 height: rect.height * scale.y, 2798 x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x, 2799 y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y 2800 }; 2801} 2802 2803function getClientRects(element) { 2804 return Array.from(element.getClientRects()); 2805} 2806 2807// Gets the entire size of the scrollable document area, even extending outside 2808// of the `<html>` and `<body>` rect bounds if horizontally scrollable. 2809function getDocumentRect(element) { 2810 const html = getDocumentElement(element); 2811 const scroll = getNodeScroll(element); 2812 const body = element.ownerDocument.body; 2813 const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth); 2814 const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight); 2815 let x = -scroll.scrollLeft + getWindowScrollBarX(element); 2816 const y = -scroll.scrollTop; 2817 if (floating_ui_utils_dom_getComputedStyle(body).direction === 'rtl') { 2818 x += max(html.clientWidth, body.clientWidth) - width; 2819 } 2820 return { 2821 width, 2822 height, 2823 x, 2824 y 2825 }; 2826} 2827 2828function getViewportRect(element, strategy) { 2829 const win = getWindow(element); 2830 const html = getDocumentElement(element); 2831 const visualViewport = win.visualViewport; 2832 let width = html.clientWidth; 2833 let height = html.clientHeight; 2834 let x = 0; 2835 let y = 0; 2836 if (visualViewport) { 2837 width = visualViewport.width; 2838 height = visualViewport.height; 2839 const visualViewportBased = isWebKit(); 2840 if (!visualViewportBased || visualViewportBased && strategy === 'fixed') { 2841 x = visualViewport.offsetLeft; 2842 y = visualViewport.offsetTop; 2843 } 2844 } 2845 return { 2846 width, 2847 height, 2848 x, 2849 y 2850 }; 2851} 2852 2853// Returns the inner client rect, subtracting scrollbars if present. 2854function getInnerBoundingClientRect(element, strategy) { 2855 const clientRect = getBoundingClientRect(element, true, strategy === 'fixed'); 2856 const top = clientRect.top + element.clientTop; 2857 const left = clientRect.left + element.clientLeft; 2858 const scale = isHTMLElement(element) ? getScale(element) : createCoords(1); 2859 const width = element.clientWidth * scale.x; 2860 const height = element.clientHeight * scale.y; 2861 const x = left * scale.x; 2862 const y = top * scale.y; 2863 return { 2864 width, 2865 height, 2866 x, 2867 y 2868 }; 2869} 2870function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) { 2871 let rect; 2872 if (clippingAncestor === 'viewport') { 2873 rect = getViewportRect(element, strategy); 2874 } else if (clippingAncestor === 'document') { 2875 rect = getDocumentRect(getDocumentElement(element)); 2876 } else if (isElement(clippingAncestor)) { 2877 rect = getInnerBoundingClientRect(clippingAncestor, strategy); 2878 } else { 2879 const visualOffsets = getVisualOffsets(element); 2880 rect = { 2881 x: clippingAncestor.x - visualOffsets.x, 2882 y: clippingAncestor.y - visualOffsets.y, 2883 width: clippingAncestor.width, 2884 height: clippingAncestor.height 2885 }; 2886 } 2887 return rectToClientRect(rect); 2888} 2889function hasFixedPositionAncestor(element, stopNode) { 2890 const parentNode = getParentNode(element); 2891 if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) { 2892 return false; 2893 } 2894 return floating_ui_utils_dom_getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode); 2895} 2896 2897// A "clipping ancestor" is an `overflow` element with the characteristic of 2898// clipping (or hiding) child elements. This returns all clipping ancestors 2899// of the given element up the tree. 2900function getClippingElementAncestors(element, cache) { 2901 const cachedResult = cache.get(element); 2902 if (cachedResult) { 2903 return cachedResult; 2904 } 2905 let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body'); 2906 let currentContainingBlockComputedStyle = null; 2907 const elementIsFixed = floating_ui_utils_dom_getComputedStyle(element).position === 'fixed'; 2908 let currentNode = elementIsFixed ? getParentNode(element) : element; 2909 2910 // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block 2911 while (isElement(currentNode) && !isLastTraversableNode(currentNode)) { 2912 const computedStyle = floating_ui_utils_dom_getComputedStyle(currentNode); 2913 const currentNodeIsContaining = isContainingBlock(currentNode); 2914 if (!currentNodeIsContaining && computedStyle.position === 'fixed') { 2915 currentContainingBlockComputedStyle = null; 2916 } 2917 const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode); 2918 if (shouldDropCurrentNode) { 2919 // Drop non-containing blocks. 2920 result = result.filter(ancestor => ancestor !== currentNode); 2921 } else { 2922 // Record last containing block for next iteration. 2923 currentContainingBlockComputedStyle = computedStyle; 2924 } 2925 currentNode = getParentNode(currentNode); 2926 } 2927 cache.set(element, result); 2928 return result; 2929} 2930 2931// Gets the maximum area that the element is visible in due to any number of 2932// clipping ancestors.
vendor: 5,514 bytes, lines 2933-3090
2933function getClippingRect(_ref) { 2934 let { 2935 element, 2936 boundary, 2937 rootBoundary, 2938 strategy 2939 } = _ref; 2940 const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary); 2941 const clippingAncestors = [...elementClippingAncestors, rootBoundary]; 2942 const firstClippingAncestor = clippingAncestors[0]; 2943 const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => { 2944 const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy); 2945 accRect.top = max(rect.top, accRect.top); 2946 accRect.right = min(rect.right, accRect.right); 2947 accRect.bottom = min(rect.bottom, accRect.bottom); 2948 accRect.left = max(rect.left, accRect.left); 2949 return accRect; 2950 }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy)); 2951 return { 2952 width: clippingRect.right - clippingRect.left, 2953 height: clippingRect.bottom - clippingRect.top, 2954 x: clippingRect.left, 2955 y: clippingRect.top 2956 }; 2957} 2958 2959function getDimensions(element) { 2960 const { 2961 width, 2962 height 2963 } = getCssDimensions(element); 2964 return { 2965 width, 2966 height 2967 }; 2968} 2969 2970function getRectRelativeToOffsetParent(element, offsetParent, strategy) { 2971 const isOffsetParentAnElement = isHTMLElement(offsetParent); 2972 const documentElement = getDocumentElement(offsetParent); 2973 const isFixed = strategy === 'fixed'; 2974 const rect = getBoundingClientRect(element, true, isFixed, offsetParent); 2975 let scroll = { 2976 scrollLeft: 0, 2977 scrollTop: 0 2978 }; 2979 const offsets = createCoords(0); 2980 2981 // If the <body> scrollbar appears on the left (e.g. RTL systems). Use 2982 // Firefox with layout.scrollbar.side = 3 in about:config to test this. 2983 function setLeftRTLScrollbarOffset() { 2984 offsets.x = getWindowScrollBarX(documentElement); 2985 } 2986 if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) { 2987 if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) { 2988 scroll = getNodeScroll(offsetParent); 2989 } 2990 if (isOffsetParentAnElement) { 2991 const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent); 2992 offsets.x = offsetRect.x + offsetParent.clientLeft; 2993 offsets.y = offsetRect.y + offsetParent.clientTop; 2994 } else if (documentElement) { 2995 setLeftRTLScrollbarOffset(); 2996 } 2997 } 2998 if (isFixed && !isOffsetParentAnElement && documentElement) { 2999 setLeftRTLScrollbarOffset(); 3000 } 3001 const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0); 3002 const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x; 3003 const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y; 3004 return { 3005 x, 3006 y, 3007 width: rect.width, 3008 height: rect.height 3009 }; 3010} 3011 3012function isStaticPositioned(element) { 3013 return floating_ui_utils_dom_getComputedStyle(element).position === 'static'; 3014} 3015 3016function getTrueOffsetParent(element, polyfill) { 3017 if (!isHTMLElement(element) || floating_ui_utils_dom_getComputedStyle(element).position === 'fixed') { 3018 return null; 3019 } 3020 if (polyfill) { 3021 return polyfill(element); 3022 } 3023 let rawOffsetParent = element.offsetParent; 3024 3025 // Firefox returns the <html> element as the offsetParent if it's non-static, 3026 // while Chrome and Safari return the <body> element. The <body> element must 3027 // be used to perform the correct calculations even if the <html> element is 3028 // non-static. 3029 if (getDocumentElement(element) === rawOffsetParent) { 3030 rawOffsetParent = rawOffsetParent.ownerDocument.body; 3031 } 3032 return rawOffsetParent; 3033} 3034 3035// Gets the closest ancestor positioned element. Handles some edge cases, 3036// such as table ancestors and cross browser bugs. 3037function getOffsetParent(element, polyfill) { 3038 const win = getWindow(element); 3039 if (isTopLayer(element)) { 3040 return win; 3041 } 3042 if (!isHTMLElement(element)) { 3043 let svgOffsetParent = getParentNode(element); 3044 while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) { 3045 if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) { 3046 return svgOffsetParent; 3047 } 3048 svgOffsetParent = getParentNode(svgOffsetParent); 3049 } 3050 return win; 3051 } 3052 let offsetParent = getTrueOffsetParent(element, polyfill); 3053 while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) { 3054 offsetParent = getTrueOffsetParent(offsetParent, polyfill); 3055 } 3056 if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) { 3057 return win; 3058 } 3059 return offsetParent || getContainingBlock(element) || win; 3060} 3061 3062const getElementRects = async function (data) { 3063 const getOffsetParentFn = this.getOffsetParent || getOffsetParent; 3064 const getDimensionsFn = this.getDimensions; 3065 const floatingDimensions = await getDimensionsFn(data.floating); 3066 return { 3067 reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy), 3068 floating: { 3069 x: 0, 3070 y: 0, 3071 width: floatingDimensions.width, 3072 height: floatingDimensions.height 3073 } 3074 }; 3075}; 3076 3077function isRTL(element) { 3078 return floating_ui_utils_dom_getComputedStyle(element).direction === 'rtl'; 3079} 3080 3081const platform = { 3082 convertOffsetParentRelativeRectToViewportRelativeRect, 3083 getDocumentElement: getDocumentElement, 3084 getClippingRect, 3085 getOffsetParent, 3086 getElementRects, 3087 getClientRects, 3088 getDimensions, 3089 getScale, 3090 isElement:
vendor: 5,768 bytes, lines 3090-3266
3090 isElement, 3091 isRTL 3092}; 3093 3094function rectsAreEqual(a, b) { 3095 return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height; 3096} 3097 3098// https://samthor.au/2021/observing-dom/ 3099function observeMove(element, onMove) { 3100 let io = null; 3101 let timeoutId; 3102 const root = getDocumentElement(element); 3103 function cleanup() { 3104 var _io; 3105 clearTimeout(timeoutId); 3106 (_io = io) == null || _io.disconnect(); 3107 io = null; 3108 } 3109 function refresh(skip, threshold) { 3110 if (skip === void 0) { 3111 skip = false; 3112 } 3113 if (threshold === void 0) { 3114 threshold = 1; 3115 } 3116 cleanup(); 3117 const elementRectForRootMargin = element.getBoundingClientRect(); 3118 const { 3119 left, 3120 top, 3121 width, 3122 height 3123 } = elementRectForRootMargin; 3124 if (!skip) { 3125 onMove(); 3126 } 3127 if (!width || !height) { 3128 return; 3129 } 3130 const insetTop = floor(top); 3131 const insetRight = floor(root.clientWidth - (left + width)); 3132 const insetBottom = floor(root.clientHeight - (top + height)); 3133 const insetLeft = floor(left); 3134 const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px"; 3135 const options = { 3136 rootMargin, 3137 threshold: max(0, min(1, threshold)) || 1 3138 }; 3139 let isFirstUpdate = true; 3140 function handleObserve(entries) { 3141 const ratio = entries[0].intersectionRatio; 3142 if (ratio !== threshold) { 3143 if (!isFirstUpdate) { 3144 return refresh(); 3145 } 3146 if (!ratio) { 3147 // If the reference is clipped, the ratio is 0. Throttle the refresh 3148 // to prevent an infinite loop of updates. 3149 timeoutId = setTimeout(() => { 3150 refresh(false, 1e-7); 3151 }, 1000); 3152 } else { 3153 refresh(false, ratio); 3154 } 3155 } 3156 if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) { 3157 // It's possible that even though the ratio is reported as 1, the 3158 // element is not actually fully within the IntersectionObserver's root 3159 // area anymore. This can happen under performance constraints. This may 3160 // be a bug in the browser's IntersectionObserver implementation. To 3161 // work around this, we compare the element's bounding rect now with 3162 // what it was at the time we created the IntersectionObserver. If they 3163 // are not equal then the element moved, so we refresh. 3164 refresh(); 3165 } 3166 isFirstUpdate = false; 3167 } 3168 3169 // Older browsers don't support a `document` as the root and will throw an 3170 // error. 3171 try { 3172 io = new IntersectionObserver(handleObserve, { 3173 ...options, 3174 // Handle <iframe>s 3175 root: root.ownerDocument 3176 }); 3177 } catch (_e) { 3178 io = new IntersectionObserver(handleObserve, options); 3179 } 3180 io.observe(element); 3181 } 3182 refresh(true); 3183 return cleanup; 3184} 3185 3186/** 3187 * Automatically updates the position of the floating element when necessary. 3188 * Should only be called when the floating element is mounted on the DOM or 3189 * visible on the screen. 3190 * @returns cleanup function that should be invoked when the floating element is 3191 * removed from the DOM or hidden from the screen. 3192 * @see https://floating-ui.com/docs/autoUpdate 3193 */ 3194function autoUpdate(reference, floating, update, options) { 3195 if (options === void 0) { 3196 options = {}; 3197 } 3198 const { 3199 ancestorScroll = true, 3200 ancestorResize = true, 3201 elementResize = typeof ResizeObserver === 'function', 3202 layoutShift = typeof IntersectionObserver === 'function', 3203 animationFrame = false 3204 } = options; 3205 const referenceEl = unwrapElement(reference); 3206 const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : []; 3207 ancestors.forEach(ancestor => { 3208 ancestorScroll && ancestor.addEventListener('scroll', update, { 3209 passive: true 3210 }); 3211 ancestorResize && ancestor.addEventListener('resize', update); 3212 }); 3213 const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null; 3214 let reobserveFrame = -1; 3215 let resizeObserver = null; 3216 if (elementResize) { 3217 resizeObserver = new ResizeObserver(_ref => { 3218 let [firstEntry] = _ref; 3219 if (firstEntry && firstEntry.target === referenceEl && resizeObserver) { 3220 // Prevent update loops when using the `size` middleware. 3221 // https://github.com/floating-ui/floating-ui/issues/1740 3222 resizeObserver.unobserve(floating); 3223 cancelAnimationFrame(reobserveFrame); 3224 reobserveFrame = requestAnimationFrame(() => { 3225 var _resizeObserver; 3226 (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating); 3227 }); 3228 } 3229 update(); 3230 }); 3231 if (referenceEl && !animationFrame) { 3232 resizeObserver.observe(referenceEl); 3233 } 3234 resizeObserver.observe(floating); 3235 } 3236 let frameId; 3237 let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null; 3238 if (animationFrame) { 3239 frameLoop(); 3240 } 3241 function frameLoop() { 3242 const nextRefRect = getBoundingClientRect(reference); 3243 if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) { 3244 update(); 3245 } 3246 prevRefRect = nextRefRect; 3247 frameId = requestAnimationFrame(frameLoop); 3248 } 3249 update(); 3250 return () => { 3251 var _resizeObserver2; 3252 ancestors.forEach(ancestor => { 3253 ancestorScroll && ancestor.removeEventListener('scroll', update); 3254 ancestorResize && ancestor.removeEventListener('resize', update); 3255 }); 3256 cleanupIo == null || cleanupIo(); 3257 (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect(); 3258 resizeObserver = null; 3259 if (animationFrame) { 3260 cancelAnimationFrame(frameId); 3261 } 3262 }; 3263} 3264 3265/** 3266 *
3266Resolves with an object of overflow side offsets that determine how much the 3267 * element is overflowing a given clipping boundary on each side. 3268 * - positive = overflowing the boundary by that number of pixels 3269 * - negative = how many pixels left before it will overflow 3270 * - 0 = lies flush with the boundary 3271 * @see https://floating-ui.com/docs/detectOverflow 3272 */ 3273const detectOverflow = (/* unused pure expression or super */ null && (detectOverflow$1)); 3274 3275/** 3276 * Modifies the placement by translating the floating element along the 3277 * specified axes. 3278 * A number (shorthand for `mainAxis` or distance), or an axes configuration 3279 * object may be passed. 3280 * @see https://floating-ui.com/docs/offset 3281 */ 3282const offset = (/* unused pure expression or super */ null && (offset$1)); 3283 3284/** 3285 * Optimizes the visibility of the floating element by choosing the placement 3286 * that has the most space available automatically, without needing to specify a 3287 * preferred placement. Alternative to `flip`. 3288 * @see https://floating-ui.com/docs/autoPlacement 3289 */ 3290const autoPlacement = (/* unused pure expression or super */ null && (autoPlacement$1)); 3291 3292/** 3293 * Optimizes the visibility of the floating element by shifting it in order to 3294 * keep it in view when it will overflow the clipping boundary. 3295 * @see https://floating-ui.com/docs/shift 3296 */ 3297const shift = (/* unused pure expression or super */ null && (shift$1)); 3298 3299/** 3300 * Optimizes the visibility of the floating element by flipping the `placement` 3301 * in order to keep it in view when the preferred placement(s) will overflow the 3302 * clipping boundary. Alternative to `autoPlacement`. 3303 * @see https://floating-ui.com/docs/flip 3304 */ 3305const flip = (/* unused pure expression or super */ null && (flip$1)); 3306 3307/** 3308 * Provides data that allows you to change the size of the floating element â 3309 * for instance, prevent it from overflowing the clipping boundary or match the 3310 * width of the reference element. 3311 * @see https://floating-ui.com/docs/size 3312 */ 3313const size = (/* unused pure expression or super */ null && (size$1)); 3314 3315/** 3316 * Provides data to hide the floating element in applicable situations, such as 3317 * when it is not in the same clipping context as the reference element. 3318 * @see https://floating-ui.com/docs/hide 3319 */ 3320const hide = (/* unused pure expression or super */ null && (hide$1)); 3321 3322/** 3323 * Provides data to position an inner element of the floating element so that it 3324 * appears centered to the reference element. 3325 * @see https://floating-ui.com/docs/arrow 3326 */ 3327const arrow = (/* unused pure expression or super */ null && (arrow$1)); 3328 3329/** 3330 * Provides improved positioning for inline reference elements that can span 3331 * over multiple lines, such as hyperlinks or range selections. 3332 * @see https://floating-ui.com/docs/inline 3333 */ 3334const inline = (/* unused pure expression or super */ null && (inline$1)); 3335 3336/** 3337 * Built-in `limiter` that will stop `shift()` at a certain point. 3338 */ 3339const limitShift = (/* unused pure expression or super */ null && (limitShift$1)); 3340 3341/** 3342 * Computes the `x` and `y` coordinates that will place the floating element 3343 * next to a given reference element. 3344 */ 3345const computePosition = (reference, floating, options) => { 3346 // This caches the expensive `getClippingElementAncestors` function so that 3347 // multiple lifecycle resets re-use the same result. It only lives for a 3348 // single call. If other functions become expensive, we can add them as well. 3349 const cache = new Map(); 3350 const mergedOptions = { 3351 platform, 3352 ...options 3353 }; 3354 const platformWithCache = { 3355 ...mergedOptions.platform, 3356 _c: cache 3357 }; 3358 return computePosition$1(reference, floating, { 3359 ...mergedOptions, 3360 platform: platformWithCache 3361 }); 3362}; 3363 3364 3365 3366// EXTERNAL MODULE: ./node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js 3367var use_isomorphic_layout_effect_browser_esm = __webpack_require__(3469); 3368;// CONCATENATED MODULE: ./node_modules/react-select/dist/index-641ee5b8.esm.js 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"]; 3383// ============================== 3384// NO OP 3385// ============================== 3386 3387var noop = function noop() {}; 3388 3389// ============================== 3390// Class Name Prefixer 3391// ============================== 3392 3393/** 3394 String representation of component state for styling with class names. 3395
vendor: 13,973 bytes, lines 3396-3849
3396 Expects an array of strings OR a string/object pair: 3397 - className(['comp', 'comp-arg', 'comp-arg-2']) 3398 @returns 'react-select__comp react-select__comp-arg react-select__comp-arg-2' 3399 - className('comp', { some: true, state: false }) 3400 @returns 'react-select__comp react-select__comp--some' 3401*/ 3402function applyPrefixToName(prefix, name) { 3403 if (!name) { 3404 return prefix; 3405 } else if (name[0] === '-') { 3406 return prefix + name; 3407 } else { 3408 return prefix + '__' + name; 3409 } 3410} 3411function classNames(prefix, state) { 3412 for (var _len = arguments.length, classNameList = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { 3413 classNameList[_key - 2] = arguments[_key]; 3414 } 3415 var arr = [].concat(classNameList); 3416 if (state && prefix) { 3417 for (var key in state) { 3418 if (state.hasOwnProperty(key) && state[key]) { 3419 arr.push("".concat(applyPrefixToName(prefix, key))); 3420 } 3421 } 3422 } 3423 return arr.filter(function (i) { 3424 return i; 3425 }).map(function (i) { 3426 return String(i).trim(); 3427 }).join(' '); 3428} 3429// ============================== 3430// Clean Value 3431// ============================== 3432 3433var cleanValue = function cleanValue(value) { 3434 if (isArray(value)) return value.filter(Boolean); 3435 if ((0,esm_typeof/* default */.Z)(value) === 'object' && value !== null) return [value]; 3436 return []; 3437}; 3438 3439// ============================== 3440// Clean Common Props 3441// ============================== 3442 3443var cleanCommonProps = function cleanCommonProps(props) { 3444 //className 3445 props.className; 3446 props.clearValue; 3447 props.cx; 3448 props.getStyles; 3449 props.getClassNames; 3450 props.getValue; 3451 props.hasValue; 3452 props.isMulti; 3453 props.isRtl; 3454 props.options; 3455 props.selectOption; 3456 props.selectProps; 3457 props.setValue; 3458 props.theme; 3459 var innerProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded$4); 3460 return (0,objectSpread2/* default */.Z)({}, innerProps); 3461}; 3462 3463// ============================== 3464// Get Style Props 3465// ============================== 3466 3467var getStyleProps = function getStyleProps(props, name, classNamesState) { 3468 var cx = props.cx, 3469 getStyles = props.getStyles, 3470 getClassNames = props.getClassNames, 3471 className = props.className; 3472 return { 3473 css: getStyles(name, props), 3474 className: cx(classNamesState !== null && classNamesState !== void 0 ? classNamesState : {}, getClassNames(name, props), className) 3475 }; 3476}; 3477 3478// ============================== 3479// Handle Input Change 3480// ============================== 3481 3482function handleInputChange(inputValue, actionMeta, onInputChange) { 3483 if (onInputChange) { 3484 var _newValue = onInputChange(inputValue, actionMeta); 3485 if (typeof _newValue === 'string') return _newValue; 3486 } 3487 return inputValue; 3488} 3489 3490// ============================== 3491// Scroll Helpers 3492// ============================== 3493 3494function isDocumentElement(el) { 3495 return [document.documentElement, document.body, window].indexOf(el) > -1; 3496} 3497 3498// Normalized Scroll Top 3499// ------------------------------ 3500 3501function normalizedHeight(el) { 3502 if (isDocumentElement(el)) { 3503 return window.innerHeight; 3504 } 3505 return el.clientHeight; 3506} 3507 3508// Normalized scrollTo & scrollTop 3509// ------------------------------ 3510 3511function getScrollTop(el) { 3512 if (isDocumentElement(el)) { 3513 return window.pageYOffset; 3514 } 3515 return el.scrollTop; 3516} 3517function scrollTo(el, top) { 3518 // with a scroll distance, we perform scroll on the element 3519 if (isDocumentElement(el)) { 3520 window.scrollTo(0, top); 3521 return; 3522 } 3523 el.scrollTop = top; 3524} 3525 3526// Get Scroll Parent 3527// ------------------------------ 3528 3529function getScrollParent(element) { 3530 var style = getComputedStyle(element); 3531 var excludeStaticParent = style.position === 'absolute'; 3532 var overflowRx = /(auto|scroll)/; 3533 if (style.position === 'fixed') return document.documentElement; 3534 for (var parent = element; parent = parent.parentElement;) { 3535 style = getComputedStyle(parent); 3536 if (excludeStaticParent && style.position === 'static') { 3537 continue; 3538 } 3539 if (overflowRx.test(style.overflow + style.overflowY + style.overflowX)) { 3540 return parent; 3541 } 3542 } 3543 return document.documentElement; 3544} 3545 3546// Animated Scroll To 3547// ------------------------------ 3548 3549/** 3550 @param t: time (elapsed) 3551 @param b: initial value 3552 @param c: amount of change 3553 @param d: duration 3554*/ 3555function easeOutCubic(t, b, c, d) { 3556 return c * ((t = t / d - 1) * t * t + 1) + b; 3557} 3558function animatedScrollTo(element, to) { 3559 var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200; 3560 var callback = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop; 3561 var start = getScrollTop(element); 3562 var change = to - start; 3563 var increment = 10; 3564 var currentTime = 0; 3565 function animateScroll() { 3566 currentTime += increment; 3567 var val = easeOutCubic(currentTime, start, change, duration); 3568 scrollTo(element, val); 3569 if (currentTime < duration) { 3570 window.requestAnimationFrame(animateScroll); 3571 } else { 3572 callback(element); 3573 } 3574 } 3575 animateScroll(); 3576} 3577 3578// Scroll Into View 3579// ------------------------------ 3580 3581function scrollIntoView(menuEl, focusedEl) { 3582 var menuRect = menuEl.getBoundingClientRect(); 3583 var focusedRect = focusedEl.getBoundingClientRect(); 3584 var overScroll = focusedEl.offsetHeight / 3; 3585 if (focusedRect.bottom + overScroll > menuRect.bottom) { 3586 scrollTo(menuEl, Math.min(focusedEl.offsetTop + focusedEl.clientHeight - menuEl.offsetHeight + overScroll, menuEl.scrollHeight)); 3587 } else if (focusedRect.top - overScroll < menuRect.top) { 3588 scrollTo(menuEl, Math.max(focusedEl.offsetTop - overScroll, 0)); 3589 } 3590} 3591 3592// ============================== 3593// Get bounding client object 3594// ============================== 3595 3596// cannot get keys using array notation with DOMRect 3597function getBoundingClientObj(element) { 3598 var rect = element.getBoundingClientRect(); 3599 return { 3600 bottom: rect.bottom, 3601 height: rect.height, 3602 left: rect.left, 3603 right: rect.right, 3604 top: rect.top, 3605 width: rect.width 3606 }; 3607} 3608 3609// ============================== 3610// Touch Capability Detector 3611// ============================== 3612 3613function isTouchCapable() { 3614 try { 3615 document.createEvent('TouchEvent'); 3616 return true; 3617 } catch (e) { 3618 return false; 3619 } 3620} 3621 3622// ============================== 3623// Mobile Device Detector 3624// ============================== 3625 3626function isMobileDevice() { 3627 try { 3628 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); 3629 } catch (e) { 3630 return false; 3631 } 3632} 3633 3634// ============================== 3635// Passive Event Detector 3636// ============================== 3637 3638// https://github.com/rafgraph/detect-it/blob/main/src/index.ts#L19-L36 3639var passiveOptionAccessed = false; 3640var options = { 3641 get passive() { 3642 return passiveOptionAccessed = true; 3643 } 3644}; 3645// check for SSR 3646var w = typeof window !== 'undefined' ? window : {}; 3647if (w.addEventListener && w.removeEventListener) { 3648 w.addEventListener('p', noop, options); 3649 w.removeEventListener('p', noop, false); 3650} 3651var supportsPassiveEvents = passiveOptionAccessed; 3652function notNullish(item) { 3653 return item != null; 3654} 3655function isArray(arg) { 3656 return Array.isArray(arg); 3657} 3658function valueTernary(isMulti, multiValue, singleValue) { 3659 return isMulti ? multiValue : singleValue; 3660} 3661function singleValueAsValue(singleValue) { 3662 return singleValue; 3663} 3664function multiValueAsValue(multiValue) { 3665 return multiValue; 3666} 3667var removeProps = function removeProps(propsObj) { 3668 for (var _len2 = arguments.length, properties = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 3669 properties[_key2 - 1] = arguments[_key2]; 3670 } 3671 var propsMap = Object.entries(propsObj).filter(function (_ref) { 3672 var _ref2 = (0,slicedToArray/* default */.Z)(_ref, 1), 3673 key = _ref2[0]; 3674 return !properties.includes(key); 3675 }); 3676 return propsMap.reduce(function (newProps, _ref3) { 3677 var _ref4 = (0,slicedToArray/* default */.Z)(_ref3, 2), 3678 key = _ref4[0], 3679 val = _ref4[1]; 3680 newProps[key] = val; 3681 return newProps; 3682 }, {}); 3683}; 3684 3685var _excluded$3 = ["children", "innerProps"], 3686 _excluded2$1 = ["children", "innerProps"]; 3687function getMenuPlacement(_ref) { 3688 var preferredMaxHeight = _ref.maxHeight, 3689 menuEl = _ref.menuEl, 3690 minHeight = _ref.minHeight, 3691 preferredPlacement = _ref.placement, 3692 shouldScroll = _ref.shouldScroll, 3693 isFixedPosition = _ref.isFixedPosition, 3694 controlHeight = _ref.controlHeight; 3695 var scrollParent = getScrollParent(menuEl); 3696 var defaultState = { 3697 placement: 'bottom', 3698 maxHeight: preferredMaxHeight 3699 }; 3700 3701 // something went wrong, return default state 3702 if (!menuEl || !menuEl.offsetParent) return defaultState; 3703 3704 // we can't trust `scrollParent.scrollHeight` --> it may increase when 3705 // the menu is rendered 3706 var _scrollParent$getBoun = scrollParent.getBoundingClientRect(), 3707 scrollHeight = _scrollParent$getBoun.height; 3708 var _menuEl$getBoundingCl = menuEl.getBoundingClientRect(), 3709 menuBottom = _menuEl$getBoundingCl.bottom, 3710 menuHeight = _menuEl$getBoundingCl.height, 3711 menuTop = _menuEl$getBoundingCl.top; 3712 var _menuEl$offsetParent$ = menuEl.offsetParent.getBoundingClientRect(), 3713 containerTop = _menuEl$offsetParent$.top; 3714 var viewHeight = isFixedPosition ? window.innerHeight : normalizedHeight(scrollParent); 3715 var scrollTop = getScrollTop(scrollParent); 3716 var marginBottom = parseInt(getComputedStyle(menuEl).marginBottom, 10); 3717 var marginTop = parseInt(getComputedStyle(menuEl).marginTop, 10); 3718 var viewSpaceAbove = containerTop - marginTop; 3719 var viewSpaceBelow = viewHeight - menuTop; 3720 var scrollSpaceAbove = viewSpaceAbove + scrollTop; 3721 var scrollSpaceBelow = scrollHeight - scrollTop - menuTop; 3722 var scrollDown = menuBottom - viewHeight + scrollTop + marginBottom; 3723 var scrollUp = scrollTop + menuTop - marginTop; 3724 var scrollDuration = 160; 3725 switch (preferredPlacement) { 3726 case 'auto': 3727 case 'bottom': 3728 // 1: the menu will fit, do nothing 3729 if (viewSpaceBelow >= menuHeight) { 3730 return { 3731 placement: 'bottom', 3732 maxHeight: preferredMaxHeight 3733 }; 3734 } 3735 3736 // 2: the menu will fit, if scrolled 3737 if (scrollSpaceBelow >= menuHeight && !isFixedPosition) { 3738 if (shouldScroll) { 3739 animatedScrollTo(scrollParent, scrollDown, scrollDuration); 3740 } 3741 return { 3742 placement: 'bottom', 3743 maxHeight: preferredMaxHeight 3744 }; 3745 } 3746 3747 // 3: the menu will fit, if constrained 3748 if (!isFixedPosition && scrollSpaceBelow >= minHeight || isFixedPosition && viewSpaceBelow >= minHeight) { 3749 if (shouldScroll) { 3750 animatedScrollTo(scrollParent, scrollDown, scrollDuration); 3751 } 3752 3753 // we want to provide as much of the menu as possible to the user, 3754 // so give them whatever is available below rather than the minHeight. 3755 var constrainedHeight = isFixedPosition ? viewSpaceBelow - marginBottom : scrollSpaceBelow - marginBottom; 3756 return { 3757 placement: 'bottom', 3758 maxHeight: constrainedHeight 3759 }; 3760 } 3761 3762 // 4. Forked beviour when there isn't enough space below 3763 3764 // AUTO: flip the menu, render above 3765 if (preferredPlacement === 'auto' || isFixedPosition) { 3766 // may need to be constrained after flipping 3767 var _constrainedHeight = preferredMaxHeight; 3768 var spaceAbove = isFixedPosition ? viewSpaceAbove : scrollSpaceAbove; 3769 if (spaceAbove >= minHeight) { 3770 _constrainedHeight = Math.min(spaceAbove - marginBottom - controlHeight, preferredMaxHeight); 3771 } 3772 return { 3773 placement: 'top', 3774 maxHeight: _constrainedHeight 3775 }; 3776 } 3777 3778 // BOTTOM: allow browser to increase scrollable area and immediately set scroll 3779 if (preferredPlacement === 'bottom') { 3780 if (shouldScroll) { 3781 scrollTo(scrollParent, scrollDown); 3782 } 3783 return { 3784 placement: 'bottom', 3785 maxHeight: preferredMaxHeight 3786 }; 3787 } 3788 break; 3789 case 'top': 3790 // 1: the menu will fit, do nothing 3791 if (viewSpaceAbove >= menuHeight) { 3792 return { 3793 placement: 'top', 3794 maxHeight: preferredMaxHeight 3795 }; 3796 } 3797 3798 // 2: the menu will fit, if scrolled 3799 if (scrollSpaceAbove >= menuHeight && !isFixedPosition) { 3800 if (shouldScroll) { 3801 animatedScrollTo(scrollParent, scrollUp, scrollDuration); 3802 } 3803 return { 3804 placement: 'top', 3805 maxHeight: preferredMaxHeight 3806 }; 3807 } 3808 3809 // 3: the menu will fit, if constrained 3810 if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) { 3811 var _constrainedHeight2 = preferredMaxHeight; 3812 3813 // we want to provide as much of the menu as possible to the user, 3814 // so give them whatever is available below rather than the minHeight. 3815 if (!isFixedPosition && scrollSpaceAbove >= minHeight || isFixedPosition && viewSpaceAbove >= minHeight) { 3816 _constrainedHeight2 = isFixedPosition ? viewSpaceAbove - marginTop : scrollSpaceAbove - marginTop; 3817 } 3818 if (shouldScroll) { 3819 animatedScrollTo(scrollParent, scrollUp, scrollDuration); 3820 } 3821 return { 3822 placement: 'top', 3823 maxHeight: _constrainedHeight2 3824 }; 3825 } 3826 3827 // 4. not enough space, the browser WILL NOT increase scrollable area when 3828 // absolutely positioned element rendered above the viewport (only below). 3829 // Flip the menu, render below 3830 return { 3831 placement: 'bottom', 3832 maxHeight: preferredMaxHeight 3833 }; 3834 default: 3835 throw new Error("Invalid placement provided \"".concat(preferredPlacement, "\".")); 3836 } 3837 return defaultState; 3838} 3839 3840// Menu Component 3841// ------------------------------ 3842 3843function alignToControl(placement) { 3844 var placementToCSSProp = { 3845 bottom: 'top', 3846 top: 'bottom' 3847 }; 3848 return placement ? placementToCSSProp[placement] : 'bottom'; 3849}
3850var coercePlacement = function coercePlacement(p) { 3851 return p === 'auto' ? 'bottom' : p; 3852}; 3853var menuCSS = function menuCSS(_ref2, unstyled) { 3854 var _objectSpread2; 3855 var placement = _ref2.placement, 3856 _ref2$theme = _ref2.theme, 3857 borderRadius = _ref2$theme.borderRadius, 3858 spacing = _ref2$theme.spacing, 3859 colors = _ref2$theme.colors; 3860 return (0,objectSpread2/* default */.Z)((_objectSpread2 = { 3861 label: 'menu' 3862 }, (0,defineProperty/* default */.Z)(_objectSpread2, alignToControl(placement), '100%'), (0,defineProperty/* default */.Z)(_objectSpread2, "position", 'absolute'), (0,defineProperty/* default */.Z)(_objectSpread2, "width", '100%'), (0,defineProperty/* default */.Z)(_objectSpread2, "zIndex", 1), _objectSpread2), unstyled ? {} : { 3863 backgroundColor: colors.neutral0, 3864 borderRadius: borderRadius, 3865 boxShadow: '0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)', 3866 marginBottom: spacing.menuGutter, 3867 marginTop: spacing.menuGutter 3868 }); 3869}; 3870var PortalPlacementContext = /*#__PURE__*/(0,react.createContext)(null); 3871 3872// NOTE: internal only 3873var MenuPlacer = function MenuPlacer(props) { 3874 var children = props.children, 3875 minMenuHeight = props.minMenuHeight, 3876 maxMenuHeight = props.maxMenuHeight, 3877 menuPlacement = props.menuPlacement, 3878 menuPosition = props.menuPosition, 3879 menuShouldScrollIntoView = props.menuShouldScrollIntoView, 3880 theme = props.theme; 3881 var _ref3 = (0,react.useContext)(PortalPlacementContext) || {}, 3882 setPortalPlacement = _ref3.setPortalPlacement; 3883 var ref = (0,react.useRef)(null); 3884 var _useState = (0,react.useState)(maxMenuHeight), 3885 _useState2 = (0,slicedToArray/* default */.Z)(_useState, 2), 3886 maxHeight = _useState2[0], 3887 setMaxHeight = _useState2[1]; 3888 var _useState3 = (0,react.useState)(null), 3889 _useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2), 3890 placement = _useState4[0], 3891 setPlacement = _useState4[1]; 3892 var controlHeight = theme.spacing.controlHeight; 3893 (0,use_isomorphic_layout_effect_browser_esm/* default */.Z)(function () { 3894 var menuEl = ref.current; 3895 if (!menuEl) return; 3896 3897 // DO NOT scroll if position is fixed 3898 var isFixedPosition = menuPosition === 'fixed'; 3899 var shouldScroll = menuShouldScrollIntoView && !isFixedPosition; 3900 var state = getMenuPlacement({ 3901 maxHeight: maxMenuHeight, 3902 menuEl: menuEl, 3903 minHeight: minMenuHeight, 3904 placement: menuPlacement, 3905 shouldScroll: shouldScroll, 3906 isFixedPosition: isFixedPosition, 3907 controlHeight: controlHeight 3908 }); 3909 setMaxHeight(state.maxHeight); 3910 setPlacement(state.placement); 3911 setPortalPlacement === null || setPortalPlacement === void 0 ? void 0 : setPortalPlacement(state.placement); 3912 }, [maxMenuHeight, menuPlacement, menuPosition, menuShouldScrollIntoView, minMenuHeight, setPortalPlacement, controlHeight]); 3913 return children({ 3914 ref: ref, 3915 placerProps: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { 3916 placement: placement || coercePlacement(menuPlacement), 3917 maxHeight: maxHeight 3918 }) 3919 }); 3920}; 3921var Menu = function Menu(props) { 3922 var children = props.children, 3923 innerRef = props.innerRef, 3924 innerProps = props.innerProps; 3925 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'menu', { 3926 menu: true 3927 }), { 3928 ref: innerRef 3929 }, innerProps), children); 3930}; 3931var Menu$1 = Menu; 3932 3933// ============================== 3934// Menu List 3935// ============================== 3936 3937var menuListCSS = function menuListCSS(_ref4, unstyled) { 3938 var maxHeight = _ref4.maxHeight, 3939 baseUnit = _ref4.theme.spacing.baseUnit; 3940 return (0,objectSpread2/* default */.Z)({ 3941 maxHeight: maxHeight, 3942 overflowY: 'auto', 3943 position: 'relative', 3944 // required for offset[Height, Top] > keyboard scroll 3945 WebkitOverflowScrolling: 'touch' 3946 }, unstyled ? {} : { 3947 paddingBottom: baseUnit, 3948 paddingTop: baseUnit 3949 }); 3950}; 3951var MenuList = function MenuList(props) { 3952 var children = props.children, 3953 innerProps = props.innerProps, 3954 innerRef = props.innerRef, 3955 isMulti = props.isMulti; 3956 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'menuList', { 3957 'menu-list': true, 3958 'menu-list--is-multi': isMulti 3959 }), { 3960 ref: innerRef 3961 }, innerProps), children); 3962}; 3963 3964// ============================== 3965// Menu Notices 3966// ============================== 3967 3968var noticeCSS = function noticeCSS(_ref5, unstyled) { 3969 var _ref5$theme = _ref5.theme, 3970 baseUnit = _ref5$theme.spacing.baseUnit, 3971 colors = _ref5$theme.colors; 3972 return (0,objectSpread2/* default */.Z)({ 3973 textAlign: 'center' 3974 }, unstyled ? {} : { 3975 color: colors.neutral40, 3976 padding: "".concat(baseUnit * 2, "px ").concat(baseUnit * 3, "px") 3977 }); 3978}; 3979var noOptionsMessageCSS = noticeCSS; 3980var loadingMessageCSS = noticeCSS; 3981var NoOptionsMessage = function NoOptionsMessage(_ref6) { 3982 var _ref6$children = _ref6.children, 3983 children = _ref6$children === void 0 ? 'No options' : _ref6$children, 3984 innerProps = _ref6.innerProps, 3985 restProps = (0,objectWithoutProperties/* default */.Z)(_ref6, _excluded$3); 3986 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, restProps), {}, { 3987 children: children, 3988 innerProps: innerProps 3989 }), 'noOptionsMessage', { 3990 'menu-notice': true, 3991 'menu-notice--no-options': true 3992 }), innerProps), children); 3993};
3994var LoadingMessage = function LoadingMessage(_ref7) { 3995 var _ref7$children = _ref7.children, 3996 children = _ref7$children === void 0 ? 'Loading...' : _ref7$children, 3997 innerProps = _ref7.innerProps, 3998 restProps = (0,objectWithoutProperties/* default */.Z)(_ref7, _excluded2$1); 3999 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, restProps), {}, { 4000 children: children, 4001 innerProps: innerProps 4002 }), 'loadingMessage', { 4003 'menu-notice': true, 4004 'menu-notice--loading': true 4005 }), innerProps), children); 4006}; 4007 4008// ============================== 4009// Menu Portal 4010// ============================== 4011 4012var menuPortalCSS = function menuPortalCSS(_ref8) { 4013 var rect = _ref8.rect, 4014 offset = _ref8.offset, 4015 position = _ref8.position; 4016 return { 4017 left: rect.left, 4018 position: position, 4019 top: offset, 4020 width: rect.width, 4021 zIndex: 1 4022 }; 4023}; 4024var MenuPortal = function MenuPortal(props) { 4025 var appendTo = props.appendTo, 4026 children = props.children, 4027 controlElement = props.controlElement, 4028 innerProps = props.innerProps, 4029 menuPlacement = props.menuPlacement, 4030 menuPosition = props.menuPosition; 4031 var menuPortalRef = (0,react.useRef)(null); 4032 var cleanupRef = (0,react.useRef)(null); 4033 var _useState5 = (0,react.useState)(coercePlacement(menuPlacement)), 4034 _useState6 = (0,slicedToArray/* default */.Z)(_useState5, 2), 4035 placement = _useState6[0], 4036 setPortalPlacement = _useState6[1]; 4037 var portalPlacementContext = (0,react.useMemo)(function () { 4038 return { 4039 setPortalPlacement: setPortalPlacement 4040 }; 4041 }, []); 4042 var _useState7 = (0,react.useState)(null), 4043 _useState8 = (0,slicedToArray/* default */.Z)(_useState7, 2), 4044 computedPosition = _useState8[0], 4045 setComputedPosition = _useState8[1]; 4046 var updateComputedPosition = (0,react.useCallback)(function () { 4047 if (!controlElement) return; 4048 var rect = getBoundingClientObj(controlElement); 4049 var scrollDistance = menuPosition === 'fixed' ? 0 : window.pageYOffset; 4050 var offset = rect[placement] + scrollDistance; 4051 if (offset !== (computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.offset) || rect.left !== (computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.left) || rect.width !== (computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.width)) { 4052 setComputedPosition({ 4053 offset: offset, 4054 rect: rect 4055 }); 4056 } 4057 }, [controlElement, menuPosition, placement, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.offset, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.left, computedPosition === null || computedPosition === void 0 ? void 0 : computedPosition.rect.width]); 4058 (0,use_isomorphic_layout_effect_browser_esm/* default */.Z)(function () { 4059 updateComputedPosition(); 4060 }, [updateComputedPosition]); 4061 var runAutoUpdate = (0,react.useCallback)(function () { 4062 if (typeof cleanupRef.current === 'function') { 4063 cleanupRef.current(); 4064 cleanupRef.current = null; 4065 } 4066 if (controlElement && menuPortalRef.current) { 4067 cleanupRef.current = autoUpdate(controlElement, menuPortalRef.current, updateComputedPosition, { 4068 elementResize: 'ResizeObserver' in window 4069 }); 4070 } 4071 }, [controlElement, updateComputedPosition]); 4072 (0,use_isomorphic_layout_effect_browser_esm/* default */.Z)(function () { 4073 runAutoUpdate(); 4074 }, [runAutoUpdate]); 4075 var setMenuPortalElement = (0,react.useCallback)(function (menuPortalElement) { 4076 menuPortalRef.current = menuPortalElement; 4077 runAutoUpdate(); 4078 }, [runAutoUpdate]); 4079 4080 // bail early if required elements aren't present 4081 if (!appendTo && menuPosition !== 'fixed' || !computedPosition) return null; 4082 4083 // same wrapper element whether fixed or portalled 4084 var menuWrapper = jsx("div", (0,esm_extends/* default */.Z)({ 4085 ref: setMenuPortalElement 4086 }, getStyleProps((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, props), {}, { 4087 offset: computedPosition.offset, 4088 position: menuPosition, 4089 rect: computedPosition.rect
4090 }), 'menuPortal', { 4091 'menu-portal': true 4092 }), innerProps), children); 4093 return jsx(PortalPlacementContext.Provider, { 4094 value: portalPlacementContext 4095 }, appendTo ? /*#__PURE__*/(0,react_dom.createPortal)(menuWrapper, appendTo) : menuWrapper); 4096}; 4097 4098// ============================== 4099// Root Container 4100// ============================== 4101 4102var containerCSS = function containerCSS(_ref) { 4103 var isDisabled = _ref.isDisabled, 4104 isRtl = _ref.isRtl; 4105 return { 4106 label: 'container', 4107 direction: isRtl ? 'rtl' : undefined, 4108 pointerEvents: isDisabled ? 'none' : undefined, 4109 // cancel mouse events when disabled 4110 position: 'relative' 4111 }; 4112}; 4113var SelectContainer = function SelectContainer(props) { 4114 var children = props.children, 4115 innerProps = props.innerProps, 4116 isDisabled = props.isDisabled, 4117 isRtl = props.isRtl; 4118 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'container', { 4119 '--is-disabled': isDisabled, 4120 '--is-rtl': isRtl 4121 }), innerProps), children); 4122}; 4123 4124// ============================== 4125// Value Container 4126// ============================== 4127 4128var valueContainerCSS = function valueContainerCSS(_ref2, unstyled) { 4129 var spacing = _ref2.theme.spacing, 4130 isMulti = _ref2.isMulti, 4131 hasValue = _ref2.hasValue, 4132 controlShouldRenderValue = _ref2.selectProps.controlShouldRenderValue; 4133 return (0,objectSpread2/* default */.Z)({ 4134 alignItems: 'center', 4135 display: isMulti && hasValue && controlShouldRenderValue ? 'flex' : 'grid', 4136 flex: 1, 4137 flexWrap: 'wrap', 4138 WebkitOverflowScrolling: 'touch', 4139 position: 'relative', 4140 overflow: 'hidden' 4141 }, unstyled ? {} : { 4142 padding: "".concat(spacing.baseUnit / 2, "px ").concat(spacing.baseUnit * 2, "px") 4143 }); 4144}; 4145var ValueContainer = function ValueContainer(props) { 4146 var children = props.children, 4147 innerProps = props.innerProps, 4148 isMulti = props.isMulti, 4149 hasValue = props.hasValue; 4150 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'valueContainer', { 4151 'value-container': true, 4152 'value-container--is-multi': isMulti, 4153 'value-container--has-value': hasValue 4154 }), innerProps), children); 4155}; 4156 4157// ============================== 4158// Indicator Container 4159// ============================== 4160 4161var indicatorsContainerCSS = function indicatorsContainerCSS() { 4162 return { 4163 alignItems: 'center', 4164 alignSelf: 'stretch', 4165 display: 'flex', 4166 flexShrink: 0 4167 }; 4168}; 4169var IndicatorsContainer = function IndicatorsContainer(props) { 4170 var children = props.children, 4171 innerProps = props.innerProps; 4172 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'indicatorsContainer', { 4173 indicators: true 4174 }), innerProps), children); 4175}; 4176 4177var _templateObject; 4178var _excluded$2 = ["size"], 4179 _excluded2 = ["innerProps", "isRtl", "size"]; 4180function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } 4181 4182// ============================== 4183// Dropdown & Clear Icons 4184// ============================== 4185var _ref2 = true ? { 4186 name: "8mmkcg", 4187 styles: "display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0" 4188} : 0; 4189var Svg = function Svg(_ref) { 4190 var size = _ref.size, 4191 props = (0,objectWithoutProperties/* default */.Z)(_ref, _excluded$2); 4192 return jsx("svg", (0,esm_extends/* default */.Z)({ 4193 height: size, 4194 width: size, 4195 viewBox: "0 0 20 20", 4196 "aria-hidden": "true", 4197 focusable: "false", 4198 css: _ref2 4199 }, props)); 4200}; 4201var CrossIcon = function CrossIcon(props) { 4202 return jsx(Svg, (0,esm_extends/* default */.Z)({ 4203 size: 20 4204 }, props), jsx("path", { 4205 d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z" 4206 })); 4207}; 4208var DownChevron = function DownChevron(props) { 4209 return jsx(Svg, (0,esm_extends/* default */.Z)({ 4210 size: 20 4211 }, props), jsx("path", { 4212 d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" 4213 })); 4214}; 4215 4216// ============================== 4217// Dropdown & Clear Buttons 4218// ============================== 4219
4220var baseCSS = function baseCSS(_ref3, unstyled) { 4221 var isFocused = _ref3.isFocused, 4222 _ref3$theme = _ref3.theme, 4223 baseUnit = _ref3$theme.spacing.baseUnit, 4224 colors = _ref3$theme.colors; 4225 return (0,objectSpread2/* default */.Z)({ 4226 label: 'indicatorContainer', 4227 display: 'flex', 4228 transition: 'color 150ms' 4229 }, unstyled ? {} : { 4230 color: isFocused ? colors.neutral60 : colors.neutral20, 4231 padding: baseUnit * 2, 4232 ':hover': { 4233 color: isFocused ? colors.neutral80 : colors.neutral40 4234 } 4235 }); 4236}; 4237var dropdownIndicatorCSS = baseCSS; 4238var DropdownIndicator = function DropdownIndicator(props) { 4239 var children = props.children, 4240 innerProps = props.innerProps; 4241 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'dropdownIndicator', { 4242 indicator: true, 4243 'dropdown-indicator': true 4244 }), innerProps), children || jsx(DownChevron, null)); 4245}; 4246var clearIndicatorCSS = baseCSS; 4247var ClearIndicator = function ClearIndicator(props) { 4248 var children = props.children, 4249 innerProps = props.innerProps; 4250 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'clearIndicator', { 4251 indicator: true, 4252 'clear-indicator': true 4253 }), innerProps), children || jsx(CrossIcon, null)); 4254}; 4255 4256// ============================== 4257// Separator 4258// ============================== 4259 4260var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref4, unstyled) { 4261 var isDisabled = _ref4.isDisabled, 4262 _ref4$theme = _ref4.theme, 4263 baseUnit = _ref4$theme.spacing.baseUnit, 4264 colors = _ref4$theme.colors; 4265 return (0,objectSpread2/* default */.Z)({ 4266 label: 'indicatorSeparator', 4267 alignSelf: 'stretch', 4268 width: 1 4269 }, unstyled ? {} : { 4270 backgroundColor: isDisabled ? colors.neutral10 : colors.neutral20, 4271 marginBottom: baseUnit * 2, 4272 marginTop: baseUnit * 2 4273 }); 4274}; 4275var IndicatorSeparator = function IndicatorSeparator(props) { 4276 var innerProps = props.innerProps; 4277 return jsx("span", (0,esm_extends/* default */.Z)({}, innerProps, getStyleProps(props, 'indicatorSeparator', { 4278 'indicator-separator': true 4279 }))); 4280}; 4281 4282// ============================== 4283// Loading 4284// ============================== 4285 4286var loadingDotAnimations = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))); 4287var loadingIndicatorCSS = function loadingIndicatorCSS(_ref5, unstyled) { 4288 var isFocused = _ref5.isFocused, 4289 size = _ref5.size, 4290 _ref5$theme = _ref5.theme, 4291 colors = _ref5$theme.colors, 4292 baseUnit = _ref5$theme.spacing.baseUnit; 4293 return (0,objectSpread2/* default */.Z)({ 4294 label: 'loadingIndicator', 4295 display: 'flex', 4296 transition: 'color 150ms', 4297 alignSelf: 'center', 4298 fontSize: size, 4299 lineHeight: 1, 4300 marginRight: size, 4301 textAlign: 'center', 4302 verticalAlign: 'middle' 4303 }, unstyled ? {} : { 4304 color: isFocused ? colors.neutral60 : colors.neutral20, 4305 padding: baseUnit * 2 4306 }); 4307}; 4308var LoadingDot = function LoadingDot(_ref6) { 4309 var delay = _ref6.delay, 4310 offset = _ref6.offset; 4311 return jsx("span", { 4312 css: /*#__PURE__*/css({ 4313 animation: "".concat(loadingDotAnimations, " 1s ease-in-out ").concat(delay, "ms infinite;"), 4314 backgroundColor: 'currentColor', 4315 borderRadius: '1em', 4316 display: 'inline-block', 4317 marginLeft: offset ? '1em' : undefined, 4318 height: '1em', 4319 verticalAlign: 'top', 4320 width: '1em' 4321 }, true ? "" : 0, true ? "" : 0) 4322 }); 4323}; 4324var LoadingIndicator = function LoadingIndicator(_ref7) { 4325 var innerProps = _ref7.innerProps, 4326 isRtl = _ref7.isRtl, 4327 _ref7$size = _ref7.size, 4328 size = _ref7$size === void 0 ? 4 : _ref7$size, 4329 restProps = (0,objectWithoutProperties/* default */.Z)(_ref7, _excluded2); 4330 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, restProps), {}, { 4331 innerProps: innerProps, 4332 isRtl: isRtl, 4333 size: size 4334 }), 'loadingIndicator', { 4335 indicator: true, 4336 'loading-indicator': true 4337 }), innerProps), jsx(LoadingDot, { 4338 delay: 0, 4339 offset: isRtl 4340 }), jsx(LoadingDot, { 4341 delay: 160, 4342 offset: true 4343 }), jsx(LoadingDot, { 4344 delay: 320, 4345 offset: !isRtl 4346 })); 4347}; 4348 4349var css$1 = function css(_ref, unstyled) { 4350 var isDisabled = _ref.isDisabled, 4351 isFocused = _ref.isFocused, 4352 _ref$theme = _ref.theme, 4353 colors = _ref$theme.colors, 4354 borderRadius = _ref$theme.borderRadius, 4355 spacing = _ref$theme.spacing; 4356 return (0,objectSpread2/* default */.Z)({ 4357 label: 'control', 4358 alignItems: 'center', 4359 cursor: 'default', 4360 display: 'flex', 4361 flexWrap: 'wrap', 4362 justifyContent: 'space-between', 4363 minHeight: spacing.controlHeight, 4364 outline: '0 !important', 4365 position: 'relative', 4366 transition: 'all 100ms' 4367 }, unstyled ? {} : { 4368 backgroundColor: isDisabled ? colors.neutral5 : colors.neutral0, 4369 borderColor: isDisabled ? colors.neutral10 : isFocused ? colors.primary : colors.neutral20, 4370 borderRadius: borderRadius, 4371 borderStyle: 'solid', 4372 borderWidth: 1, 4373 boxShadow: isFocused ? "0 0 0 1px ".concat(colors.primary) : undefined, 4374 '&:hover': { 4375 borderColor: isFocused ? colors.primary : colors.neutral30 4376 } 4377 }); 4378}; 4379var Control = function Control(props) { 4380 var children = props.children, 4381 isDisabled = props.isDisabled, 4382 isFocused = props.isFocused, 4383 innerRef = props.innerRef, 4384 innerProps = props.innerProps, 4385 menuIsOpen = props.menuIsOpen; 4386 return jsx("div", (0,esm_extends/* default */.Z)({ 4387 ref: innerRef 4388 }, getStyleProps(props, 'control', { 4389 control: true, 4390 'control--is-disabled': isDisabled, 4391 'control--is-focused': isFocused, 4392 'control--menu-is-open': menuIsOpen 4393 }), innerProps, { 4394 "aria-disabled": isDisabled || undefined 4395 }), children); 4396}; 4397var Control$1 = Control; 4398 4399var _excluded$1 = ["data"]; 4400var groupCSS = function groupCSS(_ref, unstyled) { 4401 var spacing = _ref.theme.spacing; 4402 return unstyled ? {} : { 4403 paddingBottom: spacing.baseUnit * 2, 4404 paddingTop: spacing.baseUnit * 2 4405 }; 4406}; 4407var Group = function Group(props) { 4408 var children = props.children, 4409 cx = props.cx, 4410 getStyles = props.getStyles, 4411 getClassNames = props.getClassNames, 4412 Heading = props.Heading, 4413 headingProps = props.headingProps, 4414 innerProps = props.innerProps, 4415 label = props.label, 4416 theme = props.theme, 4417 selectProps = props.selectProps; 4418 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'group', { 4419 group: true 4420 }
vendor: 17,334 bytes, lines 4420-4937
4420), innerProps), jsx(Heading, (0,esm_extends/* default */.Z)({}, headingProps, { 4421 selectProps: selectProps, 4422 theme: theme, 4423 getStyles: getStyles, 4424 getClassNames: getClassNames, 4425 cx: cx 4426 }), label), jsx("div", null, children)); 4427}; 4428var groupHeadingCSS = function groupHeadingCSS(_ref2, unstyled) { 4429 var _ref2$theme = _ref2.theme, 4430 colors = _ref2$theme.colors, 4431 spacing = _ref2$theme.spacing; 4432 return (0,objectSpread2/* default */.Z)({ 4433 label: 'group', 4434 cursor: 'default', 4435 display: 'block' 4436 }, unstyled ? {} : { 4437 color: colors.neutral40, 4438 fontSize: '75%', 4439 fontWeight: 500, 4440 marginBottom: '0.25em', 4441 paddingLeft: spacing.baseUnit * 3, 4442 paddingRight: spacing.baseUnit * 3, 4443 textTransform: 'uppercase' 4444 }); 4445}; 4446var GroupHeading = function GroupHeading(props) { 4447 var _cleanCommonProps = cleanCommonProps(props); 4448 _cleanCommonProps.data; 4449 var innerProps = (0,objectWithoutProperties/* default */.Z)(_cleanCommonProps, _excluded$1); 4450 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'groupHeading', { 4451 'group-heading': true 4452 }), innerProps)); 4453}; 4454var Group$1 = Group; 4455 4456var _excluded = ["innerRef", "isDisabled", "isHidden", "inputClassName"]; 4457var inputCSS = function inputCSS(_ref, unstyled) { 4458 var isDisabled = _ref.isDisabled, 4459 value = _ref.value, 4460 _ref$theme = _ref.theme, 4461 spacing = _ref$theme.spacing, 4462 colors = _ref$theme.colors; 4463 return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({ 4464 visibility: isDisabled ? 'hidden' : 'visible', 4465 // force css to recompute when value change due to @emotion bug. 4466 // We can remove it whenever the bug is fixed. 4467 transform: value ? 'translateZ(0)' : '' 4468 }, containerStyle), unstyled ? {} : { 4469 margin: spacing.baseUnit / 2, 4470 paddingBottom: spacing.baseUnit / 2, 4471 paddingTop: spacing.baseUnit / 2, 4472 color: colors.neutral80 4473 }); 4474}; 4475var spacingStyle = { 4476 gridArea: '1 / 2', 4477 font: 'inherit', 4478 minWidth: '2px', 4479 border: 0, 4480 margin: 0, 4481 outline: 0, 4482 padding: 0 4483}; 4484var containerStyle = { 4485 flex: '1 1 auto', 4486 display: 'inline-grid', 4487 gridArea: '1 / 1 / 2 / 3', 4488 gridTemplateColumns: '0 min-content', 4489 '&:after': (0,objectSpread2/* default */.Z)({ 4490 content: 'attr(data-value) " "', 4491 visibility: 'hidden', 4492 whiteSpace: 'pre' 4493 }, spacingStyle) 4494}; 4495var inputStyle = function inputStyle(isHidden) { 4496 return (0,objectSpread2/* default */.Z)({ 4497 label: 'input', 4498 color: 'inherit', 4499 background: 0, 4500 opacity: isHidden ? 0 : 1, 4501 width: '100%' 4502 }, spacingStyle); 4503}; 4504var Input = function Input(props) { 4505 var cx = props.cx, 4506 value = props.value; 4507 var _cleanCommonProps = cleanCommonProps(props), 4508 innerRef = _cleanCommonProps.innerRef, 4509 isDisabled = _cleanCommonProps.isDisabled, 4510 isHidden = _cleanCommonProps.isHidden, 4511 inputClassName = _cleanCommonProps.inputClassName, 4512 innerProps = (0,objectWithoutProperties/* default */.Z)(_cleanCommonProps, _excluded); 4513 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'input', { 4514 'input-container': true 4515 }), { 4516 "data-value": value || '' 4517 }), jsx("input", (0,esm_extends/* default */.Z)({ 4518 className: cx({ 4519 input: true 4520 }, inputClassName), 4521 ref: innerRef, 4522 style: inputStyle(isHidden), 4523 disabled: isDisabled 4524 }, innerProps))); 4525}; 4526var Input$1 = Input; 4527 4528var multiValueCSS = function multiValueCSS(_ref, unstyled) { 4529 var _ref$theme = _ref.theme, 4530 spacing = _ref$theme.spacing, 4531 borderRadius = _ref$theme.borderRadius, 4532 colors = _ref$theme.colors; 4533 return (0,objectSpread2/* default */.Z)({ 4534 label: 'multiValue', 4535 display: 'flex', 4536 minWidth: 0 4537 }, unstyled ? {} : { 4538 backgroundColor: colors.neutral10, 4539 borderRadius: borderRadius / 2, 4540 margin: spacing.baseUnit / 2 4541 }); 4542}; 4543var multiValueLabelCSS = function multiValueLabelCSS(_ref2, unstyled) { 4544 var _ref2$theme = _ref2.theme, 4545 borderRadius = _ref2$theme.borderRadius, 4546 colors = _ref2$theme.colors, 4547 cropWithEllipsis = _ref2.cropWithEllipsis; 4548 return (0,objectSpread2/* default */.Z)({ 4549 overflow: 'hidden', 4550 textOverflow: cropWithEllipsis || cropWithEllipsis === undefined ? 'ellipsis' : undefined, 4551 whiteSpace: 'nowrap' 4552 }, unstyled ? {} : { 4553 borderRadius: borderRadius / 2, 4554 color: colors.neutral80, 4555 fontSize: '85%', 4556 padding: 3, 4557 paddingLeft: 6 4558 }); 4559}; 4560var multiValueRemoveCSS = function multiValueRemoveCSS(_ref3, unstyled) { 4561 var _ref3$theme = _ref3.theme, 4562 spacing = _ref3$theme.spacing, 4563 borderRadius = _ref3$theme.borderRadius, 4564 colors = _ref3$theme.colors, 4565 isFocused = _ref3.isFocused; 4566 return (0,objectSpread2/* default */.Z)({ 4567 alignItems: 'center', 4568 display: 'flex' 4569 }, unstyled ? {} : { 4570 borderRadius: borderRadius / 2, 4571 backgroundColor: isFocused ? colors.dangerLight : undefined, 4572 paddingLeft: spacing.baseUnit, 4573 paddingRight: spacing.baseUnit, 4574 ':hover': { 4575 backgroundColor: colors.dangerLight, 4576 color: colors.danger 4577 } 4578 }); 4579}; 4580var MultiValueGeneric = function MultiValueGeneric(_ref4) { 4581 var children = _ref4.children, 4582 innerProps = _ref4.innerProps; 4583 return jsx("div", innerProps, children); 4584}; 4585var MultiValueContainer = MultiValueGeneric; 4586var MultiValueLabel = MultiValueGeneric; 4587function MultiValueRemove(_ref5) { 4588 var children = _ref5.children, 4589 innerProps = _ref5.innerProps; 4590 return jsx("div", (0,esm_extends/* default */.Z)({ 4591 role: "button" 4592 }, innerProps), children || jsx(CrossIcon, { 4593 size: 14 4594 })); 4595} 4596var MultiValue = function MultiValue(props) { 4597 var children = props.children, 4598 components = props.components, 4599 data = props.data, 4600 innerProps = props.innerProps, 4601 isDisabled = props.isDisabled, 4602 removeProps = props.removeProps, 4603 selectProps = props.selectProps; 4604 var Container = components.Container, 4605 Label = components.Label, 4606 Remove = components.Remove; 4607 return jsx(Container, { 4608 data: data, 4609 innerProps: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, getStyleProps(props, 'multiValue', { 4610 'multi-value': true, 4611 'multi-value--is-disabled': isDisabled 4612 })), innerProps), 4613 selectProps: selectProps 4614 }, jsx(Label, { 4615 data: data, 4616 innerProps: (0,objectSpread2/* default */.Z)({}, getStyleProps(props, 'multiValueLabel', { 4617 'multi-value__label': true 4618 })), 4619 selectProps: selectProps 4620 }, children), jsx(Remove, { 4621 data: data, 4622 innerProps: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, getStyleProps(props, 'multiValueRemove', { 4623 'multi-value__remove': true 4624 })), {}, { 4625 'aria-label': "Remove ".concat(children || 'option') 4626 }, removeProps), 4627 selectProps: selectProps 4628 })); 4629}; 4630var MultiValue$1 = MultiValue; 4631 4632var optionCSS = function optionCSS(_ref, unstyled) { 4633 var isDisabled = _ref.isDisabled, 4634 isFocused = _ref.isFocused, 4635 isSelected = _ref.isSelected, 4636 _ref$theme = _ref.theme, 4637 spacing = _ref$theme.spacing, 4638 colors = _ref$theme.colors; 4639 return (0,objectSpread2/* default */.Z)({ 4640 label: 'option', 4641 cursor: 'default', 4642 display: 'block', 4643 fontSize: 'inherit', 4644 width: '100%', 4645 userSelect: 'none', 4646 WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)' 4647 }, unstyled ? {} : { 4648 backgroundColor: isSelected ? colors.primary : isFocused ? colors.primary25 : 'transparent', 4649 color: isDisabled ? colors.neutral20 : isSelected ? colors.neutral0 : 'inherit', 4650 padding: "".concat(spacing.baseUnit * 2, "px ").concat(spacing.baseUnit * 3, "px"), 4651 // provide some affordance on touch devices 4652 ':active': { 4653 backgroundColor: !isDisabled ? isSelected ? colors.primary : colors.primary50 : undefined 4654 } 4655 }); 4656}; 4657var Option = function Option(props) { 4658 var children = props.children, 4659 isDisabled = props.isDisabled, 4660 isFocused = props.isFocused, 4661 isSelected = props.isSelected, 4662 innerRef = props.innerRef, 4663 innerProps = props.innerProps; 4664 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'option', { 4665 option: true, 4666 'option--is-disabled': isDisabled, 4667 'option--is-focused': isFocused, 4668 'option--is-selected': isSelected 4669 }), { 4670 ref: innerRef, 4671 "aria-disabled": isDisabled 4672 }, innerProps), children); 4673}; 4674var Option$1 = Option; 4675 4676var placeholderCSS = function placeholderCSS(_ref, unstyled) { 4677 var _ref$theme = _ref.theme, 4678 spacing = _ref$theme.spacing, 4679 colors = _ref$theme.colors; 4680 return (0,objectSpread2/* default */.Z)({ 4681 label: 'placeholder', 4682 gridArea: '1 / 1 / 2 / 3' 4683 }, unstyled ? {} : { 4684 color: colors.neutral50, 4685 marginLeft: spacing.baseUnit / 2, 4686 marginRight: spacing.baseUnit / 2 4687 }); 4688}; 4689var Placeholder = function Placeholder(props) { 4690 var children = props.children, 4691 innerProps = props.innerProps; 4692 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'placeholder', { 4693 placeholder: true 4694 }), innerProps), children); 4695}; 4696var Placeholder$1 = Placeholder; 4697 4698var index_641ee5b8_esm_css = function css(_ref, unstyled) { 4699 var isDisabled = _ref.isDisabled, 4700 _ref$theme = _ref.theme, 4701 spacing = _ref$theme.spacing, 4702 colors = _ref$theme.colors; 4703 return (0,objectSpread2/* default */.Z)({ 4704 label: 'singleValue', 4705 gridArea: '1 / 1 / 2 / 3', 4706 maxWidth: '100%', 4707 overflow: 'hidden', 4708 textOverflow: 'ellipsis', 4709 whiteSpace: 'nowrap' 4710 }, unstyled ? {} : { 4711 color: isDisabled ? colors.neutral40 : colors.neutral80, 4712 marginLeft: spacing.baseUnit / 2, 4713 marginRight: spacing.baseUnit / 2 4714 }); 4715}; 4716var SingleValue = function SingleValue(props) { 4717 var children = props.children, 4718 isDisabled = props.isDisabled, 4719 innerProps = props.innerProps; 4720 return jsx("div", (0,esm_extends/* default */.Z)({}, getStyleProps(props, 'singleValue', { 4721 'single-value': true, 4722 'single-value--is-disabled': isDisabled 4723 }), innerProps), children); 4724}; 4725var SingleValue$1 = SingleValue; 4726 4727var components = { 4728 ClearIndicator: ClearIndicator, 4729 Control: Control$1, 4730 DropdownIndicator: DropdownIndicator, 4731 DownChevron: DownChevron, 4732 CrossIcon: CrossIcon, 4733 Group: Group$1, 4734 GroupHeading: GroupHeading, 4735 IndicatorsContainer: IndicatorsContainer, 4736 IndicatorSeparator: IndicatorSeparator, 4737 Input: Input$1, 4738 LoadingIndicator: LoadingIndicator, 4739 Menu: Menu$1, 4740 MenuList: MenuList, 4741 MenuPortal: MenuPortal, 4742 LoadingMessage: LoadingMessage, 4743 NoOptionsMessage: NoOptionsMessage, 4744 MultiValue: MultiValue$1, 4745 MultiValueContainer: MultiValueContainer, 4746 MultiValueLabel: MultiValueLabel, 4747 MultiValueRemove: MultiValueRemove, 4748 Option: Option$1, 4749 Placeholder: Placeholder$1, 4750 SelectContainer: SelectContainer, 4751 SingleValue: SingleValue$1, 4752 ValueContainer: ValueContainer 4753}; 4754var defaultComponents = function defaultComponents(props) { 4755 return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, components), props.components); 4756}; 4757 4758 4759 4760;// CONCATENATED MODULE: ./node_modules/memoize-one/dist/memoize-one.esm.js 4761var safeIsNaN = Number.isNaN || 4762 function ponyfill(value) { 4763 return typeof value === 'number' && value !== value; 4764 }; 4765function isEqual(first, second) { 4766 if (first === second) { 4767 return true; 4768 } 4769 if (safeIsNaN(first) && safeIsNaN(second)) { 4770 return true; 4771 } 4772 return false; 4773} 4774function areInputsEqual(newInputs, lastInputs) { 4775 if (newInputs.length !== lastInputs.length) { 4776 return false; 4777 } 4778 for (var i = 0; i < newInputs.length; i++) { 4779 if (!isEqual(newInputs[i], lastInputs[i])) { 4780 return false; 4781 } 4782 } 4783 return true; 4784} 4785 4786function memoizeOne(resultFn, isEqual) { 4787 if (isEqual === void 0) { isEqual = areInputsEqual; } 4788 var cache = null; 4789 function memoized() { 4790 var newArgs = []; 4791 for (var _i = 0; _i < arguments.length; _i++) { 4792 newArgs[_i] = arguments[_i]; 4793 } 4794 if (cache && cache.lastThis === this && isEqual(newArgs, cache.lastArgs)) { 4795 return cache.lastResult; 4796 } 4797 var lastResult = resultFn.apply(this, newArgs); 4798 cache = { 4799 lastResult: lastResult, 4800 lastArgs: newArgs, 4801 lastThis: this, 4802 }; 4803 return lastResult; 4804 } 4805 memoized.clear = function clear() { 4806 cache = null; 4807 }; 4808 return memoized; 4809} 4810 4811 4812 4813;// CONCATENATED MODULE: ./node_modules/react-select/dist/Select-aab027f3.esm.js 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828function _EMOTION_STRINGIFIED_CSS_ERROR__$2() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } 4829 4830// Assistive text to describe visual elements. Hidden for sighted users. 4831var _ref = true ? { 4832 name: "7pg0cj-a11yText", 4833 styles: "label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap" 4834} : 0; 4835var A11yText = function A11yText(props) { 4836 return jsx("span", (0,esm_extends/* default */.Z)({ 4837 css: _ref 4838 }, props)); 4839}; 4840var A11yText$1 = A11yText; 4841 4842var defaultAriaLiveMessages = { 4843 guidance: function guidance(props) { 4844 var isSearchable = props.isSearchable, 4845 isMulti = props.isMulti, 4846 tabSelectsValue = props.tabSelectsValue, 4847 context = props.context, 4848 isInitialFocus = props.isInitialFocus; 4849 switch (context) { 4850 case 'menu': 4851 return "Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(tabSelectsValue ? ', press Tab to select the option and exit the menu' : '', "."); 4852 case 'input': 4853 return isInitialFocus ? "".concat(props['aria-label'] || 'Select', " is focused ").concat(isSearchable ? ',type to refine list' : '', ", press Down to open the menu, ").concat(isMulti ? ' press left to focus selected values' : '') : ''; 4854 case 'value': 4855 return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value'; 4856 default: 4857 return ''; 4858 } 4859 }, 4860 onChange: function onChange(props) { 4861 var action = props.action, 4862 _props$label = props.label, 4863 label = _props$label === void 0 ? '' : _props$label, 4864 labels = props.labels, 4865 isDisabled = props.isDisabled; 4866 switch (action) { 4867 case 'deselect-option': 4868 case 'pop-value': 4869 case 'remove-value': 4870 return "option ".concat(label, ", deselected."); 4871 case 'clear': 4872 return 'All selected options have been cleared.'; 4873 case 'initial-input-focus': 4874 return "option".concat(labels.length > 1 ? 's' : '', " ").concat(labels.join(','), ", selected."); 4875 case 'select-option': 4876 return isDisabled ? "option ".concat(label, " is disabled. Select another option.") : "option ".concat(label, ", selected."); 4877 default: 4878 return ''; 4879 } 4880 }, 4881 onFocus: function onFocus(props) { 4882 var context = props.context, 4883 focused = props.focused, 4884 options = props.options, 4885 _props$label2 = props.label, 4886 label = _props$label2 === void 0 ? '' : _props$label2, 4887 selectValue = props.selectValue, 4888 isDisabled = props.isDisabled, 4889 isSelected = props.isSelected, 4890 isAppleDevice = props.isAppleDevice; 4891 var getArrayIndex = function getArrayIndex(arr, item) { 4892 return arr && arr.length ? "".concat(arr.indexOf(item) + 1, " of ").concat(arr.length) : ''; 4893 }; 4894 if (context === 'value' && selectValue) { 4895 return "value ".concat(label, " focused, ").concat(getArrayIndex(selectValue, focused), "."); 4896 } 4897 if (context === 'menu' && isAppleDevice) { 4898 var disabled = isDisabled ? ' disabled' : ''; 4899 var status = "".concat(isSelected ? ' selected' : '').concat(disabled); 4900 return "".concat(label).concat(status, ", ").concat(getArrayIndex(options, focused), "."); 4901 } 4902 return ''; 4903 }, 4904 onFilter: function onFilter(props) { 4905 var inputValue = props.inputValue, 4906 resultsMessage = props.resultsMessage; 4907 return "".concat(resultsMessage).concat(inputValue ? ' for search term ' + inputValue : '', "."); 4908 } 4909}; 4910 4911var LiveRegion = function LiveRegion(props) { 4912 var ariaSelection = props.ariaSelection, 4913 focusedOption = props.focusedOption, 4914 focusedValue = props.focusedValue, 4915 focusableOptions = props.focusableOptions, 4916 isFocused = props.isFocused, 4917 selectValue = props.selectValue, 4918 selectProps = props.selectProps, 4919 id = props.id, 4920 isAppleDevice = props.isAppleDevice; 4921 var ariaLiveMessages = selectProps.ariaLiveMessages, 4922 getOptionLabel = selectProps.getOptionLabel, 4923 inputValue = selectProps.inputValue, 4924 isMulti = selectProps.isMulti, 4925 isOptionDisabled = selectProps.isOptionDisabled, 4926 isSearchable = selectProps.isSearchable, 4927 menuIsOpen = selectProps.menuIsOpen, 4928 options = selectProps.options, 4929 screenReaderStatus = selectProps.screenReaderStatus, 4930 tabSelectsValue = selectProps.tabSelectsValue, 4931 isLoading = selectProps.isLoading; 4932 var ariaLabel = selectProps['aria-label']; 4933 var ariaLive = selectProps['aria-live']; 4934 4935 // Update aria live message configuration when prop changes 4936 var messages = (0,react.useMemo)(function () { 4937 return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}
4937, defaultAriaLiveMessages), ariaLiveMessages || {}); 4938 }, [ariaLiveMessages]); 4939 4940 // Update aria live selected option when prop changes 4941 var ariaSelected = (0,react.useMemo)(function () { 4942 var message = ''; 4943 if (ariaSelection && messages.onChange) { 4944 var option = ariaSelection.option, 4945 selectedOptions = ariaSelection.options, 4946 removedValue = ariaSelection.removedValue, 4947 removedValues = ariaSelection.removedValues, 4948 value = ariaSelection.value; 4949 // select-option when !isMulti does not return option so we assume selected option is value 4950 var asOption = function asOption(val) { 4951 return !Array.isArray(val) ? val : null; 4952 }; 4953 4954 // If there is just one item from the action then get its label 4955 var selected = removedValue || option || asOption(value); 4956 var label = selected ? getOptionLabel(selected) : ''; 4957 4958 // If there are multiple items from the action then return an array of labels 4959 var multiSelected = selectedOptions || removedValues || undefined; 4960 var labels = multiSelected ? multiSelected.map(getOptionLabel) : []; 4961 var onChangeProps = (0,objectSpread2/* default */.Z)({ 4962 // multiSelected items are usually items that have already been selected 4963 // or set by the user as a default value so we assume they are not disabled 4964 isDisabled: selected && isOptionDisabled(selected, selectValue), 4965 label: label, 4966 labels: labels 4967 }, ariaSelection); 4968 message = messages.onChange(onChangeProps); 4969 } 4970 return message; 4971 }, [ariaSelection, messages, isOptionDisabled, selectValue, getOptionLabel]); 4972 var ariaFocused = (0,react.useMemo)(function () { 4973 var focusMsg = ''; 4974 var focused = focusedOption || focusedValue; 4975 var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption)); 4976 if (focused && messages.onFocus) { 4977 var onFocusProps = { 4978 focused: focused, 4979 label: getOptionLabel(focused), 4980 isDisabled: isOptionDisabled(focused, selectValue), 4981 isSelected: isSelected, 4982 options: focusableOptions, 4983 context: focused === focusedOption ? 'menu' : 'value', 4984 selectValue: selectValue, 4985 isAppleDevice: isAppleDevice 4986 }; 4987 focusMsg = messages.onFocus(onFocusProps); 4988 } 4989 return focusMsg; 4990 }, [focusedOption, focusedValue, getOptionLabel, isOptionDisabled, messages, focusableOptions, selectValue, isAppleDevice]); 4991 var ariaResults = (0,react.useMemo)(function () { 4992 var resultsMsg = ''; 4993 if (menuIsOpen && options.length && !isLoading && messages.onFilter) { 4994 var resultsMessage = screenReaderStatus({ 4995 count: focusableOptions.length 4996 }); 4997 resultsMsg = messages.onFilter({ 4998 inputValue: inputValue, 4999 resultsMessage: resultsMessage 5000 }); 5001 } 5002 return resultsMsg; 5003 }, [focusableOptions, inputValue, menuIsOpen, messages, options, screenReaderStatus, isLoading]); 5004 var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus'; 5005 var ariaGuidance = (0,react.useMemo)(function () { 5006 var guidanceMsg = ''; 5007 if (messages.guidance) { 5008 var context = focusedValue ? 'value' : menuIsOpen ? 'menu' : 'input'; 5009 guidanceMsg = messages.guidance({ 5010 'aria-label': ariaLabel, 5011 context: context, 5012 isDisabled: focusedOption && isOptionDisabled(focusedOption, selectValue), 5013 isMulti: isMulti, 5014 isSearchable: isSearchable, 5015 tabSelectsValue: tabSelectsValue, 5016 isInitialFocus: isInitialFocus 5017 }); 5018 } 5019 return guidanceMsg; 5020 }, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]); 5021 var ScreenReaderText = jsx(react.Fragment, null, jsx("span", { 5022 id: "aria-selection" 5023 }, ariaSelected), jsx("span", { 5024 id: "aria-focused" 5025 }, ariaFocused), jsx("span", { 5026 id: "aria-results" 5027 }, ariaResults), jsx("span", { 5028 id: "aria-guidance" 5029 }, ariaGuidance)); 5030 return jsx(react.
vendor: 8,875 bytes, lines 5030-5321
5030Fragment, null, jsx(A11yText$1, { 5031 id: id 5032 }, isInitialFocus && ScreenReaderText), jsx(A11yText$1, { 5033 "aria-live": ariaLive, 5034 "aria-atomic": "false", 5035 "aria-relevant": "additions text", 5036 role: "log" 5037 }, isFocused && !isInitialFocus && ScreenReaderText)); 5038}; 5039var LiveRegion$1 = LiveRegion; 5040 5041var diacritics = [{ 5042 base: 'A', 5043 letters: "A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F" 5044}, { 5045 base: 'AA', 5046 letters: "\uA732" 5047}, { 5048 base: 'AE', 5049 letters: "\xC6\u01FC\u01E2" 5050}, { 5051 base: 'AO', 5052 letters: "\uA734" 5053}, { 5054 base: 'AU', 5055 letters: "\uA736" 5056}, { 5057 base: 'AV', 5058 letters: "\uA738\uA73A" 5059}, { 5060 base: 'AY', 5061 letters: "\uA73C" 5062}, { 5063 base: 'B', 5064 letters: "B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181" 5065}, { 5066 base: 'C', 5067 letters: "C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E" 5068}, { 5069 base: 'D', 5070 letters: "D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779" 5071}, { 5072 base: 'DZ', 5073 letters: "\u01F1\u01C4" 5074}, { 5075 base: 'Dz', 5076 letters: "\u01F2\u01C5" 5077}, { 5078 base: 'E', 5079 letters: "E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E" 5080}, { 5081 base: 'F', 5082 letters: "F\u24BB\uFF26\u1E1E\u0191\uA77B" 5083}, { 5084 base: 'G', 5085 letters: "G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E" 5086}, { 5087 base: 'H', 5088 letters: "H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D" 5089}, { 5090 base: 'I', 5091 letters: "I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197" 5092}, { 5093 base: 'J', 5094 letters: "J\u24BF\uFF2A\u0134\u0248" 5095}, { 5096 base: 'K', 5097 letters: "K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2" 5098}, { 5099 base: 'L', 5100 letters: "L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780" 5101}, { 5102 base: 'LJ', 5103 letters: "\u01C7" 5104}, { 5105 base: 'Lj', 5106 letters: "\u01C8" 5107}, { 5108 base: 'M', 5109 letters: "M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C" 5110}, { 5111 base: 'N', 5112 letters: "N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4" 5113}, { 5114 base: 'NJ', 5115 letters: "\u01CA" 5116}, { 5117 base: 'Nj', 5118 letters: "\u01CB" 5119}, { 5120 base: 'O', 5121 letters: "O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C" 5122}, { 5123 base: 'OI', 5124 letters: "\u01A2" 5125}, { 5126 base: 'OO', 5127 letters: "\uA74E" 5128}, { 5129 base: 'OU', 5130 letters: "\u0222" 5131}, { 5132 base: 'P', 5133 letters: "P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754" 5134}, { 5135 base: 'Q', 5136 letters: "Q\u24C6\uFF31\uA756\uA758\u024A" 5137}, { 5138 base: 'R', 5139 letters: "R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782" 5140}, { 5141 base: 'S', 5142 letters: "S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784" 5143}, { 5144 base: 'T', 5145 letters: "T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786" 5146}, { 5147 base: 'TZ', 5148 letters: "\uA728" 5149}, { 5150 base: 'U', 5151 letters: "U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244" 5152}, { 5153 base: 'V', 5154 letters: "V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245" 5155}, { 5156 base: 'VY', 5157 letters: "\uA760" 5158}, { 5159 base: 'W', 5160 letters: "W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72" 5161}, { 5162 base: 'X', 5163 letters: "X\u24CD\uFF38\u1E8A\u1E8C" 5164}, { 5165 base: 'Y', 5166 letters: "Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE" 5167}, { 5168 base: 'Z', 5169 letters: "Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762" 5170}, { 5171 base: 'a', 5172 letters: "a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250" 5173}, { 5174 base: 'aa', 5175 letters: "\uA733" 5176}, { 5177 base: 'ae', 5178 letters: "\xE6\u01FD\u01E3" 5179}, { 5180 base: 'ao', 5181 letters: "\uA735" 5182}, { 5183 base: 'au', 5184 letters: "\uA737" 5185}, { 5186 base: 'av', 5187 letters: "\uA739\uA73B" 5188}, { 5189 base: 'ay', 5190 letters: "\uA73D" 5191}, { 5192 base: 'b', 5193 letters: "b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253" 5194}, { 5195 base: 'c', 5196 letters: "c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184" 5197}, { 5198 base: 'd', 5199 letters: "d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A" 5200}, { 5201 base: 'dz', 5202 letters: "\u01F3\u01C6" 5203}, { 5204 base: 'e', 5205 letters: "e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD" 5206}, { 5207 base: 'f', 5208 letters: "f\u24D5\uFF46\u1E1F\u0192\uA77C" 5209}, { 5210 base: 'g', 5211 letters: "g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F" 5212}, { 5213 base: 'h', 5214 letters: "h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265" 5215}, { 5216 base: 'hv', 5217 letters: "\u0195" 5218}, { 5219 base: 'i', 5220 letters: "i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131" 5221}, { 5222 base: 'j', 5223 letters: "j\u24D9\uFF4A\u0135\u01F0\u0249" 5224}, { 5225 base: 'k', 5226 letters: "k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3" 5227}, { 5228 base: 'l', 5229 letters: "l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747" 5230}, { 5231 base: 'lj', 5232 letters: "\u01C9" 5233}, { 5234 base: 'm', 5235 letters: "m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F" 5236}, { 5237 base: 'n', 5238 letters: "n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5" 5239}, { 5240 base: 'nj', 5241 letters: "\u01CC" 5242}, { 5243 base: 'o', 5244 letters: "o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275" 5245}, { 5246 base: 'oi', 5247 letters: "\u01A3" 5248}, { 5249 base: 'ou', 5250 letters: "\u0223" 5251}, { 5252 base: 'oo', 5253 letters: "\uA74F" 5254}, { 5255 base: 'p', 5256 letters: "p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755" 5257}, { 5258 base: 'q', 5259 letters: "q\u24E0\uFF51\u024B\uA757\uA759" 5260}, { 5261 base: 'r', 5262 letters: "r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783" 5263}, { 5264 base: 's', 5265 letters: "s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B" 5266}, { 5267 base: 't', 5268 letters: "t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787" 5269}, { 5270 base: 'tz', 5271 letters: "\uA729" 5272}, { 5273 base: 'u', 5274 letters: "u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289" 5275}, { 5276 base: 'v', 5277 letters: "v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C" 5278}, { 5279 base: 'vy', 5280 letters: "\uA761" 5281}, { 5282 base: 'w', 5283 letters: "w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73" 5284}, { 5285 base: 'x', 5286 letters: "x\u24E7\uFF58\u1E8B\u1E8D" 5287}, { 5288 base: 'y', 5289 letters: "y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF" 5290}, { 5291 base: 'z', 5292 letters: "z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763" 5293}]; 5294var anyDiacritic = new RegExp('[' + diacritics.map(function (d) { 5295 return d.letters; 5296}).join('') + ']', 'g'); 5297var diacriticToBase = {}; 5298for (var i = 0; i < diacritics.length; i++) { 5299 var diacritic = diacritics[i]; 5300 for (var j = 0; j < diacritic.letters.length; j++) { 5301 diacriticToBase[diacritic.letters[j]] = diacritic.base; 5302 } 5303} 5304var stripDiacritics = function stripDiacritics(str) { 5305 return str.replace(anyDiacritic, function (match) { 5306 return diacriticToBase[match]; 5307 }); 5308}; 5309 5310var memoizedStripDiacriticsForInput = memoizeOne(stripDiacritics); 5311var trimString = function trimString(str) { 5312 return str.replace(/^\s+|\s+$/g, ''); 5313}; 5314var defaultStringify = function defaultStringify(option) { 5315 return "".concat(option.label, " ").concat(option.value); 5316}; 5317var createFilter = function createFilter(config) { 5318 return function (option, rawInput) { 5319 // eslint-disable-next-line no-underscore-dangle 5320 if (option.data.__isNew__) return true; 5321 var _ignoreCase$ignoreAcc =
5321(0,objectSpread2/* default */.Z)({ 5322 ignoreCase: true, 5323 ignoreAccents: true, 5324 stringify: defaultStringify, 5325 trim: true, 5326 matchFrom: 'any' 5327 }, config), 5328 ignoreCase = _ignoreCase$ignoreAcc.ignoreCase, 5329 ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents, 5330 stringify = _ignoreCase$ignoreAcc.stringify, 5331 trim = _ignoreCase$ignoreAcc.trim, 5332 matchFrom = _ignoreCase$ignoreAcc.matchFrom; 5333 var input = trim ? trimString(rawInput) : rawInput; 5334 var candidate = trim ? trimString(stringify(option)) : stringify(option); 5335 if (ignoreCase) { 5336 input = input.toLowerCase(); 5337 candidate = candidate.toLowerCase(); 5338 } 5339 if (ignoreAccents) { 5340 input = memoizedStripDiacriticsForInput(input); 5341 candidate = stripDiacritics(candidate); 5342 } 5343 return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1; 5344 }; 5345}; 5346 5347var Select_aab027f3_esm_excluded = ["innerRef"]; 5348function DummyInput(_ref) { 5349 var innerRef = _ref.innerRef, 5350 props = (0,objectWithoutProperties/* default */.Z)(_ref, Select_aab027f3_esm_excluded); 5351 // Remove animation props not meant for HTML elements 5352 var filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear'); 5353 return jsx("input", (0,esm_extends/* default */.Z)({ 5354 ref: innerRef 5355 }, filteredProps, { 5356 css: /*#__PURE__*/css({ 5357 label: 'dummyInput', 5358 // get rid of any default styles 5359 background: 0, 5360 border: 0, 5361 // important! this hides the flashing cursor 5362 caretColor: 'transparent', 5363 fontSize: 'inherit', 5364 gridArea: '1 / 1 / 2 / 3', 5365 outline: 0, 5366 padding: 0, 5367 // important! without `width` browsers won't allow focus 5368 width: 1,
5369 // remove cursor on desktop 5370 color: 'transparent', 5371 // remove cursor on mobile whilst maintaining "scroll into view" behaviour 5372 left: -100, 5373 opacity: 0, 5374 position: 'relative', 5375 transform: 'scale(.01)' 5376 }, true ? "" : 0, true ? "" : 0) 5377 })); 5378} 5379 5380var cancelScroll = function cancelScroll(event) { 5381 if (event.cancelable) event.preventDefault(); 5382 event.stopPropagation(); 5383}; 5384function useScrollCapture(_ref) { 5385 var isEnabled = _ref.isEnabled, 5386 onBottomArrive = _ref.onBottomArrive, 5387 onBottomLeave = _ref.onBottomLeave, 5388 onTopArrive = _ref.onTopArrive, 5389 onTopLeave = _ref.onTopLeave; 5390 var isBottom = (0,react.useRef)(false); 5391 var isTop = (0,react.useRef)(false); 5392 var touchStart = (0,react.useRef)(0); 5393 var scrollTarget = (0,react.useRef)(null); 5394 var handleEventDelta = (0,react.useCallback)(function (event, delta) { 5395 if (scrollTarget.current === null) return; 5396 var _scrollTarget$current = scrollTarget.current, 5397 scrollTop = _scrollTarget$current.scrollTop, 5398 scrollHeight = _scrollTarget$current.scrollHeight, 5399 clientHeight = _scrollTarget$current.clientHeight; 5400 var target = scrollTarget.current; 5401 var isDeltaPositive = delta > 0; 5402 var availableScroll = scrollHeight - clientHeight - scrollTop; 5403 var shouldCancelScroll = false; 5404 5405 // reset bottom/top flags 5406 if (availableScroll > delta && isBottom.current) { 5407 if (onBottomLeave) onBottomLeave(event); 5408 isBottom.current = false; 5409 } 5410 if (isDeltaPositive && isTop.current) { 5411 if (onTopLeave) onTopLeave(event); 5412 isTop.current = false; 5413 } 5414 5415 // bottom limit 5416 if (isDeltaPositive && delta > availableScroll) { 5417 if (onBottomArrive && !isBottom.current) { 5418 onBottomArrive(event); 5419 } 5420 target.scrollTop = scrollHeight; 5421 shouldCancelScroll = true; 5422 isBottom.current = true; 5423 5424 // top limit 5425 } else if (!isDeltaPositive && -delta > scrollTop) { 5426 if (onTopArrive && !isTop.current) { 5427 onTopArrive(event); 5428 } 5429 target.scrollTop = 0; 5430 shouldCancelScroll = true; 5431 isTop.current = true; 5432 } 5433 5434 // cancel scroll 5435 if (shouldCancelScroll) { 5436 cancelScroll(event); 5437 } 5438 }, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]); 5439 var onWheel = (0,react.useCallback)(function (event) { 5440 handleEventDelta(event, event.deltaY); 5441 }, [handleEventDelta]); 5442 var onTouchStart = (0,react.useCallback)(function (event) { 5443 // set touch start so we can calculate touchmove delta 5444 touchStart.current = event.changedTouches[0].clientY; 5445 }, []); 5446 var onTouchMove = (0,react.useCallback)(function (event) { 5447 var deltaY = touchStart.current - event.changedTouches[0].clientY; 5448 handleEventDelta(event, deltaY); 5449 }, [handleEventDelta]); 5450 var startListening = (0,react.useCallback)(function (el) { 5451 // bail early if no element is available to attach to 5452 if (!el) return; 5453 var notPassive = supportsPassiveEvents ? { 5454 passive: false 5455 } : false; 5456 el.addEventListener('wheel', onWheel, notPassive); 5457 el.addEventListener('touchstart', onTouchStart, notPassive); 5458 el.addEventListener('touchmove', onTouchMove, notPassive); 5459 }, [onTouchMove, onTouchStart, onWheel]); 5460 var stopListening = (0,react.useCallback)(function (el) { 5461 // bail early if no element is available to detach from 5462 if (!el) return; 5463 el.removeEventListener('wheel', onWheel, false); 5464 el.removeEventListener('touchstart', onTouchStart, false); 5465 el.removeEventListener('touchmove', onTouchMove, false); 5466 }, [onTouchMove, onTouchStart, onWheel]); 5467 (0,react.useEffect)(function () { 5468 if (!isEnabled) return; 5469 var element = scrollTarget.current; 5470 startListening(element); 5471 return function () { 5472 stopListening(element); 5473 }; 5474 }, [isEnabled, startListening, stopListening]); 5475 return function (element) { 5476 scrollTarget.current = element; 5477 }; 5478} 5479 5480var STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position']; 5481var LOCK_STYLES = { 5482 boxSizing: 'border-box', 5483 // account for possible declaration `width: 100%;` on body 5484 overflow: 'hidden', 5485 position: 'relative', 5486 height: '100%' 5487}; 5488function preventTouchMove(e) { 5489 if (e.cancelable) e.preventDefault(); 5490} 5491function allowTouchMove(e) { 5492 e.stopPropagation(); 5493} 5494function preventInertiaScroll() { 5495 var top = this.scrollTop; 5496 var totalScroll = this.scrollHeight; 5497 var currentScroll = top + this.offsetHeight; 5498 if (top === 0) { 5499 this.scrollTop = 1; 5500 } else if (currentScroll === totalScroll) { 5501 this.scrollTop = top - 1; 5502 } 5503} 5504 5505// `ontouchstart` check works on most browsers 5506// `maxTouchPoints` works on IE10/11 and Surface 5507function isTouchDevice() { 5508 return 'ontouchstart' in window || navigator.maxTouchPoints; 5509} 5510var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); 5511var activeScrollLocks = 0; 5512var listenerOptions = { 5513 capture: false, 5514 passive: false 5515}; 5516function useScrollLock(_ref) { 5517 var isEnabled = _ref.isEnabled, 5518 _ref$accountForScroll = _ref.accountForScrollbars, 5519 accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll; 5520 var originalStyles = (0,react.useRef)({}); 5521 var scrollTarget = (0,react.useRef)(null); 5522 var addScrollLock = (0,react.useCallback)(function (touchScrollTarget) { 5523 if (!canUseDOM) return; 5524 var target = document.body; 5525 var targetStyle = target && target.style; 5526 if (accountForScrollbars) { 5527 // store any styles already applied to the body
5528 STYLE_KEYS.forEach(function (key) { 5529 var val = targetStyle && targetStyle[key]; 5530 originalStyles.current[key] = val; 5531 }); 5532 } 5533 5534 // apply the lock styles and padding if this is the first scroll lock 5535 if (accountForScrollbars && activeScrollLocks < 1) { 5536 var currentPadding = parseInt(originalStyles.current.paddingRight, 10) || 0; 5537 var clientWidth = document.body ? document.body.clientWidth : 0; 5538 var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0; 5539 Object.keys(LOCK_STYLES).forEach(function (key) { 5540 var val = LOCK_STYLES[key]; 5541 if (targetStyle) { 5542 targetStyle[key] = val; 5543 } 5544 }); 5545 if (targetStyle) { 5546 targetStyle.paddingRight = "".concat(adjustedPadding, "px"); 5547 } 5548 } 5549 5550 // account for touch devices 5551 if (target && isTouchDevice()) { 5552 // Mobile Safari ignores { overflow: hidden } declaration on the body. 5553 target.addEventListener('touchmove', preventTouchMove, listenerOptions); 5554 5555 // Allow scroll on provided target 5556 if (touchScrollTarget) { 5557 touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, listenerOptions); 5558 touchScrollTarget.addEventListener('touchmove', allowTouchMove, listenerOptions); 5559 } 5560 } 5561 5562 // increment active scroll locks 5563 activeScrollLocks += 1; 5564 }, [accountForScrollbars]); 5565 var removeScrollLock = (0,react.useCallback)(function (touchScrollTarget) { 5566 if (!canUseDOM) return; 5567 var target = document.body; 5568 var targetStyle = target && target.style; 5569 5570 // safely decrement active scroll locks 5571 activeScrollLocks = Math.max(activeScrollLocks - 1, 0); 5572 5573 // reapply original body styles, if any 5574 if (accountForScrollbars && activeScrollLocks < 1) { 5575 STYLE_KEYS.forEach(function (key) { 5576 var val = originalStyles.current[key]; 5577 if (targetStyle) { 5578 targetStyle[key] = val; 5579 } 5580 }); 5581 } 5582 5583 // remove touch listeners 5584 if (target && isTouchDevice()) { 5585 target.removeEventListener('touchmove', preventTouchMove, listenerOptions); 5586 if (touchScrollTarget) { 5587 touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, listenerOptions); 5588 touchScrollTarget.removeEventListener('touchmove', allowTouchMove, listenerOptions); 5589 } 5590 } 5591 }, [accountForScrollbars]); 5592 (0,react.useEffect)(function () { 5593 if (!isEnabled) return; 5594 var element = scrollTarget.current; 5595 addScrollLock(element); 5596 return function () { 5597 removeScrollLock(element); 5598 }; 5599 }, [isEnabled, addScrollLock, removeScrollLock]); 5600 return function (element) { 5601 scrollTarget.current = element; 5602 }; 5603} 5604 5605function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } 5606var blurSelectInput = function blurSelectInput(event) { 5607 var element = event.target; 5608 return element.ownerDocument.activeElement && element.ownerDocument.activeElement.blur(); 5609}; 5610var _ref2$1 = true ? { 5611 name: "1kfdb0e", 5612 styles: "position:fixed;left:0;bottom:0;right:0;top:0" 5613} : 0; 5614function ScrollManager(_ref) { 5615 var children = _ref.children, 5616 lockEnabled = _ref.lockEnabled, 5617 _ref$captureEnabled = _ref.captureEnabled, 5618 captureEnabled = _ref$captureEnabled === void 0 ? true : _ref$captureEnabled, 5619 onBottomArrive = _ref.onBottomArrive, 5620 onBottomLeave = _ref.onBottomLeave, 5621 onTopArrive = _ref.onTopArrive, 5622 onTopLeave = _ref.onTopLeave; 5623 var setScrollCaptureTarget = useScrollCapture({ 5624 isEnabled: captureEnabled, 5625 onBottomArrive: onBottomArrive, 5626 onBottomLeave: onBottomLeave, 5627 onTopArrive: onTopArrive, 5628 onTopLeave: onTopLeave 5629 }); 5630 var setScrollLockTarget = useScrollLock({ 5631 isEnabled: lockEnabled 5632 }); 5633 var targetRef = function targetRef(element) { 5634 setScrollCaptureTarget(element); 5635 setScrollLockTarget(element); 5636 }; 5637 return jsx(react.Fragment, null, lockEnabled && jsx("div", { 5638 onClick: blurSelectInput, 5639 css: _ref2$1 5640 }), children(targetRef)); 5641} 5642 5643function Select_aab027f3_esm_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } 5644var Select_aab027f3_esm_ref2 = true ? { 5645 name: "1a0ro4n-requiredInput", 5646 styles: "label:requiredInput;
5646opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%" 5647} : 0; 5648var RequiredInput = function RequiredInput(_ref) { 5649 var name = _ref.name, 5650 onFocus = _ref.onFocus; 5651 return jsx("input", { 5652 required: true, 5653 name: name, 5654 tabIndex: -1, 5655 "aria-hidden": "true", 5656 onFocus: onFocus, 5657 css: Select_aab027f3_esm_ref2 5658 // Prevent `Switching from uncontrolled to controlled` error 5659 , 5660 value: "", 5661 onChange: function onChange() {} 5662 }); 5663}; 5664var RequiredInput$1 = RequiredInput; 5665 5666/// <reference types="user-agent-data-types" /> 5667 5668function testPlatform(re) { 5669 var _window$navigator$use; 5670 return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window$navigator$use = window.navigator['userAgentData']) === null || _window$navigator$use === void 0 ? void 0 : _window$navigator$use.platform) || window.navigator.platform) : false; 5671} 5672function isIPhone() { 5673 return testPlatform(/^iPhone/i); 5674} 5675function isMac() { 5676 return testPlatform(/^Mac/i); 5677} 5678function isIPad() { 5679 return testPlatform(/^iPad/i) || 5680 // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support. 5681 isMac() && navigator.maxTouchPoints > 1; 5682} 5683function isIOS() { 5684 return isIPhone() || isIPad(); 5685} 5686function isAppleDevice() { 5687 return isMac() || isIOS(); 5688} 5689 5690var formatGroupLabel = function formatGroupLabel(group) { 5691 return group.label; 5692}; 5693var getOptionLabel$1 = function getOptionLabel(option) { 5694 return option.label; 5695}; 5696var getOptionValue$1 = function getOptionValue(option) { 5697 return option.value; 5698}; 5699var isOptionDisabled = function isOptionDisabled(option) { 5700 return !!option.isDisabled; 5701}; 5702 5703var defaultStyles = { 5704 clearIndicator: clearIndicatorCSS, 5705 container: containerCSS, 5706 control: css$1, 5707 dropdownIndicator: dropdownIndicatorCSS, 5708 group: groupCSS, 5709 groupHeading: groupHeadingCSS, 5710 indicatorsContainer: indicatorsContainerCSS, 5711 indicatorSeparator: indicatorSeparatorCSS, 5712 input: inputCSS, 5713 loadingIndicator: loadingIndicatorCSS, 5714 loadingMessage: loadingMessageCSS, 5715 menu: menuCSS, 5716 menuList: menuListCSS, 5717 menuPortal: menuPortalCSS, 5718 multiValue: multiValueCSS, 5719 multiValueLabel: multiValueLabelCSS, 5720 multiValueRemove: multiValueRemoveCSS, 5721 noOptionsMessage: noOptionsMessageCSS, 5722 option: optionCSS, 5723 placeholder: placeholderCSS, 5724 singleValue: index_641ee5b8_esm_css, 5725 valueContainer: valueContainerCSS 5726}; 5727// Merge Utility 5728// Allows consumers to extend a base Select with additional styles 5729 5730function mergeStyles(source) { 5731 var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 5732 // initialize with source styles 5733 var styles = _objectSpread({}, source); 5734 5735 // massage in target styles 5736 Object.keys(target).forEach(function (keyAsString) { 5737 var key = keyAsString; 5738 if (source[key]) { 5739 styles[key] = function (rsCss, props) { 5740 return target[key](source[key](rsCss, props), props); 5741 }; 5742 } else { 5743 styles[key] = target[key]; 5744 } 5745 }); 5746 return styles; 5747}
vendor: 15,423 bytes, lines 5747-6181
5747 5748 5749var colors = { 5750 primary: '#2684FF', 5751 primary75: '#4C9AFF', 5752 primary50: '#B2D4FF', 5753 primary25: '#DEEBFF', 5754 danger: '#DE350B', 5755 dangerLight: '#FFBDAD', 5756 neutral0: 'hsl(0, 0%, 100%)', 5757 neutral5: 'hsl(0, 0%, 95%)', 5758 neutral10: 'hsl(0, 0%, 90%)', 5759 neutral20: 'hsl(0, 0%, 80%)', 5760 neutral30: 'hsl(0, 0%, 70%)', 5761 neutral40: 'hsl(0, 0%, 60%)', 5762 neutral50: 'hsl(0, 0%, 50%)', 5763 neutral60: 'hsl(0, 0%, 40%)', 5764 neutral70: 'hsl(0, 0%, 30%)', 5765 neutral80: 'hsl(0, 0%, 20%)', 5766 neutral90: 'hsl(0, 0%, 10%)' 5767}; 5768var borderRadius = 4; 5769// Used to calculate consistent margin/padding on elements 5770var baseUnit = 4; 5771// The minimum height of the control 5772var controlHeight = 38; 5773// The amount of space between the control and menu */ 5774var menuGutter = baseUnit * 2; 5775var spacing = { 5776 baseUnit: baseUnit, 5777 controlHeight: controlHeight, 5778 menuGutter: menuGutter 5779}; 5780var defaultTheme = { 5781 borderRadius: borderRadius, 5782 colors: colors, 5783 spacing: spacing 5784}; 5785 5786var defaultProps = { 5787 'aria-live': 'polite', 5788 backspaceRemovesValue: true, 5789 blurInputOnSelect: isTouchCapable(), 5790 captureMenuScroll: !isTouchCapable(), 5791 classNames: {}, 5792 closeMenuOnSelect: true, 5793 closeMenuOnScroll: false, 5794 components: {}, 5795 controlShouldRenderValue: true, 5796 escapeClearsValue: false, 5797 filterOption: createFilter(), 5798 formatGroupLabel: formatGroupLabel, 5799 getOptionLabel: getOptionLabel$1, 5800 getOptionValue: getOptionValue$1, 5801 isDisabled: false, 5802 isLoading: false, 5803 isMulti: false, 5804 isRtl: false, 5805 isSearchable: true, 5806 isOptionDisabled: isOptionDisabled, 5807 loadingMessage: function loadingMessage() { 5808 return 'Loading...'; 5809 }, 5810 maxMenuHeight: 300, 5811 minMenuHeight: 140, 5812 menuIsOpen: false, 5813 menuPlacement: 'bottom', 5814 menuPosition: 'absolute', 5815 menuShouldBlockScroll: false, 5816 menuShouldScrollIntoView: !isMobileDevice(), 5817 noOptionsMessage: function noOptionsMessage() { 5818 return 'No options'; 5819 }, 5820 openMenuOnFocus: false, 5821 openMenuOnClick: true, 5822 options: [], 5823 pageSize: 5, 5824 placeholder: 'Select...', 5825 screenReaderStatus: function screenReaderStatus(_ref) { 5826 var count = _ref.count; 5827 return "".concat(count, " result").concat(count !== 1 ? 's' : '', " available"); 5828 }, 5829 styles: {}, 5830 tabIndex: 0, 5831 tabSelectsValue: true, 5832 unstyled: false 5833}; 5834function toCategorizedOption(props, option, selectValue, index) { 5835 var isDisabled = _isOptionDisabled(props, option, selectValue); 5836 var isSelected = _isOptionSelected(props, option, selectValue); 5837 var label = getOptionLabel(props, option); 5838 var value = getOptionValue(props, option); 5839 return { 5840 type: 'option', 5841 data: option, 5842 isDisabled: isDisabled, 5843 isSelected: isSelected, 5844 label: label, 5845 value: value, 5846 index: index 5847 }; 5848} 5849function buildCategorizedOptions(props, selectValue) { 5850 return props.options.map(function (groupOrOption, groupOrOptionIndex) { 5851 if ('options' in groupOrOption) { 5852 var categorizedOptions = groupOrOption.options.map(function (option, optionIndex) { 5853 return toCategorizedOption(props, option, selectValue, optionIndex); 5854 }).filter(function (categorizedOption) { 5855 return isFocusable(props, categorizedOption); 5856 }); 5857 return categorizedOptions.length > 0 ? { 5858 type: 'group', 5859 data: groupOrOption, 5860 options: categorizedOptions, 5861 index: groupOrOptionIndex 5862 } : undefined; 5863 } 5864 var categorizedOption = toCategorizedOption(props, groupOrOption, selectValue, groupOrOptionIndex); 5865 return isFocusable(props, categorizedOption) ? categorizedOption : undefined; 5866 }).filter(notNullish); 5867} 5868function buildFocusableOptionsFromCategorizedOptions(categorizedOptions) { 5869 return categorizedOptions.reduce(function (optionsAccumulator, categorizedOption) { 5870 if (categorizedOption.type === 'group') { 5871 optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function (option) { 5872 return option.data; 5873 }))); 5874 } else { 5875 optionsAccumulator.push(categorizedOption.data); 5876 } 5877 return optionsAccumulator; 5878 }, []); 5879} 5880function buildFocusableOptionsWithIds(categorizedOptions, optionId) { 5881 return categorizedOptions.reduce(function (optionsAccumulator, categorizedOption) { 5882 if (categorizedOption.type === 'group') { 5883 optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function (option) { 5884 return { 5885 data: option.data, 5886 id: "".concat(optionId, "-").concat(categorizedOption.index, "-").concat(option.index) 5887 }; 5888 }))); 5889 } else { 5890 optionsAccumulator.push({ 5891 data: categorizedOption.data, 5892 id: "".concat(optionId, "-").concat(categorizedOption.index) 5893 }); 5894 } 5895 return optionsAccumulator; 5896 }, []); 5897} 5898function buildFocusableOptions(props, selectValue) { 5899 return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(props, selectValue)); 5900} 5901function isFocusable(props, categorizedOption) { 5902 var _props$inputValue = props.inputValue, 5903 inputValue = _props$inputValue === void 0 ? '' : _props$inputValue; 5904 var data = categorizedOption.data, 5905 isSelected = categorizedOption.isSelected, 5906 label = categorizedOption.label, 5907 value = categorizedOption.value; 5908 return (!shouldHideSelectedOptions(props) || !isSelected) && _filterOption(props, { 5909 label: label, 5910 value: value, 5911 data: data 5912 }, inputValue); 5913} 5914function getNextFocusedValue(state, nextSelectValue) { 5915 var focusedValue = state.focusedValue, 5916 lastSelectValue = state.selectValue; 5917 var lastFocusedIndex = lastSelectValue.indexOf(focusedValue); 5918 if (lastFocusedIndex > -1) { 5919 var nextFocusedIndex = nextSelectValue.indexOf(focusedValue); 5920 if (nextFocusedIndex > -1) { 5921 // the focused value is still in the selectValue, return it 5922 return focusedValue; 5923 } else if (lastFocusedIndex < nextSelectValue.length) { 5924 // the focusedValue is not present in the next selectValue array by 5925 // reference, so return the new value at the same index 5926 return nextSelectValue[lastFocusedIndex]; 5927 } 5928 } 5929 return null; 5930} 5931function getNextFocusedOption(state, options) { 5932 var lastFocusedOption = state.focusedOption; 5933 return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0]; 5934} 5935var getFocusedOptionId = function getFocusedOptionId(focusableOptionsWithIds, focusedOption) { 5936 var _focusableOptionsWith; 5937 var focusedOptionId = (_focusableOptionsWith = focusableOptionsWithIds.find(function (option) { 5938 return option.data === focusedOption; 5939 })) === null || _focusableOptionsWith === void 0 ? void 0 : _focusableOptionsWith.id; 5940 return focusedOptionId || null; 5941}; 5942var getOptionLabel = function getOptionLabel(props, data) { 5943 return props.getOptionLabel(data); 5944}; 5945var getOptionValue = function getOptionValue(props, data) { 5946 return props.getOptionValue(data); 5947}; 5948function _isOptionDisabled(props, option, selectValue) { 5949 return typeof props.isOptionDisabled === 'function' ? props.isOptionDisabled(option, selectValue) : false; 5950} 5951function _isOptionSelected(props, option, selectValue) { 5952 if (selectValue.indexOf(option) > -1) return true; 5953 if (typeof props.isOptionSelected === 'function') { 5954 return props.isOptionSelected(option, selectValue); 5955 } 5956 var candidate = getOptionValue(props, option); 5957 return selectValue.some(function (i) { 5958 return getOptionValue(props, i) === candidate; 5959 }); 5960} 5961function _filterOption(props, option, inputValue) { 5962 return props.filterOption ? props.filterOption(option, inputValue) : true; 5963} 5964var shouldHideSelectedOptions = function shouldHideSelectedOptions(props) { 5965 var hideSelectedOptions = props.hideSelectedOptions, 5966 isMulti = props.isMulti; 5967 if (hideSelectedOptions === undefined) return isMulti; 5968 return hideSelectedOptions; 5969}; 5970var instanceId = 1; 5971var Select = /*#__PURE__*/function (_Component) { 5972 _inherits(Select, _Component); 5973 var _super = _createSuper(Select); 5974 // Misc. Instance Properties 5975 // ------------------------------ 5976 5977 // TODO 5978 5979 // Refs 5980 // ------------------------------ 5981 5982 // Lifecycle 5983 // ------------------------------ 5984 5985 function Select(_props) { 5986 var _this; 5987 _classCallCheck(this, Select); 5988 _this = _super.call(this, _props); 5989 _this.state = { 5990 ariaSelection: null, 5991 focusedOption: null, 5992 focusedOptionId: null, 5993 focusableOptionsWithIds: [], 5994 focusedValue: null, 5995 inputIsHidden: false, 5996 isFocused: false, 5997 selectValue: [], 5998 clearFocusValueOnUpdate: false, 5999 prevWasFocused: false, 6000 inputIsHiddenAfterUpdate: undefined, 6001 prevProps: undefined, 6002 instancePrefix: '' 6003 }; 6004 _this.blockOptionHover = false; 6005 _this.isComposing = false; 6006 _this.commonProps = void 0; 6007 _this.initialTouchX = 0; 6008 _this.initialTouchY = 0; 6009 _this.openAfterFocus = false; 6010 _this.scrollToFocusedOptionOnUpdate = false; 6011 _this.userIsDragging = void 0; 6012 _this.isAppleDevice = isAppleDevice(); 6013 _this.controlRef = null; 6014 _this.getControlRef = function (ref) { 6015 _this.controlRef = ref; 6016 }; 6017 _this.focusedOptionRef = null; 6018 _this.getFocusedOptionRef = function (ref) { 6019 _this.focusedOptionRef = ref; 6020 }; 6021 _this.menuListRef = null; 6022 _this.getMenuListRef = function (ref) { 6023 _this.menuListRef = ref; 6024 }; 6025 _this.inputRef = null; 6026 _this.getInputRef = function (ref) { 6027 _this.inputRef = ref; 6028 }; 6029 _this.focus = _this.focusInput; 6030 _this.blur = _this.blurInput; 6031 _this.onChange = function (newValue, actionMeta) { 6032 var _this$props = _this.props, 6033 onChange = _this$props.onChange, 6034 name = _this$props.name; 6035 actionMeta.name = name; 6036 _this.ariaOnChange(newValue, actionMeta); 6037 onChange(newValue, actionMeta); 6038 }; 6039 _this.setValue = function (newValue, action, option) { 6040 var _this$props2 = _this.props, 6041 closeMenuOnSelect = _this$props2.closeMenuOnSelect, 6042 isMulti = _this$props2.isMulti, 6043 inputValue = _this$props2.inputValue; 6044 _this.onInputChange('', { 6045 action: 'set-value', 6046 prevInputValue: inputValue 6047 }); 6048 if (closeMenuOnSelect) { 6049 _this.setState({ 6050 inputIsHiddenAfterUpdate: !isMulti 6051 }); 6052 _this.onMenuClose(); 6053 } 6054 // when the select value should change, we should reset focusedValue 6055 _this.setState({ 6056 clearFocusValueOnUpdate: true 6057 }); 6058 _this.onChange(newValue, { 6059 action: action, 6060 option: option 6061 }); 6062 }; 6063 _this.selectOption = function (newValue) { 6064 var _this$props3 = _this.props, 6065 blurInputOnSelect = _this$props3.blurInputOnSelect, 6066 isMulti = _this$props3.isMulti, 6067 name = _this$props3.name; 6068 var selectValue = _this.state.selectValue; 6069 var deselected = isMulti && _this.isOptionSelected(newValue, selectValue); 6070 var isDisabled = _this.isOptionDisabled(newValue, selectValue); 6071 if (deselected) { 6072 var candidate = _this.getOptionValue(newValue); 6073 _this.setValue(multiValueAsValue(selectValue.filter(function (i) { 6074 return _this.getOptionValue(i) !== candidate; 6075 })), 'deselect-option', newValue); 6076 } else if (!isDisabled) { 6077 // Select option if option is not disabled 6078 if (isMulti) { 6079 _this.setValue(multiValueAsValue([].concat(_toConsumableArray(selectValue), [newValue])), 'select-option', newValue); 6080 } else { 6081 _this.setValue(singleValueAsValue(newValue), 'select-option'); 6082 } 6083 } else { 6084 _this.ariaOnChange(singleValueAsValue(newValue), { 6085 action: 'select-option', 6086 option: newValue, 6087 name: name 6088 }); 6089 return; 6090 } 6091 if (blurInputOnSelect) { 6092 _this.blurInput(); 6093 } 6094 }; 6095 _this.removeValue = function (removedValue) { 6096 var isMulti = _this.props.isMulti; 6097 var selectValue = _this.state.selectValue; 6098 var candidate = _this.getOptionValue(removedValue); 6099 var newValueArray = selectValue.filter(function (i) { 6100 return _this.getOptionValue(i) !== candidate; 6101 }); 6102 var newValue = valueTernary(isMulti, newValueArray, newValueArray[0] || null); 6103 _this.onChange(newValue, { 6104 action: 'remove-value', 6105 removedValue: removedValue 6106 }); 6107 _this.focusInput(); 6108 }; 6109 _this.clearValue = function () { 6110 var selectValue = _this.state.selectValue; 6111 _this.onChange(valueTernary(_this.props.isMulti, [], null), { 6112 action: 'clear', 6113 removedValues: selectValue 6114 }); 6115 }; 6116 _this.popValue = function () { 6117 var isMulti = _this.props.isMulti; 6118 var selectValue = _this.state.selectValue; 6119 var lastSelectedValue = selectValue[selectValue.length - 1]; 6120 var newValueArray = selectValue.slice(0, selectValue.length - 1); 6121 var newValue = valueTernary(isMulti, newValueArray, newValueArray[0] || null); 6122 if (lastSelectedValue) { 6123 _this.onChange(newValue, { 6124 action: 'pop-value', 6125 removedValue: lastSelectedValue 6126 }); 6127 } 6128 }; 6129 _this.getFocusedOptionId = function (focusedOption) { 6130 return getFocusedOptionId(_this.state.focusableOptionsWithIds, focusedOption); 6131 }; 6132 _this.getFocusableOptionsWithIds = function () { 6133 return buildFocusableOptionsWithIds(buildCategorizedOptions(_this.props, _this.state.selectValue), _this.getElementId('option')); 6134 }; 6135 _this.getValue = function () { 6136 return _this.state.selectValue; 6137 }; 6138 _this.cx = function () { 6139 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 6140 args[_key] = arguments[_key]; 6141 } 6142 return classNames.apply(void 0, [_this.props.classNamePrefix].concat(args)); 6143 }; 6144 _this.getOptionLabel = function (data) { 6145 return getOptionLabel(_this.props, data); 6146 }; 6147 _this.getOptionValue = function (data) { 6148 return getOptionValue(_this.props, data); 6149 }; 6150 _this.getStyles = function (key, props) { 6151 var unstyled = _this.props.unstyled; 6152 var base = defaultStyles[key](props, unstyled); 6153 base.boxSizing = 'border-box'; 6154 var custom = _this.props.styles[key]; 6155 return custom ? custom(base, props) : base; 6156 }; 6157 _this.getClassNames = function (key, props) { 6158 var _this$props$className, _this$props$className2; 6159 return (_this$props$className = (_this$props$className2 = _this.props.classNames)[key]) === null || _this$props$className === void 0 ? void 0 : _this$props$className.call(_this$props$className2, props); 6160 }; 6161 _this.getElementId = function (element) { 6162 return "".concat(_this.state.instancePrefix, "-").concat(element); 6163 }; 6164 _this.getComponents = function () { 6165 return defaultComponents(_this.props); 6166 }; 6167 _this.buildCategorizedOptions = function () { 6168 return buildCategorizedOptions(_this.props, _this.state.selectValue); 6169 }; 6170 _this.getCategorizedOptions = function () { 6171 return _this.props.menuIsOpen ? _this.buildCategorizedOptions() : []; 6172 }; 6173 _this.buildFocusableOptions = function () { 6174 return buildFocusableOptionsFromCategorizedOptions(_this.buildCategorizedOptions()); 6175 }; 6176 _this.getFocusableOptions = function () { 6177 return _this.props.menuIsOpen ? _this.buildFocusableOptions() : []; 6178 }; 6179 _this.ariaOnChange = function (value, actionMeta) { 6180 _this.setState({ 6181 ariaSelection:
6181(0,objectSpread2/* default */.Z)
vendor: 19,425 bytes, lines 6181-6754
6181({ 6182 value: value 6183 }, actionMeta) 6184 }); 6185 }; 6186 _this.onMenuMouseDown = function (event) { 6187 if (event.button !== 0) { 6188 return; 6189 } 6190 event.stopPropagation(); 6191 event.preventDefault(); 6192 _this.focusInput(); 6193 }; 6194 _this.onMenuMouseMove = function (event) { 6195 _this.blockOptionHover = false; 6196 }; 6197 _this.onControlMouseDown = function (event) { 6198 // Event captured by dropdown indicator 6199 if (event.defaultPrevented) { 6200 return; 6201 } 6202 var openMenuOnClick = _this.props.openMenuOnClick; 6203 if (!_this.state.isFocused) { 6204 if (openMenuOnClick) { 6205 _this.openAfterFocus = true; 6206 } 6207 _this.focusInput(); 6208 } else if (!_this.props.menuIsOpen) { 6209 if (openMenuOnClick) { 6210 _this.openMenu('first'); 6211 } 6212 } else { 6213 if (event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') { 6214 _this.onMenuClose(); 6215 } 6216 } 6217 if (event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') { 6218 event.preventDefault(); 6219 } 6220 }; 6221 _this.onDropdownIndicatorMouseDown = function (event) { 6222 // ignore mouse events that weren't triggered by the primary button 6223 if (event && event.type === 'mousedown' && event.button !== 0) { 6224 return; 6225 } 6226 if (_this.props.isDisabled) return; 6227 var _this$props4 = _this.props, 6228 isMulti = _this$props4.isMulti, 6229 menuIsOpen = _this$props4.menuIsOpen; 6230 _this.focusInput(); 6231 if (menuIsOpen) { 6232 _this.setState({ 6233 inputIsHiddenAfterUpdate: !isMulti 6234 }); 6235 _this.onMenuClose(); 6236 } else { 6237 _this.openMenu('first'); 6238 } 6239 event.preventDefault(); 6240 }; 6241 _this.onClearIndicatorMouseDown = function (event) { 6242 // ignore mouse events that weren't triggered by the primary button 6243 if (event && event.type === 'mousedown' && event.button !== 0) { 6244 return; 6245 } 6246 _this.clearValue(); 6247 event.preventDefault(); 6248 _this.openAfterFocus = false; 6249 if (event.type === 'touchend') { 6250 _this.focusInput(); 6251 } else { 6252 setTimeout(function () { 6253 return _this.focusInput(); 6254 }); 6255 } 6256 }; 6257 _this.onScroll = function (event) { 6258 if (typeof _this.props.closeMenuOnScroll === 'boolean') { 6259 if (event.target instanceof HTMLElement && isDocumentElement(event.target)) { 6260 _this.props.onMenuClose(); 6261 } 6262 } else if (typeof _this.props.closeMenuOnScroll === 'function') { 6263 if (_this.props.closeMenuOnScroll(event)) { 6264 _this.props.onMenuClose(); 6265 } 6266 } 6267 }; 6268 _this.onCompositionStart = function () { 6269 _this.isComposing = true; 6270 }; 6271 _this.onCompositionEnd = function () { 6272 _this.isComposing = false; 6273 }; 6274 _this.onTouchStart = function (_ref2) { 6275 var touches = _ref2.touches; 6276 var touch = touches && touches.item(0); 6277 if (!touch) { 6278 return; 6279 } 6280 _this.initialTouchX = touch.clientX; 6281 _this.initialTouchY = touch.clientY; 6282 _this.userIsDragging = false; 6283 }; 6284 _this.onTouchMove = function (_ref3) { 6285 var touches = _ref3.touches; 6286 var touch = touches && touches.item(0); 6287 if (!touch) { 6288 return; 6289 } 6290 var deltaX = Math.abs(touch.clientX - _this.initialTouchX); 6291 var deltaY = Math.abs(touch.clientY - _this.initialTouchY); 6292 var moveThreshold = 5; 6293 _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold; 6294 }; 6295 _this.onTouchEnd = function (event) { 6296 if (_this.userIsDragging) return; 6297 6298 // close the menu if the user taps outside 6299 // we're checking on event.target here instead of event.currentTarget, because we want to assert information 6300 // on events on child elements, not the document (which we've attached this handler to). 6301 if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) { 6302 _this.blurInput(); 6303 } 6304 6305 // reset move vars 6306 _this.initialTouchX = 0; 6307 _this.initialTouchY = 0; 6308 }; 6309 _this.onControlTouchEnd = function (event) { 6310 if (_this.userIsDragging) return; 6311 _this.onControlMouseDown(event); 6312 }; 6313 _this.onClearIndicatorTouchEnd = function (event) { 6314 if (_this.userIsDragging) return; 6315 _this.onClearIndicatorMouseDown(event); 6316 }; 6317 _this.onDropdownIndicatorTouchEnd = function (event) { 6318 if (_this.userIsDragging) return; 6319 _this.onDropdownIndicatorMouseDown(event); 6320 }; 6321 _this.handleInputChange = function (event) { 6322 var prevInputValue = _this.props.inputValue; 6323 var inputValue = event.currentTarget.value; 6324 _this.setState({ 6325 inputIsHiddenAfterUpdate: false 6326 }); 6327 _this.onInputChange(inputValue, { 6328 action: 'input-change', 6329 prevInputValue: prevInputValue 6330 }); 6331 if (!_this.props.menuIsOpen) { 6332 _this.onMenuOpen(); 6333 } 6334 }; 6335 _this.onInputFocus = function (event) { 6336 if (_this.props.onFocus) { 6337 _this.props.onFocus(event); 6338 } 6339 _this.setState({ 6340 inputIsHiddenAfterUpdate: false, 6341 isFocused: true 6342 }); 6343 if (_this.openAfterFocus || _this.props.openMenuOnFocus) { 6344 _this.openMenu('first'); 6345 } 6346 _this.openAfterFocus = false; 6347 }; 6348 _this.onInputBlur = function (event) { 6349 var prevInputValue = _this.props.inputValue; 6350 if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) { 6351 _this.inputRef.focus(); 6352 return; 6353 } 6354 if (_this.props.onBlur) { 6355 _this.props.onBlur(event); 6356 } 6357 _this.onInputChange('', { 6358 action: 'input-blur', 6359 prevInputValue: prevInputValue 6360 }); 6361 _this.onMenuClose(); 6362 _this.setState({ 6363 focusedValue: null, 6364 isFocused: false 6365 }); 6366 }; 6367 _this.onOptionHover = function (focusedOption) { 6368 if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) { 6369 return; 6370 } 6371 var options = _this.getFocusableOptions(); 6372 var focusedOptionIndex = options.indexOf(focusedOption); 6373 _this.setState({ 6374 focusedOption: focusedOption, 6375 focusedOptionId: focusedOptionIndex > -1 ? _this.getFocusedOptionId(focusedOption) : null 6376 }); 6377 }; 6378 _this.shouldHideSelectedOptions = function () { 6379 return shouldHideSelectedOptions(_this.props); 6380 }; 6381 _this.onValueInputFocus = function (e) { 6382 e.preventDefault(); 6383 e.stopPropagation(); 6384 _this.focus(); 6385 }; 6386 _this.onKeyDown = function (event) { 6387 var _this$props5 = _this.props, 6388 isMulti = _this$props5.isMulti, 6389 backspaceRemovesValue = _this$props5.backspaceRemovesValue, 6390 escapeClearsValue = _this$props5.escapeClearsValue, 6391 inputValue = _this$props5.inputValue, 6392 isClearable = _this$props5.isClearable, 6393 isDisabled = _this$props5.isDisabled, 6394 menuIsOpen = _this$props5.menuIsOpen, 6395 onKeyDown = _this$props5.onKeyDown, 6396 tabSelectsValue = _this$props5.tabSelectsValue, 6397 openMenuOnFocus = _this$props5.openMenuOnFocus; 6398 var _this$state = _this.state, 6399 focusedOption = _this$state.focusedOption, 6400 focusedValue = _this$state.focusedValue, 6401 selectValue = _this$state.selectValue; 6402 if (isDisabled) return; 6403 if (typeof onKeyDown === 'function') { 6404 onKeyDown(event); 6405 if (event.defaultPrevented) { 6406 return; 6407 } 6408 } 6409 6410 // Block option hover events when the user has just pressed a key 6411 _this.blockOptionHover = true; 6412 switch (event.key) { 6413 case 'ArrowLeft': 6414 if (!isMulti || inputValue) return; 6415 _this.focusValue('previous'); 6416 break; 6417 case 'ArrowRight': 6418 if (!isMulti || inputValue) return; 6419 _this.focusValue('next'); 6420 break; 6421 case 'Delete': 6422 case 'Backspace': 6423 if (inputValue) return; 6424 if (focusedValue) { 6425 _this.removeValue(focusedValue); 6426 } else { 6427 if (!backspaceRemovesValue) return; 6428 if (isMulti) { 6429 _this.popValue(); 6430 } else if (isClearable) { 6431 _this.clearValue(); 6432 } 6433 } 6434 break; 6435 case 'Tab': 6436 if (_this.isComposing) return; 6437 if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || 6438 // don't capture the event if the menu opens on focus and the focused 6439 // option is already selected; it breaks the flow of navigation 6440 openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) { 6441 return; 6442 } 6443 _this.selectOption(focusedOption); 6444 break; 6445 case 'Enter': 6446 if (event.keyCode === 229) { 6447 // ignore the keydown event from an Input Method Editor(IME) 6448 // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode 6449 break; 6450 } 6451 if (menuIsOpen) { 6452 if (!focusedOption) return; 6453 if (_this.isComposing) return; 6454 _this.selectOption(focusedOption); 6455 break; 6456 } 6457 return; 6458 case 'Escape': 6459 if (menuIsOpen) { 6460 _this.setState({ 6461 inputIsHiddenAfterUpdate: false 6462 }); 6463 _this.onInputChange('', { 6464 action: 'menu-close', 6465 prevInputValue: inputValue 6466 }); 6467 _this.onMenuClose(); 6468 } else if (isClearable && escapeClearsValue) { 6469 _this.clearValue(); 6470 } 6471 break; 6472 case ' ': 6473 // space 6474 if (inputValue) { 6475 return; 6476 } 6477 if (!menuIsOpen) { 6478 _this.openMenu('first'); 6479 break; 6480 } 6481 if (!focusedOption) return; 6482 _this.selectOption(focusedOption); 6483 break; 6484 case 'ArrowUp': 6485 if (menuIsOpen) { 6486 _this.focusOption('up'); 6487 } else { 6488 _this.openMenu('last'); 6489 } 6490 break; 6491 case 'ArrowDown': 6492 if (menuIsOpen) { 6493 _this.focusOption('down'); 6494 } else { 6495 _this.openMenu('first'); 6496 } 6497 break; 6498 case 'PageUp': 6499 if (!menuIsOpen) return; 6500 _this.focusOption('pageup'); 6501 break; 6502 case 'PageDown': 6503 if (!menuIsOpen) return; 6504 _this.focusOption('pagedown'); 6505 break; 6506 case 'Home': 6507 if (!menuIsOpen) return; 6508 _this.focusOption('first'); 6509 break; 6510 case 'End': 6511 if (!menuIsOpen) return; 6512 _this.focusOption('last'); 6513 break; 6514 default: 6515 return; 6516 } 6517 event.preventDefault(); 6518 }; 6519 _this.state.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId); 6520 _this.state.selectValue = cleanValue(_props.value); 6521 // Set focusedOption if menuIsOpen is set on init (e.g. defaultMenuIsOpen) 6522 if (_props.menuIsOpen && _this.state.selectValue.length) { 6523 var focusableOptionsWithIds = _this.getFocusableOptionsWithIds(); 6524 var focusableOptions = _this.buildFocusableOptions(); 6525 var optionIndex = focusableOptions.indexOf(_this.state.selectValue[0]); 6526 _this.state.focusableOptionsWithIds = focusableOptionsWithIds; 6527 _this.state.focusedOption = focusableOptions[optionIndex]; 6528 _this.state.focusedOptionId = getFocusedOptionId(focusableOptionsWithIds, focusableOptions[optionIndex]); 6529 } 6530 return _this; 6531 } 6532 _createClass(Select, [{ 6533 key: "componentDidMount", 6534 value: function componentDidMount() { 6535 this.startListeningComposition(); 6536 this.startListeningToTouch(); 6537 if (this.props.closeMenuOnScroll && document && document.addEventListener) { 6538 // Listen to all scroll events, and filter them out inside of 'onScroll' 6539 document.addEventListener('scroll', this.onScroll, true); 6540 } 6541 if (this.props.autoFocus) { 6542 this.focusInput(); 6543 } 6544 6545 // Scroll focusedOption into view if menuIsOpen is set on mount (e.g. defaultMenuIsOpen) 6546 if (this.props.menuIsOpen && this.state.focusedOption && this.menuListRef && this.focusedOptionRef) { 6547 scrollIntoView(this.menuListRef, this.focusedOptionRef); 6548 } 6549 } 6550 }, { 6551 key: "componentDidUpdate", 6552 value: function componentDidUpdate(prevProps) { 6553 var _this$props6 = this.props, 6554 isDisabled = _this$props6.isDisabled, 6555 menuIsOpen = _this$props6.menuIsOpen; 6556 var isFocused = this.state.isFocused; 6557 if ( 6558 // ensure focus is restored correctly when the control becomes enabled 6559 isFocused && !isDisabled && prevProps.isDisabled || 6560 // ensure focus is on the Input when the menu opens 6561 isFocused && menuIsOpen && !prevProps.menuIsOpen) { 6562 this.focusInput(); 6563 } 6564 if (isFocused && isDisabled && !prevProps.isDisabled) { 6565 // ensure select state gets blurred in case Select is programmatically disabled while focused 6566 // eslint-disable-next-line react/no-did-update-set-state 6567 this.setState({ 6568 isFocused: false 6569 }, this.onMenuClose); 6570 } else if (!isFocused && !isDisabled && prevProps.isDisabled && this.inputRef === document.activeElement) { 6571 // ensure select state gets focused in case Select is programatically re-enabled while focused (Firefox) 6572 // eslint-disable-next-line react/no-did-update-set-state 6573 this.setState({ 6574 isFocused: true 6575 }); 6576 } 6577 6578 // scroll the focused option into view if necessary 6579 if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) { 6580 scrollIntoView(this.menuListRef, this.focusedOptionRef); 6581 this.scrollToFocusedOptionOnUpdate = false; 6582 } 6583 } 6584 }, { 6585 key: "componentWillUnmount", 6586 value: function componentWillUnmount() { 6587 this.stopListeningComposition(); 6588 this.stopListeningToTouch(); 6589 document.removeEventListener('scroll', this.onScroll, true); 6590 } 6591 6592 // ============================== 6593 // Consumer Handlers 6594 // ============================== 6595 }, { 6596 key: "onMenuOpen", 6597 value: function onMenuOpen() { 6598 this.props.onMenuOpen(); 6599 } 6600 }, { 6601 key: "onMenuClose", 6602 value: function onMenuClose() { 6603 this.onInputChange('', { 6604 action: 'menu-close', 6605 prevInputValue: this.props.inputValue 6606 }); 6607 this.props.onMenuClose(); 6608 } 6609 }, { 6610 key: "onInputChange", 6611 value: function onInputChange(newValue, actionMeta) { 6612 this.props.onInputChange(newValue, actionMeta); 6613 } 6614 6615 // ============================== 6616 // Methods 6617 // ============================== 6618 }, { 6619 key: "focusInput", 6620 value: function focusInput() { 6621 if (!this.inputRef) return; 6622 this.inputRef.focus(); 6623 } 6624 }, { 6625 key: "blurInput", 6626 value: function blurInput() { 6627 if (!this.inputRef) return; 6628 this.inputRef.blur(); 6629 } 6630 6631 // aliased for consumers 6632 }, { 6633 key: "openMenu", 6634 value: function openMenu(focusOption) { 6635 var _this2 = this; 6636 var _this$state2 = this.state, 6637 selectValue = _this$state2.selectValue, 6638 isFocused = _this$state2.isFocused; 6639 var focusableOptions = this.buildFocusableOptions(); 6640 var openAtIndex = focusOption === 'first' ? 0 : focusableOptions.length - 1; 6641 if (!this.props.isMulti) { 6642 var selectedIndex = focusableOptions.indexOf(selectValue[0]); 6643 if (selectedIndex > -1) { 6644 openAtIndex = selectedIndex; 6645 } 6646 } 6647 6648 // only scroll if the menu isn't already open 6649 this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef); 6650 this.setState({ 6651 inputIsHiddenAfterUpdate: false, 6652 focusedValue: null, 6653 focusedOption: focusableOptions[openAtIndex], 6654 focusedOptionId: this.getFocusedOptionId(focusableOptions[openAtIndex]) 6655 }, function () { 6656 return _this2.onMenuOpen(); 6657 }); 6658 } 6659 }, { 6660 key: "focusValue", 6661 value: function focusValue(direction) { 6662 var _this$state3 = this.state, 6663 selectValue = _this$state3.selectValue, 6664 focusedValue = _this$state3.focusedValue; 6665 6666 // Only multiselects support value focusing 6667 if (!this.props.isMulti) return; 6668 this.setState({ 6669 focusedOption: null 6670 }); 6671 var focusedIndex = selectValue.indexOf(focusedValue); 6672 if (!focusedValue) { 6673 focusedIndex = -1; 6674 } 6675 var lastIndex = selectValue.length - 1; 6676 var nextFocus = -1; 6677 if (!selectValue.length) return; 6678 switch (direction) { 6679 case 'previous': 6680 if (focusedIndex === 0) { 6681 // don't cycle from the start to the end 6682 nextFocus = 0; 6683 } else if (focusedIndex === -1) { 6684 // if nothing is focused, focus the last value first 6685 nextFocus = lastIndex; 6686 } else { 6687 nextFocus = focusedIndex - 1; 6688 } 6689 break; 6690 case 'next': 6691 if (focusedIndex > -1 && focusedIndex < lastIndex) { 6692 nextFocus = focusedIndex + 1; 6693 } 6694 break; 6695 } 6696 this.setState({ 6697 inputIsHidden: nextFocus !== -1, 6698 focusedValue: selectValue[nextFocus] 6699 }); 6700 } 6701 }, { 6702 key: "focusOption", 6703 value: function focusOption() { 6704 var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first'; 6705 var pageSize = this.props.pageSize; 6706 var focusedOption = this.state.focusedOption; 6707 var options = this.getFocusableOptions(); 6708 if (!options.length) return; 6709 var nextFocus = 0; // handles 'first' 6710 var focusedIndex = options.indexOf(focusedOption); 6711 if (!focusedOption) { 6712 focusedIndex = -1; 6713 } 6714 if (direction === 'up') { 6715 nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1; 6716 } else if (direction === 'down') { 6717 nextFocus = (focusedIndex + 1) % options.length; 6718 } else if (direction === 'pageup') { 6719 nextFocus = focusedIndex - pageSize; 6720 if (nextFocus < 0) nextFocus = 0; 6721 } else if (direction === 'pagedown') { 6722 nextFocus = focusedIndex + pageSize; 6723 if (nextFocus > options.length - 1) nextFocus = options.length - 1; 6724 } else if (direction === 'last') { 6725 nextFocus = options.length - 1; 6726 } 6727 this.scrollToFocusedOptionOnUpdate = true; 6728 this.setState({ 6729 focusedOption: options[nextFocus], 6730 focusedValue: null, 6731 focusedOptionId: this.getFocusedOptionId(options[nextFocus]) 6732 }); 6733 } 6734 }, { 6735 key: "getTheme", 6736 value: 6737 // ============================== 6738 // Getters 6739 // ============================== 6740 6741 function getTheme() { 6742 // Use the default theme if there are no customisations. 6743 if (!this.props.theme) { 6744 return defaultTheme; 6745 } 6746 // If the theme prop is a function, assume the function 6747 // knows how to merge the passed-in default theme with 6748 // its own modifications. 6749 if (typeof this.props.theme === 'function') { 6750 return this.props.theme(defaultTheme); 6751 } 6752 // Otherwise, if a plain theme object was passed in, 6753 // overlay it with the default theme. 6754 return
vendor: 14,188 bytes, lines 6754-7133
6754(0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, defaultTheme), this.props.theme); 6755 } 6756 }, { 6757 key: "getCommonProps", 6758 value: function getCommonProps() { 6759 var clearValue = this.clearValue, 6760 cx = this.cx, 6761 getStyles = this.getStyles, 6762 getClassNames = this.getClassNames, 6763 getValue = this.getValue, 6764 selectOption = this.selectOption, 6765 setValue = this.setValue, 6766 props = this.props; 6767 var isMulti = props.isMulti, 6768 isRtl = props.isRtl, 6769 options = props.options; 6770 var hasValue = this.hasValue(); 6771 return { 6772 clearValue: clearValue, 6773 cx: cx, 6774 getStyles: getStyles, 6775 getClassNames: getClassNames, 6776 getValue: getValue, 6777 hasValue: hasValue, 6778 isMulti: isMulti, 6779 isRtl: isRtl, 6780 options: options, 6781 selectOption: selectOption, 6782 selectProps: props, 6783 setValue: setValue, 6784 theme: this.getTheme() 6785 }; 6786 } 6787 }, { 6788 key: "hasValue", 6789 value: function hasValue() { 6790 var selectValue = this.state.selectValue; 6791 return selectValue.length > 0; 6792 } 6793 }, { 6794 key: "hasOptions", 6795 value: function hasOptions() { 6796 return !!this.getFocusableOptions().length; 6797 } 6798 }, { 6799 key: "isClearable", 6800 value: function isClearable() { 6801 var _this$props7 = this.props, 6802 isClearable = _this$props7.isClearable, 6803 isMulti = _this$props7.isMulti; 6804 6805 // single select, by default, IS NOT clearable 6806 // multi select, by default, IS clearable 6807 if (isClearable === undefined) return isMulti; 6808 return isClearable; 6809 } 6810 }, { 6811 key: "isOptionDisabled", 6812 value: function isOptionDisabled(option, selectValue) { 6813 return _isOptionDisabled(this.props, option, selectValue); 6814 } 6815 }, { 6816 key: "isOptionSelected", 6817 value: function isOptionSelected(option, selectValue) { 6818 return _isOptionSelected(this.props, option, selectValue); 6819 } 6820 }, { 6821 key: "filterOption", 6822 value: function filterOption(option, inputValue) { 6823 return _filterOption(this.props, option, inputValue); 6824 } 6825 }, { 6826 key: "formatOptionLabel", 6827 value: function formatOptionLabel(data, context) { 6828 if (typeof this.props.formatOptionLabel === 'function') { 6829 var _inputValue = this.props.inputValue; 6830 var _selectValue = this.state.selectValue; 6831 return this.props.formatOptionLabel(data, { 6832 context: context, 6833 inputValue: _inputValue, 6834 selectValue: _selectValue 6835 }); 6836 } else { 6837 return this.getOptionLabel(data); 6838 } 6839 } 6840 }, { 6841 key: "formatGroupLabel", 6842 value: function formatGroupLabel(data) { 6843 return this.props.formatGroupLabel(data); 6844 } 6845 6846 // ============================== 6847 // Mouse Handlers 6848 // ============================== 6849 }, { 6850 key: "startListeningComposition", 6851 value: 6852 // ============================== 6853 // Composition Handlers 6854 // ============================== 6855 6856 function startListeningComposition() { 6857 if (document && document.addEventListener) { 6858 document.addEventListener('compositionstart', this.onCompositionStart, false); 6859 document.addEventListener('compositionend', this.onCompositionEnd, false); 6860 } 6861 } 6862 }, { 6863 key: "stopListeningComposition", 6864 value: function stopListeningComposition() { 6865 if (document && document.removeEventListener) { 6866 document.removeEventListener('compositionstart', this.onCompositionStart); 6867 document.removeEventListener('compositionend', this.onCompositionEnd); 6868 } 6869 } 6870 }, { 6871 key: "startListeningToTouch", 6872 value: 6873 // ============================== 6874 // Touch Handlers 6875 // ============================== 6876 6877 function startListeningToTouch() { 6878 if (document && document.addEventListener) { 6879 document.addEventListener('touchstart', this.onTouchStart, false); 6880 document.addEventListener('touchmove', this.onTouchMove, false); 6881 document.addEventListener('touchend', this.onTouchEnd, false); 6882 } 6883 } 6884 }, { 6885 key: "stopListeningToTouch", 6886 value: function stopListeningToTouch() { 6887 if (document && document.removeEventListener) { 6888 document.removeEventListener('touchstart', this.onTouchStart); 6889 document.removeEventListener('touchmove', this.onTouchMove); 6890 document.removeEventListener('touchend', this.onTouchEnd); 6891 } 6892 } 6893 }, { 6894 key: "renderInput", 6895 value: 6896 // ============================== 6897 // Renderers 6898 // ============================== 6899 function renderInput() { 6900 var _this$props8 = this.props, 6901 isDisabled = _this$props8.isDisabled, 6902 isSearchable = _this$props8.isSearchable, 6903 inputId = _this$props8.inputId, 6904 inputValue = _this$props8.inputValue, 6905 tabIndex = _this$props8.tabIndex, 6906 form = _this$props8.form, 6907 menuIsOpen = _this$props8.menuIsOpen, 6908 required = _this$props8.required; 6909 var _this$getComponents = this.getComponents(), 6910 Input = _this$getComponents.Input; 6911 var _this$state4 = this.state, 6912 inputIsHidden = _this$state4.inputIsHidden, 6913 ariaSelection = _this$state4.ariaSelection; 6914 var commonProps = this.commonProps; 6915 var id = inputId || this.getElementId('input'); 6916 6917 // aria attributes makes the JSX "noisy", separated for clarity 6918 var ariaAttributes = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({ 6919 'aria-autocomplete': 'list', 6920 'aria-expanded': menuIsOpen, 6921 'aria-haspopup': true, 6922 'aria-errormessage': this.props['aria-errormessage'], 6923 'aria-invalid': this.props['aria-invalid'], 6924 'aria-label': this.props['aria-label'], 6925 'aria-labelledby': this.props['aria-labelledby'], 6926 'aria-required': required, 6927 role: 'combobox', 6928 'aria-activedescendant': this.isAppleDevice ? undefined : this.state.focusedOptionId || '' 6929 }, menuIsOpen && { 6930 'aria-controls': this.getElementId('listbox') 6931 }), !isSearchable && { 6932 'aria-readonly': true 6933 }), this.hasValue() ? (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus' && { 6934 'aria-describedby': this.getElementId('live-region') 6935 } : { 6936 'aria-describedby': this.getElementId('placeholder') 6937 }); 6938 if (!isSearchable) { 6939 // use a dummy input to maintain focus/blur functionality 6940 return /*#__PURE__*/react.createElement(DummyInput, (0,esm_extends/* default */.Z)({ 6941 id: id, 6942 innerRef: this.getInputRef, 6943 onBlur: this.onInputBlur, 6944 onChange: noop, 6945 onFocus: this.onInputFocus, 6946 disabled: isDisabled, 6947 tabIndex: tabIndex, 6948 inputMode: "none", 6949 form: form, 6950 value: "" 6951 }, ariaAttributes)); 6952 } 6953 return /*#__PURE__*/react.createElement(Input, (0,esm_extends/* default */.Z)({}, commonProps, { 6954 autoCapitalize: "none", 6955 autoComplete: "off", 6956 autoCorrect: "off", 6957 id: id, 6958 innerRef: this.getInputRef, 6959 isDisabled: isDisabled, 6960 isHidden: inputIsHidden, 6961 onBlur: this.onInputBlur, 6962 onChange: this.handleInputChange, 6963 onFocus: this.onInputFocus, 6964 spellCheck: "false", 6965 tabIndex: tabIndex, 6966 form: form, 6967 type: "text", 6968 value: inputValue 6969 }, ariaAttributes)); 6970 } 6971 }, { 6972 key: "renderPlaceholderOrValue", 6973 value: function renderPlaceholderOrValue() { 6974 var _this3 = this; 6975 var _this$getComponents2 = this.getComponents(), 6976 MultiValue = _this$getComponents2.MultiValue, 6977 MultiValueContainer = _this$getComponents2.MultiValueContainer, 6978 MultiValueLabel = _this$getComponents2.MultiValueLabel, 6979 MultiValueRemove = _this$getComponents2.MultiValueRemove, 6980 SingleValue = _this$getComponents2.SingleValue, 6981 Placeholder = _this$getComponents2.Placeholder; 6982 var commonProps = this.commonProps; 6983 var _this$props9 = this.props, 6984 controlShouldRenderValue = _this$props9.controlShouldRenderValue, 6985 isDisabled = _this$props9.isDisabled, 6986 isMulti = _this$props9.isMulti, 6987 inputValue = _this$props9.inputValue, 6988 placeholder = _this$props9.placeholder; 6989 var _this$state5 = this.state, 6990 selectValue = _this$state5.selectValue, 6991 focusedValue = _this$state5.focusedValue, 6992 isFocused = _this$state5.isFocused; 6993 if (!this.hasValue() || !controlShouldRenderValue) { 6994 return inputValue ? null : /*#__PURE__*/react.createElement(Placeholder, (0,esm_extends/* default */.Z)({}, commonProps, { 6995 key: "placeholder", 6996 isDisabled: isDisabled, 6997 isFocused: isFocused, 6998 innerProps: { 6999 id: this.getElementId('placeholder') 7000 } 7001 }), placeholder); 7002 } 7003 if (isMulti) { 7004 return selectValue.map(function (opt, index) { 7005 var isOptionFocused = opt === focusedValue; 7006 var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt)); 7007 return /*#__PURE__*/react.createElement(MultiValue, (0,esm_extends/* default */.Z)({}, commonProps, { 7008 components: { 7009 Container: MultiValueContainer, 7010 Label: MultiValueLabel, 7011 Remove: MultiValueRemove 7012 }, 7013 isFocused: isOptionFocused, 7014 isDisabled: isDisabled, 7015 key: key, 7016 index: index, 7017 removeProps: { 7018 onClick: function onClick() { 7019 return _this3.removeValue(opt); 7020 }, 7021 onTouchEnd: function onTouchEnd() { 7022 return _this3.removeValue(opt); 7023 }, 7024 onMouseDown: function onMouseDown(e) { 7025 e.preventDefault(); 7026 } 7027 }, 7028 data: opt 7029 }), _this3.formatOptionLabel(opt, 'value')); 7030 }); 7031 } 7032 if (inputValue) { 7033 return null; 7034 } 7035 var singleValue = selectValue[0]; 7036 return /*#__PURE__*/react.createElement(SingleValue, (0,esm_extends/* default */.Z)({}, commonProps, { 7037 data: singleValue, 7038 isDisabled: isDisabled 7039 }), this.formatOptionLabel(singleValue, 'value')); 7040 } 7041 }, { 7042 key: "renderClearIndicator", 7043 value: function renderClearIndicator() { 7044 var _this$getComponents3 = this.getComponents(), 7045 ClearIndicator = _this$getComponents3.ClearIndicator; 7046 var commonProps = this.commonProps; 7047 var _this$props10 = this.props, 7048 isDisabled = _this$props10.isDisabled, 7049 isLoading = _this$props10.isLoading; 7050 var isFocused = this.state.isFocused; 7051 if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) { 7052 return null; 7053 } 7054 var innerProps = { 7055 onMouseDown: this.onClearIndicatorMouseDown, 7056 onTouchEnd: this.onClearIndicatorTouchEnd, 7057 'aria-hidden': 'true' 7058 }; 7059 return /*#__PURE__*/react.createElement(ClearIndicator, (0,esm_extends/* default */.Z)({}, commonProps, { 7060 innerProps: innerProps, 7061 isFocused: isFocused 7062 })); 7063 } 7064 }, { 7065 key: "renderLoadingIndicator", 7066 value: function renderLoadingIndicator() { 7067 var _this$getComponents4 = this.getComponents(), 7068 LoadingIndicator = _this$getComponents4.LoadingIndicator; 7069 var commonProps = this.commonProps; 7070 var _this$props11 = this.props, 7071 isDisabled = _this$props11.isDisabled, 7072 isLoading = _this$props11.isLoading; 7073 var isFocused = this.state.isFocused; 7074 if (!LoadingIndicator || !isLoading) return null; 7075 var innerProps = { 7076 'aria-hidden': 'true' 7077 }; 7078 return /*#__PURE__*/react.createElement(LoadingIndicator, (0,esm_extends/* default */.Z)({}, commonProps, { 7079 innerProps: innerProps, 7080 isDisabled: isDisabled, 7081 isFocused: isFocused 7082 })); 7083 } 7084 }, { 7085 key: "renderIndicatorSeparator", 7086 value: function renderIndicatorSeparator() { 7087 var _this$getComponents5 = this.getComponents(), 7088 DropdownIndicator = _this$getComponents5.DropdownIndicator, 7089 IndicatorSeparator = _this$getComponents5.IndicatorSeparator; 7090 7091 // separator doesn't make sense without the dropdown indicator 7092 if (!DropdownIndicator || !IndicatorSeparator) return null; 7093 var commonProps = this.commonProps; 7094 var isDisabled = this.props.isDisabled; 7095 var isFocused = this.state.isFocused; 7096 return /*#__PURE__*/react.createElement(IndicatorSeparator, (0,esm_extends/* default */.Z)({}, commonProps, { 7097 isDisabled: isDisabled, 7098 isFocused: isFocused 7099 })); 7100 } 7101 }, { 7102 key: "renderDropdownIndicator", 7103 value: function renderDropdownIndicator() { 7104 var _this$getComponents6 = this.getComponents(), 7105 DropdownIndicator = _this$getComponents6.DropdownIndicator; 7106 if (!DropdownIndicator) return null; 7107 var commonProps = this.commonProps; 7108 var isDisabled = this.props.isDisabled; 7109 var isFocused = this.state.isFocused; 7110 var innerProps = { 7111 onMouseDown: this.onDropdownIndicatorMouseDown, 7112 onTouchEnd: this.onDropdownIndicatorTouchEnd, 7113 'aria-hidden': 'true' 7114 }; 7115 return /*#__PURE__*/react.createElement(DropdownIndicator, (0,esm_extends/* default */.Z)({}, commonProps, { 7116 innerProps: innerProps, 7117 isDisabled: isDisabled, 7118 isFocused: isFocused 7119 })); 7120 } 7121 }, { 7122 key: "renderMenu", 7123 value: function renderMenu() { 7124 var _this4 = this; 7125 var _this$getComponents7 = this.getComponents(), 7126 Group = _this$getComponents7.Group, 7127 GroupHeading = _this$getComponents7.GroupHeading, 7128 Menu = _this$getComponents7.Menu, 7129 MenuList = _this$getComponents7.MenuList, 7130 MenuPortal = _this$getComponents7.MenuPortal, 7131 LoadingMessage = _this$getComponents7.LoadingMessage, 7132 NoOptionsMessage = _this$getComponents7.NoOptionsMessage, 7133 Option = _this$getComponents7.Opt
7133ion; 7134 var commonProps = this.commonProps; 7135 var focusedOption = this.state.focusedOption; 7136 var _this$props12 = this.props, 7137 captureMenuScroll = _this$props12.captureMenuScroll, 7138 inputValue = _this$props12.inputValue, 7139 isLoading = _this$props12.isLoading, 7140 loadingMessage = _this$props12.loadingMessage, 7141 minMenuHeight = _this$props12.minMenuHeight, 7142 maxMenuHeight = _this$props12.maxMenuHeight, 7143 menuIsOpen = _this$props12.menuIsOpen, 7144 menuPlacement = _this$props12.menuPlacement, 7145 menuPosition = _this$props12.menuPosition, 7146 menuPortalTarget = _this$props12.menuPortalTarget, 7147 menuShouldBlockScroll = _this$props12.menuShouldBlockScroll, 7148 menuShouldScrollIntoView = _this$props12.menuShouldScrollIntoView, 7149 noOptionsMessage = _this$props12.noOptionsMessage, 7150 onMenuScrollToTop = _this$props12.onMenuScrollToTop, 7151 onMenuScrollToBottom = _this$props12.onMenuScrollToBottom; 7152 if (!menuIsOpen) return null; 7153 7154 // TODO: Internal Option Type here
7155 var render = function render(props, id) { 7156 var type = props.type, 7157 data = props.data, 7158 isDisabled = props.isDisabled, 7159 isSelected = props.isSelected, 7160 label = props.label, 7161 value = props.value; 7162 var isFocused = focusedOption === data; 7163 var onHover = isDisabled ? undefined : function () { 7164 return _this4.onOptionHover(data); 7165 }; 7166 var onSelect = isDisabled ? undefined : function () { 7167 return _this4.selectOption(data); 7168 }; 7169 var optionId = "".concat(_this4.getElementId('option'), "-").concat(id); 7170 var innerProps = { 7171 id: optionId, 7172 onClick: onSelect, 7173 onMouseMove: onHover, 7174 onMouseOver: onHover, 7175 tabIndex: -1, 7176 role: 'option', 7177 'aria-selected': _this4.isAppleDevice ? undefined : isSelected // is not supported on Apple devices 7178 }; 7179 7180 return /*#__PURE__*/react.createElement(Option, (0,esm_extends/* default */.Z)({}, commonProps, { 7181 innerProps: innerProps, 7182 data: data, 7183 isDisabled: isDisabled, 7184 isSelected: isSelected, 7185 key: optionId, 7186 label: label, 7187 type: type, 7188 value: value, 7189 isFocused: isFocused, 7190 innerRef: isFocused ? _this4.getFocusedOptionRef : undefined 7191 }), _this4.formatOptionLabel(props.data, 'menu')); 7192 }; 7193 var menuUI; 7194 if (this.hasOptions()) { 7195 menuUI = this.getCategorizedOptions().map(function (item) { 7196 if (item.type === 'group') { 7197 var _data = item.data, 7198 options = item.options, 7199 groupIndex = item.index; 7200 var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex); 7201 var headingId = "".concat(groupId, "-heading"); 7202 return /*#__PURE__*/react.createElement(Group, (0,esm_extends/* default */.Z)({}, commonProps, { 7203 key: groupId, 7204 data: _data, 7205 options: options, 7206 Heading: GroupHeading, 7207 headingProps: { 7208 id: headingId, 7209 data: item.data 7210 }, 7211 label: _this4.formatGroupLabel(item.data) 7212 }), item.options.map(function (option) { 7213 return render(option, "".concat(groupIndex, "-").concat(option.index)); 7214 })); 7215 } else if (item.type === 'option') { 7216 return render(item, "".concat(item.index)); 7217 } 7218 }); 7219 } else if (isLoading) { 7220 var message = loadingMessage({ 7221 inputValue: inputValue 7222 }); 7223 if (message === null) return null; 7224 menuUI = /*#__PURE__*/react.createElement(LoadingMessage, commonProps, message); 7225 } else { 7226 var _message = noOptionsMessage({ 7227 inputValue: inputValue 7228 }); 7229 if (_message === null) return null; 7230 menuUI = /*#__PURE__*/react.createElement(NoOptionsMessage, commonProps, _message); 7231 } 7232 var menuPlacementProps = { 7233 minMenuHeight: minMenuHeight, 7234 maxMenuHeight: maxMenuHeight, 7235 menuPlacement: menuPlacement, 7236 menuPosition: menuPosition, 7237 menuShouldScrollIntoView: menuShouldScrollIntoView 7238 }; 7239 var menuElement = /*#__PURE__*/react.createElement(MenuPlacer, (0,esm_extends/* default */.Z)({}, commonProps, menuPlacementProps), function (_ref4) { 7240 var ref = _ref4.ref, 7241 _ref4$placerProps = _ref4.placerProps, 7242 placement = _ref4$placerProps.placement, 7243 maxHeight = _ref4$placerProps.maxHeight; 7244 return /*#__PURE__*/react.createElement(Menu, (0,esm_extends/* default */.Z)({}, commonProps, menuPlacementProps, { 7245 innerRef: ref, 7246 innerProps: { 7247 onMouseDown: _this4.onMenuMouseDown, 7248 onMouseMove: _this4.onMenuMouseMove 7249 }, 7250 isLoading: isLoading, 7251 placement: placement 7252 }), /*#__PURE__*/react.createElement(ScrollManager, { 7253 captureEnabled: captureMenuScroll, 7254 onTopArrive: onMenuScrollToTop,
vendor: 11,772 bytes, lines 7255-7555
7255 onBottomArrive: onMenuScrollToBottom, 7256 lockEnabled: menuShouldBlockScroll 7257 }, function (scrollTargetRef) { 7258 return /*#__PURE__*/react.createElement(MenuList, (0,esm_extends/* default */.Z)({}, commonProps, { 7259 innerRef: function innerRef(instance) { 7260 _this4.getMenuListRef(instance); 7261 scrollTargetRef(instance); 7262 }, 7263 innerProps: { 7264 role: 'listbox', 7265 'aria-multiselectable': commonProps.isMulti, 7266 id: _this4.getElementId('listbox') 7267 }, 7268 isLoading: isLoading, 7269 maxHeight: maxHeight, 7270 focusedOption: focusedOption 7271 }), menuUI); 7272 })); 7273 }); 7274 7275 // positioning behaviour is almost identical for portalled and fixed, 7276 // so we use the same component. the actual portalling logic is forked 7277 // within the component based on `menuPosition` 7278 return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/react.createElement(MenuPortal, (0,esm_extends/* default */.Z)({}, commonProps, { 7279 appendTo: menuPortalTarget, 7280 controlElement: this.controlRef, 7281 menuPlacement: menuPlacement, 7282 menuPosition: menuPosition 7283 }), menuElement) : menuElement; 7284 } 7285 }, { 7286 key: "renderFormField", 7287 value: function renderFormField() { 7288 var _this5 = this; 7289 var _this$props13 = this.props, 7290 delimiter = _this$props13.delimiter, 7291 isDisabled = _this$props13.isDisabled, 7292 isMulti = _this$props13.isMulti, 7293 name = _this$props13.name, 7294 required = _this$props13.required; 7295 var selectValue = this.state.selectValue; 7296 if (required && !this.hasValue() && !isDisabled) { 7297 return /*#__PURE__*/react.createElement(RequiredInput$1, { 7298 name: name, 7299 onFocus: this.onValueInputFocus 7300 }); 7301 } 7302 if (!name || isDisabled) return; 7303 if (isMulti) { 7304 if (delimiter) { 7305 var value = selectValue.map(function (opt) { 7306 return _this5.getOptionValue(opt); 7307 }).join(delimiter); 7308 return /*#__PURE__*/react.createElement("input", { 7309 name: name, 7310 type: "hidden", 7311 value: value 7312 }); 7313 } else { 7314 var input = selectValue.length > 0 ? selectValue.map(function (opt, i) { 7315 return /*#__PURE__*/react.createElement("input", { 7316 key: "i-".concat(i), 7317 name: name, 7318 type: "hidden", 7319 value: _this5.getOptionValue(opt) 7320 }); 7321 }) : /*#__PURE__*/react.createElement("input", { 7322 name: name, 7323 type: "hidden", 7324 value: "" 7325 }); 7326 return /*#__PURE__*/react.createElement("div", null, input); 7327 } 7328 } else { 7329 var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : ''; 7330 return /*#__PURE__*/react.createElement("input", { 7331 name: name, 7332 type: "hidden", 7333 value: _value 7334 }); 7335 } 7336 } 7337 }, { 7338 key: "renderLiveRegion", 7339 value: function renderLiveRegion() { 7340 var commonProps = this.commonProps; 7341 var _this$state6 = this.state, 7342 ariaSelection = _this$state6.ariaSelection, 7343 focusedOption = _this$state6.focusedOption, 7344 focusedValue = _this$state6.focusedValue, 7345 isFocused = _this$state6.isFocused, 7346 selectValue = _this$state6.selectValue; 7347 var focusableOptions = this.getFocusableOptions(); 7348 return /*#__PURE__*/react.createElement(LiveRegion$1, (0,esm_extends/* default */.Z)({}, commonProps, { 7349 id: this.getElementId('live-region'), 7350 ariaSelection: ariaSelection, 7351 focusedOption: focusedOption, 7352 focusedValue: focusedValue, 7353 isFocused: isFocused, 7354 selectValue: selectValue, 7355 focusableOptions: focusableOptions, 7356 isAppleDevice: this.isAppleDevice 7357 })); 7358 } 7359 }, { 7360 key: "render", 7361 value: function render() { 7362 var _this$getComponents8 = this.getComponents(), 7363 Control = _this$getComponents8.Control, 7364 IndicatorsContainer = _this$getComponents8.IndicatorsContainer, 7365 SelectContainer = _this$getComponents8.SelectContainer, 7366 ValueContainer = _this$getComponents8.ValueContainer; 7367 var _this$props14 = this.props, 7368 className = _this$props14.className, 7369 id = _this$props14.id, 7370 isDisabled = _this$props14.isDisabled, 7371 menuIsOpen = _this$props14.menuIsOpen; 7372 var isFocused = this.state.isFocused; 7373 var commonProps = this.commonProps = this.getCommonProps(); 7374 return /*#__PURE__*/react.createElement(SelectContainer, (0,esm_extends/* default */.Z)({}, commonProps, { 7375 className: className, 7376 innerProps: { 7377 id: id, 7378 onKeyDown: this.onKeyDown 7379 }, 7380 isDisabled: isDisabled, 7381 isFocused: isFocused 7382 }), this.renderLiveRegion(), /*#__PURE__*/react.createElement(Control, (0,esm_extends/* default */.Z)({}, commonProps, { 7383 innerRef: this.getControlRef, 7384 innerProps: { 7385 onMouseDown: this.onControlMouseDown, 7386 onTouchEnd: this.onControlTouchEnd 7387 }, 7388 isDisabled: isDisabled, 7389 isFocused: isFocused, 7390 menuIsOpen: menuIsOpen 7391 }), /*#__PURE__*/react.createElement(ValueContainer, (0,esm_extends/* default */.Z)({}, commonProps, { 7392 isDisabled: isDisabled 7393 }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/react.createElement(IndicatorsContainer, (0,esm_extends/* default */.Z)({}, commonProps, { 7394 isDisabled: isDisabled 7395 }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField()); 7396 } 7397 }], [{ 7398 key: "getDerivedStateFromProps", 7399 value: function getDerivedStateFromProps(props, state) { 7400 var prevProps = state.prevProps, 7401 clearFocusValueOnUpdate = state.clearFocusValueOnUpdate, 7402 inputIsHiddenAfterUpdate = state.inputIsHiddenAfterUpdate, 7403 ariaSelection = state.ariaSelection, 7404 isFocused = state.isFocused, 7405 prevWasFocused = state.prevWasFocused, 7406 instancePrefix = state.instancePrefix; 7407 var options = props.options, 7408 value = props.value, 7409 menuIsOpen = props.menuIsOpen, 7410 inputValue = props.inputValue, 7411 isMulti = props.isMulti; 7412 var selectValue = cleanValue(value); 7413 var newMenuOptionsState = {}; 7414 if (prevProps && (value !== prevProps.value || options !== prevProps.options || menuIsOpen !== prevProps.menuIsOpen || inputValue !== prevProps.inputValue)) { 7415 var focusableOptions = menuIsOpen ? buildFocusableOptions(props, selectValue) : []; 7416 var focusableOptionsWithIds = menuIsOpen ? buildFocusableOptionsWithIds(buildCategorizedOptions(props, selectValue), "".concat(instancePrefix, "-option")) : []; 7417 var focusedValue = clearFocusValueOnUpdate ? getNextFocusedValue(state, selectValue) : null; 7418 var focusedOption = getNextFocusedOption(state, focusableOptions); 7419 var focusedOptionId = getFocusedOptionId(focusableOptionsWithIds, focusedOption); 7420 newMenuOptionsState = { 7421 selectValue: selectValue, 7422 focusedOption: focusedOption, 7423 focusedOptionId: focusedOptionId, 7424 focusableOptionsWithIds: focusableOptionsWithIds, 7425 focusedValue: focusedValue, 7426 clearFocusValueOnUpdate: false 7427 }; 7428 } 7429 // some updates should toggle the state of the input visibility 7430 var newInputIsHiddenState = inputIsHiddenAfterUpdate != null && props !== prevProps ? { 7431 inputIsHidden: inputIsHiddenAfterUpdate, 7432 inputIsHiddenAfterUpdate: undefined 7433 } : {}; 7434 var newAriaSelection = ariaSelection; 7435 var hasKeptFocus = isFocused && prevWasFocused; 7436 if (isFocused && !hasKeptFocus) { 7437 // If `value` or `defaultValue` props are not empty then announce them 7438 // when the Select is initially focused 7439 newAriaSelection = { 7440 value: valueTernary(isMulti, selectValue, selectValue[0] || null), 7441 options: selectValue, 7442 action: 'initial-input-focus' 7443 }; 7444 hasKeptFocus = !prevWasFocused; 7445 } 7446 7447 // If the 'initial-input-focus' action has been set already 7448 // then reset the ariaSelection to null 7449 if ((ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus') { 7450 newAriaSelection = null; 7451 } 7452 return (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, newMenuOptionsState), newInputIsHiddenState), {}, { 7453 prevProps: props, 7454 ariaSelection: newAriaSelection, 7455 prevWasFocused: hasKeptFocus 7456 }); 7457 } 7458 }]); 7459 return Select; 7460}(react.Component); 7461Select.defaultProps = defaultProps; 7462 7463 7464 7465 7466/***/ }), 7467 7468/***/ 3469: 7469/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 7470 7471/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7472/* harmony export */ "Z": function() { return /* binding */ index; } 7473/* harmony export */ }); 7474/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294); 7475 7476 7477var index = react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect ; 7478 7479 7480 7481 7482/***/ }), 7483 7484/***/ 907: 7485/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7486 7487/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7488/* harmony export */ "Z": function() { return /* binding */ _arrayLikeToArray; } 7489/* harmony export */ }); 7490function _arrayLikeToArray(r, a) { 7491 (null == a || a > r.length) && (a = r.length); 7492 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; 7493 return n; 7494} 7495 7496 7497/***/ }), 7498 7499/***/ 4942: 7500/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7501 7502/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7503/* harmony export */ "Z": function() { return /* binding */ _defineProperty; } 7504/* harmony export */ }); 7505/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3997); 7506 7507function _defineProperty(e, r, t) { 7508 return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(r)) in e ? Object.defineProperty(e, r, { 7509 value: t, 7510 enumerable: !0, 7511 configurable: !0, 7512 writable: !0 7513 }) : e[r] = t, e; 7514} 7515 7516 7517/***/ }), 7518 7519/***/ 7462: 7520/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7521 7522/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7523/* harmony export */ "Z": function() { return /* binding */ _extends; } 7524/* harmony export */ }); 7525function _extends() { 7526 return _extends = Object.assign ? Object.assign.bind() : function (n) { 7527 for (var e = 1; e < arguments.length; e++) { 7528 var t = arguments[e]; 7529 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); 7530 } 7531 return n; 7532 }, _extends.apply(null, arguments); 7533} 7534 7535 7536/***/ }), 7537 7538/***/ 1413: 7539/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7540 7541/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7542/* harmony export */ "Z": function() { return /* binding */ _objectSpread2; } 7543/* harmony export */ }); 7544/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4942); 7545 7546function ownKeys(e, r) { 7547 var t = Object.keys(e); 7548 if (Object.getOwnPropertySymbols) { 7549 var o = Object.getOwnPropertySymbols(e); 7550 r && (o = o.filter(function (r) { 7551 return Object.getOwnPropertyDescriptor(e, r).enumerable; 7552 })), t.push.apply(t, o); 7553 } 7554 return t; 7555}
vendor: 4,513 bytes, lines 7556-7695
7556function _objectSpread2(e) { 7557 for (var r = 1; r < arguments.length; r++) { 7558 var t = null != arguments[r] ? arguments[r] : {}; 7559 r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { 7560 (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(e, r, t[r]); 7561 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { 7562 Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); 7563 }); 7564 } 7565 return e; 7566} 7567 7568 7569/***/ }), 7570 7571/***/ 5987: 7572/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7573 7574/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7575/* harmony export */ "Z": function() { return /* binding */ _objectWithoutProperties; } 7576/* harmony export */ }); 7577/* harmony import */ var _objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3366); 7578 7579function _objectWithoutProperties(e, t) { 7580 if (null == e) return {}; 7581 var o, 7582 r, 7583 i = (0,_objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(e, t); 7584 if (Object.getOwnPropertySymbols) { 7585 var n = Object.getOwnPropertySymbols(e); 7586 for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); 7587 } 7588 return i; 7589} 7590 7591 7592/***/ }), 7593 7594/***/ 6854: 7595/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7596 7597 7598// EXPORTS 7599__webpack_require__.d(__webpack_exports__, { 7600 "Z": function() { return /* binding */ _slicedToArray; } 7601}); 7602 7603;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js 7604function _arrayWithHoles(r) { 7605 if (Array.isArray(r)) return r; 7606} 7607 7608;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js 7609function _iterableToArrayLimit(r, l) { 7610 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; 7611 if (null != t) { 7612 var e, 7613 n, 7614 i, 7615 u, 7616 a = [], 7617 f = !0, 7618 o = !1; 7619 try { 7620 if (i = (t = t.call(r)).next, 0 === l) { 7621 if (Object(t) !== t) return; 7622 f = !1; 7623 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); 7624 } catch (r) { 7625 o = !0, n = r; 7626 } finally { 7627 try { 7628 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; 7629 } finally { 7630 if (o) throw n; 7631 } 7632 } 7633 return a; 7634 } 7635} 7636 7637// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js 7638var unsupportedIterableToArray = __webpack_require__(181); 7639;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js 7640function _nonIterableRest() { 7641 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); 7642} 7643 7644;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js 7645 7646 7647 7648 7649function _slicedToArray(r, e) { 7650 return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || (0,unsupportedIterableToArray/* default */.Z)(r, e) || _nonIterableRest(); 7651} 7652 7653 7654/***/ }), 7655 7656/***/ 3997: 7657/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7658 7659 7660// EXPORTS 7661__webpack_require__.d(__webpack_exports__, { 7662 "Z": function() { return /* binding */ toPropertyKey; } 7663}); 7664 7665// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js 7666var esm_typeof = __webpack_require__(1002); 7667;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js 7668 7669function toPrimitive(t, r) { 7670 if ("object" != (0,esm_typeof/* default */.Z)(t) || !t) return t; 7671 var e = t[Symbol.toPrimitive]; 7672 if (void 0 !== e) { 7673 var i = e.call(t, r || "default"); 7674 if ("object" != (0,esm_typeof/* default */.Z)(i)) return i; 7675 throw new TypeError("@@toPrimitive must return a primitive value."); 7676 } 7677 return ("string" === r ? String : Number)(t); 7678} 7679 7680;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js 7681 7682 7683function toPropertyKey(t) { 7684 var i = toPrimitive(t, "string"); 7685 return "symbol" == (0,esm_typeof/* default */.Z)(i) ? i : i + ""; 7686} 7687 7688 7689/***/ }), 7690 7691/***/ 1002: 7692/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7693 7694/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7695/* harmony export */ "Z": function() { return /* binding */ _t
7695ypeof; } 7696/* harmony export */ }); 7697function _typeof(o) { 7698 "@babel/helpers - typeof"; 7699 7700 return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { 7701 return typeof o; 7702 } : function (o) { 7703 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; 7704 }, _typeof(o); 7705} 7706 7707 7708/***/ }), 7709 7710/***/ 181: 7711/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { 7712 7713/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7714/* harmony export */ "Z": function() { return /* binding */ _unsupportedIterableToArray; } 7715/* harmony export */ }); 7716/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(907); 7717 7718function _unsupportedIterableToArray(r, a) { 7719 if (r) { 7720 if ("string" == typeof r) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(r, a); 7721 var t = {}.toString.call(r).slice(8, -1); 7722 return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(r, a) : void 0; 7723 } 7724} 7725 7726 7727/***/ }) 7728 7729}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.