@diplodoc/client 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/build/client/350.js +1 -1
- package/build/client/350.js.map +1 -1
- package/build/client/969.js +1 -1
- package/build/client/969.js.map +1 -1
- package/build/client/app.css +1 -0
- package/build/client/app.css.map +1 -1
- package/build/client/app.js +1 -1
- package/build/client/app.js.map +1 -1
- package/build/client/app.rtl.css +1 -0
- package/build/client/manifest.json +5 -2
- package/build/client/search.css +6 -0
- package/build/client/search.css.map +1 -0
- package/build/client/search.js +1 -1
- package/build/client/search.js.map +1 -1
- package/build/client/search.rtl.css +4 -0
- package/build/client/vendor.css +3 -0
- package/build/client/vendor.css.map +1 -1
- package/build/client/vendor.js +1 -1
- package/build/client/vendor.js.map +1 -1
- package/build/client/vendor.rtl.css +3 -0
- package/build/components/Search/Search.d.ts +2 -1
- package/build/components/Search/provider/algolia/index.d.ts +4 -4
- package/build/components/Search/provider/index.d.ts +4 -4
- package/build/components/Search/types.d.ts +27 -1
- package/build/index.d.ts +0 -6
- package/build/server/112.js +23 -11
- package/build/server/112.js.map +1 -1
- package/build/server/731.js +23 -11
- package/build/server/731.js.map +1 -1
- package/build/server/app.js +566 -404
- package/build/server/app.js.map +1 -1
- package/package.json +1 -1
|
@@ -1485,3 +1485,6 @@ details.yfm-cut > .yfm-cut-content {
|
|
|
1485
1485
|
.g-disclosure_size_m .g-disclosure__trigger{font-family:var(--g-text-body-font-family);font-weight:var(--g-text-body-font-weight);font-size:var(--g-text-body-1-font-size);line-height:var(--g-text-body-1-line-height)}.g-disclosure_size_l .g-disclosure__trigger{font-family:var(--g-text-body-font-family);font-weight:var(--g-text-body-font-weight);font-size:var(--g-text-body-2-font-size);line-height:var(--g-text-body-2-line-height)}.g-disclosure_size_xl .g-disclosure__trigger{font-family:var(--g-text-subheader-font-family);font-weight:var(--g-text-subheader-font-weight);font-size:var(--g-text-subheader-3-font-size);line-height:var(--g-text-subheader-3-line-height)}.g-disclosure__trigger{padding:0;font-family:var(--g-text-body-font-family);font-size:inherit;font-weight:var(--g-text-body-font-weight);color:inherit;background:none;border:none;outline:none;cursor:pointer;display:flex;flex-flow:row nowrap;gap:8px;flex-shrink:0;align-items:center;font-size:inherit;line-height:inherit;font-weight:inherit;border-radius:var(--g-focus-border-radius)}.g-disclosure__trigger:focus-visible{outline:2px solid var(--g-color-line-focus)}.g-disclosure__trigger_arrow_end{flex-direction:row-reverse}.g-disclosure__trigger_disabled{color:var(--g-color-text-secondary);cursor:auto}.g-disclosure__content{display:none}.g-disclosure__content_visible{display:block}.g-disclosure__content.g-disclosure_exit_active{display:block;animation-name:g-disclosure-collapsed;animation-duration:.1s;opacity:0}.g-disclosure__content.g-disclosure_enter_active{animation-name:g-disclosure-expanded;animation-duration:.2s}@keyframes g-disclosure-expanded{0%{opacity:.4}100%{opacity:1}}@keyframes g-disclosure-collapsed{0%{opacity:1}100%{opacity:0}}
|
|
1486
1486
|
.gc-consent-popup{font-family:var(--g-text-body-font-family);font-weight:var(--g-text-body-font-weight);font-size:var(--g-text-body-2-font-size);line-height:var(--g-text-body-2-line-height);padding:32px;border-radius:14px;max-width:656px}.gc-consent-popup__header{display:flex;justify-content:space-between}.gc-consent-popup__title{font-weight:var(--g-text-header-font-weight)}.gc-consent-popup__body{margin:24px 0 48px;line-height:24px}.gc-consent-popup__body_step_manage{margin-block-end:32px}.gc-consent-popup__text+.gc-consent-popup__text{margin-block-start:16px}.gc-consent-popup__buttons{display:flex;justify-content:flex-end}.gc-consent-popup__button+.gc-consent-popup__button{margin-inline-start:16px}.gc-consent-popup__close-button{--g-button-focus-outline-color: var(--g-color-line-focus);position:relative;inset-block-start:1px}.gc-consent-popup__arrow-button{--g-button-focus-outline-color: var(--g-color-line-focus);position:relative;inset-block-start:-2px}.gc-consent-popup__cookie-list{margin-block-start:24px}.gc-consent-popup__modal-content_mobile .gc-consent-popup{max-width:initial}.gc-consent-popup__modal-content_mobile .gc-consent-popup__body{margin:8px 0 16px;line-height:20px}.gc-consent-popup__modal-content_mobile .gc-consent-popup__buttons{justify-content:flex-start}.gc-consent-popup__modal-content_mobile .gc-consent-popup__button+.gc-consent-popup__button{margin-inline-start:12px}.gc-consent-popup__modal-content_mobile .gc-consent-popup__arrow-button{margin-inline-end:16px}.gc-consent-popup__modal-content_mobile.gc-consent-popup__modal-content_step_manage{position:fixed;inset:0;margin:0;overflow-y:scroll;border-radius:0}.gc-consent-popup__modal-content_mobile.gc-consent-popup__modal-content_step_manage .gc-consent-popup{padding:32px 24px}.gc-consent-popup__modal-content_mobile.gc-consent-popup__modal-content_step_manage .gc-consent-popup__body{margin:32px 0}.gc-consent-popup__modal-content_mobile.gc-consent-popup__modal-content_step_manage .gc-consent-popup__text+.gc-consent-popup__text{margin-block-start:8px}
|
|
1487
1487
|
.gc-simple-consent{font-family:var(--g-text-body-font-family);font-weight:var(--g-text-body-font-weight);font-size:var(--g-text-body-2-font-size);line-height:var(--g-text-body-2-line-height);position:fixed;inset-block-end:24px;inset-inline-start:0;max-width:1312px;padding:24px 32px;margin:0 40px;box-shadow:0px 8px 32px 0px rgba(0, 0, 0, 0.1);background-color:var(--g-color-base-float);border-radius:var(--g-border-radius-xl)}.gc-simple-consent__container{display:flex;justify-content:center;align-items:center}.gc-simple-consent__buttons{display:flex}.gc-simple-consent__button{margin-inline-start:16px}@media(max-width: 769px){.gc-simple-consent__buttons{margin-block-start:24px;width:100%}.gc-simple-consent__container{flex-direction:column}.gc-simple-consent__button{flex:1 1 0}.gc-simple-consent__button:first-child{margin-inline-start:0}}
|
|
1488
|
+
.dc-search-page{margin-top:26px;display:flex;justify-content:center}.dc-search-page__layout{max-width:736px;width:100%}.dc-search-page__search-field-wrapper{display:flex;align-items:center}.dc-search-page__search-button{margin-right:10px}.dc-search-page__search-field,.dc-search-page__search-item{margin-bottom:36px}.dc-search-page__subtitle{margin-bottom:18px}.dc-search-page__paginator{padding:10px 0;border-top:1px solid var(--g-color-line-generic)}@media(max-width: 769px){.dc-search-page{margin-top:16px}.dc-search-page__layout{padding:0 12px}.dc-search-page__search-field{margin-bottom:24px}.dc-search-page__search-item{margin-bottom:40px}}
|
|
1489
|
+
.SearchItem__link{cursor:pointer;color:inherit}.SearchItem__link:hover,.SearchItem__link:active{color:var(--g-color-text-link-hover)}.SearchItem__marks-wrapper{display:none;justify-content:flex-end;align-items:center}.SearchItem__marks{height:16px;margin-top:10px}.SearchItem__mark{margin-left:20px}.SearchItem__mark:last-child{margin-left:0}.SearchItem__item-wrapper:hover .SearchItem__marks-wrapper{display:flex}.SearchItem__item-wrapper{margin-bottom:20px;font-size:var(--g-text-body-1-font-size);line-height:var(--g-text-body-1-line-height)}.SearchItem__item{display:block;overflow:hidden;-webkit-text-decoration:none;text-decoration:none;cursor:pointer;text-overflow:ellipsis;border-radius:var(--g-focus-border-radius)}.SearchItem__item:focus{outline:2px solid var(--g-color-line-focus);outline-offset:0}.SearchItem__item:focus:not(:focus-visible){outline:0}.SearchItem__item-title,.SearchItem__item-description{display:block;overflow:hidden;text-overflow:ellipsis}.SearchItem__item-title{margin-bottom:4px}.SearchItem__item-title,.SearchItem__item-title .SearchItem__item-search-token{color:var(--g-color-text-primary);font-size:var(--g-text-subheader-3-font-size);line-height:var(--g-text-subheader-3-line-height);color:var(--g-color-text-link);-webkit-text-decoration:none;text-decoration:none;cursor:pointer;border-radius:var(--g-focus-border-radius);outline:none}.utilityfocus .SearchItem__item-title:focus,.utilityfocus .SearchItem__item-title .SearchItem__item-search-token:focus{outline:2px solid #ffdb4d}.SearchItem__item-title:focus,.SearchItem__item-title .SearchItem__item-search-token:focus{box-shadow:0 0 0 2px var(--g-color-line-focus);outline:0}.SearchItem__item-title:focus:not(:focus-visible),.SearchItem__item-title .SearchItem__item-search-token:focus:not(:focus-visible){box-shadow:none}.SearchItem__item-title:hover,.SearchItem__item-title:active,.SearchItem__item-title .SearchItem__item-search-token:hover,.SearchItem__item-title .SearchItem__item-search-token:active{color:var(--g-color-text-link-hover)}.SearchItem__item-title:hover .SearchItem__item-search-token{color:var(--g-color-text-link-hover)}.SearchItem__item-description{display:inline-block;color:var(--g-color-text-secondary)}.SearchItem__item-description em{font-weight:bolder}.SearchItem__item-description::after{content:"...";display:inline}.SearchItem__item-description .SearchItem__item-search-token{color:var(--g-color-text-primary)}
|
|
1490
|
+
.Paginator{margin:0;padding:0;list-style:none;display:flex;align-items:center}.Paginator__item{display:inline-flex;align-items:center;justify-content:center;min-width:28px;min-height:28px;margin:4px;color:var(--g-color-text-primary);font-size:var(--g-text-body-1-font-size);line-height:var(--g-text-body-1-line-height)}.Paginator__item_type_prev{margin:4px 0 4px 6px}[dir=rtl] .Paginator__item_type_prev{/* rtl:begin:ignore */transform:rotate(180deg)/* rtl:end:ignore */}.Paginator__item_type_dots{min-width:0;color:var(--g-color-text-secondary)}.Paginator__item_type_page{cursor:pointer;border-radius:14px}.Paginator__item_type_page:hover{background:var(--g-color-base-simple-hover)}.Paginator__item_type_page.Paginator__item_active{color:var(--g-color-text-light-primary);background:var(--g-color-base-brand);cursor:default}.Paginator__item_type_next{margin:4px 6px 4px 0}[dir=rtl] .Paginator__item_type_next{/* rtl:begin:ignore */transform:rotate(180deg)/* rtl:end:ignore */}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ISearchProvider, ISearchResult } from '@diplodoc/components';
|
|
2
|
-
import type { SearchConfig } from '../../types';
|
|
3
|
-
export declare class AlgoliaProvider implements ISearchProvider {
|
|
2
|
+
import type { SearchConfig, SearchProviderExtended } from '../../types';
|
|
3
|
+
export declare class AlgoliaProvider implements ISearchProvider, SearchProviderExtended {
|
|
4
4
|
private worker;
|
|
5
5
|
private config;
|
|
6
6
|
constructor(config: SearchConfig);
|
|
7
7
|
init: () => void;
|
|
8
8
|
suggest(query: string): Promise<ISearchResult[]>;
|
|
9
|
-
search(query: string): Promise<ISearchResult[]>;
|
|
10
|
-
link: (query: string) => string;
|
|
9
|
+
search(query: string, page?: number, count?: number): Promise<ISearchResult[]>;
|
|
10
|
+
link: (query: string, page?: number) => string;
|
|
11
11
|
private get base();
|
|
12
12
|
private request;
|
|
13
13
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ISearchProvider, ISearchResult } from '@diplodoc/components';
|
|
2
|
-
import type { SearchConfig } from '../types';
|
|
3
|
-
export declare class LocalSearchProvider implements ISearchProvider {
|
|
2
|
+
import type { SearchConfig, SearchProviderExtended } from '../types';
|
|
3
|
+
export declare class LocalSearchProvider implements ISearchProvider, SearchProviderExtended {
|
|
4
4
|
private worker;
|
|
5
5
|
private config;
|
|
6
6
|
constructor(config: SearchConfig);
|
|
7
7
|
init: () => void;
|
|
8
8
|
suggest(query: string): Promise<ISearchResult[]>;
|
|
9
|
-
search(query: string): Promise<ISearchResult[]>;
|
|
10
|
-
link: () =>
|
|
9
|
+
search(query: string, page?: number, count?: number): Promise<ISearchResult[]>;
|
|
10
|
+
link: (query: string, page?: number) => string;
|
|
11
11
|
private get base();
|
|
12
12
|
private request;
|
|
13
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchSuggestPageItem } from '@diplodoc/components';
|
|
1
|
+
import { ISearchResult, SearchSuggestPageItem } from '@diplodoc/components';
|
|
2
2
|
export interface AlgoliaQuerySettings {
|
|
3
3
|
hitsPerPage?: number;
|
|
4
4
|
facetFilters?: string[];
|
|
@@ -55,5 +55,31 @@ export type SearchMessage = {
|
|
|
55
55
|
page?: number;
|
|
56
56
|
count?: number;
|
|
57
57
|
};
|
|
58
|
+
export interface SearchProviderExtended {
|
|
59
|
+
init(): void;
|
|
60
|
+
suggest(query: string): Promise<ISearchResult[]>;
|
|
61
|
+
search(query: string, page?: number, count?: number): Promise<ISearchResult[]>;
|
|
62
|
+
link(query: string, page?: number): string | null;
|
|
63
|
+
}
|
|
58
64
|
export type Message = InitMessage | SuggestMessage | SearchMessage;
|
|
59
65
|
export type MessageType = Message['type'];
|
|
66
|
+
export interface SearchResultData extends Partial<ISearchResult> {
|
|
67
|
+
title?: string;
|
|
68
|
+
url?: string;
|
|
69
|
+
link?: string;
|
|
70
|
+
description?: string;
|
|
71
|
+
content?: string;
|
|
72
|
+
text?: string;
|
|
73
|
+
section?: string;
|
|
74
|
+
hierarchy?: {
|
|
75
|
+
lvl0?: string;
|
|
76
|
+
lvl1?: string;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface FormattedSearchResultItem {
|
|
80
|
+
title: string;
|
|
81
|
+
url: string;
|
|
82
|
+
description: string;
|
|
83
|
+
section: string;
|
|
84
|
+
}
|
|
85
|
+
export type FormattedSearchResultData = FormattedSearchResultItem[];
|
package/build/index.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { DocAnalytics, DocInnerProps, DocLeadingPageData, DocPageData } from './components/App';
|
|
2
2
|
export type { DocInnerProps, DocPageData, DocLeadingPageData, DocAnalytics };
|
|
3
3
|
export type { SearchConfig as ISearchProviderConfig, WorkerConfig as ISearchWorkerConfig, WorkerApi as ISearchWorkerApi, } from './components/Search';
|
|
4
|
-
declare global {
|
|
5
|
-
interface Window {
|
|
6
|
-
STATIC_CONTENT: boolean;
|
|
7
|
-
__DATA__: DocInnerProps;
|
|
8
|
-
}
|
|
9
|
-
}
|
package/build/server/112.js
CHANGED
|
@@ -602,15 +602,17 @@ var HANDLERS = {
|
|
|
602
602
|
if (self.config.api) {
|
|
603
603
|
importScripts(self.config.base + '/' + self.config.api);
|
|
604
604
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
_context.next = 1;
|
|
605
|
+
if (!(self.api && self.api.init)) {
|
|
606
|
+
_context.next = 2;
|
|
608
607
|
break;
|
|
609
608
|
}
|
|
610
|
-
|
|
609
|
+
_context.next = 1;
|
|
610
|
+
return self.api.init();
|
|
611
611
|
case 1:
|
|
612
|
-
return _context.abrupt("return");
|
|
612
|
+
return _context.abrupt("return", _context.sent);
|
|
613
613
|
case 2:
|
|
614
|
+
return _context.abrupt("return");
|
|
615
|
+
case 3:
|
|
614
616
|
case "end":
|
|
615
617
|
return _context.stop();
|
|
616
618
|
}
|
|
@@ -626,8 +628,11 @@ var HANDLERS = {
|
|
|
626
628
|
query = _ref.query, _ref$count = _ref.count, count = _ref$count === void 0 ? 10 : _ref$count;
|
|
627
629
|
AssertConfig(self.config);
|
|
628
630
|
AssertApi(self.api);
|
|
629
|
-
|
|
631
|
+
_context2.next = 1;
|
|
632
|
+
return self.api.suggest(query, count);
|
|
630
633
|
case 1:
|
|
634
|
+
return _context2.abrupt("return", _context2.sent);
|
|
635
|
+
case 2:
|
|
631
636
|
case "end":
|
|
632
637
|
return _context2.stop();
|
|
633
638
|
}
|
|
@@ -643,8 +648,11 @@ var HANDLERS = {
|
|
|
643
648
|
query = _ref2.query, _ref2$count = _ref2.count, count = _ref2$count === void 0 ? 10 : _ref2$count, _ref2$page = _ref2.page, page = _ref2$page === void 0 ? 1 : _ref2$page;
|
|
644
649
|
AssertConfig(self.config);
|
|
645
650
|
AssertApi(self.api);
|
|
646
|
-
|
|
651
|
+
_context3.next = 1;
|
|
652
|
+
return self.api.search(query, count, page);
|
|
647
653
|
case 1:
|
|
654
|
+
return _context3.abrupt("return", _context3.sent);
|
|
655
|
+
case 2:
|
|
648
656
|
case "end":
|
|
649
657
|
return _context3.stop();
|
|
650
658
|
}
|
|
@@ -661,11 +669,15 @@ self.onmessage = /*#__PURE__*/function () {
|
|
|
661
669
|
_message$ports = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(message.ports, 1), port = _message$ports[0];
|
|
662
670
|
type = message.data.type;
|
|
663
671
|
handler = HANDLERS[type];
|
|
664
|
-
if (
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
});
|
|
672
|
+
if (handler) {
|
|
673
|
+
_context4.next = 1;
|
|
674
|
+
break;
|
|
668
675
|
}
|
|
676
|
+
port.postMessage({
|
|
677
|
+
error: UNKNOWN_HANDLER
|
|
678
|
+
});
|
|
679
|
+
return _context4.abrupt("return");
|
|
680
|
+
case 1:
|
|
669
681
|
_context4.prev = 1;
|
|
670
682
|
_context4.next = 2;
|
|
671
683
|
return handler(message.data);
|
package/build/server/112.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"112.js","mappings":";;;;;;AAAA,kBAAkB,mBAAO,CAAC,KAAkB;AAC5C,+BAA+B,mBAAO,CAAC,KAA+B;AACtE;AACA;AACA;AACA,uCAAuC,yBAAyB,SAAS,yBAAyB;;;;;;;ACLlG;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,mCAAmC,yBAAyB,SAAS,yBAAyB;;;;;;;ACT9F,oBAAoB,mBAAO,CAAC,KAAoB;AAChD,kBAAkB,mBAAO,CAAC,KAAkB;AAC5C,uBAAuB,mBAAO,CAAC,KAAuB;AACtD,0BAA0B,mBAAO,CAAC,GAA0B;AAC5D,+BAA+B,mBAAO,CAAC,KAA+B;AACtE,sBAAsB,mBAAO,CAAC,IAAsB;AACpD,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;AC5EjG,oBAAoB,mBAAO,CAAC,KAAoB;AAChD,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,gCAAgC,yBAAyB,SAAS,yBAAyB;;;;;;;AChC3F,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+BAA+B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,cAAc;AACd,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,+BAA+B,yBAAyB,SAAS,yBAAyB;;;;;;;ACxF1F,uBAAuB,mBAAO,CAAC,KAAuB;AACtD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,8CAA8C,yBAAyB,SAAS,yBAAyB;;;;;;;ACRzG;AACA;AACA;AACA,iCAAiC,yBAAyB,SAAS,yBAAyB;;;;;;;ACH5F;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,y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EpD;YAAe,CAAC,CAAC;UAC9C;UAAC+C,SAAA,CAAA9B,IAAA;UAAA8B,SAAA,CAAA7B,IAAA;UAAA,OAGwB0B,OAAO,CAAC3C,OAAO,CAACiD,IAAI,CAAC;QAAA;UAApCL,MAAM,GAAAE,SAAA,CAAAM,IAAA;UAEZX,IAAI,CAACS,WAAW,CAAC;YAACN,MAAM,EAANA;UAAM,CAAC,CAAC;UAACE,SAAA,CAAA7B,IAAA;UAAA;QAAA;UAAA6B,SAAA,CAAA9B,IAAA;UAAA6B,EAAA,GAAAC,SAAA;UAE3BL,IAAI,CAACS,WAAW,CAAC;YAACC,KAAK,EAAAN;UAAA,CAAC,CAAC;QAAC;QAAA;UAAA,OAAAC,SAAA,CAAAxB,IAAA;MAAA;IAAA,GAAAiB,QAAA;EAAA,CAEjC;EAAA,iBAAAc,EAAA;IAAA,OAAAf,KAAA,CAAAgB,KAAA,OAAAC,SAAA;EAAA;AAAA,I","sources":["webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorKeys.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regenerator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/OverloadYield.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorValues.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/regenerator/index.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsync.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorDefine.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/compat get default export","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/./src/components/Search/worker/index.ts"],"sourcesContent":["var regenerator = require(\"./regenerator.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nfunction _regeneratorAsyncGen(r, e, t, o, n) {\n return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);\n}\nmodule.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorKeys(e) {\n var n = Object(e),\n r = [];\n for (var t in n) r.unshift(t);\n return function e() {\n for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;\n return e.done = !0, e;\n };\n}\nmodule.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regenerator = require(\"./regenerator.js\");\nvar regeneratorAsync = require(\"./regeneratorAsync.js\");\nvar regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nvar regeneratorKeys = require(\"./regeneratorKeys.js\");\nvar regeneratorValues = require(\"./regeneratorValues.js\");\nfunction _regeneratorRuntime() {\n \"use strict\";\n\n var r = regenerator(),\n e = r.m(_regeneratorRuntime),\n t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;\n function n(r) {\n var e = \"function\" == typeof r && r.constructor;\n return !!e && (e === t || \"GeneratorFunction\" === (e.displayName || e.name));\n }\n var o = {\n \"throw\": 1,\n \"return\": 2,\n \"break\": 3,\n \"continue\": 3\n };\n function a(r) {\n var e, t;\n return function (n) {\n e || (e = {\n stop: function stop() {\n return t(n.a, 2);\n },\n \"catch\": function _catch() {\n return n.v;\n },\n abrupt: function abrupt(r, e) {\n return t(n.a, o[r], e);\n },\n delegateYield: function delegateYield(r, o, a) {\n return e.resultName = o, t(n.d, regeneratorValues(r), a);\n },\n finish: function finish(r) {\n return t(n.f, r);\n }\n }, t = function t(r, _t, o) {\n n.p = e.prev, n.n = e.next;\n try {\n return r(_t, o);\n } finally {\n e.next = n.n;\n }\n }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;\n try {\n return r.call(this, e);\n } finally {\n n.p = e.prev, n.n = e.next;\n }\n };\n }\n return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return {\n wrap: function wrap(e, t, n, o) {\n return r.w(a(e), t, n, o && o.reverse());\n },\n isGeneratorFunction: n,\n mark: r.m,\n awrap: function awrap(r, e) {\n return new OverloadYield(r, e);\n },\n AsyncIterator: regeneratorAsyncIterator,\n async: function async(r, e, t, o, u) {\n return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);\n },\n keys: regeneratorKeys,\n values: regeneratorValues\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction AsyncIterator(t, e) {\n function n(r, o, i, f) {\n try {\n var c = t[r](o),\n u = c.value;\n return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {\n n(\"next\", t, i, f);\n }, function (t) {\n n(\"throw\", t, i, f);\n }) : e.resolve(u).then(function (t) {\n c.value = t, i(c);\n }, function (t) {\n return n(\"throw\", t, i, f);\n });\n } catch (t) {\n f(t);\n }\n }\n var r;\n this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, \"function\" == typeof Symbol && Symbol.asyncIterator || \"@asyncIterator\", function () {\n return this;\n })), regeneratorDefine(this, \"_invoke\", function (t, o, i) {\n function f() {\n return new e(function (e, r) {\n n(t, i, e, r);\n });\n }\n return r = r ? r.then(f, f) : f();\n }, !0);\n}\nmodule.exports = AsyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction _regenerator() {\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\n var e,\n t,\n r = \"function\" == typeof Symbol ? Symbol : {},\n n = r.iterator || \"@@iterator\",\n o = r.toStringTag || \"@@toStringTag\";\n function i(r, n, o, i) {\n var c = n && n.prototype instanceof Generator ? n : Generator,\n u = Object.create(c.prototype);\n return regeneratorDefine(u, \"_invoke\", function (r, n, o) {\n var i,\n c,\n u,\n f = 0,\n p = o || [],\n y = !1,\n G = {\n p: 0,\n n: 0,\n v: e,\n a: d,\n f: d.bind(e, 4),\n d: function d(t, r) {\n return i = t, c = 0, u = e, G.n = r, a;\n }\n };\n function d(r, n) {\n for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {\n var o,\n i = p[t],\n d = G.p,\n l = i[2];\n r > 3 ? (o = l === n) && (c = i[4] || 3, u = i[5] === e ? i[3] : i[5], i[4] = 3, i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));\n }\n if (o || r > 1) return a;\n throw y = !0, n;\n }\n return function (o, p, l) {\n if (f > 1) throw TypeError(\"Generator is already running\");\n for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {\n i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);\n try {\n if (f = 2, i) {\n if (c || (o = \"next\"), t = i[o]) {\n if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\");\n if (!t.done) return t;\n u = t.value, c < 2 && (c = 0);\n } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1);\n i = e;\n } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;\n } catch (t) {\n i = e, c = 1, u = t;\n } finally {\n f = 1;\n }\n }\n return {\n value: t,\n done: y\n };\n };\n }(r, o, i), !0), u;\n }\n var a = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n t = Object.getPrototypeOf;\n var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {\n return this;\n }), t),\n u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);\n function f(e) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e;\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, \"constructor\", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", regeneratorDefine(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), regeneratorDefine(u), regeneratorDefine(u, o, \"Generator\"), regeneratorDefine(u, n, function () {\n return this;\n }), regeneratorDefine(u, \"toString\", function () {\n return \"[object Generator]\";\n }), (module.exports = _regenerator = function _regenerator() {\n return {\n w: i,\n m: f\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n 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) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorValues(e) {\n if (null != e) {\n var t = e[\"function\" == typeof Symbol && Symbol.iterator || \"@@iterator\"],\n r = 0;\n if (t) return t.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) return {\n next: function next() {\n return e && r >= e.length && (e = void 0), {\n value: e && e[r++],\n done: !e\n };\n }\n };\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n}\nmodule.exports = _regeneratorValues, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nfunction _regeneratorAsync(n, e, r, t, o) {\n var a = regeneratorAsyncGen(n, e, r, t, o);\n return a.next().then(function (n) {\n return n.done ? n.value : a.next();\n });\n}\nmodule.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorDefine(e, r, n, t) {\n var i = Object.defineProperty;\n try {\n i({}, \"\", {});\n } catch (e) {\n i = 0;\n }\n module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {\n if (r) i ? i(e, r, {\n value: n,\n enumerable: !t,\n configurable: !t,\n writable: !t\n }) : e[r] = n;else {\n var o = function o(r, n) {\n _regeneratorDefine(e, r, function (e) {\n return this._invoke(r, n, e);\n });\n };\n o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2);\n }\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _regeneratorDefine(e, r, n, t);\n}\nmodule.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/// <reference no-default-lib=\"true\"/>\n/// <reference lib=\"ES2015\" />\n/// <reference lib=\"webworker\" />\n\n/* eslint-disable new-cap */\nimport type {\n InitMessage,\n MessageType,\n SearchMessage,\n SuggestMessage,\n WorkerApi,\n WorkerConfig,\n} from '../types';\n\n// Default type of `self` is `WorkerGlobalScope & typeof globalThis`\n// https://github.com/microsoft/TypeScript/issues/14877\ndeclare const self: ServiceWorkerGlobalScope & {\n config?: WorkerConfig;\n api?: WorkerApi;\n};\n\nconst UNKNOWN_HANDLER = {\n message: 'Unknown message type!',\n code: 'UNKNOWN_HANDLER',\n};\nconst NOT_INITIALIZED_CONFIG = {\n message: 'Worker is not initialized with required config!',\n code: 'NOT_INITIALIZED',\n};\nconst NOT_INITIALIZED_API = {\n message: 'Worker is not initialized with required api!',\n code: 'NOT_INITIALIZED',\n};\n\nexport function AssertConfig(config: unknown): asserts config is WorkerConfig {\n if (!config) {\n throw NOT_INITIALIZED_CONFIG;\n }\n}\n\nexport function AssertApi(api: unknown): asserts api is WorkerApi {\n if (!api) {\n throw NOT_INITIALIZED_API;\n }\n}\n\nconst HANDLERS = {\n async init(config: InitMessage) {\n self.config = config;\n\n if (self.config.api) {\n importScripts(self.config.base + '/' + self.config.api);\n }\n\n AssertApi(self.api);\n\n if (self.api.init) {\n return self.api.init();\n }\n\n return;\n },\n\n async suggest({query, count = 10}: SuggestMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return self.api.suggest(query, count);\n },\n\n async search({query, count = 10, page = 1}: SearchMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return self.api.search(query, count, page);\n },\n} as const;\n\nself.onmessage = async (message) => {\n const [port] = message.ports;\n const {type} = message.data;\n\n const handler = HANDLERS[type as MessageType];\n if (!handler) {\n port.postMessage({error: UNKNOWN_HANDLER});\n }\n\n try {\n const result = await handler(message.data);\n\n port.postMessage({result});\n } catch (error) {\n port.postMessage({error});\n }\n};\n"],"names":["UNKNOWN_HANDLER","message","code","NOT_INITIALIZED_CONFIG","NOT_INITIALIZED_API","AssertConfig","config","AssertApi","api","HANDLERS","init","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","self","importScripts","base","abrupt","stop","suggest","_ref","_callee2","query","_ref$count","count","_context2","search","_ref2","_callee3","_ref2$count","_ref2$page","page","_context3","onmessage","_ref3","_callee4","_message$ports","port","type","handler","result","_t","_context4","_slicedToArray","ports","data","postMessage","error","sent","_x","apply","arguments"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"112.js","mappings":";;;;;;AAAA,kBAAkB,mBAAO,CAAC,KAAkB;AAC5C,+BAA+B,mBAAO,CAAC,KAA+B;AACtE;AACA;AACA;AACA,uCAAuC,yBAAyB,SAAS,yBAAyB;;;;;;;ACLlG;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,mCAAmC,yBAAyB,SAAS,yBAAyB;;;;;;;ACT9F,oBAAoB,mBAAO,CAAC,KAAoB;AAChD,kBAAkB,mBAAO,CAAC,KAAkB;AAC5C,uBAAuB,mBAAO,CAAC,KAAuB;AACtD,0BAA0B,mBAAO,CAAC,GAA0B;AAC5D,+BAA+B,mBAAO,CAAC,KAA+B;AACtE,sBAAsB,mBAAO,CAAC,IAAsB;AACpD,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;AC5EjG,oBAAoB,mBAAO,CAAC,KAAoB;AAChD,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,gCAAgC,yBAAyB,SAAS,yBAAyB;;;;;;;AChC3F,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+BAA+B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,cAAc;AACd,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,+BAA+B,yBAAyB,SAAS,yBAAyB;;;;;;;ACxF1F,uBAAuB,mBAAO,CAAC,KAAuB;AACtD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,8CAA8C,yBAAyB,SAAS,yBAAyB;;;;;;;ACRzG;AACA;AACA;AACA,iCAAiC,yBAAyB,SAAS,yBAAyB;;;;;;;ACH5F;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,yBAAyB,SAAS,yBAAyB;;;;;;;ACzB/F,cAAc,uCAAiC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB,SAAS,yBAAyB;;;;;;;AClBhG;AACA;AACA;AACA,mCAAmC,yBAAyB,SAAS,yBAAyB;;;;;;;ACH9F;;AAEA,cAAc,mBAAO,CAAC,IAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;ACdA,0BAA0B,mBAAO,CAAC,GAA0B;AAC5D;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,oCAAoC,yBAAyB,SAAS,yBAAyB;;;;;;;ACP/F;AACA;AACA,gCAAgC,OAAO;AACvC;A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9B,IAAA;UAAA;QAAA;UAAA8B,SAAA,CAAA/B,IAAA;UAAA8B,EAAA,GAAAC,SAAA;UAE3BL,IAAI,CAACS,WAAW,CAAC;YAACC,KAAK,EAAAN;UAAA,CAAC,CAAC;QAAC;QAAA;UAAA,OAAAC,SAAA,CAAAxB,IAAA;MAAA;IAAA,GAAAiB,QAAA;EAAA,CAEjC;EAAA,iBAAAa,EAAA;IAAA,OAAAd,KAAA,CAAAe,KAAA,OAAAC,SAAA;EAAA;AAAA,I","sources":["webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorKeys.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regenerator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/OverloadYield.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorValues.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/regenerator/index.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsync.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorDefine.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/compat get default export","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/./src/components/Search/worker/index.ts"],"sourcesContent":["var regenerator = require(\"./regenerator.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nfunction _regeneratorAsyncGen(r, e, t, o, n) {\n return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);\n}\nmodule.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorKeys(e) {\n var n = Object(e),\n r = [];\n for (var t in n) r.unshift(t);\n return function e() {\n for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;\n return e.done = !0, e;\n };\n}\nmodule.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regenerator = require(\"./regenerator.js\");\nvar regeneratorAsync = require(\"./regeneratorAsync.js\");\nvar regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nvar regeneratorKeys = require(\"./regeneratorKeys.js\");\nvar regeneratorValues = require(\"./regeneratorValues.js\");\nfunction _regeneratorRuntime() {\n \"use strict\";\n\n var r = regenerator(),\n e = r.m(_regeneratorRuntime),\n t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;\n function n(r) {\n var e = \"function\" == typeof r && r.constructor;\n return !!e && (e === t || \"GeneratorFunction\" === (e.displayName || e.name));\n }\n var o = {\n \"throw\": 1,\n \"return\": 2,\n \"break\": 3,\n \"continue\": 3\n };\n function a(r) {\n var e, t;\n return function (n) {\n e || (e = {\n stop: function stop() {\n return t(n.a, 2);\n },\n \"catch\": function _catch() {\n return n.v;\n },\n abrupt: function abrupt(r, e) {\n return t(n.a, o[r], e);\n },\n delegateYield: function delegateYield(r, o, a) {\n return e.resultName = o, t(n.d, regeneratorValues(r), a);\n },\n finish: function finish(r) {\n return t(n.f, r);\n }\n }, t = function t(r, _t, o) {\n n.p = e.prev, n.n = e.next;\n try {\n return r(_t, o);\n } finally {\n e.next = n.n;\n }\n }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;\n try {\n return r.call(this, e);\n } finally {\n n.p = e.prev, n.n = e.next;\n }\n };\n }\n return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return {\n wrap: function wrap(e, t, n, o) {\n return r.w(a(e), t, n, o && o.reverse());\n },\n isGeneratorFunction: n,\n mark: r.m,\n awrap: function awrap(r, e) {\n return new OverloadYield(r, e);\n },\n AsyncIterator: regeneratorAsyncIterator,\n async: function async(r, e, t, o, u) {\n return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);\n },\n keys: regeneratorKeys,\n values: regeneratorValues\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction AsyncIterator(t, e) {\n function n(r, o, i, f) {\n try {\n var c = t[r](o),\n u = c.value;\n return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {\n n(\"next\", t, i, f);\n }, function (t) {\n n(\"throw\", t, i, f);\n }) : e.resolve(u).then(function (t) {\n c.value = t, i(c);\n }, function (t) {\n return n(\"throw\", t, i, f);\n });\n } catch (t) {\n f(t);\n }\n }\n var r;\n this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, \"function\" == typeof Symbol && Symbol.asyncIterator || \"@asyncIterator\", function () {\n return this;\n })), regeneratorDefine(this, \"_invoke\", function (t, o, i) {\n function f() {\n return new e(function (e, r) {\n n(t, i, e, r);\n });\n }\n return r = r ? r.then(f, f) : f();\n }, !0);\n}\nmodule.exports = AsyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction _regenerator() {\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\n var e,\n t,\n r = \"function\" == typeof Symbol ? Symbol : {},\n n = r.iterator || \"@@iterator\",\n o = r.toStringTag || \"@@toStringTag\";\n function i(r, n, o, i) {\n var c = n && n.prototype instanceof Generator ? n : Generator,\n u = Object.create(c.prototype);\n return regeneratorDefine(u, \"_invoke\", function (r, n, o) {\n var i,\n c,\n u,\n f = 0,\n p = o || [],\n y = !1,\n G = {\n p: 0,\n n: 0,\n v: e,\n a: d,\n f: d.bind(e, 4),\n d: function d(t, r) {\n return i = t, c = 0, u = e, G.n = r, a;\n }\n };\n function d(r, n) {\n for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {\n var o,\n i = p[t],\n d = G.p,\n l = i[2];\n r > 3 ? (o = l === n) && (c = i[4] || 3, u = i[5] === e ? i[3] : i[5], i[4] = 3, i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));\n }\n if (o || r > 1) return a;\n throw y = !0, n;\n }\n return function (o, p, l) {\n if (f > 1) throw TypeError(\"Generator is already running\");\n for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {\n i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);\n try {\n if (f = 2, i) {\n if (c || (o = \"next\"), t = i[o]) {\n if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\");\n if (!t.done) return t;\n u = t.value, c < 2 && (c = 0);\n } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1);\n i = e;\n } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;\n } catch (t) {\n i = e, c = 1, u = t;\n } finally {\n f = 1;\n }\n }\n return {\n value: t,\n done: y\n };\n };\n }(r, o, i), !0), u;\n }\n var a = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n t = Object.getPrototypeOf;\n var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {\n return this;\n }), t),\n u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);\n function f(e) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e;\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, \"constructor\", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", regeneratorDefine(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), regeneratorDefine(u), regeneratorDefine(u, o, \"Generator\"), regeneratorDefine(u, n, function () {\n return this;\n }), regeneratorDefine(u, \"toString\", function () {\n return \"[object Generator]\";\n }), (module.exports = _regenerator = function _regenerator() {\n return {\n w: i,\n m: f\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n 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) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorValues(e) {\n if (null != e) {\n var t = e[\"function\" == typeof Symbol && Symbol.iterator || \"@@iterator\"],\n r = 0;\n if (t) return t.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) return {\n next: function next() {\n return e && r >= e.length && (e = void 0), {\n value: e && e[r++],\n done: !e\n };\n }\n };\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n}\nmodule.exports = _regeneratorValues, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nfunction _regeneratorAsync(n, e, r, t, o) {\n var a = regeneratorAsyncGen(n, e, r, t, o);\n return a.next().then(function (n) {\n return n.done ? n.value : a.next();\n });\n}\nmodule.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorDefine(e, r, n, t) {\n var i = Object.defineProperty;\n try {\n i({}, \"\", {});\n } catch (e) {\n i = 0;\n }\n module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {\n if (r) i ? i(e, r, {\n value: n,\n enumerable: !t,\n configurable: !t,\n writable: !t\n }) : e[r] = n;else {\n var o = function o(r, n) {\n _regeneratorDefine(e, r, function (e) {\n return this._invoke(r, n, e);\n });\n };\n o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2);\n }\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _regeneratorDefine(e, r, n, t);\n}\nmodule.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/// <reference no-default-lib=\"true\"/>\n/// <reference lib=\"ES2015\" />\n/// <reference lib=\"webworker\" />\n\n/* eslint-disable new-cap */\nimport type {\n InitMessage,\n MessageType,\n SearchMessage,\n SuggestMessage,\n WorkerApi,\n WorkerConfig,\n} from '../types';\n\n// Default type of `self` is `WorkerGlobalScope & typeof globalThis`\n// https://github.com/microsoft/TypeScript/issues/14877\ndeclare const self: ServiceWorkerGlobalScope & {\n config?: WorkerConfig;\n api?: WorkerApi;\n};\n\nconst UNKNOWN_HANDLER = {\n message: 'Unknown message type!',\n code: 'UNKNOWN_HANDLER',\n};\nconst NOT_INITIALIZED_CONFIG = {\n message: 'Worker is not initialized with required config!',\n code: 'NOT_INITIALIZED',\n};\nconst NOT_INITIALIZED_API = {\n message: 'Worker is not initialized with required api!',\n code: 'NOT_INITIALIZED',\n};\n\nexport function AssertConfig(config: unknown): asserts config is WorkerConfig {\n if (!config) {\n throw NOT_INITIALIZED_CONFIG;\n }\n}\n\nexport function AssertApi(api: unknown): asserts api is WorkerApi {\n if (!api) {\n throw NOT_INITIALIZED_API;\n }\n}\n\nconst HANDLERS = {\n async init(config: InitMessage) {\n self.config = config;\n\n if (self.config.api) {\n importScripts(self.config.base + '/' + self.config.api);\n }\n\n if (self.api && self.api.init) {\n return await self.api.init();\n }\n\n return;\n },\n\n async suggest({query, count = 10}: SuggestMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return await self.api.suggest(query, count);\n },\n\n async search({query, count = 10, page = 1}: SearchMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return await self.api.search(query, count, page);\n },\n} as const;\n\nself.onmessage = async (message) => {\n const [port] = message.ports;\n const {type} = message.data;\n\n const handler = HANDLERS[type as MessageType];\n if (!handler) {\n port.postMessage({error: UNKNOWN_HANDLER});\n return;\n }\n\n try {\n const result = await handler(message.data);\n port.postMessage({result});\n } catch (error) {\n port.postMessage({error});\n }\n};\n"],"names":["UNKNOWN_HANDLER","message","code","NOT_INITIALIZED_CONFIG","NOT_INITIALIZED_API","AssertConfig","config","AssertApi","api","HANDLERS","init","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","self","importScripts","base","abrupt","sent","stop","suggest","_ref","_callee2","query","_ref$count","count","_context2","search","_ref2","_callee3","_ref2$count","_ref2$page","page","_context3","onmessage","_ref3","_callee4","_message$ports","port","type","handler","result","_t","_context4","_slicedToArray","ports","data","postMessage","error","_x","apply","arguments"],"sourceRoot":""}
|
package/build/server/731.js
CHANGED
|
@@ -602,15 +602,17 @@ var HANDLERS = {
|
|
|
602
602
|
if (self.config.api) {
|
|
603
603
|
importScripts(self.config.base + '/' + self.config.api);
|
|
604
604
|
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
_context.next = 1;
|
|
605
|
+
if (!(self.api && self.api.init)) {
|
|
606
|
+
_context.next = 2;
|
|
608
607
|
break;
|
|
609
608
|
}
|
|
610
|
-
|
|
609
|
+
_context.next = 1;
|
|
610
|
+
return self.api.init();
|
|
611
611
|
case 1:
|
|
612
|
-
return _context.abrupt("return");
|
|
612
|
+
return _context.abrupt("return", _context.sent);
|
|
613
613
|
case 2:
|
|
614
|
+
return _context.abrupt("return");
|
|
615
|
+
case 3:
|
|
614
616
|
case "end":
|
|
615
617
|
return _context.stop();
|
|
616
618
|
}
|
|
@@ -626,8 +628,11 @@ var HANDLERS = {
|
|
|
626
628
|
query = _ref.query, _ref$count = _ref.count, count = _ref$count === void 0 ? 10 : _ref$count;
|
|
627
629
|
AssertConfig(self.config);
|
|
628
630
|
AssertApi(self.api);
|
|
629
|
-
|
|
631
|
+
_context2.next = 1;
|
|
632
|
+
return self.api.suggest(query, count);
|
|
630
633
|
case 1:
|
|
634
|
+
return _context2.abrupt("return", _context2.sent);
|
|
635
|
+
case 2:
|
|
631
636
|
case "end":
|
|
632
637
|
return _context2.stop();
|
|
633
638
|
}
|
|
@@ -643,8 +648,11 @@ var HANDLERS = {
|
|
|
643
648
|
query = _ref2.query, _ref2$count = _ref2.count, count = _ref2$count === void 0 ? 10 : _ref2$count, _ref2$page = _ref2.page, page = _ref2$page === void 0 ? 1 : _ref2$page;
|
|
644
649
|
AssertConfig(self.config);
|
|
645
650
|
AssertApi(self.api);
|
|
646
|
-
|
|
651
|
+
_context3.next = 1;
|
|
652
|
+
return self.api.search(query, count, page);
|
|
647
653
|
case 1:
|
|
654
|
+
return _context3.abrupt("return", _context3.sent);
|
|
655
|
+
case 2:
|
|
648
656
|
case "end":
|
|
649
657
|
return _context3.stop();
|
|
650
658
|
}
|
|
@@ -661,11 +669,15 @@ self.onmessage = /*#__PURE__*/function () {
|
|
|
661
669
|
_message$ports = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(message.ports, 1), port = _message$ports[0];
|
|
662
670
|
type = message.data.type;
|
|
663
671
|
handler = HANDLERS[type];
|
|
664
|
-
if (
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
});
|
|
672
|
+
if (handler) {
|
|
673
|
+
_context4.next = 1;
|
|
674
|
+
break;
|
|
668
675
|
}
|
|
676
|
+
port.postMessage({
|
|
677
|
+
error: UNKNOWN_HANDLER
|
|
678
|
+
});
|
|
679
|
+
return _context4.abrupt("return");
|
|
680
|
+
case 1:
|
|
669
681
|
_context4.prev = 1;
|
|
670
682
|
_context4.next = 2;
|
|
671
683
|
return handler(message.data);
|
package/build/server/731.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"731.js","mappings":";;;;;;AAAA,kBAAkB,mBAAO,CAAC,KAAkB;AAC5C,+BAA+B,mBAAO,CAAC,KAA+B;AACtE;AACA;AACA;AACA,uCAAuC,yBAAyB,SAAS,yBAAyB;;;;;;;ACLlG;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,mCAAmC,yBAAyB,SAAS,yBAAyB;;;;;;;ACT9F,oBAAoB,mBAAO,CAAC,KAAoB;AAChD,kBAAkB,mBAAO,CAAC,KAAkB;AAC5C,uBAAuB,mBAAO,CAAC,KAAuB;AACtD,0BAA0B,mBAAO,CAAC,GAA0B;AAC5D,+BAA+B,mBAAO,CAAC,KAA+B;AACtE,sBAAsB,mBAAO,CAAC,IAAsB;AACpD,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;AC5EjG,oBAAoB,mBAAO,CAAC,KAAoB;AAChD,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,gCAAgC,yBAAyB,SAAS,yBAAyB;;;;;;;AChC3F,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+BAA+B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,cAAc;AACd,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,+BAA+B,yBAAyB,SAAS,yBAAyB;;;;;;;ACxF1F,uBAAuB,mBAAO,CAAC,KAAuB;AACtD;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,8CAA8C,yBAAyB,SAAS,yBAAyB;;;;;;;ACRzG;AACA;AACA;AACA,iCAAiC,yBAAyB,SAAS,yBAAyB;;;;;;;ACH5F;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,yBAAyB,SAAS,yBAAyB;;;;;;;ACzB/F,cAAc,uCAAiC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB,SAAS,yBAAyB;;;;;;;AClBhG;AACA;AACA;AACA,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,CAACS,WAAW,CAAC;YAACN,MAAM,EAANA;UAAM,CAAC,CAAC;UAACE,SAAA,CAAA7B,IAAA;UAAA;QAAA;UAAA6B,SAAA,CAAA9B,IAAA;UAAA6B,EAAA,GAAAC,SAAA;UAE3BL,IAAI,CAACS,WAAW,CAAC;YAACC,KAAK,EAAAN;UAAA,CAAC,CAAC;QAAC;QAAA;UAAA,OAAAC,SAAA,CAAAxB,IAAA;MAAA;IAAA,GAAAiB,QAAA;EAAA,CAEjC;EAAA,iBAAAc,EAAA;IAAA,OAAAf,KAAA,CAAAgB,KAAA,OAAAC,SAAA;EAAA;AAAA,I","sources":["webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorKeys.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regenerator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/OverloadYield.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorValues.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/regenerator/index.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsync.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorDefine.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/compat get default export","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/./src/components/Search/worker/index.ts"],"sourcesContent":["var regenerator = require(\"./regenerator.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nfunction _regeneratorAsyncGen(r, e, t, o, n) {\n return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);\n}\nmodule.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorKeys(e) {\n var n = Object(e),\n r = [];\n for (var t in n) r.unshift(t);\n return function e() {\n for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;\n return e.done = !0, e;\n };\n}\nmodule.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regenerator = require(\"./regenerator.js\");\nvar regeneratorAsync = require(\"./regeneratorAsync.js\");\nvar regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nvar regeneratorKeys = require(\"./regeneratorKeys.js\");\nvar regeneratorValues = require(\"./regeneratorValues.js\");\nfunction _regeneratorRuntime() {\n \"use strict\";\n\n var r = regenerator(),\n e = r.m(_regeneratorRuntime),\n t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;\n function n(r) {\n var e = \"function\" == typeof r && r.constructor;\n return !!e && (e === t || \"GeneratorFunction\" === (e.displayName || e.name));\n }\n var o = {\n \"throw\": 1,\n \"return\": 2,\n \"break\": 3,\n \"continue\": 3\n };\n function a(r) {\n var e, t;\n return function (n) {\n e || (e = {\n stop: function stop() {\n return t(n.a, 2);\n },\n \"catch\": function _catch() {\n return n.v;\n },\n abrupt: function abrupt(r, e) {\n return t(n.a, o[r], e);\n },\n delegateYield: function delegateYield(r, o, a) {\n return e.resultName = o, t(n.d, regeneratorValues(r), a);\n },\n finish: function finish(r) {\n return t(n.f, r);\n }\n }, t = function t(r, _t, o) {\n n.p = e.prev, n.n = e.next;\n try {\n return r(_t, o);\n } finally {\n e.next = n.n;\n }\n }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;\n try {\n return r.call(this, e);\n } finally {\n n.p = e.prev, n.n = e.next;\n }\n };\n }\n return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return {\n wrap: function wrap(e, t, n, o) {\n return r.w(a(e), t, n, o && o.reverse());\n },\n isGeneratorFunction: n,\n mark: r.m,\n awrap: function awrap(r, e) {\n return new OverloadYield(r, e);\n },\n AsyncIterator: regeneratorAsyncIterator,\n async: function async(r, e, t, o, u) {\n return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);\n },\n keys: regeneratorKeys,\n values: regeneratorValues\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction AsyncIterator(t, e) {\n function n(r, o, i, f) {\n try {\n var c = t[r](o),\n u = c.value;\n return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {\n n(\"next\", t, i, f);\n }, function (t) {\n n(\"throw\", t, i, f);\n }) : e.resolve(u).then(function (t) {\n c.value = t, i(c);\n }, function (t) {\n return n(\"throw\", t, i, f);\n });\n } catch (t) {\n f(t);\n }\n }\n var r;\n this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, \"function\" == typeof Symbol && Symbol.asyncIterator || \"@asyncIterator\", function () {\n return this;\n })), regeneratorDefine(this, \"_invoke\", function (t, o, i) {\n function f() {\n return new e(function (e, r) {\n n(t, i, e, r);\n });\n }\n return r = r ? r.then(f, f) : f();\n }, !0);\n}\nmodule.exports = AsyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction _regenerator() {\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\n var e,\n t,\n r = \"function\" == typeof Symbol ? Symbol : {},\n n = r.iterator || \"@@iterator\",\n o = r.toStringTag || \"@@toStringTag\";\n function i(r, n, o, i) {\n var c = n && n.prototype instanceof Generator ? n : Generator,\n u = Object.create(c.prototype);\n return regeneratorDefine(u, \"_invoke\", function (r, n, o) {\n var i,\n c,\n u,\n f = 0,\n p = o || [],\n y = !1,\n G = {\n p: 0,\n n: 0,\n v: e,\n a: d,\n f: d.bind(e, 4),\n d: function d(t, r) {\n return i = t, c = 0, u = e, G.n = r, a;\n }\n };\n function d(r, n) {\n for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {\n var o,\n i = p[t],\n d = G.p,\n l = i[2];\n r > 3 ? (o = l === n) && (c = i[4] || 3, u = i[5] === e ? i[3] : i[5], i[4] = 3, i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));\n }\n if (o || r > 1) return a;\n throw y = !0, n;\n }\n return function (o, p, l) {\n if (f > 1) throw TypeError(\"Generator is already running\");\n for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {\n i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);\n try {\n if (f = 2, i) {\n if (c || (o = \"next\"), t = i[o]) {\n if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\");\n if (!t.done) return t;\n u = t.value, c < 2 && (c = 0);\n } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1);\n i = e;\n } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;\n } catch (t) {\n i = e, c = 1, u = t;\n } finally {\n f = 1;\n }\n }\n return {\n value: t,\n done: y\n };\n };\n }(r, o, i), !0), u;\n }\n var a = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n t = Object.getPrototypeOf;\n var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {\n return this;\n }), t),\n u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);\n function f(e) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e;\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, \"constructor\", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", regeneratorDefine(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), regeneratorDefine(u), regeneratorDefine(u, o, \"Generator\"), regeneratorDefine(u, n, function () {\n return this;\n }), regeneratorDefine(u, \"toString\", function () {\n return \"[object Generator]\";\n }), (module.exports = _regenerator = function _regenerator() {\n return {\n w: i,\n m: f\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n 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) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorValues(e) {\n if (null != e) {\n var t = e[\"function\" == typeof Symbol && Symbol.iterator || \"@@iterator\"],\n r = 0;\n if (t) return t.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) return {\n next: function next() {\n return e && r >= e.length && (e = void 0), {\n value: e && e[r++],\n done: !e\n };\n }\n };\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n}\nmodule.exports = _regeneratorValues, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nfunction _regeneratorAsync(n, e, r, t, o) {\n var a = regeneratorAsyncGen(n, e, r, t, o);\n return a.next().then(function (n) {\n return n.done ? n.value : a.next();\n });\n}\nmodule.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorDefine(e, r, n, t) {\n var i = Object.defineProperty;\n try {\n i({}, \"\", {});\n } catch (e) {\n i = 0;\n }\n module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {\n if (r) i ? i(e, r, {\n value: n,\n enumerable: !t,\n configurable: !t,\n writable: !t\n }) : e[r] = n;else {\n var o = function o(r, n) {\n _regeneratorDefine(e, r, function (e) {\n return this._invoke(r, n, e);\n });\n };\n o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2);\n }\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _regeneratorDefine(e, r, n, t);\n}\nmodule.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/// <reference no-default-lib=\"true\"/>\n/// <reference lib=\"ES2015\" />\n/// <reference lib=\"webworker\" />\n\n/* eslint-disable new-cap */\nimport type {\n InitMessage,\n MessageType,\n SearchMessage,\n SuggestMessage,\n WorkerApi,\n WorkerConfig,\n} from '../types';\n\n// Default type of `self` is `WorkerGlobalScope & typeof globalThis`\n// https://github.com/microsoft/TypeScript/issues/14877\ndeclare const self: ServiceWorkerGlobalScope & {\n config?: WorkerConfig;\n api?: WorkerApi;\n};\n\nconst UNKNOWN_HANDLER = {\n message: 'Unknown message type!',\n code: 'UNKNOWN_HANDLER',\n};\nconst NOT_INITIALIZED_CONFIG = {\n message: 'Worker is not initialized with required config!',\n code: 'NOT_INITIALIZED',\n};\nconst NOT_INITIALIZED_API = {\n message: 'Worker is not initialized with required api!',\n code: 'NOT_INITIALIZED',\n};\n\nexport function AssertConfig(config: unknown): asserts config is WorkerConfig {\n if (!config) {\n throw NOT_INITIALIZED_CONFIG;\n }\n}\n\nexport function AssertApi(api: unknown): asserts api is WorkerApi {\n if (!api) {\n throw NOT_INITIALIZED_API;\n }\n}\n\nconst HANDLERS = {\n async init(config: InitMessage) {\n self.config = config;\n\n if (self.config.api) {\n importScripts(self.config.base + '/' + self.config.api);\n }\n\n AssertApi(self.api);\n\n if (self.api.init) {\n return self.api.init();\n }\n\n return;\n },\n\n async suggest({query, count = 10}: SuggestMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return self.api.suggest(query, count);\n },\n\n async search({query, count = 10, page = 1}: SearchMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return self.api.search(query, count, page);\n },\n} as const;\n\nself.onmessage = async (message) => {\n const [port] = message.ports;\n const {type} = message.data;\n\n const handler = HANDLERS[type as MessageType];\n if (!handler) {\n port.postMessage({error: UNKNOWN_HANDLER});\n }\n\n try {\n const result = await handler(message.data);\n\n port.postMessage({result});\n } catch (error) {\n port.postMessage({error});\n }\n};\n"],"names":["UNKNOWN_HANDLER","message","code","NOT_INITIALIZED_CONFIG","NOT_INITIALIZED_API","AssertConfig","config","AssertApi","api","HANDLERS","init","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","self","importScripts","base","abrupt","stop","suggest","_ref","_callee2","query","_ref$count","count","_context2","search","_ref2","_callee3","_ref2$count","_ref2$page","page","_context3","onmessage","_ref3","_callee4","_message$ports","port","type","handler","result","_t","_context4","_slicedToArray","ports","data","postMessage","error","sent","_x","apply","arguments"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"731.js","mappings":";;;;;;AAAA,kBAAkB,mBAAO,CAAC,KAAkB;AAC5C,+BAA+B,mBAAO,CAAC,KAA+B;AACtE;AACA;AACA;AACA,uCAAuC,yBAAyB,SAAS,yBAAyB;;;;;;;ACLlG;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,mCAAmC,yBAAyB,SAAS,yBAAyB;;;;;;;ACT9F,oBAAoB,mBAAO,CAAC,KAAoB;AAChD,kBAAkB,mBAAO,CAAC,KAAkB;AAC5C,uBAAuB,mBAAO,CAAC,KAAuB;AACtD,0BAA0B,mBAAO,CAAC,GAA0B;AAC5D,+BAA+B,mBAAO,CAAC,KAA+B;AACtE,sBAAsB,mBAAO,CAAC,IAAsB;AACpD,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;AC5EjG,oBAAoB,mBAAO,CAAC,KAAoB;AAChD,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,GAAG;AACH;AACA,gCAAgC,yBAAyB,SAAS,yBAAyB;;;;;;;AChC3F,wBAAwB,mBAAO,CAAC,KAAwB;AACxD;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+BAA+B;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,cAAc;AACd,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,2DA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AAA,GAAAiB,QAAA;EAAA,CAEjC;EAAA,iBAAAa,EAAA;IAAA,OAAAd,KAAA,CAAAe,KAAA,OAAAC,SAAA;EAAA;AAAA,I","sources":["webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorKeys.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regenerator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/OverloadYield.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorValues.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/regenerator/index.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorAsync.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/regeneratorDefine.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@diplodoc/client/./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@diplodoc/client/webpack/bootstrap","webpack://@diplodoc/client/webpack/runtime/compat get default export","webpack://@diplodoc/client/webpack/runtime/define property getters","webpack://@diplodoc/client/webpack/runtime/hasOwnProperty shorthand","webpack://@diplodoc/client/./src/components/Search/worker/index.ts"],"sourcesContent":["var regenerator = require(\"./regenerator.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nfunction _regeneratorAsyncGen(r, e, t, o, n) {\n return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);\n}\nmodule.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorKeys(e) {\n var n = Object(e),\n r = [];\n for (var t in n) r.unshift(t);\n return function e() {\n for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;\n return e.done = !0, e;\n };\n}\nmodule.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regenerator = require(\"./regenerator.js\");\nvar regeneratorAsync = require(\"./regeneratorAsync.js\");\nvar regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nvar regeneratorAsyncIterator = require(\"./regeneratorAsyncIterator.js\");\nvar regeneratorKeys = require(\"./regeneratorKeys.js\");\nvar regeneratorValues = require(\"./regeneratorValues.js\");\nfunction _regeneratorRuntime() {\n \"use strict\";\n\n var r = regenerator(),\n e = r.m(_regeneratorRuntime),\n t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;\n function n(r) {\n var e = \"function\" == typeof r && r.constructor;\n return !!e && (e === t || \"GeneratorFunction\" === (e.displayName || e.name));\n }\n var o = {\n \"throw\": 1,\n \"return\": 2,\n \"break\": 3,\n \"continue\": 3\n };\n function a(r) {\n var e, t;\n return function (n) {\n e || (e = {\n stop: function stop() {\n return t(n.a, 2);\n },\n \"catch\": function _catch() {\n return n.v;\n },\n abrupt: function abrupt(r, e) {\n return t(n.a, o[r], e);\n },\n delegateYield: function delegateYield(r, o, a) {\n return e.resultName = o, t(n.d, regeneratorValues(r), a);\n },\n finish: function finish(r) {\n return t(n.f, r);\n }\n }, t = function t(r, _t, o) {\n n.p = e.prev, n.n = e.next;\n try {\n return r(_t, o);\n } finally {\n e.next = n.n;\n }\n }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;\n try {\n return r.call(this, e);\n } finally {\n n.p = e.prev, n.n = e.next;\n }\n };\n }\n return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return {\n wrap: function wrap(e, t, n, o) {\n return r.w(a(e), t, n, o && o.reverse());\n },\n isGeneratorFunction: n,\n mark: r.m,\n awrap: function awrap(r, e) {\n return new OverloadYield(r, e);\n },\n AsyncIterator: regeneratorAsyncIterator,\n async: function async(r, e, t, o, u) {\n return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);\n },\n keys: regeneratorKeys,\n values: regeneratorValues\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var OverloadYield = require(\"./OverloadYield.js\");\nvar regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction AsyncIterator(t, e) {\n function n(r, o, i, f) {\n try {\n var c = t[r](o),\n u = c.value;\n return u instanceof OverloadYield ? e.resolve(u.v).then(function (t) {\n n(\"next\", t, i, f);\n }, function (t) {\n n(\"throw\", t, i, f);\n }) : e.resolve(u).then(function (t) {\n c.value = t, i(c);\n }, function (t) {\n return n(\"throw\", t, i, f);\n });\n } catch (t) {\n f(t);\n }\n }\n var r;\n this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, \"function\" == typeof Symbol && Symbol.asyncIterator || \"@asyncIterator\", function () {\n return this;\n })), regeneratorDefine(this, \"_invoke\", function (t, o, i) {\n function f() {\n return new e(function (e, r) {\n n(t, i, e, r);\n });\n }\n return r = r ? r.then(f, f) : f();\n }, !0);\n}\nmodule.exports = AsyncIterator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var regeneratorDefine = require(\"./regeneratorDefine.js\");\nfunction _regenerator() {\n /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */\n var e,\n t,\n r = \"function\" == typeof Symbol ? Symbol : {},\n n = r.iterator || \"@@iterator\",\n o = r.toStringTag || \"@@toStringTag\";\n function i(r, n, o, i) {\n var c = n && n.prototype instanceof Generator ? n : Generator,\n u = Object.create(c.prototype);\n return regeneratorDefine(u, \"_invoke\", function (r, n, o) {\n var i,\n c,\n u,\n f = 0,\n p = o || [],\n y = !1,\n G = {\n p: 0,\n n: 0,\n v: e,\n a: d,\n f: d.bind(e, 4),\n d: function d(t, r) {\n return i = t, c = 0, u = e, G.n = r, a;\n }\n };\n function d(r, n) {\n for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {\n var o,\n i = p[t],\n d = G.p,\n l = i[2];\n r > 3 ? (o = l === n) && (c = i[4] || 3, u = i[5] === e ? i[3] : i[5], i[4] = 3, i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));\n }\n if (o || r > 1) return a;\n throw y = !0, n;\n }\n return function (o, p, l) {\n if (f > 1) throw TypeError(\"Generator is already running\");\n for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {\n i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);\n try {\n if (f = 2, i) {\n if (c || (o = \"next\"), t = i[o]) {\n if (!(t = t.call(i, u))) throw TypeError(\"iterator result is not an object\");\n if (!t.done) return t;\n u = t.value, c < 2 && (c = 0);\n } else 1 === c && (t = i[\"return\"]) && t.call(i), c < 2 && (u = TypeError(\"The iterator does not provide a '\" + o + \"' method\"), c = 1);\n i = e;\n } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;\n } catch (t) {\n i = e, c = 1, u = t;\n } finally {\n f = 1;\n }\n }\n return {\n value: t,\n done: y\n };\n };\n }(r, o, i), !0), u;\n }\n var a = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n t = Object.getPrototypeOf;\n var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {\n return this;\n }), t),\n u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);\n function f(e) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, \"GeneratorFunction\")), e.prototype = Object.create(u), e;\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, \"constructor\", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = \"GeneratorFunction\", regeneratorDefine(GeneratorFunctionPrototype, o, \"GeneratorFunction\"), regeneratorDefine(u), regeneratorDefine(u, o, \"Generator\"), regeneratorDefine(u, n, function () {\n return this;\n }), regeneratorDefine(u, \"toString\", function () {\n return \"[object Generator]\";\n }), (module.exports = _regenerator = function _regenerator() {\n return {\n w: i,\n m: f\n };\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports)();\n}\nmodule.exports = _regenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n 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) ? arrayLikeToArray(r, a) : void 0;\n }\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _OverloadYield(e, d) {\n this.v = e, this.k = d;\n}\nmodule.exports = _OverloadYield, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function asyncGeneratorStep(n, t, e, r, o, a, c) {\n try {\n var i = n[a](c),\n u = i.value;\n } catch (n) {\n return void e(n);\n }\n i.done ? t(u) : Promise.resolve(u).then(r, o);\n}\nfunction _asyncToGenerator(n) {\n return function () {\n var t = this,\n e = arguments;\n return new Promise(function (r, o) {\n var a = n.apply(t, e);\n function _next(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"next\", n);\n }\n function _throw(n) {\n asyncGeneratorStep(a, r, o, _next, _throw, \"throw\", n);\n }\n _next(void 0);\n });\n };\n}\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorValues(e) {\n if (null != e) {\n var t = e[\"function\" == typeof Symbol && Symbol.iterator || \"@@iterator\"],\n r = 0;\n if (t) return t.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) return {\n next: function next() {\n return e && r >= e.length && (e = void 0), {\n value: e && e[r++],\n done: !e\n };\n }\n };\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n}\nmodule.exports = _regeneratorValues, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var regeneratorAsyncGen = require(\"./regeneratorAsyncGen.js\");\nfunction _regeneratorAsync(n, e, r, t, o) {\n var a = regeneratorAsyncGen(n, e, r, t, o);\n return a.next().then(function (n) {\n return n.done ? n.value : a.next();\n });\n}\nmodule.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _regeneratorDefine(e, r, n, t) {\n var i = Object.defineProperty;\n try {\n i({}, \"\", {});\n } catch (e) {\n i = 0;\n }\n module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) {\n if (r) i ? i(e, r, {\n value: n,\n enumerable: !t,\n configurable: !t,\n writable: !t\n }) : e[r] = n;else {\n var o = function o(r, n) {\n _regeneratorDefine(e, r, function (e) {\n return this._invoke(r, n, e);\n });\n };\n o(\"next\", 0), o(\"throw\", 1), o(\"return\", 2);\n }\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports, _regeneratorDefine(e, r, n, t);\n}\nmodule.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(r, e) {\n return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","/// <reference no-default-lib=\"true\"/>\n/// <reference lib=\"ES2015\" />\n/// <reference lib=\"webworker\" />\n\n/* eslint-disable new-cap */\nimport type {\n InitMessage,\n MessageType,\n SearchMessage,\n SuggestMessage,\n WorkerApi,\n WorkerConfig,\n} from '../types';\n\n// Default type of `self` is `WorkerGlobalScope & typeof globalThis`\n// https://github.com/microsoft/TypeScript/issues/14877\ndeclare const self: ServiceWorkerGlobalScope & {\n config?: WorkerConfig;\n api?: WorkerApi;\n};\n\nconst UNKNOWN_HANDLER = {\n message: 'Unknown message type!',\n code: 'UNKNOWN_HANDLER',\n};\nconst NOT_INITIALIZED_CONFIG = {\n message: 'Worker is not initialized with required config!',\n code: 'NOT_INITIALIZED',\n};\nconst NOT_INITIALIZED_API = {\n message: 'Worker is not initialized with required api!',\n code: 'NOT_INITIALIZED',\n};\n\nexport function AssertConfig(config: unknown): asserts config is WorkerConfig {\n if (!config) {\n throw NOT_INITIALIZED_CONFIG;\n }\n}\n\nexport function AssertApi(api: unknown): asserts api is WorkerApi {\n if (!api) {\n throw NOT_INITIALIZED_API;\n }\n}\n\nconst HANDLERS = {\n async init(config: InitMessage) {\n self.config = config;\n\n if (self.config.api) {\n importScripts(self.config.base + '/' + self.config.api);\n }\n\n if (self.api && self.api.init) {\n return await self.api.init();\n }\n\n return;\n },\n\n async suggest({query, count = 10}: SuggestMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return await self.api.suggest(query, count);\n },\n\n async search({query, count = 10, page = 1}: SearchMessage) {\n AssertConfig(self.config);\n AssertApi(self.api);\n\n return await self.api.search(query, count, page);\n },\n} as const;\n\nself.onmessage = async (message) => {\n const [port] = message.ports;\n const {type} = message.data;\n\n const handler = HANDLERS[type as MessageType];\n if (!handler) {\n port.postMessage({error: UNKNOWN_HANDLER});\n return;\n }\n\n try {\n const result = await handler(message.data);\n port.postMessage({result});\n } catch (error) {\n port.postMessage({error});\n }\n};\n"],"names":["UNKNOWN_HANDLER","message","code","NOT_INITIALIZED_CONFIG","NOT_INITIALIZED_API","AssertConfig","config","AssertApi","api","HANDLERS","init","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","self","importScripts","base","abrupt","sent","stop","suggest","_ref","_callee2","query","_ref$count","count","_context2","search","_ref2","_callee3","_ref2$count","_ref2$page","page","_context3","onmessage","_ref3","_callee4","_message$ports","port","type","handler","result","_t","_context4","_slicedToArray","ports","data","postMessage","error","_x","apply","arguments"],"sourceRoot":""}
|