8855 lines
350 KiB
JavaScript
8855 lines
350 KiB
JavaScript
(()=>{ var __RUSHSTACK_CURRENT_SCRIPT__ = document.currentScript; define("459579c7-954c-469e-b707-ca75d808603f_0.0.1", ["react","react-dom","@microsoft/sp-core-library","@microsoft/sp-property-pane","@microsoft/sp-webpart-base","CtFormsPortalWebPartStrings","@microsoft/sp-http"], (__WEBPACK_EXTERNAL_MODULE__959__, __WEBPACK_EXTERNAL_MODULE__398__, __WEBPACK_EXTERNAL_MODULE__676__, __WEBPACK_EXTERNAL_MODULE__877__, __WEBPACK_EXTERNAL_MODULE__642__, __WEBPACK_EXTERNAL_MODULE__735__, __WEBPACK_EXTERNAL_MODULE__909__) => { return /******/ (() => { // webpackBootstrap
|
||
/******/ var __webpack_modules__ = ({
|
||
|
||
/***/ 945:
|
||
/*!*****************************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/CtFormsPortal.module.scss.css ***!
|
||
\*****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
/* harmony export */ });
|
||
/* harmony import */ var _node_modules_microsoft_sp_css_loader_node_modules_microsoft_load_themed_styles_lib_es6_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/@microsoft/sp-css-loader/node_modules/@microsoft/load-themed-styles/lib-es6/index.js */ 323);
|
||
// Imports
|
||
|
||
|
||
_node_modules_microsoft_sp_css_loader_node_modules_microsoft_load_themed_styles_lib_es6_index_js__WEBPACK_IMPORTED_MODULE_0__.loadStyles("#spPageCanvasContent,#workbenchPageContent,.CanvasComponent.LCS .CanvasZone,.CanvasZone,.SPCanvas-canvas{max-width:100%!important}.root_5d66f4da{width:100%}", true);
|
||
|
||
// Exports
|
||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||
root: "root_5d66f4da"
|
||
});
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 9:
|
||
/*!*************************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/Dashboard.module.scss.css ***!
|
||
\*************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
/* harmony export */ });
|
||
/* harmony import */ var _node_modules_microsoft_sp_css_loader_node_modules_microsoft_load_themed_styles_lib_es6_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/@microsoft/sp-css-loader/node_modules/@microsoft/load-themed-styles/lib-es6/index.js */ 323);
|
||
// Imports
|
||
|
||
|
||
_node_modules_microsoft_sp_css_loader_node_modules_microsoft_load_themed_styles_lib_es6_index_js__WEBPACK_IMPORTED_MODULE_0__.loadStyles(".head_2269bbe3{align-items:center;display:flex;flex-wrap:wrap;gap:16px;justify-content:space-between;margin-bottom:16px}.title_2269bbe3{color:#0f2440;font-family:Lora,Georgia,serif;font-size:22px;font-weight:600;margin:0}.toolbar_2269bbe3{align-items:center;display:flex;flex-wrap:wrap;gap:12px}.search_2269bbe3{max-width:100%;width:280px}.filter_2269bbe3{width:200px}.tableWrap_2269bbe3{background:#fff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 1px 2px rgba(15,36,64,.04),0 1px 3px rgba(15,36,64,.06);margin-top:16px;overflow:hidden}.state_2269bbe3{color:#6b7280;font-size:13px;margin-top:16px}@media (max-width:640px){.filter_2269bbe3,.search_2269bbe3{width:100%}}", true);
|
||
|
||
// Exports
|
||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||
head: "head_2269bbe3",
|
||
title: "title_2269bbe3",
|
||
toolbar: "toolbar_2269bbe3",
|
||
search: "search_2269bbe3",
|
||
tableWrap: "tableWrap_2269bbe3",
|
||
state: "state_2269bbe3",
|
||
filter: "filter_2269bbe3"
|
||
});
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 943:
|
||
/*!**************************************************!*\
|
||
!*** ./node_modules/@tnsu/ui-kit/dist/style.css ***!
|
||
\**************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony import */ var _microsoft_sp_css_loader_node_modules_microsoft_load_themed_styles_lib_es6_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../@microsoft/sp-css-loader/node_modules/@microsoft/load-themed-styles/lib-es6/index.js */ 323);
|
||
// Imports
|
||
|
||
|
||
_microsoft_sp_css_loader_node_modules_microsoft_load_themed_styles_lib_es6_index_js__WEBPACK_IMPORTED_MODULE_0__.loadStyles("._btn_104wo_1{align-items:center;border:1px solid #0000;border-radius:6px;cursor:pointer;display:inline-flex;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13px;font-weight:500;gap:7px;justify-content:center;letter-spacing:.15px;padding:10px 20px;transition:all .18s;white-space:nowrap}._btn_104wo_1:disabled{cursor:default;opacity:.55;pointer-events:none}._sm_104wo_23{font-size:12.5px;padding:7px 14px}._full_104wo_28{width:100%}._primary_104wo_32{background:#1b3a5c;border-color:#1b3a5c;color:#fff}._primary_104wo_32:hover{background:#244b73;box-shadow:0 4px 16px #0f244012}._accent_104wo_42{background:linear-gradient(135deg,#e5b635,#d4a01e);border-color:#d4a01e;color:#0a1b30;font-weight:600}._accent_104wo_42:hover{box-shadow:0 4px 20px #d4a01e2e;transform:translateY(-1px)}._secondary_104wo_53{background:#fff;border-color:#d1d5db;color:#1b3a5c}._secondary_104wo_53:hover{border-color:#d4a01e;color:#0f2440}._ghost_104wo_63{background:0 0;color:#244b73}._ghost_104wo_63:hover{background:#e8eef4}._danger_104wo_71{background:#fff;border-color:#d1d5db;color:#dc2626}._danger_104wo_71:hover{background:#fef2f2;border-color:#dc2626}._icon_bqhxe_1{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;height:20px;width:20px}._sm_bqhxe_12{height:16px;width:16px}._lg_bqhxe_17{height:24px;width:24px}._alert_1qa2n_1{align-items:center;border:1px solid;border-radius:10px;display:flex;font-size:12.5px;gap:10px;margin-bottom:18px;padding:12px 16px}._warn_1qa2n_12{background:#fefbf0;border-color:#f0cc5e;color:#854d0e}._ok_1qa2n_18{background:#f0fdf4;border-color:#bbf7d0;color:#15803d}._err_1qa2n_24{background:#fef2f2;border-color:#fecaca;color:#dc2626}._badge_6pzfu_1{background:#f4f7fa;border:1px solid #e5e7eb;color:#1b3a5c;font-size:13px;letter-spacing:.3px}._badge_1emt2_1,._badge_6pzfu_1{align-items:center;border-radius:6px;display:inline-flex;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-weight:600;padding:5px 12px;white-space:nowrap}._badge_1emt2_1{font-size:12.5px;letter-spacing:.2px}._sm_1emt2_13{border-radius:10px;font-size:11px;letter-spacing:normal;padding:3px 10px}._neutral_1emt2_20{background:#f3f4f6;color:#374151}._muted_1emt2_25{background:#f3f4f6;color:#6b7280}._info_1emt2_30{background:#eff6ff;color:#2563eb}._success_1emt2_35{background:#f0fdf4;color:#15803d}._warning_1emt2_40{background:#fefbf0;color:#854d0e}._danger_1emt2_45{background:#fef2f2;color:#dc2626}._primary_1emt2_50{background:#f4f7fa;color:#1b3a5c}._header_1n3g3_1{align-items:center;background:#f4f7fa;border:1px solid #e8eef4;border-left:3px solid #d4a01e;border-radius:10px;display:flex;gap:12px;padding:14px 20px}._icon_1n3g3_12{color:#244b73;flex-shrink:0}._title_1n3g3_17{color:#0f2440;flex:auto;font-family:Lora,Georgia,serif;font-size:15px;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._right_1n3g3_29{align-items:center;display:flex;flex-shrink:0;gap:8px}@media (width<=640px){._header_1n3g3_1{flex-wrap:wrap;padding:12px 14px}._title_1n3g3_17{white-space:normal}}._card_rzq1u_1{background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 1px 2px #0f24400a,0 1px 3px #0f24400f;padding:32px}@media (width<=640px){._card_rzq1u_1{padding:18px}}._header_rzq1u_14{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}._title_rzq1u_21{color:#0f2440;font-family:Lora,Georgia,serif;font-size:22px;font-weight:600}._headerRight_rzq1u_28{align-items:center;display:flex;flex-shrink:0;gap:8px}._subtitle_rzq1u_35{color:#9ca3af;font-size:12px;letter-spacing:.3px;margin-top:6px}._hairline_rzq1u_42{background:linear-gradient(90deg,#e5b635,#0000 70%);border:0;height:1px;margin:6px 0 22px}._grid_1ypoi_1{display:grid;gap:18px 22px;grid-template-columns:1fr 1fr}@media (width<=640px){._grid_1ypoi_1{grid-template-columns:1fr}}._field_1wk7n_1{display:flex;flex-direction:column;gap:6px;min-width:0}._full_1wk7n_8{grid-column:1/-1}._label_1wk7n_12{color:#374151;font-size:12px;font-weight:500;letter-spacing:.2px}._req_1wk7n_19{color:#b8881a}._actions_fpjnj_1{background:#fff;border-radius:0 0 14px 14px;border-top:1px solid #e5e7eb;bottom:0;box-shadow:0 -4px 16px #0f24400a;display:flex;gap:10px;justify-content:flex-end;margin:26px -32px -32px;padding:16px 32px;position:sticky}@media (width<=640px){._actions_fpjnj_1{flex-direction:column-reverse;margin:20px -18px -18px;padding:14px 18px}._actions_fpjnj_1>*{width:100%}}._section_v562g_1{margin-top:8px}._header_v562g_5{align-items:center;background:0 0;border:0;border-top:1px solid #e5e7eb;cursor:pointer;display:flex;justify-content:space-between;padding:14px 0 10px;position:relative;width:100%}._header_v562g_5:before{background:#d4a01e;content:\"\";height:1px;left:0;position:absolute;top:-1px;width:48px}._title_v562g_27{align-items:center;color:#0f2440;display:flex;font-family:Lora,Georgia,serif;font-size:14.5px;font-weight:600;gap:10px;letter-spacing:.2px}._title_v562g_27 svg{color:#b8881a}._chevron_v562g_41{color:#9ca3af;display:flex;transition:transform .2s}._open_v562g_47{transform:rotate(180deg)}._body_v562g_51{display:grid;gap:16px 22px;grid-template-columns:1fr 1fr;padding-top:16px}@media (width<=640px){._body_v562g_51{grid-template-columns:1fr}}._input_pzmln_1{background:#fff;border:1px solid #d1d5db;border-radius:6px;box-sizing:border-box;color:#111827;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13.5px;padding:11px 13px;transition:all .18s;width:100%}._input_pzmln_1:focus{border-color:#d4a01e;box-shadow:0 0 0 3px #d4a01e1f;outline:0}._input_pzmln_1:read-only,._input_pzmln_1:read-only:focus{background:#f9fafb;border-color:#e5e7eb;box-shadow:none;color:#6b7280;cursor:default}._input_pzmln_1:-ms-input-placeholder{color:#9ca3af}._input_pzmln_1::placeholder{color:#9ca3af}._textarea_ps7q9_1{background:#fff;border:1px solid #d1d5db;border-radius:6px;box-sizing:border-box;color:#111827;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13.5px;min-height:80px;padding:11px 13px;resize:vertical;transition:all .18s;width:100%}._textarea_ps7q9_1:focus{border-color:#d4a01e;box-shadow:0 0 0 3px #d4a01e1f;outline:0}._textarea_ps7q9_1:read-only,._textarea_ps7q9_1:read-only:focus{background:#f9fafb;border-color:#e5e7eb;box-shadow:none;color:#6b7280;cursor:default}._textarea_ps7q9_1:-ms-input-placeholder{color:#9ca3af}._textarea_ps7q9_1::placeholder{color:#9ca3af}._select_pfqjp_1{appearance:none;background-color:#fff;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m1 1.5 5 5 5-5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 12px center;background-repeat:no-repeat;border:1px solid #d1d5db;border-radius:6px;box-sizing:border-box;color:#111827;cursor:pointer;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13.5px;padding:11px 36px 11px 13px;transition:all .18s;width:100%}._select_pfqjp_1:focus{border-color:#d4a01e;box-shadow:0 0 0 3px #d4a01e1f;outline:0}._select_pfqjp_1:disabled,._select_pfqjp_1:disabled:focus{background:#f9fafb;border-color:#e5e7eb;box-shadow:none;color:#6b7280;cursor:default}._wrap_2wriw_1{align-items:center;cursor:pointer;display:inline-flex;gap:10px;padding:6px 0}._input_2wriw_9{height:0;opacity:0;position:absolute;width:0}._track_2wriw_16{background:#d1d5db;border-radius:11px;flex-shrink:0;height:22px;position:relative;transition:background .18s;width:40px}._thumb_2wriw_26{background:#fff;border-radius:50%;box-shadow:0 1px 2px #0f24400a,0 1px 3px #0f24400f;height:18px;left:2px;position:absolute;top:2px;transition:transform .18s;width:18px}._input_2wriw_9:checked+._track_2wriw_16{background:#d4a01e}._input_2wriw_9:checked+._track_2wriw_16 ._thumb_2wriw_26{transform:translate(18px)}._input_2wriw_9:focus-visible+._track_2wriw_16{box-shadow:0 0 0 3px #d4a01e40}._input_2wriw_9:disabled+._track_2wriw_16{cursor:default;opacity:.5}._input_2wriw_9:disabled~._text_2wriw_55{color:#9ca3af}._text_2wriw_55{color:#374151;font-size:13px}._zone_m7ku4_1{align-items:center;border:1.5px dashed #d1d5db;border-radius:10px;color:#9ca3af;cursor:pointer;display:flex;font-size:12.5px;gap:10px;justify-content:center;padding:24px;transition:all .18s}._zone_m7ku4_1._over_m7ku4_14,._zone_m7ku4_1:hover{background:#fefbf0;border-color:#d4a01e;color:#b8881a}._hidden_m7ku4_20{display:none}._list_m7ku4_24{display:flex;flex-direction:column;gap:6px;list-style:none;margin:10px 0 0;padding:0}._item_m7ku4_33{align-items:center;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;color:#374151;display:flex;font-size:13px;gap:10px;padding:8px 12px}._name_m7ku4_45{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._size_m7ku4_53{color:#9ca3af;flex-shrink:0;font-size:11.5px}._remove_m7ku4_59{background:0 0;border:0;color:#9ca3af;cursor:pointer;display:inline-flex;flex-shrink:0;padding:2px}._remove_m7ku4_59:hover{color:#dc2626}._list_16ms4_1{display:flex;flex-direction:column;gap:6px;list-style:none;margin:0;padding:0}._item_16ms4_10{align-items:center;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;display:flex;font-size:13px;gap:10px;padding:8px 12px}._link_16ms4_21{color:#244b73;flex:1;min-width:0;text-decoration:none}._link_16ms4_21:hover{color:#b8881a;text-decoration:underline}._removeBtn_16ms4_32{align-items:center;background:#fff;border:1px solid #d1d5db;border-radius:6px;color:#6b7280;cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;padding:0;transition:all .16s;width:26px}._removeBtn_16ms4_32:hover{border-color:#dc2626;color:#dc2626}._empty_16ms4_52{color:#6b7280;font-size:13px}._overlay_1bmoc_1{align-items:center;animation:_overlayIn_1bmoc_1 .14s ease-out;background:#0a1b308c;display:flex;font-family:Inter,-apple-system,Segoe UI,sans-serif;inset:0;justify-content:center;padding:24px;position:fixed;z-index:999997}._card_1bmoc_14{animation:_cardIn_1bmoc_1 .16s ease-out;background:#fff;border-radius:14px;box-shadow:0 24px 70px #0a1b3040;box-sizing:border-box;max-width:440px;padding:20px 20px 16px;width:100%}._title_1bmoc_25{color:#0a1b30;font-family:Lora,Georgia,serif;font-size:22px;font-weight:600}._message_1bmoc_32{color:#374151;font-size:13px;line-height:1.5;margin-top:8px}._actions_1bmoc_39{display:flex;gap:8px;justify-content:flex-end;margin-top:20px}._cancelBtn_1bmoc_46{background:#fff;border:1px solid #d1d5db;border-radius:6px;color:#1b3a5c;cursor:pointer;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13px;padding:9px 18px;transition:all .15s}._cancelBtn_1bmoc_46:hover{border-color:#e5b635}._confirmBtn_1bmoc_61{background:linear-gradient(135deg,#e5b635,#d4a01e);border:1px solid #d4a01e;color:#0a1b30;font-weight:600}._confirmBtn_1bmoc_61:hover{box-shadow:0 4px 20px #d4a01e2e;transform:translateY(-1px)}._confirmBtn_1bmoc_61{border-radius:6px;cursor:pointer;font-size:13px;padding:9px 18px}._confirmDanger_1bmoc_78{background:#dc2626;border:0;border-radius:6px;color:#fff;cursor:pointer;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13px;padding:9px 18px;transition:all .15s}._confirmDanger_1bmoc_78:hover{filter:brightness(.94)}@keyframes _overlayIn_1bmoc_1{0%{opacity:0}to{opacity:1}}@keyframes _cardIn_1bmoc_1{0%{opacity:0;transform:translateY(8px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}._layout_vc8am_1{align-items:stretch;display:flex;font-family:Inter,-apple-system,Segoe UI,sans-serif;min-height:78vh;width:100%}._side_vc8am_9{display:flex;flex:none}._main_vc8am_14{display:flex;flex:auto;flex-direction:column;min-width:0;padding:20px 24px 32px}._mobileBar_vc8am_22{display:none;margin-bottom:16px}@media (width<=768px){._layout_vc8am_1{min-height:0}._mobileBar_vc8am_22{display:block}._main_vc8am_14{padding:16px}}._tabs_w5rn3_1{align-items:stretch;border-bottom:1px solid #e5e7eb;display:flex;gap:8px;overflow-x:auto}._tab_w5rn3_1{align-items:center;background:0 0;border:0;border-bottom:2px solid #0000;color:#6b7280;cursor:pointer;display:inline-flex;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13px;font-weight:500;gap:8px;letter-spacing:.2px;padding:12px 16px;transition:color .18s,border-color .18s;white-space:nowrap}._tab_w5rn3_1:hover{color:#1b3a5c}._active_w5rn3_30{border-bottom-color:#d4a01e;color:#0f2440;font-weight:600}._count_w5rn3_36{color:#9ca3af;font-weight:500}._stepper_1tzrv_1{align-items:flex-start;display:flex;font-family:Inter,-apple-system,Segoe UI,sans-serif;overflow-x:auto;padding:4px 0;width:100%}._step_1tzrv_1{align-items:center;background:0 0;border:0;cursor:pointer;display:flex;flex:none;flex-direction:column;gap:6px;padding:0}._step_1tzrv_1:disabled{cursor:default}._circle_1tzrv_25{align-items:center;background:#fff;border:1.5px solid #d1d5db;border-radius:100px;color:#6b7280;display:inline-flex;font-size:13px;font-weight:600;height:30px;justify-content:center;transition:all .18s;width:30px}._completed_1tzrv_40{background:#1b3a5c;border-color:#1b3a5c;color:#fff}._current_1tzrv_46{background:linear-gradient(135deg,#e5b635,#d4a01e);border-color:#d4a01e;box-shadow:0 4px 20px #d4a01e2e;color:#0a1b30}._connector_1tzrv_53{background:#e5e7eb;flex:auto;height:2px;margin-top:15px;min-width:24px}._label_1tzrv_61{color:#6b7280;font-size:11px;white-space:nowrap}._labelCurrent_1tzrv_67{color:#0f2440;font-weight:600}@media (width<=640px){._label_1tzrv_61{display:none}}._nav_1aclb_1{background:linear-gradient(135deg,#0a1b30,#1b3a5c 85%);box-shadow:inset -1px 0 #ffffff0f;display:flex;flex-direction:column;padding:16px 0 12px;transition:width .2s;width:248px}._navCollapsed_1aclb_11{width:64px}._head_1aclb_15{align-items:center;border-bottom:1px solid #ffffff14;display:flex;gap:8px;justify-content:space-between;padding:0 16px 16px}._navCollapsed_1aclb_11 ._head_1aclb_15{flex-direction:column;gap:12px;padding:0 0 12px}._brand_1aclb_30{align-items:center;display:flex;gap:8px;min-width:0}._brandText_1aclb_37{color:#fff;font-family:Lora,Georgia,serif;font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._toggle_1aclb_47{align-items:center;background:0 0;border:1px solid #ffffff2e;border-radius:6px;color:#fff9;cursor:pointer;display:inline-flex;flex-shrink:0;height:26px;justify-content:center;padding:0;transition:all .16s;width:26px}._toggle_1aclb_47:hover{border-color:#e5b635;color:#f0cc5e}._items_1aclb_67{display:flex;flex-direction:column;gap:2px;margin-top:16px}._navCollapsed_1aclb_11 ._items_1aclb_67{margin-top:12px}._item_1aclb_67{align-items:center;background:0 0;border:0;border-left:3px solid #0000;color:#ffffff9e;cursor:pointer;display:flex;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13.5px;font-weight:500;gap:12px;padding:12px 18px;position:relative;text-align:left;transition:color .18s,background .18s,border-color .18s;white-space:nowrap;width:100%}._item_1aclb_67:hover{background:#ffffff0a;color:#ffffffeb}._navCollapsed_1aclb_11 ._item_1aclb_67{justify-content:center;padding:12px 0}._itemActive_1aclb_107{background:#ffffff12;border-left-color:#d4a01e;color:#fff}._itemActive_1aclb_107 ._itemIcon_1aclb_112{color:#e5b635}._itemIcon_1aclb_112{color:inherit;display:inline-flex;flex-shrink:0}._itemTitle_1aclb_122{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}._badge_1aclb_129{background:#d4a01e;border-radius:100px;color:#0a1b30;flex-shrink:0;font-size:10.5px;font-weight:700;min-width:18px;padding:1px 6px;text-align:center}._navCollapsed_1aclb_11 ._badge_1aclb_129{position:absolute;right:8px;top:6px}._backdrop_1aclb_147{display:none}@media (width<=768px){._navCollapsed_1aclb_11,._nav_1aclb_1{bottom:0;left:0;position:fixed;top:0;transform:translate(-100%);transition:transform .25s;width:248px;z-index:1000}._navMobileOpen_1aclb_163{box-shadow:0 24px 70px #0a1b3040;transform:translate(0)}._toggle_1aclb_47{display:none}._backdrop_1aclb_147{background:#0a1b3073;display:block;inset:0;position:fixed;z-index:999}}@media (width<=350px){._navCollapsed_1aclb_11,._nav_1aclb_1{max-width:300px;width:86vw}}._toggle_1s269_1{align-items:center;background:#fff;border:1px solid #d1d5db;border-radius:6px;color:#1b3a5c;cursor:pointer;display:none;height:40px;justify-content:center;padding:0;transition:border-color .16s,color .16s;width:40px}._toggle_1s269_1:hover{border-color:#d4a01e;color:#0f2440}@media (width<=768px){._toggle_1s269_1{display:inline-flex}}._wrap_1q0gd_1{overflow-x:auto;width:100%}._table_1q0gd_6{border-collapse:collapse;font-family:Inter,-apple-system,Segoe UI,sans-serif;font-size:13px;width:100%}._table_1q0gd_6 th{border-bottom:1px solid #e5e7eb;color:#6b7280;font-size:10.5px;font-weight:600;letter-spacing:.6px;padding:10px 14px;text-align:left;text-transform:uppercase;white-space:nowrap}._table_1q0gd_6 td{border-bottom:1px solid #f3f4f6;color:#111827;padding:12px 14px;vertical-align:middle}._table_1q0gd_6 tbody tr:last-child td{border-bottom:0}._rowClickable_1q0gd_33{cursor:pointer;transition:background .14s}._rowClickable_1q0gd_33:hover{background:#f4f7fa}._rowClickable_1q0gd_33:focus-visible{outline:2px solid #e5b635;outline-offset:-2px}._empty_1q0gd_45{color:#9ca3af;padding:24px 14px;text-align:center}", true);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 779:
|
||
/*!************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/CtFormsPortalWebPart.js ***!
|
||
\************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
/* harmony export */ });
|
||
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ 196);
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 959);
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 398);
|
||
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
|
||
/* harmony import */ var _microsoft_sp_core_library__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @microsoft/sp-core-library */ 676);
|
||
/* harmony import */ var _microsoft_sp_core_library__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_microsoft_sp_core_library__WEBPACK_IMPORTED_MODULE_2__);
|
||
/* harmony import */ var _microsoft_sp_property_pane__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @microsoft/sp-property-pane */ 877);
|
||
/* harmony import */ var _microsoft_sp_property_pane__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_microsoft_sp_property_pane__WEBPACK_IMPORTED_MODULE_3__);
|
||
/* harmony import */ var _microsoft_sp_webpart_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @microsoft/sp-webpart-base */ 642);
|
||
/* harmony import */ var _microsoft_sp_webpart_base__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_microsoft_sp_webpart_base__WEBPACK_IMPORTED_MODULE_4__);
|
||
/* harmony import */ var CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! CtFormsPortalWebPartStrings */ 735);
|
||
/* harmony import */ var CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__);
|
||
/* harmony import */ var _components_CtFormsPortal__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/CtFormsPortal */ 263);
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
var CtFormsPortalWebPart = /** @class */ (function (_super) {
|
||
(0,tslib__WEBPACK_IMPORTED_MODULE_7__.__extends)(CtFormsPortalWebPart, _super);
|
||
function CtFormsPortalWebPart() {
|
||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||
_this._isDarkTheme = false;
|
||
_this._environmentMessage = '';
|
||
return _this;
|
||
}
|
||
CtFormsPortalWebPart.prototype.render = function () {
|
||
var element = react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_CtFormsPortal__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
||
description: this.properties.description,
|
||
isDarkTheme: this._isDarkTheme,
|
||
environmentMessage: this._environmentMessage,
|
||
hasTeamsContext: !!this.context.sdks.microsoftTeams,
|
||
userDisplayName: this.context.pageContext.user.displayName,
|
||
context: this.context
|
||
});
|
||
react_dom__WEBPACK_IMPORTED_MODULE_1__.render(element, this.domElement);
|
||
};
|
||
CtFormsPortalWebPart.prototype.onInit = function () {
|
||
var _this = this;
|
||
return this._getEnvironmentMessage().then(function (message) {
|
||
_this._environmentMessage = message;
|
||
});
|
||
};
|
||
CtFormsPortalWebPart.prototype._getEnvironmentMessage = function () {
|
||
var _this = this;
|
||
if (!!this.context.sdks.microsoftTeams) { // running in Teams, office.com or Outlook
|
||
return this.context.sdks.microsoftTeams.teamsJs.app.getContext()
|
||
.then(function (context) {
|
||
var environmentMessage = '';
|
||
switch (context.app.host.name) {
|
||
case 'Office': // running in Office
|
||
environmentMessage = _this.context.isServedFromLocalhost ? CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.AppLocalEnvironmentOffice : CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.AppOfficeEnvironment;
|
||
break;
|
||
case 'Outlook': // running in Outlook
|
||
environmentMessage = _this.context.isServedFromLocalhost ? CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.AppLocalEnvironmentOutlook : CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.AppOutlookEnvironment;
|
||
break;
|
||
case 'Teams': // running in Teams
|
||
case 'TeamsModern':
|
||
environmentMessage = _this.context.isServedFromLocalhost ? CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.AppLocalEnvironmentTeams : CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.AppTeamsTabEnvironment;
|
||
break;
|
||
default:
|
||
environmentMessage = CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.UnknownEnvironment;
|
||
}
|
||
return environmentMessage;
|
||
});
|
||
}
|
||
return Promise.resolve(this.context.isServedFromLocalhost ? CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.AppLocalEnvironmentSharePoint : CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.AppSharePointEnvironment);
|
||
};
|
||
CtFormsPortalWebPart.prototype.onThemeChanged = function (currentTheme) {
|
||
if (!currentTheme) {
|
||
return;
|
||
}
|
||
this._isDarkTheme = !!currentTheme.isInverted;
|
||
var semanticColors = currentTheme.semanticColors;
|
||
if (semanticColors) {
|
||
this.domElement.style.setProperty('--bodyText', semanticColors.bodyText || null);
|
||
this.domElement.style.setProperty('--link', semanticColors.link || null);
|
||
this.domElement.style.setProperty('--linkHovered', semanticColors.linkHovered || null);
|
||
}
|
||
};
|
||
CtFormsPortalWebPart.prototype.onDispose = function () {
|
||
react_dom__WEBPACK_IMPORTED_MODULE_1__.unmountComponentAtNode(this.domElement);
|
||
};
|
||
Object.defineProperty(CtFormsPortalWebPart.prototype, "dataVersion", {
|
||
get: function () {
|
||
return _microsoft_sp_core_library__WEBPACK_IMPORTED_MODULE_2__.Version.parse('1.0');
|
||
},
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
CtFormsPortalWebPart.prototype.getPropertyPaneConfiguration = function () {
|
||
return {
|
||
pages: [
|
||
{
|
||
header: {
|
||
description: CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.PropertyPaneDescription
|
||
},
|
||
groups: [
|
||
{
|
||
groupName: CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.BasicGroupName,
|
||
groupFields: [
|
||
(0,_microsoft_sp_property_pane__WEBPACK_IMPORTED_MODULE_3__.PropertyPaneTextField)('description', {
|
||
label: CtFormsPortalWebPartStrings__WEBPACK_IMPORTED_MODULE_5__.DescriptionFieldLabel
|
||
})
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
};
|
||
};
|
||
return CtFormsPortalWebPart;
|
||
}(_microsoft_sp_webpart_base__WEBPACK_IMPORTED_MODULE_4__.BaseClientSideWebPart));
|
||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CtFormsPortalWebPart);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 263:
|
||
/*!****************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/CtFormsPortal.js ***!
|
||
\****************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
/* harmony export */ });
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 959);
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony import */ var _tnsu_ui_kit_styles_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tnsu/ui-kit/styles.css */ 943);
|
||
/* harmony import */ var _tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tnsu/ui-kit */ 658);
|
||
/* harmony import */ var _CtFormsPortal_module_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CtFormsPortal.module.scss */ 945);
|
||
/* harmony import */ var _Dashboard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Dashboard */ 499);
|
||
|
||
|
||
|
||
|
||
|
||
// Корень веб-парта: спрайт иконок (один раз) + дашборд-реестр.
|
||
// Импорт CtFormsPortal.module.scss обязателен — в нём :global full-width правила канвы.
|
||
var CtFormsPortal = function (props) { return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _CtFormsPortal_module_scss__WEBPACK_IMPORTED_MODULE_2__["default"].root },
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.IconSprite, null),
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_Dashboard__WEBPACK_IMPORTED_MODULE_3__.Dashboard, { context: props.context }))); };
|
||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CtFormsPortal);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 499:
|
||
/*!************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/Dashboard.js ***!
|
||
\************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ Dashboard: () => (/* binding */ Dashboard)
|
||
/* harmony export */ });
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 959);
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony import */ var _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dashboard.module.scss */ 9);
|
||
/* harmony import */ var _tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tnsu/ui-kit */ 658);
|
||
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./config */ 274);
|
||
/* harmony import */ var _registry_useDocumentDashboard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./registry/useDocumentDashboard */ 169);
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// Иконка сайдбара по типу (kit-иконки; Fluent-иконки из конфигов тут не используем).
|
||
var TYPE_ICON = { ct: 'clipboard', oid: 'chart', kps: 'building' };
|
||
// Цвет статуса DashboardRow → вариант нашего Badge (error → danger).
|
||
var VARIANT_MAP = {
|
||
neutral: 'neutral',
|
||
info: 'info',
|
||
success: 'success',
|
||
error: 'danger'
|
||
};
|
||
function formatDate(iso) {
|
||
if (!iso)
|
||
return '';
|
||
var d = new Date(iso);
|
||
var dd = d.getDate() < 10 ? "0".concat(d.getDate()) : "".concat(d.getDate());
|
||
var mm = d.getMonth() + 1 < 10 ? "0".concat(d.getMonth() + 1) : "".concat(d.getMonth() + 1);
|
||
return "".concat(dd, ".").concat(mm, ".").concat(d.getFullYear());
|
||
}
|
||
// Дашборд-реестр (config-driven, данные из SharePoint). Оболочка и элементы — из @tnsu/ui-kit.
|
||
var Dashboard = function (_a) {
|
||
var _b;
|
||
var context = _a.context;
|
||
var _c = (0,_registry_useDocumentDashboard__WEBPACK_IMPORTED_MODULE_3__.useDocumentDashboard)(context, _config__WEBPACK_IMPORTED_MODULE_2__.DOCUMENT_TYPES), myDocs = _c.myDocs, approvedDocs = _c.approvedDocs, pendingDocs = _c.pendingDocs, isLoading = _c.isLoading, error = _c.error;
|
||
var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(_config__WEBPACK_IMPORTED_MODULE_2__.DOCUMENT_TYPES[0].typeKey), activeType = _d[0], setActiveType = _d[1];
|
||
var _e = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('pending'), queue = _e[0], setQueue = _e[1];
|
||
var _f = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), collapsed = _f[0], setCollapsed = _f[1];
|
||
var _g = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), mobileOpen = _g[0], setMobileOpen = _g[1];
|
||
var _h = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''), search = _h[0], setSearch = _h[1];
|
||
var _j = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''), status = _j[0], setStatus = _j[1];
|
||
var cfg = _config__WEBPACK_IMPORTED_MODULE_2__.DOCUMENT_TYPES.filter(function (t) { return t.typeKey === activeType; })[0];
|
||
var byType = function (arr) { return arr.filter(function (r) { return r.typeKey === activeType; }); };
|
||
var pendingForType = byType(pendingDocs);
|
||
var mineForType = byType(myDocs);
|
||
var approvedForType = byType(approvedDocs);
|
||
var sidebarItems = _config__WEBPACK_IMPORTED_MODULE_2__.DOCUMENT_TYPES.map(function (t) {
|
||
var _a;
|
||
return ({
|
||
id: t.typeKey,
|
||
title: t.typeLabel,
|
||
icon: (_a = TYPE_ICON[t.typeKey]) !== null && _a !== void 0 ? _a : 'document',
|
||
count: pendingDocs.filter(function (r) { return r.typeKey === t.typeKey; }).length
|
||
});
|
||
});
|
||
var tabs = [
|
||
{ id: 'pending', label: 'На согласовании у меня', count: pendingForType.length },
|
||
{ id: 'mine', label: 'Инициализированные мной', count: mineForType.length },
|
||
{ id: 'approved', label: 'Согласованные мной', count: approvedForType.length }
|
||
];
|
||
var activeRows = queue === 'pending' ? pendingForType : queue === 'mine' ? mineForType : approvedForType;
|
||
var statusOptions = Array.from(new Set(activeRows.map(function (r) { return r.statusLabel; }))).map(function (s) { return ({
|
||
value: s,
|
||
label: s
|
||
}); });
|
||
var rows = activeRows
|
||
.filter(function (r) { var _a; return !search || "".concat(r.title, " ").concat((_a = r.subtitle) !== null && _a !== void 0 ? _a : '').toLowerCase().indexOf(search.toLowerCase()) !== -1; })
|
||
.filter(function (r) { return !status || r.statusLabel === status; });
|
||
var renderCell = function (row, key) {
|
||
var _a;
|
||
if (key === 'status') {
|
||
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.Badge, { variant: VARIANT_MAP[row.statusVariant], size: "sm" }, row.statusLabel));
|
||
}
|
||
if (key === 'created')
|
||
return formatDate(row.createdDate);
|
||
return String((_a = row[key]) !== null && _a !== void 0 ? _a : '');
|
||
};
|
||
var columns = cfg.columns.map(function (c) { return ({
|
||
key: c.key,
|
||
title: c.label,
|
||
width: c.minWidth ? "".concat(c.minWidth, "px") : undefined,
|
||
render: function (row) { return renderCell(row, c.key); }
|
||
}); });
|
||
var selectType = function (id) {
|
||
setActiveType(String(id));
|
||
setQueue('pending');
|
||
setSearch('');
|
||
setStatus('');
|
||
};
|
||
return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.AppLayout, { sidebar: react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.Sidebar, { items: sidebarItems, activeId: activeType, onChange: selectType, brand: "\u0414\u043E\u0433\u043E\u0432\u043E\u0440\u0430", collapsed: collapsed, onToggleCollapsed: function () { return setCollapsed(function (c) { return !c; }); }, mobileOpen: mobileOpen, onMobileClose: function () { return setMobileOpen(false); } }), mobileToggle: react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.SidebarToggle, { onClick: function () { return setMobileOpen(true); } }) },
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__["default"].head },
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement("h2", { className: _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__["default"].title }, cfg.typeLabel),
|
||
cfg.createNewUrl && (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.Button, { variant: "accent", onClick: function () { return window.open(cfg.createNewUrl, '_blank'); } }, (_b = cfg.createNewLabel) !== null && _b !== void 0 ? _b : 'Создать'))),
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__["default"].toolbar },
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__["default"].search },
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.TextInput, { value: search, onChange: setSearch, placeholder: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043D\u043E\u043C\u0435\u0440\u0443 \u0438\u043B\u0438 \u043F\u0440\u043E\u0435\u043A\u0442\u0443" })),
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__["default"].filter },
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.Select, { value: status, onChange: setStatus, options: statusOptions, placeholder: "\u0412\u0441\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B" }))),
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.Tabs, { tabs: tabs, activeId: queue, onChange: function (id) { return setQueue(id); } }),
|
||
error && (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__["default"].state },
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.Alert, { variant: "err" },
|
||
"\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435: ",
|
||
error))),
|
||
!error && isLoading && react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__["default"].state }, "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\u2026"),
|
||
!error && !isLoading && (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: _Dashboard_module_scss__WEBPACK_IMPORTED_MODULE_1__["default"].tableWrap },
|
||
react__WEBPACK_IMPORTED_MODULE_0__.createElement(_tnsu_ui_kit__WEBPACK_IMPORTED_MODULE_4__.DataTable, { columns: columns, rows: rows, rowKey: function (r) { return "".concat(r.typeKey, "-").concat(r.id); }, onRowClick: function (r) { return window.open(cfg.buildLinkUrl(r), '_blank'); }, emptyText: "\u041D\u0435\u0442 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432" })))));
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 996:
|
||
/*!**************************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/config/ctDocumentConfig.js ***!
|
||
\**************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ createCtDocumentConfig: () => (/* binding */ createCtDocumentConfig)
|
||
/* harmony export */ });
|
||
var STATUS_LABEL = {
|
||
'Черновик': 'Сформирована',
|
||
'На согласовании': 'На согласовании',
|
||
'Согласовано': 'Согласована',
|
||
'Отклонено': 'Отклонена'
|
||
};
|
||
var STATUS_VARIANT = {
|
||
'Черновик': 'neutral',
|
||
'На согласовании': 'info',
|
||
'Согласовано': 'success',
|
||
'Отклонено': 'error'
|
||
};
|
||
function createCtDocumentConfig() {
|
||
return {
|
||
typeKey: 'ct',
|
||
typeLabel: 'СТ ОМТС',
|
||
icon: 'ShoppingCart',
|
||
// Списки СТ ОМТС — на сайте СЭД. Явно, чтобы портал не зависел от места размещения.
|
||
siteUrl: 'https://tnsukz.sharepoint.com/sites/sed',
|
||
myDocsListName: 'Сравнительная таблица',
|
||
buildMyDocsFilter: function (userId) { return "AuthorId eq ".concat(userId); },
|
||
myDocsSelect: 'Id,Title,number,project,status,Created',
|
||
pendingApproval: {
|
||
approvalListName: 'Согласование СТ',
|
||
buildPendingFilter: function (userId) { return "aproover/Id eq ".concat(userId, " and status eq '\u041D\u0430 \u0441\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0438'"); },
|
||
approvalSelect: 'Id,CTId,status,aproover/Id',
|
||
approvalExpand: 'aproover',
|
||
parentIdField: 'CTId',
|
||
buildParentQuery: function (parentIds) { return ({
|
||
listName: 'Сравнительная таблица',
|
||
filter: parentIds.map(function (id) { return "Id eq ".concat(id); }).join(' or '),
|
||
select: 'Id,Title,number,project,status,Created'
|
||
}); }
|
||
},
|
||
approvedByMe: {
|
||
approvalListName: 'Согласование СТ',
|
||
buildPendingFilter: function (userId) { return "aproover/Id eq ".concat(userId, " and status eq '\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u043E'"); },
|
||
approvalSelect: 'Id,CTId,status,aproover/Id',
|
||
approvalExpand: 'aproover',
|
||
parentIdField: 'CTId',
|
||
buildParentQuery: function (parentIds) { return ({
|
||
listName: 'Сравнительная таблица',
|
||
filter: parentIds.map(function (id) { return "Id eq ".concat(id); }).join(' or '),
|
||
select: 'Id,Title,number,project,status,Created'
|
||
}); }
|
||
},
|
||
buildLinkUrl: function (row) {
|
||
var base = 'https://tnsukz.sharepoint.com/sites/sed/SitePages/Сравнительная-таблица.aspx';
|
||
var param = row.status === 'Черновик' ? 'ctId' : 'ctid';
|
||
return "".concat(base, "?").concat(param, "=").concat(row.id);
|
||
},
|
||
createNewUrl: 'https://tnsukz.sharepoint.com/sites/sed/SitePages/Сравнительная-таблица.aspx',
|
||
createNewLabel: 'Создать новую форму СТ',
|
||
mapItem: function (raw) {
|
||
var _a, _b, _c, _d, _e;
|
||
var spStatus = String((_a = raw['status']) !== null && _a !== void 0 ? _a : '');
|
||
return {
|
||
typeKey: 'ct',
|
||
id: String(raw['Id']),
|
||
title: "\u0421\u0422 \u2116".concat((_b = raw['number']) !== null && _b !== void 0 ? _b : raw['Title']),
|
||
subtitle: String((_c = raw['project']) !== null && _c !== void 0 ? _c : ''),
|
||
status: spStatus,
|
||
statusLabel: (_d = STATUS_LABEL[spStatus]) !== null && _d !== void 0 ? _d : spStatus,
|
||
statusVariant: (_e = STATUS_VARIANT[spStatus]) !== null && _e !== void 0 ? _e : 'neutral',
|
||
createdDate: raw['Created'] ? String(raw['Created']) : undefined
|
||
};
|
||
},
|
||
columns: [
|
||
{ key: 'title', label: 'Номер СТ', minWidth: 120 },
|
||
{ key: 'subtitle', label: 'Проект', minWidth: 180 },
|
||
{ key: 'status', label: 'Статус', minWidth: 130 },
|
||
{ key: 'created', label: 'Создана', minWidth: 110 }
|
||
]
|
||
};
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 274:
|
||
/*!***************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/config/index.js ***!
|
||
\***************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ DOCUMENT_TYPES: () => (/* binding */ DOCUMENT_TYPES)
|
||
/* harmony export */ });
|
||
/* harmony import */ var _ctDocumentConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ctDocumentConfig */ 996);
|
||
/* harmony import */ var _oidDocumentConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./oidDocumentConfig */ 633);
|
||
/* harmony import */ var _kpsDocumentConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./kpsDocumentConfig */ 257);
|
||
|
||
|
||
|
||
// Все типы документов портала. Добавить тип = добавить конфиг сюда.
|
||
var DOCUMENT_TYPES = [
|
||
(0,_ctDocumentConfig__WEBPACK_IMPORTED_MODULE_0__.createCtDocumentConfig)(),
|
||
(0,_oidDocumentConfig__WEBPACK_IMPORTED_MODULE_1__.createOidDocumentConfig)(),
|
||
(0,_kpsDocumentConfig__WEBPACK_IMPORTED_MODULE_2__.createKpsDocumentConfig)()
|
||
];
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 257:
|
||
/*!***************************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/config/kpsDocumentConfig.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ createKpsDocumentConfig: () => (/* binding */ createKpsDocumentConfig)
|
||
/* harmony export */ });
|
||
var KPS_SITE_URL = 'https://tnsukz.sharepoint.com/sites/kps';
|
||
var KPS_FORM_PAGE = "".concat(KPS_SITE_URL, "/SitePages/\u0421\u0440\u0430\u0432\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F-\u0442\u0430\u0431\u043B\u0438\u0446\u0430.aspx");
|
||
var STATUS_LABEL = {
|
||
'Черновик': 'Сформирована',
|
||
'На согласовании': 'На согласовании',
|
||
'Согласовано': 'Согласована',
|
||
'Отклонено': 'Отклонена'
|
||
};
|
||
var STATUS_VARIANT = {
|
||
'Черновик': 'neutral',
|
||
'На согласовании': 'info',
|
||
'Согласовано': 'success',
|
||
'Отклонено': 'error'
|
||
};
|
||
function createKpsDocumentConfig() {
|
||
return {
|
||
typeKey: 'kps',
|
||
typeLabel: 'СТ КПС',
|
||
icon: 'Processing',
|
||
// Списки КПС — на отдельном сайт-коллекшене /sites/kps.
|
||
siteUrl: KPS_SITE_URL,
|
||
myDocsListName: 'Сравнительная таблица',
|
||
buildMyDocsFilter: function (userId) { return "AuthorId eq ".concat(userId); },
|
||
myDocsSelect: 'Id,Title,number,project,status,Created',
|
||
pendingApproval: {
|
||
approvalListName: 'Согласование СТ',
|
||
buildPendingFilter: function (userId) { return "aproover/Id eq ".concat(userId, " and status eq '\u041D\u0430 \u0441\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0438'"); },
|
||
approvalSelect: 'Id,CTId,status,aproover/Id',
|
||
approvalExpand: 'aproover',
|
||
parentIdField: 'CTId',
|
||
buildParentQuery: function (parentIds) { return ({
|
||
listName: 'Сравнительная таблица',
|
||
filter: parentIds.map(function (id) { return "Id eq ".concat(id); }).join(' or '),
|
||
select: 'Id,Title,number,project,status,Created'
|
||
}); }
|
||
},
|
||
approvedByMe: {
|
||
approvalListName: 'Согласование СТ',
|
||
buildPendingFilter: function (userId) { return "aproover/Id eq ".concat(userId, " and status eq '\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u043E'"); },
|
||
approvalSelect: 'Id,CTId,status,aproover/Id',
|
||
approvalExpand: 'aproover',
|
||
parentIdField: 'CTId',
|
||
buildParentQuery: function (parentIds) { return ({
|
||
listName: 'Сравнительная таблица',
|
||
filter: parentIds.map(function (id) { return "Id eq ".concat(id); }).join(' or '),
|
||
select: 'Id,Title,number,project,status,Created'
|
||
}); }
|
||
},
|
||
buildLinkUrl: function (row) {
|
||
var param = row.status === 'Черновик' ? 'ctId' : 'ctid';
|
||
return "".concat(KPS_FORM_PAGE, "?").concat(param, "=").concat(row.id);
|
||
},
|
||
createNewUrl: KPS_FORM_PAGE,
|
||
createNewLabel: 'Создать новую форму КПС',
|
||
mapItem: function (raw) {
|
||
var _a, _b, _c, _d, _e;
|
||
var spStatus = String((_a = raw['status']) !== null && _a !== void 0 ? _a : '');
|
||
return {
|
||
typeKey: 'kps',
|
||
id: String(raw['Id']),
|
||
title: "\u0421\u0422 \u2116".concat((_b = raw['number']) !== null && _b !== void 0 ? _b : raw['Title']),
|
||
subtitle: String((_c = raw['project']) !== null && _c !== void 0 ? _c : ''),
|
||
status: spStatus,
|
||
statusLabel: (_d = STATUS_LABEL[spStatus]) !== null && _d !== void 0 ? _d : spStatus,
|
||
statusVariant: (_e = STATUS_VARIANT[spStatus]) !== null && _e !== void 0 ? _e : 'neutral',
|
||
createdDate: raw['Created'] ? String(raw['Created']) : undefined
|
||
};
|
||
},
|
||
columns: [
|
||
{ key: 'title', label: 'Номер СТ', minWidth: 120 },
|
||
{ key: 'subtitle', label: 'Проект', minWidth: 180 },
|
||
{ key: 'status', label: 'Статус', minWidth: 130 },
|
||
{ key: 'created', label: 'Создана', minWidth: 110 }
|
||
]
|
||
};
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 633:
|
||
/*!***************************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/config/oidDocumentConfig.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ createOidDocumentConfig: () => (/* binding */ createOidDocumentConfig)
|
||
/* harmony export */ });
|
||
var STATUS_LABEL = {
|
||
'Черновик': 'Сформирована',
|
||
'formed': 'Сформирована',
|
||
'На согласовании': 'На согласовании',
|
||
'on_approval': 'На согласовании',
|
||
'Согласовано': 'Согласована',
|
||
'approved': 'Согласована',
|
||
'Отклонено': 'Отклонена'
|
||
};
|
||
var STATUS_VARIANT = {
|
||
'Черновик': 'neutral',
|
||
'formed': 'neutral',
|
||
'На согласовании': 'info',
|
||
'on_approval': 'info',
|
||
'Согласовано': 'success',
|
||
'approved': 'success',
|
||
'Отклонено': 'error'
|
||
};
|
||
function createOidDocumentConfig() {
|
||
return {
|
||
typeKey: 'oid',
|
||
typeLabel: 'СТ ОИД',
|
||
icon: 'CRMServices',
|
||
// Списки СТ ОИД — на сайте СЭД. Явно, чтобы портал не зависел от места размещения.
|
||
siteUrl: 'https://tnsukz.sharepoint.com/sites/sed',
|
||
myDocsListName: 'Сравнительная таблица ОИД',
|
||
buildMyDocsFilter: function (userId) { return "AuthorId eq ".concat(userId); },
|
||
myDocsSelect: 'Id,Title,number,project,status,Created',
|
||
pendingApproval: {
|
||
approvalListName: 'Согласование СТ ОИД',
|
||
buildPendingFilter: function (userId) { return "aproover/Id eq ".concat(userId, " and status eq '\u041D\u0430 \u0441\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u0438\u0438'"); },
|
||
approvalSelect: 'Id,CTId,status,aproover/Id',
|
||
approvalExpand: 'aproover',
|
||
parentIdField: 'CTId',
|
||
buildParentQuery: function (parentIds) { return ({
|
||
listName: 'Сравнительная таблица ОИД',
|
||
filter: parentIds.map(function (id) { return "Id eq ".concat(id); }).join(' or '),
|
||
select: 'Id,Title,number,project,status,Created'
|
||
}); }
|
||
},
|
||
approvedByMe: {
|
||
approvalListName: 'Согласование СТ ОИД',
|
||
buildPendingFilter: function (userId) { return "aproover/Id eq ".concat(userId, " and status eq '\u0421\u043E\u0433\u043B\u0430\u0441\u043E\u0432\u0430\u043D\u043E'"); },
|
||
approvalSelect: 'Id,CTId,status,aproover/Id',
|
||
approvalExpand: 'aproover',
|
||
parentIdField: 'CTId',
|
||
buildParentQuery: function (parentIds) { return ({
|
||
listName: 'Сравнительная таблица ОИД',
|
||
filter: parentIds.map(function (id) { return "Id eq ".concat(id); }).join(' or '),
|
||
select: 'Id,Title,number,project,status,Created'
|
||
}); }
|
||
},
|
||
buildLinkUrl: function (row) {
|
||
var base = 'https://tnsukz.sharepoint.com/sites/sed/SitePages/Сравнительная-таблица-ОИД.aspx';
|
||
var param = row.status === 'Черновик' || row.status === 'formed' ? 'oidId' : 'oidid';
|
||
return "".concat(base, "?").concat(param, "=").concat(row.id);
|
||
},
|
||
createNewUrl: 'https://tnsukz.sharepoint.com/sites/sed/SitePages/Сравнительная-таблица-ОИД.aspx',
|
||
createNewLabel: 'Создать новую форму ОИД',
|
||
mapItem: function (raw) {
|
||
var _a, _b, _c, _d, _e;
|
||
var spStatus = String((_a = raw['status']) !== null && _a !== void 0 ? _a : '');
|
||
return {
|
||
typeKey: 'oid',
|
||
id: String(raw['Id']),
|
||
title: "\u0421\u0422 \u2116".concat((_b = raw['number']) !== null && _b !== void 0 ? _b : raw['Title']),
|
||
subtitle: String((_c = raw['project']) !== null && _c !== void 0 ? _c : ''),
|
||
status: spStatus,
|
||
statusLabel: (_d = STATUS_LABEL[spStatus]) !== null && _d !== void 0 ? _d : spStatus,
|
||
statusVariant: (_e = STATUS_VARIANT[spStatus]) !== null && _e !== void 0 ? _e : 'neutral',
|
||
createdDate: raw['Created'] ? String(raw['Created']) : undefined
|
||
};
|
||
},
|
||
columns: [
|
||
{ key: 'title', label: 'Номер СТ', minWidth: 120 },
|
||
{ key: 'subtitle', label: 'Проект', minWidth: 180 },
|
||
{ key: 'status', label: 'Статус', minWidth: 130 },
|
||
{ key: 'created', label: 'Создана', minWidth: 110 }
|
||
]
|
||
};
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 406:
|
||
/*!****************************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/registry/documentsService.js ***!
|
||
\****************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ DocumentsService: () => (/* binding */ DocumentsService)
|
||
/* harmony export */ });
|
||
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ 196);
|
||
/* harmony import */ var _microsoft_sp_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microsoft/sp-http */ 909);
|
||
/* harmony import */ var _microsoft_sp_http__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microsoft_sp_http__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
||
|
||
// Загрузка реестра из SharePoint (перенесено из ct-forms-list/myDocuments).
|
||
// Поддерживает типы на разных сайт-коллекшенах (KPS на /sites/kps).
|
||
var DocumentsService = /** @class */ (function () {
|
||
function DocumentsService(context) {
|
||
this.context = context;
|
||
this.userIdCache = new Map();
|
||
}
|
||
Object.defineProperty(DocumentsService.prototype, "currentUserId", {
|
||
get: function () {
|
||
var _a;
|
||
return Number((_a = this.context.pageContext.legacyPageContext['userId']) !== null && _a !== void 0 ? _a : 0);
|
||
},
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
Object.defineProperty(DocumentsService.prototype, "webUrl", {
|
||
get: function () {
|
||
return this.context.pageContext.web.absoluteUrl;
|
||
},
|
||
enumerable: false,
|
||
configurable: true
|
||
});
|
||
DocumentsService.prototype.siteUrlFor = function (config) {
|
||
var _a;
|
||
return (_a = config.siteUrl) !== null && _a !== void 0 ? _a : this.webUrl;
|
||
};
|
||
DocumentsService.prototype.resolveUserId = function (config) {
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
||
var site, cached, response, json;
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
||
switch (_a.label) {
|
||
case 0:
|
||
site = this.siteUrlFor(config);
|
||
if (site === this.webUrl)
|
||
return [2 /*return*/, this.currentUserId];
|
||
cached = this.userIdCache.get(site);
|
||
if (cached !== undefined)
|
||
return [2 /*return*/, cached];
|
||
return [4 /*yield*/, this.context.spHttpClient.get("".concat(site, "/_api/web/currentUser?$select=Id"), _microsoft_sp_http__WEBPACK_IMPORTED_MODULE_0__.SPHttpClient.configurations.v1)];
|
||
case 1:
|
||
response = _a.sent();
|
||
if (!response.ok) {
|
||
throw new Error("\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0438\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u043D\u0430 \u0441\u0430\u0439\u0442\u0435 \"".concat(site, "\": ").concat(response.status));
|
||
}
|
||
return [4 /*yield*/, response.json()];
|
||
case 2:
|
||
json = _a.sent();
|
||
this.userIdCache.set(site, json.Id);
|
||
return [2 /*return*/, json.Id];
|
||
}
|
||
});
|
||
});
|
||
};
|
||
DocumentsService.prototype.buildListUrl = function (siteUrl, listName) {
|
||
return "".concat(siteUrl, "/_api/web/lists/getByTitle('").concat(listName, "')/items");
|
||
};
|
||
DocumentsService.prototype.fetchItems = function (siteUrl, listName, params) {
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
||
var q, url, response, json;
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
||
switch (_a.label) {
|
||
case 0:
|
||
q = [];
|
||
if (params.filter)
|
||
q.push("$filter=".concat(params.filter));
|
||
if (params.select)
|
||
q.push("$select=".concat(params.select));
|
||
if (params.expand)
|
||
q.push("$expand=".concat(params.expand));
|
||
if (params.orderby)
|
||
q.push("$orderby=".concat(params.orderby));
|
||
if (params.top !== undefined)
|
||
q.push("$top=".concat(params.top));
|
||
url = q.length > 0 ? "".concat(this.buildListUrl(siteUrl, listName), "?").concat(q.join('&')) : this.buildListUrl(siteUrl, listName);
|
||
return [4 /*yield*/, this.context.spHttpClient.get(url, _microsoft_sp_http__WEBPACK_IMPORTED_MODULE_0__.SPHttpClient.configurations.v1)];
|
||
case 1:
|
||
response = _a.sent();
|
||
if (!response.ok) {
|
||
throw new Error("\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0441\u043F\u0438\u0441\u043A\u0430 \"".concat(listName, "\": ").concat(response.status));
|
||
}
|
||
return [4 /*yield*/, response.json()];
|
||
case 2:
|
||
json = _a.sent();
|
||
return [2 /*return*/, json.value];
|
||
}
|
||
});
|
||
});
|
||
};
|
||
DocumentsService.prototype.fetchMyDocs = function (config) {
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
||
var siteUrl, userId, items;
|
||
var _this = this;
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
||
switch (_a.label) {
|
||
case 0:
|
||
siteUrl = this.siteUrlFor(config);
|
||
return [4 /*yield*/, this.resolveUserId(config)];
|
||
case 1:
|
||
userId = _a.sent();
|
||
return [4 /*yield*/, this.fetchItems(siteUrl, config.myDocsListName, {
|
||
filter: config.buildMyDocsFilter(userId),
|
||
select: config.myDocsSelect,
|
||
expand: config.myDocsExpand,
|
||
orderby: 'Created desc',
|
||
top: 100
|
||
})];
|
||
case 2:
|
||
items = _a.sent();
|
||
return [2 /*return*/, items.map(function (item) { return config.mapItem(item, _this.context); })];
|
||
}
|
||
});
|
||
});
|
||
};
|
||
DocumentsService.prototype.fetchApprovedByMe = function (config) {
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
||
if (!config.approvedByMe)
|
||
return [2 /*return*/, []];
|
||
return [2 /*return*/, this._fetchApprovalSection(config, config.approvedByMe)];
|
||
});
|
||
});
|
||
};
|
||
DocumentsService.prototype.fetchPendingApprovals = function (config) {
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
||
if (!config.pendingApproval)
|
||
return [2 /*return*/, []];
|
||
return [2 /*return*/, this._fetchApprovalSection(config, config.pendingApproval)];
|
||
});
|
||
});
|
||
};
|
||
DocumentsService.prototype._fetchApprovalSection = function (config, pa) {
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__awaiter)(this, void 0, void 0, function () {
|
||
var siteUrl, userId, approvalItems, parentIds, parentQuery, parentItems;
|
||
var _this = this;
|
||
return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__generator)(this, function (_a) {
|
||
switch (_a.label) {
|
||
case 0:
|
||
siteUrl = this.siteUrlFor(config);
|
||
return [4 /*yield*/, this.resolveUserId(config)];
|
||
case 1:
|
||
userId = _a.sent();
|
||
return [4 /*yield*/, this.fetchItems(siteUrl, pa.approvalListName, {
|
||
filter: pa.buildPendingFilter(userId),
|
||
select: pa.approvalSelect,
|
||
expand: pa.approvalExpand,
|
||
top: 200
|
||
})];
|
||
case 2:
|
||
approvalItems = _a.sent();
|
||
parentIds = Array.from(new Set(approvalItems.map(function (item) { return Number(item[pa.parentIdField]); }).filter(function (id) { return !isNaN(id) && id > 0; })));
|
||
if (parentIds.length === 0)
|
||
return [2 /*return*/, []];
|
||
parentQuery = pa.buildParentQuery(parentIds);
|
||
return [4 /*yield*/, this.fetchItems(siteUrl, parentQuery.listName, {
|
||
filter: parentQuery.filter,
|
||
select: parentQuery.select,
|
||
top: 200
|
||
})];
|
||
case 3:
|
||
parentItems = _a.sent();
|
||
return [2 /*return*/, parentItems.map(function (item) { return config.mapItem(item, _this.context); })];
|
||
}
|
||
});
|
||
});
|
||
};
|
||
return DocumentsService;
|
||
}());
|
||
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 169:
|
||
/*!********************************************************************************!*\
|
||
!*** ./lib/webparts/ctFormsPortal/components/registry/useDocumentDashboard.js ***!
|
||
\********************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ useDocumentDashboard: () => (/* binding */ useDocumentDashboard)
|
||
/* harmony export */ });
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 959);
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony import */ var _documentsService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./documentsService */ 406);
|
||
|
||
|
||
// Грузит три очереди (мои / согласованные / на согласовании) по всем типам сразу.
|
||
function useDocumentDashboard(context, documentTypes) {
|
||
var _a = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]), myDocs = _a[0], setMyDocs = _a[1];
|
||
var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]), approvedDocs = _b[0], setApprovedDocs = _b[1];
|
||
var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]), pendingDocs = _c[0], setPendingDocs = _c[1];
|
||
var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true), isLoading = _d[0], setIsLoading = _d[1];
|
||
var _e = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null), error = _e[0], setError = _e[1];
|
||
var _f = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0), tick = _f[0], setTick = _f[1];
|
||
var reload = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () { return setTick(function (t) { return t + 1; }); }, []);
|
||
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
||
var service = new _documentsService__WEBPACK_IMPORTED_MODULE_1__.DocumentsService(context);
|
||
setIsLoading(true);
|
||
setError(null);
|
||
Promise.all([
|
||
Promise.all(documentTypes.map(function (cfg) { return service.fetchMyDocs(cfg); })),
|
||
Promise.all(documentTypes.map(function (cfg) { return service.fetchApprovedByMe(cfg); })),
|
||
Promise.all(documentTypes.map(function (cfg) { return service.fetchPendingApprovals(cfg); }))
|
||
])
|
||
.then(function (_a) {
|
||
var myDocGroups = _a[0], approvedGroups = _a[1], pendingGroups = _a[2];
|
||
setMyDocs(myDocGroups.reduce(function (acc, arr) { return acc.concat(arr); }, []));
|
||
setApprovedDocs(approvedGroups.reduce(function (acc, arr) { return acc.concat(arr); }, []));
|
||
setPendingDocs(pendingGroups.reduce(function (acc, arr) { return acc.concat(arr); }, []));
|
||
setIsLoading(false);
|
||
})
|
||
.catch(function (err) {
|
||
var _a;
|
||
setError((_a = err.message) !== null && _a !== void 0 ? _a : 'Произошла ошибка при загрузке данных');
|
||
setIsLoading(false);
|
||
});
|
||
}, [context, tick]); // eslint-disable-line react-hooks/exhaustive-deps
|
||
return { myDocs: myDocs, approvedDocs: approvedDocs, pendingDocs: pendingDocs, isLoading: isLoading, error: error, reload: reload };
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 323:
|
||
/*!***********************************************************************************************************!*\
|
||
!*** ./node_modules/@microsoft/sp-css-loader/node_modules/@microsoft/load-themed-styles/lib-es6/index.js ***!
|
||
\***********************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ clearStyles: () => (/* binding */ clearStyles),
|
||
/* harmony export */ configureLoadStyles: () => (/* binding */ configureLoadStyles),
|
||
/* harmony export */ configureRunMode: () => (/* binding */ configureRunMode),
|
||
/* harmony export */ detokenize: () => (/* binding */ detokenize),
|
||
/* harmony export */ flush: () => (/* binding */ flush),
|
||
/* harmony export */ loadStyles: () => (/* binding */ loadStyles),
|
||
/* harmony export */ loadTheme: () => (/* binding */ loadTheme),
|
||
/* harmony export */ splitStyles: () => (/* binding */ splitStyles)
|
||
/* harmony export */ });
|
||
// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
|
||
// See LICENSE in the project root for license information.
|
||
var __assign = (undefined && undefined.__assign) || function () {
|
||
__assign = Object.assign || function(t) {
|
||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||
s = arguments[i];
|
||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||
t[p] = s[p];
|
||
}
|
||
return t;
|
||
};
|
||
return __assign.apply(this, arguments);
|
||
};
|
||
// Store the theming state in __themeState__ global scope for reuse in the case of duplicate
|
||
// load-themed-styles hosted on the page.
|
||
var _root = typeof window === 'undefined' ? __webpack_require__.g : window; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||
// Nonce string to inject into script tag if one provided. This is used in CSP (Content Security Policy).
|
||
var _styleNonce = _root && _root.CSPSettings && _root.CSPSettings.nonce;
|
||
var _themeState = initializeThemeState();
|
||
/**
|
||
* Matches theming tokens. For example, "[theme: themeSlotName, default: #FFF]" (including the quotes).
|
||
*/
|
||
var _themeTokenRegex = /[\'\"]\[theme:\s*(\w+)\s*(?:\,\s*default:\s*([\\"\']?[\.\,\(\)\#\-\s\w]*[\.\,\(\)\#\-\w][\"\']?))?\s*\][\'\"]/g;
|
||
var now = function () {
|
||
return typeof performance !== 'undefined' && !!performance.now ? performance.now() : Date.now();
|
||
};
|
||
function measure(func) {
|
||
var start = now();
|
||
func();
|
||
var end = now();
|
||
_themeState.perf.duration += end - start;
|
||
}
|
||
/**
|
||
* initialize global state object
|
||
*/
|
||
function initializeThemeState() {
|
||
var state = _root.__themeState__ || {
|
||
theme: undefined,
|
||
lastStyleElement: undefined,
|
||
registeredStyles: []
|
||
};
|
||
if (!state.runState) {
|
||
state = __assign(__assign({}, state), { perf: {
|
||
count: 0,
|
||
duration: 0
|
||
}, runState: {
|
||
flushTimer: 0,
|
||
mode: 0 /* Mode.sync */,
|
||
buffer: []
|
||
} });
|
||
}
|
||
if (!state.registeredThemableStyles) {
|
||
state = __assign(__assign({}, state), { registeredThemableStyles: [] });
|
||
}
|
||
_root.__themeState__ = state;
|
||
return state;
|
||
}
|
||
/**
|
||
* Loads a set of style text. If it is registered too early, we will register it when the window.load
|
||
* event is fired.
|
||
* @param {string | ThemableArray} styles Themable style text to register.
|
||
* @param {boolean} loadAsync When true, always load styles in async mode, irrespective of current sync mode.
|
||
*/
|
||
function loadStyles(styles, loadAsync) {
|
||
if (loadAsync === void 0) { loadAsync = false; }
|
||
measure(function () {
|
||
var styleParts = Array.isArray(styles) ? styles : splitStyles(styles);
|
||
var _a = _themeState.runState, mode = _a.mode, buffer = _a.buffer, flushTimer = _a.flushTimer;
|
||
if (loadAsync || mode === 1 /* Mode.async */) {
|
||
buffer.push(styleParts);
|
||
if (!flushTimer) {
|
||
_themeState.runState.flushTimer = asyncLoadStyles();
|
||
}
|
||
}
|
||
else {
|
||
applyThemableStyles(styleParts);
|
||
}
|
||
});
|
||
}
|
||
/**
|
||
* Allows for customizable loadStyles logic. e.g. for server side rendering application
|
||
* @param {(processedStyles: string, rawStyles?: string | ThemableArray) => void}
|
||
* a loadStyles callback that gets called when styles are loaded or reloaded
|
||
*/
|
||
function configureLoadStyles(loadStylesFn) {
|
||
_themeState.loadStyles = loadStylesFn;
|
||
}
|
||
/**
|
||
* Configure run mode of load-themable-styles
|
||
* @param mode load-themable-styles run mode, async or sync
|
||
*/
|
||
function configureRunMode(mode) {
|
||
_themeState.runState.mode = mode;
|
||
}
|
||
/**
|
||
* external code can call flush to synchronously force processing of currently buffered styles
|
||
*/
|
||
function flush() {
|
||
measure(function () {
|
||
var styleArrays = _themeState.runState.buffer.slice();
|
||
_themeState.runState.buffer = [];
|
||
var mergedStyleArray = [].concat.apply([], styleArrays);
|
||
if (mergedStyleArray.length > 0) {
|
||
applyThemableStyles(mergedStyleArray);
|
||
}
|
||
});
|
||
}
|
||
/**
|
||
* register async loadStyles
|
||
*/
|
||
function asyncLoadStyles() {
|
||
return setTimeout(function () {
|
||
_themeState.runState.flushTimer = 0;
|
||
flush();
|
||
}, 0);
|
||
}
|
||
/**
|
||
* Loads a set of style text. If it is registered too early, we will register it when the window.load event
|
||
* is fired.
|
||
* @param {string} styleText Style to register.
|
||
* @param {IStyleRecord} styleRecord Existing style record to re-apply.
|
||
*/
|
||
function applyThemableStyles(stylesArray, styleRecord) {
|
||
if (_themeState.loadStyles) {
|
||
_themeState.loadStyles(resolveThemableArray(stylesArray).styleString, stylesArray);
|
||
}
|
||
else {
|
||
registerStyles(stylesArray);
|
||
}
|
||
}
|
||
/**
|
||
* Registers a set theme tokens to find and replace. If styles were already registered, they will be
|
||
* replaced.
|
||
* @param {theme} theme JSON object of theme tokens to values.
|
||
*/
|
||
function loadTheme(theme) {
|
||
_themeState.theme = theme;
|
||
// reload styles.
|
||
reloadStyles();
|
||
}
|
||
/**
|
||
* Clear already registered style elements and style records in theme_State object
|
||
* @param option - specify which group of registered styles should be cleared.
|
||
* Default to be both themable and non-themable styles will be cleared
|
||
*/
|
||
function clearStyles(option) {
|
||
if (option === void 0) { option = 3 /* ClearStyleOptions.all */; }
|
||
if (option === 3 /* ClearStyleOptions.all */ || option === 2 /* ClearStyleOptions.onlyNonThemable */) {
|
||
clearStylesInternal(_themeState.registeredStyles);
|
||
_themeState.registeredStyles = [];
|
||
}
|
||
if (option === 3 /* ClearStyleOptions.all */ || option === 1 /* ClearStyleOptions.onlyThemable */) {
|
||
clearStylesInternal(_themeState.registeredThemableStyles);
|
||
_themeState.registeredThemableStyles = [];
|
||
}
|
||
}
|
||
function clearStylesInternal(records) {
|
||
records.forEach(function (styleRecord) {
|
||
var styleElement = styleRecord && styleRecord.styleElement;
|
||
if (styleElement && styleElement.parentElement) {
|
||
styleElement.parentElement.removeChild(styleElement);
|
||
}
|
||
});
|
||
}
|
||
/**
|
||
* Reloads styles.
|
||
*/
|
||
function reloadStyles() {
|
||
if (_themeState.theme) {
|
||
var themableStyles = [];
|
||
for (var _i = 0, _a = _themeState.registeredThemableStyles; _i < _a.length; _i++) {
|
||
var styleRecord = _a[_i];
|
||
themableStyles.push(styleRecord.themableStyle);
|
||
}
|
||
if (themableStyles.length > 0) {
|
||
clearStyles(1 /* ClearStyleOptions.onlyThemable */);
|
||
applyThemableStyles([].concat.apply([], themableStyles));
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Find theme tokens and replaces them with provided theme values.
|
||
* @param {string} styles Tokenized styles to fix.
|
||
*/
|
||
function detokenize(styles) {
|
||
if (styles) {
|
||
styles = resolveThemableArray(splitStyles(styles)).styleString;
|
||
}
|
||
return styles;
|
||
}
|
||
/**
|
||
* Resolves ThemingInstruction objects in an array and joins the result into a string.
|
||
* @param {ThemableArray} splitStyleArray ThemableArray to resolve and join.
|
||
*/
|
||
function resolveThemableArray(splitStyleArray) {
|
||
var theme = _themeState.theme;
|
||
var themable = false;
|
||
// Resolve the array of theming instructions to an array of strings.
|
||
// Then join the array to produce the final CSS string.
|
||
var resolvedArray = (splitStyleArray || []).map(function (currentValue) {
|
||
var themeSlot = currentValue.theme;
|
||
if (themeSlot) {
|
||
themable = true;
|
||
// A theming annotation. Resolve it.
|
||
var themedValue = theme ? theme[themeSlot] : undefined;
|
||
var defaultValue = currentValue.defaultValue || 'inherit';
|
||
// Warn to console if we hit an unthemed value even when themes are provided, but only if "DEBUG" is true.
|
||
// Allow the themedValue to be undefined to explicitly request the default value.
|
||
if (theme &&
|
||
!themedValue &&
|
||
console &&
|
||
!(themeSlot in theme) &&
|
||
"boolean" !== 'undefined' &&
|
||
true) {
|
||
console.warn("Theming value not provided for \"".concat(themeSlot, "\". Falling back to \"").concat(defaultValue, "\"."));
|
||
}
|
||
return themedValue || defaultValue;
|
||
}
|
||
else {
|
||
// A non-themable string. Preserve it.
|
||
return currentValue.rawString;
|
||
}
|
||
});
|
||
return {
|
||
styleString: resolvedArray.join(''),
|
||
themable: themable
|
||
};
|
||
}
|
||
/**
|
||
* Split tokenized CSS into an array of strings and theme specification objects
|
||
* @param {string} styles Tokenized styles to split.
|
||
*/
|
||
function splitStyles(styles) {
|
||
var result = [];
|
||
if (styles) {
|
||
var pos = 0; // Current position in styles.
|
||
var tokenMatch = void 0;
|
||
while ((tokenMatch = _themeTokenRegex.exec(styles))) {
|
||
var matchIndex = tokenMatch.index;
|
||
if (matchIndex > pos) {
|
||
result.push({
|
||
rawString: styles.substring(pos, matchIndex)
|
||
});
|
||
}
|
||
result.push({
|
||
theme: tokenMatch[1],
|
||
defaultValue: tokenMatch[2] // May be undefined
|
||
});
|
||
// index of the first character after the current match
|
||
pos = _themeTokenRegex.lastIndex;
|
||
}
|
||
// Push the rest of the string after the last match.
|
||
result.push({
|
||
rawString: styles.substring(pos)
|
||
});
|
||
}
|
||
return result;
|
||
}
|
||
/**
|
||
* Registers a set of style text. If it is registered too early, we will register it when the
|
||
* window.load event is fired.
|
||
* @param {ThemableArray} styleArray Array of IThemingInstruction objects to register.
|
||
* @param {IStyleRecord} styleRecord May specify a style Element to update.
|
||
*/
|
||
function registerStyles(styleArray) {
|
||
if (typeof document === 'undefined') {
|
||
return;
|
||
}
|
||
var head = document.getElementsByTagName('head')[0];
|
||
var styleElement = document.createElement('style');
|
||
var _a = resolveThemableArray(styleArray), styleString = _a.styleString, themable = _a.themable;
|
||
styleElement.setAttribute('data-load-themed-styles', 'true');
|
||
if (_styleNonce) {
|
||
styleElement.setAttribute('nonce', _styleNonce);
|
||
}
|
||
styleElement.appendChild(document.createTextNode(styleString));
|
||
_themeState.perf.count++;
|
||
head.appendChild(styleElement);
|
||
var ev = document.createEvent('HTMLEvents');
|
||
ev.initEvent('styleinsert', true /* bubbleEvent */, false /* cancelable */);
|
||
ev.args = {
|
||
newStyle: styleElement
|
||
};
|
||
document.dispatchEvent(ev);
|
||
var record = {
|
||
styleElement: styleElement,
|
||
themableStyle: styleArray
|
||
};
|
||
if (themable) {
|
||
_themeState.registeredThemableStyles.push(record);
|
||
}
|
||
else {
|
||
_themeState.registeredStyles.push(record);
|
||
}
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 223:
|
||
/*!***************************************************!*\
|
||
!*** ./node_modules/ansi-html-community/index.js ***!
|
||
\***************************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
module.exports = ansiHTML
|
||
|
||
// Reference to https://github.com/sindresorhus/ansi-regex
|
||
var _regANSI = /(?:(?:\u001b\[)|\u009b)(?:(?:[0-9]{1,3})?(?:(?:;[0-9]{0,3})*)?[A-M|f-m])|\u001b[A-M]/
|
||
|
||
var _defColors = {
|
||
reset: ['fff', '000'], // [FOREGROUD_COLOR, BACKGROUND_COLOR]
|
||
black: '000',
|
||
red: 'ff0000',
|
||
green: '209805',
|
||
yellow: 'e8bf03',
|
||
blue: '0000ff',
|
||
magenta: 'ff00ff',
|
||
cyan: '00ffee',
|
||
lightgrey: 'f0f0f0',
|
||
darkgrey: '888'
|
||
}
|
||
var _styles = {
|
||
30: 'black',
|
||
31: 'red',
|
||
32: 'green',
|
||
33: 'yellow',
|
||
34: 'blue',
|
||
35: 'magenta',
|
||
36: 'cyan',
|
||
37: 'lightgrey'
|
||
}
|
||
var _openTags = {
|
||
'1': 'font-weight:bold', // bold
|
||
'2': 'opacity:0.5', // dim
|
||
'3': '<i>', // italic
|
||
'4': '<u>', // underscore
|
||
'8': 'display:none', // hidden
|
||
'9': '<del>' // delete
|
||
}
|
||
var _closeTags = {
|
||
'23': '</i>', // reset italic
|
||
'24': '</u>', // reset underscore
|
||
'29': '</del>' // reset delete
|
||
}
|
||
|
||
;[0, 21, 22, 27, 28, 39, 49].forEach(function (n) {
|
||
_closeTags[n] = '</span>'
|
||
})
|
||
|
||
/**
|
||
* Converts text with ANSI color codes to HTML markup.
|
||
* @param {String} text
|
||
* @returns {*}
|
||
*/
|
||
function ansiHTML (text) {
|
||
// Returns the text if the string has no ANSI escape code.
|
||
if (!_regANSI.test(text)) {
|
||
return text
|
||
}
|
||
|
||
// Cache opened sequence.
|
||
var ansiCodes = []
|
||
// Replace with markup.
|
||
var ret = text.replace(/\033\[(\d+)m/g, function (match, seq) {
|
||
var ot = _openTags[seq]
|
||
if (ot) {
|
||
// If current sequence has been opened, close it.
|
||
if (!!~ansiCodes.indexOf(seq)) { // eslint-disable-line no-extra-boolean-cast
|
||
ansiCodes.pop()
|
||
return '</span>'
|
||
}
|
||
// Open tag.
|
||
ansiCodes.push(seq)
|
||
return ot[0] === '<' ? ot : '<span style="' + ot + ';">'
|
||
}
|
||
|
||
var ct = _closeTags[seq]
|
||
if (ct) {
|
||
// Pop sequence
|
||
ansiCodes.pop()
|
||
return ct
|
||
}
|
||
return ''
|
||
})
|
||
|
||
// Make sure tags are closed.
|
||
var l = ansiCodes.length
|
||
;(l > 0) && (ret += Array(l + 1).join('</span>'))
|
||
|
||
return ret
|
||
}
|
||
|
||
/**
|
||
* Customize colors.
|
||
* @param {Object} colors reference to _defColors
|
||
*/
|
||
ansiHTML.setColors = function (colors) {
|
||
if (typeof colors !== 'object') {
|
||
throw new Error('`colors` parameter must be an Object.')
|
||
}
|
||
|
||
var _finalColors = {}
|
||
for (var key in _defColors) {
|
||
var hex = colors.hasOwnProperty(key) ? colors[key] : null
|
||
if (!hex) {
|
||
_finalColors[key] = _defColors[key]
|
||
continue
|
||
}
|
||
if ('reset' === key) {
|
||
if (typeof hex === 'string') {
|
||
hex = [hex]
|
||
}
|
||
if (!Array.isArray(hex) || hex.length === 0 || hex.some(function (h) {
|
||
return typeof h !== 'string'
|
||
})) {
|
||
throw new Error('The value of `' + key + '` property must be an Array and each item could only be a hex string, e.g.: FF0000')
|
||
}
|
||
var defHexColor = _defColors[key]
|
||
if (!hex[0]) {
|
||
hex[0] = defHexColor[0]
|
||
}
|
||
if (hex.length === 1 || !hex[1]) {
|
||
hex = [hex[0]]
|
||
hex.push(defHexColor[1])
|
||
}
|
||
|
||
hex = hex.slice(0, 2)
|
||
} else if (typeof hex !== 'string') {
|
||
throw new Error('The value of `' + key + '` property must be a hex string, e.g.: FF0000')
|
||
}
|
||
_finalColors[key] = hex
|
||
}
|
||
_setTags(_finalColors)
|
||
}
|
||
|
||
/**
|
||
* Reset colors.
|
||
*/
|
||
ansiHTML.reset = function () {
|
||
_setTags(_defColors)
|
||
}
|
||
|
||
/**
|
||
* Expose tags, including open and close.
|
||
* @type {Object}
|
||
*/
|
||
ansiHTML.tags = {}
|
||
|
||
if (Object.defineProperty) {
|
||
Object.defineProperty(ansiHTML.tags, 'open', {
|
||
get: function () { return _openTags }
|
||
})
|
||
Object.defineProperty(ansiHTML.tags, 'close', {
|
||
get: function () { return _closeTags }
|
||
})
|
||
} else {
|
||
ansiHTML.tags.open = _openTags
|
||
ansiHTML.tags.close = _closeTags
|
||
}
|
||
|
||
function _setTags (colors) {
|
||
// reset all
|
||
_openTags['0'] = 'font-weight:normal;opacity:1;color:#' + colors.reset[0] + ';background:#' + colors.reset[1]
|
||
// inverse
|
||
_openTags['7'] = 'color:#' + colors.reset[1] + ';background:#' + colors.reset[0]
|
||
// dark grey
|
||
_openTags['90'] = 'color:#' + colors.darkgrey
|
||
|
||
for (var code in _styles) {
|
||
var color = _styles[code]
|
||
var oriColor = colors[color] || '000'
|
||
_openTags[code] = 'color:#' + oriColor
|
||
code = parseInt(code)
|
||
_openTags[(code + 10).toString()] = 'background:#' + oriColor
|
||
}
|
||
}
|
||
|
||
ansiHTML.reset()
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 216:
|
||
/*!***************************************!*\
|
||
!*** ./node_modules/events/events.js ***!
|
||
\***************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
// Copyright Joyent, Inc. and other Node contributors.
|
||
//
|
||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||
// copy of this software and associated documentation files (the
|
||
// "Software"), to deal in the Software without restriction, including
|
||
// without limitation the rights to use, copy, modify, merge, publish,
|
||
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
||
// persons to whom the Software is furnished to do so, subject to the
|
||
// following conditions:
|
||
//
|
||
// The above copyright notice and this permission notice shall be included
|
||
// in all copies or substantial portions of the Software.
|
||
//
|
||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||
|
||
|
||
|
||
var R = typeof Reflect === 'object' ? Reflect : null
|
||
var ReflectApply = R && typeof R.apply === 'function'
|
||
? R.apply
|
||
: function ReflectApply(target, receiver, args) {
|
||
return Function.prototype.apply.call(target, receiver, args);
|
||
}
|
||
|
||
var ReflectOwnKeys
|
||
if (R && typeof R.ownKeys === 'function') {
|
||
ReflectOwnKeys = R.ownKeys
|
||
} else if (Object.getOwnPropertySymbols) {
|
||
ReflectOwnKeys = function ReflectOwnKeys(target) {
|
||
return Object.getOwnPropertyNames(target)
|
||
.concat(Object.getOwnPropertySymbols(target));
|
||
};
|
||
} else {
|
||
ReflectOwnKeys = function ReflectOwnKeys(target) {
|
||
return Object.getOwnPropertyNames(target);
|
||
};
|
||
}
|
||
|
||
function ProcessEmitWarning(warning) {
|
||
if (console && console.warn) console.warn(warning);
|
||
}
|
||
|
||
var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
|
||
return value !== value;
|
||
}
|
||
|
||
function EventEmitter() {
|
||
EventEmitter.init.call(this);
|
||
}
|
||
module.exports = EventEmitter;
|
||
module.exports.once = once;
|
||
|
||
// Backwards-compat with node 0.10.x
|
||
EventEmitter.EventEmitter = EventEmitter;
|
||
|
||
EventEmitter.prototype._events = undefined;
|
||
EventEmitter.prototype._eventsCount = 0;
|
||
EventEmitter.prototype._maxListeners = undefined;
|
||
|
||
// By default EventEmitters will print a warning if more than 10 listeners are
|
||
// added to it. This is a useful default which helps finding memory leaks.
|
||
var defaultMaxListeners = 10;
|
||
|
||
function checkListener(listener) {
|
||
if (typeof listener !== 'function') {
|
||
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
||
}
|
||
}
|
||
|
||
Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
|
||
enumerable: true,
|
||
get: function() {
|
||
return defaultMaxListeners;
|
||
},
|
||
set: function(arg) {
|
||
if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
|
||
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
|
||
}
|
||
defaultMaxListeners = arg;
|
||
}
|
||
});
|
||
|
||
EventEmitter.init = function() {
|
||
|
||
if (this._events === undefined ||
|
||
this._events === Object.getPrototypeOf(this)._events) {
|
||
this._events = Object.create(null);
|
||
this._eventsCount = 0;
|
||
}
|
||
|
||
this._maxListeners = this._maxListeners || undefined;
|
||
};
|
||
|
||
// Obviously not all Emitters should be limited to 10. This function allows
|
||
// that to be increased. Set to zero for unlimited.
|
||
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
||
if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
|
||
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
|
||
}
|
||
this._maxListeners = n;
|
||
return this;
|
||
};
|
||
|
||
function _getMaxListeners(that) {
|
||
if (that._maxListeners === undefined)
|
||
return EventEmitter.defaultMaxListeners;
|
||
return that._maxListeners;
|
||
}
|
||
|
||
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
||
return _getMaxListeners(this);
|
||
};
|
||
|
||
EventEmitter.prototype.emit = function emit(type) {
|
||
var args = [];
|
||
for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
|
||
var doError = (type === 'error');
|
||
|
||
var events = this._events;
|
||
if (events !== undefined)
|
||
doError = (doError && events.error === undefined);
|
||
else if (!doError)
|
||
return false;
|
||
|
||
// If there is no 'error' event listener then throw.
|
||
if (doError) {
|
||
var er;
|
||
if (args.length > 0)
|
||
er = args[0];
|
||
if (er instanceof Error) {
|
||
// Note: The comments on the `throw` lines are intentional, they show
|
||
// up in Node's output if this results in an unhandled exception.
|
||
throw er; // Unhandled 'error' event
|
||
}
|
||
// At least give some kind of context to the user
|
||
var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
|
||
err.context = er;
|
||
throw err; // Unhandled 'error' event
|
||
}
|
||
|
||
var handler = events[type];
|
||
|
||
if (handler === undefined)
|
||
return false;
|
||
|
||
if (typeof handler === 'function') {
|
||
ReflectApply(handler, this, args);
|
||
} else {
|
||
var len = handler.length;
|
||
var listeners = arrayClone(handler, len);
|
||
for (var i = 0; i < len; ++i)
|
||
ReflectApply(listeners[i], this, args);
|
||
}
|
||
|
||
return true;
|
||
};
|
||
|
||
function _addListener(target, type, listener, prepend) {
|
||
var m;
|
||
var events;
|
||
var existing;
|
||
|
||
checkListener(listener);
|
||
|
||
events = target._events;
|
||
if (events === undefined) {
|
||
events = target._events = Object.create(null);
|
||
target._eventsCount = 0;
|
||
} else {
|
||
// To avoid recursion in the case that type === "newListener"! Before
|
||
// adding it to the listeners, first emit "newListener".
|
||
if (events.newListener !== undefined) {
|
||
target.emit('newListener', type,
|
||
listener.listener ? listener.listener : listener);
|
||
|
||
// Re-assign `events` because a newListener handler could have caused the
|
||
// this._events to be assigned to a new object
|
||
events = target._events;
|
||
}
|
||
existing = events[type];
|
||
}
|
||
|
||
if (existing === undefined) {
|
||
// Optimize the case of one listener. Don't need the extra array object.
|
||
existing = events[type] = listener;
|
||
++target._eventsCount;
|
||
} else {
|
||
if (typeof existing === 'function') {
|
||
// Adding the second element, need to change to array.
|
||
existing = events[type] =
|
||
prepend ? [listener, existing] : [existing, listener];
|
||
// If we've already got an array, just append.
|
||
} else if (prepend) {
|
||
existing.unshift(listener);
|
||
} else {
|
||
existing.push(listener);
|
||
}
|
||
|
||
// Check for listener leak
|
||
m = _getMaxListeners(target);
|
||
if (m > 0 && existing.length > m && !existing.warned) {
|
||
existing.warned = true;
|
||
// No error code for this since it is a Warning
|
||
// eslint-disable-next-line no-restricted-syntax
|
||
var w = new Error('Possible EventEmitter memory leak detected. ' +
|
||
existing.length + ' ' + String(type) + ' listeners ' +
|
||
'added. Use emitter.setMaxListeners() to ' +
|
||
'increase limit');
|
||
w.name = 'MaxListenersExceededWarning';
|
||
w.emitter = target;
|
||
w.type = type;
|
||
w.count = existing.length;
|
||
ProcessEmitWarning(w);
|
||
}
|
||
}
|
||
|
||
return target;
|
||
}
|
||
|
||
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
||
return _addListener(this, type, listener, false);
|
||
};
|
||
|
||
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
||
|
||
EventEmitter.prototype.prependListener =
|
||
function prependListener(type, listener) {
|
||
return _addListener(this, type, listener, true);
|
||
};
|
||
|
||
function onceWrapper() {
|
||
if (!this.fired) {
|
||
this.target.removeListener(this.type, this.wrapFn);
|
||
this.fired = true;
|
||
if (arguments.length === 0)
|
||
return this.listener.call(this.target);
|
||
return this.listener.apply(this.target, arguments);
|
||
}
|
||
}
|
||
|
||
function _onceWrap(target, type, listener) {
|
||
var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
|
||
var wrapped = onceWrapper.bind(state);
|
||
wrapped.listener = listener;
|
||
state.wrapFn = wrapped;
|
||
return wrapped;
|
||
}
|
||
|
||
EventEmitter.prototype.once = function once(type, listener) {
|
||
checkListener(listener);
|
||
this.on(type, _onceWrap(this, type, listener));
|
||
return this;
|
||
};
|
||
|
||
EventEmitter.prototype.prependOnceListener =
|
||
function prependOnceListener(type, listener) {
|
||
checkListener(listener);
|
||
this.prependListener(type, _onceWrap(this, type, listener));
|
||
return this;
|
||
};
|
||
|
||
// Emits a 'removeListener' event if and only if the listener was removed.
|
||
EventEmitter.prototype.removeListener =
|
||
function removeListener(type, listener) {
|
||
var list, events, position, i, originalListener;
|
||
|
||
checkListener(listener);
|
||
|
||
events = this._events;
|
||
if (events === undefined)
|
||
return this;
|
||
|
||
list = events[type];
|
||
if (list === undefined)
|
||
return this;
|
||
|
||
if (list === listener || list.listener === listener) {
|
||
if (--this._eventsCount === 0)
|
||
this._events = Object.create(null);
|
||
else {
|
||
delete events[type];
|
||
if (events.removeListener)
|
||
this.emit('removeListener', type, list.listener || listener);
|
||
}
|
||
} else if (typeof list !== 'function') {
|
||
position = -1;
|
||
|
||
for (i = list.length - 1; i >= 0; i--) {
|
||
if (list[i] === listener || list[i].listener === listener) {
|
||
originalListener = list[i].listener;
|
||
position = i;
|
||
break;
|
||
}
|
||
}
|
||
|
||
if (position < 0)
|
||
return this;
|
||
|
||
if (position === 0)
|
||
list.shift();
|
||
else {
|
||
spliceOne(list, position);
|
||
}
|
||
|
||
if (list.length === 1)
|
||
events[type] = list[0];
|
||
|
||
if (events.removeListener !== undefined)
|
||
this.emit('removeListener', type, originalListener || listener);
|
||
}
|
||
|
||
return this;
|
||
};
|
||
|
||
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
||
|
||
EventEmitter.prototype.removeAllListeners =
|
||
function removeAllListeners(type) {
|
||
var listeners, events, i;
|
||
|
||
events = this._events;
|
||
if (events === undefined)
|
||
return this;
|
||
|
||
// not listening for removeListener, no need to emit
|
||
if (events.removeListener === undefined) {
|
||
if (arguments.length === 0) {
|
||
this._events = Object.create(null);
|
||
this._eventsCount = 0;
|
||
} else if (events[type] !== undefined) {
|
||
if (--this._eventsCount === 0)
|
||
this._events = Object.create(null);
|
||
else
|
||
delete events[type];
|
||
}
|
||
return this;
|
||
}
|
||
|
||
// emit removeListener for all listeners on all events
|
||
if (arguments.length === 0) {
|
||
var keys = Object.keys(events);
|
||
var key;
|
||
for (i = 0; i < keys.length; ++i) {
|
||
key = keys[i];
|
||
if (key === 'removeListener') continue;
|
||
this.removeAllListeners(key);
|
||
}
|
||
this.removeAllListeners('removeListener');
|
||
this._events = Object.create(null);
|
||
this._eventsCount = 0;
|
||
return this;
|
||
}
|
||
|
||
listeners = events[type];
|
||
|
||
if (typeof listeners === 'function') {
|
||
this.removeListener(type, listeners);
|
||
} else if (listeners !== undefined) {
|
||
// LIFO order
|
||
for (i = listeners.length - 1; i >= 0; i--) {
|
||
this.removeListener(type, listeners[i]);
|
||
}
|
||
}
|
||
|
||
return this;
|
||
};
|
||
|
||
function _listeners(target, type, unwrap) {
|
||
var events = target._events;
|
||
|
||
if (events === undefined)
|
||
return [];
|
||
|
||
var evlistener = events[type];
|
||
if (evlistener === undefined)
|
||
return [];
|
||
|
||
if (typeof evlistener === 'function')
|
||
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
||
|
||
return unwrap ?
|
||
unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
||
}
|
||
|
||
EventEmitter.prototype.listeners = function listeners(type) {
|
||
return _listeners(this, type, true);
|
||
};
|
||
|
||
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
||
return _listeners(this, type, false);
|
||
};
|
||
|
||
EventEmitter.listenerCount = function(emitter, type) {
|
||
if (typeof emitter.listenerCount === 'function') {
|
||
return emitter.listenerCount(type);
|
||
} else {
|
||
return listenerCount.call(emitter, type);
|
||
}
|
||
};
|
||
|
||
EventEmitter.prototype.listenerCount = listenerCount;
|
||
function listenerCount(type) {
|
||
var events = this._events;
|
||
|
||
if (events !== undefined) {
|
||
var evlistener = events[type];
|
||
|
||
if (typeof evlistener === 'function') {
|
||
return 1;
|
||
} else if (evlistener !== undefined) {
|
||
return evlistener.length;
|
||
}
|
||
}
|
||
|
||
return 0;
|
||
}
|
||
|
||
EventEmitter.prototype.eventNames = function eventNames() {
|
||
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
||
};
|
||
|
||
function arrayClone(arr, n) {
|
||
var copy = new Array(n);
|
||
for (var i = 0; i < n; ++i)
|
||
copy[i] = arr[i];
|
||
return copy;
|
||
}
|
||
|
||
function spliceOne(list, index) {
|
||
for (; index + 1 < list.length; index++)
|
||
list[index] = list[index + 1];
|
||
list.pop();
|
||
}
|
||
|
||
function unwrapListeners(arr) {
|
||
var ret = new Array(arr.length);
|
||
for (var i = 0; i < ret.length; ++i) {
|
||
ret[i] = arr[i].listener || arr[i];
|
||
}
|
||
return ret;
|
||
}
|
||
|
||
function once(emitter, name) {
|
||
return new Promise(function (resolve, reject) {
|
||
function errorListener(err) {
|
||
emitter.removeListener(name, resolver);
|
||
reject(err);
|
||
}
|
||
|
||
function resolver() {
|
||
if (typeof emitter.removeListener === 'function') {
|
||
emitter.removeListener('error', errorListener);
|
||
}
|
||
resolve([].slice.call(arguments));
|
||
};
|
||
|
||
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
||
if (name !== 'error') {
|
||
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
||
}
|
||
});
|
||
}
|
||
|
||
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
||
if (typeof emitter.on === 'function') {
|
||
eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
|
||
}
|
||
}
|
||
|
||
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
||
if (typeof emitter.on === 'function') {
|
||
if (flags.once) {
|
||
emitter.once(name, listener);
|
||
} else {
|
||
emitter.on(name, listener);
|
||
}
|
||
} else if (typeof emitter.addEventListener === 'function') {
|
||
// EventTarget does not have `error` event semantics like Node
|
||
// EventEmitters, we do not listen for `error` events here.
|
||
emitter.addEventListener(name, function wrapListener(arg) {
|
||
// IE does not have builtin `{ once: true }` support so we
|
||
// have to do it manually.
|
||
if (flags.once) {
|
||
emitter.removeEventListener(name, wrapListener);
|
||
}
|
||
listener(arg);
|
||
});
|
||
} else {
|
||
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
||
}
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 15:
|
||
/*!*********************************************!*\
|
||
!*** ./node_modules/object-assign/index.js ***!
|
||
\*********************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/
|
||
|
||
|
||
/* eslint-disable no-unused-vars */
|
||
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
||
|
||
function toObject(val) {
|
||
if (val === null || val === undefined) {
|
||
throw new TypeError('Object.assign cannot be called with null or undefined');
|
||
}
|
||
|
||
return Object(val);
|
||
}
|
||
|
||
function shouldUseNative() {
|
||
try {
|
||
if (!Object.assign) {
|
||
return false;
|
||
}
|
||
|
||
// Detect buggy property enumeration order in older V8 versions.
|
||
|
||
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
||
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
||
test1[5] = 'de';
|
||
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
||
return false;
|
||
}
|
||
|
||
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||
var test2 = {};
|
||
for (var i = 0; i < 10; i++) {
|
||
test2['_' + String.fromCharCode(i)] = i;
|
||
}
|
||
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
||
return test2[n];
|
||
});
|
||
if (order2.join('') !== '0123456789') {
|
||
return false;
|
||
}
|
||
|
||
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
||
var test3 = {};
|
||
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
||
test3[letter] = letter;
|
||
});
|
||
if (Object.keys(Object.assign({}, test3)).join('') !==
|
||
'abcdefghijklmnopqrst') {
|
||
return false;
|
||
}
|
||
|
||
return true;
|
||
} catch (err) {
|
||
// We don't expect any of the above to throw, but better to be safe.
|
||
return false;
|
||
}
|
||
}
|
||
|
||
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
||
var from;
|
||
var to = toObject(target);
|
||
var symbols;
|
||
|
||
for (var s = 1; s < arguments.length; s++) {
|
||
from = Object(arguments[s]);
|
||
|
||
for (var key in from) {
|
||
if (hasOwnProperty.call(from, key)) {
|
||
to[key] = from[key];
|
||
}
|
||
}
|
||
|
||
if (getOwnPropertySymbols) {
|
||
symbols = getOwnPropertySymbols(from);
|
||
for (var i = 0; i < symbols.length; i++) {
|
||
if (propIsEnumerable.call(from, symbols[i])) {
|
||
to[symbols[i]] = from[symbols[i]];
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
return to;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 687:
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
|
||
\*****************************************************************/
|
||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
/** @license React v17.0.1
|
||
* react-jsx-runtime.development.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/
|
||
|
||
|
||
|
||
if (true) {
|
||
(function() {
|
||
'use strict';
|
||
|
||
var React = __webpack_require__(/*! react */ 959);
|
||
var _assign = __webpack_require__(/*! object-assign */ 15);
|
||
|
||
// ATTENTION
|
||
// When adding new symbols to this file,
|
||
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
||
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
||
// nor polyfill, then a plain number is used for performance.
|
||
var REACT_ELEMENT_TYPE = 0xeac7;
|
||
var REACT_PORTAL_TYPE = 0xeaca;
|
||
exports.Fragment = 0xeacb;
|
||
var REACT_STRICT_MODE_TYPE = 0xeacc;
|
||
var REACT_PROFILER_TYPE = 0xead2;
|
||
var REACT_PROVIDER_TYPE = 0xeacd;
|
||
var REACT_CONTEXT_TYPE = 0xeace;
|
||
var REACT_FORWARD_REF_TYPE = 0xead0;
|
||
var REACT_SUSPENSE_TYPE = 0xead1;
|
||
var REACT_SUSPENSE_LIST_TYPE = 0xead8;
|
||
var REACT_MEMO_TYPE = 0xead3;
|
||
var REACT_LAZY_TYPE = 0xead4;
|
||
var REACT_BLOCK_TYPE = 0xead9;
|
||
var REACT_SERVER_BLOCK_TYPE = 0xeada;
|
||
var REACT_FUNDAMENTAL_TYPE = 0xead5;
|
||
var REACT_SCOPE_TYPE = 0xead7;
|
||
var REACT_OPAQUE_ID_TYPE = 0xeae0;
|
||
var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
|
||
var REACT_OFFSCREEN_TYPE = 0xeae2;
|
||
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
|
||
|
||
if (typeof Symbol === 'function' && Symbol.for) {
|
||
var symbolFor = Symbol.for;
|
||
REACT_ELEMENT_TYPE = symbolFor('react.element');
|
||
REACT_PORTAL_TYPE = symbolFor('react.portal');
|
||
exports.Fragment = symbolFor('react.fragment');
|
||
REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
|
||
REACT_PROFILER_TYPE = symbolFor('react.profiler');
|
||
REACT_PROVIDER_TYPE = symbolFor('react.provider');
|
||
REACT_CONTEXT_TYPE = symbolFor('react.context');
|
||
REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
|
||
REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
|
||
REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
|
||
REACT_MEMO_TYPE = symbolFor('react.memo');
|
||
REACT_LAZY_TYPE = symbolFor('react.lazy');
|
||
REACT_BLOCK_TYPE = symbolFor('react.block');
|
||
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
|
||
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
|
||
REACT_SCOPE_TYPE = symbolFor('react.scope');
|
||
REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
|
||
REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
|
||
REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
|
||
REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
|
||
}
|
||
|
||
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
||
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
||
function getIteratorFn(maybeIterable) {
|
||
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
||
return null;
|
||
}
|
||
|
||
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
||
|
||
if (typeof maybeIterator === 'function') {
|
||
return maybeIterator;
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||
|
||
function error(format) {
|
||
{
|
||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||
args[_key2 - 1] = arguments[_key2];
|
||
}
|
||
|
||
printWarning('error', format, args);
|
||
}
|
||
}
|
||
|
||
function printWarning(level, format, args) {
|
||
// When changing this logic, you might want to also
|
||
// update consoleWithStackDev.www.js as well.
|
||
{
|
||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
||
|
||
if (stack !== '') {
|
||
format += '%s';
|
||
args = args.concat([stack]);
|
||
}
|
||
|
||
var argsWithFormat = args.map(function (item) {
|
||
return '' + item;
|
||
}); // Careful: RN currently depends on this prefix
|
||
|
||
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
||
// breaks IE9: https://github.com/facebook/react/issues/13610
|
||
// eslint-disable-next-line react-internal/no-production-logging
|
||
|
||
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
||
}
|
||
}
|
||
|
||
// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
|
||
|
||
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
||
|
||
function isValidElementType(type) {
|
||
if (typeof type === 'string' || typeof type === 'function') {
|
||
return true;
|
||
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
||
|
||
|
||
if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
|
||
return true;
|
||
}
|
||
|
||
if (typeof type === 'object' && type !== null) {
|
||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
|
||
return true;
|
||
}
|
||
}
|
||
|
||
return false;
|
||
}
|
||
|
||
function getWrappedName(outerType, innerType, wrapperName) {
|
||
var functionName = innerType.displayName || innerType.name || '';
|
||
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
|
||
}
|
||
|
||
function getContextName(type) {
|
||
return type.displayName || 'Context';
|
||
}
|
||
|
||
function getComponentName(type) {
|
||
if (type == null) {
|
||
// Host root, text node or just invalid type.
|
||
return null;
|
||
}
|
||
|
||
{
|
||
if (typeof type.tag === 'number') {
|
||
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
|
||
if (typeof type === 'function') {
|
||
return type.displayName || type.name || null;
|
||
}
|
||
|
||
if (typeof type === 'string') {
|
||
return type;
|
||
}
|
||
|
||
switch (type) {
|
||
case exports.Fragment:
|
||
return 'Fragment';
|
||
|
||
case REACT_PORTAL_TYPE:
|
||
return 'Portal';
|
||
|
||
case REACT_PROFILER_TYPE:
|
||
return 'Profiler';
|
||
|
||
case REACT_STRICT_MODE_TYPE:
|
||
return 'StrictMode';
|
||
|
||
case REACT_SUSPENSE_TYPE:
|
||
return 'Suspense';
|
||
|
||
case REACT_SUSPENSE_LIST_TYPE:
|
||
return 'SuspenseList';
|
||
}
|
||
|
||
if (typeof type === 'object') {
|
||
switch (type.$$typeof) {
|
||
case REACT_CONTEXT_TYPE:
|
||
var context = type;
|
||
return getContextName(context) + '.Consumer';
|
||
|
||
case REACT_PROVIDER_TYPE:
|
||
var provider = type;
|
||
return getContextName(provider._context) + '.Provider';
|
||
|
||
case REACT_FORWARD_REF_TYPE:
|
||
return getWrappedName(type, type.render, 'ForwardRef');
|
||
|
||
case REACT_MEMO_TYPE:
|
||
return getComponentName(type.type);
|
||
|
||
case REACT_BLOCK_TYPE:
|
||
return getComponentName(type._render);
|
||
|
||
case REACT_LAZY_TYPE:
|
||
{
|
||
var lazyComponent = type;
|
||
var payload = lazyComponent._payload;
|
||
var init = lazyComponent._init;
|
||
|
||
try {
|
||
return getComponentName(init(payload));
|
||
} catch (x) {
|
||
return null;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
return null;
|
||
}
|
||
|
||
// Helpers to patch console.logs to avoid logging during side-effect free
|
||
// replaying on render function. This currently only patches the object
|
||
// lazily which won't cover if the log function was extracted eagerly.
|
||
// We could also eagerly patch the method.
|
||
var disabledDepth = 0;
|
||
var prevLog;
|
||
var prevInfo;
|
||
var prevWarn;
|
||
var prevError;
|
||
var prevGroup;
|
||
var prevGroupCollapsed;
|
||
var prevGroupEnd;
|
||
|
||
function disabledLog() {}
|
||
|
||
disabledLog.__reactDisabledLog = true;
|
||
function disableLogs() {
|
||
{
|
||
if (disabledDepth === 0) {
|
||
/* eslint-disable react-internal/no-production-logging */
|
||
prevLog = console.log;
|
||
prevInfo = console.info;
|
||
prevWarn = console.warn;
|
||
prevError = console.error;
|
||
prevGroup = console.group;
|
||
prevGroupCollapsed = console.groupCollapsed;
|
||
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
||
|
||
var props = {
|
||
configurable: true,
|
||
enumerable: true,
|
||
value: disabledLog,
|
||
writable: true
|
||
}; // $FlowFixMe Flow thinks console is immutable.
|
||
|
||
Object.defineProperties(console, {
|
||
info: props,
|
||
log: props,
|
||
warn: props,
|
||
error: props,
|
||
group: props,
|
||
groupCollapsed: props,
|
||
groupEnd: props
|
||
});
|
||
/* eslint-enable react-internal/no-production-logging */
|
||
}
|
||
|
||
disabledDepth++;
|
||
}
|
||
}
|
||
function reenableLogs() {
|
||
{
|
||
disabledDepth--;
|
||
|
||
if (disabledDepth === 0) {
|
||
/* eslint-disable react-internal/no-production-logging */
|
||
var props = {
|
||
configurable: true,
|
||
enumerable: true,
|
||
writable: true
|
||
}; // $FlowFixMe Flow thinks console is immutable.
|
||
|
||
Object.defineProperties(console, {
|
||
log: _assign({}, props, {
|
||
value: prevLog
|
||
}),
|
||
info: _assign({}, props, {
|
||
value: prevInfo
|
||
}),
|
||
warn: _assign({}, props, {
|
||
value: prevWarn
|
||
}),
|
||
error: _assign({}, props, {
|
||
value: prevError
|
||
}),
|
||
group: _assign({}, props, {
|
||
value: prevGroup
|
||
}),
|
||
groupCollapsed: _assign({}, props, {
|
||
value: prevGroupCollapsed
|
||
}),
|
||
groupEnd: _assign({}, props, {
|
||
value: prevGroupEnd
|
||
})
|
||
});
|
||
/* eslint-enable react-internal/no-production-logging */
|
||
}
|
||
|
||
if (disabledDepth < 0) {
|
||
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
||
}
|
||
}
|
||
}
|
||
|
||
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
||
var prefix;
|
||
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
||
{
|
||
if (prefix === undefined) {
|
||
// Extract the VM specific prefix used by each line.
|
||
try {
|
||
throw Error();
|
||
} catch (x) {
|
||
var match = x.stack.trim().match(/\n( *(at )?)/);
|
||
prefix = match && match[1] || '';
|
||
}
|
||
} // We use the prefix to ensure our stacks line up with native stack frames.
|
||
|
||
|
||
return '\n' + prefix + name;
|
||
}
|
||
}
|
||
var reentry = false;
|
||
var componentFrameCache;
|
||
|
||
{
|
||
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
||
componentFrameCache = new PossiblyWeakMap();
|
||
}
|
||
|
||
function describeNativeComponentFrame(fn, construct) {
|
||
// If something asked for a stack inside a fake render, it should get ignored.
|
||
if (!fn || reentry) {
|
||
return '';
|
||
}
|
||
|
||
{
|
||
var frame = componentFrameCache.get(fn);
|
||
|
||
if (frame !== undefined) {
|
||
return frame;
|
||
}
|
||
}
|
||
|
||
var control;
|
||
reentry = true;
|
||
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
||
|
||
Error.prepareStackTrace = undefined;
|
||
var previousDispatcher;
|
||
|
||
{
|
||
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
||
// for warnings.
|
||
|
||
ReactCurrentDispatcher.current = null;
|
||
disableLogs();
|
||
}
|
||
|
||
try {
|
||
// This should throw.
|
||
if (construct) {
|
||
// Something should be setting the props in the constructor.
|
||
var Fake = function () {
|
||
throw Error();
|
||
}; // $FlowFixMe
|
||
|
||
|
||
Object.defineProperty(Fake.prototype, 'props', {
|
||
set: function () {
|
||
// We use a throwing setter instead of frozen or non-writable props
|
||
// because that won't throw in a non-strict mode function.
|
||
throw Error();
|
||
}
|
||
});
|
||
|
||
if (typeof Reflect === 'object' && Reflect.construct) {
|
||
// We construct a different control for this case to include any extra
|
||
// frames added by the construct call.
|
||
try {
|
||
Reflect.construct(Fake, []);
|
||
} catch (x) {
|
||
control = x;
|
||
}
|
||
|
||
Reflect.construct(fn, [], Fake);
|
||
} else {
|
||
try {
|
||
Fake.call();
|
||
} catch (x) {
|
||
control = x;
|
||
}
|
||
|
||
fn.call(Fake.prototype);
|
||
}
|
||
} else {
|
||
try {
|
||
throw Error();
|
||
} catch (x) {
|
||
control = x;
|
||
}
|
||
|
||
fn();
|
||
}
|
||
} catch (sample) {
|
||
// This is inlined manually because closure doesn't do it for us.
|
||
if (sample && control && typeof sample.stack === 'string') {
|
||
// This extracts the first frame from the sample that isn't also in the control.
|
||
// Skipping one frame that we assume is the frame that calls the two.
|
||
var sampleLines = sample.stack.split('\n');
|
||
var controlLines = control.stack.split('\n');
|
||
var s = sampleLines.length - 1;
|
||
var c = controlLines.length - 1;
|
||
|
||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
||
// We expect at least one stack frame to be shared.
|
||
// Typically this will be the root most one. However, stack frames may be
|
||
// cut off due to maximum stack limits. In this case, one maybe cut off
|
||
// earlier than the other. We assume that the sample is longer or the same
|
||
// and there for cut off earlier. So we should find the root most frame in
|
||
// the sample somewhere in the control.
|
||
c--;
|
||
}
|
||
|
||
for (; s >= 1 && c >= 0; s--, c--) {
|
||
// Next we find the first one that isn't the same which should be the
|
||
// frame that called our sample function and the control.
|
||
if (sampleLines[s] !== controlLines[c]) {
|
||
// In V8, the first line is describing the message but other VMs don't.
|
||
// If we're about to return the first line, and the control is also on the same
|
||
// line, that's a pretty good indicator that our sample threw at same line as
|
||
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
||
// This can happen if you passed a class to function component, or non-function.
|
||
if (s !== 1 || c !== 1) {
|
||
do {
|
||
s--;
|
||
c--; // We may still have similar intermediate frames from the construct call.
|
||
// The next one that isn't the same should be our match though.
|
||
|
||
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
||
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
||
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
|
||
|
||
{
|
||
if (typeof fn === 'function') {
|
||
componentFrameCache.set(fn, _frame);
|
||
}
|
||
} // Return the line we found.
|
||
|
||
|
||
return _frame;
|
||
}
|
||
} while (s >= 1 && c >= 0);
|
||
}
|
||
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
} finally {
|
||
reentry = false;
|
||
|
||
{
|
||
ReactCurrentDispatcher.current = previousDispatcher;
|
||
reenableLogs();
|
||
}
|
||
|
||
Error.prepareStackTrace = previousPrepareStackTrace;
|
||
} // Fallback to just using the name if we couldn't make it throw.
|
||
|
||
|
||
var name = fn ? fn.displayName || fn.name : '';
|
||
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
||
|
||
{
|
||
if (typeof fn === 'function') {
|
||
componentFrameCache.set(fn, syntheticFrame);
|
||
}
|
||
}
|
||
|
||
return syntheticFrame;
|
||
}
|
||
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
||
{
|
||
return describeNativeComponentFrame(fn, false);
|
||
}
|
||
}
|
||
|
||
function shouldConstruct(Component) {
|
||
var prototype = Component.prototype;
|
||
return !!(prototype && prototype.isReactComponent);
|
||
}
|
||
|
||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
||
|
||
if (type == null) {
|
||
return '';
|
||
}
|
||
|
||
if (typeof type === 'function') {
|
||
{
|
||
return describeNativeComponentFrame(type, shouldConstruct(type));
|
||
}
|
||
}
|
||
|
||
if (typeof type === 'string') {
|
||
return describeBuiltInComponentFrame(type);
|
||
}
|
||
|
||
switch (type) {
|
||
case REACT_SUSPENSE_TYPE:
|
||
return describeBuiltInComponentFrame('Suspense');
|
||
|
||
case REACT_SUSPENSE_LIST_TYPE:
|
||
return describeBuiltInComponentFrame('SuspenseList');
|
||
}
|
||
|
||
if (typeof type === 'object') {
|
||
switch (type.$$typeof) {
|
||
case REACT_FORWARD_REF_TYPE:
|
||
return describeFunctionComponentFrame(type.render);
|
||
|
||
case REACT_MEMO_TYPE:
|
||
// Memo may contain any component type so we recursively resolve it.
|
||
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
||
|
||
case REACT_BLOCK_TYPE:
|
||
return describeFunctionComponentFrame(type._render);
|
||
|
||
case REACT_LAZY_TYPE:
|
||
{
|
||
var lazyComponent = type;
|
||
var payload = lazyComponent._payload;
|
||
var init = lazyComponent._init;
|
||
|
||
try {
|
||
// Lazy may contain any component type so we recursively resolve it.
|
||
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
||
} catch (x) {}
|
||
}
|
||
}
|
||
}
|
||
|
||
return '';
|
||
}
|
||
|
||
var loggedTypeFailures = {};
|
||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||
|
||
function setCurrentlyValidatingElement(element) {
|
||
{
|
||
if (element) {
|
||
var owner = element._owner;
|
||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
||
} else {
|
||
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
||
}
|
||
}
|
||
}
|
||
|
||
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
||
{
|
||
// $FlowFixMe This is okay but Flow doesn't know it.
|
||
var has = Function.call.bind(Object.prototype.hasOwnProperty);
|
||
|
||
for (var typeSpecName in typeSpecs) {
|
||
if (has(typeSpecs, typeSpecName)) {
|
||
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
||
// fail the render phase where it didn't fail before. So we log it.
|
||
// After these have been cleaned up, we'll let them throw.
|
||
|
||
try {
|
||
// This is intentionally an invariant that gets caught. It's the same
|
||
// behavior as without this statement except with a better message.
|
||
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
||
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
||
err.name = 'Invariant Violation';
|
||
throw err;
|
||
}
|
||
|
||
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
||
} catch (ex) {
|
||
error$1 = ex;
|
||
}
|
||
|
||
if (error$1 && !(error$1 instanceof Error)) {
|
||
setCurrentlyValidatingElement(element);
|
||
|
||
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
|
||
|
||
setCurrentlyValidatingElement(null);
|
||
}
|
||
|
||
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
||
// Only monitor this failure once because there tends to be a lot of the
|
||
// same error.
|
||
loggedTypeFailures[error$1.message] = true;
|
||
setCurrentlyValidatingElement(element);
|
||
|
||
error('Failed %s type: %s', location, error$1.message);
|
||
|
||
setCurrentlyValidatingElement(null);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
var RESERVED_PROPS = {
|
||
key: true,
|
||
ref: true,
|
||
__self: true,
|
||
__source: true
|
||
};
|
||
var specialPropKeyWarningShown;
|
||
var specialPropRefWarningShown;
|
||
var didWarnAboutStringRefs;
|
||
|
||
{
|
||
didWarnAboutStringRefs = {};
|
||
}
|
||
|
||
function hasValidRef(config) {
|
||
{
|
||
if (hasOwnProperty.call(config, 'ref')) {
|
||
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
||
|
||
if (getter && getter.isReactWarning) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
|
||
return config.ref !== undefined;
|
||
}
|
||
|
||
function hasValidKey(config) {
|
||
{
|
||
if (hasOwnProperty.call(config, 'key')) {
|
||
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
||
|
||
if (getter && getter.isReactWarning) {
|
||
return false;
|
||
}
|
||
}
|
||
}
|
||
|
||
return config.key !== undefined;
|
||
}
|
||
|
||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||
{
|
||
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
||
var componentName = getComponentName(ReactCurrentOwner.current.type);
|
||
|
||
if (!didWarnAboutStringRefs[componentName]) {
|
||
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
|
||
|
||
didWarnAboutStringRefs[componentName] = true;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
function defineKeyPropWarningGetter(props, displayName) {
|
||
{
|
||
var warnAboutAccessingKey = function () {
|
||
if (!specialPropKeyWarningShown) {
|
||
specialPropKeyWarningShown = true;
|
||
|
||
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
||
}
|
||
};
|
||
|
||
warnAboutAccessingKey.isReactWarning = true;
|
||
Object.defineProperty(props, 'key', {
|
||
get: warnAboutAccessingKey,
|
||
configurable: true
|
||
});
|
||
}
|
||
}
|
||
|
||
function defineRefPropWarningGetter(props, displayName) {
|
||
{
|
||
var warnAboutAccessingRef = function () {
|
||
if (!specialPropRefWarningShown) {
|
||
specialPropRefWarningShown = true;
|
||
|
||
error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
||
}
|
||
};
|
||
|
||
warnAboutAccessingRef.isReactWarning = true;
|
||
Object.defineProperty(props, 'ref', {
|
||
get: warnAboutAccessingRef,
|
||
configurable: true
|
||
});
|
||
}
|
||
}
|
||
/**
|
||
* Factory method to create a new React element. This no longer adheres to
|
||
* the class pattern, so do not use new to call it. Also, instanceof check
|
||
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
||
* if something is a React Element.
|
||
*
|
||
* @param {*} type
|
||
* @param {*} props
|
||
* @param {*} key
|
||
* @param {string|object} ref
|
||
* @param {*} owner
|
||
* @param {*} self A *temporary* helper to detect places where `this` is
|
||
* different from the `owner` when React.createElement is called, so that we
|
||
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
||
* functions, and as long as `this` and owner are the same, there will be no
|
||
* change in behavior.
|
||
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
||
* indicating filename, line number, and/or other information.
|
||
* @internal
|
||
*/
|
||
|
||
|
||
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
||
var element = {
|
||
// This tag allows us to uniquely identify this as a React Element
|
||
$$typeof: REACT_ELEMENT_TYPE,
|
||
// Built-in properties that belong on the element
|
||
type: type,
|
||
key: key,
|
||
ref: ref,
|
||
props: props,
|
||
// Record the component responsible for creating this element.
|
||
_owner: owner
|
||
};
|
||
|
||
{
|
||
// The validation flag is currently mutative. We put it on
|
||
// an external backing store so that we can freeze the whole object.
|
||
// This can be replaced with a WeakMap once they are implemented in
|
||
// commonly used development environments.
|
||
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
||
// the validation flag non-enumerable (where possible, which should
|
||
// include every environment we run tests in), so the test framework
|
||
// ignores it.
|
||
|
||
Object.defineProperty(element._store, 'validated', {
|
||
configurable: false,
|
||
enumerable: false,
|
||
writable: true,
|
||
value: false
|
||
}); // self and source are DEV only properties.
|
||
|
||
Object.defineProperty(element, '_self', {
|
||
configurable: false,
|
||
enumerable: false,
|
||
writable: false,
|
||
value: self
|
||
}); // Two elements created in two different places should be considered
|
||
// equal for testing purposes and therefore we hide it from enumeration.
|
||
|
||
Object.defineProperty(element, '_source', {
|
||
configurable: false,
|
||
enumerable: false,
|
||
writable: false,
|
||
value: source
|
||
});
|
||
|
||
if (Object.freeze) {
|
||
Object.freeze(element.props);
|
||
Object.freeze(element);
|
||
}
|
||
}
|
||
|
||
return element;
|
||
};
|
||
/**
|
||
* https://github.com/reactjs/rfcs/pull/107
|
||
* @param {*} type
|
||
* @param {object} props
|
||
* @param {string} key
|
||
*/
|
||
|
||
function jsxDEV(type, config, maybeKey, source, self) {
|
||
{
|
||
var propName; // Reserved names are extracted
|
||
|
||
var props = {};
|
||
var key = null;
|
||
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
||
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
||
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
||
// but as an intermediary step, we will use jsxDEV for everything except
|
||
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
||
// key is explicitly declared to be undefined or not.
|
||
|
||
if (maybeKey !== undefined) {
|
||
key = '' + maybeKey;
|
||
}
|
||
|
||
if (hasValidKey(config)) {
|
||
key = '' + config.key;
|
||
}
|
||
|
||
if (hasValidRef(config)) {
|
||
ref = config.ref;
|
||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||
} // Remaining properties are added to a new props object
|
||
|
||
|
||
for (propName in config) {
|
||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
||
props[propName] = config[propName];
|
||
}
|
||
} // Resolve default props
|
||
|
||
|
||
if (type && type.defaultProps) {
|
||
var defaultProps = type.defaultProps;
|
||
|
||
for (propName in defaultProps) {
|
||
if (props[propName] === undefined) {
|
||
props[propName] = defaultProps[propName];
|
||
}
|
||
}
|
||
}
|
||
|
||
if (key || ref) {
|
||
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
||
|
||
if (key) {
|
||
defineKeyPropWarningGetter(props, displayName);
|
||
}
|
||
|
||
if (ref) {
|
||
defineRefPropWarningGetter(props, displayName);
|
||
}
|
||
}
|
||
|
||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
||
}
|
||
}
|
||
|
||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||
|
||
function setCurrentlyValidatingElement$1(element) {
|
||
{
|
||
if (element) {
|
||
var owner = element._owner;
|
||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
||
} else {
|
||
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
||
}
|
||
}
|
||
}
|
||
|
||
var propTypesMisspellWarningShown;
|
||
|
||
{
|
||
propTypesMisspellWarningShown = false;
|
||
}
|
||
/**
|
||
* Verifies the object is a ReactElement.
|
||
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
||
* @param {?object} object
|
||
* @return {boolean} True if `object` is a ReactElement.
|
||
* @final
|
||
*/
|
||
|
||
function isValidElement(object) {
|
||
{
|
||
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||
}
|
||
}
|
||
|
||
function getDeclarationErrorAddendum() {
|
||
{
|
||
if (ReactCurrentOwner$1.current) {
|
||
var name = getComponentName(ReactCurrentOwner$1.current.type);
|
||
|
||
if (name) {
|
||
return '\n\nCheck the render method of `' + name + '`.';
|
||
}
|
||
}
|
||
|
||
return '';
|
||
}
|
||
}
|
||
|
||
function getSourceInfoErrorAddendum(source) {
|
||
{
|
||
if (source !== undefined) {
|
||
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
||
var lineNumber = source.lineNumber;
|
||
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
||
}
|
||
|
||
return '';
|
||
}
|
||
}
|
||
/**
|
||
* Warn if there's no key explicitly set on dynamic arrays of children or
|
||
* object keys are not valid. This allows us to keep track of children between
|
||
* updates.
|
||
*/
|
||
|
||
|
||
var ownerHasKeyUseWarning = {};
|
||
|
||
function getCurrentComponentErrorInfo(parentType) {
|
||
{
|
||
var info = getDeclarationErrorAddendum();
|
||
|
||
if (!info) {
|
||
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
||
|
||
if (parentName) {
|
||
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
||
}
|
||
}
|
||
|
||
return info;
|
||
}
|
||
}
|
||
/**
|
||
* Warn if the element doesn't have an explicit key assigned to it.
|
||
* This element is in an array. The array could grow and shrink or be
|
||
* reordered. All children that haven't already been validated are required to
|
||
* have a "key" property assigned to it. Error statuses are cached so a warning
|
||
* will only be shown once.
|
||
*
|
||
* @internal
|
||
* @param {ReactElement} element Element that requires a key.
|
||
* @param {*} parentType element's parent's type.
|
||
*/
|
||
|
||
|
||
function validateExplicitKey(element, parentType) {
|
||
{
|
||
if (!element._store || element._store.validated || element.key != null) {
|
||
return;
|
||
}
|
||
|
||
element._store.validated = true;
|
||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
||
|
||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
||
return;
|
||
}
|
||
|
||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
||
// property, it may be the creator of the child that's responsible for
|
||
// assigning it a key.
|
||
|
||
var childOwner = '';
|
||
|
||
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
||
// Give the component that originally created this child.
|
||
childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
|
||
}
|
||
|
||
setCurrentlyValidatingElement$1(element);
|
||
|
||
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
||
|
||
setCurrentlyValidatingElement$1(null);
|
||
}
|
||
}
|
||
/**
|
||
* Ensure that every element either is passed in a static location, in an
|
||
* array with an explicit keys property defined, or in an object literal
|
||
* with valid key property.
|
||
*
|
||
* @internal
|
||
* @param {ReactNode} node Statically passed child of any type.
|
||
* @param {*} parentType node's parent's type.
|
||
*/
|
||
|
||
|
||
function validateChildKeys(node, parentType) {
|
||
{
|
||
if (typeof node !== 'object') {
|
||
return;
|
||
}
|
||
|
||
if (Array.isArray(node)) {
|
||
for (var i = 0; i < node.length; i++) {
|
||
var child = node[i];
|
||
|
||
if (isValidElement(child)) {
|
||
validateExplicitKey(child, parentType);
|
||
}
|
||
}
|
||
} else if (isValidElement(node)) {
|
||
// This element was passed in a valid location.
|
||
if (node._store) {
|
||
node._store.validated = true;
|
||
}
|
||
} else if (node) {
|
||
var iteratorFn = getIteratorFn(node);
|
||
|
||
if (typeof iteratorFn === 'function') {
|
||
// Entry iterators used to provide implicit keys,
|
||
// but now we print a separate warning for them later.
|
||
if (iteratorFn !== node.entries) {
|
||
var iterator = iteratorFn.call(node);
|
||
var step;
|
||
|
||
while (!(step = iterator.next()).done) {
|
||
if (isValidElement(step.value)) {
|
||
validateExplicitKey(step.value, parentType);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Given an element, validate that its props follow the propTypes definition,
|
||
* provided by the type.
|
||
*
|
||
* @param {ReactElement} element
|
||
*/
|
||
|
||
|
||
function validatePropTypes(element) {
|
||
{
|
||
var type = element.type;
|
||
|
||
if (type === null || type === undefined || typeof type === 'string') {
|
||
return;
|
||
}
|
||
|
||
var propTypes;
|
||
|
||
if (typeof type === 'function') {
|
||
propTypes = type.propTypes;
|
||
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
||
// Inner props are checked in the reconciler.
|
||
type.$$typeof === REACT_MEMO_TYPE)) {
|
||
propTypes = type.propTypes;
|
||
} else {
|
||
return;
|
||
}
|
||
|
||
if (propTypes) {
|
||
// Intentionally inside to avoid triggering lazy initializers:
|
||
var name = getComponentName(type);
|
||
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
||
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
||
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
||
|
||
var _name = getComponentName(type);
|
||
|
||
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
||
}
|
||
|
||
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
||
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Given a fragment, validate that it can only be provided with fragment props
|
||
* @param {ReactElement} fragment
|
||
*/
|
||
|
||
|
||
function validateFragmentProps(fragment) {
|
||
{
|
||
var keys = Object.keys(fragment.props);
|
||
|
||
for (var i = 0; i < keys.length; i++) {
|
||
var key = keys[i];
|
||
|
||
if (key !== 'children' && key !== 'key') {
|
||
setCurrentlyValidatingElement$1(fragment);
|
||
|
||
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
||
|
||
setCurrentlyValidatingElement$1(null);
|
||
break;
|
||
}
|
||
}
|
||
|
||
if (fragment.ref !== null) {
|
||
setCurrentlyValidatingElement$1(fragment);
|
||
|
||
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
||
|
||
setCurrentlyValidatingElement$1(null);
|
||
}
|
||
}
|
||
}
|
||
|
||
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
||
{
|
||
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
||
// succeed and there will likely be errors in render.
|
||
|
||
if (!validType) {
|
||
var info = '';
|
||
|
||
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
||
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
||
}
|
||
|
||
var sourceInfo = getSourceInfoErrorAddendum(source);
|
||
|
||
if (sourceInfo) {
|
||
info += sourceInfo;
|
||
} else {
|
||
info += getDeclarationErrorAddendum();
|
||
}
|
||
|
||
var typeString;
|
||
|
||
if (type === null) {
|
||
typeString = 'null';
|
||
} else if (Array.isArray(type)) {
|
||
typeString = 'array';
|
||
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
||
typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
|
||
info = ' Did you accidentally export a JSX literal instead of a component?';
|
||
} else {
|
||
typeString = typeof type;
|
||
}
|
||
|
||
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
||
}
|
||
|
||
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
||
// TODO: Drop this when these are no longer allowed as the type argument.
|
||
|
||
if (element == null) {
|
||
return element;
|
||
} // Skip key warning if the type isn't valid since our key validation logic
|
||
// doesn't expect a non-string/function type and can throw confusing errors.
|
||
// We don't want exception behavior to differ between dev and prod.
|
||
// (Rendering will throw with a helpful message and as soon as the type is
|
||
// fixed, the key warnings will appear.)
|
||
|
||
|
||
if (validType) {
|
||
var children = props.children;
|
||
|
||
if (children !== undefined) {
|
||
if (isStaticChildren) {
|
||
if (Array.isArray(children)) {
|
||
for (var i = 0; i < children.length; i++) {
|
||
validateChildKeys(children[i], type);
|
||
}
|
||
|
||
if (Object.freeze) {
|
||
Object.freeze(children);
|
||
}
|
||
} else {
|
||
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
|
||
}
|
||
} else {
|
||
validateChildKeys(children, type);
|
||
}
|
||
}
|
||
}
|
||
|
||
if (type === exports.Fragment) {
|
||
validateFragmentProps(element);
|
||
} else {
|
||
validatePropTypes(element);
|
||
}
|
||
|
||
return element;
|
||
}
|
||
} // These two functions exist to still get child warnings in dev
|
||
// even with the prod transform. This means that jsxDEV is purely
|
||
// opt-in behavior for better messages but that we won't stop
|
||
// giving you warnings if you use production apis.
|
||
|
||
function jsxWithValidationStatic(type, props, key) {
|
||
{
|
||
return jsxWithValidation(type, props, key, true);
|
||
}
|
||
}
|
||
function jsxWithValidationDynamic(type, props, key) {
|
||
{
|
||
return jsxWithValidation(type, props, key, false);
|
||
}
|
||
}
|
||
|
||
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
|
||
// for now we can ship identical prod functions
|
||
|
||
var jsxs = jsxWithValidationStatic ;
|
||
|
||
exports.jsx = jsx;
|
||
exports.jsxs = jsxs;
|
||
})();
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 340:
|
||
/*!*******************************************!*\
|
||
!*** ./node_modules/react/jsx-runtime.js ***!
|
||
\*******************************************/
|
||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
|
||
|
||
if (false) {} else {
|
||
module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ 687);
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 196:
|
||
/*!*****************************************!*\
|
||
!*** ./node_modules/tslib/tslib.es6.js ***!
|
||
\*****************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ __assign: () => (/* binding */ __assign),
|
||
/* harmony export */ __asyncDelegator: () => (/* binding */ __asyncDelegator),
|
||
/* harmony export */ __asyncGenerator: () => (/* binding */ __asyncGenerator),
|
||
/* harmony export */ __asyncValues: () => (/* binding */ __asyncValues),
|
||
/* harmony export */ __await: () => (/* binding */ __await),
|
||
/* harmony export */ __awaiter: () => (/* binding */ __awaiter),
|
||
/* harmony export */ __classPrivateFieldGet: () => (/* binding */ __classPrivateFieldGet),
|
||
/* harmony export */ __classPrivateFieldSet: () => (/* binding */ __classPrivateFieldSet),
|
||
/* harmony export */ __createBinding: () => (/* binding */ __createBinding),
|
||
/* harmony export */ __decorate: () => (/* binding */ __decorate),
|
||
/* harmony export */ __exportStar: () => (/* binding */ __exportStar),
|
||
/* harmony export */ __extends: () => (/* binding */ __extends),
|
||
/* harmony export */ __generator: () => (/* binding */ __generator),
|
||
/* harmony export */ __importDefault: () => (/* binding */ __importDefault),
|
||
/* harmony export */ __importStar: () => (/* binding */ __importStar),
|
||
/* harmony export */ __makeTemplateObject: () => (/* binding */ __makeTemplateObject),
|
||
/* harmony export */ __metadata: () => (/* binding */ __metadata),
|
||
/* harmony export */ __param: () => (/* binding */ __param),
|
||
/* harmony export */ __read: () => (/* binding */ __read),
|
||
/* harmony export */ __rest: () => (/* binding */ __rest),
|
||
/* harmony export */ __spread: () => (/* binding */ __spread),
|
||
/* harmony export */ __spreadArray: () => (/* binding */ __spreadArray),
|
||
/* harmony export */ __spreadArrays: () => (/* binding */ __spreadArrays),
|
||
/* harmony export */ __values: () => (/* binding */ __values)
|
||
/* harmony export */ });
|
||
/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */
|
||
/* global Reflect, Promise */
|
||
|
||
var extendStatics = function(d, b) {
|
||
extendStatics = Object.setPrototypeOf ||
|
||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||
return extendStatics(d, b);
|
||
};
|
||
|
||
function __extends(d, b) {
|
||
if (typeof b !== "function" && b !== null)
|
||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||
extendStatics(d, b);
|
||
function __() { this.constructor = d; }
|
||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||
}
|
||
|
||
var __assign = function() {
|
||
__assign = Object.assign || function __assign(t) {
|
||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||
s = arguments[i];
|
||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||
}
|
||
return t;
|
||
}
|
||
return __assign.apply(this, arguments);
|
||
}
|
||
|
||
function __rest(s, e) {
|
||
var t = {};
|
||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||
t[p] = s[p];
|
||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||
t[p[i]] = s[p[i]];
|
||
}
|
||
return t;
|
||
}
|
||
|
||
function __decorate(decorators, target, key, desc) {
|
||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||
}
|
||
|
||
function __param(paramIndex, decorator) {
|
||
return function (target, key) { decorator(target, key, paramIndex); }
|
||
}
|
||
|
||
function __metadata(metadataKey, metadataValue) {
|
||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||
}
|
||
|
||
function __awaiter(thisArg, _arguments, P, generator) {
|
||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||
return new (P || (P = Promise))(function (resolve, reject) {
|
||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||
});
|
||
}
|
||
|
||
function __generator(thisArg, body) {
|
||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||
function step(op) {
|
||
if (f) throw new TypeError("Generator is already executing.");
|
||
while (_) try {
|
||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||
switch (op[0]) {
|
||
case 0: case 1: t = op; break;
|
||
case 4: _.label++; return { value: op[1], done: false };
|
||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||
default:
|
||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||
if (t[2]) _.ops.pop();
|
||
_.trys.pop(); continue;
|
||
}
|
||
op = body.call(thisArg, _);
|
||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||
}
|
||
}
|
||
|
||
var __createBinding = Object.create ? (function(o, m, k, k2) {
|
||
if (k2 === undefined) k2 = k;
|
||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||
}) : (function(o, m, k, k2) {
|
||
if (k2 === undefined) k2 = k;
|
||
o[k2] = m[k];
|
||
});
|
||
|
||
function __exportStar(m, o) {
|
||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
||
}
|
||
|
||
function __values(o) {
|
||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||
if (m) return m.call(o);
|
||
if (o && typeof o.length === "number") return {
|
||
next: function () {
|
||
if (o && i >= o.length) o = void 0;
|
||
return { value: o && o[i++], done: !o };
|
||
}
|
||
};
|
||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||
}
|
||
|
||
function __read(o, n) {
|
||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||
if (!m) return o;
|
||
var i = m.call(o), r, ar = [], e;
|
||
try {
|
||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||
}
|
||
catch (error) { e = { error: error }; }
|
||
finally {
|
||
try {
|
||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||
}
|
||
finally { if (e) throw e.error; }
|
||
}
|
||
return ar;
|
||
}
|
||
|
||
/** @deprecated */
|
||
function __spread() {
|
||
for (var ar = [], i = 0; i < arguments.length; i++)
|
||
ar = ar.concat(__read(arguments[i]));
|
||
return ar;
|
||
}
|
||
|
||
/** @deprecated */
|
||
function __spreadArrays() {
|
||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
||
r[k] = a[j];
|
||
return r;
|
||
}
|
||
|
||
function __spreadArray(to, from, pack) {
|
||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
||
if (ar || !(i in from)) {
|
||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
||
ar[i] = from[i];
|
||
}
|
||
}
|
||
return to.concat(ar || Array.prototype.slice.call(from));
|
||
}
|
||
|
||
function __await(v) {
|
||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
||
}
|
||
|
||
function __asyncGenerator(thisArg, _arguments, generator) {
|
||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
||
function fulfill(value) { resume("next", value); }
|
||
function reject(value) { resume("throw", value); }
|
||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
||
}
|
||
|
||
function __asyncDelegator(o) {
|
||
var i, p;
|
||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
||
}
|
||
|
||
function __asyncValues(o) {
|
||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||
var m = o[Symbol.asyncIterator], i;
|
||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||
}
|
||
|
||
function __makeTemplateObject(cooked, raw) {
|
||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||
return cooked;
|
||
};
|
||
|
||
var __setModuleDefault = Object.create ? (function(o, v) {
|
||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||
}) : function(o, v) {
|
||
o["default"] = v;
|
||
};
|
||
|
||
function __importStar(mod) {
|
||
if (mod && mod.__esModule) return mod;
|
||
var result = {};
|
||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||
__setModuleDefault(result, mod);
|
||
return result;
|
||
}
|
||
|
||
function __importDefault(mod) {
|
||
return (mod && mod.__esModule) ? mod : { default: mod };
|
||
}
|
||
|
||
function __classPrivateFieldGet(receiver, state, kind, f) {
|
||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
||
}
|
||
|
||
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
||
if (kind === "m") throw new TypeError("Private method is not writable");
|
||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
||
}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 976:
|
||
/*!***************************************************************************!*\
|
||
!*** ./node_modules/webpack-dev-server/client/clients/WebSocketClient.js ***!
|
||
\***************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "default": () => (/* binding */ WebSocketClient)
|
||
/* harmony export */ });
|
||
/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/log.js */ 43);
|
||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
||
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||
|
||
|
||
/** @typedef {import("../index").EXPECTED_ANY} EXPECTED_ANY */
|
||
|
||
/**
|
||
* @implements {CommunicationClient}
|
||
*/
|
||
var WebSocketClient = /*#__PURE__*/function () {
|
||
/**
|
||
* @param {string} url url to connect
|
||
*/
|
||
function WebSocketClient(url) {
|
||
_classCallCheck(this, WebSocketClient);
|
||
this.client = new WebSocket(url);
|
||
this.client.onerror = function (error) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_0__.log.error(error);
|
||
};
|
||
}
|
||
|
||
/**
|
||
* @param {(...args: EXPECTED_ANY[]) => void} fn function
|
||
*/
|
||
return _createClass(WebSocketClient, [{
|
||
key: "onOpen",
|
||
value: function onOpen(fn) {
|
||
this.client.onopen = fn;
|
||
}
|
||
|
||
/**
|
||
* @param {(...args: EXPECTED_ANY[]) => void} fn function
|
||
*/
|
||
}, {
|
||
key: "onClose",
|
||
value: function onClose(fn) {
|
||
this.client.onclose = fn;
|
||
}
|
||
|
||
// call f with the message string as the first argument
|
||
/**
|
||
* @param {(...args: EXPECTED_ANY[]) => void} fn function
|
||
*/
|
||
}, {
|
||
key: "onMessage",
|
||
value: function onMessage(fn) {
|
||
this.client.onmessage = function (err) {
|
||
fn(err.data);
|
||
};
|
||
}
|
||
}]);
|
||
}();
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 29:
|
||
/*!************************************************************************************************************************************************************************************!*\
|
||
!*** ./node_modules/webpack-dev-server/client/index.js?protocol=wss&hostname=localhost&port=4321&pathname=%2Fws&logging=info&overlay=false&reconnect=10&hot=true&live-reload=true ***!
|
||
\************************************************************************************************************************************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
var __resourceQuery = "?protocol=wss&hostname=localhost&port=4321&pathname=%2Fws&logging=info&overlay=false&reconnect=10&hot=true&live-reload=true";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ createSocketURL: () => (/* binding */ createSocketURL),
|
||
/* harmony export */ getCurrentScriptSource: () => (/* binding */ getCurrentScriptSource),
|
||
/* harmony export */ parseURL: () => (/* binding */ parseURL)
|
||
/* harmony export */ });
|
||
/* harmony import */ var webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webpack/hot/emitter.js */ 689);
|
||
/* harmony import */ var webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0__);
|
||
/* harmony import */ var webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webpack/hot/log.js */ 509);
|
||
/* harmony import */ var webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_1__);
|
||
/* harmony import */ var _overlay_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./overlay.js */ 887);
|
||
/* harmony import */ var _progress_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./progress.js */ 40);
|
||
/* harmony import */ var _socket_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./socket.js */ 930);
|
||
/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/log.js */ 43);
|
||
/* harmony import */ var _utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/sendMessage.js */ 912);
|
||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||
/* global __resourceQuery, __webpack_hash__ */
|
||
// @ts-expect-error
|
||
|
||
// @ts-expect-error
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// eslint-disable-next-line jsdoc/no-restricted-syntax
|
||
/** @typedef {any} EXPECTED_ANY */
|
||
|
||
/**
|
||
* @typedef {object} RawOverlayOptions
|
||
* @property {string=} warnings warnings
|
||
* @property {string=} errors errors
|
||
* @property {string=} runtimeErrors runtime errors
|
||
* @property {string=} trustedTypesPolicyName trusted types policy name
|
||
*/
|
||
|
||
/**
|
||
* @typedef {object} OverlayOptions
|
||
* @property {(boolean | ((error: Error) => boolean))=} warnings warnings
|
||
* @property {(boolean | ((error: Error) => boolean))=} errors errors
|
||
* @property {(boolean | ((error: Error) => boolean))=} runtimeErrors runtime errors
|
||
* @property {string=} trustedTypesPolicyName trusted types policy name
|
||
*/
|
||
|
||
/** @typedef {false | true | "none" | "error" | "warn" | "info" | "log" | "verbose"} LogLevel */
|
||
|
||
/**
|
||
* @typedef {object} Options
|
||
* @property {boolean} hot true when hot enabled, otherwise false
|
||
* @property {boolean} liveReload true when live reload enabled, otherwise false
|
||
* @property {boolean} progress true when need to show progress, otherwise false
|
||
* @property {boolean | OverlayOptions} overlay overlay options
|
||
* @property {LogLevel=} logging logging level
|
||
* @property {number=} reconnect count of allowed reconnection
|
||
*/
|
||
|
||
/**
|
||
* @typedef {object} Status
|
||
* @property {boolean} isUnloading true when unloaded, otherwise false
|
||
* @property {string} currentHash current hash
|
||
* @property {string=} previousHash previous hash
|
||
*/
|
||
|
||
/**
|
||
* @param {boolean | RawOverlayOptions | OverlayOptions} overlayOptions overlay options
|
||
*/
|
||
var decodeOverlayOptions = function decodeOverlayOptions(overlayOptions) {
|
||
if (_typeof(overlayOptions) === "object") {
|
||
var requiredOptions = ["warnings", "errors", "runtimeErrors"];
|
||
for (var i = 0; i < requiredOptions.length; i++) {
|
||
var property = /** @type {keyof Omit<RawOverlayOptions, "trustedTypesPolicyName">} */
|
||
requiredOptions[i];
|
||
if (typeof overlayOptions[property] === "string") {
|
||
var overlayFilterFunctionString = decodeURIComponent(overlayOptions[property]);
|
||
|
||
/** @type {OverlayOptions} */
|
||
overlayOptions[property] = /** @type {(error: Error) => boolean} */
|
||
// eslint-disable-next-line no-new-func
|
||
new Function("message", "var callback = ".concat(overlayFilterFunctionString, "\n return callback(message)"));
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
/**
|
||
* @type {Status}
|
||
*/
|
||
var status = {
|
||
isUnloading: false,
|
||
currentHash: __webpack_require__.h()
|
||
};
|
||
|
||
/**
|
||
* @returns {string} current script source
|
||
*/
|
||
var getCurrentScriptSource = function getCurrentScriptSource() {
|
||
// `document.currentScript` is the most accurate way to find the current script,
|
||
// but is not supported in all browsers.
|
||
if (document.currentScript) {
|
||
return /** @type {string} */document.currentScript.getAttribute("src");
|
||
}
|
||
|
||
// Fallback to getting all scripts running in the document.
|
||
var scriptElements = document.scripts || [];
|
||
var scriptElementsWithSrc = Array.prototype.filter.call(scriptElements, function (element) {
|
||
return element.getAttribute("src");
|
||
});
|
||
if (scriptElementsWithSrc.length > 0) {
|
||
var currentScript = scriptElementsWithSrc[scriptElementsWithSrc.length - 1];
|
||
return currentScript.getAttribute("src");
|
||
}
|
||
|
||
// Fail as there was no script to use.
|
||
throw new Error("[webpack-dev-server] Failed to get current script source.");
|
||
};
|
||
|
||
/** @typedef {{ hot?: string, ["live-reload"]?: string, progress?: string, reconnect?: string, logging?: LogLevel, overlay?: string, fromCurrentScript?: boolean }} AdditionalParsedURL */
|
||
/** @typedef {Partial<URL> & AdditionalParsedURL} ParsedURL */
|
||
|
||
/**
|
||
* @param {string} resourceQuery resource query
|
||
* @returns {ParsedURL} parsed URL
|
||
*/
|
||
var parseURL = function parseURL(resourceQuery) {
|
||
/** @type {ParsedURL} */
|
||
var result = {};
|
||
if (typeof resourceQuery === "string" && resourceQuery !== "") {
|
||
var searchParams = resourceQuery.slice(1).split("&");
|
||
for (var i = 0; i < searchParams.length; i++) {
|
||
var pair = searchParams[i].split("=");
|
||
|
||
/** @type {EXPECTED_ANY} */
|
||
result[pair[0]] = decodeURIComponent(pair[1]);
|
||
}
|
||
} else {
|
||
// Else, get the url from the <script> this file was called with.
|
||
var scriptSource = getCurrentScriptSource();
|
||
var scriptSourceURL;
|
||
try {
|
||
// The placeholder `baseURL` with `window.location.href`,
|
||
// is to allow parsing of path-relative or protocol-relative URLs,
|
||
// and will have no effect if `scriptSource` is a fully valid URL.
|
||
scriptSourceURL = new URL(scriptSource, self.location.href);
|
||
} catch (_err) {
|
||
// URL parsing failed, do nothing.
|
||
// We will still proceed to see if we can recover using `resourceQuery`
|
||
}
|
||
if (scriptSourceURL) {
|
||
result = scriptSourceURL;
|
||
result.fromCurrentScript = true;
|
||
}
|
||
}
|
||
return result;
|
||
};
|
||
var parsedResourceQuery = parseURL(__resourceQuery);
|
||
|
||
/** @typedef {{ ["Hot Module Replacement"]: boolean, ["Live Reloading"]: boolean, Progress: boolean, Overlay: boolean }} Features */
|
||
|
||
/** @type {Features} */
|
||
var enabledFeatures = {
|
||
"Hot Module Replacement": false,
|
||
"Live Reloading": false,
|
||
Progress: false,
|
||
Overlay: false
|
||
};
|
||
|
||
/** @type {Options} */
|
||
var options = {
|
||
hot: false,
|
||
liveReload: false,
|
||
progress: false,
|
||
overlay: false
|
||
};
|
||
if (parsedResourceQuery.hot === "true") {
|
||
options.hot = true;
|
||
enabledFeatures["Hot Module Replacement"] = true;
|
||
}
|
||
if (parsedResourceQuery["live-reload"] === "true") {
|
||
options.liveReload = true;
|
||
enabledFeatures["Live Reloading"] = true;
|
||
}
|
||
if (parsedResourceQuery.progress === "true") {
|
||
options.progress = true;
|
||
enabledFeatures.Progress = true;
|
||
}
|
||
if (parsedResourceQuery.overlay) {
|
||
try {
|
||
options.overlay = JSON.parse(parsedResourceQuery.overlay);
|
||
} catch (err) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.error("Error parsing overlay options from resource query:", err);
|
||
}
|
||
|
||
// Fill in default "true" params for partially-specified objects.
|
||
if (_typeof(options.overlay) === "object") {
|
||
options.overlay = _objectSpread({
|
||
errors: true,
|
||
warnings: true,
|
||
runtimeErrors: true
|
||
}, options.overlay);
|
||
decodeOverlayOptions(options.overlay);
|
||
}
|
||
enabledFeatures.Overlay = options.overlay !== false;
|
||
}
|
||
if (parsedResourceQuery.logging) {
|
||
options.logging = parsedResourceQuery.logging;
|
||
}
|
||
if (typeof parsedResourceQuery.reconnect !== "undefined") {
|
||
options.reconnect = Number(parsedResourceQuery.reconnect);
|
||
}
|
||
|
||
/**
|
||
* @param {false | true | "none" | "error" | "warn" | "info" | "log" | "verbose"} level level
|
||
*/
|
||
var setAllLogLevel = function setAllLogLevel(level) {
|
||
// This is needed because the HMR logger operate separately from dev server logger
|
||
webpack_hot_log_js__WEBPACK_IMPORTED_MODULE_1___default().setLogLevel(level === "verbose" || level === "log" ? "info" : level);
|
||
(0,_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.setLogLevel)(level);
|
||
};
|
||
if (options.logging) {
|
||
setAllLogLevel(options.logging);
|
||
}
|
||
|
||
/**
|
||
* @param {Features} features features
|
||
*/
|
||
var logEnabledFeatures = function logEnabledFeatures(features) {
|
||
var listEnabledFeatures = Object.keys(features);
|
||
if (!features || listEnabledFeatures.length === 0) {
|
||
return;
|
||
}
|
||
var logString = "Server started:";
|
||
|
||
// Server started: Hot Module Replacement enabled, Live Reloading enabled, Overlay disabled.
|
||
for (var i = 0; i < listEnabledFeatures.length; i++) {
|
||
var key = /** @type {keyof Features} */listEnabledFeatures[i];
|
||
logString += " ".concat(key, " ").concat(features[key] ? "enabled" : "disabled", ",");
|
||
}
|
||
// replace last comma with a period
|
||
logString = logString.slice(0, -1).concat(".");
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info(logString);
|
||
};
|
||
logEnabledFeatures(enabledFeatures);
|
||
self.addEventListener("beforeunload", function () {
|
||
status.isUnloading = true;
|
||
});
|
||
var overlay = typeof window !== "undefined" ? (0,_overlay_js__WEBPACK_IMPORTED_MODULE_2__.createOverlay)(_typeof(options.overlay) === "object" ? {
|
||
trustedTypesPolicyName: options.overlay.trustedTypesPolicyName,
|
||
catchRuntimeError: options.overlay.runtimeErrors
|
||
} : {
|
||
trustedTypesPolicyName: false,
|
||
catchRuntimeError: options.overlay
|
||
}) : {
|
||
send: function send() {}
|
||
};
|
||
|
||
/**
|
||
* @param {Options} options options
|
||
* @param {Status} currentStatus current status
|
||
*/
|
||
var reloadApp = function reloadApp(_ref, currentStatus) {
|
||
var hot = _ref.hot,
|
||
liveReload = _ref.liveReload;
|
||
if (currentStatus.isUnloading) {
|
||
return;
|
||
}
|
||
var currentHash = currentStatus.currentHash,
|
||
previousHash = currentStatus.previousHash;
|
||
var isInitial = currentHash.indexOf(/** @type {string} */previousHash) >= 0;
|
||
if (isInitial) {
|
||
return;
|
||
}
|
||
|
||
/**
|
||
* @param {Window} rootWindow root window
|
||
* @param {number} intervalId interval id
|
||
*/
|
||
function applyReload(rootWindow, intervalId) {
|
||
clearInterval(intervalId);
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("App updated. Reloading...");
|
||
rootWindow.location.reload();
|
||
}
|
||
var search = self.location.search.toLowerCase();
|
||
var allowToHot = search.indexOf("webpack-dev-server-hot=false") === -1;
|
||
var allowToLiveReload = search.indexOf("webpack-dev-server-live-reload=false") === -1;
|
||
if (hot && allowToHot) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("App hot update...");
|
||
if (typeof EventTarget !== "undefined" && (webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0___default()) instanceof EventTarget) {
|
||
var event = new CustomEvent("webpackHotUpdate", {
|
||
detail: {
|
||
currentHash: currentStatus.currentHash
|
||
},
|
||
bubbles: true,
|
||
cancelable: false
|
||
});
|
||
webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0___default().dispatchEvent(event);
|
||
} else {
|
||
webpack_hot_emitter_js__WEBPACK_IMPORTED_MODULE_0___default().emit("webpackHotUpdate", currentStatus.currentHash);
|
||
}
|
||
if (typeof self !== "undefined" && self.window) {
|
||
// broadcast update to window
|
||
self.postMessage("webpackHotUpdate".concat(currentStatus.currentHash), "*");
|
||
}
|
||
}
|
||
// allow refreshing the page only if liveReload isn't disabled
|
||
else if (liveReload && allowToLiveReload) {
|
||
/** @type {Window} */
|
||
var rootWindow = self;
|
||
|
||
// use parent window for reload (in case we're in an iframe with no valid src)
|
||
var intervalId = self.setInterval(function () {
|
||
if (rootWindow.location.protocol !== "about:") {
|
||
// reload immediately if protocol is valid
|
||
applyReload(rootWindow, intervalId);
|
||
} else {
|
||
rootWindow = rootWindow.parent;
|
||
if (rootWindow.parent === rootWindow) {
|
||
// if parent equals current window we've reached the root which would continue forever, so trigger a reload anyways
|
||
applyReload(rootWindow, intervalId);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
};
|
||
var ansiRegex = new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"), "g");
|
||
|
||
/**
|
||
* Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
|
||
* Adapted from code originally released by Sindre Sorhus
|
||
* Licensed the MIT License
|
||
* @param {string} string string
|
||
* @returns {string} string without ansi
|
||
*/
|
||
var stripAnsi = function stripAnsi(string) {
|
||
if (typeof string !== "string") {
|
||
throw new TypeError("Expected a `string`, got `".concat(_typeof(string), "`"));
|
||
}
|
||
return string.replace(ansiRegex, "");
|
||
};
|
||
var onSocketMessage = {
|
||
hot: function hot() {
|
||
if (parsedResourceQuery.hot === "false") {
|
||
return;
|
||
}
|
||
options.hot = true;
|
||
},
|
||
liveReload: function liveReload() {
|
||
if (parsedResourceQuery["live-reload"] === "false") {
|
||
return;
|
||
}
|
||
options.liveReload = true;
|
||
},
|
||
invalid: function invalid() {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("App updated. Recompiling...");
|
||
|
||
// Fixes #1042. overlay doesn't clear if errors are fixed but warnings remain.
|
||
if (options.overlay) {
|
||
overlay.send({
|
||
type: "DISMISS"
|
||
});
|
||
}
|
||
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Invalid");
|
||
},
|
||
/**
|
||
* @param {string} hash hash
|
||
*/
|
||
hash: function hash(_hash) {
|
||
status.previousHash = status.currentHash;
|
||
status.currentHash = _hash;
|
||
},
|
||
logging: setAllLogLevel,
|
||
/**
|
||
* @param {boolean} value overlay value
|
||
*/
|
||
overlay: function overlay(value) {
|
||
if (typeof document === "undefined") {
|
||
return;
|
||
}
|
||
options.overlay = value;
|
||
decodeOverlayOptions(options.overlay);
|
||
},
|
||
/**
|
||
* @param {number} value reconnect value
|
||
*/
|
||
reconnect: function reconnect(value) {
|
||
if (parsedResourceQuery.reconnect === "false") {
|
||
return;
|
||
}
|
||
options.reconnect = value;
|
||
},
|
||
/**
|
||
* @param {boolean} value progress value
|
||
*/
|
||
progress: function progress(value) {
|
||
options.progress = value;
|
||
},
|
||
/**
|
||
* @param {{ pluginName?: string, percent: string, msg: string }} data date with progress
|
||
*/
|
||
"progress-update": function progressUpdate(data) {
|
||
if (options.progress) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("".concat(data.pluginName ? "[".concat(data.pluginName, "] ") : "").concat(data.percent, "% - ").concat(data.msg, "."));
|
||
}
|
||
if ((0,_progress_js__WEBPACK_IMPORTED_MODULE_6__.isProgressSupported)() && typeof options.progress === "string") {
|
||
var progress = document.querySelector("wds-progress");
|
||
if (!progress) {
|
||
(0,_progress_js__WEBPACK_IMPORTED_MODULE_6__.defineProgressElement)();
|
||
progress = document.createElement("wds-progress");
|
||
document.body.appendChild(progress);
|
||
}
|
||
progress.setAttribute("progress", data.percent);
|
||
progress.setAttribute("type", options.progress);
|
||
}
|
||
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Progress", data);
|
||
},
|
||
"still-ok": function stillOk() {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("Nothing changed.");
|
||
if (options.overlay) {
|
||
overlay.send({
|
||
type: "DISMISS"
|
||
});
|
||
}
|
||
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("StillOk");
|
||
},
|
||
ok: function ok() {
|
||
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Ok");
|
||
if (options.overlay) {
|
||
overlay.send({
|
||
type: "DISMISS"
|
||
});
|
||
}
|
||
reloadApp(options, status);
|
||
},
|
||
/**
|
||
* @param {string} file changed file
|
||
*/
|
||
"static-changed": function staticChanged(file) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));
|
||
self.location.reload();
|
||
},
|
||
/**
|
||
* @param {Error[]} warnings warnings
|
||
* @param {{ preventReloading: boolean }=} params extra params
|
||
*/
|
||
warnings: function warnings(_warnings, params) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.warn("Warnings while compiling.");
|
||
var printableWarnings = _warnings.map(function (error) {
|
||
var _formatProblem = (0,_overlay_js__WEBPACK_IMPORTED_MODULE_2__.formatProblem)("warning", error),
|
||
header = _formatProblem.header,
|
||
body = _formatProblem.body;
|
||
return "".concat(header, "\n").concat(stripAnsi(body));
|
||
});
|
||
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Warnings", printableWarnings);
|
||
for (var i = 0; i < printableWarnings.length; i++) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.warn(printableWarnings[i]);
|
||
}
|
||
var overlayWarningsSetting = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.warnings;
|
||
if (overlayWarningsSetting) {
|
||
var warningsToDisplay = typeof overlayWarningsSetting === "function" ? _warnings.filter(overlayWarningsSetting) : _warnings;
|
||
if (warningsToDisplay.length) {
|
||
overlay.send({
|
||
type: "BUILD_ERROR",
|
||
level: "warning",
|
||
messages: _warnings
|
||
});
|
||
}
|
||
}
|
||
if (params && params.preventReloading) {
|
||
return;
|
||
}
|
||
reloadApp(options, status);
|
||
},
|
||
/**
|
||
* @param {Error[]} errors errors
|
||
*/
|
||
errors: function errors(_errors) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.error("Errors while compiling. Reload prevented.");
|
||
var printableErrors = _errors.map(function (error) {
|
||
var _formatProblem2 = (0,_overlay_js__WEBPACK_IMPORTED_MODULE_2__.formatProblem)("error", error),
|
||
header = _formatProblem2.header,
|
||
body = _formatProblem2.body;
|
||
return "".concat(header, "\n").concat(stripAnsi(body));
|
||
});
|
||
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Errors", printableErrors);
|
||
for (var i = 0; i < printableErrors.length; i++) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.error(printableErrors[i]);
|
||
}
|
||
var overlayErrorsSettings = typeof options.overlay === "boolean" ? options.overlay : options.overlay && options.overlay.errors;
|
||
if (overlayErrorsSettings) {
|
||
var errorsToDisplay = typeof overlayErrorsSettings === "function" ? _errors.filter(overlayErrorsSettings) : _errors;
|
||
if (errorsToDisplay.length) {
|
||
overlay.send({
|
||
type: "BUILD_ERROR",
|
||
level: "error",
|
||
messages: _errors
|
||
});
|
||
}
|
||
}
|
||
},
|
||
/**
|
||
* @param {Error} error error
|
||
*/
|
||
error: function error(_error) {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.error(_error);
|
||
},
|
||
close: function close() {
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_4__.log.info("Disconnected!");
|
||
if (options.overlay) {
|
||
overlay.send({
|
||
type: "DISMISS"
|
||
});
|
||
}
|
||
(0,_utils_sendMessage_js__WEBPACK_IMPORTED_MODULE_5__["default"])("Close");
|
||
}
|
||
};
|
||
|
||
/**
|
||
* @param {{ protocol?: string, auth?: string, hostname?: string, port?: string, pathname?: string, search?: string, hash?: string, slashes?: boolean }} objURL object URL
|
||
* @returns {string} formatted url
|
||
*/
|
||
var formatURL = function formatURL(objURL) {
|
||
var protocol = objURL.protocol || "";
|
||
if (protocol && protocol.slice(-1) !== ":") {
|
||
protocol += ":";
|
||
}
|
||
var auth = objURL.auth || "";
|
||
if (auth) {
|
||
auth = encodeURIComponent(auth);
|
||
auth = auth.replace(/%3A/i, ":");
|
||
auth += "@";
|
||
}
|
||
var host = "";
|
||
if (objURL.hostname) {
|
||
host = auth + (objURL.hostname.indexOf(":") === -1 ? objURL.hostname : "[".concat(objURL.hostname, "]"));
|
||
if (objURL.port) {
|
||
host += ":".concat(objURL.port);
|
||
}
|
||
}
|
||
var pathname = objURL.pathname || "";
|
||
if (objURL.slashes) {
|
||
host = "//".concat(host || "");
|
||
if (pathname && pathname.charAt(0) !== "/") {
|
||
pathname = "/".concat(pathname);
|
||
}
|
||
} else if (!host) {
|
||
host = "";
|
||
}
|
||
var search = objURL.search || "";
|
||
if (search && search.charAt(0) !== "?") {
|
||
search = "?".concat(search);
|
||
}
|
||
var hash = objURL.hash || "";
|
||
if (hash && hash.charAt(0) !== "#") {
|
||
hash = "#".concat(hash);
|
||
}
|
||
pathname = pathname.replace(/[?#]/g,
|
||
/**
|
||
* @param {string} match matched string
|
||
* @returns {string} encoded URI component
|
||
*/
|
||
function (match) {
|
||
return encodeURIComponent(match);
|
||
});
|
||
search = search.replace("#", "%23");
|
||
return "".concat(protocol).concat(host).concat(pathname).concat(search).concat(hash);
|
||
};
|
||
|
||
/**
|
||
* @param {ParsedURL} parsedURL parsed URL
|
||
* @returns {string} socket URL
|
||
*/
|
||
var createSocketURL = function createSocketURL(parsedURL) {
|
||
var hostname = parsedURL.hostname;
|
||
|
||
// Node.js module parses it as `::`
|
||
// `new URL(urlString, [baseURLString])` parses it as '[::]'
|
||
var isInAddrAny = hostname === "0.0.0.0" || hostname === "::" || hostname === "[::]";
|
||
|
||
// why do we need this check?
|
||
// hostname n/a for file protocol (example, when using electron, ionic)
|
||
// see: https://github.com/webpack/webpack-dev-server/pull/384
|
||
if (isInAddrAny && self.location.hostname && self.location.protocol.indexOf("http") === 0) {
|
||
hostname = self.location.hostname;
|
||
}
|
||
var socketURLProtocol = parsedURL.protocol || self.location.protocol;
|
||
|
||
// When https is used in the app, secure web sockets are always necessary because the browser doesn't accept non-secure web sockets.
|
||
if (socketURLProtocol === "auto:" || hostname && isInAddrAny && self.location.protocol === "https:") {
|
||
socketURLProtocol = self.location.protocol;
|
||
}
|
||
socketURLProtocol = socketURLProtocol.replace(/^(?:http|.+-extension|file)/i, "ws");
|
||
var socketURLAuth = "";
|
||
|
||
// `new URL(urlString, [baseURLstring])` doesn't have `auth` property
|
||
// Parse authentication credentials in case we need them
|
||
if (parsedURL.username) {
|
||
socketURLAuth = parsedURL.username;
|
||
|
||
// Since HTTP basic authentication does not allow empty username,
|
||
// we only include password if the username is not empty.
|
||
if (parsedURL.password) {
|
||
// Result: <username>:<password>
|
||
socketURLAuth = socketURLAuth.concat(":", parsedURL.password);
|
||
}
|
||
}
|
||
|
||
// In case the host is a raw IPv6 address, it can be enclosed in
|
||
// the brackets as the brackets are needed in the final URL string.
|
||
// Need to remove those as url.format blindly adds its own set of brackets
|
||
// if the host string contains colons. That would lead to non-working
|
||
// double brackets (e.g. [[::]]) host
|
||
//
|
||
// All of these web socket url params are optionally passed in through resourceQuery,
|
||
// so we need to fall back to the default if they are not provided
|
||
var socketURLHostname = (hostname || self.location.hostname || "localhost").replace(/^\[(.*)\]$/, "$1");
|
||
var socketURLPort = parsedURL.port;
|
||
if (!socketURLPort || socketURLPort === "0") {
|
||
socketURLPort = self.location.port;
|
||
}
|
||
|
||
// If path is provided it'll be passed in via the resourceQuery as a
|
||
// query param so it has to be parsed out of the querystring in order for the
|
||
// client to open the socket to the correct location.
|
||
var socketURLPathname = "/ws";
|
||
if (parsedURL.pathname && !parsedURL.fromCurrentScript) {
|
||
socketURLPathname = parsedURL.pathname;
|
||
}
|
||
return formatURL({
|
||
protocol: socketURLProtocol,
|
||
auth: socketURLAuth,
|
||
hostname: socketURLHostname,
|
||
port: socketURLPort,
|
||
pathname: socketURLPathname,
|
||
slashes: true
|
||
});
|
||
};
|
||
var socketURL = createSocketURL(parsedResourceQuery);
|
||
(0,_socket_js__WEBPACK_IMPORTED_MODULE_3__["default"])(socketURL, onSocketMessage, options.reconnect);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 970:
|
||
/*!************************************************************************!*\
|
||
!*** ./node_modules/webpack-dev-server/client/modules/logger/index.js ***!
|
||
\************************************************************************/
|
||
/***/ ((__unused_webpack_module, exports) => {
|
||
|
||
/******/ (function() { // webpackBootstrap
|
||
/******/ "use strict";
|
||
/******/ var __webpack_modules__ = ({
|
||
|
||
/***/ "./client-src/modules/logger/tapable.js":
|
||
/*!**********************************************!*\
|
||
!*** ./client-src/modules/logger/tapable.js ***!
|
||
\**********************************************/
|
||
/***/ (function(__unused_webpack_module, __nested_webpack_exports__, __nested_webpack_require_372__) {
|
||
|
||
__nested_webpack_require_372__.r(__nested_webpack_exports__);
|
||
/* harmony export */ __nested_webpack_require_372__.d(__nested_webpack_exports__, {
|
||
/* harmony export */ SyncBailHook: function() { return /* binding */ SyncBailHook; }
|
||
/* harmony export */ });
|
||
/**
|
||
* @returns {SyncBailHook} mocked sync bail hook
|
||
* @constructor
|
||
*/
|
||
function SyncBailHook() {
|
||
return {
|
||
call: function call() {}
|
||
};
|
||
}
|
||
|
||
/**
|
||
* Client stub for tapable SyncBailHook
|
||
*/
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/webpack/lib/logging/Logger.js":
|
||
/*!****************************************************!*\
|
||
!*** ./node_modules/webpack/lib/logging/Logger.js ***!
|
||
\****************************************************/
|
||
/***/ (function(module) {
|
||
|
||
/*
|
||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||
Author Tobias Koppers @sokra
|
||
*/
|
||
|
||
|
||
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
|
||
return _typeof = "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && "symbol" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator ? function (o) {
|
||
return typeof o;
|
||
} : function (o) {
|
||
return o && "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o.constructor === (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o !== (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).prototype ? "symbol" : typeof o;
|
||
}, _typeof(o);
|
||
}
|
||
function _toConsumableArray(r) {
|
||
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
||
}
|
||
function _nonIterableSpread() {
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
function _unsupportedIterableToArray(r, a) {
|
||
if (r) {
|
||
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
||
var t = {}.toString.call(r).slice(8, -1);
|
||
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;
|
||
}
|
||
}
|
||
function _iterableToArray(r) {
|
||
if ("undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && null != r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || null != r["@@iterator"]) return Array.from(r);
|
||
}
|
||
function _arrayWithoutHoles(r) {
|
||
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
||
}
|
||
function _arrayLikeToArray(r, a) {
|
||
(null == a || a > r.length) && (a = r.length);
|
||
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
||
return n;
|
||
}
|
||
function _classCallCheck(a, n) {
|
||
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
||
}
|
||
function _defineProperties(e, r) {
|
||
for (var t = 0; t < r.length; t++) {
|
||
var o = r[t];
|
||
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
||
}
|
||
}
|
||
function _createClass(e, r, t) {
|
||
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
||
writable: !1
|
||
}), e;
|
||
}
|
||
function _toPropertyKey(t) {
|
||
var i = _toPrimitive(t, "string");
|
||
return "symbol" == _typeof(i) ? i : i + "";
|
||
}
|
||
function _toPrimitive(t, r) {
|
||
if ("object" != _typeof(t) || !t) return t;
|
||
var e = t[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive];
|
||
if (void 0 !== e) {
|
||
var i = e.call(t, r || "default");
|
||
if ("object" != _typeof(i)) return i;
|
||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||
}
|
||
return ("string" === r ? String : Number)(t);
|
||
}
|
||
var LogType = Object.freeze({
|
||
error: (/** @type {"error"} */"error"),
|
||
// message, c style arguments
|
||
warn: (/** @type {"warn"} */"warn"),
|
||
// message, c style arguments
|
||
info: (/** @type {"info"} */"info"),
|
||
// message, c style arguments
|
||
log: (/** @type {"log"} */"log"),
|
||
// message, c style arguments
|
||
debug: (/** @type {"debug"} */"debug"),
|
||
// message, c style arguments
|
||
|
||
trace: (/** @type {"trace"} */"trace"),
|
||
// no arguments
|
||
|
||
group: (/** @type {"group"} */"group"),
|
||
// [label]
|
||
groupCollapsed: (/** @type {"groupCollapsed"} */"groupCollapsed"),
|
||
// [label]
|
||
groupEnd: (/** @type {"groupEnd"} */"groupEnd"),
|
||
// [label]
|
||
|
||
profile: (/** @type {"profile"} */"profile"),
|
||
// [profileName]
|
||
profileEnd: (/** @type {"profileEnd"} */"profileEnd"),
|
||
// [profileName]
|
||
|
||
time: (/** @type {"time"} */"time"),
|
||
// name, time as [seconds, nanoseconds]
|
||
|
||
clear: (/** @type {"clear"} */"clear"),
|
||
// no arguments
|
||
status: (/** @type {"status"} */"status") // message, arguments
|
||
});
|
||
module.exports.LogType = LogType;
|
||
|
||
/** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */
|
||
/** @typedef {Map<string | undefined, [number, number]>} TimersMap */
|
||
|
||
var LOG_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger raw log method");
|
||
var TIMERS_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger times");
|
||
var TIMERS_AGGREGATES_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger aggregated times");
|
||
|
||
/** @typedef {EXPECTED_ANY[]} Args */
|
||
/** @typedef {(type: LogTypeEnum, args?: Args) => void} LogFn */
|
||
/** @typedef {(name: string | (() => string)) => WebpackLogger} GetChildLogger */
|
||
var WebpackLogger = /*#__PURE__*/function () {
|
||
/**
|
||
* Creates an instance of WebpackLogger.
|
||
* @param {LogFn} log log function
|
||
* @param {GetChildLogger} getChildLogger function to create child logger
|
||
*/
|
||
function WebpackLogger(log, getChildLogger) {
|
||
_classCallCheck(this, WebpackLogger);
|
||
/** @type {LogFn} */
|
||
this[LOG_SYMBOL] = log;
|
||
/** @type {GetChildLogger} */
|
||
this.getChildLogger = getChildLogger;
|
||
}
|
||
|
||
/**
|
||
* Processes the provided arg.
|
||
* @param {Args} args args
|
||
*/
|
||
return _createClass(WebpackLogger, [{
|
||
key: "error",
|
||
value: function error() {
|
||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||
args[_key] = arguments[_key];
|
||
}
|
||
this[LOG_SYMBOL](LogType.error, args);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided arg.
|
||
* @param {Args} args args
|
||
*/
|
||
}, {
|
||
key: "warn",
|
||
value: function warn() {
|
||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
||
args[_key2] = arguments[_key2];
|
||
}
|
||
this[LOG_SYMBOL](LogType.warn, args);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided arg.
|
||
* @param {Args} args args
|
||
*/
|
||
}, {
|
||
key: "info",
|
||
value: function info() {
|
||
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
||
args[_key3] = arguments[_key3];
|
||
}
|
||
this[LOG_SYMBOL](LogType.info, args);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided arg.
|
||
* @param {Args} args args
|
||
*/
|
||
}, {
|
||
key: "log",
|
||
value: function log() {
|
||
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
||
args[_key4] = arguments[_key4];
|
||
}
|
||
this[LOG_SYMBOL](LogType.log, args);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided arg.
|
||
* @param {Args} args args
|
||
*/
|
||
}, {
|
||
key: "debug",
|
||
value: function debug() {
|
||
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
||
args[_key5] = arguments[_key5];
|
||
}
|
||
this[LOG_SYMBOL](LogType.debug, args);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided condition.
|
||
* @param {boolean=} condition condition
|
||
* @param {Args} args args
|
||
*/
|
||
}, {
|
||
key: "assert",
|
||
value: function assert(condition) {
|
||
if (!condition) {
|
||
for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
|
||
args[_key6 - 1] = arguments[_key6];
|
||
}
|
||
this[LOG_SYMBOL](LogType.error, args);
|
||
}
|
||
}
|
||
}, {
|
||
key: "trace",
|
||
value: function trace() {
|
||
this[LOG_SYMBOL](LogType.trace, ["Trace"]);
|
||
}
|
||
}, {
|
||
key: "clear",
|
||
value: function clear() {
|
||
this[LOG_SYMBOL](LogType.clear);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided arg.
|
||
* @param {Args} args args
|
||
*/
|
||
}, {
|
||
key: "status",
|
||
value: function status() {
|
||
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
||
args[_key7] = arguments[_key7];
|
||
}
|
||
this[LOG_SYMBOL](LogType.status, args);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided arg.
|
||
* @param {Args} args args
|
||
*/
|
||
}, {
|
||
key: "group",
|
||
value: function group() {
|
||
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
||
args[_key8] = arguments[_key8];
|
||
}
|
||
this[LOG_SYMBOL](LogType.group, args);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided arg.
|
||
* @param {Args} args args
|
||
*/
|
||
}, {
|
||
key: "groupCollapsed",
|
||
value: function groupCollapsed() {
|
||
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
||
args[_key9] = arguments[_key9];
|
||
}
|
||
this[LOG_SYMBOL](LogType.groupCollapsed, args);
|
||
}
|
||
}, {
|
||
key: "groupEnd",
|
||
value: function groupEnd() {
|
||
this[LOG_SYMBOL](LogType.groupEnd);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided label.
|
||
* @param {string=} label label
|
||
*/
|
||
}, {
|
||
key: "profile",
|
||
value: function profile(label) {
|
||
this[LOG_SYMBOL](LogType.profile, [label]);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided label.
|
||
* @param {string=} label label
|
||
*/
|
||
}, {
|
||
key: "profileEnd",
|
||
value: function profileEnd(label) {
|
||
this[LOG_SYMBOL](LogType.profileEnd, [label]);
|
||
}
|
||
|
||
/**
|
||
* Processes the provided label.
|
||
* @param {string} label label
|
||
*/
|
||
}, {
|
||
key: "time",
|
||
value: function time(label) {
|
||
/** @type {TimersMap} */
|
||
this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map();
|
||
this[TIMERS_SYMBOL].set(label, process.hrtime());
|
||
}
|
||
|
||
/**
|
||
* Processes the provided label.
|
||
* @param {string=} label label
|
||
*/
|
||
}, {
|
||
key: "timeLog",
|
||
value: function timeLog(label) {
|
||
var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
||
if (!prev) {
|
||
throw new Error("No such label '".concat(label, "' for WebpackLogger.timeLog()"));
|
||
}
|
||
var time = process.hrtime(prev);
|
||
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
||
}
|
||
|
||
/**
|
||
* Processes the provided label.
|
||
* @param {string=} label label
|
||
*/
|
||
}, {
|
||
key: "timeEnd",
|
||
value: function timeEnd(label) {
|
||
var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
||
if (!prev) {
|
||
throw new Error("No such label '".concat(label, "' for WebpackLogger.timeEnd()"));
|
||
}
|
||
var time = process.hrtime(prev);
|
||
/** @type {TimersMap} */
|
||
this[TIMERS_SYMBOL].delete(label);
|
||
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
||
}
|
||
|
||
/**
|
||
* Processes the provided label.
|
||
* @param {string=} label label
|
||
*/
|
||
}, {
|
||
key: "timeAggregate",
|
||
value: function timeAggregate(label) {
|
||
var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
||
if (!prev) {
|
||
throw new Error("No such label '".concat(label, "' for WebpackLogger.timeAggregate()"));
|
||
}
|
||
var time = process.hrtime(prev);
|
||
/** @type {TimersMap} */
|
||
this[TIMERS_SYMBOL].delete(label);
|
||
/** @type {TimersMap} */
|
||
this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map();
|
||
var current = this[TIMERS_AGGREGATES_SYMBOL].get(label);
|
||
if (current !== undefined) {
|
||
if (time[1] + current[1] > 1e9) {
|
||
time[0] += current[0] + 1;
|
||
time[1] = time[1] - 1e9 + current[1];
|
||
} else {
|
||
time[0] += current[0];
|
||
time[1] += current[1];
|
||
}
|
||
}
|
||
this[TIMERS_AGGREGATES_SYMBOL].set(label, time);
|
||
}
|
||
|
||
/**
|
||
* Time aggregate end.
|
||
* @param {string=} label label
|
||
*/
|
||
}, {
|
||
key: "timeAggregateEnd",
|
||
value: function timeAggregateEnd(label) {
|
||
if (this[TIMERS_AGGREGATES_SYMBOL] === undefined) return;
|
||
var time = this[TIMERS_AGGREGATES_SYMBOL].get(label);
|
||
if (time === undefined) return;
|
||
this[TIMERS_AGGREGATES_SYMBOL].delete(label);
|
||
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
||
}
|
||
}]);
|
||
}();
|
||
module.exports.Logger = WebpackLogger;
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/webpack/lib/logging/createConsoleLogger.js":
|
||
/*!*****************************************************************!*\
|
||
!*** ./node_modules/webpack/lib/logging/createConsoleLogger.js ***!
|
||
\*****************************************************************/
|
||
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_13435__) {
|
||
|
||
/*
|
||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||
Author Tobias Koppers @sokra
|
||
*/
|
||
|
||
|
||
|
||
function _slicedToArray(r, e) {
|
||
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
||
}
|
||
function _nonIterableRest() {
|
||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
function _iterableToArrayLimit(r, l) {
|
||
var t = null == r ? null : "undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || r["@@iterator"];
|
||
if (null != t) {
|
||
var e,
|
||
n,
|
||
i,
|
||
u,
|
||
a = [],
|
||
f = !0,
|
||
o = !1;
|
||
try {
|
||
if (i = (t = t.call(r)).next, 0 === l) {
|
||
if (Object(t) !== t) return;
|
||
f = !1;
|
||
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
||
} catch (r) {
|
||
o = !0, n = r;
|
||
} finally {
|
||
try {
|
||
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
||
} finally {
|
||
if (o) throw n;
|
||
}
|
||
}
|
||
return a;
|
||
}
|
||
}
|
||
function _arrayWithHoles(r) {
|
||
if (Array.isArray(r)) return r;
|
||
}
|
||
function _toConsumableArray(r) {
|
||
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
||
}
|
||
function _nonIterableSpread() {
|
||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||
}
|
||
function _unsupportedIterableToArray(r, a) {
|
||
if (r) {
|
||
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
||
var t = {}.toString.call(r).slice(8, -1);
|
||
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;
|
||
}
|
||
}
|
||
function _iterableToArray(r) {
|
||
if ("undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && null != r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || null != r["@@iterator"]) return Array.from(r);
|
||
}
|
||
function _arrayWithoutHoles(r) {
|
||
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
||
}
|
||
function _arrayLikeToArray(r, a) {
|
||
(null == a || a > r.length) && (a = r.length);
|
||
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
||
return n;
|
||
}
|
||
function _typeof(o) {
|
||
"@babel/helpers - typeof";
|
||
|
||
return _typeof = "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && "symbol" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator ? function (o) {
|
||
return typeof o;
|
||
} : function (o) {
|
||
return o && "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o.constructor === (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o !== (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).prototype ? "symbol" : typeof o;
|
||
}, _typeof(o);
|
||
}
|
||
var _require = __nested_webpack_require_13435__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
|
||
LogType = _require.LogType;
|
||
|
||
/** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */
|
||
/** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */
|
||
/** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */
|
||
/** @typedef {import("./Logger").Args} Args */
|
||
|
||
/** @typedef {(item: string) => boolean} FilterFunction */
|
||
/** @typedef {(value: string, type: LogTypeEnum, args?: Args) => void} LoggingFunction */
|
||
|
||
/**
|
||
* Defines the logger console type used by this module.
|
||
* @typedef {object} LoggerConsole
|
||
* @property {() => void} clear
|
||
* @property {() => void} trace
|
||
* @property {(...args: Args) => void} info
|
||
* @property {(...args: Args) => void} log
|
||
* @property {(...args: Args) => void} warn
|
||
* @property {(...args: Args) => void} error
|
||
* @property {(...args: Args) => void=} debug
|
||
* @property {(...args: Args) => void=} group
|
||
* @property {(...args: Args) => void=} groupCollapsed
|
||
* @property {(...args: Args) => void=} groupEnd
|
||
* @property {(...args: Args) => void=} status
|
||
* @property {(...args: Args) => void=} profile
|
||
* @property {(...args: Args) => void=} profileEnd
|
||
* @property {(...args: Args) => void=} logTime
|
||
*/
|
||
|
||
/**
|
||
* Defines the logger options type used by this module.
|
||
* @typedef {object} LoggerOptions
|
||
* @property {false | true | "none" | "error" | "warn" | "info" | "log" | "verbose"} level loglevel
|
||
* @property {FilterTypes | boolean} debug filter for debug logging
|
||
* @property {LoggerConsole} console the console to log to
|
||
*/
|
||
|
||
/**
|
||
* Filter to function.
|
||
* @param {FilterItemTypes} item an input item
|
||
* @returns {FilterFunction | undefined} filter function
|
||
*/
|
||
var filterToFunction = function filterToFunction(item) {
|
||
if (typeof item === "string") {
|
||
var regExp = new RegExp("[\\\\/]".concat(item.replace(/[-[\]{}()*+?.\\^$|]/g, "\\$&"), "([\\\\/]|$|!|\\?)"));
|
||
return function (ident) {
|
||
return regExp.test(ident);
|
||
};
|
||
}
|
||
if (item && _typeof(item) === "object" && typeof item.test === "function") {
|
||
return function (ident) {
|
||
return item.test(ident);
|
||
};
|
||
}
|
||
if (typeof item === "function") {
|
||
return item;
|
||
}
|
||
if (typeof item === "boolean") {
|
||
return function () {
|
||
return item;
|
||
};
|
||
}
|
||
};
|
||
|
||
/**
|
||
* Enumerates the available values.
|
||
* @enum {number}
|
||
*/
|
||
var LogLevel = {
|
||
none: 6,
|
||
false: 6,
|
||
error: 5,
|
||
warn: 4,
|
||
info: 3,
|
||
log: 2,
|
||
true: 2,
|
||
verbose: 1
|
||
};
|
||
|
||
/**
|
||
* Returns logging function.
|
||
* @param {LoggerOptions} options options object
|
||
* @returns {LoggingFunction} logging function
|
||
*/
|
||
module.exports = function (_ref) {
|
||
var _ref$level = _ref.level,
|
||
level = _ref$level === void 0 ? "info" : _ref$level,
|
||
_ref$debug = _ref.debug,
|
||
debug = _ref$debug === void 0 ? false : _ref$debug,
|
||
console = _ref.console;
|
||
var debugFilters = /** @type {FilterFunction[]} */
|
||
|
||
typeof debug === "boolean" ? [function () {
|
||
return debug;
|
||
}] : /** @type {FilterItemTypes[]} */_toConsumableArray(Array.isArray(debug) ? debug : [debug]).map(filterToFunction);
|
||
var loglevel = LogLevel["".concat(level)] || 0;
|
||
|
||
/**
|
||
* Processes the provided name.
|
||
* @param {string} name name of the logger
|
||
* @param {LogTypeEnum} type type of the log entry
|
||
* @param {Args=} args arguments of the log entry
|
||
* @returns {void}
|
||
*/
|
||
var logger = function logger(name, type, args) {
|
||
/**
|
||
* Returns labeled args.
|
||
* @template T
|
||
* @returns {[string?, ...T[]]} labeled args
|
||
*/
|
||
var labeledArgs = function labeledArgs() {
|
||
if (Array.isArray(args)) {
|
||
if (args.length > 0 && typeof args[0] === "string") {
|
||
return ["[".concat(name, "] ").concat(args[0])].concat(_toConsumableArray(args.slice(1)));
|
||
}
|
||
return ["[".concat(name, "]")].concat(_toConsumableArray(args));
|
||
}
|
||
return [];
|
||
};
|
||
var debug = debugFilters.some(function (f) {
|
||
return f(name);
|
||
});
|
||
switch (type) {
|
||
case LogType.debug:
|
||
if (!debug) return;
|
||
if (typeof console.debug === "function") {
|
||
console.debug.apply(console, _toConsumableArray(labeledArgs()));
|
||
} else {
|
||
console.log.apply(console, _toConsumableArray(labeledArgs()));
|
||
}
|
||
break;
|
||
case LogType.log:
|
||
if (!debug && loglevel > LogLevel.log) return;
|
||
console.log.apply(console, _toConsumableArray(labeledArgs()));
|
||
break;
|
||
case LogType.info:
|
||
if (!debug && loglevel > LogLevel.info) return;
|
||
console.info.apply(console, _toConsumableArray(labeledArgs()));
|
||
break;
|
||
case LogType.warn:
|
||
if (!debug && loglevel > LogLevel.warn) return;
|
||
console.warn.apply(console, _toConsumableArray(labeledArgs()));
|
||
break;
|
||
case LogType.error:
|
||
if (!debug && loglevel > LogLevel.error) return;
|
||
console.error.apply(console, _toConsumableArray(labeledArgs()));
|
||
break;
|
||
case LogType.trace:
|
||
if (!debug) return;
|
||
console.trace();
|
||
break;
|
||
case LogType.groupCollapsed:
|
||
if (!debug && loglevel > LogLevel.log) return;
|
||
if (!debug && loglevel > LogLevel.verbose) {
|
||
if (typeof console.groupCollapsed === "function") {
|
||
console.groupCollapsed.apply(console, _toConsumableArray(labeledArgs()));
|
||
} else {
|
||
console.log.apply(console, _toConsumableArray(labeledArgs()));
|
||
}
|
||
break;
|
||
}
|
||
// falls through
|
||
case LogType.group:
|
||
if (!debug && loglevel > LogLevel.log) return;
|
||
if (typeof console.group === "function") {
|
||
console.group.apply(console, _toConsumableArray(labeledArgs()));
|
||
} else {
|
||
console.log.apply(console, _toConsumableArray(labeledArgs()));
|
||
}
|
||
break;
|
||
case LogType.groupEnd:
|
||
if (!debug && loglevel > LogLevel.log) return;
|
||
if (typeof console.groupEnd === "function") {
|
||
console.groupEnd();
|
||
}
|
||
break;
|
||
case LogType.time:
|
||
{
|
||
if (!debug && loglevel > LogLevel.log) return;
|
||
var _args = _slicedToArray(/** @type {[string, number, number]} */
|
||
args, 3),
|
||
label = _args[0],
|
||
start = _args[1],
|
||
end = _args[2];
|
||
var ms = start * 1000 + end / 1000000;
|
||
var msg = "[".concat(name, "] ").concat(label, ": ").concat(ms, " ms");
|
||
if (typeof console.logTime === "function") {
|
||
console.logTime(msg);
|
||
} else {
|
||
console.log(msg);
|
||
}
|
||
break;
|
||
}
|
||
case LogType.profile:
|
||
if (typeof console.profile === "function") {
|
||
console.profile.apply(console, _toConsumableArray(labeledArgs()));
|
||
}
|
||
break;
|
||
case LogType.profileEnd:
|
||
if (typeof console.profileEnd === "function") {
|
||
console.profileEnd.apply(console, _toConsumableArray(labeledArgs()));
|
||
}
|
||
break;
|
||
case LogType.clear:
|
||
if (!debug && loglevel > LogLevel.log) return;
|
||
if (typeof console.clear === "function") {
|
||
console.clear();
|
||
}
|
||
break;
|
||
case LogType.status:
|
||
if (!debug && loglevel > LogLevel.info) return;
|
||
if (typeof console.status === "function") {
|
||
if (!args || args.length === 0) {
|
||
console.status();
|
||
} else {
|
||
console.status.apply(console, _toConsumableArray(labeledArgs()));
|
||
}
|
||
} else if (args && args.length !== 0) {
|
||
console.info.apply(console, _toConsumableArray(labeledArgs()));
|
||
}
|
||
break;
|
||
default:
|
||
throw new Error("Unexpected LogType ".concat(type));
|
||
}
|
||
};
|
||
return logger;
|
||
};
|
||
|
||
/***/ }),
|
||
|
||
/***/ "./node_modules/webpack/lib/logging/runtime.js":
|
||
/*!*****************************************************!*\
|
||
!*** ./node_modules/webpack/lib/logging/runtime.js ***!
|
||
\*****************************************************/
|
||
/***/ (function(module, __unused_webpack_exports, __nested_webpack_require_24722__) {
|
||
|
||
/*
|
||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||
Author Tobias Koppers @sokra
|
||
*/
|
||
|
||
|
||
|
||
function _extends() {
|
||
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
||
for (var e = 1; e < arguments.length; e++) {
|
||
var t = arguments[e];
|
||
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
||
}
|
||
return n;
|
||
}, _extends.apply(null, arguments);
|
||
}
|
||
var _require = __nested_webpack_require_24722__(/*! tapable */ "./client-src/modules/logger/tapable.js"),
|
||
SyncBailHook = _require.SyncBailHook;
|
||
var _require2 = __nested_webpack_require_24722__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
|
||
Logger = _require2.Logger;
|
||
var createConsoleLogger = __nested_webpack_require_24722__(/*! ./createConsoleLogger */ "./node_modules/webpack/lib/logging/createConsoleLogger.js");
|
||
|
||
/** @type {createConsoleLogger.LoggerOptions} */
|
||
var currentDefaultLoggerOptions = {
|
||
level: "info",
|
||
debug: false,
|
||
console: console
|
||
};
|
||
var currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
|
||
|
||
/**
|
||
* Processes the provided create console logger.logger option.
|
||
* @param {createConsoleLogger.LoggerOptions} options new options, merge with old options
|
||
* @returns {void}
|
||
*/
|
||
module.exports.configureDefaultLogger = function (options) {
|
||
_extends(currentDefaultLoggerOptions, options);
|
||
currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
|
||
};
|
||
|
||
/**
|
||
* Returns a logger.
|
||
* @param {string} name name of the logger
|
||
* @returns {Logger} a logger
|
||
*/
|
||
module.exports.getLogger = function (name) {
|
||
return new Logger(function (type, args) {
|
||
if (module.exports.hooks.log.call(name, type, args) === undefined) {
|
||
currentDefaultLogger(name, type, args);
|
||
}
|
||
}, function (childName) {
|
||
return module.exports.getLogger("".concat(name, "/").concat(childName));
|
||
});
|
||
};
|
||
module.exports.hooks = {
|
||
log: new SyncBailHook(["origin", "type", "args"])
|
||
};
|
||
|
||
/***/ })
|
||
|
||
/******/ });
|
||
/************************************************************************/
|
||
/******/ // The module cache
|
||
/******/ var __webpack_module_cache__ = {};
|
||
/******/
|
||
/******/ // The require function
|
||
/******/ function __nested_webpack_require_26883__(moduleId) {
|
||
/******/ // Check if module is in cache
|
||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||
/******/ if (cachedModule !== undefined) {
|
||
/******/ return cachedModule.exports;
|
||
/******/ }
|
||
/******/ // Create a new module (and put it into the cache)
|
||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||
/******/ // no module.id needed
|
||
/******/ // no module.loaded needed
|
||
/******/ exports: {}
|
||
/******/ };
|
||
/******/
|
||
/******/ // Execute the module function
|
||
/******/ if (!(moduleId in __webpack_modules__)) {
|
||
/******/ delete __webpack_module_cache__[moduleId];
|
||
/******/ var e = new Error("Cannot find module '" + moduleId + "'");
|
||
/******/ e.code = 'MODULE_NOT_FOUND';
|
||
/******/ throw e;
|
||
/******/ }
|
||
/******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_26883__);
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/************************************************************************/
|
||
/******/ /* webpack/runtime/define property getters */
|
||
/******/ !function() {
|
||
/******/ // define getter functions for harmony exports
|
||
/******/ __nested_webpack_require_26883__.d = function(exports, definition) {
|
||
/******/ for(var key in definition) {
|
||
/******/ if(__nested_webpack_require_26883__.o(definition, key) && !__nested_webpack_require_26883__.o(exports, key)) {
|
||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||
/******/ }
|
||
/******/ }
|
||
/******/ };
|
||
/******/ }();
|
||
/******/
|
||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||
/******/ !function() {
|
||
/******/ __nested_webpack_require_26883__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
||
/******/ }();
|
||
/******/
|
||
/******/ /* webpack/runtime/make namespace object */
|
||
/******/ !function() {
|
||
/******/ // define __esModule on exports
|
||
/******/ __nested_webpack_require_26883__.r = function(exports) {
|
||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||
/******/ }
|
||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||
/******/ };
|
||
/******/ }();
|
||
/******/
|
||
/************************************************************************/
|
||
var __nested_webpack_exports__ = {};
|
||
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
||
!function() {
|
||
/*!********************************************!*\
|
||
!*** ./client-src/modules/logger/index.js ***!
|
||
\********************************************/
|
||
__nested_webpack_require_26883__.r(__nested_webpack_exports__);
|
||
/* harmony export */ __nested_webpack_require_26883__.d(__nested_webpack_exports__, {
|
||
/* harmony export */ "default": function() { return /* reexport default export from named module */ webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__; }
|
||
/* harmony export */ });
|
||
/* harmony import */ var webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_26883__(/*! webpack/lib/logging/runtime.js */ "./node_modules/webpack/lib/logging/runtime.js");
|
||
// @ts-expect-error
|
||
|
||
}();
|
||
var __webpack_export_target__ = exports;
|
||
for(var __webpack_i__ in __nested_webpack_exports__) __webpack_export_target__[__webpack_i__] = __nested_webpack_exports__[__webpack_i__];
|
||
if(__nested_webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
|
||
/******/ })()
|
||
;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 887:
|
||
/*!***********************************************************!*\
|
||
!*** ./node_modules/webpack-dev-server/client/overlay.js ***!
|
||
\***********************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ createOverlay: () => (/* binding */ createOverlay),
|
||
/* harmony export */ formatProblem: () => (/* binding */ formatProblem)
|
||
/* harmony export */ });
|
||
/* harmony import */ var ansi_html_community__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ansi-html-community */ 223);
|
||
/* harmony import */ var ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(ansi_html_community__WEBPACK_IMPORTED_MODULE_0__);
|
||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||
// The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-react-app)
|
||
// They, in turn, got inspired by webpack-hot-middleware (https://github.com/glenjamin/webpack-hot-middleware).
|
||
|
||
|
||
|
||
/** @typedef {import("./index").EXPECTED_ANY} EXPECTED_ANY */
|
||
|
||
/**
|
||
* @type {(input: string, position: number) => number | undefined}
|
||
*/
|
||
// @ts-expect-error
|
||
var getCodePoint = String.prototype.codePointAt ?
|
||
// @ts-expect-error
|
||
function (input, position) {
|
||
return input.codePointAt(position);
|
||
} : function (input, position) {
|
||
return (input.charCodeAt(position) - 0xd800) * 0x400 + input.charCodeAt(position + 1) - 0xdc00 + 0x10000;
|
||
};
|
||
|
||
/**
|
||
* @param {string} macroText macro text
|
||
* @param {RegExp} macroRegExp macro reg exp
|
||
* @param {(input: string) => string} macroReplacer macro replacer
|
||
* @returns {string} result
|
||
*/
|
||
var replaceUsingRegExp = function replaceUsingRegExp(macroText, macroRegExp, macroReplacer) {
|
||
macroRegExp.lastIndex = 0;
|
||
var replaceMatch = macroRegExp.exec(macroText);
|
||
var replaceResult;
|
||
if (replaceMatch) {
|
||
replaceResult = "";
|
||
var replaceLastIndex = 0;
|
||
do {
|
||
if (replaceLastIndex !== replaceMatch.index) {
|
||
replaceResult += macroText.slice(replaceLastIndex, replaceMatch.index);
|
||
}
|
||
var replaceInput = replaceMatch[0];
|
||
replaceResult += macroReplacer(replaceInput);
|
||
replaceLastIndex = replaceMatch.index + replaceInput.length;
|
||
} while (replaceMatch = macroRegExp.exec(macroText));
|
||
if (replaceLastIndex !== macroText.length) {
|
||
replaceResult += macroText.slice(replaceLastIndex);
|
||
}
|
||
} else {
|
||
replaceResult = macroText;
|
||
}
|
||
return replaceResult;
|
||
};
|
||
var references = {
|
||
"<": "<",
|
||
">": ">",
|
||
'"': """,
|
||
"'": "'",
|
||
"&": "&"
|
||
};
|
||
|
||
/**
|
||
* @param {string} text text
|
||
* @returns {string} encoded text
|
||
*/
|
||
function encode(text) {
|
||
if (!text) {
|
||
return "";
|
||
}
|
||
return replaceUsingRegExp(text, /[<>'"&]/g, function (input) {
|
||
var result = references[(/** @type {keyof typeof references} */input)];
|
||
if (!result) {
|
||
var code = input.length > 1 ? getCodePoint(input, 0) : input.charCodeAt(0);
|
||
result = "&#".concat(code, ";");
|
||
}
|
||
return result;
|
||
});
|
||
}
|
||
|
||
/**
|
||
* @typedef {object} Context
|
||
* @property {'warning' | 'error'} level level
|
||
* @property {(string | Message)[]} messages messages
|
||
* @property {'build' | 'runtime'} messageSource message source
|
||
*/
|
||
|
||
/** @typedef {{ type: string } & Record<string, EXPECTED_ANY>} Event */
|
||
|
||
/**
|
||
* @typedef {object} Options
|
||
* @property {{ [state: string]: { on: Record<string, { target: string; actions?: Array<string> }> } }} states states
|
||
* @property {Context} context context
|
||
* @property {string} initial initial
|
||
*/
|
||
|
||
/**
|
||
* @typedef {object} Implementation
|
||
* @property {{ [actionName: string]: (ctx: Context, event: Event) => Context | void }} actions actions
|
||
*/
|
||
|
||
/**
|
||
* @typedef {{ send: (event: Event) => void }} StateMachine
|
||
*/
|
||
|
||
/**
|
||
* A simplified `createMachine` from `@xstate/fsm` with the following differences:
|
||
* - the returned machine is technically a "service". No `interpret(machine).start()` is needed.
|
||
* - the state definition only support `on` and target must be declared with { target: 'nextState', actions: [] } explicitly.
|
||
* - event passed to `send` must be an object with `type` property.
|
||
* - actions implementation will be [assign action](https://xstate.js.org/docs/guides/context.html#assign-action) if you return any value.
|
||
* Do not return anything if you just want to invoke side effect.
|
||
*
|
||
* The goal of this custom function is to avoid installing the entire `'xstate/fsm'` package, while enabling modeling using
|
||
* state machine. You can copy the first parameter into the editor at https://stately.ai/viz to visualize the state machine.
|
||
* @param {Options} options options
|
||
* @param {Implementation} implementation implementation
|
||
* @returns {StateMachine} state machine
|
||
*/
|
||
function createMachine(_ref, _ref2) {
|
||
var states = _ref.states,
|
||
context = _ref.context,
|
||
initial = _ref.initial;
|
||
var actions = _ref2.actions;
|
||
var currentState = initial;
|
||
var currentContext = context;
|
||
return {
|
||
send: function send(event) {
|
||
var currentStateOn = states[currentState].on;
|
||
var transitionConfig = currentStateOn && currentStateOn[event.type];
|
||
if (transitionConfig) {
|
||
currentState = transitionConfig.target;
|
||
if (transitionConfig.actions) {
|
||
transitionConfig.actions.forEach(function (actName) {
|
||
var actionImpl = actions[actName];
|
||
var nextContextValue = actionImpl && actionImpl(currentContext, event);
|
||
if (nextContextValue) {
|
||
currentContext = _objectSpread(_objectSpread({}, currentContext), nextContextValue);
|
||
}
|
||
});
|
||
}
|
||
}
|
||
}
|
||
};
|
||
}
|
||
|
||
/**
|
||
* @typedef {object} ShowOverlayData
|
||
* @property {'warning' | 'error'} level level
|
||
* @property {(string | Message)[]} messages messages
|
||
* @property {'build' | 'runtime'} messageSource message source
|
||
*/
|
||
|
||
/**
|
||
* @typedef {object} CreateOverlayMachineOptions
|
||
* @property {(data: ShowOverlayData) => void} showOverlay show overlay
|
||
* @property {() => void} hideOverlay hide overlay
|
||
*/
|
||
|
||
/**
|
||
* @param {CreateOverlayMachineOptions} options options
|
||
* @returns {StateMachine} state machine
|
||
*/
|
||
var createOverlayMachine = function createOverlayMachine(options) {
|
||
var hideOverlay = options.hideOverlay,
|
||
showOverlay = options.showOverlay;
|
||
return createMachine({
|
||
initial: "hidden",
|
||
context: {
|
||
level: "error",
|
||
messages: [],
|
||
messageSource: "build"
|
||
},
|
||
states: {
|
||
hidden: {
|
||
on: {
|
||
BUILD_ERROR: {
|
||
target: "displayBuildError",
|
||
actions: ["setMessages", "showOverlay"]
|
||
},
|
||
RUNTIME_ERROR: {
|
||
target: "displayRuntimeError",
|
||
actions: ["setMessages", "showOverlay"]
|
||
}
|
||
}
|
||
},
|
||
displayBuildError: {
|
||
on: {
|
||
DISMISS: {
|
||
target: "hidden",
|
||
actions: ["dismissMessages", "hideOverlay"]
|
||
},
|
||
BUILD_ERROR: {
|
||
target: "displayBuildError",
|
||
actions: ["appendMessages", "showOverlay"]
|
||
}
|
||
}
|
||
},
|
||
displayRuntimeError: {
|
||
on: {
|
||
DISMISS: {
|
||
target: "hidden",
|
||
actions: ["dismissMessages", "hideOverlay"]
|
||
},
|
||
RUNTIME_ERROR: {
|
||
target: "displayRuntimeError",
|
||
actions: ["appendMessages", "showOverlay"]
|
||
},
|
||
BUILD_ERROR: {
|
||
target: "displayBuildError",
|
||
actions: ["setMessages", "showOverlay"]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}, {
|
||
actions: {
|
||
dismissMessages: function dismissMessages() {
|
||
return {
|
||
messages: [],
|
||
level: "error",
|
||
messageSource: "build"
|
||
};
|
||
},
|
||
appendMessages: function appendMessages(context, event) {
|
||
return {
|
||
messages: context.messages.concat(event.messages),
|
||
level: event.level || context.level,
|
||
messageSource: event.type === "RUNTIME_ERROR" ? "runtime" : "build"
|
||
};
|
||
},
|
||
setMessages: function setMessages(context, event) {
|
||
return {
|
||
messages: event.messages,
|
||
level: event.level || context.level,
|
||
messageSource: event.type === "RUNTIME_ERROR" ? "runtime" : "build"
|
||
};
|
||
},
|
||
hideOverlay: hideOverlay,
|
||
showOverlay: showOverlay
|
||
}
|
||
});
|
||
};
|
||
|
||
/**
|
||
* @param {Error} error error
|
||
* @returns {undefined | string[]} stack
|
||
*/
|
||
var parseErrorToStacks = function parseErrorToStacks(error) {
|
||
if (!error || !(error instanceof Error)) {
|
||
throw new Error("parseErrorToStacks expects Error object");
|
||
}
|
||
if (typeof error.stack === "string") {
|
||
return error.stack.split("\n").filter(function (stack) {
|
||
return stack !== "Error: ".concat(error.message);
|
||
});
|
||
}
|
||
};
|
||
|
||
/**
|
||
* @callback ErrorCallback
|
||
* @param {ErrorEvent} error
|
||
* @returns {void}
|
||
*/
|
||
|
||
/**
|
||
* @param {ErrorCallback} callback callback
|
||
* @returns {() => void} cleanup
|
||
*/
|
||
var listenToRuntimeError = function listenToRuntimeError(callback) {
|
||
window.addEventListener("error", callback);
|
||
return function cleanup() {
|
||
window.removeEventListener("error", callback);
|
||
};
|
||
};
|
||
|
||
/**
|
||
* @callback UnhandledRejectionCallback
|
||
* @param {PromiseRejectionEvent} rejectionEvent
|
||
* @returns {void}
|
||
*/
|
||
|
||
/**
|
||
* @param {UnhandledRejectionCallback} callback callback
|
||
* @returns {() => void} cleanup
|
||
*/
|
||
var listenToUnhandledRejection = function listenToUnhandledRejection(callback) {
|
||
window.addEventListener("unhandledrejection", callback);
|
||
return function cleanup() {
|
||
window.removeEventListener("unhandledrejection", callback);
|
||
};
|
||
};
|
||
|
||
// Styles are inspired by `react-error-overlay`
|
||
|
||
var msgStyles = {
|
||
error: {
|
||
backgroundColor: "rgba(206, 17, 38, 0.1)",
|
||
color: "#fccfcf"
|
||
},
|
||
warning: {
|
||
backgroundColor: "rgba(251, 245, 180, 0.1)",
|
||
color: "#fbf5b4"
|
||
}
|
||
};
|
||
var iframeStyle = {
|
||
position: "fixed",
|
||
top: "0px",
|
||
left: "0px",
|
||
right: "0px",
|
||
bottom: "0px",
|
||
width: "100vw",
|
||
height: "100vh",
|
||
border: "none",
|
||
"z-index": 9999999999
|
||
};
|
||
var containerStyle = {
|
||
position: "fixed",
|
||
boxSizing: "border-box",
|
||
left: "0px",
|
||
top: "0px",
|
||
right: "0px",
|
||
bottom: "0px",
|
||
width: "100vw",
|
||
height: "100vh",
|
||
fontSize: "large",
|
||
padding: "2rem 2rem 4rem 2rem",
|
||
lineHeight: "1.2",
|
||
whiteSpace: "pre-wrap",
|
||
overflow: "auto",
|
||
backgroundColor: "rgba(0, 0, 0, 0.9)",
|
||
color: "white"
|
||
};
|
||
var headerStyle = {
|
||
color: "#e83b46",
|
||
fontSize: "2em",
|
||
whiteSpace: "pre-wrap",
|
||
fontFamily: "sans-serif",
|
||
margin: "0 2rem 2rem 0",
|
||
flex: "0 0 auto",
|
||
maxHeight: "50%",
|
||
overflow: "auto"
|
||
};
|
||
var dismissButtonStyle = {
|
||
color: "#ffffff",
|
||
lineHeight: "1rem",
|
||
fontSize: "1.5rem",
|
||
padding: "1rem",
|
||
cursor: "pointer",
|
||
position: "absolute",
|
||
right: "0px",
|
||
top: "0px",
|
||
backgroundColor: "transparent",
|
||
border: "none"
|
||
};
|
||
var msgTypeStyle = {
|
||
color: "#e83b46",
|
||
fontSize: "1.2em",
|
||
marginBottom: "1rem",
|
||
fontFamily: "sans-serif"
|
||
};
|
||
var msgTextStyle = {
|
||
lineHeight: "1.5",
|
||
fontSize: "1rem",
|
||
fontFamily: "Menlo, Consolas, monospace"
|
||
};
|
||
|
||
// ANSI HTML
|
||
|
||
var colors = {
|
||
reset: ["transparent", "transparent"],
|
||
black: "181818",
|
||
red: "E36049",
|
||
green: "B3CB74",
|
||
yellow: "FFD080",
|
||
blue: "7CAFC2",
|
||
magenta: "7FACCA",
|
||
cyan: "C3C2EF",
|
||
lightgrey: "EBE7E3",
|
||
darkgrey: "6D7891"
|
||
};
|
||
ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default().setColors(colors);
|
||
|
||
/** @typedef {Error & { file?: string, moduleName?: string, moduleIdentifier?: string, loc?: string, message?: string; stack?: string | string[] }} Message */
|
||
|
||
/**
|
||
* @param {string} type type
|
||
* @param {string | Message} item item
|
||
* @returns {{ header: string, body: string }} formatted problem
|
||
*/
|
||
var formatProblem = function formatProblem(type, item) {
|
||
var header = type === "warning" ? "WARNING" : "ERROR";
|
||
var body = "";
|
||
if (typeof item === "string") {
|
||
body += item;
|
||
} else {
|
||
var file = item.file || "";
|
||
var moduleName = item.moduleName ? item.moduleName.indexOf("!") !== -1 ? "".concat(item.moduleName.replace(/^(\s|\S)*!/, ""), " (").concat(item.moduleName, ")") : "".concat(item.moduleName) : "";
|
||
var loc = item.loc;
|
||
header += "".concat(moduleName || file ? " in ".concat(moduleName ? "".concat(moduleName).concat(file ? " (".concat(file, ")") : "") : file).concat(loc ? " ".concat(loc) : "") : "");
|
||
body += item.message || "";
|
||
}
|
||
if (typeof item !== "string" && Array.isArray(item.stack)) {
|
||
item.stack.forEach(function (stack) {
|
||
if (typeof stack === "string") {
|
||
body += "\r\n".concat(stack);
|
||
}
|
||
});
|
||
}
|
||
return {
|
||
header: header,
|
||
body: body
|
||
};
|
||
};
|
||
|
||
/**
|
||
* @typedef {object} CreateOverlayOptions
|
||
* @property {(false | string)=} trustedTypesPolicyName trusted types policy name
|
||
* @property {(boolean | ((error: Error) => void))=} catchRuntimeError runtime error catcher
|
||
*/
|
||
|
||
/**
|
||
* @param {CreateOverlayOptions} options options
|
||
* @returns {StateMachine} overlay
|
||
*/
|
||
var createOverlay = function createOverlay(options) {
|
||
/** @type {HTMLIFrameElement | null | undefined} */
|
||
var iframeContainerElement;
|
||
/** @type {HTMLDivElement | null | undefined} */
|
||
var containerElement;
|
||
/** @type {HTMLDivElement | null | undefined} */
|
||
var headerElement;
|
||
/** @type {Array<(element: HTMLDivElement) => void>} */
|
||
var onLoadQueue = [];
|
||
/** @type {Omit<TrustedTypePolicy, "createScript" | "createScriptURL"> | undefined} */
|
||
var overlayTrustedTypesPolicy;
|
||
|
||
/** @typedef {Extract<keyof CSSStyleDeclaration, "string">} CSSStyleDeclarationKeys */
|
||
|
||
/**
|
||
* @param {HTMLElement} element element
|
||
* @param {Partial<CSSStyleDeclaration>} style style
|
||
*/
|
||
function applyStyle(element, style) {
|
||
Object.keys(style).forEach(function (prop) {
|
||
element.style[(/** @type {CSSStyleDeclarationKeys} */prop)] = /** @type {string} */
|
||
style[(/** @type {CSSStyleDeclarationKeys} */prop)];
|
||
});
|
||
}
|
||
|
||
/**
|
||
* @param {string | false | undefined} trustedTypesPolicyName trusted types police name
|
||
*/
|
||
function createContainer(trustedTypesPolicyName) {
|
||
// Enable Trusted Types if they are available in the current browser.
|
||
if (window.trustedTypes) {
|
||
overlayTrustedTypesPolicy = window.trustedTypes.createPolicy(trustedTypesPolicyName || "webpack-dev-server#overlay", {
|
||
createHTML: function createHTML(value) {
|
||
return value;
|
||
}
|
||
});
|
||
}
|
||
iframeContainerElement = document.createElement("iframe");
|
||
iframeContainerElement.id = "webpack-dev-server-client-overlay";
|
||
iframeContainerElement.src = "about:blank";
|
||
applyStyle(iframeContainerElement, iframeStyle);
|
||
iframeContainerElement.onload = function () {
|
||
var contentElement = /** @type {Document} */
|
||
(/** @type {HTMLIFrameElement} */
|
||
iframeContainerElement.contentDocument).createElement("div");
|
||
containerElement = /** @type {Document} */
|
||
(/** @type {HTMLIFrameElement} */
|
||
iframeContainerElement.contentDocument).createElement("div");
|
||
contentElement.id = "webpack-dev-server-client-overlay-div";
|
||
applyStyle(contentElement, containerStyle);
|
||
headerElement = document.createElement("div");
|
||
headerElement.innerText = "Compiled with problems:";
|
||
applyStyle(headerElement, headerStyle);
|
||
var closeButtonElement = document.createElement("button");
|
||
applyStyle(closeButtonElement, dismissButtonStyle);
|
||
closeButtonElement.innerText = "×";
|
||
closeButtonElement.ariaLabel = "Dismiss";
|
||
closeButtonElement.addEventListener("click", function () {
|
||
// eslint-disable-next-line no-use-before-define
|
||
overlayService.send({
|
||
type: "DISMISS"
|
||
});
|
||
});
|
||
contentElement.appendChild(headerElement);
|
||
contentElement.appendChild(closeButtonElement);
|
||
contentElement.appendChild(containerElement);
|
||
|
||
/** @type {Document} */
|
||
(/** @type {HTMLIFrameElement} */
|
||
iframeContainerElement.contentDocument).body.appendChild(contentElement);
|
||
onLoadQueue.forEach(function (onLoad) {
|
||
onLoad(/** @type {HTMLDivElement} */contentElement);
|
||
});
|
||
onLoadQueue = [];
|
||
|
||
/** @type {HTMLIFrameElement} */
|
||
iframeContainerElement.onload = null;
|
||
};
|
||
document.body.appendChild(iframeContainerElement);
|
||
}
|
||
|
||
/**
|
||
* @param {(element: HTMLDivElement) => void} callback callback
|
||
* @param {string | false | undefined} trustedTypesPolicyName trusted types policy name
|
||
*/
|
||
function ensureOverlayExists(callback, trustedTypesPolicyName) {
|
||
if (containerElement) {
|
||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/30024
|
||
containerElement.innerHTML = overlayTrustedTypesPolicy ? overlayTrustedTypesPolicy.createHTML("") : "";
|
||
// Everything is ready, call the callback right away.
|
||
callback(containerElement);
|
||
return;
|
||
}
|
||
onLoadQueue.push(callback);
|
||
if (iframeContainerElement) {
|
||
return;
|
||
}
|
||
createContainer(trustedTypesPolicyName);
|
||
}
|
||
|
||
// Successful compilation.
|
||
/**
|
||
* @returns {void}
|
||
*/
|
||
function hide() {
|
||
if (!iframeContainerElement) {
|
||
return;
|
||
}
|
||
|
||
// Clean up and reset internal state.
|
||
document.body.removeChild(iframeContainerElement);
|
||
iframeContainerElement = null;
|
||
containerElement = null;
|
||
}
|
||
|
||
// Compilation with errors (e.g. syntax error or missing modules).
|
||
/**
|
||
* @param {string} type type
|
||
* @param {(string | Message)[]} messages messages
|
||
* @param {undefined | false | string} trustedTypesPolicyName trusted types policy name
|
||
* @param {'build' | 'runtime'} messageSource message source
|
||
*/
|
||
function show(type, messages, trustedTypesPolicyName, messageSource) {
|
||
ensureOverlayExists(function () {
|
||
/** @type {HTMLDivElement} */
|
||
headerElement.innerText = messageSource === "runtime" ? "Uncaught runtime errors:" : "Compiled with problems:";
|
||
messages.forEach(function (message) {
|
||
var entryElement = document.createElement("div");
|
||
var msgStyle = type === "warning" ? msgStyles.warning : msgStyles.error;
|
||
applyStyle(entryElement, _objectSpread(_objectSpread({}, msgStyle), {}, {
|
||
padding: "1rem 1rem 1.5rem 1rem"
|
||
}));
|
||
var typeElement = document.createElement("div");
|
||
var _formatProblem = formatProblem(type, message),
|
||
header = _formatProblem.header,
|
||
body = _formatProblem.body;
|
||
typeElement.innerText = header;
|
||
applyStyle(typeElement, msgTypeStyle);
|
||
if (typeof message !== "string" && message.moduleIdentifier) {
|
||
applyStyle(typeElement, {
|
||
cursor: "pointer"
|
||
});
|
||
// element.dataset not supported in IE
|
||
typeElement.setAttribute("data-can-open", "true");
|
||
typeElement.addEventListener("click", function () {
|
||
fetch("/webpack-dev-server/open-editor?fileName=".concat(message.moduleIdentifier));
|
||
});
|
||
}
|
||
|
||
// Make it look similar to our terminal.
|
||
var text = ansi_html_community__WEBPACK_IMPORTED_MODULE_0___default()(encode(body));
|
||
var messageTextNode = document.createElement("div");
|
||
applyStyle(messageTextNode, msgTextStyle);
|
||
|
||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/30024
|
||
messageTextNode.innerHTML = overlayTrustedTypesPolicy ? overlayTrustedTypesPolicy.createHTML(text) : text;
|
||
entryElement.appendChild(typeElement);
|
||
entryElement.appendChild(messageTextNode);
|
||
|
||
/** @type {HTMLDivElement} */
|
||
containerElement.appendChild(entryElement);
|
||
});
|
||
}, trustedTypesPolicyName);
|
||
}
|
||
|
||
/** @type {(event: KeyboardEvent) => void} */
|
||
var handleEscapeKey;
|
||
|
||
/**
|
||
* @returns {void}
|
||
*/
|
||
|
||
var hideOverlayWithEscCleanup = function hideOverlayWithEscCleanup() {
|
||
window.removeEventListener("keydown", handleEscapeKey);
|
||
hide();
|
||
};
|
||
var overlayService = createOverlayMachine({
|
||
showOverlay: function showOverlay(_ref3) {
|
||
var _ref3$level = _ref3.level,
|
||
level = _ref3$level === void 0 ? "error" : _ref3$level,
|
||
messages = _ref3.messages,
|
||
messageSource = _ref3.messageSource;
|
||
return show(level, messages, options.trustedTypesPolicyName, messageSource);
|
||
},
|
||
hideOverlay: hideOverlayWithEscCleanup
|
||
});
|
||
/**
|
||
* ESC key press to dismiss the overlay.
|
||
* @param {KeyboardEvent} event Keydown event
|
||
*/
|
||
handleEscapeKey = function handleEscapeKey(event) {
|
||
if (event.key === "Escape" || event.key === "Esc" || event.keyCode === 27) {
|
||
overlayService.send({
|
||
type: "DISMISS"
|
||
});
|
||
}
|
||
};
|
||
window.addEventListener("keydown", handleEscapeKey);
|
||
if (options.catchRuntimeError) {
|
||
/**
|
||
* @param {Error | undefined} error error
|
||
* @param {string} fallbackMessage fallback message
|
||
*/
|
||
var handleError = function handleError(error, fallbackMessage) {
|
||
var errorObject = error instanceof Error ? error : new Error(error || fallbackMessage, {
|
||
cause: error
|
||
});
|
||
var shouldDisplay = typeof options.catchRuntimeError === "function" ? options.catchRuntimeError(errorObject) : true;
|
||
if (shouldDisplay) {
|
||
overlayService.send({
|
||
type: "RUNTIME_ERROR",
|
||
messages: [{
|
||
message: errorObject.message,
|
||
stack: parseErrorToStacks(errorObject)
|
||
}]
|
||
});
|
||
}
|
||
};
|
||
listenToRuntimeError(function (errorEvent) {
|
||
// error property may be empty in older browser like IE
|
||
var error = errorEvent.error,
|
||
message = errorEvent.message;
|
||
if (!error && !message) {
|
||
return;
|
||
}
|
||
|
||
// if error stack indicates a React error boundary caught the error, do not show overlay.
|
||
if (error && error.stack && error.stack.includes("invokeGuardedCallbackDev")) {
|
||
return;
|
||
}
|
||
handleError(error, message);
|
||
});
|
||
listenToUnhandledRejection(function (promiseRejectionEvent) {
|
||
var reason = promiseRejectionEvent.reason;
|
||
handleError(reason, "Unknown promise rejection reason");
|
||
});
|
||
}
|
||
return overlayService;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 40:
|
||
/*!************************************************************!*\
|
||
!*** ./node_modules/webpack-dev-server/client/progress.js ***!
|
||
\************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ defineProgressElement: () => (/* binding */ defineProgressElement),
|
||
/* harmony export */ isProgressSupported: () => (/* binding */ isProgressSupported)
|
||
/* harmony export */ });
|
||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
||
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
||
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
||
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
||
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
||
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
||
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
||
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
||
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
||
function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); }
|
||
function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
|
||
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
||
function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } }
|
||
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
||
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
||
function _classPrivateMethodInitSpec(e, a) { _checkPrivateRedeclaration(e, a), a.add(e); }
|
||
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
||
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
||
/**
|
||
* @returns {boolean} true when custom elements supported, otherwise false
|
||
*/
|
||
function isProgressSupported() {
|
||
return "customElements" in self && Boolean(HTMLElement.prototype.attachShadow);
|
||
}
|
||
|
||
/**
|
||
* @returns {void}
|
||
*/
|
||
function defineProgressElement() {
|
||
var _WebpackDevServerProgress;
|
||
if (customElements.get("wds-progress")) {
|
||
return;
|
||
}
|
||
var _WebpackDevServerProgress_brand = /*#__PURE__*/new WeakSet();
|
||
var WebpackDevServerProgress = /*#__PURE__*/function (_HTMLElement) {
|
||
function WebpackDevServerProgress() {
|
||
var _this;
|
||
_classCallCheck(this, WebpackDevServerProgress);
|
||
_this = _callSuper(this, WebpackDevServerProgress);
|
||
_classPrivateMethodInitSpec(_this, _WebpackDevServerProgress_brand);
|
||
_this.attachShadow({
|
||
mode: "open"
|
||
});
|
||
_this.maxDashOffset = -219.99078369140625;
|
||
_this.animationTimer = null;
|
||
return _this;
|
||
}
|
||
_inherits(WebpackDevServerProgress, _HTMLElement);
|
||
return _createClass(WebpackDevServerProgress, [{
|
||
key: "connectedCallback",
|
||
value: function connectedCallback() {
|
||
_assertClassBrand(_WebpackDevServerProgress_brand, this, _reset).call(this);
|
||
}
|
||
}, {
|
||
key: "attributeChangedCallback",
|
||
value:
|
||
/**
|
||
* @param {string} name name
|
||
* @param {string} oldValue old value
|
||
* @param {string} newValue new value
|
||
*/
|
||
function attributeChangedCallback(name, oldValue, newValue) {
|
||
if (name === "progress") {
|
||
_assertClassBrand(_WebpackDevServerProgress_brand, this, _update).call(this, Number(newValue));
|
||
} else if (name === "type") {
|
||
_assertClassBrand(_WebpackDevServerProgress_brand, this, _reset).call(this);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* @param {number} percent percent
|
||
*/
|
||
}], [{
|
||
key: "observedAttributes",
|
||
get: function get() {
|
||
return ["progress", "type"];
|
||
}
|
||
}]);
|
||
}(/*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
||
_WebpackDevServerProgress = WebpackDevServerProgress;
|
||
function _reset() {
|
||
var _this$getAttribute;
|
||
clearTimeout(this.animationTimer);
|
||
this.animationTimer = null;
|
||
var typeAttr = (_this$getAttribute = this.getAttribute("type")) === null || _this$getAttribute === void 0 ? void 0 : _this$getAttribute.toLowerCase();
|
||
this.type = typeAttr === "circular" ? "circular" : "linear";
|
||
var innerHTML = this.type === "circular" ? _circularTemplate.call(_WebpackDevServerProgress) : _linearTemplate.call(_WebpackDevServerProgress);
|
||
/** @type {ShadowRoot} */
|
||
this.shadowRoot.innerHTML = innerHTML;
|
||
var progressValue = this.getAttribute("progress");
|
||
this.initialProgress = progressValue ? Number(progressValue) : 0;
|
||
_assertClassBrand(_WebpackDevServerProgress_brand, this, _update).call(this, this.initialProgress);
|
||
}
|
||
function _circularTemplate() {
|
||
return "\n <style>\n :host {\n width: 200px;\n height: 200px;\n position: fixed;\n right: 5%;\n top: 5%;\n pointer-events: none;\n transition: opacity .25s ease-in-out;\n z-index: 2147483645;\n }\n\n circle {\n fill: #282d35;\n }\n\n path {\n fill: rgba(0, 0, 0, 0);\n stroke: rgb(186, 223, 172);\n stroke-dasharray: 219.99078369140625;\n stroke-dashoffset: -219.99078369140625;\n stroke-width: 10;\n transform: rotate(90deg) translate(0px, -80px);\n }\n\n text {\n font-family: 'Open Sans', sans-serif;\n font-size: 18px;\n fill: #ffffff;\n dominant-baseline: middle;\n text-anchor: middle;\n }\n\n tspan#percent-super {\n fill: #bdc3c7;\n font-size: 0.45em;\n baseline-shift: 10%;\n }\n\n @keyframes fade {\n 0% { opacity: 1; transform: scale(1); }\n 100% { opacity: 0; transform: scale(0); }\n }\n\n .disappear {\n animation: fade 0.3s;\n animation-fill-mode: forwards;\n animation-delay: 0.5s;\n }\n\n .hidden {\n display: none;\n }\n </style>\n <svg id=\"progress\" class=\"hidden noselect\" viewBox=\"0 0 80 80\">\n <circle cx=\"50%\" cy=\"50%\" r=\"35\"></circle>\n <path d=\"M5,40a35,35 0 1,0 70,0a35,35 0 1,0 -70,0\"></path>\n <text x=\"50%\" y=\"51%\">\n <tspan id=\"percent-value\">0</tspan>\n <tspan id=\"percent-super\">%</tspan>\n </text>\n </svg>\n ";
|
||
}
|
||
function _linearTemplate() {
|
||
return "\n <style>\n :host {\n position: fixed;\n top: 0;\n left: 0;\n pointer-events: none;\n height: 4px;\n width: 100vw;\n z-index: 2147483645;\n }\n\n #bar {\n width: 0%;\n height: 4px;\n background-color: rgb(186, 223, 172);\n }\n\n @keyframes fade {\n 0% { opacity: 1; }\n 100% { opacity: 0; }\n }\n\n .disappear {\n animation: fade 0.3s;\n animation-fill-mode: forwards;\n animation-delay: 0.5s;\n }\n\n .hidden {\n display: none;\n }\n </style>\n <div id=\"progress\"></div>\n ";
|
||
}
|
||
function _update(percent) {
|
||
var shadowRoot = /** @type {ShadowRoot} */this.shadowRoot;
|
||
var element = /** @type {HTMLElement} */
|
||
shadowRoot.querySelector("#progress");
|
||
if (this.type === "circular") {
|
||
var path = /** @type {SVGPathElement} */
|
||
shadowRoot.querySelector("path");
|
||
var value = /** @type {HTMLElement} */
|
||
shadowRoot.querySelector("#percent-value");
|
||
var offset = (100 - percent) / 100 * this.maxDashOffset;
|
||
path.style.strokeDashoffset = String(offset);
|
||
value.textContent = String(percent);
|
||
} else {
|
||
element.style.width = "".concat(percent, "%");
|
||
}
|
||
if (percent >= 100) {
|
||
_assertClassBrand(_WebpackDevServerProgress_brand, this, _hide).call(this);
|
||
} else if (percent > 0) {
|
||
_assertClassBrand(_WebpackDevServerProgress_brand, this, _show).call(this);
|
||
}
|
||
}
|
||
function _show() {
|
||
var shadowRoot = /** @type {ShadowRoot} */this.shadowRoot;
|
||
var element = /** @type {HTMLElement} */
|
||
shadowRoot.querySelector("#progress");
|
||
element.classList.remove("hidden");
|
||
}
|
||
function _hide() {
|
||
var _this2 = this;
|
||
var shadowRoot = /** @type {ShadowRoot} */this.shadowRoot;
|
||
var element = /** @type {HTMLElement} */
|
||
shadowRoot.querySelector("#progress");
|
||
if (this.type === "circular") {
|
||
element.classList.add("disappear");
|
||
element.addEventListener("animationend", function () {
|
||
element.classList.add("hidden");
|
||
_assertClassBrand(_WebpackDevServerProgress_brand, _this2, _update).call(_this2, 0);
|
||
}, {
|
||
once: true
|
||
});
|
||
} else if (this.type === "linear") {
|
||
element.classList.add("disappear");
|
||
this.animationTimer = setTimeout(function () {
|
||
element.classList.remove("disappear");
|
||
element.classList.add("hidden");
|
||
element.style.width = "0%";
|
||
_this2.animationTimer = null;
|
||
}, 800);
|
||
}
|
||
}
|
||
customElements.define("wds-progress", WebpackDevServerProgress);
|
||
}
|
||
|
||
/***/ }),
|
||
|
||
/***/ 930:
|
||
/*!**********************************************************!*\
|
||
!*** ./node_modules/webpack-dev-server/client/socket.js ***!
|
||
\**********************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ client: () => (/* binding */ client),
|
||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
/* harmony export */ });
|
||
/* harmony import */ var _clients_WebSocketClient_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clients/WebSocketClient.js */ 976);
|
||
/* harmony import */ var _utils_log_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/log.js */ 43);
|
||
/* provided dependency */ var __webpack_dev_server_client__ = __webpack_require__(/*! ./node_modules/webpack-dev-server/client/clients/WebSocketClient.js */ 976);
|
||
/* global __webpack_dev_server_client__ */
|
||
|
||
|
||
|
||
|
||
/** @typedef {import("./index.js").EXPECTED_ANY} EXPECTED_ANY */
|
||
/** @typedef {import("./clients/SockJSClient")} SockJSClient */
|
||
|
||
// this WebsocketClient is here as a default fallback, in case the client is not injected
|
||
/** @type {CommunicationClientConstructor} */
|
||
var Client = typeof __webpack_dev_server_client__ !== "undefined" ? typeof (/** @type {{ default: CommunicationClientConstructor }} */
|
||
__webpack_dev_server_client__.default) !== "undefined" ? /** @type {{ default: CommunicationClientConstructor }} */
|
||
__webpack_dev_server_client__.default : (/** @type {CommunicationClientConstructor} */
|
||
__webpack_dev_server_client__) : _clients_WebSocketClient_js__WEBPACK_IMPORTED_MODULE_0__["default"];
|
||
var retries = 0;
|
||
var maxRetries = 10;
|
||
|
||
// Initialized client is exported so external consumers can utilize the same instance
|
||
// It is mutable to enforce singleton
|
||
/** @type {CommunicationClient | null} */
|
||
// eslint-disable-next-line import/no-mutable-exports
|
||
var client = null;
|
||
|
||
/** @type {ReturnType<typeof setTimeout> | undefined} */
|
||
var timeout;
|
||
|
||
/**
|
||
* @param {string} url url
|
||
* @param {{ [handler: string]: (data?: EXPECTED_ANY, params?: EXPECTED_ANY) => EXPECTED_ANY }} handlers handlers
|
||
* @param {number=} reconnect count of reconnections
|
||
*/
|
||
function socket(url, handlers, reconnect) {
|
||
client = new Client(url);
|
||
client.onOpen(function () {
|
||
retries = 0;
|
||
if (timeout) {
|
||
clearTimeout(timeout);
|
||
}
|
||
if (typeof reconnect !== "undefined") {
|
||
maxRetries = reconnect;
|
||
}
|
||
});
|
||
client.onClose(function () {
|
||
if (retries === 0) {
|
||
handlers.close();
|
||
}
|
||
|
||
// Try to reconnect.
|
||
client = null;
|
||
|
||
// After 10 retries stop trying, to prevent logspam.
|
||
if (retries < maxRetries) {
|
||
// Exponentially increase timeout to reconnect.
|
||
// Respectfully copied from the package `got`.
|
||
var retryInMs = 1000 * Math.pow(2, retries) + Math.random() * 100;
|
||
retries += 1;
|
||
_utils_log_js__WEBPACK_IMPORTED_MODULE_1__.log.info("Trying to reconnect...");
|
||
timeout = setTimeout(function () {
|
||
socket(url, handlers, reconnect);
|
||
}, retryInMs);
|
||
}
|
||
});
|
||
client.onMessage(
|
||
/**
|
||
* @param {EXPECTED_ANY} data data
|
||
*/
|
||
function (data) {
|
||
var message = JSON.parse(data);
|
||
if (handlers[message.type]) {
|
||
handlers[message.type](message.data, message.params);
|
||
}
|
||
});
|
||
}
|
||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (socket);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 43:
|
||
/*!*************************************************************!*\
|
||
!*** ./node_modules/webpack-dev-server/client/utils/log.js ***!
|
||
\*************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ log: () => (/* binding */ log),
|
||
/* harmony export */ setLogLevel: () => (/* binding */ setLogLevel)
|
||
/* harmony export */ });
|
||
/* harmony import */ var _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../modules/logger/index.js */ 970);
|
||
/* harmony import */ var _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0__);
|
||
|
||
var name = "webpack-dev-server";
|
||
// default level is set on the client side, so it does not need
|
||
// to be set by the CLI or API
|
||
var defaultLevel = "info";
|
||
|
||
// options new options, merge with old options
|
||
/**
|
||
* @param {false | true | "none" | "error" | "warn" | "info" | "log" | "verbose"} level level
|
||
* @returns {void}
|
||
*/
|
||
function setLogLevel(level) {
|
||
_modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default().configureDefaultLogger({
|
||
level: level
|
||
});
|
||
}
|
||
setLogLevel(defaultLevel);
|
||
var log = _modules_logger_index_js__WEBPACK_IMPORTED_MODULE_0___default().getLogger(name);
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 912:
|
||
/*!*********************************************************************!*\
|
||
!*** ./node_modules/webpack-dev-server/client/utils/sendMessage.js ***!
|
||
\*********************************************************************/
|
||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||
/* harmony export */ });
|
||
/* global WorkerGlobalScope */
|
||
|
||
/** @typedef {import("../index").EXPECTED_ANY} EXPECTED_ANY */
|
||
|
||
// Send messages to the outside, so plugins can consume it.
|
||
/**
|
||
* @param {string} type type
|
||
* @param {EXPECTED_ANY=} data data
|
||
*/
|
||
function sendMsg(type, data) {
|
||
if (typeof self !== "undefined" && (typeof WorkerGlobalScope === "undefined" || !(self instanceof WorkerGlobalScope))) {
|
||
self.postMessage({
|
||
type: "webpack".concat(type),
|
||
data: data
|
||
}, "*");
|
||
}
|
||
}
|
||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sendMsg);
|
||
|
||
/***/ }),
|
||
|
||
/***/ 826:
|
||
/*!************************************************!*\
|
||
!*** ./node_modules/webpack/hot/dev-server.js ***!
|
||
\************************************************/
|
||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
||
/*
|
||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||
Author Tobias Koppers @sokra
|
||
*/
|
||
/* globals __webpack_hash__ */
|
||
if (true) {
|
||
/** @type {undefined|string} */
|
||
var lastHash;
|
||
var upToDate = function upToDate() {
|
||
return /** @type {string} */ (lastHash).indexOf(__webpack_require__.h()) >= 0;
|
||
};
|
||
var log = __webpack_require__(/*! ./log */ 509);
|
||
var check = function check() {
|
||
module.hot
|
||
.check(true)
|
||
.then(function (updatedModules) {
|
||
if (!updatedModules) {
|
||
log(
|
||
"warning",
|
||
"[HMR] Cannot find update. " +
|
||
(typeof window !== "undefined"
|
||
? "Need to do a full reload!"
|
||
: "Please reload manually!")
|
||
);
|
||
log(
|
||
"warning",
|
||
"[HMR] (Probably because of restarting the webpack-dev-server)"
|
||
);
|
||
if (typeof window !== "undefined") {
|
||
window.location.reload();
|
||
}
|
||
return;
|
||
}
|
||
|
||
if (!upToDate()) {
|
||
check();
|
||
}
|
||
|
||
__webpack_require__(/*! ./log-apply-result */ 616)(updatedModules, updatedModules);
|
||
|
||
if (upToDate()) {
|
||
log("info", "[HMR] App is up to date.");
|
||
}
|
||
})
|
||
.catch(function (err) {
|
||
var status = module.hot.status();
|
||
if (["abort", "fail"].indexOf(status) >= 0) {
|
||
log(
|
||
"warning",
|
||
"[HMR] Cannot apply update. " +
|
||
(typeof window !== "undefined"
|
||
? "Need to do a full reload!"
|
||
: "Please reload manually!")
|
||
);
|
||
log("warning", "[HMR] " + log.formatError(err));
|
||
if (typeof window !== "undefined") {
|
||
window.location.reload();
|
||
}
|
||
} else {
|
||
log("warning", "[HMR] Update failed: " + log.formatError(err));
|
||
}
|
||
});
|
||
};
|
||
var hotEmitter = __webpack_require__(/*! ./emitter */ 689);
|
||
hotEmitter.on("webpackHotUpdate", function (currentHash) {
|
||
lastHash = currentHash;
|
||
if (!upToDate() && module.hot.status() === "idle") {
|
||
log("info", "[HMR] Checking for updates on the server...");
|
||
check();
|
||
}
|
||
});
|
||
log("info", "[HMR] Waiting for update signal from WDS...");
|
||
} else {}
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 689:
|
||
/*!*********************************************!*\
|
||
!*** ./node_modules/webpack/hot/emitter.js ***!
|
||
\*********************************************/
|
||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
||
var EventEmitter = __webpack_require__(/*! events */ 216);
|
||
module.exports = new EventEmitter();
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 616:
|
||
/*!******************************************************!*\
|
||
!*** ./node_modules/webpack/hot/log-apply-result.js ***!
|
||
\******************************************************/
|
||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||
|
||
/*
|
||
MIT License http://www.opensource.org/licenses/mit-license.php
|
||
Author Tobias Koppers @sokra
|
||
*/
|
||
|
||
/**
|
||
* @param {(string | number)[]} updatedModules updated modules
|
||
* @param {(string | number)[] | null} renewedModules renewed modules
|
||
*/
|
||
module.exports = function (updatedModules, renewedModules) {
|
||
var unacceptedModules = updatedModules.filter(function (moduleId) {
|
||
return renewedModules && renewedModules.indexOf(moduleId) < 0;
|
||
});
|
||
var log = __webpack_require__(/*! ./log */ 509);
|
||
|
||
if (unacceptedModules.length > 0) {
|
||
log(
|
||
"warning",
|
||
"[HMR] The following modules couldn't be hot updated: (They would need a full reload!)"
|
||
);
|
||
unacceptedModules.forEach(function (moduleId) {
|
||
log("warning", "[HMR] - " + moduleId);
|
||
});
|
||
}
|
||
|
||
if (!renewedModules || renewedModules.length === 0) {
|
||
log("info", "[HMR] Nothing hot updated.");
|
||
} else {
|
||
log("info", "[HMR] Updated modules:");
|
||
renewedModules.forEach(function (moduleId) {
|
||
if (typeof moduleId === "string" && moduleId.indexOf("!") !== -1) {
|
||
var parts = moduleId.split("!");
|
||
log.groupCollapsed("info", "[HMR] - " + parts.pop());
|
||
log("info", "[HMR] - " + moduleId);
|
||
log.groupEnd("info");
|
||
} else {
|
||
log("info", "[HMR] - " + moduleId);
|
||
}
|
||
});
|
||
var numberIds = renewedModules.every(function (moduleId) {
|
||
return typeof moduleId === "number";
|
||
});
|
||
if (numberIds)
|
||
log(
|
||
"info",
|
||
'[HMR] Consider using the optimization.moduleIds: "named" for module names.'
|
||
);
|
||
}
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 509:
|
||
/*!*****************************************!*\
|
||
!*** ./node_modules/webpack/hot/log.js ***!
|
||
\*****************************************/
|
||
/***/ ((module) => {
|
||
|
||
/** @typedef {"info" | "warning" | "error"} LogLevel */
|
||
|
||
/** @type {LogLevel} */
|
||
var logLevel = "info";
|
||
|
||
function dummy() {}
|
||
|
||
/**
|
||
* @param {LogLevel} level log level
|
||
* @returns {boolean} true, if should log
|
||
*/
|
||
function shouldLog(level) {
|
||
var shouldLog =
|
||
(logLevel === "info" && level === "info") ||
|
||
(["info", "warning"].indexOf(logLevel) >= 0 && level === "warning") ||
|
||
(["info", "warning", "error"].indexOf(logLevel) >= 0 && level === "error");
|
||
return shouldLog;
|
||
}
|
||
|
||
/**
|
||
* @param {(msg?: string) => void} logFn log function
|
||
* @returns {(level: LogLevel, msg?: string) => void} function that logs when log level is sufficient
|
||
*/
|
||
function logGroup(logFn) {
|
||
return function (level, msg) {
|
||
if (shouldLog(level)) {
|
||
logFn(msg);
|
||
}
|
||
};
|
||
}
|
||
|
||
/**
|
||
* @param {LogLevel} level log level
|
||
* @param {string|Error} msg message
|
||
*/
|
||
module.exports = function (level, msg) {
|
||
if (shouldLog(level)) {
|
||
if (level === "info") {
|
||
console.log(msg);
|
||
} else if (level === "warning") {
|
||
console.warn(msg);
|
||
} else if (level === "error") {
|
||
console.error(msg);
|
||
}
|
||
}
|
||
};
|
||
|
||
var group = console.group || dummy;
|
||
var groupCollapsed = console.groupCollapsed || dummy;
|
||
var groupEnd = console.groupEnd || dummy;
|
||
|
||
module.exports.group = logGroup(group);
|
||
|
||
module.exports.groupCollapsed = logGroup(groupCollapsed);
|
||
|
||
module.exports.groupEnd = logGroup(groupEnd);
|
||
|
||
/**
|
||
* @param {LogLevel} level log level
|
||
*/
|
||
module.exports.setLogLevel = function (level) {
|
||
logLevel = level;
|
||
};
|
||
|
||
/**
|
||
* @param {Error} err error
|
||
* @returns {string} formatted error
|
||
*/
|
||
module.exports.formatError = function (err) {
|
||
var message = err.message;
|
||
var stack = err.stack;
|
||
if (!stack) {
|
||
return message;
|
||
} else if (stack.indexOf(message) < 0) {
|
||
return message + "\n" + stack;
|
||
}
|
||
return stack;
|
||
};
|
||
|
||
|
||
/***/ }),
|
||
|
||
/***/ 676:
|
||
/*!*********************************************!*\
|
||
!*** external "@microsoft/sp-core-library" ***!
|
||
\*********************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = __WEBPACK_EXTERNAL_MODULE__676__;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 909:
|
||
/*!*************************************!*\
|
||
!*** external "@microsoft/sp-http" ***!
|
||
\*************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = __WEBPACK_EXTERNAL_MODULE__909__;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 877:
|
||
/*!**********************************************!*\
|
||
!*** external "@microsoft/sp-property-pane" ***!
|
||
\**********************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = __WEBPACK_EXTERNAL_MODULE__877__;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 642:
|
||
/*!*********************************************!*\
|
||
!*** external "@microsoft/sp-webpart-base" ***!
|
||
\*********************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = __WEBPACK_EXTERNAL_MODULE__642__;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 735:
|
||
/*!**********************************************!*\
|
||
!*** external "CtFormsPortalWebPartStrings" ***!
|
||
\**********************************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = __WEBPACK_EXTERNAL_MODULE__735__;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 959:
|
||
/*!************************!*\
|
||
!*** external "react" ***!
|
||
\************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = __WEBPACK_EXTERNAL_MODULE__959__;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 398:
|
||
/*!****************************!*\
|
||
!*** external "react-dom" ***!
|
||
\****************************/
|
||
/***/ ((module) => {
|
||
|
||
"use strict";
|
||
module.exports = __WEBPACK_EXTERNAL_MODULE__398__;
|
||
|
||
/***/ }),
|
||
|
||
/***/ 658:
|
||
/*!*************************************************!*\
|
||
!*** ./node_modules/@tnsu/ui-kit/dist/index.js ***!
|
||
\*************************************************/
|
||
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||
|
||
"use strict";
|
||
__webpack_require__.r(__webpack_exports__);
|
||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
/* harmony export */ Alert: () => (/* binding */ g),
|
||
/* harmony export */ AppLayout: () => (/* binding */ be),
|
||
/* harmony export */ AttachmentList: () => (/* binding */ he),
|
||
/* harmony export */ Badge: () => (/* binding */ x),
|
||
/* harmony export */ Button: () => (/* binding */ l),
|
||
/* harmony export */ CollapseSection: () => (/* binding */ de),
|
||
/* harmony export */ ConfirmHost: () => (/* binding */ ye),
|
||
/* harmony export */ DataTable: () => (/* binding */ Ee),
|
||
/* harmony export */ FileDropzone: () => (/* binding */ me),
|
||
/* harmony export */ FormActions: () => (/* binding */ ue),
|
||
/* harmony export */ FormCard: () => (/* binding */ ae),
|
||
/* harmony export */ FormField: () => (/* binding */ ce),
|
||
/* harmony export */ FormGrid: () => (/* binding */ se),
|
||
/* harmony export */ FormHeader: () => (/* binding */ ie),
|
||
/* harmony export */ FormModeProvider: () => (/* binding */ D),
|
||
/* harmony export */ Icon: () => (/* binding */ f),
|
||
/* harmony export */ IconSprite: () => (/* binding */ B),
|
||
/* harmony export */ MoneyInput: () => (/* binding */ F),
|
||
/* harmony export */ PhoneInput: () => (/* binding */ N),
|
||
/* harmony export */ PrintButton: () => (/* binding */ te),
|
||
/* harmony export */ RequestNumber: () => (/* binding */ v),
|
||
/* harmony export */ Select: () => (/* binding */ L),
|
||
/* harmony export */ Sidebar: () => (/* binding */ Ce),
|
||
/* harmony export */ SidebarToggle: () => (/* binding */ Te),
|
||
/* harmony export */ Stepper: () => (/* binding */ Se),
|
||
/* harmony export */ Tabs: () => (/* binding */ xe),
|
||
/* harmony export */ TextArea: () => (/* binding */ j),
|
||
/* harmony export */ TextInput: () => (/* binding */ k),
|
||
/* harmony export */ Toggle: () => (/* binding */ z),
|
||
/* harmony export */ confirmModal: () => (/* binding */ _e),
|
||
/* harmony export */ highestReachableIndex: () => (/* binding */ J),
|
||
/* harmony export */ useFlipRows: () => (/* binding */ Re),
|
||
/* harmony export */ useFormReadOnly: () => (/* binding */ O)
|
||
/* harmony export */ });
|
||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 959);
|
||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ 340);
|
||
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ 398);
|
||
|
||
|
||
|
||
|
||
var s = {
|
||
btn: "_btn_104wo_1",
|
||
sm: "_sm_104wo_23",
|
||
full: "_full_104wo_28",
|
||
primary: "_primary_104wo_32",
|
||
accent: "_accent_104wo_42",
|
||
secondary: "_secondary_104wo_53",
|
||
ghost: "_ghost_104wo_63",
|
||
danger: "_danger_104wo_71"
|
||
}, c = {
|
||
primary: s.primary,
|
||
accent: s.accent,
|
||
secondary: s.secondary,
|
||
ghost: s.ghost,
|
||
danger: s.danger
|
||
}, l = ({ variant: e = "secondary", size: t = "md", fullWidth: n = !1, type: r = "button", className: a, children: o, ...l }) => {
|
||
let u = [
|
||
s.btn,
|
||
c[e],
|
||
t === "sm" ? s.sm : "",
|
||
n ? s.full : "",
|
||
a
|
||
].filter(Boolean).join(" ");
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", {
|
||
type: r,
|
||
className: u,
|
||
...l,
|
||
children: o
|
||
});
|
||
}, u = {
|
||
icon: "_icon_bqhxe_1",
|
||
sm: "_sm_bqhxe_12",
|
||
lg: "_lg_bqhxe_17"
|
||
}, d = {
|
||
sm: u.sm,
|
||
md: "",
|
||
lg: u.lg
|
||
}, f = ({ name: e, size: t = "md", className: n }) => {
|
||
let r = [
|
||
u.icon,
|
||
d[t],
|
||
n
|
||
].filter(Boolean).join(" ");
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("svg", {
|
||
className: r,
|
||
"aria-hidden": "true",
|
||
focusable: "false",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("use", { href: `#i-${e}` })
|
||
});
|
||
};
|
||
//#endregion
|
||
//#region src/PrintButton/PrintButton.tsx
|
||
function p(e) {
|
||
if (e.type === "date" && /^\d{4}-\d{2}-\d{2}$/.test(e.value)) {
|
||
let [t, n, r] = e.value.split("-");
|
||
return `${r}.${n}.${t}`;
|
||
}
|
||
return e.value;
|
||
}
|
||
function ee(e, t) {
|
||
let n = (e, t) => {
|
||
if (!e) return;
|
||
let n = document.createElement("div");
|
||
n.className = "rp-print-value", n.textContent = t && t.length > 0 ? t : "—", (e.closest("label") ?? e).replaceWith(n);
|
||
}, r = t.querySelectorAll("input");
|
||
e.querySelectorAll("input").forEach((e, t) => {
|
||
e.type === "checkbox" || e.type === "radio" ? n(r[t], e.checked ? "Да" : "Нет") : n(r[t], p(e));
|
||
});
|
||
let i = t.querySelectorAll("textarea");
|
||
e.querySelectorAll("textarea").forEach((e, t) => n(i[t], e.value));
|
||
let a = t.querySelectorAll("select");
|
||
e.querySelectorAll("select").forEach((e, t) => {
|
||
let r = e.options[e.selectedIndex];
|
||
n(a[t], r && r.value ? r.text : "");
|
||
});
|
||
}
|
||
var m = "html,body{margin:0;background:#fff;height:auto!important;min-height:0!important}body{padding:24px;font-size:13px}svg{display:none!important}.ms-Persona-imageArea,.ms-Persona-image{display:none!important}.rp-print-root>*{border:0!important;box-shadow:none!important;padding:0!important}.rp-print-value{white-space:pre-wrap;color:#000;padding:1px 0 2px}", te = ({ label: e = "Печать" }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(l, {
|
||
variant: "secondary",
|
||
onClick: () => {
|
||
let e = document.querySelector(".rp-print-root");
|
||
if (!e) {
|
||
window.print();
|
||
return;
|
||
}
|
||
let t = window.open("", "_blank", "width=980,height=1200");
|
||
if (!t) {
|
||
window.print();
|
||
return;
|
||
}
|
||
let n = e.cloneNode(!0);
|
||
n.querySelectorAll(".rp-no-print").forEach((e) => e.remove()), ee(e, n);
|
||
let r = Array.from(document.querySelectorAll("style, link[rel=\"stylesheet\"]")).map((e) => e.outerHTML).join("\n");
|
||
t.document.open(), t.document.write(`<!doctype html><html><head><meta charset="utf-8">${r}<style>${m}</style></head><body>${n.outerHTML}</body></html>`), t.document.close(), t.focus();
|
||
let i = () => {
|
||
t.print(), t.close();
|
||
};
|
||
t.document.readyState === "complete" ? window.setTimeout(i, 350) : t.onload = () => {
|
||
window.setTimeout(i, 350);
|
||
};
|
||
},
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "document",
|
||
size: "sm"
|
||
}), e]
|
||
}), h = {
|
||
alert: "_alert_1qa2n_1",
|
||
warn: "_warn_1qa2n_12",
|
||
ok: "_ok_1qa2n_18",
|
||
err: "_err_1qa2n_24"
|
||
}, ne = {
|
||
warn: h.warn,
|
||
ok: h.ok,
|
||
err: h.err
|
||
}, re = {
|
||
warn: "warning",
|
||
ok: "check",
|
||
err: "close"
|
||
}, g = ({ variant: e, children: t }) => {
|
||
let n = [h.alert, ne[e]].join(" ");
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: n,
|
||
role: "status",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: re[e],
|
||
size: "sm"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", { children: t })]
|
||
});
|
||
}, _ = { badge: "_badge_6pzfu_1" }, v = ({ code: e }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span", {
|
||
className: _.badge,
|
||
children: ["№", e]
|
||
}), y = {
|
||
badge: "_badge_1emt2_1",
|
||
sm: "_sm_1emt2_13",
|
||
neutral: "_neutral_1emt2_20",
|
||
muted: "_muted_1emt2_25",
|
||
info: "_info_1emt2_30",
|
||
success: "_success_1emt2_35",
|
||
warning: "_warning_1emt2_40",
|
||
danger: "_danger_1emt2_45",
|
||
primary: "_primary_1emt2_50"
|
||
}, b = {
|
||
neutral: y.neutral,
|
||
muted: y.muted,
|
||
info: y.info,
|
||
success: y.success,
|
||
warning: y.warning,
|
||
danger: y.danger,
|
||
primary: y.primary
|
||
}, x = ({ variant: e = "neutral", size: t = "md", children: n }) => {
|
||
let r = [
|
||
y.badge,
|
||
t === "sm" ? y.sm : "",
|
||
b[e]
|
||
].filter(Boolean).join(" ");
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: r,
|
||
children: n
|
||
});
|
||
}, S = {
|
||
header: "_header_1n3g3_1",
|
||
icon: "_icon_1n3g3_12",
|
||
title: "_title_1n3g3_17",
|
||
right: "_right_1n3g3_29"
|
||
}, ie = ({ title: e, icon: t = "document", right: n }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: S.header,
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: t,
|
||
className: S.icon
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: S.title,
|
||
children: e
|
||
}),
|
||
n && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: S.right,
|
||
children: n
|
||
})
|
||
]
|
||
}), C = {
|
||
card: "_card_rzq1u_1",
|
||
header: "_header_rzq1u_14",
|
||
title: "_title_rzq1u_21",
|
||
headerRight: "_headerRight_rzq1u_28",
|
||
subtitle: "_subtitle_rzq1u_35",
|
||
hairline: "_hairline_rzq1u_42"
|
||
}, ae = ({ title: e, subtitle: t, headerRight: n, belowSubtitle: r, children: o }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: C.card,
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: C.header,
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: C.title,
|
||
children: e
|
||
}),
|
||
t && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: C.subtitle,
|
||
children: t
|
||
}),
|
||
r
|
||
] }), n && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: C.headerRight,
|
||
children: n
|
||
})]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("hr", { className: C.hairline }),
|
||
o
|
||
]
|
||
}), oe = { grid: "_grid_1ypoi_1" }, se = ({ children: e }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: oe.grid,
|
||
children: e
|
||
}), w = {
|
||
field: "_field_1wk7n_1",
|
||
full: "_full_1wk7n_8",
|
||
label: "_label_1wk7n_12",
|
||
req: "_req_1wk7n_19"
|
||
}, ce = ({ label: e, htmlFor: t, required: n, full: r, children: o }) => {
|
||
let s = [w.field, r ? w.full : ""].filter(Boolean).join(" ");
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: s,
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("label", {
|
||
className: w.label,
|
||
htmlFor: t,
|
||
children: [e, n && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: w.req,
|
||
children: " *"
|
||
})]
|
||
}), o]
|
||
});
|
||
}, le = { actions: "_actions_fpjnj_1" }, ue = ({ children: e }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: le.actions,
|
||
children: e
|
||
}), T = {
|
||
section: "_section_v562g_1",
|
||
header: "_header_v562g_5",
|
||
title: "_title_v562g_27",
|
||
chevron: "_chevron_v562g_41",
|
||
open: "_open_v562g_47",
|
||
body: "_body_v562g_51"
|
||
}, de = ({ title: e, icon: t, defaultOpen: r = !0, children: o }) => {
|
||
let [s, c] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(r);
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: T.section,
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("button", {
|
||
type: "button",
|
||
className: T.header,
|
||
onClick: () => c((e) => !e),
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span", {
|
||
className: T.title,
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: t,
|
||
size: "sm"
|
||
}), e]
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: [T.chevron, s ? T.open : ""].filter(Boolean).join(" "),
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "chevron-down",
|
||
size: "sm"
|
||
})
|
||
})]
|
||
}), s && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: T.body,
|
||
children: o
|
||
})]
|
||
});
|
||
}, fe = { input: "_input_pzmln_1" }, E = react__WEBPACK_IMPORTED_MODULE_0__.createContext(!1), D = ({ readOnly: e, children: t }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(E.Provider, {
|
||
value: e,
|
||
children: t
|
||
});
|
||
function O() {
|
||
return react__WEBPACK_IMPORTED_MODULE_0__.useContext(E);
|
||
}
|
||
//#endregion
|
||
//#region src/TextInput/TextInput.tsx
|
||
var k = ({ id: e, type: t = "text", value: n, onChange: r, placeholder: a, readOnly: o }) => {
|
||
let s = O(), c = o ?? s;
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input", {
|
||
id: e,
|
||
className: fe.input,
|
||
type: t,
|
||
value: n,
|
||
placeholder: a,
|
||
readOnly: c,
|
||
onChange: (e) => r(e.target.value)
|
||
});
|
||
}, A = { textarea: "_textarea_ps7q9_1" }, j = ({ id: e, value: t, onChange: n, placeholder: r, rows: a = 3, readOnly: o }) => {
|
||
let s = O(), c = o ?? s;
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("textarea", {
|
||
id: e,
|
||
className: A.textarea,
|
||
value: t,
|
||
placeholder: r,
|
||
rows: a,
|
||
readOnly: c,
|
||
onChange: (e) => n(e.target.value)
|
||
});
|
||
};
|
||
//#endregion
|
||
//#region src/PhoneInput/PhoneInput.tsx
|
||
function M(e) {
|
||
let t = e.replace(/\D/g, "");
|
||
if (t.length === 0) return "";
|
||
t[0] === "8" && (t = "7" + t.slice(1)), t[0] !== "7" && (t = "7" + t), t = t.slice(0, 11);
|
||
let n = t.slice(1), r = "+7";
|
||
return n.length > 0 && (r += " (" + n.slice(0, 3)), n.length >= 3 && (r += ")"), n.length > 3 && (r += " " + n.slice(3, 6)), n.length > 6 && (r += "-" + n.slice(6, 8)), n.length > 8 && (r += "-" + n.slice(8, 10)), r;
|
||
}
|
||
var N = ({ id: e, value: t, onChange: n, readOnly: r }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(k, {
|
||
id: e,
|
||
value: M(t),
|
||
onChange: (e) => n(M(e)),
|
||
placeholder: "+7 (___) ___-__-__",
|
||
readOnly: r
|
||
});
|
||
//#endregion
|
||
//#region src/MoneyInput/MoneyInput.tsx
|
||
function P(e) {
|
||
let t = e.replace(/\D/g, "");
|
||
return t ? t.replace(/\B(?=(\d{3})+(?!\d))/g, " ") : "";
|
||
}
|
||
var F = ({ id: e, value: t, onChange: n, readOnly: r }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(k, {
|
||
id: e,
|
||
value: P(t),
|
||
onChange: (e) => n(e.replace(/\D/g, "")),
|
||
readOnly: r
|
||
}), I = { select: "_select_pfqjp_1" }, L = ({ id: e, value: t, onChange: n, options: r, placeholder: o, readOnly: s }) => {
|
||
let c = O(), l = s ?? c;
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("select", {
|
||
id: e,
|
||
className: I.select,
|
||
value: t,
|
||
disabled: l,
|
||
onChange: (e) => n(e.target.value),
|
||
children: [o && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("option", {
|
||
value: "",
|
||
children: o
|
||
}), r.map((e) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("option", {
|
||
value: e.value,
|
||
children: e.label
|
||
}, e.value))]
|
||
});
|
||
}, R = {
|
||
wrap: "_wrap_2wriw_1",
|
||
input: "_input_2wriw_9",
|
||
track: "_track_2wriw_16",
|
||
thumb: "_thumb_2wriw_26",
|
||
text: "_text_2wriw_55"
|
||
}, z = ({ id: e, checked: t, onChange: n, onLabel: r, readOnly: o }) => {
|
||
let s = O(), c = o ?? s;
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("label", {
|
||
className: R.wrap,
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input", {
|
||
id: e,
|
||
type: "checkbox",
|
||
className: R.input,
|
||
checked: t,
|
||
disabled: c,
|
||
onChange: (e) => n(e.target.checked)
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: R.track,
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", { className: R.thumb })
|
||
}),
|
||
r && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: R.text,
|
||
children: r
|
||
})
|
||
]
|
||
});
|
||
}, B = () => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("svg", {
|
||
xmlns: "http://www.w3.org/2000/svg",
|
||
style: { display: "none" },
|
||
"aria-hidden": "true",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-building",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M3 21V5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v16" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M13 21V9a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v12" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M3 21h18" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "7",
|
||
y: "7",
|
||
width: "2",
|
||
height: "2",
|
||
rx: ".5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "7",
|
||
y: "12",
|
||
width: "2",
|
||
height: "2",
|
||
rx: ".5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "16",
|
||
y: "11",
|
||
width: "2",
|
||
height: "2",
|
||
rx: ".5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
})
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-chart",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "3",
|
||
y: "12",
|
||
width: "4",
|
||
height: "9",
|
||
rx: "1"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "10",
|
||
y: "7",
|
||
width: "4",
|
||
height: "14",
|
||
rx: "1"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "17",
|
||
y: "3",
|
||
width: "4",
|
||
height: "18",
|
||
rx: "1"
|
||
})
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-monitor",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "2",
|
||
y: "4",
|
||
width: "20",
|
||
height: "13",
|
||
rx: "2"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M8 21h8M12 17v4" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-helmet",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M3 16a9 9 0 0 1 18 0" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M2 16h20" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M9 8V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2" })
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-user-check",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "9",
|
||
cy: "7",
|
||
r: "4"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M3 21v-1a5 5 0 0 1 5-5h3" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M15 12l2.5 2.5L22 10" })
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-calculator",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "4",
|
||
y: "2",
|
||
width: "16",
|
||
height: "20",
|
||
rx: "2"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M8 6h8M8 10h.01M12 10h.01M16 10h.01M8 14h.01M12 14h.01M16 14h.01M8 18h4" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-send",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M22 2 11 13" }), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "m22 2-7 20-4-9-9-4z" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-download",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M12 3v12m0 0-4-4m4 4 4-4" }), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-upload",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M12 15V3m0 0-4 4m4-4 4 4" }), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-folder",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-document",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M6 3h8l5 5v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M14 3v5h5" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-calendar",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "3",
|
||
y: "4",
|
||
width: "18",
|
||
height: "17",
|
||
rx: "2"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M3 9h18M8 2v4M16 2v4" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-clipboard",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M9 3h6v2a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "5",
|
||
y: "5",
|
||
width: "14",
|
||
height: "16",
|
||
rx: "2"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M9 12h6M9 16h4" })
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-people",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "9",
|
||
cy: "7",
|
||
r: "3"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "17",
|
||
cy: "8",
|
||
r: "2.5"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M17 13.5a3.5 3.5 0 0 1 3.5 3.5v1" })
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-vehicle",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M5 11l1.5-4.5A2 2 0 0 1 8.4 5h7.2a2 2 0 0 1 1.9 1.5L19 11" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "3",
|
||
y: "11",
|
||
width: "18",
|
||
height: "7",
|
||
rx: "2"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "7.5",
|
||
cy: "15.5",
|
||
r: "1.5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "16.5",
|
||
cy: "15.5",
|
||
r: "1.5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
})
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-chat",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M21 12a9 9 0 0 1-9 9 9 9 0 0 1-5.46-1.84L3 21l1.84-3.54A9 9 0 1 1 21 12z" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-camera",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M3 8a2 2 0 0 1 2-2h2l1.5-2h7L17 6h2a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "12",
|
||
cy: "13",
|
||
r: "4"
|
||
})]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-image",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "3",
|
||
y: "3",
|
||
width: "18",
|
||
height: "18",
|
||
rx: "2"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "8.5",
|
||
cy: "8.5",
|
||
r: "1.5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "m21 15-5-5L5 21" })
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-edit",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-copy",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("rect", {
|
||
x: "9",
|
||
y: "9",
|
||
width: "11",
|
||
height: "11",
|
||
rx: "2"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-more",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "12",
|
||
cy: "5",
|
||
r: "1.5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "12",
|
||
cy: "12",
|
||
r: "1.5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "12",
|
||
cy: "19",
|
||
r: "1.5",
|
||
fill: "currentColor",
|
||
stroke: "none"
|
||
})
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-trash",
|
||
viewBox: "0 0 24 24",
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M4 7h16M10 11v6M14 11v6" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12" }),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" })
|
||
]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-close",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M18 6 6 18M6 6l12 12" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-chevron-right",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "m9 6 6 6-6 6" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-chevron-down",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "m6 9 6 6 6-6" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-chevron-left",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "m15 6-6 6 6 6" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-arrow-left",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M19 12H5m0 0 5-5m-5 5 5 5" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-search",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("circle", {
|
||
cx: "11",
|
||
cy: "11",
|
||
r: "7"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "m21 21-4.35-4.35" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-menu",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M4 6h16M4 12h16M4 18h16" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("symbol", {
|
||
id: "i-warning",
|
||
viewBox: "0 0 24 24",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", {
|
||
d: "M12 2 1 21h22z",
|
||
strokeLinejoin: "round"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M12 9v5M12 17h.01" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-check",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M5 12l5 5L20 7" })
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("symbol", {
|
||
id: "i-plus",
|
||
viewBox: "0 0 24 24",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", { d: "M12 5v14M5 12h14" })
|
||
})
|
||
]
|
||
}), V = {
|
||
zone: "_zone_m7ku4_1",
|
||
over: "_over_m7ku4_14",
|
||
hidden: "_hidden_m7ku4_20",
|
||
list: "_list_m7ku4_24",
|
||
item: "_item_m7ku4_33",
|
||
name: "_name_m7ku4_45",
|
||
size: "_size_m7ku4_53",
|
||
remove: "_remove_m7ku4_59"
|
||
};
|
||
//#endregion
|
||
//#region src/FileDropzone/FileDropzone.tsx
|
||
function pe(e) {
|
||
return e < 1024 ? `${e} Б` : e < 1048576 ? `${Math.round(e / 1024)} КБ` : `${(e / 1048576).toFixed(1)} МБ`;
|
||
}
|
||
var me = ({ files: e, onChange: r }) => {
|
||
let o = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null), [s, c] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1), l = (t) => {
|
||
!t || t.length === 0 || r([...e, ...Array.from(t)]);
|
||
}, u = (t) => {
|
||
r(e.filter((e, n) => n !== t));
|
||
}, d = [V.zone, s ? V.over : ""].filter(Boolean).join(" ");
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: d,
|
||
onClick: () => o.current && o.current.click(),
|
||
onDragOver: (e) => {
|
||
e.preventDefault(), c(!0);
|
||
},
|
||
onDragLeave: () => c(!1),
|
||
onDrop: (e) => {
|
||
e.preventDefault(), c(!1), l(e.dataTransfer.files);
|
||
},
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "upload",
|
||
size: "sm"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", { children: "Нажмите или перетащите файлы сюда" })]
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input", {
|
||
ref: o,
|
||
type: "file",
|
||
multiple: !0,
|
||
className: V.hidden,
|
||
onChange: (e) => {
|
||
l(e.target.files), e.target.value = "";
|
||
}
|
||
}),
|
||
e.length > 0 && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul", {
|
||
className: V.list,
|
||
children: e.map((e, t) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", {
|
||
className: V.item,
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "document",
|
||
size: "sm"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: V.name,
|
||
children: e.name
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: V.size,
|
||
children: pe(e.size)
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", {
|
||
type: "button",
|
||
className: V.remove,
|
||
"aria-label": "Удалить файл",
|
||
onClick: () => u(t),
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "close",
|
||
size: "sm"
|
||
})
|
||
})
|
||
]
|
||
}, `${e.name}-${t}`))
|
||
})
|
||
] });
|
||
}, H = {
|
||
list: "_list_16ms4_1",
|
||
item: "_item_16ms4_10",
|
||
link: "_link_16ms4_21",
|
||
removeBtn: "_removeBtn_16ms4_32",
|
||
empty: "_empty_16ms4_52"
|
||
}, he = ({ items: e, onRemove: t }) => e.length === 0 ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p", {
|
||
className: H.empty,
|
||
children: "Вложений нет."
|
||
}) : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("ul", {
|
||
className: H.list,
|
||
children: e.map((e) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("li", {
|
||
className: H.item,
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "document",
|
||
size: "sm"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a", {
|
||
href: e.url,
|
||
target: "_blank",
|
||
rel: "noreferrer",
|
||
className: H.link,
|
||
children: e.fileName
|
||
}),
|
||
t && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", {
|
||
type: "button",
|
||
className: H.removeBtn,
|
||
title: "Удалить вложение",
|
||
"aria-label": `Удалить ${e.fileName}`,
|
||
onClick: () => t(e.fileName),
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "trash",
|
||
size: "sm"
|
||
})
|
||
})
|
||
]
|
||
}, e.url))
|
||
}), U = {
|
||
overlay: "_overlay_1bmoc_1",
|
||
overlayIn: "_overlayIn_1bmoc_1",
|
||
card: "_card_1bmoc_14",
|
||
cardIn: "_cardIn_1bmoc_1",
|
||
title: "_title_1bmoc_25",
|
||
message: "_message_1bmoc_32",
|
||
actions: "_actions_1bmoc_39",
|
||
cancelBtn: "_cancelBtn_1bmoc_46",
|
||
confirmBtn: "_confirmBtn_1bmoc_61",
|
||
confirmDanger: "_confirmDanger_1bmoc_78"
|
||
}, W;
|
||
function ge(e) {
|
||
return W = e, () => {
|
||
W === e && (W = void 0);
|
||
};
|
||
}
|
||
function _e(e) {
|
||
return W ? new Promise((t) => W(e, t)) : Promise.resolve(window.confirm(e.message));
|
||
}
|
||
//#endregion
|
||
//#region src/ConfirmDialog/ConfirmDialog.tsx
|
||
var ve = ({ title: t, message: n, confirmText: r = "Продолжить", cancelText: s = "Отмена", danger: c, onConfirm: l, onCancel: u }) => (react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
|
||
let e = (e) => {
|
||
e.key === "Escape" && u();
|
||
};
|
||
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
||
}, [u]), (0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)(/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: U.overlay,
|
||
onMouseDown: u,
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: U.card,
|
||
role: "dialog",
|
||
"aria-modal": "true",
|
||
onMouseDown: (e) => e.stopPropagation(),
|
||
children: [
|
||
t && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: U.title,
|
||
children: t
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: U.message,
|
||
children: n
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: U.actions,
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", {
|
||
type: "button",
|
||
className: U.cancelBtn,
|
||
onClick: u,
|
||
children: s
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", {
|
||
type: "button",
|
||
className: c ? U.confirmDanger : U.confirmBtn,
|
||
onClick: l,
|
||
autoFocus: !0,
|
||
children: r
|
||
})]
|
||
})
|
||
]
|
||
})
|
||
}), document.body)), ye = () => {
|
||
let [t, n] = react__WEBPACK_IMPORTED_MODULE_0__.useState(void 0);
|
||
if (react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => ge((e, t) => n({
|
||
opts: e,
|
||
resolve: t
|
||
})), []), !t) return null;
|
||
let r = (e) => {
|
||
t.resolve(e), n(void 0);
|
||
};
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(ve, {
|
||
...t.opts,
|
||
onConfirm: () => r(!0),
|
||
onCancel: () => r(!1)
|
||
});
|
||
}, G = {
|
||
layout: "_layout_vc8am_1",
|
||
side: "_side_vc8am_9",
|
||
main: "_main_vc8am_14",
|
||
mobileBar: "_mobileBar_vc8am_22"
|
||
}, be = ({ sidebar: e, mobileToggle: t, children: n }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: G.layout,
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: G.side,
|
||
children: e
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("main", {
|
||
className: G.main,
|
||
children: [t && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: G.mobileBar,
|
||
children: t
|
||
}), n]
|
||
})]
|
||
}), K = {
|
||
tabs: "_tabs_w5rn3_1",
|
||
tab: "_tab_w5rn3_1",
|
||
active: "_active_w5rn3_30",
|
||
count: "_count_w5rn3_36"
|
||
}, xe = ({ tabs: e, activeId: t, onChange: n }) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("nav", {
|
||
className: K.tabs,
|
||
"aria-label": "Вкладки",
|
||
children: e.map((e) => {
|
||
let r = e.id === t;
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("button", {
|
||
type: "button",
|
||
className: [K.tab, r ? K.active : ""].filter(Boolean).join(" "),
|
||
"aria-current": r ? "page" : void 0,
|
||
onClick: () => n(e.id),
|
||
children: [
|
||
e.icon && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: e.icon,
|
||
size: "sm"
|
||
}),
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", { children: e.label }),
|
||
!!e.count && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("span", {
|
||
className: K.count,
|
||
children: [
|
||
"(",
|
||
e.count,
|
||
")"
|
||
]
|
||
})
|
||
]
|
||
}, e.id);
|
||
})
|
||
}), q = {
|
||
stepper: "_stepper_1tzrv_1",
|
||
step: "_step_1tzrv_1",
|
||
circle: "_circle_1tzrv_25",
|
||
completed: "_completed_1tzrv_40",
|
||
current: "_current_1tzrv_46",
|
||
connector: "_connector_1tzrv_53",
|
||
label: "_label_1tzrv_61",
|
||
labelCurrent: "_labelCurrent_1tzrv_67"
|
||
};
|
||
//#endregion
|
||
//#region src/Stepper/stepperLogic.ts
|
||
function J(e, t) {
|
||
let n = e.findIndex((e) => e.id === t);
|
||
return n === -1 ? 0 : n;
|
||
}
|
||
//#endregion
|
||
//#region src/Stepper/Stepper.tsx
|
||
function Se({ steps: t, currentId: n, completedIds: r, highestId: o, onStepClick: s }) {
|
||
let c = J(t, o);
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("nav", {
|
||
className: q.stepper,
|
||
"aria-label": "Прогресс",
|
||
children: t.map((t, o) => {
|
||
let l = r.indexOf(t.id) !== -1, u = t.id === n, d = o <= c, p = [
|
||
q.circle,
|
||
l ? q.completed : "",
|
||
u ? q.current : ""
|
||
].filter(Boolean).join(" ");
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [o > 0 && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: q.connector,
|
||
"aria-hidden": "true"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("button", {
|
||
type: "button",
|
||
className: q.step,
|
||
disabled: !d,
|
||
"aria-current": u ? "step" : void 0,
|
||
onClick: () => s(t.id),
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: p,
|
||
children: l && !u ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "check",
|
||
size: "sm"
|
||
}) : o + 1
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: [q.label, u ? q.labelCurrent : ""].filter(Boolean).join(" "),
|
||
children: t.label
|
||
})]
|
||
})] }, t.id);
|
||
})
|
||
});
|
||
}
|
||
var Y = {
|
||
nav: "_nav_1aclb_1",
|
||
navCollapsed: "_navCollapsed_1aclb_11",
|
||
head: "_head_1aclb_15",
|
||
brand: "_brand_1aclb_30",
|
||
brandText: "_brandText_1aclb_37",
|
||
toggle: "_toggle_1aclb_47",
|
||
items: "_items_1aclb_67",
|
||
item: "_item_1aclb_67",
|
||
itemActive: "_itemActive_1aclb_107",
|
||
itemIcon: "_itemIcon_1aclb_112",
|
||
itemTitle: "_itemTitle_1aclb_122",
|
||
badge: "_badge_1aclb_129",
|
||
backdrop: "_backdrop_1aclb_147",
|
||
navMobileOpen: "_navMobileOpen_1aclb_163"
|
||
}, Ce = ({ items: e, activeId: t, onChange: n, brand: o, collapsed: s, onToggleCollapsed: c, mobileOpen: l = !1, onMobileClose: u }) => {
|
||
let d = [
|
||
Y.nav,
|
||
s ? Y.navCollapsed : "",
|
||
l ? Y.navMobileOpen : ""
|
||
].filter(Boolean).join(" "), p = (e) => {
|
||
n(e), u && u();
|
||
};
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children: [l && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: Y.backdrop,
|
||
onClick: u,
|
||
"aria-hidden": "true"
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("nav", {
|
||
className: d,
|
||
"aria-label": "Разделы",
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", {
|
||
className: Y.head,
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: Y.brand,
|
||
children: !s && o && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: Y.brandText,
|
||
children: o
|
||
})
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", {
|
||
type: "button",
|
||
className: Y.toggle,
|
||
onClick: c,
|
||
"aria-label": s ? "Развернуть меню" : "Свернуть меню",
|
||
title: s ? "Развернуть меню" : "Свернуть меню",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: s ? "chevron-right" : "chevron-left",
|
||
size: "sm"
|
||
})
|
||
})]
|
||
}), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: Y.items,
|
||
children: e.map((e) => {
|
||
let n = e.id === t, r = [Y.item, n ? Y.itemActive : ""].filter(Boolean).join(" "), o = !!e.count;
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("button", {
|
||
type: "button",
|
||
className: r,
|
||
"aria-current": n ? "page" : void 0,
|
||
onClick: () => p(e.id),
|
||
title: s ? e.title : void 0,
|
||
children: [
|
||
/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: Y.itemIcon,
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: e.icon,
|
||
size: "sm"
|
||
})
|
||
}),
|
||
!s && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: Y.itemTitle,
|
||
children: e.title
|
||
}),
|
||
o && /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("span", {
|
||
className: Y.badge,
|
||
children: e.count
|
||
})
|
||
]
|
||
}, e.id);
|
||
})
|
||
})]
|
||
})] });
|
||
}, we = { toggle: "_toggle_1s269_1" }, Te = ({ onClick: e, className: t }) => {
|
||
let n = [we.toggle, t].filter(Boolean).join(" ");
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", {
|
||
type: "button",
|
||
className: n,
|
||
onClick: e,
|
||
"aria-label": "Открыть меню",
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(f, {
|
||
name: "menu",
|
||
size: "md"
|
||
})
|
||
});
|
||
}, X = {
|
||
wrap: "_wrap_1q0gd_1",
|
||
table: "_table_1q0gd_6",
|
||
rowClickable: "_rowClickable_1q0gd_33",
|
||
empty: "_empty_1q0gd_45"
|
||
};
|
||
//#endregion
|
||
//#region src/DataTable/DataTable.tsx
|
||
function Ee({ columns: e, rows: t, rowKey: n, onRowClick: r, emptyText: o = "Нет данных" }) {
|
||
let s = !!r;
|
||
return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", {
|
||
className: X.wrap,
|
||
children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("table", {
|
||
className: X.table,
|
||
children: [/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("thead", { children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tr", { children: e.map((e) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("th", {
|
||
style: {
|
||
width: e.width,
|
||
textAlign: e.align
|
||
},
|
||
children: e.title
|
||
}, e.key)) }) }), /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tbody", { children: t.length === 0 ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tr", { children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td", {
|
||
className: X.empty,
|
||
colSpan: e.length,
|
||
children: o
|
||
}) }) : t.map((t, a) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("tr", {
|
||
className: s ? X.rowClickable : void 0,
|
||
tabIndex: s ? 0 : void 0,
|
||
role: s ? "button" : void 0,
|
||
onClick: s ? () => r(t) : void 0,
|
||
onKeyDown: s ? (e) => {
|
||
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), r(t));
|
||
} : void 0,
|
||
children: e.map((e) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("td", {
|
||
style: { textAlign: e.align },
|
||
children: e.render ? e.render(t, a) : String(t[e.key] ?? "")
|
||
}, e.key))
|
||
}, n ? n(t, a) : a)) })]
|
||
})
|
||
});
|
||
}
|
||
//#endregion
|
||
//#region src/useFlipRows.ts
|
||
var De = 380, Oe = "cubic-bezier(.22, 1, .36, 1)", ke = 620, Z = 320, Ae = 45, je = 1, Me = "#fff", Ne = "0 6px 18px rgba(15, 36, 64, .13)", Pe = "rgba(212, 160, 30, .22)", Fe = "rgba(212, 160, 30, 0)";
|
||
function Ie() {
|
||
return typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
||
}
|
||
function Le(e) {
|
||
e.style.position = "relative", e.style.zIndex = "2", Array.prototype.forEach.call(e.cells, (e) => {
|
||
e.style.background = Me, e.style.boxShadow = Ne;
|
||
});
|
||
}
|
||
function Q(e) {
|
||
e.style.position = "", e.style.zIndex = "", Array.prototype.forEach.call(e.cells, (e) => {
|
||
e.style.background = "", e.style.boxShadow = "";
|
||
});
|
||
}
|
||
function $(e) {
|
||
let t = /* @__PURE__ */ new Map(), n;
|
||
if (e.forEach((e) => {
|
||
n ||= e;
|
||
}), !n) return t;
|
||
let r = n.parentElement, i = r ? r.getBoundingClientRect().top : 0;
|
||
return e.forEach((e, n) => t.set(n, e.getBoundingClientRect().top - i)), t;
|
||
}
|
||
function Re(t, n) {
|
||
let r = react__WEBPACK_IMPORTED_MODULE_0__.useRef(/* @__PURE__ */ new Map()), i = react__WEBPACK_IMPORTED_MODULE_0__.useRef(/* @__PURE__ */ new Map()), a = react__WEBPACK_IMPORTED_MODULE_0__.useRef(/* @__PURE__ */ new Map()), o = react__WEBPACK_IMPORTED_MODULE_0__.useRef([]), s = react__WEBPACK_IMPORTED_MODULE_0__.useRef([]), c = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((e) => {
|
||
let t = i.current.get(e);
|
||
return t || (t = (t) => {
|
||
t ? r.current.set(e, t) : r.current.delete(e);
|
||
}, i.current.set(e, t)), t;
|
||
}, []);
|
||
return react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect(() => {
|
||
let e = n.length !== o.current.length || n.some((e, t) => e !== o.current[t]);
|
||
if (o.current = n, !e) {
|
||
a.current = $(r.current);
|
||
return;
|
||
}
|
||
let i = $(r.current);
|
||
s.current.forEach((e) => e.cancel()), s.current = [], r.current.forEach(Q);
|
||
let c = a.current, l = $(r.current), u = [], d = [];
|
||
if (r.current.forEach((e, t) => {
|
||
let n = l.get(t);
|
||
if (n === void 0) return;
|
||
let r = c.get(t);
|
||
if (r === void 0) {
|
||
d.push(e);
|
||
return;
|
||
}
|
||
let a = (i.get(t) ?? n) - n, o = r - n + a;
|
||
Math.abs(o) >= je && u.push({
|
||
el: e,
|
||
key: t,
|
||
shift: o
|
||
});
|
||
}), a.current = l, Ie() || u.length === 0 && d.length === 0) return;
|
||
u.forEach(({ el: e, key: n, shift: r }) => {
|
||
let i = t.indexOf(n) !== -1;
|
||
i && Le(e), s.current.push(e.animate([{ transform: `translateY(${r}px)` }, { transform: "translateY(0)" }], {
|
||
duration: De,
|
||
easing: Oe
|
||
})), i && Array.prototype.forEach.call(e.cells, (e) => {
|
||
s.current.push(e.animate([{ backgroundColor: Pe }, { backgroundColor: Fe }], {
|
||
duration: ke,
|
||
easing: "ease-out"
|
||
}));
|
||
});
|
||
}), d.forEach((e, t) => {
|
||
s.current.push(e.animate([{
|
||
opacity: 0,
|
||
transform: "translateY(-6px)"
|
||
}, {
|
||
opacity: 1,
|
||
transform: "translateY(0)"
|
||
}], {
|
||
duration: Z,
|
||
delay: t * Ae,
|
||
easing: "ease-out",
|
||
fill: "backwards"
|
||
}));
|
||
});
|
||
let f = s.current.map((e) => e.finished);
|
||
Promise.all(f).then(() => r.current.forEach(Q)).catch(() => void 0);
|
||
}), react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => () => {
|
||
s.current.forEach((e) => e.cancel()), s.current = [];
|
||
}, []), c;
|
||
}
|
||
//#endregion
|
||
|
||
|
||
|
||
|
||
/***/ })
|
||
|
||
/******/ });
|
||
/************************************************************************/
|
||
/******/ // The module cache
|
||
/******/ var __webpack_module_cache__ = {};
|
||
/******/
|
||
/******/ // The require function
|
||
/******/ function __webpack_require__(moduleId) {
|
||
/******/ // Check if module is in cache
|
||
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||
/******/ if (cachedModule !== undefined) {
|
||
/******/ return cachedModule.exports;
|
||
/******/ }
|
||
/******/ // Create a new module (and put it into the cache)
|
||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||
/******/ // no module.id needed
|
||
/******/ // no module.loaded needed
|
||
/******/ exports: {}
|
||
/******/ };
|
||
/******/
|
||
/******/ // Execute the module function
|
||
/******/ var execOptions = { id: moduleId, module: module, factory: __webpack_modules__[moduleId], require: __webpack_require__ };
|
||
/******/ __webpack_require__.i.forEach(function(handler) { handler(execOptions); });
|
||
/******/ module = execOptions.module;
|
||
/******/ execOptions.factory.call(module.exports, module, module.exports, execOptions.require);
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/******/ // expose the modules object (__webpack_modules__)
|
||
/******/ __webpack_require__.m = __webpack_modules__;
|
||
/******/
|
||
/******/ // expose the module cache
|
||
/******/ __webpack_require__.c = __webpack_module_cache__;
|
||
/******/
|
||
/******/ // expose the module execution interceptor
|
||
/******/ __webpack_require__.i = [];
|
||
/******/
|
||
/************************************************************************/
|
||
/******/ /* webpack/runtime/compat get default export */
|
||
/******/ (() => {
|
||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||
/******/ __webpack_require__.n = (module) => {
|
||
/******/ var getter = module && module.__esModule ?
|
||
/******/ () => (module['default']) :
|
||
/******/ () => (module);
|
||
/******/ __webpack_require__.d(getter, { a: getter });
|
||
/******/ return getter;
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/define property getters */
|
||
/******/ (() => {
|
||
/******/ // define getter functions for harmony exports
|
||
/******/ __webpack_require__.d = (exports, definition) => {
|
||
/******/ for(var key in definition) {
|
||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||
/******/ }
|
||
/******/ }
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/get javascript update chunk filename */
|
||
/******/ (() => {
|
||
/******/ // This function allow to reference all chunks
|
||
/******/ __webpack_require__.hu = (chunkId) => {
|
||
/******/ // return url for filenames based on template
|
||
/******/ return "" + chunkId + "." + __webpack_require__.h() + ".hot-update.js";
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/get update manifest filename */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.hmrF = () => ("ct-forms-portal-web-part." + __webpack_require__.h() + ".hot-update.json");
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/getFullHash */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.h = () => ("28bba40dc5ac93a046a4")
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/global */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.g = (function() {
|
||
/******/ if (typeof globalThis === 'object') return globalThis;
|
||
/******/ try {
|
||
/******/ return this || new Function('return this')();
|
||
/******/ } catch (e) {
|
||
/******/ if (typeof window === 'object') return window;
|
||
/******/ }
|
||
/******/ })();
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||
/******/ (() => {
|
||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/load script */
|
||
/******/ (() => {
|
||
/******/ var inProgress = {};
|
||
/******/ var dataWebpackPrefix = "459579c7-954c-469e-b707-ca75d808603f_0.0.1:";
|
||
/******/ // loadScript function to load a script via script tag
|
||
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
||
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
||
/******/ var script, needAttach;
|
||
/******/ if(key !== undefined) {
|
||
/******/ var scripts = document.getElementsByTagName("script");
|
||
/******/ for(var i = 0; i < scripts.length; i++) {
|
||
/******/ var s = scripts[i];
|
||
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ if(!script) {
|
||
/******/ needAttach = true;
|
||
/******/ script = document.createElement('script');
|
||
/******/
|
||
/******/ script.charset = 'utf-8';
|
||
/******/ script.timeout = 120;
|
||
/******/ if (__webpack_require__.nc) {
|
||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||
/******/ }
|
||
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
||
/******/
|
||
/******/ script.src = url;
|
||
/******/ if (script.src.indexOf(window.location.origin + '/') !== 0) {
|
||
/******/ script.crossOrigin = "anonymous";
|
||
/******/ }
|
||
/******/ }
|
||
/******/ inProgress[url] = [done];
|
||
/******/ var onScriptComplete = (prev, event) => {
|
||
/******/ // avoid mem leaks in IE.
|
||
/******/ script.onerror = script.onload = null;
|
||
/******/ clearTimeout(timeout);
|
||
/******/ var doneFns = inProgress[url];
|
||
/******/ delete inProgress[url];
|
||
/******/ script.parentNode && script.parentNode.removeChild(script);
|
||
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
|
||
/******/ if(prev) return prev(event);
|
||
/******/ }
|
||
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
||
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
||
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
||
/******/ needAttach && document.head.appendChild(script);
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/make namespace object */
|
||
/******/ (() => {
|
||
/******/ // define __esModule on exports
|
||
/******/ __webpack_require__.r = (exports) => {
|
||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||
/******/ }
|
||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||
/******/ };
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/hot module replacement */
|
||
/******/ (() => {
|
||
/******/ var currentModuleData = {};
|
||
/******/ var installedModules = __webpack_require__.c;
|
||
/******/
|
||
/******/ // module and require creation
|
||
/******/ var currentChildModule;
|
||
/******/ var currentParents = [];
|
||
/******/
|
||
/******/ // status
|
||
/******/ var registeredStatusHandlers = [];
|
||
/******/ var currentStatus = "idle";
|
||
/******/
|
||
/******/ // while downloading
|
||
/******/ var blockingPromises = 0;
|
||
/******/ var blockingPromisesWaiting = [];
|
||
/******/
|
||
/******/ // The update info
|
||
/******/ var currentUpdateApplyHandlers;
|
||
/******/ var queuedInvalidatedModules;
|
||
/******/
|
||
/******/ __webpack_require__.hmrD = currentModuleData;
|
||
/******/
|
||
/******/ __webpack_require__.i.push(function (options) {
|
||
/******/ var module = options.module;
|
||
/******/ var require = createRequire(options.require, options.id);
|
||
/******/ module.hot = createModuleHotObject(options.id, module);
|
||
/******/ module.parents = currentParents;
|
||
/******/ module.children = [];
|
||
/******/ currentParents = [];
|
||
/******/ options.require = require;
|
||
/******/ });
|
||
/******/
|
||
/******/ __webpack_require__.hmrC = {};
|
||
/******/ __webpack_require__.hmrI = {};
|
||
/******/
|
||
/******/ function createRequire(require, moduleId) {
|
||
/******/ var me = installedModules[moduleId];
|
||
/******/ if (!me) return require;
|
||
/******/ var fn = function (request) {
|
||
/******/ if (me.hot.active) {
|
||
/******/ if (installedModules[request]) {
|
||
/******/ var parents = installedModules[request].parents;
|
||
/******/ if (parents.indexOf(moduleId) === -1) {
|
||
/******/ parents.push(moduleId);
|
||
/******/ }
|
||
/******/ } else {
|
||
/******/ currentParents = [moduleId];
|
||
/******/ currentChildModule = request;
|
||
/******/ }
|
||
/******/ if (me.children.indexOf(request) === -1) {
|
||
/******/ me.children.push(request);
|
||
/******/ }
|
||
/******/ } else {
|
||
/******/ console.warn(
|
||
/******/ "[HMR] unexpected require(" +
|
||
/******/ request +
|
||
/******/ ") from disposed module " +
|
||
/******/ moduleId
|
||
/******/ );
|
||
/******/ currentParents = [];
|
||
/******/ }
|
||
/******/ return require(request);
|
||
/******/ };
|
||
/******/ var createPropertyDescriptor = function (name) {
|
||
/******/ return {
|
||
/******/ configurable: true,
|
||
/******/ enumerable: true,
|
||
/******/ get: function () {
|
||
/******/ return require[name];
|
||
/******/ },
|
||
/******/ set: function (value) {
|
||
/******/ require[name] = value;
|
||
/******/ }
|
||
/******/ };
|
||
/******/ };
|
||
/******/ for (var name in require) {
|
||
/******/ if (Object.prototype.hasOwnProperty.call(require, name) && name !== "e") {
|
||
/******/ Object.defineProperty(fn, name, createPropertyDescriptor(name));
|
||
/******/ }
|
||
/******/ }
|
||
/******/ fn.e = function (chunkId, fetchPriority) {
|
||
/******/ return trackBlockingPromise(require.e(chunkId, fetchPriority));
|
||
/******/ };
|
||
/******/ return fn;
|
||
/******/ }
|
||
/******/
|
||
/******/ function createModuleHotObject(moduleId, me) {
|
||
/******/ var _main = currentChildModule !== moduleId;
|
||
/******/ var hot = {
|
||
/******/ // private stuff
|
||
/******/ _acceptedDependencies: {},
|
||
/******/ _acceptedErrorHandlers: {},
|
||
/******/ _declinedDependencies: {},
|
||
/******/ _selfAccepted: false,
|
||
/******/ _selfDeclined: false,
|
||
/******/ _selfInvalidated: false,
|
||
/******/ _disposeHandlers: [],
|
||
/******/ _main: _main,
|
||
/******/ _requireSelf: function () {
|
||
/******/ currentParents = me.parents.slice();
|
||
/******/ currentChildModule = _main ? undefined : moduleId;
|
||
/******/ __webpack_require__(moduleId);
|
||
/******/ },
|
||
/******/
|
||
/******/ // Module API
|
||
/******/ active: true,
|
||
/******/ accept: function (dep, callback, errorHandler) {
|
||
/******/ if (dep === undefined) hot._selfAccepted = true;
|
||
/******/ else if (typeof dep === "function") hot._selfAccepted = dep;
|
||
/******/ else if (typeof dep === "object" && dep !== null) {
|
||
/******/ for (var i = 0; i < dep.length; i++) {
|
||
/******/ hot._acceptedDependencies[dep[i]] = callback || function () {};
|
||
/******/ hot._acceptedErrorHandlers[dep[i]] = errorHandler;
|
||
/******/ }
|
||
/******/ } else {
|
||
/******/ hot._acceptedDependencies[dep] = callback || function () {};
|
||
/******/ hot._acceptedErrorHandlers[dep] = errorHandler;
|
||
/******/ }
|
||
/******/ },
|
||
/******/ decline: function (dep) {
|
||
/******/ if (dep === undefined) hot._selfDeclined = true;
|
||
/******/ else if (typeof dep === "object" && dep !== null)
|
||
/******/ for (var i = 0; i < dep.length; i++)
|
||
/******/ hot._declinedDependencies[dep[i]] = true;
|
||
/******/ else hot._declinedDependencies[dep] = true;
|
||
/******/ },
|
||
/******/ dispose: function (callback) {
|
||
/******/ hot._disposeHandlers.push(callback);
|
||
/******/ },
|
||
/******/ addDisposeHandler: function (callback) {
|
||
/******/ hot._disposeHandlers.push(callback);
|
||
/******/ },
|
||
/******/ removeDisposeHandler: function (callback) {
|
||
/******/ var idx = hot._disposeHandlers.indexOf(callback);
|
||
/******/ if (idx >= 0) hot._disposeHandlers.splice(idx, 1);
|
||
/******/ },
|
||
/******/ invalidate: function () {
|
||
/******/ this._selfInvalidated = true;
|
||
/******/ switch (currentStatus) {
|
||
/******/ case "idle":
|
||
/******/ currentUpdateApplyHandlers = [];
|
||
/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) {
|
||
/******/ __webpack_require__.hmrI[key](
|
||
/******/ moduleId,
|
||
/******/ currentUpdateApplyHandlers
|
||
/******/ );
|
||
/******/ });
|
||
/******/ setStatus("ready");
|
||
/******/ break;
|
||
/******/ case "ready":
|
||
/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) {
|
||
/******/ __webpack_require__.hmrI[key](
|
||
/******/ moduleId,
|
||
/******/ currentUpdateApplyHandlers
|
||
/******/ );
|
||
/******/ });
|
||
/******/ break;
|
||
/******/ case "prepare":
|
||
/******/ case "check":
|
||
/******/ case "dispose":
|
||
/******/ case "apply":
|
||
/******/ (queuedInvalidatedModules = queuedInvalidatedModules || []).push(
|
||
/******/ moduleId
|
||
/******/ );
|
||
/******/ break;
|
||
/******/ default:
|
||
/******/ // ignore requests in error states
|
||
/******/ break;
|
||
/******/ }
|
||
/******/ },
|
||
/******/
|
||
/******/ // Management API
|
||
/******/ check: hotCheck,
|
||
/******/ apply: hotApply,
|
||
/******/ status: function (l) {
|
||
/******/ if (!l) return currentStatus;
|
||
/******/ registeredStatusHandlers.push(l);
|
||
/******/ },
|
||
/******/ addStatusHandler: function (l) {
|
||
/******/ registeredStatusHandlers.push(l);
|
||
/******/ },
|
||
/******/ removeStatusHandler: function (l) {
|
||
/******/ var idx = registeredStatusHandlers.indexOf(l);
|
||
/******/ if (idx >= 0) registeredStatusHandlers.splice(idx, 1);
|
||
/******/ },
|
||
/******/
|
||
/******/ // inherit from previous dispose call
|
||
/******/ data: currentModuleData[moduleId]
|
||
/******/ };
|
||
/******/ currentChildModule = undefined;
|
||
/******/ return hot;
|
||
/******/ }
|
||
/******/
|
||
/******/ function setStatus(newStatus) {
|
||
/******/ currentStatus = newStatus;
|
||
/******/ var results = [];
|
||
/******/
|
||
/******/ for (var i = 0; i < registeredStatusHandlers.length; i++)
|
||
/******/ results[i] = registeredStatusHandlers[i].call(null, newStatus);
|
||
/******/
|
||
/******/ return Promise.all(results).then(function () {});
|
||
/******/ }
|
||
/******/
|
||
/******/ function unblock() {
|
||
/******/ if (--blockingPromises === 0) {
|
||
/******/ setStatus("ready").then(function () {
|
||
/******/ if (blockingPromises === 0) {
|
||
/******/ var list = blockingPromisesWaiting;
|
||
/******/ blockingPromisesWaiting = [];
|
||
/******/ for (var i = 0; i < list.length; i++) {
|
||
/******/ list[i]();
|
||
/******/ }
|
||
/******/ }
|
||
/******/ });
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ function trackBlockingPromise(promise) {
|
||
/******/ switch (currentStatus) {
|
||
/******/ case "ready":
|
||
/******/ setStatus("prepare");
|
||
/******/ /* fallthrough */
|
||
/******/ case "prepare":
|
||
/******/ blockingPromises++;
|
||
/******/ promise.then(unblock, unblock);
|
||
/******/ return promise;
|
||
/******/ default:
|
||
/******/ return promise;
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ function waitForBlockingPromises(fn) {
|
||
/******/ if (blockingPromises === 0) return fn();
|
||
/******/ return new Promise(function (resolve) {
|
||
/******/ blockingPromisesWaiting.push(function () {
|
||
/******/ resolve(fn());
|
||
/******/ });
|
||
/******/ });
|
||
/******/ }
|
||
/******/
|
||
/******/ function hotCheck(applyOnUpdate) {
|
||
/******/ if (currentStatus !== "idle") {
|
||
/******/ throw new Error("check() is only allowed in idle status");
|
||
/******/ }
|
||
/******/ return setStatus("check")
|
||
/******/ .then(__webpack_require__.hmrM)
|
||
/******/ .then(function (update) {
|
||
/******/ if (!update) {
|
||
/******/ return setStatus(applyInvalidatedModules() ? "ready" : "idle").then(
|
||
/******/ function () {
|
||
/******/ return null;
|
||
/******/ }
|
||
/******/ );
|
||
/******/ }
|
||
/******/
|
||
/******/ return setStatus("prepare").then(function () {
|
||
/******/ var updatedModules = [];
|
||
/******/ currentUpdateApplyHandlers = [];
|
||
/******/
|
||
/******/ return Promise.all(
|
||
/******/ Object.keys(__webpack_require__.hmrC).reduce(function (
|
||
/******/ promises,
|
||
/******/ key
|
||
/******/ ) {
|
||
/******/ __webpack_require__.hmrC[key](
|
||
/******/ update.c,
|
||
/******/ update.r,
|
||
/******/ update.m,
|
||
/******/ promises,
|
||
/******/ currentUpdateApplyHandlers,
|
||
/******/ updatedModules
|
||
/******/ );
|
||
/******/ return promises;
|
||
/******/ }, [])
|
||
/******/ ).then(function () {
|
||
/******/ return waitForBlockingPromises(function () {
|
||
/******/ if (applyOnUpdate) {
|
||
/******/ return internalApply(applyOnUpdate);
|
||
/******/ }
|
||
/******/ return setStatus("ready").then(function () {
|
||
/******/ return updatedModules;
|
||
/******/ });
|
||
/******/ });
|
||
/******/ });
|
||
/******/ });
|
||
/******/ });
|
||
/******/ }
|
||
/******/
|
||
/******/ function hotApply(options) {
|
||
/******/ if (currentStatus !== "ready") {
|
||
/******/ return Promise.resolve().then(function () {
|
||
/******/ throw new Error(
|
||
/******/ "apply() is only allowed in ready status (state: " +
|
||
/******/ currentStatus +
|
||
/******/ ")"
|
||
/******/ );
|
||
/******/ });
|
||
/******/ }
|
||
/******/ return internalApply(options);
|
||
/******/ }
|
||
/******/
|
||
/******/ function internalApply(options) {
|
||
/******/ options = options || {};
|
||
/******/
|
||
/******/ applyInvalidatedModules();
|
||
/******/
|
||
/******/ var results = currentUpdateApplyHandlers.map(function (handler) {
|
||
/******/ return handler(options);
|
||
/******/ });
|
||
/******/ currentUpdateApplyHandlers = undefined;
|
||
/******/
|
||
/******/ var errors = results
|
||
/******/ .map(function (r) {
|
||
/******/ return r.error;
|
||
/******/ })
|
||
/******/ .filter(Boolean);
|
||
/******/
|
||
/******/ if (errors.length > 0) {
|
||
/******/ return setStatus("abort").then(function () {
|
||
/******/ throw errors[0];
|
||
/******/ });
|
||
/******/ }
|
||
/******/
|
||
/******/ // Now in "dispose" phase
|
||
/******/ var disposePromise = setStatus("dispose");
|
||
/******/
|
||
/******/ results.forEach(function (result) {
|
||
/******/ if (result.dispose) result.dispose();
|
||
/******/ });
|
||
/******/
|
||
/******/ // Now in "apply" phase
|
||
/******/ var applyPromise = setStatus("apply");
|
||
/******/
|
||
/******/ var error;
|
||
/******/ var reportError = function (err) {
|
||
/******/ if (!error) error = err;
|
||
/******/ };
|
||
/******/
|
||
/******/ var outdatedModules = [];
|
||
/******/ results.forEach(function (result) {
|
||
/******/ if (result.apply) {
|
||
/******/ var modules = result.apply(reportError);
|
||
/******/ if (modules) {
|
||
/******/ for (var i = 0; i < modules.length; i++) {
|
||
/******/ outdatedModules.push(modules[i]);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ });
|
||
/******/
|
||
/******/ return Promise.all([disposePromise, applyPromise]).then(function () {
|
||
/******/ // handle errors in accept handlers and self accepted module load
|
||
/******/ if (error) {
|
||
/******/ return setStatus("fail").then(function () {
|
||
/******/ throw error;
|
||
/******/ });
|
||
/******/ }
|
||
/******/
|
||
/******/ if (queuedInvalidatedModules) {
|
||
/******/ return internalApply(options).then(function (list) {
|
||
/******/ outdatedModules.forEach(function (moduleId) {
|
||
/******/ if (list.indexOf(moduleId) < 0) list.push(moduleId);
|
||
/******/ });
|
||
/******/ return list;
|
||
/******/ });
|
||
/******/ }
|
||
/******/
|
||
/******/ return setStatus("idle").then(function () {
|
||
/******/ return outdatedModules;
|
||
/******/ });
|
||
/******/ });
|
||
/******/ }
|
||
/******/
|
||
/******/ function applyInvalidatedModules() {
|
||
/******/ if (queuedInvalidatedModules) {
|
||
/******/ if (!currentUpdateApplyHandlers) currentUpdateApplyHandlers = [];
|
||
/******/ Object.keys(__webpack_require__.hmrI).forEach(function (key) {
|
||
/******/ queuedInvalidatedModules.forEach(function (moduleId) {
|
||
/******/ __webpack_require__.hmrI[key](
|
||
/******/ moduleId,
|
||
/******/ currentUpdateApplyHandlers
|
||
/******/ );
|
||
/******/ });
|
||
/******/ });
|
||
/******/ queuedInvalidatedModules = undefined;
|
||
/******/ return true;
|
||
/******/ }
|
||
/******/ }
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/publicPath */
|
||
/******/ (() => {
|
||
/******/ var _publicPath = __RUSHSTACK_CURRENT_SCRIPT__ ? __RUSHSTACK_CURRENT_SCRIPT__.src : '';
|
||
/******/ __webpack_require__.p = _publicPath.slice(0, _publicPath.lastIndexOf('/') + 1);
|
||
/******/ })();
|
||
/******/
|
||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||
/******/ (() => {
|
||
/******/ // no baseURI
|
||
/******/
|
||
/******/ // object to store loaded and loading chunks
|
||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||
/******/ var installedChunks = __webpack_require__.hmrS_jsonp = __webpack_require__.hmrS_jsonp || {
|
||
/******/ "ct-forms-portal-web-part": 0
|
||
/******/ };
|
||
/******/
|
||
/******/ // no chunk on demand loading
|
||
/******/
|
||
/******/ // no prefetching
|
||
/******/
|
||
/******/ // no preloaded
|
||
/******/
|
||
/******/ var currentUpdatedModulesList;
|
||
/******/ var waitingUpdateResolves = {};
|
||
/******/ function loadUpdateChunk(chunkId, updatedModulesList) {
|
||
/******/ currentUpdatedModulesList = updatedModulesList;
|
||
/******/ return new Promise((resolve, reject) => {
|
||
/******/ waitingUpdateResolves[chunkId] = resolve;
|
||
/******/ // start update chunk loading
|
||
/******/ var url = __webpack_require__.p + __webpack_require__.hu(chunkId);
|
||
/******/ // create error before stack unwound to get useful stacktrace later
|
||
/******/ var error = new Error();
|
||
/******/ var loadingEnded = (event) => {
|
||
/******/ if(waitingUpdateResolves[chunkId]) {
|
||
/******/ waitingUpdateResolves[chunkId] = undefined
|
||
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
||
/******/ var realSrc = event && event.target && event.target.src;
|
||
/******/ error.message = 'Loading hot update chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
||
/******/ error.name = 'ChunkLoadError';
|
||
/******/ error.type = errorType;
|
||
/******/ error.request = realSrc;
|
||
/******/ reject(error);
|
||
/******/ }
|
||
/******/ };
|
||
/******/ __webpack_require__.l(url, loadingEnded);
|
||
/******/ });
|
||
/******/ }
|
||
/******/
|
||
/******/ self["webpackHotUpdate_459579c7_954c_469e_b707_ca75d808603f_0_0_1"] = (chunkId, moreModules, runtime) => {
|
||
/******/ for(var moduleId in moreModules) {
|
||
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
||
/******/ currentUpdate[moduleId] = moreModules[moduleId];
|
||
/******/ if(currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ if(runtime) currentUpdateRuntime.push(runtime);
|
||
/******/ if(waitingUpdateResolves[chunkId]) {
|
||
/******/ waitingUpdateResolves[chunkId]();
|
||
/******/ waitingUpdateResolves[chunkId] = undefined;
|
||
/******/ }
|
||
/******/ };
|
||
/******/
|
||
/******/ var currentUpdateChunks;
|
||
/******/ var currentUpdate;
|
||
/******/ var currentUpdateRemovedChunks;
|
||
/******/ var currentUpdateRuntime;
|
||
/******/ function applyHandler(options) {
|
||
/******/ if (__webpack_require__.f) delete __webpack_require__.f.jsonpHmr;
|
||
/******/ currentUpdateChunks = undefined;
|
||
/******/ function getAffectedModuleEffects(updateModuleId) {
|
||
/******/ var outdatedModules = [updateModuleId];
|
||
/******/ var outdatedDependencies = {};
|
||
/******/
|
||
/******/ var queue = outdatedModules.map(function (id) {
|
||
/******/ return {
|
||
/******/ chain: [id],
|
||
/******/ id: id
|
||
/******/ };
|
||
/******/ });
|
||
/******/ while (queue.length > 0) {
|
||
/******/ var queueItem = queue.pop();
|
||
/******/ var moduleId = queueItem.id;
|
||
/******/ var chain = queueItem.chain;
|
||
/******/ var module = __webpack_require__.c[moduleId];
|
||
/******/ if (
|
||
/******/ !module ||
|
||
/******/ (module.hot._selfAccepted && !module.hot._selfInvalidated)
|
||
/******/ )
|
||
/******/ continue;
|
||
/******/ if (module.hot._selfDeclined) {
|
||
/******/ return {
|
||
/******/ type: "self-declined",
|
||
/******/ chain: chain,
|
||
/******/ moduleId: moduleId
|
||
/******/ };
|
||
/******/ }
|
||
/******/ if (module.hot._main) {
|
||
/******/ return {
|
||
/******/ type: "unaccepted",
|
||
/******/ chain: chain,
|
||
/******/ moduleId: moduleId
|
||
/******/ };
|
||
/******/ }
|
||
/******/ for (var i = 0; i < module.parents.length; i++) {
|
||
/******/ var parentId = module.parents[i];
|
||
/******/ var parent = __webpack_require__.c[parentId];
|
||
/******/ if (!parent) continue;
|
||
/******/ if (parent.hot._declinedDependencies[moduleId]) {
|
||
/******/ return {
|
||
/******/ type: "declined",
|
||
/******/ chain: chain.concat([parentId]),
|
||
/******/ moduleId: moduleId,
|
||
/******/ parentId: parentId
|
||
/******/ };
|
||
/******/ }
|
||
/******/ if (outdatedModules.indexOf(parentId) !== -1) continue;
|
||
/******/ if (parent.hot._acceptedDependencies[moduleId]) {
|
||
/******/ if (!outdatedDependencies[parentId])
|
||
/******/ outdatedDependencies[parentId] = [];
|
||
/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
|
||
/******/ continue;
|
||
/******/ }
|
||
/******/ delete outdatedDependencies[parentId];
|
||
/******/ outdatedModules.push(parentId);
|
||
/******/ queue.push({
|
||
/******/ chain: chain.concat([parentId]),
|
||
/******/ id: parentId
|
||
/******/ });
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ return {
|
||
/******/ type: "accepted",
|
||
/******/ moduleId: updateModuleId,
|
||
/******/ outdatedModules: outdatedModules,
|
||
/******/ outdatedDependencies: outdatedDependencies
|
||
/******/ };
|
||
/******/ }
|
||
/******/
|
||
/******/ function addAllToSet(a, b) {
|
||
/******/ for (var i = 0; i < b.length; i++) {
|
||
/******/ var item = b[i];
|
||
/******/ if (a.indexOf(item) === -1) a.push(item);
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ // at begin all updates modules are outdated
|
||
/******/ // the "outdated" status can propagate to parents if they don't accept the children
|
||
/******/ var outdatedDependencies = {};
|
||
/******/ var outdatedModules = [];
|
||
/******/ var appliedUpdate = {};
|
||
/******/
|
||
/******/ var warnUnexpectedRequire = function warnUnexpectedRequire(module) {
|
||
/******/ console.warn(
|
||
/******/ "[HMR] unexpected require(" + module.id + ") to disposed module"
|
||
/******/ );
|
||
/******/ };
|
||
/******/
|
||
/******/ for (var moduleId in currentUpdate) {
|
||
/******/ if (__webpack_require__.o(currentUpdate, moduleId)) {
|
||
/******/ var newModuleFactory = currentUpdate[moduleId];
|
||
/******/ /** @type {TODO} */
|
||
/******/ var result = newModuleFactory
|
||
/******/ ? getAffectedModuleEffects(moduleId)
|
||
/******/ : {
|
||
/******/ type: "disposed",
|
||
/******/ moduleId: moduleId
|
||
/******/ };
|
||
/******/ /** @type {Error|false} */
|
||
/******/ var abortError = false;
|
||
/******/ var doApply = false;
|
||
/******/ var doDispose = false;
|
||
/******/ var chainInfo = "";
|
||
/******/ if (result.chain) {
|
||
/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
|
||
/******/ }
|
||
/******/ switch (result.type) {
|
||
/******/ case "self-declined":
|
||
/******/ if (options.onDeclined) options.onDeclined(result);
|
||
/******/ if (!options.ignoreDeclined)
|
||
/******/ abortError = new Error(
|
||
/******/ "Aborted because of self decline: " +
|
||
/******/ result.moduleId +
|
||
/******/ chainInfo
|
||
/******/ );
|
||
/******/ break;
|
||
/******/ case "declined":
|
||
/******/ if (options.onDeclined) options.onDeclined(result);
|
||
/******/ if (!options.ignoreDeclined)
|
||
/******/ abortError = new Error(
|
||
/******/ "Aborted because of declined dependency: " +
|
||
/******/ result.moduleId +
|
||
/******/ " in " +
|
||
/******/ result.parentId +
|
||
/******/ chainInfo
|
||
/******/ );
|
||
/******/ break;
|
||
/******/ case "unaccepted":
|
||
/******/ if (options.onUnaccepted) options.onUnaccepted(result);
|
||
/******/ if (!options.ignoreUnaccepted)
|
||
/******/ abortError = new Error(
|
||
/******/ "Aborted because " + moduleId + " is not accepted" + chainInfo
|
||
/******/ );
|
||
/******/ break;
|
||
/******/ case "accepted":
|
||
/******/ if (options.onAccepted) options.onAccepted(result);
|
||
/******/ doApply = true;
|
||
/******/ break;
|
||
/******/ case "disposed":
|
||
/******/ if (options.onDisposed) options.onDisposed(result);
|
||
/******/ doDispose = true;
|
||
/******/ break;
|
||
/******/ default:
|
||
/******/ throw new Error("Unexception type " + result.type);
|
||
/******/ }
|
||
/******/ if (abortError) {
|
||
/******/ return {
|
||
/******/ error: abortError
|
||
/******/ };
|
||
/******/ }
|
||
/******/ if (doApply) {
|
||
/******/ appliedUpdate[moduleId] = newModuleFactory;
|
||
/******/ addAllToSet(outdatedModules, result.outdatedModules);
|
||
/******/ for (moduleId in result.outdatedDependencies) {
|
||
/******/ if (__webpack_require__.o(result.outdatedDependencies, moduleId)) {
|
||
/******/ if (!outdatedDependencies[moduleId])
|
||
/******/ outdatedDependencies[moduleId] = [];
|
||
/******/ addAllToSet(
|
||
/******/ outdatedDependencies[moduleId],
|
||
/******/ result.outdatedDependencies[moduleId]
|
||
/******/ );
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ if (doDispose) {
|
||
/******/ addAllToSet(outdatedModules, [result.moduleId]);
|
||
/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ currentUpdate = undefined;
|
||
/******/
|
||
/******/ // Store self accepted outdated modules to require them later by the module system
|
||
/******/ var outdatedSelfAcceptedModules = [];
|
||
/******/ for (var j = 0; j < outdatedModules.length; j++) {
|
||
/******/ var outdatedModuleId = outdatedModules[j];
|
||
/******/ var module = __webpack_require__.c[outdatedModuleId];
|
||
/******/ if (
|
||
/******/ module &&
|
||
/******/ (module.hot._selfAccepted || module.hot._main) &&
|
||
/******/ // removed self-accepted modules should not be required
|
||
/******/ appliedUpdate[outdatedModuleId] !== warnUnexpectedRequire &&
|
||
/******/ // when called invalidate self-accepting is not possible
|
||
/******/ !module.hot._selfInvalidated
|
||
/******/ ) {
|
||
/******/ outdatedSelfAcceptedModules.push({
|
||
/******/ module: outdatedModuleId,
|
||
/******/ require: module.hot._requireSelf,
|
||
/******/ errorHandler: module.hot._selfAccepted
|
||
/******/ });
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ var moduleOutdatedDependencies;
|
||
/******/
|
||
/******/ return {
|
||
/******/ dispose: function () {
|
||
/******/ currentUpdateRemovedChunks.forEach(function (chunkId) {
|
||
/******/ delete installedChunks[chunkId];
|
||
/******/ });
|
||
/******/ currentUpdateRemovedChunks = undefined;
|
||
/******/
|
||
/******/ var idx;
|
||
/******/ var queue = outdatedModules.slice();
|
||
/******/ while (queue.length > 0) {
|
||
/******/ var moduleId = queue.pop();
|
||
/******/ var module = __webpack_require__.c[moduleId];
|
||
/******/ if (!module) continue;
|
||
/******/
|
||
/******/ var data = {};
|
||
/******/
|
||
/******/ // Call dispose handlers
|
||
/******/ var disposeHandlers = module.hot._disposeHandlers;
|
||
/******/ for (j = 0; j < disposeHandlers.length; j++) {
|
||
/******/ disposeHandlers[j].call(null, data);
|
||
/******/ }
|
||
/******/ __webpack_require__.hmrD[moduleId] = data;
|
||
/******/
|
||
/******/ // disable module (this disables requires from this module)
|
||
/******/ module.hot.active = false;
|
||
/******/
|
||
/******/ // remove module from cache
|
||
/******/ delete __webpack_require__.c[moduleId];
|
||
/******/
|
||
/******/ // when disposing there is no need to call dispose handler
|
||
/******/ delete outdatedDependencies[moduleId];
|
||
/******/
|
||
/******/ // remove "parents" references from all children
|
||
/******/ for (j = 0; j < module.children.length; j++) {
|
||
/******/ var child = __webpack_require__.c[module.children[j]];
|
||
/******/ if (!child) continue;
|
||
/******/ idx = child.parents.indexOf(moduleId);
|
||
/******/ if (idx >= 0) {
|
||
/******/ child.parents.splice(idx, 1);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ // remove outdated dependency from module children
|
||
/******/ var dependency;
|
||
/******/ for (var outdatedModuleId in outdatedDependencies) {
|
||
/******/ if (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) {
|
||
/******/ module = __webpack_require__.c[outdatedModuleId];
|
||
/******/ if (module) {
|
||
/******/ moduleOutdatedDependencies =
|
||
/******/ outdatedDependencies[outdatedModuleId];
|
||
/******/ for (j = 0; j < moduleOutdatedDependencies.length; j++) {
|
||
/******/ dependency = moduleOutdatedDependencies[j];
|
||
/******/ idx = module.children.indexOf(dependency);
|
||
/******/ if (idx >= 0) module.children.splice(idx, 1);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ },
|
||
/******/ apply: function (reportError) {
|
||
/******/ // insert new code
|
||
/******/ for (var updateModuleId in appliedUpdate) {
|
||
/******/ if (__webpack_require__.o(appliedUpdate, updateModuleId)) {
|
||
/******/ __webpack_require__.m[updateModuleId] = appliedUpdate[updateModuleId];
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ // run new runtime modules
|
||
/******/ for (var i = 0; i < currentUpdateRuntime.length; i++) {
|
||
/******/ currentUpdateRuntime[i](__webpack_require__);
|
||
/******/ }
|
||
/******/
|
||
/******/ // call accept handlers
|
||
/******/ for (var outdatedModuleId in outdatedDependencies) {
|
||
/******/ if (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) {
|
||
/******/ var module = __webpack_require__.c[outdatedModuleId];
|
||
/******/ if (module) {
|
||
/******/ moduleOutdatedDependencies =
|
||
/******/ outdatedDependencies[outdatedModuleId];
|
||
/******/ var callbacks = [];
|
||
/******/ var errorHandlers = [];
|
||
/******/ var dependenciesForCallbacks = [];
|
||
/******/ for (var j = 0; j < moduleOutdatedDependencies.length; j++) {
|
||
/******/ var dependency = moduleOutdatedDependencies[j];
|
||
/******/ var acceptCallback =
|
||
/******/ module.hot._acceptedDependencies[dependency];
|
||
/******/ var errorHandler =
|
||
/******/ module.hot._acceptedErrorHandlers[dependency];
|
||
/******/ if (acceptCallback) {
|
||
/******/ if (callbacks.indexOf(acceptCallback) !== -1) continue;
|
||
/******/ callbacks.push(acceptCallback);
|
||
/******/ errorHandlers.push(errorHandler);
|
||
/******/ dependenciesForCallbacks.push(dependency);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ for (var k = 0; k < callbacks.length; k++) {
|
||
/******/ try {
|
||
/******/ callbacks[k].call(null, moduleOutdatedDependencies);
|
||
/******/ } catch (err) {
|
||
/******/ if (typeof errorHandlers[k] === "function") {
|
||
/******/ try {
|
||
/******/ errorHandlers[k](err, {
|
||
/******/ moduleId: outdatedModuleId,
|
||
/******/ dependencyId: dependenciesForCallbacks[k]
|
||
/******/ });
|
||
/******/ } catch (err2) {
|
||
/******/ if (options.onErrored) {
|
||
/******/ options.onErrored({
|
||
/******/ type: "accept-error-handler-errored",
|
||
/******/ moduleId: outdatedModuleId,
|
||
/******/ dependencyId: dependenciesForCallbacks[k],
|
||
/******/ error: err2,
|
||
/******/ originalError: err
|
||
/******/ });
|
||
/******/ }
|
||
/******/ if (!options.ignoreErrored) {
|
||
/******/ reportError(err2);
|
||
/******/ reportError(err);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ } else {
|
||
/******/ if (options.onErrored) {
|
||
/******/ options.onErrored({
|
||
/******/ type: "accept-errored",
|
||
/******/ moduleId: outdatedModuleId,
|
||
/******/ dependencyId: dependenciesForCallbacks[k],
|
||
/******/ error: err
|
||
/******/ });
|
||
/******/ }
|
||
/******/ if (!options.ignoreErrored) {
|
||
/******/ reportError(err);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ // Load self accepted modules
|
||
/******/ for (var o = 0; o < outdatedSelfAcceptedModules.length; o++) {
|
||
/******/ var item = outdatedSelfAcceptedModules[o];
|
||
/******/ var moduleId = item.module;
|
||
/******/ try {
|
||
/******/ item.require(moduleId);
|
||
/******/ } catch (err) {
|
||
/******/ if (typeof item.errorHandler === "function") {
|
||
/******/ try {
|
||
/******/ item.errorHandler(err, {
|
||
/******/ moduleId: moduleId,
|
||
/******/ module: __webpack_require__.c[moduleId]
|
||
/******/ });
|
||
/******/ } catch (err1) {
|
||
/******/ if (options.onErrored) {
|
||
/******/ options.onErrored({
|
||
/******/ type: "self-accept-error-handler-errored",
|
||
/******/ moduleId: moduleId,
|
||
/******/ error: err1,
|
||
/******/ originalError: err
|
||
/******/ });
|
||
/******/ }
|
||
/******/ if (!options.ignoreErrored) {
|
||
/******/ reportError(err1);
|
||
/******/ reportError(err);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ } else {
|
||
/******/ if (options.onErrored) {
|
||
/******/ options.onErrored({
|
||
/******/ type: "self-accept-errored",
|
||
/******/ moduleId: moduleId,
|
||
/******/ error: err
|
||
/******/ });
|
||
/******/ }
|
||
/******/ if (!options.ignoreErrored) {
|
||
/******/ reportError(err);
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ return outdatedModules;
|
||
/******/ }
|
||
/******/ };
|
||
/******/ }
|
||
/******/ __webpack_require__.hmrI.jsonp = function (moduleId, applyHandlers) {
|
||
/******/ if (!currentUpdate) {
|
||
/******/ currentUpdate = {};
|
||
/******/ currentUpdateRuntime = [];
|
||
/******/ currentUpdateRemovedChunks = [];
|
||
/******/ applyHandlers.push(applyHandler);
|
||
/******/ }
|
||
/******/ if (!__webpack_require__.o(currentUpdate, moduleId)) {
|
||
/******/ currentUpdate[moduleId] = __webpack_require__.m[moduleId];
|
||
/******/ }
|
||
/******/ };
|
||
/******/ __webpack_require__.hmrC.jsonp = function (
|
||
/******/ chunkIds,
|
||
/******/ removedChunks,
|
||
/******/ removedModules,
|
||
/******/ promises,
|
||
/******/ applyHandlers,
|
||
/******/ updatedModulesList
|
||
/******/ ) {
|
||
/******/ applyHandlers.push(applyHandler);
|
||
/******/ currentUpdateChunks = {};
|
||
/******/ currentUpdateRemovedChunks = removedChunks;
|
||
/******/ currentUpdate = removedModules.reduce(function (obj, key) {
|
||
/******/ obj[key] = false;
|
||
/******/ return obj;
|
||
/******/ }, {});
|
||
/******/ currentUpdateRuntime = [];
|
||
/******/ chunkIds.forEach(function (chunkId) {
|
||
/******/ if (
|
||
/******/ __webpack_require__.o(installedChunks, chunkId) &&
|
||
/******/ installedChunks[chunkId] !== undefined
|
||
/******/ ) {
|
||
/******/ promises.push(loadUpdateChunk(chunkId, updatedModulesList));
|
||
/******/ currentUpdateChunks[chunkId] = true;
|
||
/******/ } else {
|
||
/******/ currentUpdateChunks[chunkId] = false;
|
||
/******/ }
|
||
/******/ });
|
||
/******/ if (__webpack_require__.f) {
|
||
/******/ __webpack_require__.f.jsonpHmr = function (chunkId, promises) {
|
||
/******/ if (
|
||
/******/ currentUpdateChunks &&
|
||
/******/ __webpack_require__.o(currentUpdateChunks, chunkId) &&
|
||
/******/ !currentUpdateChunks[chunkId]
|
||
/******/ ) {
|
||
/******/ promises.push(loadUpdateChunk(chunkId));
|
||
/******/ currentUpdateChunks[chunkId] = true;
|
||
/******/ }
|
||
/******/ };
|
||
/******/ }
|
||
/******/ };
|
||
/******/
|
||
/******/ __webpack_require__.hmrM = () => {
|
||
/******/ if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");
|
||
/******/ return fetch(__webpack_require__.p + __webpack_require__.hmrF()).then((response) => {
|
||
/******/ if(response.status === 404) return; // no update available
|
||
/******/ if(!response.ok) throw new Error("Failed to fetch update manifest " + response.statusText);
|
||
/******/ return response.json();
|
||
/******/ });
|
||
/******/ };
|
||
/******/
|
||
/******/ // no on chunks loaded
|
||
/******/
|
||
/******/ // no jsonp function
|
||
/******/ })();
|
||
/******/
|
||
/************************************************************************/
|
||
/******/
|
||
/******/ // module cache are used so entry inlining is disabled
|
||
/******/ // startup
|
||
/******/ // Load entry module and return exports
|
||
/******/ __webpack_require__(29);
|
||
/******/ __webpack_require__(826);
|
||
/******/ var __webpack_exports__ = __webpack_require__(779);
|
||
/******/
|
||
/******/ return __webpack_exports__;
|
||
/******/ })()
|
||
;
|
||
});})();;
|
||
//# sourceMappingURL=ct-forms-portal-web-part.js.map
|