PluginProbe
Elementor Website Builder – more than just a page builder / 3.13.3
Elementor Website Builder – more than just a page builder v3.13.3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / assets / js / ai-admin.js

ai-admin.js in Elementor Website Builder – more than just a page builder 3.13.3, at assets/js/ai-admin.js

28,896 lines 991.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.13.3 - 22-05-2023 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../modules/ai/assets/js/editor/actions-data.js":
6 /*!******************************************************!*\
7 !*** ../modules/ai/assets/js/editor/actions-data.js ***!
8 \******************************************************/
9 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10
11 "use strict";
12 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
13
14
15 Object.defineProperty(exports, "__esModule", ({
16 value: true
17 }));
18 exports.vocalTones = exports.translateLanguages = exports.textareaAutocomplete = exports.textAutocomplete = exports.codeHtmlAutocomplete = exports.codeCssAutocomplete = void 0;
19 var textAutocomplete = [__('Craft a catchy slogan for', 'elementor'), __('Write a strong section header for', 'elementor'), __('Create a blog title for', 'elementor'), __('Suggest a 4 word headline for', 'elementor'), __('Write an attention grabbing title for', 'elementor')];
20 exports.textAutocomplete = textAutocomplete;
21 var textareaAutocomplete = [__('Write a product description for', 'elementor'), __('Create a blog post for', 'elementor'), __('Craft an about us section for', 'elementor'), __('Offer a few sentences to invite visitors to', 'elementor'), __('Write microcopy for a submission form that includes', 'elementor')];
22 exports.textareaAutocomplete = textareaAutocomplete;
23 var codeHtmlAutocomplete = [__('GA event fired on every button element click (assume GA was loaded)', 'elementor'), __('Iframe code to embed a Spotify widget on my web page. My ID is 1234567890', 'elementor'), __('Write an embed code of Google Analytics', 'elementor'), __('Write an embed code of Facebook Pixel', 'elementor'), __('HTML code that embeds the following PDF into a webpage: link to PDF', 'elementor')];
24 exports.codeHtmlAutocomplete = codeHtmlAutocomplete;
25 var codeCssAutocomplete = [__('On hover, animate 20% bigger, rotate 10 deg CCW', 'elementor'), __('Add a circle-shaped clip mask, semi transparent on hover', 'elementor'), __('Rainbow colored animated text gradient', 'elementor'), __('Add a 3D shadow to the text', 'elementor')];
26 exports.codeCssAutocomplete = codeCssAutocomplete;
27 var vocalTones = [{
28 label: __('Casual', 'elementor')
29 }, {
30 label: __('Confidence', 'elementor')
31 }, {
32 label: __('Formal', 'elementor')
33 }, {
34 label: __('Friendly', 'elementor')
35 }, {
36 label: __('Inspirational', 'elementor')
37 }, {
38 label: __('Motivational', 'elementor')
39 }, {
40 label: __('Nostalgic', 'elementor')
41 }, {
42 label: __('Playful', 'elementor')
43 }, {
44 label: __('Professional', 'elementor')
45 }, {
46 label: __('Scientific', 'elementor')
47 }, {
48 label: __('Straightforward', 'elementor')
49 }, {
50 label: __('Witty', 'elementor')
51 }];
52 exports.vocalTones = vocalTones;
53 var translateLanguages = [{
54 label: __('Arabic', 'elementor'),
55 value: 'ar-SA'
56 }, {
57 label: __('Chinese', 'elementor'),
58 value: 'zh-CN'
59 }, {
60 label: __('Czech', 'elementor'),
61 value: 'cs-CZ'
62 }, {
63 label: __('Danish', 'elementor'),
64 value: 'da-DK'
65 }, {
66 label: __('Dutch', 'elementor'),
67 value: 'nl-NL'
68 }, {
69 label: __('English', 'elementor'),
70 value: 'en-US'
71 }, {
72 label: __('Finnish', 'elementor'),
73 value: 'fi-FI'
74 }, {
75 label: __('French', 'elementor'),
76 value: 'fr-FR'
77 }, {
78 label: __('German', 'elementor'),
79 value: 'de-DE'
80 }, {
81 label: __('Greek', 'elementor'),
82 value: 'el-GR'
83 }, {
84 label: __('Hebrew', 'elementor'),
85 value: 'he-IL'
86 }, {
87 label: __('Hungarian', 'elementor'),
88 value: 'hu-HU'
89 }, {
90 label: __('Indonesian', 'elementor'),
91 value: 'id-ID'
92 }, {
93 label: __('Italian', 'elementor'),
94 value: 'it-IT'
95 }, {
96 label: __('Japanese', 'elementor'),
97 value: 'ja-JP'
98 }, {
99 label: __('Korean', 'elementor'),
100 value: 'ko-KR'
101 }, {
102 label: __('Persian', 'elementor'),
103 value: 'fa-IR'
104 }, {
105 label: __('Polish', 'elementor'),
106 value: 'pl-PL'
107 }, {
108 label: __('Portuguese', 'elementor'),
109 value: 'pt-PT'
110 }, {
111 label: __('Russian', 'elementor'),
112 value: 'ru-RU'
113 }, {
114 label: __('Spanish', 'elementor'),
115 value: 'es-ES'
116 }, {
117 label: __('Swedish', 'elementor'),
118 value: 'sv-SE'
119 }, {
120 label: __('Thai', 'elementor'),
121 value: 'th-TH'
122 }, {
123 label: __('Turkish', 'elementor'),
124 value: 'tr-TR'
125 }, {
126 label: __('Vietnamese', 'elementor'),
127 value: 'vi-VN'
128 }];
129 exports.translateLanguages = translateLanguages;
130
131 /***/ }),
132
133 /***/ "../modules/ai/assets/js/editor/api/index.js":
134 /*!***************************************************!*\
135 !*** ../modules/ai/assets/js/editor/api/index.js ***!
136 \***************************************************/
137 /***/ ((__unused_webpack_module, exports) => {
138
139 "use strict";
140
141
142 Object.defineProperty(exports, "__esModule", ({
143 value: true
144 }));
145 exports.setStatusFeedback = exports.setGetStarted = exports.getUserInformation = exports.getEditText = exports.getCustomCode = exports.getCustomCSS = exports.getCompletionText = void 0;
146 var request = function request(endpoint) {
147 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
148 return new Promise(function (resolve, reject) {
149 return elementorCommon.ajax.addRequest(endpoint, {
150 success: resolve,
151 error: reject,
152 data: data
153 });
154 });
155 };
156 var getUserInformation = function getUserInformation() {
157 return request('ai_get_user_information');
158 };
159 exports.getUserInformation = getUserInformation;
160 var getCompletionText = function getCompletionText(prompt) {
161 return request('ai_get_completion_text', {
162 prompt: prompt
163 });
164 };
165 exports.getCompletionText = getCompletionText;
166 var getEditText = function getEditText(input, instruction) {
167 return request('ai_get_edit_text', {
168 input: input,
169 instruction: instruction
170 });
171 };
172 exports.getEditText = getEditText;
173 var getCustomCode = function getCustomCode(prompt, language) {
174 return request('ai_get_custom_code', {
175 prompt: prompt,
176 language: language
177 });
178 };
179 exports.getCustomCode = getCustomCode;
180 var getCustomCSS = function getCustomCSS(prompt, htmlMarkup, elementId) {
181 return request('ai_get_custom_css', {
182 prompt: prompt,
183 html_markup: htmlMarkup,
184 element_id: elementId
185 });
186 };
187 exports.getCustomCSS = getCustomCSS;
188 var setGetStarted = function setGetStarted() {
189 return request('ai_set_get_started');
190 };
191 exports.setGetStarted = setGetStarted;
192 var setStatusFeedback = function setStatusFeedback(responseId) {
193 return request('ai_set_status_feedback', {
194 response_id: responseId
195 });
196 };
197 exports.setStatusFeedback = setStatusFeedback;
198
199 /***/ }),
200
201 /***/ "../modules/ai/assets/js/editor/app.js":
202 /*!*********************************************!*\
203 !*** ../modules/ai/assets/js/editor/app.js ***!
204 \*********************************************/
205 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
206
207 "use strict";
208 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
209
210
211 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
212 Object.defineProperty(exports, "__esModule", ({
213 value: true
214 }));
215 exports["default"] = void 0;
216 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
217 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
218 var _pageContent = _interopRequireDefault(__webpack_require__(/*! ./page-content */ "../modules/ai/assets/js/editor/page-content.js"));
219 var _helpers = __webpack_require__(/*! ./helpers */ "../modules/ai/assets/js/editor/helpers.js");
220 var App = function App(props) {
221 return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
222 rtl: props.isRTL
223 }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
224 colorScheme: props.colorScheme
225 }, /*#__PURE__*/_react.default.createElement(_pageContent.default, {
226 type: props.type,
227 controlType: props.controlType,
228 onClose: props.onClose,
229 onConnect: _helpers.onConnect,
230 getControlValue: props.getControlValue,
231 setControlValue: props.setControlValue,
232 additionalOptions: props.additionalOptions
233 })));
234 };
235 App.propTypes = {
236 colorScheme: PropTypes.oneOf(['auto', 'light', 'dark']),
237 type: PropTypes.string,
238 controlType: PropTypes.string,
239 onClose: PropTypes.func,
240 getControlValue: PropTypes.func,
241 setControlValue: PropTypes.func,
242 additionalOptions: PropTypes.object,
243 isRTL: PropTypes.bool
244 };
245 var _default = App;
246 exports["default"] = _default;
247
248 /***/ }),
249
250 /***/ "../modules/ai/assets/js/editor/components/dialog-header.js":
251 /*!******************************************************************!*\
252 !*** ../modules/ai/assets/js/editor/components/dialog-header.js ***!
253 \******************************************************************/
254 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
255
256 "use strict";
257 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
258 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
259
260
261 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
262 Object.defineProperty(exports, "__esModule", ({
263 value: true
264 }));
265 exports["default"] = void 0;
266 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
267 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
268 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
269 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
270 var _styledChip = _interopRequireDefault(__webpack_require__(/*! ./ui/styled-chip */ "../modules/ai/assets/js/editor/components/ui/styled-chip.js"));
271 var ElementorLogo = function ElementorLogo(props) {
272 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
273 viewBox: "0 0 32 32"
274 }, props), /*#__PURE__*/_react.default.createElement("path", {
275 fillRule: "evenodd",
276 clipRule: "evenodd",
277 d: "M2.69648 24.8891C0.938383 22.2579 0 19.1645 0 16C0 11.7566 1.68571 7.68687 4.68629 4.68629C7.68687 1.68571 11.7566 0 16 0C19.1645 0 22.2579 0.938383 24.8891 2.69648C27.5203 4.45459 29.5711 6.95344 30.7821 9.87706C31.9931 12.8007 32.3099 16.0177 31.6926 19.1214C31.0752 22.2251 29.5514 25.0761 27.3137 27.3137C25.0761 29.5514 22.2251 31.0752 19.1214 31.6926C16.0177 32.3099 12.8007 31.9931 9.87706 30.7821C6.95344 29.5711 4.45459 27.5203 2.69648 24.8891ZM12.0006 9.33281H9.33437V22.6665H12.0006V9.33281ZM22.6657 9.33281H14.6669V11.9991H22.6657V9.33281ZM22.6657 14.6654H14.6669V17.3316H22.6657V14.6654ZM22.6657 20.0003H14.6669V22.6665H22.6657V20.0003Z"
278 }));
279 };
280 var StyledElementorLogo = (0, _ui.styled)(ElementorLogo)(function (_ref) {
281 var theme = _ref.theme;
282 return {
283 width: theme.sizing['400'],
284 height: theme.sizing['400'],
285 '& path': {
286 fill: theme.palette.text.primary
287 }
288 };
289 });
290 var DialogHeader = function DialogHeader(props) {
291 return /*#__PURE__*/_react.default.createElement(_ui.DialogTitle, {
292 component: "div",
293 sx: {
294 fontWeight: 'normal'
295 }
296 }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
297 direction: "row",
298 justifyContent: "space-between",
299 alignItems: "center"
300 }, /*#__PURE__*/_react.default.createElement(_ui.Stack, {
301 direction: "row",
302 spacing: 3,
303 alignItems: "center"
304 }, /*#__PURE__*/_react.default.createElement(StyledElementorLogo, null), /*#__PURE__*/_react.default.createElement(_ui.Typography, {
305 variant: "h6",
306 sx: {
307 color: 'text.primary'
308 }
309 }, __('AI', 'elementor')), /*#__PURE__*/_react.default.createElement(_styledChip.default, {
310 label: __('Beta', 'elementor'),
311 color: "default"
312 })), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
313 direction: "row",
314 spacing: 3,
315 alignItems: "center"
316 }, props.children, /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
317 "aria-label": "close",
318 onClick: props.onClose,
319 sx: {
320 '&.MuiButtonBase-root': {
321 mr: -4
322 }
323 }
324 }, /*#__PURE__*/_react.default.createElement(_icons.XIcon, null)))));
325 };
326 DialogHeader.propTypes = {
327 onClose: PropTypes.func.isRequired,
328 children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
329 };
330 var _default = DialogHeader;
331 exports["default"] = _default;
332
333 /***/ }),
334
335 /***/ "../modules/ai/assets/js/editor/components/generate-button.js":
336 /*!********************************************************************!*\
337 !*** ../modules/ai/assets/js/editor/components/generate-button.js ***!
338 \********************************************************************/
339 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
340
341 "use strict";
342 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
343
344
345 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
346 Object.defineProperty(exports, "__esModule", ({
347 value: true
348 }));
349 exports["default"] = void 0;
350 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
351 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
352 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
353 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
354 var GenerateButton = function GenerateButton(props) {
355 return /*#__PURE__*/_react.default.createElement(_ui.Button, (0, _extends2.default)({
356 variant: "contained",
357 endIcon: /*#__PURE__*/_react.default.createElement(_icons.AIIcon, null),
358 disabled: !prompt,
359 "aria-label": __('search', 'elementor'),
360 type: "submit",
361 size: "small",
362 sx: {
363 '& .MuiButton-endIcon': {
364 width: 18
365 }
366 }
367 }, props));
368 };
369 var _default = GenerateButton;
370 exports["default"] = _default;
371
372 /***/ }),
373
374 /***/ "../modules/ai/assets/js/editor/components/loader.js":
375 /*!***********************************************************!*\
376 !*** ../modules/ai/assets/js/editor/components/loader.js ***!
377 \***********************************************************/
378 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
379
380 "use strict";
381
382
383 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
384 Object.defineProperty(exports, "__esModule", ({
385 value: true
386 }));
387 exports["default"] = void 0;
388 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
389 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
390 var Loader = function Loader() {
391 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
392 sx: {
393 px: 4,
394 py: 6
395 }
396 }, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, {
397 color: "secondary"
398 }));
399 };
400 var _default = Loader;
401 exports["default"] = _default;
402
403 /***/ }),
404
405 /***/ "../modules/ai/assets/js/editor/components/prompt-action-selection.js":
406 /*!****************************************************************************!*\
407 !*** ../modules/ai/assets/js/editor/components/prompt-action-selection.js ***!
408 \****************************************************************************/
409 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
410
411 "use strict";
412 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
413
414
415 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
416 Object.defineProperty(exports, "__esModule", ({
417 value: true
418 }));
419 exports["default"] = void 0;
420 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
421 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
422 var labelToDashCash = function labelToDashCash(str) {
423 return str.toLowerCase().replace(/ /g, '-');
424 };
425 var PromptActionSelection = function PromptActionSelection(props) {
426 var actionId = labelToDashCash(props.label);
427 return /*#__PURE__*/_react.default.createElement(_ui.FormControl, {
428 sx: {
429 width: 138
430 }
431 }, /*#__PURE__*/_react.default.createElement(_ui.InputLabel, {
432 id: actionId
433 }, props.label), /*#__PURE__*/_react.default.createElement(_ui.Select, {
434 labelId: actionId,
435 id: actionId,
436 value: "",
437 color: "secondary",
438 onChange: props.onChange,
439 size: "small",
440 label: props.label,
441 MenuProps: {
442 PaperProps: {
443 sx: {
444 width: 138
445 }
446 }
447 }
448 }, props.options.map(function (option) {
449 return /*#__PURE__*/_react.default.createElement(_ui.MenuItem, {
450 dense: true,
451 key: option.label,
452 value: option.label
453 }, option.label);
454 })));
455 };
456 PromptActionSelection.propTypes = {
457 label: PropTypes.string.isRequired,
458 options: PropTypes.arrayOf(PropTypes.shape({
459 label: PropTypes.string.isRequired
460 })).isRequired,
461 onChange: PropTypes.func.isRequired
462 };
463 var _default = PromptActionSelection;
464 exports["default"] = _default;
465
466 /***/ }),
467
468 /***/ "../modules/ai/assets/js/editor/components/prompt-action.js":
469 /*!******************************************************************!*\
470 !*** ../modules/ai/assets/js/editor/components/prompt-action.js ***!
471 \******************************************************************/
472 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
473
474 "use strict";
475
476
477 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
478 Object.defineProperty(exports, "__esModule", ({
479 value: true
480 }));
481 exports["default"] = void 0;
482 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
483 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
484 var _styledChip = _interopRequireDefault(__webpack_require__(/*! ./ui/styled-chip */ "../modules/ai/assets/js/editor/components/ui/styled-chip.js"));
485 var PromptAction = function PromptAction(props) {
486 return /*#__PURE__*/_react.default.createElement(_styledChip.default, (0, _extends2.default)({
487 size: "large",
488 color: "secondary",
489 variant: "outlined"
490 }, props));
491 };
492 var _default = PromptAction;
493 exports["default"] = _default;
494
495 /***/ }),
496
497 /***/ "../modules/ai/assets/js/editor/components/prompt-credits.js":
498 /*!*******************************************************************!*\
499 !*** ../modules/ai/assets/js/editor/components/prompt-credits.js ***!
500 \*******************************************************************/
501 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
502
503 "use strict";
504 /* provided dependency */ var sprintf = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["sprintf"];
505 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
506 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
507
508
509 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
510 Object.defineProperty(exports, "__esModule", ({
511 value: true
512 }));
513 exports["default"] = void 0;
514 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
515 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
516 var PromptCredits = function PromptCredits(props) {
517 if (props.usagePercentage < 80) {
518 return null;
519 }
520 return /*#__PURE__*/_react.default.createElement(_ui.Typography, {
521 variant: "caption",
522 color: "text.tertiary"
523 }, /* Translators: %s: AI prompt remained credits. */
524 sprintf(__('You\'ve used %s of the free trial.', 'elementor'), props.usagePercentage + '%'), ' ', /*#__PURE__*/_react.default.createElement("a", {
525 href: "https://go.elementor.com/ai-popup-purchase-limit-reached-80-percent/",
526 target: "_blank",
527 rel: "noreferrer"
528 }, __('Upgrade for unlimited access', 'elementor')), ".");
529 };
530 PromptCredits.propTypes = {
531 usagePercentage: PropTypes.number.isRequired
532 };
533 var _default = PromptCredits;
534 exports["default"] = _default;
535
536 /***/ }),
537
538 /***/ "../modules/ai/assets/js/editor/components/prompt-dialog.js":
539 /*!******************************************************************!*\
540 !*** ../modules/ai/assets/js/editor/components/prompt-dialog.js ***!
541 \******************************************************************/
542 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
543
544 "use strict";
545 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
546
547
548 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
549 Object.defineProperty(exports, "__esModule", ({
550 value: true
551 }));
552 exports["default"] = void 0;
553 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
554 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
555 var _reactDraggable = _interopRequireDefault(__webpack_require__(/*! react-draggable */ "../node_modules/react-draggable/build/cjs/cjs.js"));
556 var _dialogHeader = _interopRequireDefault(__webpack_require__(/*! ./dialog-header */ "../modules/ai/assets/js/editor/components/dialog-header.js"));
557 var PromptDialog = function PromptDialog(props) {
558 return /*#__PURE__*/_react.default.createElement(_reactDraggable.default, {
559 handle: ".MuiDialogTitle-root",
560 cancel: '[class*="MuiDialogContent-root"]'
561 }, /*#__PURE__*/_react.default.createElement(_ui.Dialog, {
562 open: true,
563 onClose: props.onClose,
564 fullWidth: true,
565 hideBackdrop: true,
566 maxWidth: "sm",
567 sx: {
568 '& .MuiDialog-container': {
569 alignItems: 'flex-start',
570 mt: '17vh'
571 }
572 },
573 PaperProps: {
574 sx: {
575 maxHeight: '72vh'
576 }
577 }
578 }, /*#__PURE__*/_react.default.createElement(_dialogHeader.default, {
579 onClose: props.onClose
580 }, props.headerAction), /*#__PURE__*/_react.default.createElement(_ui.DialogContent, null, props.children)));
581 };
582 PromptDialog.propTypes = {
583 headerAction: PropTypes.node,
584 onClose: PropTypes.func.isRequired,
585 children: PropTypes.node.isRequired
586 };
587 var _default = PromptDialog;
588 exports["default"] = _default;
589
590 /***/ }),
591
592 /***/ "../modules/ai/assets/js/editor/components/prompt-error-message.js":
593 /*!*************************************************************************!*\
594 !*** ../modules/ai/assets/js/editor/components/prompt-error-message.js ***!
595 \*************************************************************************/
596 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
597
598 "use strict";
599 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
600 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
601
602
603 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
604 Object.defineProperty(exports, "__esModule", ({
605 value: true
606 }));
607 exports["default"] = void 0;
608 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
609 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
610 var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"));
611 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
612 var _excluded = ["error", "onRetry"];
613 var PromptErrorMessage = function PromptErrorMessage(_ref) {
614 var error = _ref.error,
615 _ref$onRetry = _ref.onRetry,
616 onRetry = _ref$onRetry === void 0 ? function () {} : _ref$onRetry,
617 props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
618 var messages = {
619 default: {
620 text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, __('Unknown error. Please try again later.', 'elementor')),
621 description: __('Error code:', 'elementor') + ' ' + error,
622 buttonText: __('Try Again', 'elementor'),
623 buttonAction: onRetry
624 },
625 service_outage_internal: {
626 text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, __('Elementor AI is temporarily unavailable', 'elementor')),
627 description: __('Seems like we are experiencing technical difficulty. We should be up and running shortly.', 'elementor'),
628 buttonText: __('Try Again', 'elementor'),
629 buttonAction: onRetry
630 },
631 invalid_connect_data: {
632 text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, __('Reconnect your account', 'elementor')),
633 description: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, __('We couldn\'t connect to your account due to technical difficulties on our end. Reconnect your account to continue.', 'elementor'), ' ', /*#__PURE__*/_react.default.createElement("a", {
634 href: "https://elementor.com/help/disconnecting-reconnecting-your-elementor-account/",
635 target: "_blank",
636 rel: "noreferrer"
637 }, __('Show me how', 'elementor')))
638 },
639 not_connected: {
640 text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, __('You aren\'t connected to Elementor AI.', 'elementor')),
641 description: __('Elementor AI is just a few clicks away. Connect your account to instantly create texts and custom code.', 'elementor')
642 },
643 quota_reached_trail: {
644 severity: 'info',
645 text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, __('It\'s time to upgrade.', 'elementor')),
646 description: __('Enjoy the free trial? Upgrade now for unlimited access to built-in text and custom code generators.', 'elementor'),
647 buttonText: __('Upgrade', 'elementor'),
648 buttonAction: function buttonAction() {
649 return window.open('https://go.elementor.com/ai-popup-purchase-limit-reached/', '_blank');
650 }
651 },
652 quota_reached_subscription: {
653 severity: 'info',
654 text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, __('It\'s time to upgrade.', 'elementor')),
655 description: __('Love Elementor AI? Upgrade to continue creating with built-in text and custom code generators.', 'elementor'),
656 buttonText: __('Upgrade', 'elementor'),
657 buttonAction: function buttonAction() {
658 return window.open('https://go.elementor.com/ai-popup-purchase-limit-reached/', '_blank');
659 }
660 },
661 rate_limit_network: {
662 text: /*#__PURE__*/_react.default.createElement(_ui.AlertTitle, null, __('Whoa! Slow down there.', 'elementor')),
663 description: __('We can’t process that many requests so fast. Try again in 15 minutes.', 'elementor')
664 }
665 };
666 var message = messages[error] || messages.default;
667 return /*#__PURE__*/_react.default.createElement(_ui.Alert, (0, _extends2.default)({
668 severity: message.severity || 'error',
669 action: (message === null || message === void 0 ? void 0 : message.buttonText) && /*#__PURE__*/_react.default.createElement(_ui.Button, {
670 color: "inherit",
671 size: "small",
672 variant: "outlined",
673 onClick: message.buttonAction,
674 sx: {
675 height: 'auto',
676 // TODO: Fix in UI library.
677 minHeight: '32px'
678 }
679 }, message.buttonText)
680 }, props), message.text, message.description);
681 };
682 PromptErrorMessage.propTypes = {
683 error: PropTypes.string,
684 onRetry: PropTypes.func
685 };
686 var _default = PromptErrorMessage;
687 exports["default"] = _default;
688
689 /***/ }),
690
691 /***/ "../modules/ai/assets/js/editor/components/prompt-search.js":
692 /*!******************************************************************!*\
693 !*** ../modules/ai/assets/js/editor/components/prompt-search.js ***!
694 \******************************************************************/
695 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
696
697 "use strict";
698 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
699
700
701 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
702 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
703 Object.defineProperty(exports, "__esModule", ({
704 value: true
705 }));
706 exports["default"] = void 0;
707 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
708 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
709 var _searchField = _interopRequireDefault(__webpack_require__(/*! ./ui/search-field */ "../modules/ai/assets/js/editor/components/ui/search-field.js"));
710 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
711 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
712 var PromptSearch = (0, _react.forwardRef)(function (props, ref) {
713 return /*#__PURE__*/_react.default.createElement(_searchField.default, (0, _extends2.default)({
714 name: "prompt",
715 placeholder: __('Describe the text and tone you want to use', 'elementor') + '...'
716 }, props, {
717 ref: ref
718 }));
719 });
720 var _default = PromptSearch;
721 exports["default"] = _default;
722
723 /***/ }),
724
725 /***/ "../modules/ai/assets/js/editor/components/prompt-suggestions.js":
726 /*!***********************************************************************!*\
727 !*** ../modules/ai/assets/js/editor/components/prompt-suggestions.js ***!
728 \***********************************************************************/
729 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
730
731 "use strict";
732 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
733 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
734
735
736 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
737 Object.defineProperty(exports, "__esModule", ({
738 value: true
739 }));
740 exports["default"] = void 0;
741 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
742 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
743 var _styledChip = _interopRequireDefault(__webpack_require__(/*! ./ui/styled-chip */ "../modules/ai/assets/js/editor/components/ui/styled-chip.js"));
744 var PromptSuggestions = function PromptSuggestions(props) {
745 var _props$suggestions;
746 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
747 variant: "subtitle1",
748 color: "text.secondary"
749 }, __('Suggested prompts', 'elementor') + ':'), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
750 direction: "column",
751 alignItems: "flex-start",
752 gap: 3,
753 sx: {
754 my: 3
755 }
756 }, (_props$suggestions = props.suggestions) === null || _props$suggestions === void 0 ? void 0 : _props$suggestions.map(function (option, index) {
757 var _props$suggestionFilt;
758 return /*#__PURE__*/_react.default.createElement(_styledChip.default, {
759 key: index,
760 variant: "outlined",
761 size: "large",
762 color: "secondary",
763 label: ((_props$suggestionFilt = props.suggestionFilter) === null || _props$suggestionFilt === void 0 ? void 0 : _props$suggestionFilt.call(props, option)) || option,
764 onClick: function onClick() {
765 return props.onSelect(option);
766 }
767 });
768 })));
769 };
770 PromptSuggestions.propTypes = {
771 suggestions: PropTypes.arrayOf(PropTypes.string),
772 onSelect: PropTypes.func.isRequired,
773 suggestionFilter: PropTypes.func
774 };
775 var _default = PromptSuggestions;
776 exports["default"] = _default;
777
778 /***/ }),
779
780 /***/ "../modules/ai/assets/js/editor/components/text-area.js":
781 /*!**************************************************************!*\
782 !*** ../modules/ai/assets/js/editor/components/text-area.js ***!
783 \**************************************************************/
784 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
785
786 "use strict";
787 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
788
789
790 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
791 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
792 Object.defineProperty(exports, "__esModule", ({
793 value: true
794 }));
795 exports["default"] = void 0;
796 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
797 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
798 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
799 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
800 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
801 var TextArea = (0, _react.forwardRef)(function (props, ref) {
802 return /*#__PURE__*/_react.default.createElement(_ui.TextField, (0, _extends2.default)({
803 ref: ref,
804 multiline: true,
805 fullWidth: true,
806 minRows: 4,
807 maxRows: 20,
808 value: props.value,
809 onChange: props.onChange,
810 helperText: props.helperText
811 }, props));
812 });
813 TextArea.propTypes = {
814 value: PropTypes.string,
815 onChange: PropTypes.func,
816 helperText: PropTypes.string
817 };
818 var _default = TextArea;
819 exports["default"] = _default;
820
821 /***/ }),
822
823 /***/ "../modules/ai/assets/js/editor/components/ui/search-field.js":
824 /*!********************************************************************!*\
825 !*** ../modules/ai/assets/js/editor/components/ui/search-field.js ***!
826 \********************************************************************/
827 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
828
829 "use strict";
830 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
831
832
833 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
834 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
835 Object.defineProperty(exports, "__esModule", ({
836 value: true
837 }));
838 exports["default"] = void 0;
839 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
840 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
841 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
842 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
843 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
844 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
845 var StyledTextField = (0, _ui.styled)(_ui.TextField)(function (_ref) {
846 var theme = _ref.theme;
847 return {
848 // Overwriting the admin global CSS.
849 '& .MuiInputBase-input, & .MuiInputBase-input:focus': {
850 backgroundColor: theme.palette.background.default,
851 border: 'none',
852 boxShadow: 'none',
853 color: theme.palette.text.primary,
854 padding: theme.spacing(0, 3),
855 outline: 'none'
856 },
857 '& .MuiInputAdornment-root': {
858 color: theme.palette.text.tertiary
859 }
860 };
861 });
862 var SearchField = (0, _react.forwardRef)(function (props, ref) {
863 return /*#__PURE__*/_react.default.createElement(StyledTextField
864 // eslint-disable-next-line jsx-a11y/no-autofocus
865 , (0, _extends2.default)({
866 autoFocus: true,
867 fullWidth: true,
868 required: true,
869 color: "secondary",
870 InputProps: {
871 autoComplete: 'off',
872 startAdornment: /*#__PURE__*/_react.default.createElement(_ui.InputAdornment, {
873 position: "start"
874 }, /*#__PURE__*/_react.default.createElement(_icons.SearchIcon, null))
875 },
876 placeholder: props.placeholder,
877 name: props.name,
878 value: props.value,
879 onChange: props.onChange
880 }, props, {
881 ref: ref
882 }));
883 });
884 SearchField.propTypes = {
885 placeholder: PropTypes.string,
886 name: PropTypes.string,
887 value: PropTypes.string,
888 onChange: PropTypes.func
889 };
890 var _default = SearchField;
891 exports["default"] = _default;
892
893 /***/ }),
894
895 /***/ "../modules/ai/assets/js/editor/components/ui/styled-chip.js":
896 /*!*******************************************************************!*\
897 !*** ../modules/ai/assets/js/editor/components/ui/styled-chip.js ***!
898 \*******************************************************************/
899 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
900
901 "use strict";
902
903
904 Object.defineProperty(exports, "__esModule", ({
905 value: true
906 }));
907 exports["default"] = void 0;
908 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
909 var StyledChip = (0, _ui.styled)(_ui.Chip)(function () {
910 return {
911 '& .MuiChip-label': {
912 lineHeight: 1.5
913 },
914 '& .MuiSvgIcon-root.MuiChip-icon': {
915 fontSize: '1.25rem'
916 }
917 };
918 });
919 var _default = StyledChip;
920 exports["default"] = _default;
921
922 /***/ }),
923
924 /***/ "../modules/ai/assets/js/editor/components/upgrade-chip.js":
925 /*!*****************************************************************!*\
926 !*** ../modules/ai/assets/js/editor/components/upgrade-chip.js ***!
927 \*****************************************************************/
928 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
929
930 "use strict";
931 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
932
933
934 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
935 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
936 Object.defineProperty(exports, "__esModule", ({
937 value: true
938 }));
939 exports["default"] = void 0;
940 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
941 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
942 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
943 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
944 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
945 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
946 var popoverId = 'e-ai-upgrade-popover';
947 var StyledContent = (0, _ui.styled)(_ui.Box)(function (_ref) {
948 var theme = _ref.theme;
949 return {
950 position: 'relative',
951 marginTop: theme.spacing(7),
952 padding: theme.spacing(7),
953 backgroundColor: theme.palette.background.paper,
954 boxShadow: theme.shadows[4],
955 borderRadius: theme.border.radius.sm,
956 zIndex: '9999'
957 };
958 });
959 var StyledArrow = (0, _ui.styled)(_ui.Box)(function (_ref2) {
960 var theme = _ref2.theme;
961 return {
962 width: theme.sizing[500],
963 height: theme.sizing[200],
964 position: 'absolute',
965 top: "calc(".concat(theme.sizing[200], " * -1)"),
966 left: '50%',
967 transform: 'translateX(-50%) rotate(180deg)',
968 overflow: 'hidden',
969 '&::after': {
970 backgroundColor: theme.palette.background.paper,
971 content: '""',
972 display: 'block',
973 position: 'absolute',
974 width: theme.sizing[200],
975 height: theme.sizing[200],
976 top: 0,
977 left: '50%',
978 transform: 'translateX(-50%) translateY(-50%) rotate(45deg)',
979 boxShadow: '1px 1px 5px 0px rgba(0, 0, 0, 0.2)'
980 }
981 };
982 });
983 var upgradeBullets = [__('Generate professional texts about any topic, in any tone.', 'elementor'), __('Translate your content into twenty-five different languages.', 'elementor'), __('Unleash infinite possibilities with the custom code generator.', 'elementor')];
984 var Chip = (0, _ui.styled)(_ui.Chip)(function () {
985 return {
986 '& .MuiChip-label': {
987 lineHeight: 1.5
988 },
989 '& .MuiSvgIcon-root.MuiChip-icon': {
990 fontSize: '1.25rem'
991 }
992 };
993 });
994 var UpgradeChip = function UpgradeChip() {
995 var _useState = (0, _react.useState)(false),
996 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
997 isPopoverOpen = _useState2[0],
998 setIsPopoverOpen = _useState2[1];
999 var anchorEl = (0, _react.useRef)(null);
1000 var showPopover = function showPopover() {
1001 return setIsPopoverOpen(true);
1002 };
1003 var hidePopover = function hidePopover() {
1004 return setIsPopoverOpen(false);
1005 };
1006 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
1007 component: "span",
1008 "aria-owns": isPopoverOpen ? popoverId : undefined,
1009 "aria-haspopup": "true",
1010 onMouseEnter: showPopover,
1011 onMouseLeave: hidePopover,
1012 ref: anchorEl
1013 }, /*#__PURE__*/_react.default.createElement(Chip, {
1014 color: "accent",
1015 label: __('Upgrade', 'elementor'),
1016 icon: /*#__PURE__*/_react.default.createElement(_icons.UpgradeIcon, null)
1017 }), /*#__PURE__*/_react.default.createElement(_ui.Popper, {
1018 open: isPopoverOpen,
1019 anchorEl: anchorEl.current,
1020 sx: {
1021 zIndex: '9999',
1022 maxWidth: 300
1023 }
1024 }, /*#__PURE__*/_react.default.createElement(StyledContent, null, /*#__PURE__*/_react.default.createElement(StyledArrow, null), /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1025 variant: "h5",
1026 color: "text.primary"
1027 }, __('Unlimited access to Elementor AI', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.List, {
1028 sx: {
1029 mb: 7
1030 }
1031 }, upgradeBullets.map(function (bullet, index) {
1032 return /*#__PURE__*/_react.default.createElement(_ui.ListItem, {
1033 key: index,
1034 disableGutters: true,
1035 sx: {
1036 alignItems: 'flex-start',
1037 my: 4
1038 }
1039 }, /*#__PURE__*/_react.default.createElement(_ui.ListItemIcon, {
1040 sx: {
1041 mr: 3
1042 }
1043 }, /*#__PURE__*/_react.default.createElement(_icons.CheckedCircleIcon, null)), /*#__PURE__*/_react.default.createElement(_ui.ListItemText, {
1044 sx: {
1045 m: 0
1046 }
1047 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1048 variant: "body2"
1049 }, bullet)));
1050 })), /*#__PURE__*/_react.default.createElement(_ui.Button, {
1051 variant: "contained",
1052 color: "accent",
1053 size: "small",
1054 href: "https://go.elementor.com/ai-popup-purchase-dropdown/",
1055 target: "_blank",
1056 startIcon: /*#__PURE__*/_react.default.createElement(_icons.UpgradeIcon, null),
1057 sx: {
1058 '&:hover': {
1059 color: 'accent.contrastText'
1060 }
1061 }
1062 }, __('Get Elementor AI', 'elementor')))));
1063 };
1064 var _default = UpgradeChip;
1065 exports["default"] = _default;
1066
1067 /***/ }),
1068
1069 /***/ "../modules/ai/assets/js/editor/components/wizard-dialog.js":
1070 /*!******************************************************************!*\
1071 !*** ../modules/ai/assets/js/editor/components/wizard-dialog.js ***!
1072 \******************************************************************/
1073 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1074
1075 "use strict";
1076 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1077
1078
1079 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1080 Object.defineProperty(exports, "__esModule", ({
1081 value: true
1082 }));
1083 exports["default"] = void 0;
1084 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
1085 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1086 var _dialogHeader = _interopRequireDefault(__webpack_require__(/*! ./dialog-header */ "../modules/ai/assets/js/editor/components/dialog-header.js"));
1087 var WizardDialog = function WizardDialog(props) {
1088 return /*#__PURE__*/_react.default.createElement(_ui.Dialog, {
1089 open: true,
1090 onClose: props.onClose,
1091 fullWidth: true,
1092 hideBackdrop: true,
1093 maxWidth: "lg",
1094 PaperProps: {
1095 sx: {
1096 height: '88vh'
1097 }
1098 },
1099 sx: {
1100 zIndex: 9999
1101 }
1102 }, /*#__PURE__*/_react.default.createElement(_dialogHeader.default, {
1103 onClose: props.onClose
1104 }, props.headerAction), /*#__PURE__*/_react.default.createElement(_ui.DialogContent, {
1105 sx: {
1106 display: 'flex',
1107 flexDirection: 'column',
1108 justifyContent: 'center'
1109 }
1110 }, props.children));
1111 };
1112 WizardDialog.propTypes = {
1113 headerAction: PropTypes.node,
1114 onClose: PropTypes.func.isRequired,
1115 children: PropTypes.node.isRequired
1116 };
1117 var _default = WizardDialog;
1118 exports["default"] = _default;
1119
1120 /***/ }),
1121
1122 /***/ "../modules/ai/assets/js/editor/helpers.js":
1123 /*!*************************************************!*\
1124 !*** ../modules/ai/assets/js/editor/helpers.js ***!
1125 \*************************************************/
1126 /***/ ((__unused_webpack_module, exports) => {
1127
1128 "use strict";
1129
1130
1131 Object.defineProperty(exports, "__esModule", ({
1132 value: true
1133 }));
1134 exports.onConnect = void 0;
1135 var onConnect = function onConnect(data) {
1136 elementorCommon.config.library_connect.is_connected = true;
1137 elementorCommon.config.library_connect.current_access_level = data.accessLevel;
1138 };
1139 exports.onConnect = onConnect;
1140
1141 /***/ }),
1142
1143 /***/ "../modules/ai/assets/js/editor/hooks/use-code-prompt.js":
1144 /*!***************************************************************!*\
1145 !*** ../modules/ai/assets/js/editor/hooks/use-code-prompt.js ***!
1146 \***************************************************************/
1147 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1148
1149 "use strict";
1150
1151
1152 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1153 Object.defineProperty(exports, "__esModule", ({
1154 value: true
1155 }));
1156 exports["default"] = void 0;
1157 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1158 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1159 var _api = __webpack_require__(/*! ../api */ "../modules/ai/assets/js/editor/api/index.js");
1160 var _usePrompt = _interopRequireDefault(__webpack_require__(/*! ./use-prompt */ "../modules/ai/assets/js/editor/hooks/use-prompt.js"));
1161 var getCodeResult = /*#__PURE__*/function () {
1162 var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(prompt, _ref) {
1163 var codeLanguage, htmlMarkup, elementId;
1164 return _regenerator.default.wrap(function _callee$(_context) {
1165 while (1) switch (_context.prev = _context.next) {
1166 case 0:
1167 codeLanguage = _ref.codeLanguage, htmlMarkup = _ref.htmlMarkup, elementId = _ref.elementId;
1168 if (!('css' === codeLanguage)) {
1169 _context.next = 3;
1170 break;
1171 }
1172 return _context.abrupt("return", (0, _api.getCustomCSS)(prompt, htmlMarkup, elementId));
1173 case 3:
1174 return _context.abrupt("return", (0, _api.getCustomCode)(prompt, codeLanguage));
1175 case 4:
1176 case "end":
1177 return _context.stop();
1178 }
1179 }, _callee);
1180 }));
1181 return function getCodeResult(_x, _x2) {
1182 return _ref2.apply(this, arguments);
1183 };
1184 }();
1185 var useCodePrompt = function useCodePrompt(_ref3) {
1186 var codeLanguage = _ref3.codeLanguage,
1187 htmlMarkup = _ref3.htmlMarkup,
1188 elementId = _ref3.elementId,
1189 credits = _ref3.initialCredits;
1190 var promptData = (0, _usePrompt.default)(function (promptValue) {
1191 return getCodeResult(promptValue, {
1192 codeLanguage: codeLanguage,
1193 htmlMarkup: htmlMarkup,
1194 elementId: elementId
1195 });
1196 }, {
1197 credits: credits
1198 });
1199 return promptData;
1200 };
1201 var _default = useCodePrompt;
1202 exports["default"] = _default;
1203
1204 /***/ }),
1205
1206 /***/ "../modules/ai/assets/js/editor/hooks/use-prompt.js":
1207 /*!**********************************************************!*\
1208 !*** ../modules/ai/assets/js/editor/hooks/use-prompt.js ***!
1209 \**********************************************************/
1210 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1211
1212 "use strict";
1213
1214
1215 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1216 Object.defineProperty(exports, "__esModule", ({
1217 value: true
1218 }));
1219 exports["default"] = void 0;
1220 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1221 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1222 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1223 var _react = __webpack_require__(/*! react */ "react");
1224 var _api = __webpack_require__(/*! ../api */ "../modules/ai/assets/js/editor/api/index.js");
1225 var normalizeResponse = function normalizeResponse(_ref) {
1226 var text = _ref.text,
1227 responseId = _ref.response_id,
1228 usage = _ref.usage;
1229 var creditsData = usage ? usage.quota - usage.usedQuota : 0;
1230 var credits = Math.max(creditsData, 0);
1231 return {
1232 result: text,
1233 responseId: responseId,
1234 credits: credits
1235 };
1236 };
1237 var usePrompt = function usePrompt(fetchData, initialState) {
1238 var _useState = (0, _react.useState)(false),
1239 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
1240 isLoading = _useState2[0],
1241 setIsLoading = _useState2[1];
1242 var _useState3 = (0, _react.useState)(''),
1243 _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
1244 error = _useState4[0],
1245 setError = _useState4[1];
1246 var _useState5 = (0, _react.useState)(initialState),
1247 _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
1248 data = _useState6[0],
1249 setData = _useState6[1];
1250 var send = /*#__PURE__*/function () {
1251 var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
1252 var _args = arguments;
1253 return _regenerator.default.wrap(function _callee$(_context) {
1254 while (1) switch (_context.prev = _context.next) {
1255 case 0:
1256 setError('');
1257 setIsLoading(true);
1258 fetchData.apply(void 0, _args).then(function (result) {
1259 return setData(normalizeResponse(result));
1260 }).catch(function (err) {
1261 return setError((err === null || err === void 0 ? void 0 : err.responseText) || err);
1262 }).finally(function () {
1263 return setIsLoading(false);
1264 });
1265 case 3:
1266 case "end":
1267 return _context.stop();
1268 }
1269 }, _callee);
1270 }));
1271 return function send() {
1272 return _ref2.apply(this, arguments);
1273 };
1274 }();
1275 var sendUsageData = function sendUsageData() {
1276 return data.responseId && (0, _api.setStatusFeedback)(data.responseId);
1277 };
1278 var reset = function reset() {
1279 setData(function (_ref3) {
1280 var credits = _ref3.credits;
1281 return {
1282 credits: credits,
1283 result: '',
1284 responseId: ''
1285 };
1286 });
1287 setError('');
1288 setIsLoading(false);
1289 };
1290 return {
1291 isLoading: isLoading,
1292 error: error,
1293 data: data,
1294 reset: reset,
1295 send: send,
1296 sendUsageData: sendUsageData
1297 };
1298 };
1299 var _default = usePrompt;
1300 exports["default"] = _default;
1301
1302 /***/ }),
1303
1304 /***/ "../modules/ai/assets/js/editor/hooks/use-text-prompt.js":
1305 /*!***************************************************************!*\
1306 !*** ../modules/ai/assets/js/editor/hooks/use-text-prompt.js ***!
1307 \***************************************************************/
1308 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1309
1310 "use strict";
1311
1312
1313 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1314 Object.defineProperty(exports, "__esModule", ({
1315 value: true
1316 }));
1317 exports["default"] = void 0;
1318 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1319 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1320 var _api = __webpack_require__(/*! ../api */ "../modules/ai/assets/js/editor/api/index.js");
1321 var _usePrompt = _interopRequireDefault(__webpack_require__(/*! ./use-prompt */ "../modules/ai/assets/js/editor/hooks/use-prompt.js"));
1322 var getTextResult = /*#__PURE__*/function () {
1323 var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(prompt, instruction) {
1324 return _regenerator.default.wrap(function _callee$(_context) {
1325 while (1) switch (_context.prev = _context.next) {
1326 case 0:
1327 if (!instruction) {
1328 _context.next = 2;
1329 break;
1330 }
1331 return _context.abrupt("return", (0, _api.getEditText)(prompt, instruction));
1332 case 2:
1333 return _context.abrupt("return", (0, _api.getCompletionText)(prompt));
1334 case 3:
1335 case "end":
1336 return _context.stop();
1337 }
1338 }, _callee);
1339 }));
1340 return function getTextResult(_x, _x2) {
1341 return _ref.apply(this, arguments);
1342 };
1343 }();
1344 var useTextPrompt = function useTextPrompt(initialValue) {
1345 var promptData = (0, _usePrompt.default)(getTextResult, initialValue);
1346 return promptData;
1347 };
1348 var _default = useTextPrompt;
1349 exports["default"] = _default;
1350
1351 /***/ }),
1352
1353 /***/ "../modules/ai/assets/js/editor/hooks/use-user-info.js":
1354 /*!*************************************************************!*\
1355 !*** ../modules/ai/assets/js/editor/hooks/use-user-info.js ***!
1356 \*************************************************************/
1357 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1358
1359 "use strict";
1360
1361
1362 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1363 Object.defineProperty(exports, "__esModule", ({
1364 value: true
1365 }));
1366 exports["default"] = void 0;
1367 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1368 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1369 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1370 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1371 var _react = __webpack_require__(/*! react */ "react");
1372 var _api = __webpack_require__(/*! ../api */ "../modules/ai/assets/js/editor/api/index.js");
1373 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1374 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1375 var useUserInfo = function useUserInfo() {
1376 var _useState = (0, _react.useState)(false),
1377 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
1378 isLoading = _useState2[0],
1379 setIsLoading = _useState2[1];
1380 var _useState3 = (0, _react.useState)({
1381 is_connected: false,
1382 is_get_started: false,
1383 connect_url: '',
1384 usage: {
1385 hasAiSubscription: false,
1386 quota: 0,
1387 usedQuota: 0
1388 }
1389 }),
1390 _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
1391 userInfo = _useState4[0],
1392 setUserInfo = _useState4[1];
1393 var credits = userInfo.usage.quota - userInfo.usage.usedQuota;
1394 var usagePercentage = userInfo.usage.usedQuota / userInfo.usage.quota * 100;
1395 var fetchData = /*#__PURE__*/function () {
1396 var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
1397 var userInfoResult;
1398 return _regenerator.default.wrap(function _callee$(_context) {
1399 while (1) switch (_context.prev = _context.next) {
1400 case 0:
1401 setIsLoading(true);
1402 _context.next = 3;
1403 return (0, _api.getUserInformation)();
1404 case 3:
1405 userInfoResult = _context.sent;
1406 setUserInfo(function (prevState) {
1407 return _objectSpread(_objectSpread({}, prevState), userInfoResult);
1408 });
1409 setIsLoading(false);
1410 case 6:
1411 case "end":
1412 return _context.stop();
1413 }
1414 }, _callee);
1415 }));
1416 return function fetchData() {
1417 return _ref.apply(this, arguments);
1418 };
1419 }();
1420 (0, _react.useEffect)(function () {
1421 fetchData();
1422 }, []);
1423 return {
1424 isLoading: isLoading,
1425 isConnected: userInfo.is_connected,
1426 isGetStarted: userInfo.is_get_started,
1427 connectUrl: userInfo.connect_url,
1428 hasSubscription: userInfo.usage.hasAiSubscription,
1429 credits: credits < 0 ? 0 : credits,
1430 usagePercentage: Math.round(usagePercentage),
1431 fetchData: fetchData
1432 };
1433 };
1434 var _default = useUserInfo;
1435 exports["default"] = _default;
1436
1437 /***/ }),
1438
1439 /***/ "../modules/ai/assets/js/editor/page-content.js":
1440 /*!******************************************************!*\
1441 !*** ../modules/ai/assets/js/editor/page-content.js ***!
1442 \******************************************************/
1443 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1444
1445 "use strict";
1446 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1447
1448
1449 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1450 Object.defineProperty(exports, "__esModule", ({
1451 value: true
1452 }));
1453 exports["default"] = void 0;
1454 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
1455 var _formText = _interopRequireDefault(__webpack_require__(/*! ./pages/form-text */ "../modules/ai/assets/js/editor/pages/form-text/index.js"));
1456 var _connect = _interopRequireDefault(__webpack_require__(/*! ./pages/connect */ "../modules/ai/assets/js/editor/pages/connect/index.js"));
1457 var _formCode = _interopRequireDefault(__webpack_require__(/*! ./pages/form-code */ "../modules/ai/assets/js/editor/pages/form-code/index.js"));
1458 var _getStarted = _interopRequireDefault(__webpack_require__(/*! ./pages/get-started */ "../modules/ai/assets/js/editor/pages/get-started/index.js"));
1459 var _loader = _interopRequireDefault(__webpack_require__(/*! ./components/loader */ "../modules/ai/assets/js/editor/components/loader.js"));
1460 var _useUserInfo2 = _interopRequireDefault(__webpack_require__(/*! ./hooks/use-user-info */ "../modules/ai/assets/js/editor/hooks/use-user-info.js"));
1461 var _wizardDialog = _interopRequireDefault(__webpack_require__(/*! ./components/wizard-dialog */ "../modules/ai/assets/js/editor/components/wizard-dialog.js"));
1462 var _promptDialog = _interopRequireDefault(__webpack_require__(/*! ./components/prompt-dialog */ "../modules/ai/assets/js/editor/components/prompt-dialog.js"));
1463 var _upgradeChip = _interopRequireDefault(__webpack_require__(/*! ./components/upgrade-chip */ "../modules/ai/assets/js/editor/components/upgrade-chip.js"));
1464 var PageContent = function PageContent(_ref) {
1465 var type = _ref.type,
1466 controlType = _ref.controlType,
1467 onClose = _ref.onClose,
1468 onConnect = _ref.onConnect,
1469 getControlValue = _ref.getControlValue,
1470 setControlValue = _ref.setControlValue,
1471 additionalOptions = _ref.additionalOptions;
1472 var _useUserInfo = (0, _useUserInfo2.default)(),
1473 isLoading = _useUserInfo.isLoading,
1474 isConnected = _useUserInfo.isConnected,
1475 isGetStarted = _useUserInfo.isGetStarted,
1476 connectUrl = _useUserInfo.connectUrl,
1477 fetchData = _useUserInfo.fetchData,
1478 hasSubscription = _useUserInfo.hasSubscription,
1479 credits = _useUserInfo.credits,
1480 usagePercentage = _useUserInfo.usagePercentage;
1481 if (isLoading) {
1482 return /*#__PURE__*/_react.default.createElement(_promptDialog.default, {
1483 onClose: onClose
1484 }, /*#__PURE__*/_react.default.createElement(_loader.default, null));
1485 }
1486 if (!isConnected) {
1487 return /*#__PURE__*/_react.default.createElement(_wizardDialog.default, {
1488 onClose: onClose
1489 }, /*#__PURE__*/_react.default.createElement(_connect.default, {
1490 connectUrl: connectUrl,
1491 onSuccess: function onSuccess(data) {
1492 onConnect(data);
1493 fetchData();
1494 }
1495 }));
1496 }
1497 if (!isGetStarted) {
1498 return /*#__PURE__*/_react.default.createElement(_wizardDialog.default, {
1499 onClose: onClose
1500 }, /*#__PURE__*/_react.default.createElement(_getStarted.default, {
1501 onSuccess: fetchData
1502 }));
1503 }
1504 if ('code' === type) {
1505 return /*#__PURE__*/_react.default.createElement(_promptDialog.default, {
1506 onClose: onClose,
1507 headerAction: !hasSubscription && /*#__PURE__*/_react.default.createElement(_upgradeChip.default, null)
1508 }, /*#__PURE__*/_react.default.createElement(_formCode.default, {
1509 onClose: onClose,
1510 getControlValue: getControlValue,
1511 setControlValue: setControlValue,
1512 additionalOptions: additionalOptions,
1513 credits: credits,
1514 usagePercentage: usagePercentage
1515 }));
1516 }
1517 return /*#__PURE__*/_react.default.createElement(_promptDialog.default, {
1518 onClose: onClose,
1519 headerAction: !hasSubscription && /*#__PURE__*/_react.default.createElement(_upgradeChip.default, null)
1520 }, /*#__PURE__*/_react.default.createElement(_formText.default, {
1521 type: type,
1522 controlType: controlType,
1523 onClose: onClose,
1524 getControlValue: getControlValue,
1525 setControlValue: setControlValue,
1526 additionalOptions: additionalOptions,
1527 credits: credits,
1528 usagePercentage: usagePercentage
1529 }));
1530 };
1531 PageContent.propTypes = {
1532 type: PropTypes.string,
1533 controlType: PropTypes.string,
1534 onClose: PropTypes.func.isRequired,
1535 onConnect: PropTypes.func.isRequired,
1536 getControlValue: PropTypes.func.isRequired,
1537 setControlValue: PropTypes.func.isRequired,
1538 additionalOptions: PropTypes.object
1539 };
1540 var _default = PageContent;
1541 exports["default"] = _default;
1542
1543 /***/ }),
1544
1545 /***/ "../modules/ai/assets/js/editor/pages/connect/index.js":
1546 /*!*************************************************************!*\
1547 !*** ../modules/ai/assets/js/editor/pages/connect/index.js ***!
1548 \*************************************************************/
1549 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1550
1551 "use strict";
1552 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
1553 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1554
1555
1556 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
1557 Object.defineProperty(exports, "__esModule", ({
1558 value: true
1559 }));
1560 exports["default"] = void 0;
1561 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
1562 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1563 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
1564 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
1565 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
1566 var Connect = function Connect(_ref) {
1567 var connectUrl = _ref.connectUrl,
1568 onSuccess = _ref.onSuccess;
1569 var approveButtonRef = (0, _react.useRef)();
1570 (0, _react.useEffect)(function () {
1571 jQuery(approveButtonRef.current).elementorConnect({
1572 success: function success(_, data) {
1573 return onSuccess(data);
1574 },
1575 error: function error() {
1576 throw new Error('Elementor AI: Failed to connect.');
1577 }
1578 });
1579 }, []);
1580 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1581 alignItems: "center",
1582 gap: 5
1583 }, /*#__PURE__*/_react.default.createElement(_icons.AIIcon, {
1584 sx: {
1585 color: 'text.primary',
1586 fontSize: '60px',
1587 mb: 3
1588 }
1589 }), /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1590 variant: "h4",
1591 sx: {
1592 color: 'text.primary'
1593 }
1594 }, __('Step into the future with Elementor AI', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1595 variant: "body2"
1596 }, __('Create smarter with AI text and code generators built right into the editor.', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Typography, {
1597 variant: "caption",
1598 sx: {
1599 maxWidth: 520,
1600 textAlign: 'center'
1601 }
1602 }, __('By clicking "Connect", I approve the ', 'elementor'), /*#__PURE__*/_react.default.createElement(_ui.Link, {
1603 href: "https://go.elementor.com/ai-terms/",
1604 target: "_blank",
1605 color: "info.main"
1606 }, __('Terms of Service', 'elementor')), ' & ', /*#__PURE__*/_react.default.createElement(_ui.Link, {
1607 href: "https://go.elementor.com/ai-privacy-policy/",
1608 target: "_blank",
1609 color: "info.main"
1610 }, __('Privacy Policy', 'elementor')), __(' of the Elementor AI service.', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Button, {
1611 ref: approveButtonRef,
1612 href: connectUrl,
1613 variant: "contained",
1614 sx: {
1615 mt: 3,
1616 '&:hover': {
1617 color: 'primary.contrastText'
1618 }
1619 }
1620 }, __('Connect', 'elementor')));
1621 };
1622 Connect.propTypes = {
1623 connectUrl: PropTypes.string.isRequired,
1624 onSuccess: PropTypes.func.isRequired
1625 };
1626 var _default = Connect;
1627 exports["default"] = _default;
1628
1629 /***/ }),
1630
1631 /***/ "../modules/ai/assets/js/editor/pages/form-code/code-block.js":
1632 /*!********************************************************************!*\
1633 !*** ../modules/ai/assets/js/editor/pages/form-code/code-block.js ***!
1634 \********************************************************************/
1635 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1636
1637 "use strict";
1638 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
1639 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1640
1641
1642 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1643 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
1644 Object.defineProperty(exports, "__esModule", ({
1645 value: true
1646 }));
1647 exports["default"] = void 0;
1648 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
1649 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
1650 var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"));
1651 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1652 var _textArea = _interopRequireDefault(__webpack_require__(/*! ../../components/text-area */ "../modules/ai/assets/js/editor/components/text-area.js"));
1653 var _excluded = ["node", "inline", "children", "defaultValue", "onInsert"];
1654 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
1655 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
1656 var CodeBlock = function CodeBlock(_ref) {
1657 var node = _ref.node,
1658 inline = _ref.inline,
1659 children = _ref.children,
1660 defaultValue = _ref.defaultValue,
1661 onInsert = _ref.onInsert,
1662 props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
1663 var codeBlockInput = (0, _react.useRef)(null);
1664 if (inline) {
1665 return /*#__PURE__*/_react.default.createElement("code", props);
1666 }
1667 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
1668 sx: {
1669 position: 'relative'
1670 }
1671 }, /*#__PURE__*/_react.default.createElement(_textArea.default, (0, _extends2.default)({
1672 ref: codeBlockInput,
1673 defaultValue: children[0],
1674 sx: {
1675 mb: 3
1676 },
1677 helperText: __('Code generated by AI may be inaccurate.', 'elementor')
1678 }, props)), /*#__PURE__*/_react.default.createElement(_ui.Button, {
1679 size: "small",
1680 variant: "contained",
1681 onClick: function onClick() {
1682 return onInsert(defaultValue + '\n' + codeBlockInput.current.value);
1683 },
1684 sx: {
1685 position: 'absolute',
1686 right: '11px',
1687 bottom: '44px'
1688 }
1689 }, __('Insert', 'elementor')));
1690 };
1691 CodeBlock.propTypes = {
1692 node: PropTypes.object,
1693 inline: PropTypes.bool,
1694 children: PropTypes.arrayOf(PropTypes.node).isRequired,
1695 defaultValue: PropTypes.string,
1696 onInsert: PropTypes.func.isRequired
1697 };
1698 var _default = CodeBlock;
1699 exports["default"] = _default;
1700
1701 /***/ }),
1702
1703 /***/ "../modules/ai/assets/js/editor/pages/form-code/index.js":
1704 /*!***************************************************************!*\
1705 !*** ../modules/ai/assets/js/editor/pages/form-code/index.js ***!
1706 \***************************************************************/
1707 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1708
1709 "use strict";
1710 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
1711 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1712
1713
1714 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1715 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
1716 Object.defineProperty(exports, "__esModule", ({
1717 value: true
1718 }));
1719 exports["default"] = void 0;
1720 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
1721 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1722 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
1723 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1724 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1725 var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
1726 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1727 var _reactMarkdown = _interopRequireDefault(__webpack_require__(/*! react-markdown */ "../node_modules/react-markdown/index.js"));
1728 var _actionsData = __webpack_require__(/*! ../../actions-data */ "../modules/ai/assets/js/editor/actions-data.js");
1729 var _loader = _interopRequireDefault(__webpack_require__(/*! ../../components/loader */ "../modules/ai/assets/js/editor/components/loader.js"));
1730 var _promptSearch = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-search */ "../modules/ai/assets/js/editor/components/prompt-search.js"));
1731 var _promptSuggestions = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-suggestions */ "../modules/ai/assets/js/editor/components/prompt-suggestions.js"));
1732 var _generateButton = _interopRequireDefault(__webpack_require__(/*! ../../components/generate-button */ "../modules/ai/assets/js/editor/components/generate-button.js"));
1733 var _promptErrorMessage = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-error-message */ "../modules/ai/assets/js/editor/components/prompt-error-message.js"));
1734 var _codeBlock = _interopRequireDefault(__webpack_require__(/*! ./code-block */ "../modules/ai/assets/js/editor/pages/form-code/code-block.js"));
1735 var _useCodePrompt2 = _interopRequireDefault(__webpack_require__(/*! ../../hooks/use-code-prompt */ "../modules/ai/assets/js/editor/hooks/use-code-prompt.js"));
1736 var _promptCredits = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-credits */ "../modules/ai/assets/js/editor/components/prompt-credits.js"));
1737 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
1738 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
1739 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
1740 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1741 var CodeDisplayWrapper = (0, _ui.styled)(_ui.Box)(function () {
1742 return {
1743 '& p': {
1744 mb: '10px',
1745 fontSize: '13px',
1746 lineHeight: '1.5'
1747 },
1748 '& pre': {
1749 position: 'relative'
1750 },
1751 '& textarea': {
1752 fontSize: '13px',
1753 lineHeight: '1.7'
1754 }
1755 };
1756 });
1757 var FormCode = function FormCode(_ref) {
1758 var onClose = _ref.onClose,
1759 getControlValue = _ref.getControlValue,
1760 setControlValue = _ref.setControlValue,
1761 additionalOptions = _ref.additionalOptions,
1762 credits = _ref.credits,
1763 usagePercentage = _ref.usagePercentage;
1764 var _useCodePrompt = (0, _useCodePrompt2.default)(_objectSpread(_objectSpread({}, additionalOptions), {}, {
1765 credits: credits
1766 })),
1767 data = _useCodePrompt.data,
1768 isLoading = _useCodePrompt.isLoading,
1769 error = _useCodePrompt.error,
1770 reset = _useCodePrompt.reset,
1771 send = _useCodePrompt.send,
1772 sendUsageData = _useCodePrompt.sendUsageData;
1773 var _useState = (0, _react.useState)(''),
1774 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
1775 prompt = _useState2[0],
1776 setPrompt = _useState2[1];
1777 var lastRun = (0, _react.useRef)(function () {});
1778 var autocompleteItems = 'css' === (additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.codeLanguage) ? _actionsData.codeCssAutocomplete : _actionsData.codeHtmlAutocomplete;
1779 var showSuggestions = !prompt;
1780 var handleSubmit = /*#__PURE__*/function () {
1781 var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(event) {
1782 return _regenerator.default.wrap(function _callee$(_context) {
1783 while (1) switch (_context.prev = _context.next) {
1784 case 0:
1785 event.preventDefault();
1786 lastRun.current = function () {
1787 return send(prompt);
1788 };
1789 lastRun.current();
1790 case 3:
1791 case "end":
1792 return _context.stop();
1793 }
1794 }, _callee);
1795 }));
1796 return function handleSubmit(_x) {
1797 return _ref2.apply(this, arguments);
1798 };
1799 }();
1800 var applyPrompt = function applyPrompt(inputText) {
1801 sendUsageData();
1802 setControlValue(inputText);
1803 onClose();
1804 };
1805 if (isLoading) {
1806 return /*#__PURE__*/_react.default.createElement(_loader.default, null);
1807 }
1808 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, error && /*#__PURE__*/_react.default.createElement(_promptErrorMessage.default, {
1809 error: error,
1810 onRetry: lastRun.current,
1811 sx: {
1812 mb: 6
1813 }
1814 }), !data.result && /*#__PURE__*/_react.default.createElement(_ui.Box, {
1815 component: "form",
1816 onSubmit: handleSubmit
1817 }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
1818 sx: {
1819 pb: 4
1820 }
1821 }, /*#__PURE__*/_react.default.createElement(_promptSearch.default, {
1822 placeholder: __('Describe the code you want to use...', 'elementor'),
1823 name: "prompt",
1824 value: prompt,
1825 color: "secondary",
1826 onChange: function onChange(event) {
1827 return setPrompt(event.target.value);
1828 }
1829 })), showSuggestions && /*#__PURE__*/_react.default.createElement(_promptSuggestions.default, {
1830 suggestions: autocompleteItems,
1831 onSelect: setPrompt
1832 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1833 direction: "row",
1834 alignItems: "center",
1835 sx: {
1836 py: 4,
1837 mt: 8
1838 }
1839 }, /*#__PURE__*/_react.default.createElement(_promptCredits.default, {
1840 usagePercentage: usagePercentage
1841 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1842 direction: "row",
1843 justifyContent: "flex-end",
1844 flexGrow: 1
1845 }, /*#__PURE__*/_react.default.createElement(_generateButton.default, null, __('Generate code', 'elementor'))))), data.result && /*#__PURE__*/_react.default.createElement(CodeDisplayWrapper, null, /*#__PURE__*/_react.default.createElement(_reactMarkdown.default, {
1846 components: {
1847 code: function code(props) {
1848 return /*#__PURE__*/_react.default.createElement(_codeBlock.default, (0, _extends2.default)({}, props, {
1849 defaultValue: getControlValue(),
1850 onInsert: applyPrompt
1851 }));
1852 }
1853 }
1854 }, data.result), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1855 direction: "row",
1856 alignItems: "center",
1857 sx: {
1858 mt: 8
1859 }
1860 }, /*#__PURE__*/_react.default.createElement(_promptCredits.default, {
1861 usagePercentage: usagePercentage
1862 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
1863 direction: "row",
1864 gap: 3,
1865 justifyContent: "flex-end",
1866 flexGrow: 1
1867 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
1868 size: "small",
1869 color: "secondary",
1870 variant: "text",
1871 onClick: reset
1872 }, __('New prompt', 'elementor'))))));
1873 };
1874 FormCode.propTypes = {
1875 onClose: PropTypes.func.isRequired,
1876 getControlValue: PropTypes.func.isRequired,
1877 setControlValue: PropTypes.func.isRequired,
1878 additionalOptions: PropTypes.shape({
1879 codeLanguage: PropTypes.string,
1880 htmlMarkup: PropTypes.string,
1881 elementId: PropTypes.string,
1882 initialCredits: PropTypes.number
1883 }),
1884 credits: PropTypes.number,
1885 usagePercentage: PropTypes.number
1886 };
1887 var _default = FormCode;
1888 exports["default"] = _default;
1889
1890 /***/ }),
1891
1892 /***/ "../modules/ai/assets/js/editor/pages/form-text/index.js":
1893 /*!***************************************************************!*\
1894 !*** ../modules/ai/assets/js/editor/pages/form-text/index.js ***!
1895 \***************************************************************/
1896 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1897
1898 "use strict";
1899 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
1900 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
1901
1902
1903 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
1904 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
1905 Object.defineProperty(exports, "__esModule", ({
1906 value: true
1907 }));
1908 exports["default"] = void 0;
1909 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
1910 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
1911 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
1912 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
1913 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
1914 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
1915 var _loader = _interopRequireDefault(__webpack_require__(/*! ../../components/loader */ "../modules/ai/assets/js/editor/components/loader.js"));
1916 var _promptSearch = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-search */ "../modules/ai/assets/js/editor/components/prompt-search.js"));
1917 var _textArea = _interopRequireDefault(__webpack_require__(/*! ../../components/text-area */ "../modules/ai/assets/js/editor/components/text-area.js"));
1918 var _promptSuggestions = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-suggestions */ "../modules/ai/assets/js/editor/components/prompt-suggestions.js"));
1919 var _promptActionSelection = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-action-selection */ "../modules/ai/assets/js/editor/components/prompt-action-selection.js"));
1920 var _generateButton = _interopRequireDefault(__webpack_require__(/*! ../../components/generate-button */ "../modules/ai/assets/js/editor/components/generate-button.js"));
1921 var _promptAction = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-action */ "../modules/ai/assets/js/editor/components/prompt-action.js"));
1922 var _promptErrorMessage = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-error-message */ "../modules/ai/assets/js/editor/components/prompt-error-message.js"));
1923 var _useTextPrompt2 = _interopRequireDefault(__webpack_require__(/*! ../../hooks/use-text-prompt */ "../modules/ai/assets/js/editor/hooks/use-text-prompt.js"));
1924 var _actionsData = __webpack_require__(/*! ../../actions-data */ "../modules/ai/assets/js/editor/actions-data.js");
1925 var _promptCredits = _interopRequireDefault(__webpack_require__(/*! ../../components/prompt-credits */ "../modules/ai/assets/js/editor/components/prompt-credits.js"));
1926 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
1927 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
1928 var promptActions = [{
1929 label: __('Simplify language', 'elementor'),
1930 icon: /*#__PURE__*/_react.default.createElement(_icons.MessageIcon, null),
1931 value: 'Simplify the language of the following message'
1932 }, {
1933 label: __('Make it longer', 'elementor'),
1934 icon: /*#__PURE__*/_react.default.createElement(_icons.ExpandIcon, null),
1935 value: 'Make the following message longer'
1936 }, {
1937 label: __('Make it shorter', 'elementor'),
1938 icon: /*#__PURE__*/_react.default.createElement(_icons.ShrinkIcon, null),
1939 value: 'Make the following message shorter'
1940 }, {
1941 label: __('Fix spelling & grammar', 'elementor'),
1942 icon: /*#__PURE__*/_react.default.createElement(_icons.AIIcon, null),
1943 value: 'Fix the spelling and grammar of the following message'
1944 }];
1945 var promptInstructions = [{
1946 label: __('Change tone', 'elementor'),
1947 options: _actionsData.vocalTones,
1948 getInstruction: function getInstruction(value) {
1949 return "Change the tone of the following message to ".concat(value);
1950 }
1951 }, {
1952 label: __('Translate to', 'elementor'),
1953 options: _actionsData.translateLanguages,
1954 getInstruction: function getInstruction(value) {
1955 return "Translate the following message to ".concat(value);
1956 }
1957 }];
1958 var FormText = function FormText(_ref) {
1959 var type = _ref.type,
1960 onClose = _ref.onClose,
1961 getControlValue = _ref.getControlValue,
1962 setControlValue = _ref.setControlValue,
1963 additionalOptions = _ref.additionalOptions,
1964 credits = _ref.credits,
1965 usagePercentage = _ref.usagePercentage;
1966 var initialValue = getControlValue() === (additionalOptions === null || additionalOptions === void 0 ? void 0 : additionalOptions.defaultValue) ? '' : getControlValue();
1967 var _useTextPrompt = (0, _useTextPrompt2.default)({
1968 result: initialValue,
1969 credits: credits
1970 }),
1971 data = _useTextPrompt.data,
1972 isLoading = _useTextPrompt.isLoading,
1973 error = _useTextPrompt.error,
1974 reset = _useTextPrompt.reset,
1975 send = _useTextPrompt.send,
1976 sendUsageData = _useTextPrompt.sendUsageData;
1977 var _useState = (0, _react.useState)(''),
1978 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
1979 prompt = _useState2[0],
1980 setPrompt = _useState2[1];
1981 var searchField = (0, _react.useRef)(null);
1982 var resultField = (0, _react.useRef)(null);
1983 var lastRun = (0, _react.useRef)(function () {});
1984 var autocompleteItems = 'textarea' === type ? _actionsData.textareaAutocomplete : _actionsData.textAutocomplete;
1985 var showSuggestions = !prompt;
1986 var handleSubmit = function handleSubmit(event) {
1987 event.preventDefault();
1988 lastRun.current = function () {
1989 return send(prompt);
1990 };
1991 lastRun.current();
1992 };
1993 var handleCustomInstruction = /*#__PURE__*/function () {
1994 var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(instruction) {
1995 return _regenerator.default.wrap(function _callee$(_context) {
1996 while (1) switch (_context.prev = _context.next) {
1997 case 0:
1998 lastRun.current = function () {
1999 return send(resultField.current.value, instruction);
2000 };
2001 lastRun.current();
2002 case 2:
2003 case "end":
2004 return _context.stop();
2005 }
2006 }, _callee);
2007 }));
2008 return function handleCustomInstruction(_x) {
2009 return _ref2.apply(this, arguments);
2010 };
2011 }();
2012 var handleSuggestion = function handleSuggestion(suggestion) {
2013 setPrompt(suggestion + ' ');
2014 searchField.current.focus();
2015 };
2016 var applyPrompt = function applyPrompt() {
2017 sendUsageData();
2018 setControlValue(resultField.current.value);
2019 onClose();
2020 };
2021 if (isLoading) {
2022 return /*#__PURE__*/_react.default.createElement(_loader.default, null);
2023 }
2024 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, error && /*#__PURE__*/_react.default.createElement(_promptErrorMessage.default, {
2025 error: error,
2026 onRetry: lastRun.current,
2027 sx: {
2028 mb: 6
2029 }
2030 }), !data.result && /*#__PURE__*/_react.default.createElement(_ui.Box, {
2031 component: "form",
2032 onSubmit: handleSubmit
2033 }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
2034 sx: {
2035 mb: 6
2036 }
2037 }, /*#__PURE__*/_react.default.createElement(_promptSearch.default, {
2038 ref: searchField,
2039 placeholder: __('Describe the text and tone you want to use...', 'elementor'),
2040 name: "prompt",
2041 value: prompt,
2042 onChange: function onChange(event) {
2043 return setPrompt(event.target.value);
2044 }
2045 })), showSuggestions && /*#__PURE__*/_react.default.createElement(_promptSuggestions.default, {
2046 suggestions: autocompleteItems,
2047 onSelect: handleSuggestion,
2048 suggestionFilter: function suggestionFilter(suggestion) {
2049 return suggestion + '...';
2050 }
2051 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
2052 direction: "row",
2053 alignItems: "center",
2054 sx: {
2055 py: 4,
2056 mt: 8
2057 }
2058 }, /*#__PURE__*/_react.default.createElement(_promptCredits.default, {
2059 usagePercentage: usagePercentage
2060 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
2061 direction: "row",
2062 justifyContent: "flex-end",
2063 flexGrow: 1
2064 }, /*#__PURE__*/_react.default.createElement(_generateButton.default, null, __('Generate text', 'elementor'))))), data.result && /*#__PURE__*/_react.default.createElement(_ui.Box, {
2065 sx: {
2066 mt: 3
2067 }
2068 }, /*#__PURE__*/_react.default.createElement(_textArea.default, {
2069 ref: resultField,
2070 defaultValue: data.result,
2071 helperText: __('Text generated by AI may be inaccurate or offensive.', 'elementor')
2072 }), /*#__PURE__*/_react.default.createElement(_ui.Grid, {
2073 container: true,
2074 spacing: 3,
2075 sx: {
2076 mt: 6
2077 }
2078 }, promptActions.map(function (_ref3) {
2079 var label = _ref3.label,
2080 icon = _ref3.icon,
2081 value = _ref3.value;
2082 return /*#__PURE__*/_react.default.createElement(_ui.Grid, {
2083 item: true,
2084 key: label
2085 }, /*#__PURE__*/_react.default.createElement(_promptAction.default, {
2086 label: label,
2087 icon: icon,
2088 onClick: function onClick() {
2089 return handleCustomInstruction(value);
2090 }
2091 }));
2092 })), /*#__PURE__*/_react.default.createElement(_ui.Grid, {
2093 container: true,
2094 spacing: 3,
2095 sx: {
2096 mt: 6
2097 }
2098 }, promptInstructions.map(function (_ref4) {
2099 var label = _ref4.label,
2100 options = _ref4.options,
2101 getInstruction = _ref4.getInstruction;
2102 return /*#__PURE__*/_react.default.createElement(_ui.Grid, {
2103 item: true,
2104 key: label
2105 }, /*#__PURE__*/_react.default.createElement(_promptActionSelection.default, {
2106 label: label,
2107 options: options,
2108 onChange: function onChange(event) {
2109 return handleCustomInstruction(getInstruction(event.target.value));
2110 }
2111 }));
2112 })), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
2113 direction: "row",
2114 alignItems: "center",
2115 sx: {
2116 my: 8
2117 }
2118 }, /*#__PURE__*/_react.default.createElement(_promptCredits.default, {
2119 usagePercentage: usagePercentage
2120 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
2121 direction: "row",
2122 gap: 3,
2123 justifyContent: "flex-end",
2124 flexGrow: 1
2125 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
2126 size: "small",
2127 color: "secondary",
2128 variant: "text",
2129 onClick: reset
2130 }, __('New prompt', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Button, {
2131 size: "small",
2132 variant: "contained",
2133 color: "primary",
2134 onClick: applyPrompt
2135 }, __('Use text', 'elementor'))))));
2136 };
2137 FormText.propTypes = {
2138 type: PropTypes.string.isRequired,
2139 controlType: PropTypes.string,
2140 onClose: PropTypes.func.isRequired,
2141 getControlValue: PropTypes.func.isRequired,
2142 setControlValue: PropTypes.func.isRequired,
2143 additionalOptions: PropTypes.object,
2144 credits: PropTypes.number,
2145 usagePercentage: PropTypes.number
2146 };
2147 var _default = FormText;
2148 exports["default"] = _default;
2149
2150 /***/ }),
2151
2152 /***/ "../modules/ai/assets/js/editor/pages/get-started/index.js":
2153 /*!*****************************************************************!*\
2154 !*** ../modules/ai/assets/js/editor/pages/get-started/index.js ***!
2155 \*****************************************************************/
2156 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2157
2158 "use strict";
2159 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
2160 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
2161
2162
2163 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
2164 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
2165 Object.defineProperty(exports, "__esModule", ({
2166 value: true
2167 }));
2168 exports["default"] = void 0;
2169 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
2170 var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
2171 var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
2172 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
2173 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
2174 var _api = __webpack_require__(/*! ../../api */ "../modules/ai/assets/js/editor/api/index.js");
2175 var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons");
2176 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
2177 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
2178 var GetStarted = function GetStarted(_ref) {
2179 var onSuccess = _ref.onSuccess;
2180 var _useState = (0, _react.useState)(false),
2181 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
2182 isTermsChecked = _useState2[0],
2183 setIsTermsChecked = _useState2[1];
2184 var onGetStartedClick = /*#__PURE__*/function () {
2185 var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
2186 return _regenerator.default.wrap(function _callee$(_context) {
2187 while (1) switch (_context.prev = _context.next) {
2188 case 0:
2189 _context.next = 2;
2190 return (0, _api.setGetStarted)();
2191 case 2:
2192 onSuccess();
2193 case 3:
2194 case "end":
2195 return _context.stop();
2196 }
2197 }, _callee);
2198 }));
2199 return function onGetStartedClick() {
2200 return _ref2.apply(this, arguments);
2201 };
2202 }();
2203 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
2204 alignItems: "center",
2205 gap: 4
2206 }, /*#__PURE__*/_react.default.createElement(_icons.AIIcon, {
2207 sx: {
2208 color: 'text.primary',
2209 fontSize: '60px',
2210 mb: 3
2211 }
2212 }), /*#__PURE__*/_react.default.createElement(_ui.Typography, {
2213 variant: "h4",
2214 sx: {
2215 color: 'text.primary'
2216 }
2217 }, __('Step into the future with Elementor AI', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Typography, {
2218 variant: "body2"
2219 }, __('Create smarter with AI text and code generators built right into the editor.', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Stack, {
2220 direction: "row",
2221 gap: 4,
2222 alignItems: "flex-start"
2223 }, /*#__PURE__*/_react.default.createElement(_ui.Checkbox, {
2224 id: "e-ai-terms-approval",
2225 color: "secondary",
2226 sx: {
2227 p: 0
2228 },
2229 onChange: function onChange() {
2230 return setIsTermsChecked(function (prevState) {
2231 return !prevState;
2232 });
2233 }
2234 }), /*#__PURE__*/_react.default.createElement(_ui.Stack, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
2235 variant: "caption",
2236 sx: {
2237 maxWidth: 520
2238 },
2239 component: "label",
2240 htmlFor: "e-ai-terms-approval"
2241 }, __('I approve the ', 'elementor'), /*#__PURE__*/_react.default.createElement(_ui.Link, {
2242 href: "https://go.elementor.com/ai-terms/",
2243 target: "_blank",
2244 color: "info.main"
2245 }, __('Terms of Service', 'elementor')), ' & ', /*#__PURE__*/_react.default.createElement(_ui.Link, {
2246 href: "https://go.elementor.com/ai-privacy-policy/",
2247 target: "_blank",
2248 color: "info.main"
2249 }, __('Privacy Policy', 'elementor')), __(' of the Elementor AI service.', 'elementor'), /*#__PURE__*/_react.default.createElement("br", null), __('This includes consenting to the collection and use of data to improve user experience.', 'elementor')))), /*#__PURE__*/_react.default.createElement(_ui.Button, {
2250 disabled: !isTermsChecked,
2251 variant: "contained",
2252 onClick: onGetStartedClick,
2253 sx: {
2254 mt: 3,
2255 '&:hover': {
2256 color: 'primary.contrastText'
2257 }
2258 }
2259 }, __('Get Started', 'elementor')));
2260 };
2261 GetStarted.propTypes = {
2262 onSuccess: PropTypes.func.isRequired
2263 };
2264 var _default = GetStarted;
2265 exports["default"] = _default;
2266
2267 /***/ }),
2268
2269 /***/ "../node_modules/clsx/dist/clsx.m.js":
2270 /*!*******************************************!*\
2271 !*** ../node_modules/clsx/dist/clsx.m.js ***!
2272 \*******************************************/
2273 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2274
2275 "use strict";
2276 __webpack_require__.r(__webpack_exports__);
2277 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2278 /* harmony export */ "clsx": () => (/* binding */ clsx),
2279 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2280 /* harmony export */ });
2281 function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx);
2282
2283 /***/ }),
2284
2285 /***/ "../node_modules/debug/src/browser.js":
2286 /*!********************************************!*\
2287 !*** ../node_modules/debug/src/browser.js ***!
2288 \********************************************/
2289 /***/ ((module, exports, __webpack_require__) => {
2290
2291 /* eslint-env browser */
2292
2293 /**
2294 * This is the web browser implementation of `debug()`.
2295 */
2296
2297 exports.formatArgs = formatArgs;
2298 exports.save = save;
2299 exports.load = load;
2300 exports.useColors = useColors;
2301 exports.storage = localstorage();
2302 exports.destroy = (() => {
2303 let warned = false;
2304
2305 return () => {
2306 if (!warned) {
2307 warned = true;
2308 console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
2309 }
2310 };
2311 })();
2312
2313 /**
2314 * Colors.
2315 */
2316
2317 exports.colors = [
2318 '#0000CC',
2319 '#0000FF',
2320 '#0033CC',
2321 '#0033FF',
2322 '#0066CC',
2323 '#0066FF',
2324 '#0099CC',
2325 '#0099FF',
2326 '#00CC00',
2327 '#00CC33',
2328 '#00CC66',
2329 '#00CC99',
2330 '#00CCCC',
2331 '#00CCFF',
2332 '#3300CC',
2333 '#3300FF',
2334 '#3333CC',
2335 '#3333FF',
2336 '#3366CC',
2337 '#3366FF',
2338 '#3399CC',
2339 '#3399FF',
2340 '#33CC00',
2341 '#33CC33',
2342 '#33CC66',
2343 '#33CC99',
2344 '#33CCCC',
2345 '#33CCFF',
2346 '#6600CC',
2347 '#6600FF',
2348 '#6633CC',
2349 '#6633FF',
2350 '#66CC00',
2351 '#66CC33',
2352 '#9900CC',
2353 '#9900FF',
2354 '#9933CC',
2355 '#9933FF',
2356 '#99CC00',
2357 '#99CC33',
2358 '#CC0000',
2359 '#CC0033',
2360 '#CC0066',
2361 '#CC0099',
2362 '#CC00CC',
2363 '#CC00FF',
2364 '#CC3300',
2365 '#CC3333',
2366 '#CC3366',
2367 '#CC3399',
2368 '#CC33CC',
2369 '#CC33FF',
2370 '#CC6600',
2371 '#CC6633',
2372 '#CC9900',
2373 '#CC9933',
2374 '#CCCC00',
2375 '#CCCC33',
2376 '#FF0000',
2377 '#FF0033',
2378 '#FF0066',
2379 '#FF0099',
2380 '#FF00CC',
2381 '#FF00FF',
2382 '#FF3300',
2383 '#FF3333',
2384 '#FF3366',
2385 '#FF3399',
2386 '#FF33CC',
2387 '#FF33FF',
2388 '#FF6600',
2389 '#FF6633',
2390 '#FF9900',
2391 '#FF9933',
2392 '#FFCC00',
2393 '#FFCC33'
2394 ];
2395
2396 /**
2397 * Currently only WebKit-based Web Inspectors, Firefox >= v31,
2398 * and the Firebug extension (any Firefox version) are known
2399 * to support "%c" CSS customizations.
2400 *
2401 * TODO: add a `localStorage` variable to explicitly enable/disable colors
2402 */
2403
2404 // eslint-disable-next-line complexity
2405 function useColors() {
2406 // NB: In an Electron preload script, document will be defined but not fully
2407 // initialized. Since we know we're in Chrome, we'll just detect this case
2408 // explicitly
2409 if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
2410 return true;
2411 }
2412
2413 // Internet Explorer and Edge do not support colors.
2414 if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
2415 return false;
2416 }
2417
2418 // Is webkit? http://stackoverflow.com/a/16459606/376773
2419 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
2420 return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
2421 // Is firebug? http://stackoverflow.com/a/398120/376773
2422 (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
2423 // Is firefox >= v31?
2424 // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
2425 (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
2426 // Double check webkit in userAgent just in case we are in a worker
2427 (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
2428 }
2429
2430 /**
2431 * Colorize log arguments if enabled.
2432 *
2433 * @api public
2434 */
2435
2436 function formatArgs(args) {
2437 args[0] = (this.useColors ? '%c' : '') +
2438 this.namespace +
2439 (this.useColors ? ' %c' : ' ') +
2440 args[0] +
2441 (this.useColors ? '%c ' : ' ') +
2442 '+' + module.exports.humanize(this.diff);
2443
2444 if (!this.useColors) {
2445 return;
2446 }
2447
2448 const c = 'color: ' + this.color;
2449 args.splice(1, 0, c, 'color: inherit');
2450
2451 // The final "%c" is somewhat tricky, because there could be other
2452 // arguments passed either before or after the %c, so we need to
2453 // figure out the correct index to insert the CSS into
2454 let index = 0;
2455 let lastC = 0;
2456 args[0].replace(/%[a-zA-Z%]/g, match => {
2457 if (match === '%%') {
2458 return;
2459 }
2460 index++;
2461 if (match === '%c') {
2462 // We only are interested in the *last* %c
2463 // (the user may have provided their own)
2464 lastC = index;
2465 }
2466 });
2467
2468 args.splice(lastC, 0, c);
2469 }
2470
2471 /**
2472 * Invokes `console.debug()` when available.
2473 * No-op when `console.debug` is not a "function".
2474 * If `console.debug` is not available, falls back
2475 * to `console.log`.
2476 *
2477 * @api public
2478 */
2479 exports.log = console.debug || console.log || (() => {});
2480
2481 /**
2482 * Save `namespaces`.
2483 *
2484 * @param {String} namespaces
2485 * @api private
2486 */
2487 function save(namespaces) {
2488 try {
2489 if (namespaces) {
2490 exports.storage.setItem('debug', namespaces);
2491 } else {
2492 exports.storage.removeItem('debug');
2493 }
2494 } catch (error) {
2495 // Swallow
2496 // XXX (@Qix-) should we be logging these?
2497 }
2498 }
2499
2500 /**
2501 * Load `namespaces`.
2502 *
2503 * @return {String} returns the previously persisted debug modes
2504 * @api private
2505 */
2506 function load() {
2507 let r;
2508 try {
2509 r = exports.storage.getItem('debug');
2510 } catch (error) {
2511 // Swallow
2512 // XXX (@Qix-) should we be logging these?
2513 }
2514
2515 // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
2516 if (!r && typeof process !== 'undefined' && 'env' in process) {
2517 r = process.env.DEBUG;
2518 }
2519
2520 return r;
2521 }
2522
2523 /**
2524 * Localstorage attempts to return the localstorage.
2525 *
2526 * This is necessary because safari throws
2527 * when a user disables cookies/localstorage
2528 * and you attempt to access it.
2529 *
2530 * @return {LocalStorage}
2531 * @api private
2532 */
2533
2534 function localstorage() {
2535 try {
2536 // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
2537 // The Browser also has localStorage in the global context.
2538 return localStorage;
2539 } catch (error) {
2540 // Swallow
2541 // XXX (@Qix-) should we be logging these?
2542 }
2543 }
2544
2545 module.exports = __webpack_require__(/*! ./common */ "../node_modules/debug/src/common.js")(exports);
2546
2547 const {formatters} = module.exports;
2548
2549 /**
2550 * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
2551 */
2552
2553 formatters.j = function (v) {
2554 try {
2555 return JSON.stringify(v);
2556 } catch (error) {
2557 return '[UnexpectedJSONParseError]: ' + error.message;
2558 }
2559 };
2560
2561
2562 /***/ }),
2563
2564 /***/ "../node_modules/debug/src/common.js":
2565 /*!*******************************************!*\
2566 !*** ../node_modules/debug/src/common.js ***!
2567 \*******************************************/
2568 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2569
2570
2571 /**
2572 * This is the common logic for both the Node.js and web browser
2573 * implementations of `debug()`.
2574 */
2575
2576 function setup(env) {
2577 createDebug.debug = createDebug;
2578 createDebug.default = createDebug;
2579 createDebug.coerce = coerce;
2580 createDebug.disable = disable;
2581 createDebug.enable = enable;
2582 createDebug.enabled = enabled;
2583 createDebug.humanize = __webpack_require__(/*! ms */ "../node_modules/ms/index.js");
2584 createDebug.destroy = destroy;
2585
2586 Object.keys(env).forEach(key => {
2587 createDebug[key] = env[key];
2588 });
2589
2590 /**
2591 * The currently active debug mode names, and names to skip.
2592 */
2593
2594 createDebug.names = [];
2595 createDebug.skips = [];
2596
2597 /**
2598 * Map of special "%n" handling functions, for the debug "format" argument.
2599 *
2600 * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
2601 */
2602 createDebug.formatters = {};
2603
2604 /**
2605 * Selects a color for a debug namespace
2606 * @param {String} namespace The namespace string for the debug instance to be colored
2607 * @return {Number|String} An ANSI color code for the given namespace
2608 * @api private
2609 */
2610 function selectColor(namespace) {
2611 let hash = 0;
2612
2613 for (let i = 0; i < namespace.length; i++) {
2614 hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
2615 hash |= 0; // Convert to 32bit integer
2616 }
2617
2618 return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
2619 }
2620 createDebug.selectColor = selectColor;
2621
2622 /**
2623 * Create a debugger with the given `namespace`.
2624 *
2625 * @param {String} namespace
2626 * @return {Function}
2627 * @api public
2628 */
2629 function createDebug(namespace) {
2630 let prevTime;
2631 let enableOverride = null;
2632 let namespacesCache;
2633 let enabledCache;
2634
2635 function debug(...args) {
2636 // Disabled?
2637 if (!debug.enabled) {
2638 return;
2639 }
2640
2641 const self = debug;
2642
2643 // Set `diff` timestamp
2644 const curr = Number(new Date());
2645 const ms = curr - (prevTime || curr);
2646 self.diff = ms;
2647 self.prev = prevTime;
2648 self.curr = curr;
2649 prevTime = curr;
2650
2651 args[0] = createDebug.coerce(args[0]);
2652
2653 if (typeof args[0] !== 'string') {
2654 // Anything else let's inspect with %O
2655 args.unshift('%O');
2656 }
2657
2658 // Apply any `formatters` transformations
2659 let index = 0;
2660 args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
2661 // If we encounter an escaped % then don't increase the array index
2662 if (match === '%%') {
2663 return '%';
2664 }
2665 index++;
2666 const formatter = createDebug.formatters[format];
2667 if (typeof formatter === 'function') {
2668 const val = args[index];
2669 match = formatter.call(self, val);
2670
2671 // Now we need to remove `args[index]` since it's inlined in the `format`
2672 args.splice(index, 1);
2673 index--;
2674 }
2675 return match;
2676 });
2677
2678 // Apply env-specific formatting (colors, etc.)
2679 createDebug.formatArgs.call(self, args);
2680
2681 const logFn = self.log || createDebug.log;
2682 logFn.apply(self, args);
2683 }
2684
2685 debug.namespace = namespace;
2686 debug.useColors = createDebug.useColors();
2687 debug.color = createDebug.selectColor(namespace);
2688 debug.extend = extend;
2689 debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
2690
2691 Object.defineProperty(debug, 'enabled', {
2692 enumerable: true,
2693 configurable: false,
2694 get: () => {
2695 if (enableOverride !== null) {
2696 return enableOverride;
2697 }
2698 if (namespacesCache !== createDebug.namespaces) {
2699 namespacesCache = createDebug.namespaces;
2700 enabledCache = createDebug.enabled(namespace);
2701 }
2702
2703 return enabledCache;
2704 },
2705 set: v => {
2706 enableOverride = v;
2707 }
2708 });
2709
2710 // Env-specific initialization logic for debug instances
2711 if (typeof createDebug.init === 'function') {
2712 createDebug.init(debug);
2713 }
2714
2715 return debug;
2716 }
2717
2718 function extend(namespace, delimiter) {
2719 const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
2720 newDebug.log = this.log;
2721 return newDebug;
2722 }
2723
2724 /**
2725 * Enables a debug mode by namespaces. This can include modes
2726 * separated by a colon and wildcards.
2727 *
2728 * @param {String} namespaces
2729 * @api public
2730 */
2731 function enable(namespaces) {
2732 createDebug.save(namespaces);
2733 createDebug.namespaces = namespaces;
2734
2735 createDebug.names = [];
2736 createDebug.skips = [];
2737
2738 let i;
2739 const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
2740 const len = split.length;
2741
2742 for (i = 0; i < len; i++) {
2743 if (!split[i]) {
2744 // ignore empty strings
2745 continue;
2746 }
2747
2748 namespaces = split[i].replace(/\*/g, '.*?');
2749
2750 if (namespaces[0] === '-') {
2751 createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
2752 } else {
2753 createDebug.names.push(new RegExp('^' + namespaces + '$'));
2754 }
2755 }
2756 }
2757
2758 /**
2759 * Disable debug output.
2760 *
2761 * @return {String} namespaces
2762 * @api public
2763 */
2764 function disable() {
2765 const namespaces = [
2766 ...createDebug.names.map(toNamespace),
2767 ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
2768 ].join(',');
2769 createDebug.enable('');
2770 return namespaces;
2771 }
2772
2773 /**
2774 * Returns true if the given mode name is enabled, false otherwise.
2775 *
2776 * @param {String} name
2777 * @return {Boolean}
2778 * @api public
2779 */
2780 function enabled(name) {
2781 if (name[name.length - 1] === '*') {
2782 return true;
2783 }
2784
2785 let i;
2786 let len;
2787
2788 for (i = 0, len = createDebug.skips.length; i < len; i++) {
2789 if (createDebug.skips[i].test(name)) {
2790 return false;
2791 }
2792 }
2793
2794 for (i = 0, len = createDebug.names.length; i < len; i++) {
2795 if (createDebug.names[i].test(name)) {
2796 return true;
2797 }
2798 }
2799
2800 return false;
2801 }
2802
2803 /**
2804 * Convert regexp to namespace
2805 *
2806 * @param {RegExp} regxep
2807 * @return {String} namespace
2808 * @api private
2809 */
2810 function toNamespace(regexp) {
2811 return regexp.toString()
2812 .substring(2, regexp.toString().length - 2)
2813 .replace(/\.\*\?$/, '*');
2814 }
2815
2816 /**
2817 * Coerce `val`.
2818 *
2819 * @param {Mixed} val
2820 * @return {Mixed}
2821 * @api private
2822 */
2823 function coerce(val) {
2824 if (val instanceof Error) {
2825 return val.stack || val.message;
2826 }
2827 return val;
2828 }
2829
2830 /**
2831 * XXX DO NOT USE. This is a temporary stub function.
2832 * XXX It WILL be removed in the next major release.
2833 */
2834 function destroy() {
2835 console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
2836 }
2837
2838 createDebug.enable(createDebug.load());
2839
2840 return createDebug;
2841 }
2842
2843 module.exports = setup;
2844
2845
2846 /***/ }),
2847
2848 /***/ "../node_modules/extend/index.js":
2849 /*!***************************************!*\
2850 !*** ../node_modules/extend/index.js ***!
2851 \***************************************/
2852 /***/ ((module) => {
2853
2854 "use strict";
2855
2856
2857 var hasOwn = Object.prototype.hasOwnProperty;
2858 var toStr = Object.prototype.toString;
2859 var defineProperty = Object.defineProperty;
2860 var gOPD = Object.getOwnPropertyDescriptor;
2861
2862 var isArray = function isArray(arr) {
2863 if (typeof Array.isArray === 'function') {
2864 return Array.isArray(arr);
2865 }
2866
2867 return toStr.call(arr) === '[object Array]';
2868 };
2869
2870 var isPlainObject = function isPlainObject(obj) {
2871 if (!obj || toStr.call(obj) !== '[object Object]') {
2872 return false;
2873 }
2874
2875 var hasOwnConstructor = hasOwn.call(obj, 'constructor');
2876 var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
2877 // Not own constructor property must be Object
2878 if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
2879 return false;
2880 }
2881
2882 // Own properties are enumerated firstly, so to speed up,
2883 // if last one is own, then all properties are own.
2884 var key;
2885 for (key in obj) { /**/ }
2886
2887 return typeof key === 'undefined' || hasOwn.call(obj, key);
2888 };
2889
2890 // If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
2891 var setProperty = function setProperty(target, options) {
2892 if (defineProperty && options.name === '__proto__') {
2893 defineProperty(target, options.name, {
2894 enumerable: true,
2895 configurable: true,
2896 value: options.newValue,
2897 writable: true
2898 });
2899 } else {
2900 target[options.name] = options.newValue;
2901 }
2902 };
2903
2904 // Return undefined instead of __proto__ if '__proto__' is not an own property
2905 var getProperty = function getProperty(obj, name) {
2906 if (name === '__proto__') {
2907 if (!hasOwn.call(obj, name)) {
2908 return void 0;
2909 } else if (gOPD) {
2910 // In early versions of node, obj['__proto__'] is buggy when obj has
2911 // __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
2912 return gOPD(obj, name).value;
2913 }
2914 }
2915
2916 return obj[name];
2917 };
2918
2919 module.exports = function extend() {
2920 var options, name, src, copy, copyIsArray, clone;
2921 var target = arguments[0];
2922 var i = 1;
2923 var length = arguments.length;
2924 var deep = false;
2925
2926 // Handle a deep copy situation
2927 if (typeof target === 'boolean') {
2928 deep = target;
2929 target = arguments[1] || {};
2930 // skip the boolean and the target
2931 i = 2;
2932 }
2933 if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
2934 target = {};
2935 }
2936
2937 for (; i < length; ++i) {
2938 options = arguments[i];
2939 // Only deal with non-null/undefined values
2940 if (options != null) {
2941 // Extend the base object
2942 for (name in options) {
2943 src = getProperty(target, name);
2944 copy = getProperty(options, name);
2945
2946 // Prevent never-ending loop
2947 if (target !== copy) {
2948 // Recurse if we're merging plain objects or arrays
2949 if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
2950 if (copyIsArray) {
2951 copyIsArray = false;
2952 clone = src && isArray(src) ? src : [];
2953 } else {
2954 clone = src && isPlainObject(src) ? src : {};
2955 }
2956
2957 // Never move original objects, clone them
2958 setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
2959
2960 // Don't bring in undefined values
2961 } else if (typeof copy !== 'undefined') {
2962 setProperty(target, { name: name, newValue: copy });
2963 }
2964 }
2965 }
2966 }
2967 }
2968
2969 // Return the modified object
2970 return target;
2971 };
2972
2973
2974 /***/ }),
2975
2976 /***/ "../node_modules/inline-style-parser/index.js":
2977 /*!****************************************************!*\
2978 !*** ../node_modules/inline-style-parser/index.js ***!
2979 \****************************************************/
2980 /***/ ((module) => {
2981
2982 // http://www.w3.org/TR/CSS21/grammar.html
2983 // https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027
2984 var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
2985
2986 var NEWLINE_REGEX = /\n/g;
2987 var WHITESPACE_REGEX = /^\s*/;
2988
2989 // declaration
2990 var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
2991 var COLON_REGEX = /^:\s*/;
2992 var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
2993 var SEMICOLON_REGEX = /^[;\s]*/;
2994
2995 // https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
2996 var TRIM_REGEX = /^\s+|\s+$/g;
2997
2998 // strings
2999 var NEWLINE = '\n';
3000 var FORWARD_SLASH = '/';
3001 var ASTERISK = '*';
3002 var EMPTY_STRING = '';
3003
3004 // types
3005 var TYPE_COMMENT = 'comment';
3006 var TYPE_DECLARATION = 'declaration';
3007
3008 /**
3009 * @param {String} style
3010 * @param {Object} [options]
3011 * @return {Object[]}
3012 * @throws {TypeError}
3013 * @throws {Error}
3014 */
3015 module.exports = function(style, options) {
3016 if (typeof style !== 'string') {
3017 throw new TypeError('First argument must be a string');
3018 }
3019
3020 if (!style) return [];
3021
3022 options = options || {};
3023
3024 /**
3025 * Positional.
3026 */
3027 var lineno = 1;
3028 var column = 1;
3029
3030 /**
3031 * Update lineno and column based on `str`.
3032 *
3033 * @param {String} str
3034 */
3035 function updatePosition(str) {
3036 var lines = str.match(NEWLINE_REGEX);
3037 if (lines) lineno += lines.length;
3038 var i = str.lastIndexOf(NEWLINE);
3039 column = ~i ? str.length - i : column + str.length;
3040 }
3041
3042 /**
3043 * Mark position and patch `node.position`.
3044 *
3045 * @return {Function}
3046 */
3047 function position() {
3048 var start = { line: lineno, column: column };
3049 return function(node) {
3050 node.position = new Position(start);
3051 whitespace();
3052 return node;
3053 };
3054 }
3055
3056 /**
3057 * Store position information for a node.
3058 *
3059 * @constructor
3060 * @property {Object} start
3061 * @property {Object} end
3062 * @property {undefined|String} source
3063 */
3064 function Position(start) {
3065 this.start = start;
3066 this.end = { line: lineno, column: column };
3067 this.source = options.source;
3068 }
3069
3070 /**
3071 * Non-enumerable source string.
3072 */
3073 Position.prototype.content = style;
3074
3075 var errorsList = [];
3076
3077 /**
3078 * Error `msg`.
3079 *
3080 * @param {String} msg
3081 * @throws {Error}
3082 */
3083 function error(msg) {
3084 var err = new Error(
3085 options.source + ':' + lineno + ':' + column + ': ' + msg
3086 );
3087 err.reason = msg;
3088 err.filename = options.source;
3089 err.line = lineno;
3090 err.column = column;
3091 err.source = style;
3092
3093 if (options.silent) {
3094 errorsList.push(err);
3095 } else {
3096 throw err;
3097 }
3098 }
3099
3100 /**
3101 * Match `re` and return captures.
3102 *
3103 * @param {RegExp} re
3104 * @return {undefined|Array}
3105 */
3106 function match(re) {
3107 var m = re.exec(style);
3108 if (!m) return;
3109 var str = m[0];
3110 updatePosition(str);
3111 style = style.slice(str.length);
3112 return m;
3113 }
3114
3115 /**
3116 * Parse whitespace.
3117 */
3118 function whitespace() {
3119 match(WHITESPACE_REGEX);
3120 }
3121
3122 /**
3123 * Parse comments.
3124 *
3125 * @param {Object[]} [rules]
3126 * @return {Object[]}
3127 */
3128 function comments(rules) {
3129 var c;
3130 rules = rules || [];
3131 while ((c = comment())) {
3132 if (c !== false) {
3133 rules.push(c);
3134 }
3135 }
3136 return rules;
3137 }
3138
3139 /**
3140 * Parse comment.
3141 *
3142 * @return {Object}
3143 * @throws {Error}
3144 */
3145 function comment() {
3146 var pos = position();
3147 if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
3148
3149 var i = 2;
3150 while (
3151 EMPTY_STRING != style.charAt(i) &&
3152 (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))
3153 ) {
3154 ++i;
3155 }
3156 i += 2;
3157
3158 if (EMPTY_STRING === style.charAt(i - 1)) {
3159 return error('End of comment missing');
3160 }
3161
3162 var str = style.slice(2, i - 2);
3163 column += 2;
3164 updatePosition(str);
3165 style = style.slice(i);
3166 column += 2;
3167
3168 return pos({
3169 type: TYPE_COMMENT,
3170 comment: str
3171 });
3172 }
3173
3174 /**
3175 * Parse declaration.
3176 *
3177 * @return {Object}
3178 * @throws {Error}
3179 */
3180 function declaration() {
3181 var pos = position();
3182
3183 // prop
3184 var prop = match(PROPERTY_REGEX);
3185 if (!prop) return;
3186 comment();
3187
3188 // :
3189 if (!match(COLON_REGEX)) return error("property missing ':'");
3190
3191 // val
3192 var val = match(VALUE_REGEX);
3193
3194 var ret = pos({
3195 type: TYPE_DECLARATION,
3196 property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
3197 value: val
3198 ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))
3199 : EMPTY_STRING
3200 });
3201
3202 // ;
3203 match(SEMICOLON_REGEX);
3204
3205 return ret;
3206 }
3207
3208 /**
3209 * Parse declarations.
3210 *
3211 * @return {Object[]}
3212 */
3213 function declarations() {
3214 var decls = [];
3215
3216 comments(decls);
3217
3218 // declarations
3219 var decl;
3220 while ((decl = declaration())) {
3221 if (decl !== false) {
3222 decls.push(decl);
3223 comments(decls);
3224 }
3225 }
3226
3227 return decls;
3228 }
3229
3230 whitespace();
3231 return declarations();
3232 };
3233
3234 /**
3235 * Trim `str`.
3236 *
3237 * @param {String} str
3238 * @return {String}
3239 */
3240 function trim(str) {
3241 return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
3242 }
3243
3244
3245 /***/ }),
3246
3247 /***/ "../node_modules/is-buffer/index.js":
3248 /*!******************************************!*\
3249 !*** ../node_modules/is-buffer/index.js ***!
3250 \******************************************/
3251 /***/ ((module) => {
3252
3253 /*!
3254 * Determine if an object is a Buffer
3255 *
3256 * @author Feross Aboukhadijeh <https://feross.org>
3257 * @license MIT
3258 */
3259
3260 module.exports = function isBuffer (obj) {
3261 return obj != null && obj.constructor != null &&
3262 typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
3263 }
3264
3265
3266 /***/ }),
3267
3268 /***/ "../node_modules/ms/index.js":
3269 /*!***********************************!*\
3270 !*** ../node_modules/ms/index.js ***!
3271 \***********************************/
3272 /***/ ((module) => {
3273
3274 /**
3275 * Helpers.
3276 */
3277
3278 var s = 1000;
3279 var m = s * 60;
3280 var h = m * 60;
3281 var d = h * 24;
3282 var w = d * 7;
3283 var y = d * 365.25;
3284
3285 /**
3286 * Parse or format the given `val`.
3287 *
3288 * Options:
3289 *
3290 * - `long` verbose formatting [false]
3291 *
3292 * @param {String|Number} val
3293 * @param {Object} [options]
3294 * @throws {Error} throw an error if val is not a non-empty string or a number
3295 * @return {String|Number}
3296 * @api public
3297 */
3298
3299 module.exports = function(val, options) {
3300 options = options || {};
3301 var type = typeof val;
3302 if (type === 'string' && val.length > 0) {
3303 return parse(val);
3304 } else if (type === 'number' && isFinite(val)) {
3305 return options.long ? fmtLong(val) : fmtShort(val);
3306 }
3307 throw new Error(
3308 'val is not a non-empty string or a valid number. val=' +
3309 JSON.stringify(val)
3310 );
3311 };
3312
3313 /**
3314 * Parse the given `str` and return milliseconds.
3315 *
3316 * @param {String} str
3317 * @return {Number}
3318 * @api private
3319 */
3320
3321 function parse(str) {
3322 str = String(str);
3323 if (str.length > 100) {
3324 return;
3325 }
3326 var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
3327 str
3328 );
3329 if (!match) {
3330 return;
3331 }
3332 var n = parseFloat(match[1]);
3333 var type = (match[2] || 'ms').toLowerCase();
3334 switch (type) {
3335 case 'years':
3336 case 'year':
3337 case 'yrs':
3338 case 'yr':
3339 case 'y':
3340 return n * y;
3341 case 'weeks':
3342 case 'week':
3343 case 'w':
3344 return n * w;
3345 case 'days':
3346 case 'day':
3347 case 'd':
3348 return n * d;
3349 case 'hours':
3350 case 'hour':
3351 case 'hrs':
3352 case 'hr':
3353 case 'h':
3354 return n * h;
3355 case 'minutes':
3356 case 'minute':
3357 case 'mins':
3358 case 'min':
3359 case 'm':
3360 return n * m;
3361 case 'seconds':
3362 case 'second':
3363 case 'secs':
3364 case 'sec':
3365 case 's':
3366 return n * s;
3367 case 'milliseconds':
3368 case 'millisecond':
3369 case 'msecs':
3370 case 'msec':
3371 case 'ms':
3372 return n;
3373 default:
3374 return undefined;
3375 }
3376 }
3377
3378 /**
3379 * Short format for `ms`.
3380 *
3381 * @param {Number} ms
3382 * @return {String}
3383 * @api private
3384 */
3385
3386 function fmtShort(ms) {
3387 var msAbs = Math.abs(ms);
3388 if (msAbs >= d) {
3389 return Math.round(ms / d) + 'd';
3390 }
3391 if (msAbs >= h) {
3392 return Math.round(ms / h) + 'h';
3393 }
3394 if (msAbs >= m) {
3395 return Math.round(ms / m) + 'm';
3396 }
3397 if (msAbs >= s) {
3398 return Math.round(ms / s) + 's';
3399 }
3400 return ms + 'ms';
3401 }
3402
3403 /**
3404 * Long format for `ms`.
3405 *
3406 * @param {Number} ms
3407 * @return {String}
3408 * @api private
3409 */
3410
3411 function fmtLong(ms) {
3412 var msAbs = Math.abs(ms);
3413 if (msAbs >= d) {
3414 return plural(ms, msAbs, d, 'day');
3415 }
3416 if (msAbs >= h) {
3417 return plural(ms, msAbs, h, 'hour');
3418 }
3419 if (msAbs >= m) {
3420 return plural(ms, msAbs, m, 'minute');
3421 }
3422 if (msAbs >= s) {
3423 return plural(ms, msAbs, s, 'second');
3424 }
3425 return ms + ' ms';
3426 }
3427
3428 /**
3429 * Pluralization helper.
3430 */
3431
3432 function plural(ms, msAbs, n, name) {
3433 var isPlural = msAbs >= n * 1.5;
3434 return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
3435 }
3436
3437
3438 /***/ }),
3439
3440 /***/ "../node_modules/object-assign/index.js":
3441 /*!**********************************************!*\
3442 !*** ../node_modules/object-assign/index.js ***!
3443 \**********************************************/
3444 /***/ ((module) => {
3445
3446 "use strict";
3447 /*
3448 object-assign
3449 (c) Sindre Sorhus
3450 @license MIT
3451 */
3452
3453
3454 /* eslint-disable no-unused-vars */
3455 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
3456 var hasOwnProperty = Object.prototype.hasOwnProperty;
3457 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
3458
3459 function toObject(val) {
3460 if (val === null || val === undefined) {
3461 throw new TypeError('Object.assign cannot be called with null or undefined');
3462 }
3463
3464 return Object(val);
3465 }
3466
3467 function shouldUseNative() {
3468 try {
3469 if (!Object.assign) {
3470 return false;
3471 }
3472
3473 // Detect buggy property enumeration order in older V8 versions.
3474
3475 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
3476 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
3477 test1[5] = 'de';
3478 if (Object.getOwnPropertyNames(test1)[0] === '5') {
3479 return false;
3480 }
3481
3482 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
3483 var test2 = {};
3484 for (var i = 0; i < 10; i++) {
3485 test2['_' + String.fromCharCode(i)] = i;
3486 }
3487 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
3488 return test2[n];
3489 });
3490 if (order2.join('') !== '0123456789') {
3491 return false;
3492 }
3493
3494 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
3495 var test3 = {};
3496 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
3497 test3[letter] = letter;
3498 });
3499 if (Object.keys(Object.assign({}, test3)).join('') !==
3500 'abcdefghijklmnopqrst') {
3501 return false;
3502 }
3503
3504 return true;
3505 } catch (err) {
3506 // We don't expect any of the above to throw, but better to be safe.
3507 return false;
3508 }
3509 }
3510
3511 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
3512 var from;
3513 var to = toObject(target);
3514 var symbols;
3515
3516 for (var s = 1; s < arguments.length; s++) {
3517 from = Object(arguments[s]);
3518
3519 for (var key in from) {
3520 if (hasOwnProperty.call(from, key)) {
3521 to[key] = from[key];
3522 }
3523 }
3524
3525 if (getOwnPropertySymbols) {
3526 symbols = getOwnPropertySymbols(from);
3527 for (var i = 0; i < symbols.length; i++) {
3528 if (propIsEnumerable.call(from, symbols[i])) {
3529 to[symbols[i]] = from[symbols[i]];
3530 }
3531 }
3532 }
3533 }
3534
3535 return to;
3536 };
3537
3538
3539 /***/ }),
3540
3541 /***/ "../node_modules/prop-types/checkPropTypes.js":
3542 /*!****************************************************!*\
3543 !*** ../node_modules/prop-types/checkPropTypes.js ***!
3544 \****************************************************/
3545 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3546
3547 "use strict";
3548 /**
3549 * Copyright (c) 2013-present, Facebook, Inc.
3550 *
3551 * This source code is licensed under the MIT license found in the
3552 * LICENSE file in the root directory of this source tree.
3553 */
3554
3555
3556
3557 var printWarning = function() {};
3558
3559 if (true) {
3560 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
3561 var loggedTypeFailures = {};
3562 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
3563
3564 printWarning = function(text) {
3565 var message = 'Warning: ' + text;
3566 if (typeof console !== 'undefined') {
3567 console.error(message);
3568 }
3569 try {
3570 // --- Welcome to debugging React ---
3571 // This error was thrown as a convenience so that you can use this stack
3572 // to find the callsite that caused this warning to fire.
3573 throw new Error(message);
3574 } catch (x) { /**/ }
3575 };
3576 }
3577
3578 /**
3579 * Assert that the values match with the type specs.
3580 * Error messages are memorized and will only be shown once.
3581 *
3582 * @param {object} typeSpecs Map of name to a ReactPropType
3583 * @param {object} values Runtime values that need to be type-checked
3584 * @param {string} location e.g. "prop", "context", "child context"
3585 * @param {string} componentName Name of the component for error messages.
3586 * @param {?Function} getStack Returns the component stack.
3587 * @private
3588 */
3589 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
3590 if (true) {
3591 for (var typeSpecName in typeSpecs) {
3592 if (has(typeSpecs, typeSpecName)) {
3593 var error;
3594 // Prop type validation may throw. In case they do, we don't want to
3595 // fail the render phase where it didn't fail before. So we log it.
3596 // After these have been cleaned up, we'll let them throw.
3597 try {
3598 // This is intentionally an invariant that gets caught. It's the same
3599 // behavior as without this statement except with a better message.
3600 if (typeof typeSpecs[typeSpecName] !== 'function') {
3601 var err = Error(
3602 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
3603 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
3604 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
3605 );
3606 err.name = 'Invariant Violation';
3607 throw err;
3608 }
3609 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
3610 } catch (ex) {
3611 error = ex;
3612 }
3613 if (error && !(error instanceof Error)) {
3614 printWarning(
3615 (componentName || 'React class') + ': type specification of ' +
3616 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
3617 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
3618 'You may have forgotten to pass an argument to the type checker ' +
3619 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
3620 'shape all require an argument).'
3621 );
3622 }
3623 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
3624 // Only monitor this failure once because there tends to be a lot of the
3625 // same error.
3626 loggedTypeFailures[error.message] = true;
3627
3628 var stack = getStack ? getStack() : '';
3629
3630 printWarning(
3631 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
3632 );
3633 }
3634 }
3635 }
3636 }
3637 }
3638
3639 /**
3640 * Resets warning cache when testing.
3641 *
3642 * @private
3643 */
3644 checkPropTypes.resetWarningCache = function() {
3645 if (true) {
3646 loggedTypeFailures = {};
3647 }
3648 }
3649
3650 module.exports = checkPropTypes;
3651
3652
3653 /***/ }),
3654
3655 /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
3656 /*!*************************************************************!*\
3657 !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
3658 \*************************************************************/
3659 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3660
3661 "use strict";
3662 /**
3663 * Copyright (c) 2013-present, Facebook, Inc.
3664 *
3665 * This source code is licensed under the MIT license found in the
3666 * LICENSE file in the root directory of this source tree.
3667 */
3668
3669
3670
3671 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
3672 var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
3673
3674 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
3675 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
3676 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
3677
3678 var printWarning = function() {};
3679
3680 if (true) {
3681 printWarning = function(text) {
3682 var message = 'Warning: ' + text;
3683 if (typeof console !== 'undefined') {
3684 console.error(message);
3685 }
3686 try {
3687 // --- Welcome to debugging React ---
3688 // This error was thrown as a convenience so that you can use this stack
3689 // to find the callsite that caused this warning to fire.
3690 throw new Error(message);
3691 } catch (x) {}
3692 };
3693 }
3694
3695 function emptyFunctionThatReturnsNull() {
3696 return null;
3697 }
3698
3699 module.exports = function(isValidElement, throwOnDirectAccess) {
3700 /* global Symbol */
3701 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
3702 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
3703
3704 /**
3705 * Returns the iterator method function contained on the iterable object.
3706 *
3707 * Be sure to invoke the function with the iterable as context:
3708 *
3709 * var iteratorFn = getIteratorFn(myIterable);
3710 * if (iteratorFn) {
3711 * var iterator = iteratorFn.call(myIterable);
3712 * ...
3713 * }
3714 *
3715 * @param {?object} maybeIterable
3716 * @return {?function}
3717 */
3718 function getIteratorFn(maybeIterable) {
3719 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
3720 if (typeof iteratorFn === 'function') {
3721 return iteratorFn;
3722 }
3723 }
3724
3725 /**
3726 * Collection of methods that allow declaration and validation of props that are
3727 * supplied to React components. Example usage:
3728 *
3729 * var Props = require('ReactPropTypes');
3730 * var MyArticle = React.createClass({
3731 * propTypes: {
3732 * // An optional string prop named "description".
3733 * description: Props.string,
3734 *
3735 * // A required enum prop named "category".
3736 * category: Props.oneOf(['News','Photos']).isRequired,
3737 *
3738 * // A prop named "dialog" that requires an instance of Dialog.
3739 * dialog: Props.instanceOf(Dialog).isRequired
3740 * },
3741 * render: function() { ... }
3742 * });
3743 *
3744 * A more formal specification of how these methods are used:
3745 *
3746 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
3747 * decl := ReactPropTypes.{type}(.isRequired)?
3748 *
3749 * Each and every declaration produces a function with the same signature. This
3750 * allows the creation of custom validation functions. For example:
3751 *
3752 * var MyLink = React.createClass({
3753 * propTypes: {
3754 * // An optional string or URI prop named "href".
3755 * href: function(props, propName, componentName) {
3756 * var propValue = props[propName];
3757 * if (propValue != null && typeof propValue !== 'string' &&
3758 * !(propValue instanceof URI)) {
3759 * return new Error(
3760 * 'Expected a string or an URI for ' + propName + ' in ' +
3761 * componentName
3762 * );
3763 * }
3764 * }
3765 * },
3766 * render: function() {...}
3767 * });
3768 *
3769 * @internal
3770 */
3771
3772 var ANONYMOUS = '<<anonymous>>';
3773
3774 // Important!
3775 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
3776 var ReactPropTypes = {
3777 array: createPrimitiveTypeChecker('array'),
3778 bigint: createPrimitiveTypeChecker('bigint'),
3779 bool: createPrimitiveTypeChecker('boolean'),
3780 func: createPrimitiveTypeChecker('function'),
3781 number: createPrimitiveTypeChecker('number'),
3782 object: createPrimitiveTypeChecker('object'),
3783 string: createPrimitiveTypeChecker('string'),
3784 symbol: createPrimitiveTypeChecker('symbol'),
3785
3786 any: createAnyTypeChecker(),
3787 arrayOf: createArrayOfTypeChecker,
3788 element: createElementTypeChecker(),
3789 elementType: createElementTypeTypeChecker(),
3790 instanceOf: createInstanceTypeChecker,
3791 node: createNodeChecker(),
3792 objectOf: createObjectOfTypeChecker,
3793 oneOf: createEnumTypeChecker,
3794 oneOfType: createUnionTypeChecker,
3795 shape: createShapeTypeChecker,
3796 exact: createStrictShapeTypeChecker,
3797 };
3798
3799 /**
3800 * inlined Object.is polyfill to avoid requiring consumers ship their own
3801 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
3802 */
3803 /*eslint-disable no-self-compare*/
3804 function is(x, y) {
3805 // SameValue algorithm
3806 if (x === y) {
3807 // Steps 1-5, 7-10
3808 // Steps 6.b-6.e: +0 != -0
3809 return x !== 0 || 1 / x === 1 / y;
3810 } else {
3811 // Step 6.a: NaN == NaN
3812 return x !== x && y !== y;
3813 }
3814 }
3815 /*eslint-enable no-self-compare*/
3816
3817 /**
3818 * We use an Error-like object for backward compatibility as people may call
3819 * PropTypes directly and inspect their output. However, we don't use real
3820 * Errors anymore. We don't inspect their stack anyway, and creating them
3821 * is prohibitively expensive if they are created too often, such as what
3822 * happens in oneOfType() for any type before the one that matched.
3823 */
3824 function PropTypeError(message, data) {
3825 this.message = message;
3826 this.data = data && typeof data === 'object' ? data: {};
3827 this.stack = '';
3828 }
3829 // Make `instanceof Error` still work for returned errors.
3830 PropTypeError.prototype = Error.prototype;
3831
3832 function createChainableTypeChecker(validate) {
3833 if (true) {
3834 var manualPropTypeCallCache = {};
3835 var manualPropTypeWarningCount = 0;
3836 }
3837 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
3838 componentName = componentName || ANONYMOUS;
3839 propFullName = propFullName || propName;
3840
3841 if (secret !== ReactPropTypesSecret) {
3842 if (throwOnDirectAccess) {
3843 // New behavior only for users of `prop-types` package
3844 var err = new Error(
3845 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
3846 'Use `PropTypes.checkPropTypes()` to call them. ' +
3847 'Read more at http://fb.me/use-check-prop-types'
3848 );
3849 err.name = 'Invariant Violation';
3850 throw err;
3851 } else if ( true && typeof console !== 'undefined') {
3852 // Old behavior for people using React.PropTypes
3853 var cacheKey = componentName + ':' + propName;
3854 if (
3855 !manualPropTypeCallCache[cacheKey] &&
3856 // Avoid spamming the console because they are often not actionable except for lib authors
3857 manualPropTypeWarningCount < 3
3858 ) {
3859 printWarning(
3860 'You are manually calling a React.PropTypes validation ' +
3861 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
3862 'and will throw in the standalone `prop-types` package. ' +
3863 'You may be seeing this warning due to a third-party PropTypes ' +
3864 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
3865 );
3866 manualPropTypeCallCache[cacheKey] = true;
3867 manualPropTypeWarningCount++;
3868 }
3869 }
3870 }
3871 if (props[propName] == null) {
3872 if (isRequired) {
3873 if (props[propName] === null) {
3874 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
3875 }
3876 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
3877 }
3878 return null;
3879 } else {
3880 return validate(props, propName, componentName, location, propFullName);
3881 }
3882 }
3883
3884 var chainedCheckType = checkType.bind(null, false);
3885 chainedCheckType.isRequired = checkType.bind(null, true);
3886
3887 return chainedCheckType;
3888 }
3889
3890 function createPrimitiveTypeChecker(expectedType) {
3891 function validate(props, propName, componentName, location, propFullName, secret) {
3892 var propValue = props[propName];
3893 var propType = getPropType(propValue);
3894 if (propType !== expectedType) {
3895 // `propValue` being instance of, say, date/regexp, pass the 'object'
3896 // check, but we can offer a more precise error message here rather than
3897 // 'of type `object`'.
3898 var preciseType = getPreciseType(propValue);
3899
3900 return new PropTypeError(
3901 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
3902 {expectedType: expectedType}
3903 );
3904 }
3905 return null;
3906 }
3907 return createChainableTypeChecker(validate);
3908 }
3909
3910 function createAnyTypeChecker() {
3911 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
3912 }
3913
3914 function createArrayOfTypeChecker(typeChecker) {
3915 function validate(props, propName, componentName, location, propFullName) {
3916 if (typeof typeChecker !== 'function') {
3917 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
3918 }
3919 var propValue = props[propName];
3920 if (!Array.isArray(propValue)) {
3921 var propType = getPropType(propValue);
3922 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
3923 }
3924 for (var i = 0; i < propValue.length; i++) {
3925 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
3926 if (error instanceof Error) {
3927 return error;
3928 }
3929 }
3930 return null;
3931 }
3932 return createChainableTypeChecker(validate);
3933 }
3934
3935 function createElementTypeChecker() {
3936 function validate(props, propName, componentName, location, propFullName) {
3937 var propValue = props[propName];
3938 if (!isValidElement(propValue)) {
3939 var propType = getPropType(propValue);
3940 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
3941 }
3942 return null;
3943 }
3944 return createChainableTypeChecker(validate);
3945 }
3946
3947 function createElementTypeTypeChecker() {
3948 function validate(props, propName, componentName, location, propFullName) {
3949 var propValue = props[propName];
3950 if (!ReactIs.isValidElementType(propValue)) {
3951 var propType = getPropType(propValue);
3952 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
3953 }
3954 return null;
3955 }
3956 return createChainableTypeChecker(validate);
3957 }
3958
3959 function createInstanceTypeChecker(expectedClass) {
3960 function validate(props, propName, componentName, location, propFullName) {
3961 if (!(props[propName] instanceof expectedClass)) {
3962 var expectedClassName = expectedClass.name || ANONYMOUS;
3963 var actualClassName = getClassName(props[propName]);
3964 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
3965 }
3966 return null;
3967 }
3968 return createChainableTypeChecker(validate);
3969 }
3970
3971 function createEnumTypeChecker(expectedValues) {
3972 if (!Array.isArray(expectedValues)) {
3973 if (true) {
3974 if (arguments.length > 1) {
3975 printWarning(
3976 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
3977 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
3978 );
3979 } else {
3980 printWarning('Invalid argument supplied to oneOf, expected an array.');
3981 }
3982 }
3983 return emptyFunctionThatReturnsNull;
3984 }
3985
3986 function validate(props, propName, componentName, location, propFullName) {
3987 var propValue = props[propName];
3988 for (var i = 0; i < expectedValues.length; i++) {
3989 if (is(propValue, expectedValues[i])) {
3990 return null;
3991 }
3992 }
3993
3994 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
3995 var type = getPreciseType(value);
3996 if (type === 'symbol') {
3997 return String(value);
3998 }
3999 return value;
4000 });
4001 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
4002 }
4003 return createChainableTypeChecker(validate);
4004 }
4005
4006 function createObjectOfTypeChecker(typeChecker) {
4007 function validate(props, propName, componentName, location, propFullName) {
4008 if (typeof typeChecker !== 'function') {
4009 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
4010 }
4011 var propValue = props[propName];
4012 var propType = getPropType(propValue);
4013 if (propType !== 'object') {
4014 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
4015 }
4016 for (var key in propValue) {
4017 if (has(propValue, key)) {
4018 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
4019 if (error instanceof Error) {
4020 return error;
4021 }
4022 }
4023 }
4024 return null;
4025 }
4026 return createChainableTypeChecker(validate);
4027 }
4028
4029 function createUnionTypeChecker(arrayOfTypeCheckers) {
4030 if (!Array.isArray(arrayOfTypeCheckers)) {
4031 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
4032 return emptyFunctionThatReturnsNull;
4033 }
4034
4035 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
4036 var checker = arrayOfTypeCheckers[i];
4037 if (typeof checker !== 'function') {
4038 printWarning(
4039 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
4040 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
4041 );
4042 return emptyFunctionThatReturnsNull;
4043 }
4044 }
4045
4046 function validate(props, propName, componentName, location, propFullName) {
4047 var expectedTypes = [];
4048 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
4049 var checker = arrayOfTypeCheckers[i];
4050 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
4051 if (checkerResult == null) {
4052 return null;
4053 }
4054 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
4055 expectedTypes.push(checkerResult.data.expectedType);
4056 }
4057 }
4058 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
4059 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
4060 }
4061 return createChainableTypeChecker(validate);
4062 }
4063
4064 function createNodeChecker() {
4065 function validate(props, propName, componentName, location, propFullName) {
4066 if (!isNode(props[propName])) {
4067 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
4068 }
4069 return null;
4070 }
4071 return createChainableTypeChecker(validate);
4072 }
4073
4074 function invalidValidatorError(componentName, location, propFullName, key, type) {
4075 return new PropTypeError(
4076 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
4077 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
4078 );
4079 }
4080
4081 function createShapeTypeChecker(shapeTypes) {
4082 function validate(props, propName, componentName, location, propFullName) {
4083 var propValue = props[propName];
4084 var propType = getPropType(propValue);
4085 if (propType !== 'object') {
4086 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
4087 }
4088 for (var key in shapeTypes) {
4089 var checker = shapeTypes[key];
4090 if (typeof checker !== 'function') {
4091 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
4092 }
4093 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
4094 if (error) {
4095 return error;
4096 }
4097 }
4098 return null;
4099 }
4100 return createChainableTypeChecker(validate);
4101 }
4102
4103 function createStrictShapeTypeChecker(shapeTypes) {
4104 function validate(props, propName, componentName, location, propFullName) {
4105 var propValue = props[propName];
4106 var propType = getPropType(propValue);
4107 if (propType !== 'object') {
4108 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
4109 }
4110 // We need to check all keys in case some are required but missing from props.
4111 var allKeys = assign({}, props[propName], shapeTypes);
4112 for (var key in allKeys) {
4113 var checker = shapeTypes[key];
4114 if (has(shapeTypes, key) && typeof checker !== 'function') {
4115 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
4116 }
4117 if (!checker) {
4118 return new PropTypeError(
4119 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
4120 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
4121 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
4122 );
4123 }
4124 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
4125 if (error) {
4126 return error;
4127 }
4128 }
4129 return null;
4130 }
4131
4132 return createChainableTypeChecker(validate);
4133 }
4134
4135 function isNode(propValue) {
4136 switch (typeof propValue) {
4137 case 'number':
4138 case 'string':
4139 case 'undefined':
4140 return true;
4141 case 'boolean':
4142 return !propValue;
4143 case 'object':
4144 if (Array.isArray(propValue)) {
4145 return propValue.every(isNode);
4146 }
4147 if (propValue === null || isValidElement(propValue)) {
4148 return true;
4149 }
4150
4151 var iteratorFn = getIteratorFn(propValue);
4152 if (iteratorFn) {
4153 var iterator = iteratorFn.call(propValue);
4154 var step;
4155 if (iteratorFn !== propValue.entries) {
4156 while (!(step = iterator.next()).done) {
4157 if (!isNode(step.value)) {
4158 return false;
4159 }
4160 }
4161 } else {
4162 // Iterator will provide entry [k,v] tuples rather than values.
4163 while (!(step = iterator.next()).done) {
4164 var entry = step.value;
4165 if (entry) {
4166 if (!isNode(entry[1])) {
4167 return false;
4168 }
4169 }
4170 }
4171 }
4172 } else {
4173 return false;
4174 }
4175
4176 return true;
4177 default:
4178 return false;
4179 }
4180 }
4181
4182 function isSymbol(propType, propValue) {
4183 // Native Symbol.
4184 if (propType === 'symbol') {
4185 return true;
4186 }
4187
4188 // falsy value can't be a Symbol
4189 if (!propValue) {
4190 return false;
4191 }
4192
4193 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
4194 if (propValue['@@toStringTag'] === 'Symbol') {
4195 return true;
4196 }
4197
4198 // Fallback for non-spec compliant Symbols which are polyfilled.
4199 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
4200 return true;
4201 }
4202
4203 return false;
4204 }
4205
4206 // Equivalent of `typeof` but with special handling for array and regexp.
4207 function getPropType(propValue) {
4208 var propType = typeof propValue;
4209 if (Array.isArray(propValue)) {
4210 return 'array';
4211 }
4212 if (propValue instanceof RegExp) {
4213 // Old webkits (at least until Android 4.0) return 'function' rather than
4214 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
4215 // passes PropTypes.object.
4216 return 'object';
4217 }
4218 if (isSymbol(propType, propValue)) {
4219 return 'symbol';
4220 }
4221 return propType;
4222 }
4223
4224 // This handles more types than `getPropType`. Only used for error messages.
4225 // See `createPrimitiveTypeChecker`.
4226 function getPreciseType(propValue) {
4227 if (typeof propValue === 'undefined' || propValue === null) {
4228 return '' + propValue;
4229 }
4230 var propType = getPropType(propValue);
4231 if (propType === 'object') {
4232 if (propValue instanceof Date) {
4233 return 'date';
4234 } else if (propValue instanceof RegExp) {
4235 return 'regexp';
4236 }
4237 }
4238 return propType;
4239 }
4240
4241 // Returns a string that is postfixed to a warning about an invalid type.
4242 // For example, "undefined" or "of type array"
4243 function getPostfixForTypeWarning(value) {
4244 var type = getPreciseType(value);
4245 switch (type) {
4246 case 'array':
4247 case 'object':
4248 return 'an ' + type;
4249 case 'boolean':
4250 case 'date':
4251 case 'regexp':
4252 return 'a ' + type;
4253 default:
4254 return type;
4255 }
4256 }
4257
4258 // Returns class name of the object, if any.
4259 function getClassName(propValue) {
4260 if (!propValue.constructor || !propValue.constructor.name) {
4261 return ANONYMOUS;
4262 }
4263 return propValue.constructor.name;
4264 }
4265
4266 ReactPropTypes.checkPropTypes = checkPropTypes;
4267 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
4268 ReactPropTypes.PropTypes = ReactPropTypes;
4269
4270 return ReactPropTypes;
4271 };
4272
4273
4274 /***/ }),
4275
4276 /***/ "../node_modules/prop-types/index.js":
4277 /*!*******************************************!*\
4278 !*** ../node_modules/prop-types/index.js ***!
4279 \*******************************************/
4280 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4281
4282 /**
4283 * Copyright (c) 2013-present, Facebook, Inc.
4284 *
4285 * This source code is licensed under the MIT license found in the
4286 * LICENSE file in the root directory of this source tree.
4287 */
4288
4289 if (true) {
4290 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
4291
4292 // By explicitly using `prop-types` you are opting into new development behavior.
4293 // http://fb.me/prop-types-in-prod
4294 var throwOnDirectAccess = true;
4295 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
4296 } else {}
4297
4298
4299 /***/ }),
4300
4301 /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
4302 /*!**************************************************************!*\
4303 !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
4304 \**************************************************************/
4305 /***/ ((module) => {
4306
4307 "use strict";
4308 /**
4309 * Copyright (c) 2013-present, Facebook, Inc.
4310 *
4311 * This source code is licensed under the MIT license found in the
4312 * LICENSE file in the root directory of this source tree.
4313 */
4314
4315
4316
4317 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
4318
4319 module.exports = ReactPropTypesSecret;
4320
4321
4322 /***/ }),
4323
4324 /***/ "../node_modules/prop-types/lib/has.js":
4325 /*!*********************************************!*\
4326 !*** ../node_modules/prop-types/lib/has.js ***!
4327 \*********************************************/
4328 /***/ ((module) => {
4329
4330 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
4331
4332
4333 /***/ }),
4334
4335 /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
4336 /*!************************************************************************************!*\
4337 !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
4338 \************************************************************************************/
4339 /***/ ((__unused_webpack_module, exports) => {
4340
4341 "use strict";
4342 /** @license React v16.13.1
4343 * react-is.development.js
4344 *
4345 * Copyright (c) Facebook, Inc. and its affiliates.
4346 *
4347 * This source code is licensed under the MIT license found in the
4348 * LICENSE file in the root directory of this source tree.
4349 */
4350
4351
4352
4353
4354
4355 if (true) {
4356 (function() {
4357 'use strict';
4358
4359 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
4360 // nor polyfill, then a plain number is used for performance.
4361 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
4362 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
4363 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
4364 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
4365 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
4366 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
4367 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
4368 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
4369 // (unstable) APIs that have been removed. Can we remove the symbols?
4370
4371 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
4372 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
4373 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
4374 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
4375 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
4376 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
4377 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
4378 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
4379 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
4380 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
4381 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
4382
4383 function isValidElementType(type) {
4384 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
4385 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (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_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
4386 }
4387
4388 function typeOf(object) {
4389 if (typeof object === 'object' && object !== null) {
4390 var $$typeof = object.$$typeof;
4391
4392 switch ($$typeof) {
4393 case REACT_ELEMENT_TYPE:
4394 var type = object.type;
4395
4396 switch (type) {
4397 case REACT_ASYNC_MODE_TYPE:
4398 case REACT_CONCURRENT_MODE_TYPE:
4399 case REACT_FRAGMENT_TYPE:
4400 case REACT_PROFILER_TYPE:
4401 case REACT_STRICT_MODE_TYPE:
4402 case REACT_SUSPENSE_TYPE:
4403 return type;
4404
4405 default:
4406 var $$typeofType = type && type.$$typeof;
4407
4408 switch ($$typeofType) {
4409 case REACT_CONTEXT_TYPE:
4410 case REACT_FORWARD_REF_TYPE:
4411 case REACT_LAZY_TYPE:
4412 case REACT_MEMO_TYPE:
4413 case REACT_PROVIDER_TYPE:
4414 return $$typeofType;
4415
4416 default:
4417 return $$typeof;
4418 }
4419
4420 }
4421
4422 case REACT_PORTAL_TYPE:
4423 return $$typeof;
4424 }
4425 }
4426
4427 return undefined;
4428 } // AsyncMode is deprecated along with isAsyncMode
4429
4430 var AsyncMode = REACT_ASYNC_MODE_TYPE;
4431 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
4432 var ContextConsumer = REACT_CONTEXT_TYPE;
4433 var ContextProvider = REACT_PROVIDER_TYPE;
4434 var Element = REACT_ELEMENT_TYPE;
4435 var ForwardRef = REACT_FORWARD_REF_TYPE;
4436 var Fragment = REACT_FRAGMENT_TYPE;
4437 var Lazy = REACT_LAZY_TYPE;
4438 var Memo = REACT_MEMO_TYPE;
4439 var Portal = REACT_PORTAL_TYPE;
4440 var Profiler = REACT_PROFILER_TYPE;
4441 var StrictMode = REACT_STRICT_MODE_TYPE;
4442 var Suspense = REACT_SUSPENSE_TYPE;
4443 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
4444
4445 function isAsyncMode(object) {
4446 {
4447 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
4448 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
4449
4450 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
4451 }
4452 }
4453
4454 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
4455 }
4456 function isConcurrentMode(object) {
4457 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
4458 }
4459 function isContextConsumer(object) {
4460 return typeOf(object) === REACT_CONTEXT_TYPE;
4461 }
4462 function isContextProvider(object) {
4463 return typeOf(object) === REACT_PROVIDER_TYPE;
4464 }
4465 function isElement(object) {
4466 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
4467 }
4468 function isForwardRef(object) {
4469 return typeOf(object) === REACT_FORWARD_REF_TYPE;
4470 }
4471 function isFragment(object) {
4472 return typeOf(object) === REACT_FRAGMENT_TYPE;
4473 }
4474 function isLazy(object) {
4475 return typeOf(object) === REACT_LAZY_TYPE;
4476 }
4477 function isMemo(object) {
4478 return typeOf(object) === REACT_MEMO_TYPE;
4479 }
4480 function isPortal(object) {
4481 return typeOf(object) === REACT_PORTAL_TYPE;
4482 }
4483 function isProfiler(object) {
4484 return typeOf(object) === REACT_PROFILER_TYPE;
4485 }
4486 function isStrictMode(object) {
4487 return typeOf(object) === REACT_STRICT_MODE_TYPE;
4488 }
4489 function isSuspense(object) {
4490 return typeOf(object) === REACT_SUSPENSE_TYPE;
4491 }
4492
4493 exports.AsyncMode = AsyncMode;
4494 exports.ConcurrentMode = ConcurrentMode;
4495 exports.ContextConsumer = ContextConsumer;
4496 exports.ContextProvider = ContextProvider;
4497 exports.Element = Element;
4498 exports.ForwardRef = ForwardRef;
4499 exports.Fragment = Fragment;
4500 exports.Lazy = Lazy;
4501 exports.Memo = Memo;
4502 exports.Portal = Portal;
4503 exports.Profiler = Profiler;
4504 exports.StrictMode = StrictMode;
4505 exports.Suspense = Suspense;
4506 exports.isAsyncMode = isAsyncMode;
4507 exports.isConcurrentMode = isConcurrentMode;
4508 exports.isContextConsumer = isContextConsumer;
4509 exports.isContextProvider = isContextProvider;
4510 exports.isElement = isElement;
4511 exports.isForwardRef = isForwardRef;
4512 exports.isFragment = isFragment;
4513 exports.isLazy = isLazy;
4514 exports.isMemo = isMemo;
4515 exports.isPortal = isPortal;
4516 exports.isProfiler = isProfiler;
4517 exports.isStrictMode = isStrictMode;
4518 exports.isSuspense = isSuspense;
4519 exports.isValidElementType = isValidElementType;
4520 exports.typeOf = typeOf;
4521 })();
4522 }
4523
4524
4525 /***/ }),
4526
4527 /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
4528 /*!*****************************************************************!*\
4529 !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
4530 \*****************************************************************/
4531 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4532
4533 "use strict";
4534
4535
4536 if (false) {} else {
4537 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
4538 }
4539
4540
4541 /***/ }),
4542
4543 /***/ "../node_modules/react-draggable/build/cjs/Draggable.js":
4544 /*!**************************************************************!*\
4545 !*** ../node_modules/react-draggable/build/cjs/Draggable.js ***!
4546 \**************************************************************/
4547 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4548
4549 "use strict";
4550
4551
4552 function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4553
4554 Object.defineProperty(exports, "__esModule", ({
4555 value: true
4556 }));
4557 Object.defineProperty(exports, "DraggableCore", ({
4558 enumerable: true,
4559 get: function get() {
4560 return _DraggableCore.default;
4561 }
4562 }));
4563 exports["default"] = void 0;
4564
4565 var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
4566
4567 var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
4568
4569 var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "react-dom"));
4570
4571 var _clsx2 = _interopRequireDefault(__webpack_require__(/*! clsx */ "../node_modules/clsx/dist/clsx.m.js"));
4572
4573 var _domFns = __webpack_require__(/*! ./utils/domFns */ "../node_modules/react-draggable/build/cjs/utils/domFns.js");
4574
4575 var _positionFns = __webpack_require__(/*! ./utils/positionFns */ "../node_modules/react-draggable/build/cjs/utils/positionFns.js");
4576
4577 var _shims = __webpack_require__(/*! ./utils/shims */ "../node_modules/react-draggable/build/cjs/utils/shims.js");
4578
4579 var _DraggableCore = _interopRequireDefault(__webpack_require__(/*! ./DraggableCore */ "../node_modules/react-draggable/build/cjs/DraggableCore.js"));
4580
4581 var _log = _interopRequireDefault(__webpack_require__(/*! ./utils/log */ "../node_modules/react-draggable/build/cjs/utils/log.js"));
4582
4583 var _excluded = ["axis", "bounds", "children", "defaultPosition", "defaultClassName", "defaultClassNameDragging", "defaultClassNameDragged", "position", "positionOffset", "scale"];
4584
4585 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4586
4587 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
4588
4589 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
4590
4591 function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4592
4593 function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4594
4595 function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4596
4597 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4598
4599 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4600
4601 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4602
4603 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."); }
4604
4605 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4606
4607 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
4608
4609 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
4610
4611 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4612
4613 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4614
4615 function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4616
4617 function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4618
4619 function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
4620
4621 function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
4622
4623 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
4624
4625 function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
4626
4627 function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4628
4629 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4630
4631 function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4632
4633 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4634
4635 //
4636 // Define <Draggable>
4637 //
4638 var Draggable = /*#__PURE__*/function (_React$Component) {
4639 _inherits(Draggable, _React$Component);
4640
4641 var _super = _createSuper(Draggable);
4642
4643 function Draggable(props
4644 /*: DraggableProps*/
4645 ) {
4646 var _this;
4647
4648 _classCallCheck(this, Draggable);
4649
4650 _this = _super.call(this, props);
4651
4652 _defineProperty(_assertThisInitialized(_this), "onDragStart", function (e, coreData) {
4653 (0, _log.default)('Draggable: onDragStart: %j', coreData); // Short-circuit if user's callback killed it.
4654
4655 var shouldStart = _this.props.onStart(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData)); // Kills start event on core as well, so move handlers are never bound.
4656
4657
4658 if (shouldStart === false) return false;
4659
4660 _this.setState({
4661 dragging: true,
4662 dragged: true
4663 });
4664 });
4665
4666 _defineProperty(_assertThisInitialized(_this), "onDrag", function (e, coreData) {
4667 if (!_this.state.dragging) return false;
4668 (0, _log.default)('Draggable: onDrag: %j', coreData);
4669 var uiData = (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData);
4670 var newState
4671 /*: $Shape<DraggableState>*/
4672 = {
4673 x: uiData.x,
4674 y: uiData.y
4675 }; // Keep within bounds.
4676
4677 if (_this.props.bounds) {
4678 // Save original x and y.
4679 var x = newState.x,
4680 y = newState.y; // Add slack to the values used to calculate bound position. This will ensure that if
4681 // we start removing slack, the element won't react to it right away until it's been
4682 // completely removed.
4683
4684 newState.x += _this.state.slackX;
4685 newState.y += _this.state.slackY; // Get bound position. This will ceil/floor the x and y within the boundaries.
4686
4687 var _getBoundPosition = (0, _positionFns.getBoundPosition)(_assertThisInitialized(_this), newState.x, newState.y),
4688 _getBoundPosition2 = _slicedToArray(_getBoundPosition, 2),
4689 newStateX = _getBoundPosition2[0],
4690 newStateY = _getBoundPosition2[1];
4691
4692 newState.x = newStateX;
4693 newState.y = newStateY; // Recalculate slack by noting how much was shaved by the boundPosition handler.
4694
4695 newState.slackX = _this.state.slackX + (x - newState.x);
4696 newState.slackY = _this.state.slackY + (y - newState.y); // Update the event we fire to reflect what really happened after bounds took effect.
4697
4698 uiData.x = newState.x;
4699 uiData.y = newState.y;
4700 uiData.deltaX = newState.x - _this.state.x;
4701 uiData.deltaY = newState.y - _this.state.y;
4702 } // Short-circuit if user's callback killed it.
4703
4704
4705 var shouldUpdate = _this.props.onDrag(e, uiData);
4706
4707 if (shouldUpdate === false) return false;
4708
4709 _this.setState(newState);
4710 });
4711
4712 _defineProperty(_assertThisInitialized(_this), "onDragStop", function (e, coreData) {
4713 if (!_this.state.dragging) return false; // Short-circuit if user's callback killed it.
4714
4715 var shouldContinue = _this.props.onStop(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData));
4716
4717 if (shouldContinue === false) return false;
4718 (0, _log.default)('Draggable: onDragStop: %j', coreData);
4719 var newState
4720 /*: $Shape<DraggableState>*/
4721 = {
4722 dragging: false,
4723 slackX: 0,
4724 slackY: 0
4725 }; // If this is a controlled component, the result of this operation will be to
4726 // revert back to the old position. We expect a handler on `onDragStop`, at the least.
4727
4728 var controlled = Boolean(_this.props.position);
4729
4730 if (controlled) {
4731 var _this$props$position = _this.props.position,
4732 x = _this$props$position.x,
4733 y = _this$props$position.y;
4734 newState.x = x;
4735 newState.y = y;
4736 }
4737
4738 _this.setState(newState);
4739 });
4740
4741 _this.state = {
4742 // Whether or not we are currently dragging.
4743 dragging: false,
4744 // Whether or not we have been dragged before.
4745 dragged: false,
4746 // Current transform x and y.
4747 x: props.position ? props.position.x : props.defaultPosition.x,
4748 y: props.position ? props.position.y : props.defaultPosition.y,
4749 prevPropsPosition: _objectSpread({}, props.position),
4750 // Used for compensating for out-of-bounds drags
4751 slackX: 0,
4752 slackY: 0,
4753 // Can only determine if SVG after mounting
4754 isElementSVG: false
4755 };
4756
4757 if (props.position && !(props.onDrag || props.onStop)) {
4758 // eslint-disable-next-line no-console
4759 console.warn('A `position` was applied to this <Draggable>, without drag handlers. This will make this ' + 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' + '`position` of this element.');
4760 }
4761
4762 return _this;
4763 }
4764
4765 _createClass(Draggable, [{
4766 key: "componentDidMount",
4767 value: function componentDidMount() {
4768 // Check to see if the element passed is an instanceof SVGElement
4769 if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) {
4770 this.setState({
4771 isElementSVG: true
4772 });
4773 }
4774 }
4775 }, {
4776 key: "componentWillUnmount",
4777 value: function componentWillUnmount() {
4778 this.setState({
4779 dragging: false
4780 }); // prevents invariant if unmounted while dragging
4781 } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
4782 // the underlying DOM node ourselves. See the README for more information.
4783
4784 }, {
4785 key: "findDOMNode",
4786 value: function findDOMNode()
4787 /*: ?HTMLElement*/
4788 {
4789 var _this$props$nodeRef$c, _this$props, _this$props$nodeRef;
4790
4791 return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 ? void 0 : (_this$props$nodeRef = _this$props.nodeRef) === null || _this$props$nodeRef === void 0 ? void 0 : _this$props$nodeRef.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this);
4792 }
4793 }, {
4794 key: "render",
4795 value: function render()
4796 /*: ReactElement<any>*/
4797 {
4798 var _clsx;
4799
4800 var _this$props2 = this.props,
4801 axis = _this$props2.axis,
4802 bounds = _this$props2.bounds,
4803 children = _this$props2.children,
4804 defaultPosition = _this$props2.defaultPosition,
4805 defaultClassName = _this$props2.defaultClassName,
4806 defaultClassNameDragging = _this$props2.defaultClassNameDragging,
4807 defaultClassNameDragged = _this$props2.defaultClassNameDragged,
4808 position = _this$props2.position,
4809 positionOffset = _this$props2.positionOffset,
4810 scale = _this$props2.scale,
4811 draggableCoreProps = _objectWithoutProperties(_this$props2, _excluded);
4812
4813 var style = {};
4814 var svgTransform = null; // If this is controlled, we don't want to move it - unless it's dragging.
4815
4816 var controlled = Boolean(position);
4817 var draggable = !controlled || this.state.dragging;
4818 var validPosition = position || defaultPosition;
4819 var transformOpts = {
4820 // Set left if horizontal drag is enabled
4821 x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,
4822 // Set top if vertical drag is enabled
4823 y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y
4824 }; // If this element was SVG, we use the `transform` attribute.
4825
4826 if (this.state.isElementSVG) {
4827 svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);
4828 } else {
4829 // Add a CSS transform to move the element around. This allows us to move the element around
4830 // without worrying about whether or not it is relatively or absolutely positioned.
4831 // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable>
4832 // has a clean slate.
4833 style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);
4834 } // Mark with class while dragging
4835
4836
4837 var className = (0, _clsx2.default)(children.props.className || '', defaultClassName, (_clsx = {}, _defineProperty(_clsx, defaultClassNameDragging, this.state.dragging), _defineProperty(_clsx, defaultClassNameDragged, this.state.dragged), _clsx)); // Reuse the child provided
4838 // This makes it flexible to use whatever element is wanted (div, ul, etc)
4839
4840 return /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {
4841 onStart: this.onDragStart,
4842 onDrag: this.onDrag,
4843 onStop: this.onDragStop
4844 }), /*#__PURE__*/React.cloneElement(React.Children.only(children), {
4845 className: className,
4846 style: _objectSpread(_objectSpread({}, children.props.style), style),
4847 transform: svgTransform
4848 }));
4849 }
4850 }], [{
4851 key: "getDerivedStateFromProps",
4852 value: // React 16.3+
4853 // Arity (props, state)
4854 function getDerivedStateFromProps(_ref, _ref2)
4855 /*: ?$Shape<DraggableState>*/
4856 {
4857 var position = _ref.position;
4858 var prevPropsPosition = _ref2.prevPropsPosition;
4859
4860 // Set x/y if a new position is provided in props that is different than the previous.
4861 if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {
4862 (0, _log.default)('Draggable: getDerivedStateFromProps %j', {
4863 position: position,
4864 prevPropsPosition: prevPropsPosition
4865 });
4866 return {
4867 x: position.x,
4868 y: position.y,
4869 prevPropsPosition: _objectSpread({}, position)
4870 };
4871 }
4872
4873 return null;
4874 }
4875 }]);
4876
4877 return Draggable;
4878 }(React.Component);
4879
4880 exports["default"] = Draggable;
4881
4882 _defineProperty(Draggable, "displayName", 'Draggable');
4883
4884 _defineProperty(Draggable, "propTypes", _objectSpread(_objectSpread({}, _DraggableCore.default.propTypes), {}, {
4885 /**
4886 * `axis` determines which axis the draggable can move.
4887 *
4888 * Note that all callbacks will still return data as normal. This only
4889 * controls flushing to the DOM.
4890 *
4891 * 'both' allows movement horizontally and vertically.
4892 * 'x' limits movement to horizontal axis.
4893 * 'y' limits movement to vertical axis.
4894 * 'none' limits all movement.
4895 *
4896 * Defaults to 'both'.
4897 */
4898 axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),
4899
4900 /**
4901 * `bounds` determines the range of movement available to the element.
4902 * Available values are:
4903 *
4904 * 'parent' restricts movement within the Draggable's parent node.
4905 *
4906 * Alternatively, pass an object with the following properties, all of which are optional:
4907 *
4908 * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
4909 *
4910 * All values are in px.
4911 *
4912 * Example:
4913 *
4914 * ```jsx
4915 * let App = React.createClass({
4916 * render: function () {
4917 * return (
4918 * <Draggable bounds={{right: 300, bottom: 300}}>
4919 * <div>Content</div>
4920 * </Draggable>
4921 * );
4922 * }
4923 * });
4924 * ```
4925 */
4926 bounds: _propTypes.default.oneOfType([_propTypes.default.shape({
4927 left: _propTypes.default.number,
4928 right: _propTypes.default.number,
4929 top: _propTypes.default.number,
4930 bottom: _propTypes.default.number
4931 }), _propTypes.default.string, _propTypes.default.oneOf([false])]),
4932 defaultClassName: _propTypes.default.string,
4933 defaultClassNameDragging: _propTypes.default.string,
4934 defaultClassNameDragged: _propTypes.default.string,
4935
4936 /**
4937 * `defaultPosition` specifies the x and y that the dragged item should start at
4938 *
4939 * Example:
4940 *
4941 * ```jsx
4942 * let App = React.createClass({
4943 * render: function () {
4944 * return (
4945 * <Draggable defaultPosition={{x: 25, y: 25}}>
4946 * <div>I start with transformX: 25px and transformY: 25px;</div>
4947 * </Draggable>
4948 * );
4949 * }
4950 * });
4951 * ```
4952 */
4953 defaultPosition: _propTypes.default.shape({
4954 x: _propTypes.default.number,
4955 y: _propTypes.default.number
4956 }),
4957 positionOffset: _propTypes.default.shape({
4958 x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
4959 y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])
4960 }),
4961
4962 /**
4963 * `position`, if present, defines the current position of the element.
4964 *
4965 * This is similar to how form elements in React work - if no `position` is supplied, the component
4966 * is uncontrolled.
4967 *
4968 * Example:
4969 *
4970 * ```jsx
4971 * let App = React.createClass({
4972 * render: function () {
4973 * return (
4974 * <Draggable position={{x: 25, y: 25}}>
4975 * <div>I start with transformX: 25px and transformY: 25px;</div>
4976 * </Draggable>
4977 * );
4978 * }
4979 * });
4980 * ```
4981 */
4982 position: _propTypes.default.shape({
4983 x: _propTypes.default.number,
4984 y: _propTypes.default.number
4985 }),
4986
4987 /**
4988 * These properties should be defined on the child, not here.
4989 */
4990 className: _shims.dontSetMe,
4991 style: _shims.dontSetMe,
4992 transform: _shims.dontSetMe
4993 }));
4994
4995 _defineProperty(Draggable, "defaultProps", _objectSpread(_objectSpread({}, _DraggableCore.default.defaultProps), {}, {
4996 axis: 'both',
4997 bounds: false,
4998 defaultClassName: 'react-draggable',
4999 defaultClassNameDragging: 'react-draggable-dragging',
5000 defaultClassNameDragged: 'react-draggable-dragged',
5001 defaultPosition: {
5002 x: 0,
5003 y: 0
5004 },
5005 scale: 1
5006 }));
5007
5008 /***/ }),
5009
5010 /***/ "../node_modules/react-draggable/build/cjs/DraggableCore.js":
5011 /*!******************************************************************!*\
5012 !*** ../node_modules/react-draggable/build/cjs/DraggableCore.js ***!
5013 \******************************************************************/
5014 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5015
5016 "use strict";
5017
5018
5019 function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5020
5021 Object.defineProperty(exports, "__esModule", ({
5022 value: true
5023 }));
5024 exports["default"] = void 0;
5025
5026 var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
5027
5028 var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"));
5029
5030 var _reactDom = _interopRequireDefault(__webpack_require__(/*! react-dom */ "react-dom"));
5031
5032 var _domFns = __webpack_require__(/*! ./utils/domFns */ "../node_modules/react-draggable/build/cjs/utils/domFns.js");
5033
5034 var _positionFns = __webpack_require__(/*! ./utils/positionFns */ "../node_modules/react-draggable/build/cjs/utils/positionFns.js");
5035
5036 var _shims = __webpack_require__(/*! ./utils/shims */ "../node_modules/react-draggable/build/cjs/utils/shims.js");
5037
5038 var _log = _interopRequireDefault(__webpack_require__(/*! ./utils/log */ "../node_modules/react-draggable/build/cjs/utils/log.js"));
5039
5040 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5041
5042 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
5043
5044 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
5045
5046 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5047
5048 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."); }
5049
5050 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5051
5052 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
5053
5054 function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
5055
5056 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
5057
5058 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5059
5060 function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
5061
5062 function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5063
5064 function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
5065
5066 function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
5067
5068 function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5069
5070 function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
5071
5072 function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5073
5074 function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5075
5076 function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5077
5078 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5079
5080 // Simple abstraction for dragging events names.
5081 var eventsFor = {
5082 touch: {
5083 start: 'touchstart',
5084 move: 'touchmove',
5085 stop: 'touchend'
5086 },
5087 mouse: {
5088 start: 'mousedown',
5089 move: 'mousemove',
5090 stop: 'mouseup'
5091 }
5092 }; // Default to mouse events.
5093
5094 var dragEventFor = eventsFor.mouse;
5095 /*:: type DraggableCoreState = {
5096 dragging: boolean,
5097 lastX: number,
5098 lastY: number,
5099 touchIdentifier: ?number
5100 };*/
5101
5102 /*:: export type DraggableData = {
5103 node: HTMLElement,
5104 x: number, y: number,
5105 deltaX: number, deltaY: number,
5106 lastX: number, lastY: number,
5107 };*/
5108
5109 /*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void | false;*/
5110
5111 /*:: export type ControlPosition = {x: number, y: number};*/
5112
5113 /*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/
5114
5115 /*:: export type DraggableCoreDefaultProps = {
5116 allowAnyClick: boolean,
5117 disabled: boolean,
5118 enableUserSelectHack: boolean,
5119 onStart: DraggableEventHandler,
5120 onDrag: DraggableEventHandler,
5121 onStop: DraggableEventHandler,
5122 onMouseDown: (e: MouseEvent) => void,
5123 scale: number,
5124 };*/
5125
5126 /*:: export type DraggableCoreProps = {
5127 ...DraggableCoreDefaultProps,
5128 cancel: string,
5129 children: ReactElement<any>,
5130 offsetParent: HTMLElement,
5131 grid: [number, number],
5132 handle: string,
5133 nodeRef?: ?React.ElementRef<any>,
5134 };*/
5135
5136 //
5137 // Define <DraggableCore>.
5138 //
5139 // <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can
5140 // work well with libraries that require more control over the element.
5141 //
5142 var DraggableCore = /*#__PURE__*/function (_React$Component) {
5143 _inherits(DraggableCore, _React$Component);
5144
5145 var _super = _createSuper(DraggableCore);
5146
5147 function DraggableCore() {
5148 var _this;
5149
5150 _classCallCheck(this, DraggableCore);
5151
5152 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5153 args[_key] = arguments[_key];
5154 }
5155
5156 _this = _super.call.apply(_super, [this].concat(args));
5157
5158 _defineProperty(_assertThisInitialized(_this), "state", {
5159 dragging: false,
5160 // Used while dragging to determine deltas.
5161 lastX: NaN,
5162 lastY: NaN,
5163 touchIdentifier: null
5164 });
5165
5166 _defineProperty(_assertThisInitialized(_this), "mounted", false);
5167
5168 _defineProperty(_assertThisInitialized(_this), "handleDragStart", function (e) {
5169 // Make it possible to attach event handlers on top of this one.
5170 _this.props.onMouseDown(e); // Only accept left-clicks.
5171
5172
5173 if (!_this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false; // Get nodes. Be sure to grab relative document (could be iframed)
5174
5175 var thisNode = _this.findDOMNode();
5176
5177 if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {
5178 throw new Error('<DraggableCore> not mounted on DragStart!');
5179 }
5180
5181 var ownerDocument = thisNode.ownerDocument; // Short circuit if handle or cancel prop was provided and selector doesn't match.
5182
5183 if (_this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.cancel, thisNode)) {
5184 return;
5185 } // Prevent scrolling on mobile devices, like ipad/iphone.
5186 // Important that this is after handle/cancel.
5187
5188
5189 if (e.type === 'touchstart') e.preventDefault(); // Set touch identifier in component state if this is a touch event. This allows us to
5190 // distinguish between individual touches on multitouch screens by identifying which
5191 // touchpoint was set to this element.
5192
5193 var touchIdentifier = (0, _domFns.getTouchIdentifier)(e);
5194
5195 _this.setState({
5196 touchIdentifier: touchIdentifier
5197 }); // Get the current drag point from the event. This is used as the offset.
5198
5199
5200 var position = (0, _positionFns.getControlPosition)(e, touchIdentifier, _assertThisInitialized(_this));
5201 if (position == null) return; // not possible but satisfies flow
5202
5203 var x = position.x,
5204 y = position.y; // Create an event object with all the data parents need to make a decision here.
5205
5206 var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y);
5207 (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent); // Call event handler. If it returns explicit false, cancel.
5208
5209 (0, _log.default)('calling', _this.props.onStart);
5210
5211 var shouldUpdate = _this.props.onStart(e, coreEvent);
5212
5213 if (shouldUpdate === false || _this.mounted === false) return; // Add a style to the body to disable user-select. This prevents text from
5214 // being selected all over the page.
5215
5216 if (_this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument); // Initiate dragging. Set the current x and y as offsets
5217 // so we know how much we've moved during the drag. This allows us
5218 // to drag elements around even if they have been moved, without issue.
5219
5220 _this.setState({
5221 dragging: true,
5222 lastX: x,
5223 lastY: y
5224 }); // Add events to the document directly so we catch when the user's mouse/touch moves outside of
5225 // this element. We use different events depending on whether or not we have detected that this
5226 // is a touch-capable device.
5227
5228
5229 (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, _this.handleDrag);
5230 (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, _this.handleDragStop);
5231 });
5232
5233 _defineProperty(_assertThisInitialized(_this), "handleDrag", function (e) {
5234 // Get the current drag point from the event. This is used as the offset.
5235 var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));
5236 if (position == null) return;
5237 var x = position.x,
5238 y = position.y; // Snap to grid if prop has been provided
5239
5240 if (Array.isArray(_this.props.grid)) {
5241 var deltaX = x - _this.state.lastX,
5242 deltaY = y - _this.state.lastY;
5243
5244 var _snapToGrid = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY);
5245
5246 var _snapToGrid2 = _slicedToArray(_snapToGrid, 2);
5247
5248 deltaX = _snapToGrid2[0];
5249 deltaY = _snapToGrid2[1];
5250 if (!deltaX && !deltaY) return; // skip useless drag
5251
5252 x = _this.state.lastX + deltaX, y = _this.state.lastY + deltaY;
5253 }
5254
5255 var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y);
5256 (0, _log.default)('DraggableCore: handleDrag: %j', coreEvent); // Call event handler. If it returns explicit false, trigger end.
5257
5258 var shouldUpdate = _this.props.onDrag(e, coreEvent);
5259
5260 if (shouldUpdate === false || _this.mounted === false) {
5261 try {
5262 // $FlowIgnore
5263 _this.handleDragStop(new MouseEvent('mouseup'));
5264 } catch (err) {
5265 // Old browsers
5266 var event = ((document.createEvent('MouseEvents')
5267 /*: any*/
5268 )
5269 /*: MouseTouchEvent*/
5270 ); // I see why this insanity was deprecated
5271 // $FlowIgnore
5272
5273 event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
5274
5275 _this.handleDragStop(event);
5276 }
5277
5278 return;
5279 }
5280
5281 _this.setState({
5282 lastX: x,
5283 lastY: y
5284 });
5285 });
5286
5287 _defineProperty(_assertThisInitialized(_this), "handleDragStop", function (e) {
5288 if (!_this.state.dragging) return;
5289 var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));
5290 if (position == null) return;
5291 var x = position.x,
5292 y = position.y; // Snap to grid if prop has been provided
5293
5294 if (Array.isArray(_this.props.grid)) {
5295 var deltaX = x - _this.state.lastX || 0;
5296 var deltaY = y - _this.state.lastY || 0;
5297
5298 var _snapToGrid3 = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY);
5299
5300 var _snapToGrid4 = _slicedToArray(_snapToGrid3, 2);
5301
5302 deltaX = _snapToGrid4[0];
5303 deltaY = _snapToGrid4[1];
5304 x = _this.state.lastX + deltaX, y = _this.state.lastY + deltaY;
5305 }
5306
5307 var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y); // Call event handler
5308
5309 var shouldContinue = _this.props.onStop(e, coreEvent);
5310
5311 if (shouldContinue === false || _this.mounted === false) return false;
5312
5313 var thisNode = _this.findDOMNode();
5314
5315 if (thisNode) {
5316 // Remove user-select hack
5317 if (_this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);
5318 }
5319
5320 (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent); // Reset the el.
5321
5322 _this.setState({
5323 dragging: false,
5324 lastX: NaN,
5325 lastY: NaN
5326 });
5327
5328 if (thisNode) {
5329 // Remove event handlers
5330 (0, _log.default)('DraggableCore: Removing handlers');
5331 (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, _this.handleDrag);
5332 (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, _this.handleDragStop);
5333 }
5334 });
5335
5336 _defineProperty(_assertThisInitialized(_this), "onMouseDown", function (e) {
5337 dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse
5338
5339 return _this.handleDragStart(e);
5340 });
5341
5342 _defineProperty(_assertThisInitialized(_this), "onMouseUp", function (e) {
5343 dragEventFor = eventsFor.mouse;
5344 return _this.handleDragStop(e);
5345 });
5346
5347 _defineProperty(_assertThisInitialized(_this), "onTouchStart", function (e) {
5348 // We're on a touch device now, so change the event handlers
5349 dragEventFor = eventsFor.touch;
5350 return _this.handleDragStart(e);
5351 });
5352
5353 _defineProperty(_assertThisInitialized(_this), "onTouchEnd", function (e) {
5354 // We're on a touch device now, so change the event handlers
5355 dragEventFor = eventsFor.touch;
5356 return _this.handleDragStop(e);
5357 });
5358
5359 return _this;
5360 }
5361
5362 _createClass(DraggableCore, [{
5363 key: "componentDidMount",
5364 value: function componentDidMount() {
5365 this.mounted = true; // Touch handlers must be added with {passive: false} to be cancelable.
5366 // https://developers.google.com/web/updates/2017/01/scrolling-intervention
5367
5368 var thisNode = this.findDOMNode();
5369
5370 if (thisNode) {
5371 (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
5372 passive: false
5373 });
5374 }
5375 }
5376 }, {
5377 key: "componentWillUnmount",
5378 value: function componentWillUnmount() {
5379 this.mounted = false; // Remove any leftover event handlers. Remove both touch and mouse handlers in case
5380 // some browser quirk caused a touch event to fire during a mouse move, or vice versa.
5381
5382 var thisNode = this.findDOMNode();
5383
5384 if (thisNode) {
5385 var ownerDocument = thisNode.ownerDocument;
5386 (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);
5387 (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);
5388 (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);
5389 (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);
5390 (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
5391 passive: false
5392 });
5393 if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument);
5394 }
5395 } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
5396 // the underlying DOM node ourselves. See the README for more information.
5397
5398 }, {
5399 key: "findDOMNode",
5400 value: function findDOMNode()
5401 /*: ?HTMLElement*/
5402 {
5403 var _this$props, _this$props2, _this$props2$nodeRef;
5404
5405 return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$nodeRef = _this$props2.nodeRef) === null || _this$props2$nodeRef === void 0 ? void 0 : _this$props2$nodeRef.current : _reactDom.default.findDOMNode(this);
5406 }
5407 }, {
5408 key: "render",
5409 value: function render()
5410 /*: React.Element<any>*/
5411 {
5412 // Reuse the child provided
5413 // This makes it flexible to use whatever element is wanted (div, ul, etc)
5414 return /*#__PURE__*/React.cloneElement(React.Children.only(this.props.children), {
5415 // Note: mouseMove handler is attached to document so it will still function
5416 // when the user drags quickly and leaves the bounds of the element.
5417 onMouseDown: this.onMouseDown,
5418 onMouseUp: this.onMouseUp,
5419 // onTouchStart is added on `componentDidMount` so they can be added with
5420 // {passive: false}, which allows it to cancel. See
5421 // https://developers.google.com/web/updates/2017/01/scrolling-intervention
5422 onTouchEnd: this.onTouchEnd
5423 });
5424 }
5425 }]);
5426
5427 return DraggableCore;
5428 }(React.Component);
5429
5430 exports["default"] = DraggableCore;
5431
5432 _defineProperty(DraggableCore, "displayName", 'DraggableCore');
5433
5434 _defineProperty(DraggableCore, "propTypes", {
5435 /**
5436 * `allowAnyClick` allows dragging using any mouse button.
5437 * By default, we only accept the left button.
5438 *
5439 * Defaults to `false`.
5440 */
5441 allowAnyClick: _propTypes.default.bool,
5442
5443 /**
5444 * `disabled`, if true, stops the <Draggable> from dragging. All handlers,
5445 * with the exception of `onMouseDown`, will not fire.
5446 */
5447 disabled: _propTypes.default.bool,
5448
5449 /**
5450 * By default, we add 'user-select:none' attributes to the document body
5451 * to prevent ugly text selection during drag. If this is causing problems
5452 * for your app, set this to `false`.
5453 */
5454 enableUserSelectHack: _propTypes.default.bool,
5455
5456 /**
5457 * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
5458 * instead of using the parent node.
5459 */
5460 offsetParent: function offsetParent(props
5461 /*: DraggableCoreProps*/
5462 , propName
5463 /*: $Keys<DraggableCoreProps>*/
5464 ) {
5465 if (props[propName] && props[propName].nodeType !== 1) {
5466 throw new Error('Draggable\'s offsetParent must be a DOM Node.');
5467 }
5468 },
5469
5470 /**
5471 * `grid` specifies the x and y that dragging should snap to.
5472 */
5473 grid: _propTypes.default.arrayOf(_propTypes.default.number),
5474
5475 /**
5476 * `handle` specifies a selector to be used as the handle that initiates drag.
5477 *
5478 * Example:
5479 *
5480 * ```jsx
5481 * let App = React.createClass({
5482 * render: function () {
5483 * return (
5484 * <Draggable handle=".handle">
5485 * <div>
5486 * <div className="handle">Click me to drag</div>
5487 * <div>This is some other content</div>
5488 * </div>
5489 * </Draggable>
5490 * );
5491 * }
5492 * });
5493 * ```
5494 */
5495 handle: _propTypes.default.string,
5496
5497 /**
5498 * `cancel` specifies a selector to be used to prevent drag initialization.
5499 *
5500 * Example:
5501 *
5502 * ```jsx
5503 * let App = React.createClass({
5504 * render: function () {
5505 * return(
5506 * <Draggable cancel=".cancel">
5507 * <div>
5508 * <div className="cancel">You can't drag from here</div>
5509 * <div>Dragging here works fine</div>
5510 * </div>
5511 * </Draggable>
5512 * );
5513 * }
5514 * });
5515 * ```
5516 */
5517 cancel: _propTypes.default.string,
5518
5519 /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
5520 * Unfortunately, in order for <Draggable> to work properly, we need raw access
5521 * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
5522 * as in this example:
5523 *
5524 * function MyComponent() {
5525 * const nodeRef = React.useRef(null);
5526 * return (
5527 * <Draggable nodeRef={nodeRef}>
5528 * <div ref={nodeRef}>Example Target</div>
5529 * </Draggable>
5530 * );
5531 * }
5532 *
5533 * This can be used for arbitrarily nested components, so long as the ref ends up
5534 * pointing to the actual child DOM node and not a custom component.
5535 */
5536 nodeRef: _propTypes.default.object,
5537
5538 /**
5539 * Called when dragging starts.
5540 * If this function returns the boolean false, dragging will be canceled.
5541 */
5542 onStart: _propTypes.default.func,
5543
5544 /**
5545 * Called while dragging.
5546 * If this function returns the boolean false, dragging will be canceled.
5547 */
5548 onDrag: _propTypes.default.func,
5549
5550 /**
5551 * Called when dragging stops.
5552 * If this function returns the boolean false, the drag will remain active.
5553 */
5554 onStop: _propTypes.default.func,
5555
5556 /**
5557 * A workaround option which can be passed if onMouseDown needs to be accessed,
5558 * since it'll always be blocked (as there is internal use of onMouseDown)
5559 */
5560 onMouseDown: _propTypes.default.func,
5561
5562 /**
5563 * `scale`, if set, applies scaling while dragging an element
5564 */
5565 scale: _propTypes.default.number,
5566
5567 /**
5568 * These properties should be defined on the child, not here.
5569 */
5570 className: _shims.dontSetMe,
5571 style: _shims.dontSetMe,
5572 transform: _shims.dontSetMe
5573 });
5574
5575 _defineProperty(DraggableCore, "defaultProps", {
5576 allowAnyClick: false,
5577 // by default only accept left click
5578 disabled: false,
5579 enableUserSelectHack: true,
5580 onStart: function onStart() {},
5581 onDrag: function onDrag() {},
5582 onStop: function onStop() {},
5583 onMouseDown: function onMouseDown() {},
5584 scale: 1
5585 });
5586
5587 /***/ }),
5588
5589 /***/ "../node_modules/react-draggable/build/cjs/cjs.js":
5590 /*!********************************************************!*\
5591 !*** ../node_modules/react-draggable/build/cjs/cjs.js ***!
5592 \********************************************************/
5593 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5594
5595 "use strict";
5596
5597
5598 var _require = __webpack_require__(/*! ./Draggable */ "../node_modules/react-draggable/build/cjs/Draggable.js"),
5599 Draggable = _require.default,
5600 DraggableCore = _require.DraggableCore; // Previous versions of this lib exported <Draggable> as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'.
5601 // See https://github.com/mzabriskie/react-draggable/pull/254
5602 // and https://github.com/mzabriskie/react-draggable/issues/266
5603
5604
5605 module.exports = Draggable;
5606 module.exports["default"] = Draggable;
5607 module.exports.DraggableCore = DraggableCore;
5608
5609 /***/ }),
5610
5611 /***/ "../node_modules/react-draggable/build/cjs/utils/domFns.js":
5612 /*!*****************************************************************!*\
5613 !*** ../node_modules/react-draggable/build/cjs/utils/domFns.js ***!
5614 \*****************************************************************/
5615 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
5616
5617 "use strict";
5618
5619
5620 function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5621
5622 Object.defineProperty(exports, "__esModule", ({
5623 value: true
5624 }));
5625 exports.addClassName = addClassName;
5626 exports.addEvent = addEvent;
5627 exports.addUserSelectStyles = addUserSelectStyles;
5628 exports.createCSSTransform = createCSSTransform;
5629 exports.createSVGTransform = createSVGTransform;
5630 exports.getTouch = getTouch;
5631 exports.getTouchIdentifier = getTouchIdentifier;
5632 exports.getTranslation = getTranslation;
5633 exports.innerHeight = innerHeight;
5634 exports.innerWidth = innerWidth;
5635 exports.matchesSelector = matchesSelector;
5636 exports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
5637 exports.offsetXYFromParent = offsetXYFromParent;
5638 exports.outerHeight = outerHeight;
5639 exports.outerWidth = outerWidth;
5640 exports.removeClassName = removeClassName;
5641 exports.removeEvent = removeEvent;
5642 exports.removeUserSelectStyles = removeUserSelectStyles;
5643
5644 var _shims = __webpack_require__(/*! ./shims */ "../node_modules/react-draggable/build/cjs/utils/shims.js");
5645
5646 var _getPrefix = _interopRequireWildcard(__webpack_require__(/*! ./getPrefix */ "../node_modules/react-draggable/build/cjs/utils/getPrefix.js"));
5647
5648 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
5649
5650 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
5651
5652 function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5653
5654 function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5655
5656 function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5657
5658 var matchesSelectorFunc = '';
5659
5660 function matchesSelector(el
5661 /*: Node*/
5662 , selector
5663 /*: string*/
5664 )
5665 /*: boolean*/
5666 {
5667 if (!matchesSelectorFunc) {
5668 matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {
5669 // $FlowIgnore: Doesn't think elements are indexable
5670 return (0, _shims.isFunction)(el[method]);
5671 });
5672 } // Might not be found entirely (not an Element?) - in that case, bail
5673 // $FlowIgnore: Doesn't think elements are indexable
5674
5675
5676 if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false; // $FlowIgnore: Doesn't think elements are indexable
5677
5678 return el[matchesSelectorFunc](selector);
5679 } // Works up the tree to the draggable itself attempting to match selector.
5680
5681
5682 function matchesSelectorAndParentsTo(el
5683 /*: Node*/
5684 , selector
5685 /*: string*/
5686 , baseNode
5687 /*: Node*/
5688 )
5689 /*: boolean*/
5690 {
5691 var node = el;
5692
5693 do {
5694 if (matchesSelector(node, selector)) return true;
5695 if (node === baseNode) return false;
5696 node = node.parentNode;
5697 } while (node);
5698
5699 return false;
5700 }
5701
5702 function addEvent(el
5703 /*: ?Node*/
5704 , event
5705 /*: string*/
5706 , handler
5707 /*: Function*/
5708 , inputOptions
5709 /*: Object*/
5710 )
5711 /*: void*/
5712 {
5713 if (!el) return;
5714
5715 var options = _objectSpread({
5716 capture: true
5717 }, inputOptions); // $FlowIgnore[method-unbinding]
5718
5719
5720 if (el.addEventListener) {
5721 el.addEventListener(event, handler, options);
5722 } else if (el.attachEvent) {
5723 el.attachEvent('on' + event, handler);
5724 } else {
5725 // $FlowIgnore: Doesn't think elements are indexable
5726 el['on' + event] = handler;
5727 }
5728 }
5729
5730 function removeEvent(el
5731 /*: ?Node*/
5732 , event
5733 /*: string*/
5734 , handler
5735 /*: Function*/
5736 , inputOptions
5737 /*: Object*/
5738 )
5739 /*: void*/
5740 {
5741 if (!el) return;
5742
5743 var options = _objectSpread({
5744 capture: true
5745 }, inputOptions); // $FlowIgnore[method-unbinding]
5746
5747
5748 if (el.removeEventListener) {
5749 el.removeEventListener(event, handler, options);
5750 } else if (el.detachEvent) {
5751 el.detachEvent('on' + event, handler);
5752 } else {
5753 // $FlowIgnore: Doesn't think elements are indexable
5754 el['on' + event] = null;
5755 }
5756 }
5757
5758 function outerHeight(node
5759 /*: HTMLElement*/
5760 )
5761 /*: number*/
5762 {
5763 // This is deliberately excluding margin for our calculations, since we are using
5764 // offsetTop which is including margin. See getBoundPosition
5765 var height = node.clientHeight;
5766 var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
5767 height += (0, _shims.int)(computedStyle.borderTopWidth);
5768 height += (0, _shims.int)(computedStyle.borderBottomWidth);
5769 return height;
5770 }
5771
5772 function outerWidth(node
5773 /*: HTMLElement*/
5774 )
5775 /*: number*/
5776 {
5777 // This is deliberately excluding margin for our calculations, since we are using
5778 // offsetLeft which is including margin. See getBoundPosition
5779 var width = node.clientWidth;
5780 var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
5781 width += (0, _shims.int)(computedStyle.borderLeftWidth);
5782 width += (0, _shims.int)(computedStyle.borderRightWidth);
5783 return width;
5784 }
5785
5786 function innerHeight(node
5787 /*: HTMLElement*/
5788 )
5789 /*: number*/
5790 {
5791 var height = node.clientHeight;
5792 var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
5793 height -= (0, _shims.int)(computedStyle.paddingTop);
5794 height -= (0, _shims.int)(computedStyle.paddingBottom);
5795 return height;
5796 }
5797
5798 function innerWidth(node
5799 /*: HTMLElement*/
5800 )
5801 /*: number*/
5802 {
5803 var width = node.clientWidth;
5804 var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
5805 width -= (0, _shims.int)(computedStyle.paddingLeft);
5806 width -= (0, _shims.int)(computedStyle.paddingRight);
5807 return width;
5808 }
5809 /*:: interface EventWithOffset {
5810 clientX: number, clientY: number
5811 }*/
5812
5813
5814 // Get from offsetParent
5815 function offsetXYFromParent(evt
5816 /*: EventWithOffset*/
5817 , offsetParent
5818 /*: HTMLElement*/
5819 , scale
5820 /*: number*/
5821 )
5822 /*: ControlPosition*/
5823 {
5824 var isBody = offsetParent === offsetParent.ownerDocument.body;
5825 var offsetParentRect = isBody ? {
5826 left: 0,
5827 top: 0
5828 } : offsetParent.getBoundingClientRect();
5829 var x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;
5830 var y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;
5831 return {
5832 x: x,
5833 y: y
5834 };
5835 }
5836
5837 function createCSSTransform(controlPos
5838 /*: ControlPosition*/
5839 , positionOffset
5840 /*: PositionOffsetControlPosition*/
5841 )
5842 /*: Object*/
5843 {
5844 var translation = getTranslation(controlPos, positionOffset, 'px');
5845 return _defineProperty({}, (0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default), translation);
5846 }
5847
5848 function createSVGTransform(controlPos
5849 /*: ControlPosition*/
5850 , positionOffset
5851 /*: PositionOffsetControlPosition*/
5852 )
5853 /*: string*/
5854 {
5855 var translation = getTranslation(controlPos, positionOffset, '');
5856 return translation;
5857 }
5858
5859 function getTranslation(_ref2, positionOffset
5860 /*: PositionOffsetControlPosition*/
5861 , unitSuffix
5862 /*: string*/
5863 )
5864 /*: string*/
5865 {
5866 var x = _ref2.x,
5867 y = _ref2.y;
5868 var translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y).concat(unitSuffix, ")");
5869
5870 if (positionOffset) {
5871 var defaultX = "".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix);
5872 var defaultY = "".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix);
5873 translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation;
5874 }
5875
5876 return translation;
5877 }
5878
5879 function getTouch(e
5880 /*: MouseTouchEvent*/
5881 , identifier
5882 /*: number*/
5883 )
5884 /*: ?{clientX: number, clientY: number}*/
5885 {
5886 return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, function (t) {
5887 return identifier === t.identifier;
5888 }) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, function (t) {
5889 return identifier === t.identifier;
5890 });
5891 }
5892
5893 function getTouchIdentifier(e
5894 /*: MouseTouchEvent*/
5895 )
5896 /*: ?number*/
5897 {
5898 if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;
5899 if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;
5900 } // User-select Hacks:
5901 //
5902 // Useful for preventing blue highlights all over everything when dragging.
5903 // Note we're passing `document` b/c we could be iframed
5904
5905
5906 function addUserSelectStyles(doc
5907 /*: ?Document*/
5908 ) {
5909 if (!doc) return;
5910 var styleEl = doc.getElementById('react-draggable-style-el');
5911
5912 if (!styleEl) {
5913 styleEl = doc.createElement('style');
5914 styleEl.type = 'text/css';
5915 styleEl.id = 'react-draggable-style-el';
5916 styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n';
5917 styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\n';
5918 doc.getElementsByTagName('head')[0].appendChild(styleEl);
5919 }
5920
5921 if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');
5922 }
5923
5924 function removeUserSelectStyles(doc
5925 /*: ?Document*/
5926 ) {
5927 if (!doc) return;
5928
5929 try {
5930 if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); // $FlowIgnore: IE
5931
5932 if (doc.selection) {
5933 // $FlowIgnore: IE
5934 doc.selection.empty();
5935 } else {
5936 // Remove selection caused by scroll, unless it's a focused input
5937 // (we use doc.defaultView in case we're in an iframe)
5938 var selection = (doc.defaultView || window).getSelection();
5939
5940 if (selection && selection.type !== 'Caret') {
5941 selection.removeAllRanges();
5942 }
5943 }
5944 } catch (e) {// probably IE
5945 }
5946 }
5947
5948 function addClassName(el
5949 /*: HTMLElement*/
5950 , className
5951 /*: string*/
5952 ) {
5953 if (el.classList) {
5954 el.classList.add(className);
5955 } else {
5956 if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) {
5957 el.className += " ".concat(className);
5958 }
5959 }
5960 }
5961
5962 function removeClassName(el
5963 /*: HTMLElement*/
5964 , className
5965 /*: string*/
5966 ) {
5967 if (el.classList) {
5968 el.classList.remove(className);
5969 } else {
5970 el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), 'g'), '');
5971 }
5972 }
5973
5974 /***/ }),
5975
5976 /***/ "../node_modules/react-draggable/build/cjs/utils/getPrefix.js":
5977 /*!********************************************************************!*\
5978 !*** ../node_modules/react-draggable/build/cjs/utils/getPrefix.js ***!
5979 \********************************************************************/
5980 /***/ ((__unused_webpack_module, exports) => {
5981
5982 "use strict";
5983
5984
5985 Object.defineProperty(exports, "__esModule", ({
5986 value: true
5987 }));
5988 exports.browserPrefixToKey = browserPrefixToKey;
5989 exports.browserPrefixToStyle = browserPrefixToStyle;
5990 exports["default"] = void 0;
5991 exports.getPrefix = getPrefix;
5992 var prefixes = ['Moz', 'Webkit', 'O', 'ms'];
5993
5994 function getPrefix()
5995 /*: string*/
5996 {
5997 var _window$document, _window$document$docu;
5998
5999 var prop
6000 /*: string*/
6001 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';
6002 // Ensure we're running in an environment where there is actually a global
6003 // `window` obj
6004 if (typeof window === 'undefined') return ''; // If we're in a pseudo-browser server-side environment, this access
6005 // path may not exist, so bail out if it doesn't.
6006
6007 var style = (_window$document = window.document) === null || _window$document === void 0 ? void 0 : (_window$document$docu = _window$document.documentElement) === null || _window$document$docu === void 0 ? void 0 : _window$document$docu.style;
6008 if (!style) return '';
6009 if (prop in style) return '';
6010
6011 for (var i = 0; i < prefixes.length; i++) {
6012 if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];
6013 }
6014
6015 return '';
6016 }
6017
6018 function browserPrefixToKey(prop
6019 /*: string*/
6020 , prefix
6021 /*: string*/
6022 )
6023 /*: string*/
6024 {
6025 return prefix ? "".concat(prefix).concat(kebabToTitleCase(prop)) : prop;
6026 }
6027
6028 function browserPrefixToStyle(prop
6029 /*: string*/
6030 , prefix
6031 /*: string*/
6032 )
6033 /*: string*/
6034 {
6035 return prefix ? "-".concat(prefix.toLowerCase(), "-").concat(prop) : prop;
6036 }
6037
6038 function kebabToTitleCase(str
6039 /*: string*/
6040 )
6041 /*: string*/
6042 {
6043 var out = '';
6044 var shouldCapitalize = true;
6045
6046 for (var i = 0; i < str.length; i++) {
6047 if (shouldCapitalize) {
6048 out += str[i].toUpperCase();
6049 shouldCapitalize = false;
6050 } else if (str[i] === '-') {
6051 shouldCapitalize = true;
6052 } else {
6053 out += str[i];
6054 }
6055 }
6056
6057 return out;
6058 } // Default export is the prefix itself, like 'Moz', 'Webkit', etc
6059 // Note that you may have to re-test for certain things; for instance, Chrome 50
6060 // can handle unprefixed `transform`, but not unprefixed `user-select`
6061
6062
6063 var _default = (getPrefix()
6064 /*: string*/
6065 );
6066
6067 exports["default"] = _default;
6068
6069 /***/ }),
6070
6071 /***/ "../node_modules/react-draggable/build/cjs/utils/log.js":
6072 /*!**************************************************************!*\
6073 !*** ../node_modules/react-draggable/build/cjs/utils/log.js ***!
6074 \**************************************************************/
6075 /***/ ((__unused_webpack_module, exports) => {
6076
6077 "use strict";
6078
6079
6080 Object.defineProperty(exports, "__esModule", ({
6081 value: true
6082 }));
6083 exports["default"] = log;
6084
6085 /*eslint no-console:0*/
6086 function log() {
6087 var _console;
6088
6089 if (false) {}
6090 }
6091
6092 /***/ }),
6093
6094 /***/ "../node_modules/react-draggable/build/cjs/utils/positionFns.js":
6095 /*!**********************************************************************!*\
6096 !*** ../node_modules/react-draggable/build/cjs/utils/positionFns.js ***!
6097 \**********************************************************************/
6098 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6099
6100 "use strict";
6101
6102
6103 Object.defineProperty(exports, "__esModule", ({
6104 value: true
6105 }));
6106 exports.canDragX = canDragX;
6107 exports.canDragY = canDragY;
6108 exports.createCoreData = createCoreData;
6109 exports.createDraggableData = createDraggableData;
6110 exports.getBoundPosition = getBoundPosition;
6111 exports.getControlPosition = getControlPosition;
6112 exports.snapToGrid = snapToGrid;
6113
6114 var _shims = __webpack_require__(/*! ./shims */ "../node_modules/react-draggable/build/cjs/utils/shims.js");
6115
6116 var _domFns = __webpack_require__(/*! ./domFns */ "../node_modules/react-draggable/build/cjs/utils/domFns.js");
6117
6118 function getBoundPosition(draggable
6119 /*: Draggable*/
6120 , x
6121 /*: number*/
6122 , y
6123 /*: number*/
6124 )
6125 /*: [number, number]*/
6126 {
6127 // If no bounds, short-circuit and move on
6128 if (!draggable.props.bounds) return [x, y]; // Clone new bounds
6129
6130 var bounds = draggable.props.bounds;
6131 bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);
6132 var node = findDOMNode(draggable);
6133
6134 if (typeof bounds === 'string') {
6135 var ownerDocument = node.ownerDocument;
6136 var ownerWindow = ownerDocument.defaultView;
6137 var boundNode;
6138
6139 if (bounds === 'parent') {
6140 boundNode = node.parentNode;
6141 } else {
6142 boundNode = ownerDocument.querySelector(bounds);
6143 }
6144
6145 if (!(boundNode instanceof ownerWindow.HTMLElement)) {
6146 throw new Error('Bounds selector "' + bounds + '" could not find an element.');
6147 }
6148
6149 var boundNodeEl
6150 /*: HTMLElement*/
6151 = boundNode; // for Flow, can't seem to refine correctly
6152
6153 var nodeStyle = ownerWindow.getComputedStyle(node);
6154 var boundNodeStyle = ownerWindow.getComputedStyle(boundNodeEl); // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.
6155
6156 bounds = {
6157 left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),
6158 top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),
6159 right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),
6160 bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)
6161 };
6162 } // Keep x and y below right and bottom limits...
6163
6164
6165 if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);
6166 if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom); // But above left and top limits.
6167
6168 if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);
6169 if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top);
6170 return [x, y];
6171 }
6172
6173 function snapToGrid(grid
6174 /*: [number, number]*/
6175 , pendingX
6176 /*: number*/
6177 , pendingY
6178 /*: number*/
6179 )
6180 /*: [number, number]*/
6181 {
6182 var x = Math.round(pendingX / grid[0]) * grid[0];
6183 var y = Math.round(pendingY / grid[1]) * grid[1];
6184 return [x, y];
6185 }
6186
6187 function canDragX(draggable
6188 /*: Draggable*/
6189 )
6190 /*: boolean*/
6191 {
6192 return draggable.props.axis === 'both' || draggable.props.axis === 'x';
6193 }
6194
6195 function canDragY(draggable
6196 /*: Draggable*/
6197 )
6198 /*: boolean*/
6199 {
6200 return draggable.props.axis === 'both' || draggable.props.axis === 'y';
6201 } // Get {x, y} positions from event.
6202
6203
6204 function getControlPosition(e
6205 /*: MouseTouchEvent*/
6206 , touchIdentifier
6207 /*: ?number*/
6208 , draggableCore
6209 /*: DraggableCore*/
6210 )
6211 /*: ?ControlPosition*/
6212 {
6213 var touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.getTouch)(e, touchIdentifier) : null;
6214 if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch
6215
6216 var node = findDOMNode(draggableCore); // User can provide an offsetParent if desired.
6217
6218 var offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;
6219 return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);
6220 } // Create an data object exposed by <DraggableCore>'s events
6221
6222
6223 function createCoreData(draggable
6224 /*: DraggableCore*/
6225 , x
6226 /*: number*/
6227 , y
6228 /*: number*/
6229 )
6230 /*: DraggableData*/
6231 {
6232 var state = draggable.state;
6233 var isStart = !(0, _shims.isNum)(state.lastX);
6234 var node = findDOMNode(draggable);
6235
6236 if (isStart) {
6237 // If this is our first move, use the x and y as last coords.
6238 return {
6239 node: node,
6240 deltaX: 0,
6241 deltaY: 0,
6242 lastX: x,
6243 lastY: y,
6244 x: x,
6245 y: y
6246 };
6247 } else {
6248 // Otherwise calculate proper values.
6249 return {
6250 node: node,
6251 deltaX: x - state.lastX,
6252 deltaY: y - state.lastY,
6253 lastX: state.lastX,
6254 lastY: state.lastY,
6255 x: x,
6256 y: y
6257 };
6258 }
6259 } // Create an data exposed by <Draggable>'s events
6260
6261
6262 function createDraggableData(draggable
6263 /*: Draggable*/
6264 , coreData
6265 /*: DraggableData*/
6266 )
6267 /*: DraggableData*/
6268 {
6269 var scale = draggable.props.scale;
6270 return {
6271 node: coreData.node,
6272 x: draggable.state.x + coreData.deltaX / scale,
6273 y: draggable.state.y + coreData.deltaY / scale,
6274 deltaX: coreData.deltaX / scale,
6275 deltaY: coreData.deltaY / scale,
6276 lastX: draggable.state.x,
6277 lastY: draggable.state.y
6278 };
6279 } // A lot faster than stringify/parse
6280
6281
6282 function cloneBounds(bounds
6283 /*: Bounds*/
6284 )
6285 /*: Bounds*/
6286 {
6287 return {
6288 left: bounds.left,
6289 top: bounds.top,
6290 right: bounds.right,
6291 bottom: bounds.bottom
6292 };
6293 }
6294
6295 function findDOMNode(draggable
6296 /*: Draggable | DraggableCore*/
6297 )
6298 /*: HTMLElement*/
6299 {
6300 var node = draggable.findDOMNode();
6301
6302 if (!node) {
6303 throw new Error('<DraggableCore>: Unmounted during event!');
6304 } // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME
6305
6306
6307 return node;
6308 }
6309
6310 /***/ }),
6311
6312 /***/ "../node_modules/react-draggable/build/cjs/utils/shims.js":
6313 /*!****************************************************************!*\
6314 !*** ../node_modules/react-draggable/build/cjs/utils/shims.js ***!
6315 \****************************************************************/
6316 /***/ ((__unused_webpack_module, exports) => {
6317
6318 "use strict";
6319
6320
6321 Object.defineProperty(exports, "__esModule", ({
6322 value: true
6323 }));
6324 exports.dontSetMe = dontSetMe;
6325 exports.findInArray = findInArray;
6326 exports.int = int;
6327 exports.isFunction = isFunction;
6328 exports.isNum = isNum;
6329
6330 // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc
6331 function findInArray(array
6332 /*: Array<any> | TouchList*/
6333 , callback
6334 /*: Function*/
6335 )
6336 /*: any*/
6337 {
6338 for (var i = 0, length = array.length; i < length; i++) {
6339 if (callback.apply(callback, [array[i], i, array])) return array[i];
6340 }
6341 }
6342
6343 function isFunction(func
6344 /*: any*/
6345 )
6346 /*: boolean %checks*/
6347 {
6348 // $FlowIgnore[method-unbinding]
6349 return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';
6350 }
6351
6352 function isNum(num
6353 /*: any*/
6354 )
6355 /*: boolean %checks*/
6356 {
6357 return typeof num === 'number' && !isNaN(num);
6358 }
6359
6360 function int(a
6361 /*: string*/
6362 )
6363 /*: number*/
6364 {
6365 return parseInt(a, 10);
6366 }
6367
6368 function dontSetMe(props
6369 /*: Object*/
6370 , propName
6371 /*: string*/
6372 , componentName
6373 /*: string*/
6374 )
6375 /*: ?Error*/
6376 {
6377 if (props[propName]) {
6378 return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child."));
6379 }
6380 }
6381
6382 /***/ }),
6383
6384 /***/ "../node_modules/react-is/cjs/react-is.development.js":
6385 /*!************************************************************!*\
6386 !*** ../node_modules/react-is/cjs/react-is.development.js ***!
6387 \************************************************************/
6388 /***/ ((__unused_webpack_module, exports) => {
6389
6390 "use strict";
6391 /**
6392 * @license React
6393 * react-is.development.js
6394 *
6395 * Copyright (c) Facebook, Inc. and its affiliates.
6396 *
6397 * This source code is licensed under the MIT license found in the
6398 * LICENSE file in the root directory of this source tree.
6399 */
6400
6401
6402
6403 if (true) {
6404 (function() {
6405 'use strict';
6406
6407 // ATTENTION
6408 // When adding new symbols to this file,
6409 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
6410 // The Symbol used to tag the ReactElement-like types.
6411 var REACT_ELEMENT_TYPE = Symbol.for('react.element');
6412 var REACT_PORTAL_TYPE = Symbol.for('react.portal');
6413 var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
6414 var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
6415 var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
6416 var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
6417 var REACT_CONTEXT_TYPE = Symbol.for('react.context');
6418 var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
6419 var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
6420 var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
6421 var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
6422 var REACT_MEMO_TYPE = Symbol.for('react.memo');
6423 var REACT_LAZY_TYPE = Symbol.for('react.lazy');
6424 var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
6425
6426 // -----------------------------------------------------------------------------
6427
6428 var enableScopeAPI = false; // Experimental Create Event Handle API.
6429 var enableCacheElement = false;
6430 var enableTransitionTracing = false; // No known bugs, but needs performance testing
6431
6432 var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
6433 // stuff. Intended to enable React core members to more easily debug scheduling
6434 // issues in DEV builds.
6435
6436 var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
6437
6438 var REACT_MODULE_REFERENCE;
6439
6440 {
6441 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
6442 }
6443
6444 function isValidElementType(type) {
6445 if (typeof type === 'string' || typeof type === 'function') {
6446 return true;
6447 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
6448
6449
6450 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
6451 return true;
6452 }
6453
6454 if (typeof type === 'object' && type !== null) {
6455 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 || // This needs to include all possible module reference object
6456 // types supported by any Flight configuration anywhere since
6457 // we don't know which Flight build this will end up being used
6458 // with.
6459 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
6460 return true;
6461 }
6462 }
6463
6464 return false;
6465 }
6466
6467 function typeOf(object) {
6468 if (typeof object === 'object' && object !== null) {
6469 var $$typeof = object.$$typeof;
6470
6471 switch ($$typeof) {
6472 case REACT_ELEMENT_TYPE:
6473 var type = object.type;
6474
6475 switch (type) {
6476 case REACT_FRAGMENT_TYPE:
6477 case REACT_PROFILER_TYPE:
6478 case REACT_STRICT_MODE_TYPE:
6479 case REACT_SUSPENSE_TYPE:
6480 case REACT_SUSPENSE_LIST_TYPE:
6481 return type;
6482
6483 default:
6484 var $$typeofType = type && type.$$typeof;
6485
6486 switch ($$typeofType) {
6487 case REACT_SERVER_CONTEXT_TYPE:
6488 case REACT_CONTEXT_TYPE:
6489 case REACT_FORWARD_REF_TYPE:
6490 case REACT_LAZY_TYPE:
6491 case REACT_MEMO_TYPE:
6492 case REACT_PROVIDER_TYPE:
6493 return $$typeofType;
6494
6495 default:
6496 return $$typeof;
6497 }
6498
6499 }
6500
6501 case REACT_PORTAL_TYPE:
6502 return $$typeof;
6503 }
6504 }
6505
6506 return undefined;
6507 }
6508 var ContextConsumer = REACT_CONTEXT_TYPE;
6509 var ContextProvider = REACT_PROVIDER_TYPE;
6510 var Element = REACT_ELEMENT_TYPE;
6511 var ForwardRef = REACT_FORWARD_REF_TYPE;
6512 var Fragment = REACT_FRAGMENT_TYPE;
6513 var Lazy = REACT_LAZY_TYPE;
6514 var Memo = REACT_MEMO_TYPE;
6515 var Portal = REACT_PORTAL_TYPE;
6516 var Profiler = REACT_PROFILER_TYPE;
6517 var StrictMode = REACT_STRICT_MODE_TYPE;
6518 var Suspense = REACT_SUSPENSE_TYPE;
6519 var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
6520 var hasWarnedAboutDeprecatedIsAsyncMode = false;
6521 var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
6522
6523 function isAsyncMode(object) {
6524 {
6525 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
6526 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
6527
6528 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
6529 }
6530 }
6531
6532 return false;
6533 }
6534 function isConcurrentMode(object) {
6535 {
6536 if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
6537 hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
6538
6539 console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
6540 }
6541 }
6542
6543 return false;
6544 }
6545 function isContextConsumer(object) {
6546 return typeOf(object) === REACT_CONTEXT_TYPE;
6547 }
6548 function isContextProvider(object) {
6549 return typeOf(object) === REACT_PROVIDER_TYPE;
6550 }
6551 function isElement(object) {
6552 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
6553 }
6554 function isForwardRef(object) {
6555 return typeOf(object) === REACT_FORWARD_REF_TYPE;
6556 }
6557 function isFragment(object) {
6558 return typeOf(object) === REACT_FRAGMENT_TYPE;
6559 }
6560 function isLazy(object) {
6561 return typeOf(object) === REACT_LAZY_TYPE;
6562 }
6563 function isMemo(object) {
6564 return typeOf(object) === REACT_MEMO_TYPE;
6565 }
6566 function isPortal(object) {
6567 return typeOf(object) === REACT_PORTAL_TYPE;
6568 }
6569 function isProfiler(object) {
6570 return typeOf(object) === REACT_PROFILER_TYPE;
6571 }
6572 function isStrictMode(object) {
6573 return typeOf(object) === REACT_STRICT_MODE_TYPE;
6574 }
6575 function isSuspense(object) {
6576 return typeOf(object) === REACT_SUSPENSE_TYPE;
6577 }
6578 function isSuspenseList(object) {
6579 return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
6580 }
6581
6582 exports.ContextConsumer = ContextConsumer;
6583 exports.ContextProvider = ContextProvider;
6584 exports.Element = Element;
6585 exports.ForwardRef = ForwardRef;
6586 exports.Fragment = Fragment;
6587 exports.Lazy = Lazy;
6588 exports.Memo = Memo;
6589 exports.Portal = Portal;
6590 exports.Profiler = Profiler;
6591 exports.StrictMode = StrictMode;
6592 exports.Suspense = Suspense;
6593 exports.SuspenseList = SuspenseList;
6594 exports.isAsyncMode = isAsyncMode;
6595 exports.isConcurrentMode = isConcurrentMode;
6596 exports.isContextConsumer = isContextConsumer;
6597 exports.isContextProvider = isContextProvider;
6598 exports.isElement = isElement;
6599 exports.isForwardRef = isForwardRef;
6600 exports.isFragment = isFragment;
6601 exports.isLazy = isLazy;
6602 exports.isMemo = isMemo;
6603 exports.isPortal = isPortal;
6604 exports.isProfiler = isProfiler;
6605 exports.isStrictMode = isStrictMode;
6606 exports.isSuspense = isSuspense;
6607 exports.isSuspenseList = isSuspenseList;
6608 exports.isValidElementType = isValidElementType;
6609 exports.typeOf = typeOf;
6610 })();
6611 }
6612
6613
6614 /***/ }),
6615
6616 /***/ "../node_modules/react-is/index.js":
6617 /*!*****************************************!*\
6618 !*** ../node_modules/react-is/index.js ***!
6619 \*****************************************/
6620 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6621
6622 "use strict";
6623
6624
6625 if (false) {} else {
6626 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/react-is/cjs/react-is.development.js");
6627 }
6628
6629
6630 /***/ }),
6631
6632 /***/ "../node_modules/style-to-object/index.js":
6633 /*!************************************************!*\
6634 !*** ../node_modules/style-to-object/index.js ***!
6635 \************************************************/
6636 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6637
6638 var parse = __webpack_require__(/*! inline-style-parser */ "../node_modules/inline-style-parser/index.js");
6639
6640 /**
6641 * Parses inline style to object.
6642 *
6643 * @example
6644 * // returns { 'line-height': '42' }
6645 * StyleToObject('line-height: 42;');
6646 *
6647 * @param {String} style - The inline style.
6648 * @param {Function} [iterator] - The iterator function.
6649 * @return {null|Object}
6650 */
6651 function StyleToObject(style, iterator) {
6652 var output = null;
6653 if (!style || typeof style !== 'string') {
6654 return output;
6655 }
6656
6657 var declaration;
6658 var declarations = parse(style);
6659 var hasIterator = typeof iterator === 'function';
6660 var property;
6661 var value;
6662
6663 for (var i = 0, len = declarations.length; i < len; i++) {
6664 declaration = declarations[i];
6665 property = declaration.property;
6666 value = declaration.value;
6667
6668 if (hasIterator) {
6669 iterator(property, value, declaration);
6670 } else if (value) {
6671 output || (output = {});
6672 output[property] = value;
6673 }
6674 }
6675
6676 return output;
6677 }
6678
6679 module.exports = StyleToObject;
6680 module.exports["default"] = StyleToObject; // ESM support
6681
6682
6683 /***/ }),
6684
6685 /***/ "react":
6686 /*!************************!*\
6687 !*** external "React" ***!
6688 \************************/
6689 /***/ ((module) => {
6690
6691 "use strict";
6692 module.exports = React;
6693
6694 /***/ }),
6695
6696 /***/ "react-dom":
6697 /*!***************************!*\
6698 !*** external "ReactDOM" ***!
6699 \***************************/
6700 /***/ ((module) => {
6701
6702 "use strict";
6703 module.exports = ReactDOM;
6704
6705 /***/ }),
6706
6707 /***/ "@elementor/icons":
6708 /*!******************************************************!*\
6709 !*** external "__UNSTABLE__elementorPackages.icons" ***!
6710 \******************************************************/
6711 /***/ ((module) => {
6712
6713 "use strict";
6714 module.exports = __UNSTABLE__elementorPackages.icons;
6715
6716 /***/ }),
6717
6718 /***/ "@elementor/ui":
6719 /*!***************************************************!*\
6720 !*** external "__UNSTABLE__elementorPackages.ui" ***!
6721 \***************************************************/
6722 /***/ ((module) => {
6723
6724 "use strict";
6725 module.exports = __UNSTABLE__elementorPackages.ui;
6726
6727 /***/ }),
6728
6729 /***/ "@wordpress/i18n":
6730 /*!**************************!*\
6731 !*** external "wp.i18n" ***!
6732 \**************************/
6733 /***/ ((module) => {
6734
6735 "use strict";
6736 module.exports = wp.i18n;
6737
6738 /***/ }),
6739
6740 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
6741 /*!******************************************************************!*\
6742 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
6743 \******************************************************************/
6744 /***/ ((module) => {
6745
6746 function _arrayLikeToArray(arr, len) {
6747 if (len == null || len > arr.length) len = arr.length;
6748 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
6749 return arr2;
6750 }
6751 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
6752
6753 /***/ }),
6754
6755 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
6756 /*!****************************************************************!*\
6757 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
6758 \****************************************************************/
6759 /***/ ((module) => {
6760
6761 function _arrayWithHoles(arr) {
6762 if (Array.isArray(arr)) return arr;
6763 }
6764 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
6765
6766 /***/ }),
6767
6768 /***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
6769 /*!******************************************************************!*\
6770 !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
6771 \******************************************************************/
6772 /***/ ((module) => {
6773
6774 function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
6775 try {
6776 var info = gen[key](arg);
6777 var value = info.value;
6778 } catch (error) {
6779 reject(error);
6780 return;
6781 }
6782 if (info.done) {
6783 resolve(value);
6784 } else {
6785 Promise.resolve(value).then(_next, _throw);
6786 }
6787 }
6788 function _asyncToGenerator(fn) {
6789 return function () {
6790 var self = this,
6791 args = arguments;
6792 return new Promise(function (resolve, reject) {
6793 var gen = fn.apply(self, args);
6794 function _next(value) {
6795 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
6796 }
6797 function _throw(err) {
6798 asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
6799 }
6800 _next(undefined);
6801 });
6802 };
6803 }
6804 module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
6805
6806 /***/ }),
6807
6808 /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
6809 /*!****************************************************************!*\
6810 !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
6811 \****************************************************************/
6812 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6813
6814 var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
6815 function _defineProperty(obj, key, value) {
6816 key = toPropertyKey(key);
6817 if (key in obj) {
6818 Object.defineProperty(obj, key, {
6819 value: value,
6820 enumerable: true,
6821 configurable: true,
6822 writable: true
6823 });
6824 } else {
6825 obj[key] = value;
6826 }
6827 return obj;
6828 }
6829 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
6830
6831 /***/ }),
6832
6833 /***/ "../node_modules/@babel/runtime/helpers/extends.js":
6834 /*!*********************************************************!*\
6835 !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
6836 \*********************************************************/
6837 /***/ ((module) => {
6838
6839 function _extends() {
6840 module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
6841 for (var i = 1; i < arguments.length; i++) {
6842 var source = arguments[i];
6843 for (var key in source) {
6844 if (Object.prototype.hasOwnProperty.call(source, key)) {
6845 target[key] = source[key];
6846 }
6847 }
6848 }
6849 return target;
6850 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
6851 return _extends.apply(this, arguments);
6852 }
6853 module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
6854
6855 /***/ }),
6856
6857 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
6858 /*!***********************************************************************!*\
6859 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
6860 \***********************************************************************/
6861 /***/ ((module) => {
6862
6863 function _interopRequireDefault(obj) {
6864 return obj && obj.__esModule ? obj : {
6865 "default": obj
6866 };
6867 }
6868 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
6869
6870 /***/ }),
6871
6872 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
6873 /*!**********************************************************************!*\
6874 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
6875 \**********************************************************************/
6876 /***/ ((module) => {
6877
6878 function _iterableToArrayLimit(arr, i) {
6879 var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
6880 if (null != _i) {
6881 var _s,
6882 _e,
6883 _x,
6884 _r,
6885 _arr = [],
6886 _n = !0,
6887 _d = !1;
6888 try {
6889 if (_x = (_i = _i.call(arr)).next, 0 === i) {
6890 if (Object(_i) !== _i) return;
6891 _n = !1;
6892 } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
6893 } catch (err) {
6894 _d = !0, _e = err;
6895 } finally {
6896 try {
6897 if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
6898 } finally {
6899 if (_d) throw _e;
6900 }
6901 }
6902 return _arr;
6903 }
6904 }
6905 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
6906
6907 /***/ }),
6908
6909 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
6910 /*!*****************************************************************!*\
6911 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
6912 \*****************************************************************/
6913 /***/ ((module) => {
6914
6915 function _nonIterableRest() {
6916 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6917 }
6918 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
6919
6920 /***/ }),
6921
6922 /***/ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js":
6923 /*!*************************************************************************!*\
6924 !*** ../node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
6925 \*************************************************************************/
6926 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6927
6928 var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js");
6929 function _objectWithoutProperties(source, excluded) {
6930 if (source == null) return {};
6931 var target = objectWithoutPropertiesLoose(source, excluded);
6932 var key, i;
6933 if (Object.getOwnPropertySymbols) {
6934 var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
6935 for (i = 0; i < sourceSymbolKeys.length; i++) {
6936 key = sourceSymbolKeys[i];
6937 if (excluded.indexOf(key) >= 0) continue;
6938 if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
6939 target[key] = source[key];
6940 }
6941 }
6942 return target;
6943 }
6944 module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
6945
6946 /***/ }),
6947
6948 /***/ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":
6949 /*!******************************************************************************!*\
6950 !*** ../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
6951 \******************************************************************************/
6952 /***/ ((module) => {
6953
6954 function _objectWithoutPropertiesLoose(source, excluded) {
6955 if (source == null) return {};
6956 var target = {};
6957 var sourceKeys = Object.keys(source);
6958 var key, i;
6959 for (i = 0; i < sourceKeys.length; i++) {
6960 key = sourceKeys[i];
6961 if (excluded.indexOf(key) >= 0) continue;
6962 target[key] = source[key];
6963 }
6964 return target;
6965 }
6966 module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
6967
6968 /***/ }),
6969
6970 /***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
6971 /*!********************************************************************!*\
6972 !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
6973 \********************************************************************/
6974 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6975
6976 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
6977 function _regeneratorRuntime() {
6978 "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
6979 module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
6980 return exports;
6981 }, module.exports.__esModule = true, module.exports["default"] = module.exports;
6982 var exports = {},
6983 Op = Object.prototype,
6984 hasOwn = Op.hasOwnProperty,
6985 defineProperty = Object.defineProperty || function (obj, key, desc) {
6986 obj[key] = desc.value;
6987 },
6988 $Symbol = "function" == typeof Symbol ? Symbol : {},
6989 iteratorSymbol = $Symbol.iterator || "@@iterator",
6990 asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
6991 toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
6992 function define(obj, key, value) {
6993 return Object.defineProperty(obj, key, {
6994 value: value,
6995 enumerable: !0,
6996 configurable: !0,
6997 writable: !0
6998 }), obj[key];
6999 }
7000 try {
7001 define({}, "");
7002 } catch (err) {
7003 define = function define(obj, key, value) {
7004 return obj[key] = value;
7005 };
7006 }
7007 function wrap(innerFn, outerFn, self, tryLocsList) {
7008 var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
7009 generator = Object.create(protoGenerator.prototype),
7010 context = new Context(tryLocsList || []);
7011 return defineProperty(generator, "_invoke", {
7012 value: makeInvokeMethod(innerFn, self, context)
7013 }), generator;
7014 }
7015 function tryCatch(fn, obj, arg) {
7016 try {
7017 return {
7018 type: "normal",
7019 arg: fn.call(obj, arg)
7020 };
7021 } catch (err) {
7022 return {
7023 type: "throw",
7024 arg: err
7025 };
7026 }
7027 }
7028 exports.wrap = wrap;
7029 var ContinueSentinel = {};
7030 function Generator() {}
7031 function GeneratorFunction() {}
7032 function GeneratorFunctionPrototype() {}
7033 var IteratorPrototype = {};
7034 define(IteratorPrototype, iteratorSymbol, function () {
7035 return this;
7036 });
7037 var getProto = Object.getPrototypeOf,
7038 NativeIteratorPrototype = getProto && getProto(getProto(values([])));
7039 NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
7040 var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
7041 function defineIteratorMethods(prototype) {
7042 ["next", "throw", "return"].forEach(function (method) {
7043 define(prototype, method, function (arg) {
7044 return this._invoke(method, arg);
7045 });
7046 });
7047 }
7048 function AsyncIterator(generator, PromiseImpl) {
7049 function invoke(method, arg, resolve, reject) {
7050 var record = tryCatch(generator[method], generator, arg);
7051 if ("throw" !== record.type) {
7052 var result = record.arg,
7053 value = result.value;
7054 return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
7055 invoke("next", value, resolve, reject);
7056 }, function (err) {
7057 invoke("throw", err, resolve, reject);
7058 }) : PromiseImpl.resolve(value).then(function (unwrapped) {
7059 result.value = unwrapped, resolve(result);
7060 }, function (error) {
7061 return invoke("throw", error, resolve, reject);
7062 });
7063 }
7064 reject(record.arg);
7065 }
7066 var previousPromise;
7067 defineProperty(this, "_invoke", {
7068 value: function value(method, arg) {
7069 function callInvokeWithMethodAndArg() {
7070 return new PromiseImpl(function (resolve, reject) {
7071 invoke(method, arg, resolve, reject);
7072 });
7073 }
7074 return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
7075 }
7076 });
7077 }
7078 function makeInvokeMethod(innerFn, self, context) {
7079 var state = "suspendedStart";
7080 return function (method, arg) {
7081 if ("executing" === state) throw new Error("Generator is already running");
7082 if ("completed" === state) {
7083 if ("throw" === method) throw arg;
7084 return doneResult();
7085 }
7086 for (context.method = method, context.arg = arg;;) {
7087 var delegate = context.delegate;
7088 if (delegate) {
7089 var delegateResult = maybeInvokeDelegate(delegate, context);
7090 if (delegateResult) {
7091 if (delegateResult === ContinueSentinel) continue;
7092 return delegateResult;
7093 }
7094 }
7095 if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
7096 if ("suspendedStart" === state) throw state = "completed", context.arg;
7097 context.dispatchException(context.arg);
7098 } else "return" === context.method && context.abrupt("return", context.arg);
7099 state = "executing";
7100 var record = tryCatch(innerFn, self, context);
7101 if ("normal" === record.type) {
7102 if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
7103 return {
7104 value: record.arg,
7105 done: context.done
7106 };
7107 }
7108 "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
7109 }
7110 };
7111 }
7112 function maybeInvokeDelegate(delegate, context) {
7113 var methodName = context.method,
7114 method = delegate.iterator[methodName];
7115 if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
7116 var record = tryCatch(method, delegate.iterator, context.arg);
7117 if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
7118 var info = record.arg;
7119 return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
7120 }
7121 function pushTryEntry(locs) {
7122 var entry = {
7123 tryLoc: locs[0]
7124 };
7125 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
7126 }
7127 function resetTryEntry(entry) {
7128 var record = entry.completion || {};
7129 record.type = "normal", delete record.arg, entry.completion = record;
7130 }
7131 function Context(tryLocsList) {
7132 this.tryEntries = [{
7133 tryLoc: "root"
7134 }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
7135 }
7136 function values(iterable) {
7137 if (iterable) {
7138 var iteratorMethod = iterable[iteratorSymbol];
7139 if (iteratorMethod) return iteratorMethod.call(iterable);
7140 if ("function" == typeof iterable.next) return iterable;
7141 if (!isNaN(iterable.length)) {
7142 var i = -1,
7143 next = function next() {
7144 for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
7145 return next.value = undefined, next.done = !0, next;
7146 };
7147 return next.next = next;
7148 }
7149 }
7150 return {
7151 next: doneResult
7152 };
7153 }
7154 function doneResult() {
7155 return {
7156 value: undefined,
7157 done: !0
7158 };
7159 }
7160 return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
7161 value: GeneratorFunctionPrototype,
7162 configurable: !0
7163 }), defineProperty(GeneratorFunctionPrototype, "constructor", {
7164 value: GeneratorFunction,
7165 configurable: !0
7166 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
7167 var ctor = "function" == typeof genFun && genFun.constructor;
7168 return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
7169 }, exports.mark = function (genFun) {
7170 return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
7171 }, exports.awrap = function (arg) {
7172 return {
7173 __await: arg
7174 };
7175 }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
7176 return this;
7177 }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
7178 void 0 === PromiseImpl && (PromiseImpl = Promise);
7179 var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
7180 return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
7181 return result.done ? result.value : iter.next();
7182 });
7183 }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
7184 return this;
7185 }), define(Gp, "toString", function () {
7186 return "[object Generator]";
7187 }), exports.keys = function (val) {
7188 var object = Object(val),
7189 keys = [];
7190 for (var key in object) keys.push(key);
7191 return keys.reverse(), function next() {
7192 for (; keys.length;) {
7193 var key = keys.pop();
7194 if (key in object) return next.value = key, next.done = !1, next;
7195 }
7196 return next.done = !0, next;
7197 };
7198 }, exports.values = values, Context.prototype = {
7199 constructor: Context,
7200 reset: function reset(skipTempReset) {
7201 if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
7202 },
7203 stop: function stop() {
7204 this.done = !0;
7205 var rootRecord = this.tryEntries[0].completion;
7206 if ("throw" === rootRecord.type) throw rootRecord.arg;
7207 return this.rval;
7208 },
7209 dispatchException: function dispatchException(exception) {
7210 if (this.done) throw exception;
7211 var context = this;
7212 function handle(loc, caught) {
7213 return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
7214 }
7215 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
7216 var entry = this.tryEntries[i],
7217 record = entry.completion;
7218 if ("root" === entry.tryLoc) return handle("end");
7219 if (entry.tryLoc <= this.prev) {
7220 var hasCatch = hasOwn.call(entry, "catchLoc"),
7221 hasFinally = hasOwn.call(entry, "finallyLoc");
7222 if (hasCatch && hasFinally) {
7223 if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
7224 if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
7225 } else if (hasCatch) {
7226 if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
7227 } else {
7228 if (!hasFinally) throw new Error("try statement without catch or finally");
7229 if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
7230 }
7231 }
7232 }
7233 },
7234 abrupt: function abrupt(type, arg) {
7235 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
7236 var entry = this.tryEntries[i];
7237 if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
7238 var finallyEntry = entry;
7239 break;
7240 }
7241 }
7242 finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
7243 var record = finallyEntry ? finallyEntry.completion : {};
7244 return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
7245 },
7246 complete: function complete(record, afterLoc) {
7247 if ("throw" === record.type) throw record.arg;
7248 return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
7249 },
7250 finish: function finish(finallyLoc) {
7251 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
7252 var entry = this.tryEntries[i];
7253 if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
7254 }
7255 },
7256 "catch": function _catch(tryLoc) {
7257 for (var i = this.tryEntries.length - 1; i >= 0; --i) {
7258 var entry = this.tryEntries[i];
7259 if (entry.tryLoc === tryLoc) {
7260 var record = entry.completion;
7261 if ("throw" === record.type) {
7262 var thrown = record.arg;
7263 resetTryEntry(entry);
7264 }
7265 return thrown;
7266 }
7267 }
7268 throw new Error("illegal catch attempt");
7269 },
7270 delegateYield: function delegateYield(iterable, resultName, nextLoc) {
7271 return this.delegate = {
7272 iterator: values(iterable),
7273 resultName: resultName,
7274 nextLoc: nextLoc
7275 }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
7276 }
7277 }, exports;
7278 }
7279 module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
7280
7281 /***/ }),
7282
7283 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
7284 /*!***************************************************************!*\
7285 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
7286 \***************************************************************/
7287 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7288
7289 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
7290 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
7291 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
7292 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
7293 function _slicedToArray(arr, i) {
7294 return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
7295 }
7296 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
7297
7298 /***/ }),
7299
7300 /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
7301 /*!*************************************************************!*\
7302 !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
7303 \*************************************************************/
7304 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7305
7306 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
7307 function _toPrimitive(input, hint) {
7308 if (_typeof(input) !== "object" || input === null) return input;
7309 var prim = input[Symbol.toPrimitive];
7310 if (prim !== undefined) {
7311 var res = prim.call(input, hint || "default");
7312 if (_typeof(res) !== "object") return res;
7313 throw new TypeError("@@toPrimitive must return a primitive value.");
7314 }
7315 return (hint === "string" ? String : Number)(input);
7316 }
7317 module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
7318
7319 /***/ }),
7320
7321 /***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
7322 /*!***************************************************************!*\
7323 !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
7324 \***************************************************************/
7325 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7326
7327 var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
7328 var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
7329 function _toPropertyKey(arg) {
7330 var key = toPrimitive(arg, "string");
7331 return _typeof(key) === "symbol" ? key : String(key);
7332 }
7333 module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
7334
7335 /***/ }),
7336
7337 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
7338 /*!********************************************************!*\
7339 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
7340 \********************************************************/
7341 /***/ ((module) => {
7342
7343 function _typeof(obj) {
7344 "@babel/helpers - typeof";
7345
7346 return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
7347 return typeof obj;
7348 } : function (obj) {
7349 return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
7350 }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
7351 }
7352 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
7353
7354 /***/ }),
7355
7356 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
7357 /*!****************************************************************************!*\
7358 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
7359 \****************************************************************************/
7360 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7361
7362 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
7363 function _unsupportedIterableToArray(o, minLen) {
7364 if (!o) return;
7365 if (typeof o === "string") return arrayLikeToArray(o, minLen);
7366 var n = Object.prototype.toString.call(o).slice(8, -1);
7367 if (n === "Object" && o.constructor) n = o.constructor.name;
7368 if (n === "Map" || n === "Set") return Array.from(o);
7369 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
7370 }
7371 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
7372
7373 /***/ }),
7374
7375 /***/ "../node_modules/@babel/runtime/regenerator/index.js":
7376 /*!***********************************************************!*\
7377 !*** ../node_modules/@babel/runtime/regenerator/index.js ***!
7378 \***********************************************************/
7379 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7380
7381 // TODO(Babel 8): Remove this file.
7382
7383 var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();
7384 module.exports = runtime;
7385
7386 // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
7387 try {
7388 regeneratorRuntime = runtime;
7389 } catch (accidentalStrictMode) {
7390 if (typeof globalThis === "object") {
7391 globalThis.regeneratorRuntime = runtime;
7392 } else {
7393 Function("r", "regeneratorRuntime = r")(runtime);
7394 }
7395 }
7396
7397
7398 /***/ }),
7399
7400 /***/ "../node_modules/bail/index.js":
7401 /*!*************************************!*\
7402 !*** ../node_modules/bail/index.js ***!
7403 \*************************************/
7404 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7405
7406 "use strict";
7407 __webpack_require__.r(__webpack_exports__);
7408 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7409 /* harmony export */ "bail": () => (/* binding */ bail)
7410 /* harmony export */ });
7411 /**
7412 * Throw a given error.
7413 *
7414 * @param {Error|null|undefined} [error]
7415 * Maybe error.
7416 * @returns {asserts error is null|undefined}
7417 */
7418 function bail(error) {
7419 if (error) {
7420 throw error
7421 }
7422 }
7423
7424
7425 /***/ }),
7426
7427 /***/ "../node_modules/comma-separated-tokens/index.js":
7428 /*!*******************************************************!*\
7429 !*** ../node_modules/comma-separated-tokens/index.js ***!
7430 \*******************************************************/
7431 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7432
7433 "use strict";
7434 __webpack_require__.r(__webpack_exports__);
7435 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7436 /* harmony export */ "parse": () => (/* binding */ parse),
7437 /* harmony export */ "stringify": () => (/* binding */ stringify)
7438 /* harmony export */ });
7439 /**
7440 * @typedef Options
7441 * Configuration for `stringify`.
7442 * @property {boolean} [padLeft=true]
7443 * Whether to pad a space before a token.
7444 * @property {boolean} [padRight=false]
7445 * Whether to pad a space after a token.
7446 */
7447
7448 /**
7449 * @typedef {Options} StringifyOptions
7450 * Please use `StringifyOptions` instead.
7451 */
7452
7453 /**
7454 * Parse comma-separated tokens to an array.
7455 *
7456 * @param {string} value
7457 * Comma-separated tokens.
7458 * @returns {Array<string>}
7459 * List of tokens.
7460 */
7461 function parse(value) {
7462 /** @type {Array<string>} */
7463 const tokens = []
7464 const input = String(value || '')
7465 let index = input.indexOf(',')
7466 let start = 0
7467 /** @type {boolean} */
7468 let end = false
7469
7470 while (!end) {
7471 if (index === -1) {
7472 index = input.length
7473 end = true
7474 }
7475
7476 const token = input.slice(start, index).trim()
7477
7478 if (token || !end) {
7479 tokens.push(token)
7480 }
7481
7482 start = index + 1
7483 index = input.indexOf(',', start)
7484 }
7485
7486 return tokens
7487 }
7488
7489 /**
7490 * Serialize an array of strings or numbers to comma-separated tokens.
7491 *
7492 * @param {Array<string|number>} values
7493 * List of tokens.
7494 * @param {Options} [options]
7495 * Configuration for `stringify` (optional).
7496 * @returns {string}
7497 * Comma-separated tokens.
7498 */
7499 function stringify(values, options) {
7500 const settings = options || {}
7501
7502 // Ensure the last empty entry is seen.
7503 const input = values[values.length - 1] === '' ? [...values, ''] : values
7504
7505 return input
7506 .join(
7507 (settings.padRight ? ' ' : '') +
7508 ',' +
7509 (settings.padLeft === false ? '' : ' ')
7510 )
7511 .trim()
7512 }
7513
7514
7515 /***/ }),
7516
7517 /***/ "../node_modules/decode-named-character-reference/index.dom.js":
7518 /*!*********************************************************************!*\
7519 !*** ../node_modules/decode-named-character-reference/index.dom.js ***!
7520 \*********************************************************************/
7521 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7522
7523 "use strict";
7524 __webpack_require__.r(__webpack_exports__);
7525 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7526 /* harmony export */ "decodeNamedCharacterReference": () => (/* binding */ decodeNamedCharacterReference)
7527 /* harmony export */ });
7528 /// <reference lib="dom" />
7529
7530 /* eslint-env browser */
7531
7532 const element = document.createElement('i')
7533
7534 /**
7535 * @param {string} value
7536 * @returns {string|false}
7537 */
7538 function decodeNamedCharacterReference(value) {
7539 const characterReference = '&' + value + ';'
7540 element.innerHTML = characterReference
7541 const char = element.textContent
7542
7543 // Some named character references do not require the closing semicolon
7544 // (`&not`, for instance), which leads to situations where parsing the assumed
7545 // named reference of `&notit;` will result in the string `¬it;`.
7546 // When we encounter a trailing semicolon after parsing, and the character
7547 // reference to decode was not a semicolon (`&semi;`), we can assume that the
7548 // matching was not complete.
7549 // @ts-expect-error: TypeScript is wrong that `textContent` on elements can
7550 // yield `null`.
7551 if (char.charCodeAt(char.length - 1) === 59 /* `;` */ && value !== 'semi') {
7552 return false
7553 }
7554
7555 // If the decoded string is equal to the input, the character reference was
7556 // not valid.
7557 // @ts-expect-error: TypeScript is wrong that `textContent` on elements can
7558 // yield `null`.
7559 return char === characterReference ? false : char
7560 }
7561
7562
7563 /***/ }),
7564
7565 /***/ "../node_modules/dequal/dist/index.mjs":
7566 /*!*********************************************!*\
7567 !*** ../node_modules/dequal/dist/index.mjs ***!
7568 \*********************************************/
7569 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7570
7571 "use strict";
7572 __webpack_require__.r(__webpack_exports__);
7573 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7574 /* harmony export */ "dequal": () => (/* binding */ dequal)
7575 /* harmony export */ });
7576 var has = Object.prototype.hasOwnProperty;
7577
7578 function find(iter, tar, key) {
7579 for (key of iter.keys()) {
7580 if (dequal(key, tar)) return key;
7581 }
7582 }
7583
7584 function dequal(foo, bar) {
7585 var ctor, len, tmp;
7586 if (foo === bar) return true;
7587
7588 if (foo && bar && (ctor=foo.constructor) === bar.constructor) {
7589 if (ctor === Date) return foo.getTime() === bar.getTime();
7590 if (ctor === RegExp) return foo.toString() === bar.toString();
7591
7592 if (ctor === Array) {
7593 if ((len=foo.length) === bar.length) {
7594 while (len-- && dequal(foo[len], bar[len]));
7595 }
7596 return len === -1;
7597 }
7598
7599 if (ctor === Set) {
7600 if (foo.size !== bar.size) {
7601 return false;
7602 }
7603 for (len of foo) {
7604 tmp = len;
7605 if (tmp && typeof tmp === 'object') {
7606 tmp = find(bar, tmp);
7607 if (!tmp) return false;
7608 }
7609 if (!bar.has(tmp)) return false;
7610 }
7611 return true;
7612 }
7613
7614 if (ctor === Map) {
7615 if (foo.size !== bar.size) {
7616 return false;
7617 }
7618 for (len of foo) {
7619 tmp = len[0];
7620 if (tmp && typeof tmp === 'object') {
7621 tmp = find(bar, tmp);
7622 if (!tmp) return false;
7623 }
7624 if (!dequal(len[1], bar.get(tmp))) {
7625 return false;
7626 }
7627 }
7628 return true;
7629 }
7630
7631 if (ctor === ArrayBuffer) {
7632 foo = new Uint8Array(foo);
7633 bar = new Uint8Array(bar);
7634 } else if (ctor === DataView) {
7635 if ((len=foo.byteLength) === bar.byteLength) {
7636 while (len-- && foo.getInt8(len) === bar.getInt8(len));
7637 }
7638 return len === -1;
7639 }
7640
7641 if (ArrayBuffer.isView(foo)) {
7642 if ((len=foo.byteLength) === bar.byteLength) {
7643 while (len-- && foo[len] === bar[len]);
7644 }
7645 return len === -1;
7646 }
7647
7648 if (!ctor || typeof foo === 'object') {
7649 len = 0;
7650 for (ctor in foo) {
7651 if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
7652 if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
7653 }
7654 return Object.keys(bar).length === len;
7655 }
7656 }
7657
7658 return foo !== foo && bar !== bar;
7659 }
7660
7661
7662 /***/ }),
7663
7664 /***/ "../node_modules/diff/lib/index.mjs":
7665 /*!******************************************!*\
7666 !*** ../node_modules/diff/lib/index.mjs ***!
7667 \******************************************/
7668 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7669
7670 "use strict";
7671 __webpack_require__.r(__webpack_exports__);
7672 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7673 /* harmony export */ "Diff": () => (/* binding */ Diff),
7674 /* harmony export */ "applyPatch": () => (/* binding */ applyPatch),
7675 /* harmony export */ "applyPatches": () => (/* binding */ applyPatches),
7676 /* harmony export */ "canonicalize": () => (/* binding */ canonicalize),
7677 /* harmony export */ "convertChangesToDMP": () => (/* binding */ convertChangesToDMP),
7678 /* harmony export */ "convertChangesToXML": () => (/* binding */ convertChangesToXML),
7679 /* harmony export */ "createPatch": () => (/* binding */ createPatch),
7680 /* harmony export */ "createTwoFilesPatch": () => (/* binding */ createTwoFilesPatch),
7681 /* harmony export */ "diffArrays": () => (/* binding */ diffArrays),
7682 /* harmony export */ "diffChars": () => (/* binding */ diffChars),
7683 /* harmony export */ "diffCss": () => (/* binding */ diffCss),
7684 /* harmony export */ "diffJson": () => (/* binding */ diffJson),
7685 /* harmony export */ "diffLines": () => (/* binding */ diffLines),
7686 /* harmony export */ "diffSentences": () => (/* binding */ diffSentences),
7687 /* harmony export */ "diffTrimmedLines": () => (/* binding */ diffTrimmedLines),
7688 /* harmony export */ "diffWords": () => (/* binding */ diffWords),
7689 /* harmony export */ "diffWordsWithSpace": () => (/* binding */ diffWordsWithSpace),
7690 /* harmony export */ "merge": () => (/* binding */ merge),
7691 /* harmony export */ "parsePatch": () => (/* binding */ parsePatch),
7692 /* harmony export */ "structuredPatch": () => (/* binding */ structuredPatch)
7693 /* harmony export */ });
7694 function Diff() {}
7695 Diff.prototype = {
7696 diff: function diff(oldString, newString) {
7697 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
7698 var callback = options.callback;
7699
7700 if (typeof options === 'function') {
7701 callback = options;
7702 options = {};
7703 }
7704
7705 this.options = options;
7706 var self = this;
7707
7708 function done(value) {
7709 if (callback) {
7710 setTimeout(function () {
7711 callback(undefined, value);
7712 }, 0);
7713 return true;
7714 } else {
7715 return value;
7716 }
7717 } // Allow subclasses to massage the input prior to running
7718
7719
7720 oldString = this.castInput(oldString);
7721 newString = this.castInput(newString);
7722 oldString = this.removeEmpty(this.tokenize(oldString));
7723 newString = this.removeEmpty(this.tokenize(newString));
7724 var newLen = newString.length,
7725 oldLen = oldString.length;
7726 var editLength = 1;
7727 var maxEditLength = newLen + oldLen;
7728
7729 if (options.maxEditLength) {
7730 maxEditLength = Math.min(maxEditLength, options.maxEditLength);
7731 }
7732
7733 var bestPath = [{
7734 newPos: -1,
7735 components: []
7736 }]; // Seed editLength = 0, i.e. the content starts with the same values
7737
7738 var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
7739
7740 if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
7741 // Identity per the equality and tokenizer
7742 return done([{
7743 value: this.join(newString),
7744 count: newString.length
7745 }]);
7746 } // Main worker method. checks all permutations of a given edit length for acceptance.
7747
7748
7749 function execEditLength() {
7750 for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
7751 var basePath = void 0;
7752
7753 var addPath = bestPath[diagonalPath - 1],
7754 removePath = bestPath[diagonalPath + 1],
7755 _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
7756
7757 if (addPath) {
7758 // No one else is going to attempt to use this value, clear it
7759 bestPath[diagonalPath - 1] = undefined;
7760 }
7761
7762 var canAdd = addPath && addPath.newPos + 1 < newLen,
7763 canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
7764
7765 if (!canAdd && !canRemove) {
7766 // If this path is a terminal then prune
7767 bestPath[diagonalPath] = undefined;
7768 continue;
7769 } // Select the diagonal that we want to branch from. We select the prior
7770 // path whose position in the new string is the farthest from the origin
7771 // and does not pass the bounds of the diff graph
7772
7773
7774 if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
7775 basePath = clonePath(removePath);
7776 self.pushComponent(basePath.components, undefined, true);
7777 } else {
7778 basePath = addPath; // No need to clone, we've pulled it from the list
7779
7780 basePath.newPos++;
7781 self.pushComponent(basePath.components, true, undefined);
7782 }
7783
7784 _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
7785
7786 if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
7787 return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
7788 } else {
7789 // Otherwise track this path as a potential candidate and continue.
7790 bestPath[diagonalPath] = basePath;
7791 }
7792 }
7793
7794 editLength++;
7795 } // Performs the length of edit iteration. Is a bit fugly as this has to support the
7796 // sync and async mode which is never fun. Loops over execEditLength until a value
7797 // is produced, or until the edit length exceeds options.maxEditLength (if given),
7798 // in which case it will return undefined.
7799
7800
7801 if (callback) {
7802 (function exec() {
7803 setTimeout(function () {
7804 if (editLength > maxEditLength) {
7805 return callback();
7806 }
7807
7808 if (!execEditLength()) {
7809 exec();
7810 }
7811 }, 0);
7812 })();
7813 } else {
7814 while (editLength <= maxEditLength) {
7815 var ret = execEditLength();
7816
7817 if (ret) {
7818 return ret;
7819 }
7820 }
7821 }
7822 },
7823 pushComponent: function pushComponent(components, added, removed) {
7824 var last = components[components.length - 1];
7825
7826 if (last && last.added === added && last.removed === removed) {
7827 // We need to clone here as the component clone operation is just
7828 // as shallow array clone
7829 components[components.length - 1] = {
7830 count: last.count + 1,
7831 added: added,
7832 removed: removed
7833 };
7834 } else {
7835 components.push({
7836 count: 1,
7837 added: added,
7838 removed: removed
7839 });
7840 }
7841 },
7842 extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
7843 var newLen = newString.length,
7844 oldLen = oldString.length,
7845 newPos = basePath.newPos,
7846 oldPos = newPos - diagonalPath,
7847 commonCount = 0;
7848
7849 while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
7850 newPos++;
7851 oldPos++;
7852 commonCount++;
7853 }
7854
7855 if (commonCount) {
7856 basePath.components.push({
7857 count: commonCount
7858 });
7859 }
7860
7861 basePath.newPos = newPos;
7862 return oldPos;
7863 },
7864 equals: function equals(left, right) {
7865 if (this.options.comparator) {
7866 return this.options.comparator(left, right);
7867 } else {
7868 return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
7869 }
7870 },
7871 removeEmpty: function removeEmpty(array) {
7872 var ret = [];
7873
7874 for (var i = 0; i < array.length; i++) {
7875 if (array[i]) {
7876 ret.push(array[i]);
7877 }
7878 }
7879
7880 return ret;
7881 },
7882 castInput: function castInput(value) {
7883 return value;
7884 },
7885 tokenize: function tokenize(value) {
7886 return value.split('');
7887 },
7888 join: function join(chars) {
7889 return chars.join('');
7890 }
7891 };
7892
7893 function buildValues(diff, components, newString, oldString, useLongestToken) {
7894 var componentPos = 0,
7895 componentLen = components.length,
7896 newPos = 0,
7897 oldPos = 0;
7898
7899 for (; componentPos < componentLen; componentPos++) {
7900 var component = components[componentPos];
7901
7902 if (!component.removed) {
7903 if (!component.added && useLongestToken) {
7904 var value = newString.slice(newPos, newPos + component.count);
7905 value = value.map(function (value, i) {
7906 var oldValue = oldString[oldPos + i];
7907 return oldValue.length > value.length ? oldValue : value;
7908 });
7909 component.value = diff.join(value);
7910 } else {
7911 component.value = diff.join(newString.slice(newPos, newPos + component.count));
7912 }
7913
7914 newPos += component.count; // Common case
7915
7916 if (!component.added) {
7917 oldPos += component.count;
7918 }
7919 } else {
7920 component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
7921 oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
7922 // The diffing algorithm is tied to add then remove output and this is the simplest
7923 // route to get the desired output with minimal overhead.
7924
7925 if (componentPos && components[componentPos - 1].added) {
7926 var tmp = components[componentPos - 1];
7927 components[componentPos - 1] = components[componentPos];
7928 components[componentPos] = tmp;
7929 }
7930 }
7931 } // Special case handle for when one terminal is ignored (i.e. whitespace).
7932 // For this case we merge the terminal into the prior string and drop the change.
7933 // This is only available for string mode.
7934
7935
7936 var lastComponent = components[componentLen - 1];
7937
7938 if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
7939 components[componentLen - 2].value += lastComponent.value;
7940 components.pop();
7941 }
7942
7943 return components;
7944 }
7945
7946 function clonePath(path) {
7947 return {
7948 newPos: path.newPos,
7949 components: path.components.slice(0)
7950 };
7951 }
7952
7953 var characterDiff = new Diff();
7954 function diffChars(oldStr, newStr, options) {
7955 return characterDiff.diff(oldStr, newStr, options);
7956 }
7957
7958 function generateOptions(options, defaults) {
7959 if (typeof options === 'function') {
7960 defaults.callback = options;
7961 } else if (options) {
7962 for (var name in options) {
7963 /* istanbul ignore else */
7964 if (options.hasOwnProperty(name)) {
7965 defaults[name] = options[name];
7966 }
7967 }
7968 }
7969
7970 return defaults;
7971 }
7972
7973 //
7974 // Ranges and exceptions:
7975 // Latin-1 Supplement, 0080–00FF
7976 // - U+00D7 × Multiplication sign
7977 // - U+00F7 ÷ Division sign
7978 // Latin Extended-A, 0100–017F
7979 // Latin Extended-B, 0180–024F
7980 // IPA Extensions, 0250–02AF
7981 // Spacing Modifier Letters, 02B0–02FF
7982 // - U+02C7 ˇ &#711; Caron
7983 // - U+02D8 ˘ &#728; Breve
7984 // - U+02D9 ˙ &#729; Dot Above
7985 // - U+02DA ˚ &#730; Ring Above
7986 // - U+02DB ˛ &#731; Ogonek
7987 // - U+02DC ˜ &#732; Small Tilde
7988 // - U+02DD ˝ &#733; Double Acute Accent
7989 // Latin Extended Additional, 1E00–1EFF
7990
7991 var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
7992 var reWhitespace = /\S/;
7993 var wordDiff = new Diff();
7994
7995 wordDiff.equals = function (left, right) {
7996 if (this.options.ignoreCase) {
7997 left = left.toLowerCase();
7998 right = right.toLowerCase();
7999 }
8000
8001 return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
8002 };
8003
8004 wordDiff.tokenize = function (value) {
8005 // All whitespace symbols except newline group into one token, each newline - in separate token
8006 var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
8007
8008 for (var i = 0; i < tokens.length - 1; i++) {
8009 // If we have an empty string in the next field and we have only word chars before and after, merge
8010 if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
8011 tokens[i] += tokens[i + 2];
8012 tokens.splice(i + 1, 2);
8013 i--;
8014 }
8015 }
8016
8017 return tokens;
8018 };
8019
8020 function diffWords(oldStr, newStr, options) {
8021 options = generateOptions(options, {
8022 ignoreWhitespace: true
8023 });
8024 return wordDiff.diff(oldStr, newStr, options);
8025 }
8026 function diffWordsWithSpace(oldStr, newStr, options) {
8027 return wordDiff.diff(oldStr, newStr, options);
8028 }
8029
8030 var lineDiff = new Diff();
8031
8032 lineDiff.tokenize = function (value) {
8033 var retLines = [],
8034 linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
8035
8036 if (!linesAndNewlines[linesAndNewlines.length - 1]) {
8037 linesAndNewlines.pop();
8038 } // Merge the content and line separators into single tokens
8039
8040
8041 for (var i = 0; i < linesAndNewlines.length; i++) {
8042 var line = linesAndNewlines[i];
8043
8044 if (i % 2 && !this.options.newlineIsToken) {
8045 retLines[retLines.length - 1] += line;
8046 } else {
8047 if (this.options.ignoreWhitespace) {
8048 line = line.trim();
8049 }
8050
8051 retLines.push(line);
8052 }
8053 }
8054
8055 return retLines;
8056 };
8057
8058 function diffLines(oldStr, newStr, callback) {
8059 return lineDiff.diff(oldStr, newStr, callback);
8060 }
8061 function diffTrimmedLines(oldStr, newStr, callback) {
8062 var options = generateOptions(callback, {
8063 ignoreWhitespace: true
8064 });
8065 return lineDiff.diff(oldStr, newStr, options);
8066 }
8067
8068 var sentenceDiff = new Diff();
8069
8070 sentenceDiff.tokenize = function (value) {
8071 return value.split(/(\S.+?[.!?])(?=\s+|$)/);
8072 };
8073
8074 function diffSentences(oldStr, newStr, callback) {
8075 return sentenceDiff.diff(oldStr, newStr, callback);
8076 }
8077
8078 var cssDiff = new Diff();
8079
8080 cssDiff.tokenize = function (value) {
8081 return value.split(/([{}:;,]|\s+)/);
8082 };
8083
8084 function diffCss(oldStr, newStr, callback) {
8085 return cssDiff.diff(oldStr, newStr, callback);
8086 }
8087
8088 function _typeof(obj) {
8089 "@babel/helpers - typeof";
8090
8091 if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
8092 _typeof = function (obj) {
8093 return typeof obj;
8094 };
8095 } else {
8096 _typeof = function (obj) {
8097 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
8098 };
8099 }
8100
8101 return _typeof(obj);
8102 }
8103
8104 function _toConsumableArray(arr) {
8105 return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
8106 }
8107
8108 function _arrayWithoutHoles(arr) {
8109 if (Array.isArray(arr)) return _arrayLikeToArray(arr);
8110 }
8111
8112 function _iterableToArray(iter) {
8113 if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
8114 }
8115
8116 function _unsupportedIterableToArray(o, minLen) {
8117 if (!o) return;
8118 if (typeof o === "string") return _arrayLikeToArray(o, minLen);
8119 var n = Object.prototype.toString.call(o).slice(8, -1);
8120 if (n === "Object" && o.constructor) n = o.constructor.name;
8121 if (n === "Map" || n === "Set") return Array.from(o);
8122 if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
8123 }
8124
8125 function _arrayLikeToArray(arr, len) {
8126 if (len == null || len > arr.length) len = arr.length;
8127
8128 for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
8129
8130 return arr2;
8131 }
8132
8133 function _nonIterableSpread() {
8134 throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8135 }
8136
8137 var objectPrototypeToString = Object.prototype.toString;
8138 var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
8139 // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
8140
8141 jsonDiff.useLongestToken = true;
8142 jsonDiff.tokenize = lineDiff.tokenize;
8143
8144 jsonDiff.castInput = function (value) {
8145 var _this$options = this.options,
8146 undefinedReplacement = _this$options.undefinedReplacement,
8147 _this$options$stringi = _this$options.stringifyReplacer,
8148 stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
8149 return typeof v === 'undefined' ? undefinedReplacement : v;
8150 } : _this$options$stringi;
8151 return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
8152 };
8153
8154 jsonDiff.equals = function (left, right) {
8155 return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
8156 };
8157
8158 function diffJson(oldObj, newObj, options) {
8159 return jsonDiff.diff(oldObj, newObj, options);
8160 } // This function handles the presence of circular references by bailing out when encountering an
8161 // object that is already on the "stack" of items being processed. Accepts an optional replacer
8162
8163 function canonicalize(obj, stack, replacementStack, replacer, key) {
8164 stack = stack || [];
8165 replacementStack = replacementStack || [];
8166
8167 if (replacer) {
8168 obj = replacer(key, obj);
8169 }
8170
8171 var i;
8172
8173 for (i = 0; i < stack.length; i += 1) {
8174 if (stack[i] === obj) {
8175 return replacementStack[i];
8176 }
8177 }
8178
8179 var canonicalizedObj;
8180
8181 if ('[object Array]' === objectPrototypeToString.call(obj)) {
8182 stack.push(obj);
8183 canonicalizedObj = new Array(obj.length);
8184 replacementStack.push(canonicalizedObj);
8185
8186 for (i = 0; i < obj.length; i += 1) {
8187 canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
8188 }
8189
8190 stack.pop();
8191 replacementStack.pop();
8192 return canonicalizedObj;
8193 }
8194
8195 if (obj && obj.toJSON) {
8196 obj = obj.toJSON();
8197 }
8198
8199 if (_typeof(obj) === 'object' && obj !== null) {
8200 stack.push(obj);
8201 canonicalizedObj = {};
8202 replacementStack.push(canonicalizedObj);
8203
8204 var sortedKeys = [],
8205 _key;
8206
8207 for (_key in obj) {
8208 /* istanbul ignore else */
8209 if (obj.hasOwnProperty(_key)) {
8210 sortedKeys.push(_key);
8211 }
8212 }
8213
8214 sortedKeys.sort();
8215
8216 for (i = 0; i < sortedKeys.length; i += 1) {
8217 _key = sortedKeys[i];
8218 canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
8219 }
8220
8221 stack.pop();
8222 replacementStack.pop();
8223 } else {
8224 canonicalizedObj = obj;
8225 }
8226
8227 return canonicalizedObj;
8228 }
8229
8230 var arrayDiff = new Diff();
8231
8232 arrayDiff.tokenize = function (value) {
8233 return value.slice();
8234 };
8235
8236 arrayDiff.join = arrayDiff.removeEmpty = function (value) {
8237 return value;
8238 };
8239
8240 function diffArrays(oldArr, newArr, callback) {
8241 return arrayDiff.diff(oldArr, newArr, callback);
8242 }
8243
8244 function parsePatch(uniDiff) {
8245 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8246 var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
8247 delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
8248 list = [],
8249 i = 0;
8250
8251 function parseIndex() {
8252 var index = {};
8253 list.push(index); // Parse diff metadata
8254
8255 while (i < diffstr.length) {
8256 var line = diffstr[i]; // File header found, end parsing diff metadata
8257
8258 if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
8259 break;
8260 } // Diff index
8261
8262
8263 var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
8264
8265 if (header) {
8266 index.index = header[1];
8267 }
8268
8269 i++;
8270 } // Parse file headers if they are defined. Unified diff requires them, but
8271 // there's no technical issues to have an isolated hunk without file header
8272
8273
8274 parseFileHeader(index);
8275 parseFileHeader(index); // Parse hunks
8276
8277 index.hunks = [];
8278
8279 while (i < diffstr.length) {
8280 var _line = diffstr[i];
8281
8282 if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
8283 break;
8284 } else if (/^@@/.test(_line)) {
8285 index.hunks.push(parseHunk());
8286 } else if (_line && options.strict) {
8287 // Ignore unexpected content unless in strict mode
8288 throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
8289 } else {
8290 i++;
8291 }
8292 }
8293 } // Parses the --- and +++ headers, if none are found, no lines
8294 // are consumed.
8295
8296
8297 function parseFileHeader(index) {
8298 var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
8299
8300 if (fileHeader) {
8301 var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
8302 var data = fileHeader[2].split('\t', 2);
8303 var fileName = data[0].replace(/\\\\/g, '\\');
8304
8305 if (/^".*"$/.test(fileName)) {
8306 fileName = fileName.substr(1, fileName.length - 2);
8307 }
8308
8309 index[keyPrefix + 'FileName'] = fileName;
8310 index[keyPrefix + 'Header'] = (data[1] || '').trim();
8311 i++;
8312 }
8313 } // Parses a hunk
8314 // This assumes that we are at the start of a hunk.
8315
8316
8317 function parseHunk() {
8318 var chunkHeaderIndex = i,
8319 chunkHeaderLine = diffstr[i++],
8320 chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
8321 var hunk = {
8322 oldStart: +chunkHeader[1],
8323 oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],
8324 newStart: +chunkHeader[3],
8325 newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],
8326 lines: [],
8327 linedelimiters: []
8328 }; // Unified Diff Format quirk: If the chunk size is 0,
8329 // the first number is one lower than one would expect.
8330 // https://www.artima.com/weblogs/viewpost.jsp?thread=164293
8331
8332 if (hunk.oldLines === 0) {
8333 hunk.oldStart += 1;
8334 }
8335
8336 if (hunk.newLines === 0) {
8337 hunk.newStart += 1;
8338 }
8339
8340 var addCount = 0,
8341 removeCount = 0;
8342
8343 for (; i < diffstr.length; i++) {
8344 // Lines starting with '---' could be mistaken for the "remove line" operation
8345 // But they could be the header for the next file. Therefore prune such cases out.
8346 if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
8347 break;
8348 }
8349
8350 var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
8351
8352 if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
8353 hunk.lines.push(diffstr[i]);
8354 hunk.linedelimiters.push(delimiters[i] || '\n');
8355
8356 if (operation === '+') {
8357 addCount++;
8358 } else if (operation === '-') {
8359 removeCount++;
8360 } else if (operation === ' ') {
8361 addCount++;
8362 removeCount++;
8363 }
8364 } else {
8365 break;
8366 }
8367 } // Handle the empty block count case
8368
8369
8370 if (!addCount && hunk.newLines === 1) {
8371 hunk.newLines = 0;
8372 }
8373
8374 if (!removeCount && hunk.oldLines === 1) {
8375 hunk.oldLines = 0;
8376 } // Perform optional sanity checking
8377
8378
8379 if (options.strict) {
8380 if (addCount !== hunk.newLines) {
8381 throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
8382 }
8383
8384 if (removeCount !== hunk.oldLines) {
8385 throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
8386 }
8387 }
8388
8389 return hunk;
8390 }
8391
8392 while (i < diffstr.length) {
8393 parseIndex();
8394 }
8395
8396 return list;
8397 }
8398
8399 // Iterator that traverses in the range of [min, max], stepping
8400 // by distance from a given start position. I.e. for [0, 4], with
8401 // start of 2, this will iterate 2, 3, 1, 4, 0.
8402 function distanceIterator (start, minLine, maxLine) {
8403 var wantForward = true,
8404 backwardExhausted = false,
8405 forwardExhausted = false,
8406 localOffset = 1;
8407 return function iterator() {
8408 if (wantForward && !forwardExhausted) {
8409 if (backwardExhausted) {
8410 localOffset++;
8411 } else {
8412 wantForward = false;
8413 } // Check if trying to fit beyond text length, and if not, check it fits
8414 // after offset location (or desired location on first iteration)
8415
8416
8417 if (start + localOffset <= maxLine) {
8418 return localOffset;
8419 }
8420
8421 forwardExhausted = true;
8422 }
8423
8424 if (!backwardExhausted) {
8425 if (!forwardExhausted) {
8426 wantForward = true;
8427 } // Check if trying to fit before text beginning, and if not, check it fits
8428 // before offset location
8429
8430
8431 if (minLine <= start - localOffset) {
8432 return -localOffset++;
8433 }
8434
8435 backwardExhausted = true;
8436 return iterator();
8437 } // We tried to fit hunk before text beginning and beyond text length, then
8438 // hunk can't fit on the text. Return undefined
8439
8440 };
8441 }
8442
8443 function applyPatch(source, uniDiff) {
8444 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8445
8446 if (typeof uniDiff === 'string') {
8447 uniDiff = parsePatch(uniDiff);
8448 }
8449
8450 if (Array.isArray(uniDiff)) {
8451 if (uniDiff.length > 1) {
8452 throw new Error('applyPatch only works with a single input.');
8453 }
8454
8455 uniDiff = uniDiff[0];
8456 } // Apply the diff to the input
8457
8458
8459 var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
8460 delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
8461 hunks = uniDiff.hunks,
8462 compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {
8463 return line === patchContent;
8464 },
8465 errorCount = 0,
8466 fuzzFactor = options.fuzzFactor || 0,
8467 minLine = 0,
8468 offset = 0,
8469 removeEOFNL,
8470 addEOFNL;
8471 /**
8472 * Checks if the hunk exactly fits on the provided location
8473 */
8474
8475
8476 function hunkFits(hunk, toPos) {
8477 for (var j = 0; j < hunk.lines.length; j++) {
8478 var line = hunk.lines[j],
8479 operation = line.length > 0 ? line[0] : ' ',
8480 content = line.length > 0 ? line.substr(1) : line;
8481
8482 if (operation === ' ' || operation === '-') {
8483 // Context sanity check
8484 if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
8485 errorCount++;
8486
8487 if (errorCount > fuzzFactor) {
8488 return false;
8489 }
8490 }
8491
8492 toPos++;
8493 }
8494 }
8495
8496 return true;
8497 } // Search best fit offsets for each hunk based on the previous ones
8498
8499
8500 for (var i = 0; i < hunks.length; i++) {
8501 var hunk = hunks[i],
8502 maxLine = lines.length - hunk.oldLines,
8503 localOffset = 0,
8504 toPos = offset + hunk.oldStart - 1;
8505 var iterator = distanceIterator(toPos, minLine, maxLine);
8506
8507 for (; localOffset !== undefined; localOffset = iterator()) {
8508 if (hunkFits(hunk, toPos + localOffset)) {
8509 hunk.offset = offset += localOffset;
8510 break;
8511 }
8512 }
8513
8514 if (localOffset === undefined) {
8515 return false;
8516 } // Set lower text limit to end of the current hunk, so next ones don't try
8517 // to fit over already patched text
8518
8519
8520 minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
8521 } // Apply patch hunks
8522
8523
8524 var diffOffset = 0;
8525
8526 for (var _i = 0; _i < hunks.length; _i++) {
8527 var _hunk = hunks[_i],
8528 _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
8529
8530 diffOffset += _hunk.newLines - _hunk.oldLines;
8531
8532 for (var j = 0; j < _hunk.lines.length; j++) {
8533 var line = _hunk.lines[j],
8534 operation = line.length > 0 ? line[0] : ' ',
8535 content = line.length > 0 ? line.substr(1) : line,
8536 delimiter = _hunk.linedelimiters[j];
8537
8538 if (operation === ' ') {
8539 _toPos++;
8540 } else if (operation === '-') {
8541 lines.splice(_toPos, 1);
8542 delimiters.splice(_toPos, 1);
8543 /* istanbul ignore else */
8544 } else if (operation === '+') {
8545 lines.splice(_toPos, 0, content);
8546 delimiters.splice(_toPos, 0, delimiter);
8547 _toPos++;
8548 } else if (operation === '\\') {
8549 var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
8550
8551 if (previousOperation === '+') {
8552 removeEOFNL = true;
8553 } else if (previousOperation === '-') {
8554 addEOFNL = true;
8555 }
8556 }
8557 }
8558 } // Handle EOFNL insertion/removal
8559
8560
8561 if (removeEOFNL) {
8562 while (!lines[lines.length - 1]) {
8563 lines.pop();
8564 delimiters.pop();
8565 }
8566 } else if (addEOFNL) {
8567 lines.push('');
8568 delimiters.push('\n');
8569 }
8570
8571 for (var _k = 0; _k < lines.length - 1; _k++) {
8572 lines[_k] = lines[_k] + delimiters[_k];
8573 }
8574
8575 return lines.join('');
8576 } // Wrapper that supports multiple file patches via callbacks.
8577
8578 function applyPatches(uniDiff, options) {
8579 if (typeof uniDiff === 'string') {
8580 uniDiff = parsePatch(uniDiff);
8581 }
8582
8583 var currentIndex = 0;
8584
8585 function processIndex() {
8586 var index = uniDiff[currentIndex++];
8587
8588 if (!index) {
8589 return options.complete();
8590 }
8591
8592 options.loadFile(index, function (err, data) {
8593 if (err) {
8594 return options.complete(err);
8595 }
8596
8597 var updatedContent = applyPatch(data, index, options);
8598 options.patched(index, updatedContent, function (err) {
8599 if (err) {
8600 return options.complete(err);
8601 }
8602
8603 processIndex();
8604 });
8605 });
8606 }
8607
8608 processIndex();
8609 }
8610
8611 function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
8612 if (!options) {
8613 options = {};
8614 }
8615
8616 if (typeof options.context === 'undefined') {
8617 options.context = 4;
8618 }
8619
8620 var diff = diffLines(oldStr, newStr, options);
8621
8622 if (!diff) {
8623 return;
8624 }
8625
8626 diff.push({
8627 value: '',
8628 lines: []
8629 }); // Append an empty value to make cleanup easier
8630
8631 function contextLines(lines) {
8632 return lines.map(function (entry) {
8633 return ' ' + entry;
8634 });
8635 }
8636
8637 var hunks = [];
8638 var oldRangeStart = 0,
8639 newRangeStart = 0,
8640 curRange = [],
8641 oldLine = 1,
8642 newLine = 1;
8643
8644 var _loop = function _loop(i) {
8645 var current = diff[i],
8646 lines = current.lines || current.value.replace(/\n$/, '').split('\n');
8647 current.lines = lines;
8648
8649 if (current.added || current.removed) {
8650 var _curRange;
8651
8652 // If we have previous context, start with that
8653 if (!oldRangeStart) {
8654 var prev = diff[i - 1];
8655 oldRangeStart = oldLine;
8656 newRangeStart = newLine;
8657
8658 if (prev) {
8659 curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
8660 oldRangeStart -= curRange.length;
8661 newRangeStart -= curRange.length;
8662 }
8663 } // Output our changes
8664
8665
8666 (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {
8667 return (current.added ? '+' : '-') + entry;
8668 }))); // Track the updated file position
8669
8670
8671 if (current.added) {
8672 newLine += lines.length;
8673 } else {
8674 oldLine += lines.length;
8675 }
8676 } else {
8677 // Identical context lines. Track line changes
8678 if (oldRangeStart) {
8679 // Close out any changes that have been output (or join overlapping)
8680 if (lines.length <= options.context * 2 && i < diff.length - 2) {
8681 var _curRange2;
8682
8683 // Overlapping
8684 (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
8685 } else {
8686 var _curRange3;
8687
8688 // end the range and output
8689 var contextSize = Math.min(lines.length, options.context);
8690
8691 (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
8692
8693 var hunk = {
8694 oldStart: oldRangeStart,
8695 oldLines: oldLine - oldRangeStart + contextSize,
8696 newStart: newRangeStart,
8697 newLines: newLine - newRangeStart + contextSize,
8698 lines: curRange
8699 };
8700
8701 if (i >= diff.length - 2 && lines.length <= options.context) {
8702 // EOF is inside this hunk
8703 var oldEOFNewline = /\n$/.test(oldStr);
8704 var newEOFNewline = /\n$/.test(newStr);
8705 var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
8706
8707 if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
8708 // special case: old has no eol and no trailing context; no-nl can end up before adds
8709 // however, if the old file is empty, do not output the no-nl line
8710 curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
8711 }
8712
8713 if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
8714 curRange.push('\\ No newline at end of file');
8715 }
8716 }
8717
8718 hunks.push(hunk);
8719 oldRangeStart = 0;
8720 newRangeStart = 0;
8721 curRange = [];
8722 }
8723 }
8724
8725 oldLine += lines.length;
8726 newLine += lines.length;
8727 }
8728 };
8729
8730 for (var i = 0; i < diff.length; i++) {
8731 _loop(i);
8732 }
8733
8734 return {
8735 oldFileName: oldFileName,
8736 newFileName: newFileName,
8737 oldHeader: oldHeader,
8738 newHeader: newHeader,
8739 hunks: hunks
8740 };
8741 }
8742 function formatPatch(diff) {
8743 var ret = [];
8744
8745 if (diff.oldFileName == diff.newFileName) {
8746 ret.push('Index: ' + diff.oldFileName);
8747 }
8748
8749 ret.push('===================================================================');
8750 ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
8751 ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
8752
8753 for (var i = 0; i < diff.hunks.length; i++) {
8754 var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,
8755 // the first number is one lower than one would expect.
8756 // https://www.artima.com/weblogs/viewpost.jsp?thread=164293
8757
8758 if (hunk.oldLines === 0) {
8759 hunk.oldStart -= 1;
8760 }
8761
8762 if (hunk.newLines === 0) {
8763 hunk.newStart -= 1;
8764 }
8765
8766 ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
8767 ret.push.apply(ret, hunk.lines);
8768 }
8769
8770 return ret.join('\n') + '\n';
8771 }
8772 function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
8773 return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
8774 }
8775 function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
8776 return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
8777 }
8778
8779 function arrayEqual(a, b) {
8780 if (a.length !== b.length) {
8781 return false;
8782 }
8783
8784 return arrayStartsWith(a, b);
8785 }
8786 function arrayStartsWith(array, start) {
8787 if (start.length > array.length) {
8788 return false;
8789 }
8790
8791 for (var i = 0; i < start.length; i++) {
8792 if (start[i] !== array[i]) {
8793 return false;
8794 }
8795 }
8796
8797 return true;
8798 }
8799
8800 function calcLineCount(hunk) {
8801 var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),
8802 oldLines = _calcOldNewLineCount.oldLines,
8803 newLines = _calcOldNewLineCount.newLines;
8804
8805 if (oldLines !== undefined) {
8806 hunk.oldLines = oldLines;
8807 } else {
8808 delete hunk.oldLines;
8809 }
8810
8811 if (newLines !== undefined) {
8812 hunk.newLines = newLines;
8813 } else {
8814 delete hunk.newLines;
8815 }
8816 }
8817 function merge(mine, theirs, base) {
8818 mine = loadPatch(mine, base);
8819 theirs = loadPatch(theirs, base);
8820 var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
8821 // Leaving sanity checks on this to the API consumer that may know more about the
8822 // meaning in their own context.
8823
8824 if (mine.index || theirs.index) {
8825 ret.index = mine.index || theirs.index;
8826 }
8827
8828 if (mine.newFileName || theirs.newFileName) {
8829 if (!fileNameChanged(mine)) {
8830 // No header or no change in ours, use theirs (and ours if theirs does not exist)
8831 ret.oldFileName = theirs.oldFileName || mine.oldFileName;
8832 ret.newFileName = theirs.newFileName || mine.newFileName;
8833 ret.oldHeader = theirs.oldHeader || mine.oldHeader;
8834 ret.newHeader = theirs.newHeader || mine.newHeader;
8835 } else if (!fileNameChanged(theirs)) {
8836 // No header or no change in theirs, use ours
8837 ret.oldFileName = mine.oldFileName;
8838 ret.newFileName = mine.newFileName;
8839 ret.oldHeader = mine.oldHeader;
8840 ret.newHeader = mine.newHeader;
8841 } else {
8842 // Both changed... figure it out
8843 ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
8844 ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
8845 ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
8846 ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
8847 }
8848 }
8849
8850 ret.hunks = [];
8851 var mineIndex = 0,
8852 theirsIndex = 0,
8853 mineOffset = 0,
8854 theirsOffset = 0;
8855
8856 while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
8857 var mineCurrent = mine.hunks[mineIndex] || {
8858 oldStart: Infinity
8859 },
8860 theirsCurrent = theirs.hunks[theirsIndex] || {
8861 oldStart: Infinity
8862 };
8863
8864 if (hunkBefore(mineCurrent, theirsCurrent)) {
8865 // This patch does not overlap with any of the others, yay.
8866 ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
8867 mineIndex++;
8868 theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
8869 } else if (hunkBefore(theirsCurrent, mineCurrent)) {
8870 // This patch does not overlap with any of the others, yay.
8871 ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
8872 theirsIndex++;
8873 mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
8874 } else {
8875 // Overlap, merge as best we can
8876 var mergedHunk = {
8877 oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
8878 oldLines: 0,
8879 newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
8880 newLines: 0,
8881 lines: []
8882 };
8883 mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
8884 theirsIndex++;
8885 mineIndex++;
8886 ret.hunks.push(mergedHunk);
8887 }
8888 }
8889
8890 return ret;
8891 }
8892
8893 function loadPatch(param, base) {
8894 if (typeof param === 'string') {
8895 if (/^@@/m.test(param) || /^Index:/m.test(param)) {
8896 return parsePatch(param)[0];
8897 }
8898
8899 if (!base) {
8900 throw new Error('Must provide a base reference or pass in a patch');
8901 }
8902
8903 return structuredPatch(undefined, undefined, base, param);
8904 }
8905
8906 return param;
8907 }
8908
8909 function fileNameChanged(patch) {
8910 return patch.newFileName && patch.newFileName !== patch.oldFileName;
8911 }
8912
8913 function selectField(index, mine, theirs) {
8914 if (mine === theirs) {
8915 return mine;
8916 } else {
8917 index.conflict = true;
8918 return {
8919 mine: mine,
8920 theirs: theirs
8921 };
8922 }
8923 }
8924
8925 function hunkBefore(test, check) {
8926 return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
8927 }
8928
8929 function cloneHunk(hunk, offset) {
8930 return {
8931 oldStart: hunk.oldStart,
8932 oldLines: hunk.oldLines,
8933 newStart: hunk.newStart + offset,
8934 newLines: hunk.newLines,
8935 lines: hunk.lines
8936 };
8937 }
8938
8939 function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
8940 // This will generally result in a conflicted hunk, but there are cases where the context
8941 // is the only overlap where we can successfully merge the content here.
8942 var mine = {
8943 offset: mineOffset,
8944 lines: mineLines,
8945 index: 0
8946 },
8947 their = {
8948 offset: theirOffset,
8949 lines: theirLines,
8950 index: 0
8951 }; // Handle any leading content
8952
8953 insertLeading(hunk, mine, their);
8954 insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
8955
8956 while (mine.index < mine.lines.length && their.index < their.lines.length) {
8957 var mineCurrent = mine.lines[mine.index],
8958 theirCurrent = their.lines[their.index];
8959
8960 if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
8961 // Both modified ...
8962 mutualChange(hunk, mine, their);
8963 } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
8964 var _hunk$lines;
8965
8966 // Mine inserted
8967 (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));
8968 } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
8969 var _hunk$lines2;
8970
8971 // Theirs inserted
8972 (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));
8973 } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
8974 // Mine removed or edited
8975 removal(hunk, mine, their);
8976 } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
8977 // Their removed or edited
8978 removal(hunk, their, mine, true);
8979 } else if (mineCurrent === theirCurrent) {
8980 // Context identity
8981 hunk.lines.push(mineCurrent);
8982 mine.index++;
8983 their.index++;
8984 } else {
8985 // Context mismatch
8986 conflict(hunk, collectChange(mine), collectChange(their));
8987 }
8988 } // Now push anything that may be remaining
8989
8990
8991 insertTrailing(hunk, mine);
8992 insertTrailing(hunk, their);
8993 calcLineCount(hunk);
8994 }
8995
8996 function mutualChange(hunk, mine, their) {
8997 var myChanges = collectChange(mine),
8998 theirChanges = collectChange(their);
8999
9000 if (allRemoves(myChanges) && allRemoves(theirChanges)) {
9001 // Special case for remove changes that are supersets of one another
9002 if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
9003 var _hunk$lines3;
9004
9005 (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));
9006
9007 return;
9008 } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
9009 var _hunk$lines4;
9010
9011 (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));
9012
9013 return;
9014 }
9015 } else if (arrayEqual(myChanges, theirChanges)) {
9016 var _hunk$lines5;
9017
9018 (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));
9019
9020 return;
9021 }
9022
9023 conflict(hunk, myChanges, theirChanges);
9024 }
9025
9026 function removal(hunk, mine, their, swap) {
9027 var myChanges = collectChange(mine),
9028 theirChanges = collectContext(their, myChanges);
9029
9030 if (theirChanges.merged) {
9031 var _hunk$lines6;
9032
9033 (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));
9034 } else {
9035 conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
9036 }
9037 }
9038
9039 function conflict(hunk, mine, their) {
9040 hunk.conflict = true;
9041 hunk.lines.push({
9042 conflict: true,
9043 mine: mine,
9044 theirs: their
9045 });
9046 }
9047
9048 function insertLeading(hunk, insert, their) {
9049 while (insert.offset < their.offset && insert.index < insert.lines.length) {
9050 var line = insert.lines[insert.index++];
9051 hunk.lines.push(line);
9052 insert.offset++;
9053 }
9054 }
9055
9056 function insertTrailing(hunk, insert) {
9057 while (insert.index < insert.lines.length) {
9058 var line = insert.lines[insert.index++];
9059 hunk.lines.push(line);
9060 }
9061 }
9062
9063 function collectChange(state) {
9064 var ret = [],
9065 operation = state.lines[state.index][0];
9066
9067 while (state.index < state.lines.length) {
9068 var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
9069
9070 if (operation === '-' && line[0] === '+') {
9071 operation = '+';
9072 }
9073
9074 if (operation === line[0]) {
9075 ret.push(line);
9076 state.index++;
9077 } else {
9078 break;
9079 }
9080 }
9081
9082 return ret;
9083 }
9084
9085 function collectContext(state, matchChanges) {
9086 var changes = [],
9087 merged = [],
9088 matchIndex = 0,
9089 contextChanges = false,
9090 conflicted = false;
9091
9092 while (matchIndex < matchChanges.length && state.index < state.lines.length) {
9093 var change = state.lines[state.index],
9094 match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
9095
9096 if (match[0] === '+') {
9097 break;
9098 }
9099
9100 contextChanges = contextChanges || change[0] !== ' ';
9101 merged.push(match);
9102 matchIndex++; // Consume any additions in the other block as a conflict to attempt
9103 // to pull in the remaining context after this
9104
9105 if (change[0] === '+') {
9106 conflicted = true;
9107
9108 while (change[0] === '+') {
9109 changes.push(change);
9110 change = state.lines[++state.index];
9111 }
9112 }
9113
9114 if (match.substr(1) === change.substr(1)) {
9115 changes.push(change);
9116 state.index++;
9117 } else {
9118 conflicted = true;
9119 }
9120 }
9121
9122 if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
9123 conflicted = true;
9124 }
9125
9126 if (conflicted) {
9127 return changes;
9128 }
9129
9130 while (matchIndex < matchChanges.length) {
9131 merged.push(matchChanges[matchIndex++]);
9132 }
9133
9134 return {
9135 merged: merged,
9136 changes: changes
9137 };
9138 }
9139
9140 function allRemoves(changes) {
9141 return changes.reduce(function (prev, change) {
9142 return prev && change[0] === '-';
9143 }, true);
9144 }
9145
9146 function skipRemoveSuperset(state, removeChanges, delta) {
9147 for (var i = 0; i < delta; i++) {
9148 var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
9149
9150 if (state.lines[state.index + i] !== ' ' + changeContent) {
9151 return false;
9152 }
9153 }
9154
9155 state.index += delta;
9156 return true;
9157 }
9158
9159 function calcOldNewLineCount(lines) {
9160 var oldLines = 0;
9161 var newLines = 0;
9162 lines.forEach(function (line) {
9163 if (typeof line !== 'string') {
9164 var myCount = calcOldNewLineCount(line.mine);
9165 var theirCount = calcOldNewLineCount(line.theirs);
9166
9167 if (oldLines !== undefined) {
9168 if (myCount.oldLines === theirCount.oldLines) {
9169 oldLines += myCount.oldLines;
9170 } else {
9171 oldLines = undefined;
9172 }
9173 }
9174
9175 if (newLines !== undefined) {
9176 if (myCount.newLines === theirCount.newLines) {
9177 newLines += myCount.newLines;
9178 } else {
9179 newLines = undefined;
9180 }
9181 }
9182 } else {
9183 if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
9184 newLines++;
9185 }
9186
9187 if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
9188 oldLines++;
9189 }
9190 }
9191 });
9192 return {
9193 oldLines: oldLines,
9194 newLines: newLines
9195 };
9196 }
9197
9198 // See: http://code.google.com/p/google-diff-match-patch/wiki/API
9199 function convertChangesToDMP(changes) {
9200 var ret = [],
9201 change,
9202 operation;
9203
9204 for (var i = 0; i < changes.length; i++) {
9205 change = changes[i];
9206
9207 if (change.added) {
9208 operation = 1;
9209 } else if (change.removed) {
9210 operation = -1;
9211 } else {
9212 operation = 0;
9213 }
9214
9215 ret.push([operation, change.value]);
9216 }
9217
9218 return ret;
9219 }
9220
9221 function convertChangesToXML(changes) {
9222 var ret = [];
9223
9224 for (var i = 0; i < changes.length; i++) {
9225 var change = changes[i];
9226
9227 if (change.added) {
9228 ret.push('<ins>');
9229 } else if (change.removed) {
9230 ret.push('<del>');
9231 }
9232
9233 ret.push(escapeHTML(change.value));
9234
9235 if (change.added) {
9236 ret.push('</ins>');
9237 } else if (change.removed) {
9238 ret.push('</del>');
9239 }
9240 }
9241
9242 return ret.join('');
9243 }
9244
9245 function escapeHTML(s) {
9246 var n = s;
9247 n = n.replace(/&/g, '&amp;');
9248 n = n.replace(/</g, '&lt;');
9249 n = n.replace(/>/g, '&gt;');
9250 n = n.replace(/"/g, '&quot;');
9251 return n;
9252 }
9253
9254
9255
9256
9257 /***/ }),
9258
9259 /***/ "../node_modules/hast-util-whitespace/index.js":
9260 /*!*****************************************************!*\
9261 !*** ../node_modules/hast-util-whitespace/index.js ***!
9262 \*****************************************************/
9263 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
9264
9265 "use strict";
9266 __webpack_require__.r(__webpack_exports__);
9267 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9268 /* harmony export */ "whitespace": () => (/* binding */ whitespace)
9269 /* harmony export */ });
9270 /**
9271 * Check if the given value is *inter-element whitespace*.
9272 *
9273 * @param {unknown} thing
9274 * Thing to check (typically `Node` or `string`).
9275 * @returns {boolean}
9276 * Whether the `value` is inter-element whitespace (`boolean`): consisting of
9277 * zero or more of space, tab (`\t`), line feed (`\n`), carriage return
9278 * (`\r`), or form feed (`\f`).
9279 * If a node is passed it must be a `Text` node, whose `value` field is
9280 * checked.
9281 */
9282 function whitespace(thing) {
9283 /** @type {string} */
9284 const value =
9285 // @ts-expect-error looks like a node.
9286 thing && typeof thing === 'object' && thing.type === 'text'
9287 ? // @ts-expect-error looks like a text.
9288 thing.value || ''
9289 : thing
9290
9291 // HTML whitespace expression.
9292 // See <https://infra.spec.whatwg.org/#ascii-whitespace>.
9293 return typeof value === 'string' && value.replace(/[ \t\n\f\r]/g, '') === ''
9294 }
9295
9296
9297 /***/ }),
9298
9299 /***/ "../node_modules/is-plain-obj/index.js":
9300 /*!*********************************************!*\
9301 !*** ../node_modules/is-plain-obj/index.js ***!
9302 \*********************************************/
9303 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
9304
9305 "use strict";
9306 __webpack_require__.r(__webpack_exports__);
9307 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9308 /* harmony export */ "default": () => (/* binding */ isPlainObject)
9309 /* harmony export */ });
9310 function isPlainObject(value) {
9311 if (typeof value !== 'object' || value === null) {
9312 return false;
9313 }
9314
9315 const prototype = Object.getPrototypeOf(value);
9316 return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
9317 }
9318
9319
9320 /***/ }),
9321
9322 /***/ "../node_modules/mdast-util-definitions/lib/index.js":
9323 /*!***********************************************************!*\
9324 !*** ../node_modules/mdast-util-definitions/lib/index.js ***!
9325 \***********************************************************/
9326 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
9327
9328 "use strict";
9329 __webpack_require__.r(__webpack_exports__);
9330 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9331 /* harmony export */ "definitions": () => (/* binding */ definitions)
9332 /* harmony export */ });
9333 /* harmony import */ var unist_util_visit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! unist-util-visit */ "../node_modules/unist-util-visit/lib/index.js");
9334 /**
9335 * @typedef {import('mdast').Root} Root
9336 * @typedef {import('mdast').Content} Content
9337 * @typedef {import('mdast').Definition} Definition
9338 */
9339
9340 /**
9341 * @typedef {Root | Content} Node
9342 *
9343 * @callback GetDefinition
9344 * Get a definition by identifier.
9345 * @param {string | null | undefined} [identifier]
9346 * Identifier of definition.
9347 * @returns {Definition | null}
9348 * Definition corresponding to `identifier` or `null`.
9349 */
9350
9351
9352
9353 const own = {}.hasOwnProperty
9354
9355 /**
9356 * Find definitions in `tree`.
9357 *
9358 * Uses CommonMark precedence, which means that earlier definitions are
9359 * preferred over duplicate later definitions.
9360 *
9361 * @param {Node} tree
9362 * Tree to check.
9363 * @returns {GetDefinition}
9364 * Getter.
9365 */
9366 function definitions(tree) {
9367 /** @type {Record<string, Definition>} */
9368 const cache = Object.create(null)
9369
9370 if (!tree || !tree.type) {
9371 throw new Error('mdast-util-definitions expected node')
9372 }
9373
9374 (0,unist_util_visit__WEBPACK_IMPORTED_MODULE_0__.visit)(tree, 'definition', (definition) => {
9375 const id = clean(definition.identifier)
9376 if (id && !own.call(cache, id)) {
9377 cache[id] = definition
9378 }
9379 })
9380
9381 return definition
9382
9383 /** @type {GetDefinition} */
9384 function definition(identifier) {
9385 const id = clean(identifier)
9386 // To do: next major: return `undefined` when not found.
9387 return id && own.call(cache, id) ? cache[id] : null
9388 }
9389 }
9390
9391 /**
9392 * @param {string | null | undefined} [value]
9393 * @returns {string}
9394 */
9395 function clean(value) {
9396 return String(value || '').toUpperCase()
9397 }
9398
9399
9400 /***/ }),
9401
9402 /***/ "../node_modules/mdast-util-from-markdown/dev/lib/index.js":
9403 /*!*****************************************************************!*\
9404 !*** ../node_modules/mdast-util-from-markdown/dev/lib/index.js ***!
9405 \*****************************************************************/
9406 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
9407
9408 "use strict";
9409 __webpack_require__.r(__webpack_exports__);
9410 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9411 /* harmony export */ "fromMarkdown": () => (/* binding */ fromMarkdown)
9412 /* harmony export */ });
9413 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
9414 /* harmony import */ var mdast_util_to_string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mdast-util-to-string */ "../node_modules/mdast-util-to-string/lib/index.js");
9415 /* harmony import */ var micromark_lib_parse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark/lib/parse.js */ "../node_modules/micromark/dev/lib/parse.js");
9416 /* harmony import */ var micromark_lib_preprocess_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark/lib/preprocess.js */ "../node_modules/micromark/dev/lib/preprocess.js");
9417 /* harmony import */ var micromark_lib_postprocess_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark/lib/postprocess.js */ "../node_modules/micromark/dev/lib/postprocess.js");
9418 /* harmony import */ var micromark_util_decode_numeric_character_reference__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! micromark-util-decode-numeric-character-reference */ "../node_modules/micromark-util-decode-numeric-character-reference/dev/index.js");
9419 /* harmony import */ var micromark_util_decode_string__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! micromark-util-decode-string */ "../node_modules/micromark-util-decode-string/dev/index.js");
9420 /* harmony import */ var micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! micromark-util-normalize-identifier */ "../node_modules/micromark-util-normalize-identifier/dev/index.js");
9421 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
9422 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
9423 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
9424 /* harmony import */ var decode_named_character_reference__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! decode-named-character-reference */ "../node_modules/decode-named-character-reference/index.dom.js");
9425 /* harmony import */ var unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! unist-util-stringify-position */ "../node_modules/unist-util-stringify-position/lib/index.js");
9426 /**
9427 * @typedef {import('micromark-util-types').Encoding} Encoding
9428 * @typedef {import('micromark-util-types').Event} Event
9429 * @typedef {import('micromark-util-types').ParseOptions} ParseOptions
9430 * @typedef {import('micromark-util-types').Token} Token
9431 * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
9432 * @typedef {import('micromark-util-types').Value} Value
9433 *
9434 * @typedef {import('unist').Parent} UnistParent
9435 * @typedef {import('unist').Point} Point
9436 *
9437 * @typedef {import('mdast').PhrasingContent} PhrasingContent
9438 * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent
9439 * @typedef {import('mdast').Content} Content
9440 * @typedef {import('mdast').Break} Break
9441 * @typedef {import('mdast').Blockquote} Blockquote
9442 * @typedef {import('mdast').Code} Code
9443 * @typedef {import('mdast').Definition} Definition
9444 * @typedef {import('mdast').Emphasis} Emphasis
9445 * @typedef {import('mdast').Heading} Heading
9446 * @typedef {import('mdast').HTML} HTML
9447 * @typedef {import('mdast').Image} Image
9448 * @typedef {import('mdast').ImageReference} ImageReference
9449 * @typedef {import('mdast').InlineCode} InlineCode
9450 * @typedef {import('mdast').Link} Link
9451 * @typedef {import('mdast').LinkReference} LinkReference
9452 * @typedef {import('mdast').List} List
9453 * @typedef {import('mdast').ListItem} ListItem
9454 * @typedef {import('mdast').Paragraph} Paragraph
9455 * @typedef {import('mdast').Root} Root
9456 * @typedef {import('mdast').Strong} Strong
9457 * @typedef {import('mdast').Text} Text
9458 * @typedef {import('mdast').ThematicBreak} ThematicBreak
9459 * @typedef {import('mdast').ReferenceType} ReferenceType
9460 * @typedef {import('../index.js').CompileData} CompileData
9461 */
9462
9463 /**
9464 * @typedef {Root | Content} Node
9465 * @typedef {Extract<Node, UnistParent>} Parent
9466 *
9467 * @typedef {Omit<UnistParent, 'type' | 'children'> & {type: 'fragment', children: Array<PhrasingContent>}} Fragment
9468 */
9469
9470 /**
9471 * @callback Transform
9472 * Extra transform, to change the AST afterwards.
9473 * @param {Root} tree
9474 * Tree to transform.
9475 * @returns {Root | undefined | null | void}
9476 * New tree or nothing (in which case the current tree is used).
9477 *
9478 * @callback Handle
9479 * Handle a token.
9480 * @param {CompileContext} this
9481 * Context.
9482 * @param {Token} token
9483 * Current token.
9484 * @returns {void}
9485 * Nothing.
9486 *
9487 * @typedef {Record<string, Handle>} Handles
9488 * Token types mapping to handles
9489 *
9490 * @callback OnEnterError
9491 * Handle the case where the `right` token is open, but it is closed (by the
9492 * `left` token) or because we reached the end of the document.
9493 * @param {Omit<CompileContext, 'sliceSerialize'>} this
9494 * Context.
9495 * @param {Token | undefined} left
9496 * Left token.
9497 * @param {Token} right
9498 * Right token.
9499 * @returns {void}
9500 * Nothing.
9501 *
9502 * @callback OnExitError
9503 * Handle the case where the `right` token is open but it is closed by
9504 * exiting the `left` token.
9505 * @param {Omit<CompileContext, 'sliceSerialize'>} this
9506 * Context.
9507 * @param {Token} left
9508 * Left token.
9509 * @param {Token} right
9510 * Right token.
9511 * @returns {void}
9512 * Nothing.
9513 *
9514 * @typedef {[Token, OnEnterError | undefined]} TokenTuple
9515 * Open token on the stack, with an optional error handler for when
9516 * that token isn’t closed properly.
9517 */
9518
9519 /**
9520 * @typedef Config
9521 * Configuration.
9522 *
9523 * We have our defaults, but extensions will add more.
9524 * @property {Array<string>} canContainEols
9525 * Token types where line endings are used.
9526 * @property {Handles} enter
9527 * Opening handles.
9528 * @property {Handles} exit
9529 * Closing handles.
9530 * @property {Array<Transform>} transforms
9531 * Tree transforms.
9532 *
9533 * @typedef {Partial<Config>} Extension
9534 * Change how markdown tokens from micromark are turned into mdast.
9535 *
9536 * @typedef CompileContext
9537 * mdast compiler context.
9538 * @property {Array<Node | Fragment>} stack
9539 * Stack of nodes.
9540 * @property {Array<TokenTuple>} tokenStack
9541 * Stack of tokens.
9542 * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key]} getData
9543 * Get data from the key/value store.
9544 * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void} setData
9545 * Set data into the key/value store.
9546 * @property {(this: CompileContext) => void} buffer
9547 * Capture some of the output data.
9548 * @property {(this: CompileContext) => string} resume
9549 * Stop capturing and access the output data.
9550 * @property {<Kind extends Node>(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter
9551 * Enter a token.
9552 * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit
9553 * Exit a token.
9554 * @property {TokenizeContext['sliceSerialize']} sliceSerialize
9555 * Get the string value of a token.
9556 * @property {Config} config
9557 * Configuration.
9558 *
9559 * @typedef FromMarkdownOptions
9560 * Configuration for how to build mdast.
9561 * @property {Array<Extension | Array<Extension>> | null | undefined} [mdastExtensions]
9562 * Extensions for this utility to change how tokens are turned into a tree.
9563 *
9564 * @typedef {ParseOptions & FromMarkdownOptions} Options
9565 * Configuration.
9566 */
9567
9568 // To do: micromark: create a registry of tokens?
9569 // To do: next major: don’t return given `Node` from `enter`.
9570 // To do: next major: remove setter/getter.
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586 const own = {}.hasOwnProperty
9587
9588 /**
9589 * @param value
9590 * Markdown to parse.
9591 * @param encoding
9592 * Character encoding for when `value` is `Buffer`.
9593 * @param options
9594 * Configuration.
9595 * @returns
9596 * mdast tree.
9597 */
9598 const fromMarkdown =
9599 /**
9600 * @type {(
9601 * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &
9602 * ((value: Value, options?: Options | null | undefined) => Root)
9603 * )}
9604 */
9605 (
9606 /**
9607 * @param {Value} value
9608 * @param {Encoding | Options | null | undefined} [encoding]
9609 * @param {Options | null | undefined} [options]
9610 * @returns {Root}
9611 */
9612 function (value, encoding, options) {
9613 if (typeof encoding !== 'string') {
9614 options = encoding
9615 encoding = undefined
9616 }
9617
9618 return compiler(options)(
9619 (0,micromark_lib_postprocess_js__WEBPACK_IMPORTED_MODULE_1__.postprocess)(
9620 // @ts-expect-error: micromark types need to accept `null`.
9621 (0,micromark_lib_parse_js__WEBPACK_IMPORTED_MODULE_2__.parse)(options).document().write((0,micromark_lib_preprocess_js__WEBPACK_IMPORTED_MODULE_3__.preprocess)()(value, encoding, true))
9622 )
9623 )
9624 }
9625 )
9626
9627 /**
9628 * Note this compiler only understand complete buffering, not streaming.
9629 *
9630 * @param {Options | null | undefined} [options]
9631 */
9632 function compiler(options) {
9633 /** @type {Config} */
9634 const config = {
9635 transforms: [],
9636 canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],
9637 enter: {
9638 autolink: opener(link),
9639 autolinkProtocol: onenterdata,
9640 autolinkEmail: onenterdata,
9641 atxHeading: opener(heading),
9642 blockQuote: opener(blockQuote),
9643 characterEscape: onenterdata,
9644 characterReference: onenterdata,
9645 codeFenced: opener(codeFlow),
9646 codeFencedFenceInfo: buffer,
9647 codeFencedFenceMeta: buffer,
9648 codeIndented: opener(codeFlow, buffer),
9649 codeText: opener(codeText, buffer),
9650 codeTextData: onenterdata,
9651 data: onenterdata,
9652 codeFlowValue: onenterdata,
9653 definition: opener(definition),
9654 definitionDestinationString: buffer,
9655 definitionLabelString: buffer,
9656 definitionTitleString: buffer,
9657 emphasis: opener(emphasis),
9658 hardBreakEscape: opener(hardBreak),
9659 hardBreakTrailing: opener(hardBreak),
9660 htmlFlow: opener(html, buffer),
9661 htmlFlowData: onenterdata,
9662 htmlText: opener(html, buffer),
9663 htmlTextData: onenterdata,
9664 image: opener(image),
9665 label: buffer,
9666 link: opener(link),
9667 listItem: opener(listItem),
9668 listItemValue: onenterlistitemvalue,
9669 listOrdered: opener(list, onenterlistordered),
9670 listUnordered: opener(list),
9671 paragraph: opener(paragraph),
9672 reference: onenterreference,
9673 referenceString: buffer,
9674 resourceDestinationString: buffer,
9675 resourceTitleString: buffer,
9676 setextHeading: opener(heading),
9677 strong: opener(strong),
9678 thematicBreak: opener(thematicBreak)
9679 },
9680 exit: {
9681 atxHeading: closer(),
9682 atxHeadingSequence: onexitatxheadingsequence,
9683 autolink: closer(),
9684 autolinkEmail: onexitautolinkemail,
9685 autolinkProtocol: onexitautolinkprotocol,
9686 blockQuote: closer(),
9687 characterEscapeValue: onexitdata,
9688 characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
9689 characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
9690 characterReferenceValue: onexitcharacterreferencevalue,
9691 codeFenced: closer(onexitcodefenced),
9692 codeFencedFence: onexitcodefencedfence,
9693 codeFencedFenceInfo: onexitcodefencedfenceinfo,
9694 codeFencedFenceMeta: onexitcodefencedfencemeta,
9695 codeFlowValue: onexitdata,
9696 codeIndented: closer(onexitcodeindented),
9697 codeText: closer(onexitcodetext),
9698 codeTextData: onexitdata,
9699 data: onexitdata,
9700 definition: closer(),
9701 definitionDestinationString: onexitdefinitiondestinationstring,
9702 definitionLabelString: onexitdefinitionlabelstring,
9703 definitionTitleString: onexitdefinitiontitlestring,
9704 emphasis: closer(),
9705 hardBreakEscape: closer(onexithardbreak),
9706 hardBreakTrailing: closer(onexithardbreak),
9707 htmlFlow: closer(onexithtmlflow),
9708 htmlFlowData: onexitdata,
9709 htmlText: closer(onexithtmltext),
9710 htmlTextData: onexitdata,
9711 image: closer(onexitimage),
9712 label: onexitlabel,
9713 labelText: onexitlabeltext,
9714 lineEnding: onexitlineending,
9715 link: closer(onexitlink),
9716 listItem: closer(),
9717 listOrdered: closer(),
9718 listUnordered: closer(),
9719 paragraph: closer(),
9720 referenceString: onexitreferencestring,
9721 resourceDestinationString: onexitresourcedestinationstring,
9722 resourceTitleString: onexitresourcetitlestring,
9723 resource: onexitresource,
9724 setextHeading: closer(onexitsetextheading),
9725 setextHeadingLineSequence: onexitsetextheadinglinesequence,
9726 setextHeadingText: onexitsetextheadingtext,
9727 strong: closer(),
9728 thematicBreak: closer()
9729 }
9730 }
9731
9732 configure(config, (options || {}).mdastExtensions || [])
9733
9734 /** @type {CompileData} */
9735 const data = {}
9736
9737 return compile
9738
9739 /**
9740 * Turn micromark events into an mdast tree.
9741 *
9742 * @param {Array<Event>} events
9743 * Events.
9744 * @returns {Root}
9745 * mdast tree.
9746 */
9747 function compile(events) {
9748 /** @type {Root} */
9749 let tree = {type: 'root', children: []}
9750 /** @type {Omit<CompileContext, 'sliceSerialize'>} */
9751 const context = {
9752 stack: [tree],
9753 tokenStack: [],
9754 config,
9755 enter,
9756 exit,
9757 buffer,
9758 resume,
9759 setData,
9760 getData
9761 }
9762 /** @type {Array<number>} */
9763 const listStack = []
9764 let index = -1
9765
9766 while (++index < events.length) {
9767 // We preprocess lists to add `listItem` tokens, and to infer whether
9768 // items the list itself are spread out.
9769 if (
9770 events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listOrdered ||
9771 events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listUnordered
9772 ) {
9773 if (events[index][0] === 'enter') {
9774 listStack.push(index)
9775 } else {
9776 const tail = listStack.pop()
9777 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(typeof tail === 'number', 'expected list ot be open')
9778 index = prepareList(events, tail, index)
9779 }
9780 }
9781 }
9782
9783 index = -1
9784
9785 while (++index < events.length) {
9786 const handler = config[events[index][0]]
9787
9788 if (own.call(handler, events[index][1].type)) {
9789 handler[events[index][1].type].call(
9790 Object.assign(
9791 {sliceSerialize: events[index][2].sliceSerialize},
9792 context
9793 ),
9794 events[index][1]
9795 )
9796 }
9797 }
9798
9799 // Handle tokens still being open.
9800 if (context.tokenStack.length > 0) {
9801 const tail = context.tokenStack[context.tokenStack.length - 1]
9802 const handler = tail[1] || defaultOnError
9803 handler.call(context, undefined, tail[0])
9804 }
9805
9806 // Figure out `root` position.
9807 tree.position = {
9808 start: point(
9809 events.length > 0 ? events[0][1].start : {line: 1, column: 1, offset: 0}
9810 ),
9811 end: point(
9812 events.length > 0
9813 ? events[events.length - 2][1].end
9814 : {line: 1, column: 1, offset: 0}
9815 )
9816 }
9817
9818 // Call transforms.
9819 index = -1
9820 while (++index < config.transforms.length) {
9821 tree = config.transforms[index](tree) || tree
9822 }
9823
9824 return tree
9825 }
9826
9827 /**
9828 * @param {Array<Event>} events
9829 * @param {number} start
9830 * @param {number} length
9831 * @returns {number}
9832 */
9833 function prepareList(events, start, length) {
9834 let index = start - 1
9835 let containerBalance = -1
9836 let listSpread = false
9837 /** @type {Token | undefined} */
9838 let listItem
9839 /** @type {number | undefined} */
9840 let lineIndex
9841 /** @type {number | undefined} */
9842 let firstBlankLineIndex
9843 /** @type {boolean | undefined} */
9844 let atMarker
9845
9846 while (++index <= length) {
9847 const event = events[index]
9848
9849 if (
9850 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listUnordered ||
9851 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listOrdered ||
9852 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.blockQuote
9853 ) {
9854 if (event[0] === 'enter') {
9855 containerBalance++
9856 } else {
9857 containerBalance--
9858 }
9859
9860 atMarker = undefined
9861 } else if (event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank) {
9862 if (event[0] === 'enter') {
9863 if (
9864 listItem &&
9865 !atMarker &&
9866 !containerBalance &&
9867 !firstBlankLineIndex
9868 ) {
9869 firstBlankLineIndex = index
9870 }
9871
9872 atMarker = undefined
9873 }
9874 } else if (
9875 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.linePrefix ||
9876 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemValue ||
9877 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemMarker ||
9878 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemPrefix ||
9879 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemPrefixWhitespace
9880 ) {
9881 // Empty.
9882 } else {
9883 atMarker = undefined
9884 }
9885
9886 if (
9887 (!containerBalance &&
9888 event[0] === 'enter' &&
9889 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemPrefix) ||
9890 (containerBalance === -1 &&
9891 event[0] === 'exit' &&
9892 (event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listUnordered ||
9893 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listOrdered))
9894 ) {
9895 if (listItem) {
9896 let tailIndex = index
9897 lineIndex = undefined
9898
9899 while (tailIndex--) {
9900 const tailEvent = events[tailIndex]
9901
9902 if (
9903 tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding ||
9904 tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank
9905 ) {
9906 if (tailEvent[0] === 'exit') continue
9907
9908 if (lineIndex) {
9909 events[lineIndex][1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank
9910 listSpread = true
9911 }
9912
9913 tailEvent[1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding
9914 lineIndex = tailIndex
9915 } else if (
9916 tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.linePrefix ||
9917 tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.blockQuotePrefix ||
9918 tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.blockQuotePrefixWhitespace ||
9919 tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.blockQuoteMarker ||
9920 tailEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemIndent
9921 ) {
9922 // Empty
9923 } else {
9924 break
9925 }
9926 }
9927
9928 if (
9929 firstBlankLineIndex &&
9930 (!lineIndex || firstBlankLineIndex < lineIndex)
9931 ) {
9932 // @ts-expect-error Patched.
9933 listItem._spread = true
9934 }
9935
9936 // Fix position.
9937 listItem.end = Object.assign(
9938 {},
9939 lineIndex ? events[lineIndex][1].start : event[1].end
9940 )
9941
9942 events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])
9943 index++
9944 length++
9945 }
9946
9947 // Create a new list item.
9948 if (event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.listItemPrefix) {
9949 listItem = {
9950 type: 'listItem',
9951 // @ts-expect-error Patched
9952 _spread: false,
9953 start: Object.assign({}, event[1].start)
9954 }
9955 // @ts-expect-error: `listItem` is most definitely defined, TS...
9956 events.splice(index, 0, ['enter', listItem, event[2]])
9957 index++
9958 length++
9959 firstBlankLineIndex = undefined
9960 atMarker = true
9961 }
9962 }
9963 }
9964
9965 // @ts-expect-error Patched.
9966 events[start][1]._spread = listSpread
9967 return length
9968 }
9969
9970 /**
9971 * Set data.
9972 *
9973 * @template {keyof CompileData} Key
9974 * Field type.
9975 * @param {Key} key
9976 * Key of field.
9977 * @param {CompileData[Key]} [value]
9978 * New value.
9979 * @returns {void}
9980 * Nothing.
9981 */
9982 function setData(key, value) {
9983 data[key] = value
9984 }
9985
9986 /**
9987 * Get data.
9988 *
9989 * @template {keyof CompileData} Key
9990 * Field type.
9991 * @param {Key} key
9992 * Key of field.
9993 * @returns {CompileData[Key]}
9994 * Value.
9995 */
9996 function getData(key) {
9997 return data[key]
9998 }
9999
10000 /**
10001 * Create an opener handle.
10002 *
10003 * @param {(token: Token) => Node} create
10004 * Create a node.
10005 * @param {Handle} [and]
10006 * Optional function to also run.
10007 * @returns {Handle}
10008 * Handle.
10009 */
10010 function opener(create, and) {
10011 return open
10012
10013 /**
10014 * @this {CompileContext}
10015 * @param {Token} token
10016 * @returns {void}
10017 */
10018 function open(token) {
10019 enter.call(this, create(token), token)
10020 if (and) and.call(this, token)
10021 }
10022 }
10023
10024 /**
10025 * @this {CompileContext}
10026 * @returns {void}
10027 */
10028 function buffer() {
10029 this.stack.push({type: 'fragment', children: []})
10030 }
10031
10032 /**
10033 * @template {Node} Kind
10034 * Node type.
10035 * @this {CompileContext}
10036 * Context.
10037 * @param {Kind} node
10038 * Node to enter.
10039 * @param {Token} token
10040 * Corresponding token.
10041 * @param {OnEnterError | undefined} [errorHandler]
10042 * Handle the case where this token is open, but it is closed by something else.
10043 * @returns {Kind}
10044 * The given node.
10045 */
10046 function enter(node, token, errorHandler) {
10047 const parent = this.stack[this.stack.length - 1]
10048 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(parent, 'expected `parent`')
10049 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)('children' in parent, 'expected `parent`')
10050 // @ts-expect-error: Assume `Node` can exist as a child of `parent`.
10051 parent.children.push(node)
10052 this.stack.push(node)
10053 this.tokenStack.push([token, errorHandler])
10054 // @ts-expect-error: `end` will be patched later.
10055 node.position = {start: point(token.start)}
10056 return node
10057 }
10058
10059 /**
10060 * Create a closer handle.
10061 *
10062 * @param {Handle} [and]
10063 * Optional function to also run.
10064 * @returns {Handle}
10065 * Handle.
10066 */
10067 function closer(and) {
10068 return close
10069
10070 /**
10071 * @this {CompileContext}
10072 * @param {Token} token
10073 * @returns {void}
10074 */
10075 function close(token) {
10076 if (and) and.call(this, token)
10077 exit.call(this, token)
10078 }
10079 }
10080
10081 /**
10082 * @this {CompileContext}
10083 * Context.
10084 * @param {Token} token
10085 * Corresponding token.
10086 * @param {OnExitError | undefined} [onExitError]
10087 * Handle the case where another token is open.
10088 * @returns {Node}
10089 * The closed node.
10090 */
10091 function exit(token, onExitError) {
10092 const node = this.stack.pop()
10093 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected `node`')
10094 const open = this.tokenStack.pop()
10095
10096 if (!open) {
10097 throw new Error(
10098 'Cannot close `' +
10099 token.type +
10100 '` (' +
10101 (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__.stringifyPosition)({start: token.start, end: token.end}) +
10102 '): it’s not open'
10103 )
10104 } else if (open[0].type !== token.type) {
10105 if (onExitError) {
10106 onExitError.call(this, token, open[0])
10107 } else {
10108 const handler = open[1] || defaultOnError
10109 handler.call(this, token, open[0])
10110 }
10111 }
10112
10113 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type !== 'fragment', 'unexpected fragment `exit`ed')
10114 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.position, 'expected `position` to be defined')
10115 node.position.end = point(token.end)
10116 return node
10117 }
10118
10119 /**
10120 * @this {CompileContext}
10121 * @returns {string}
10122 */
10123 function resume() {
10124 return (0,mdast_util_to_string__WEBPACK_IMPORTED_MODULE_6__.toString)(this.stack.pop())
10125 }
10126
10127 //
10128 // Handlers.
10129 //
10130
10131 /**
10132 * @this {CompileContext}
10133 * @type {Handle}
10134 */
10135 function onenterlistordered() {
10136 setData('expectingFirstListItemValue', true)
10137 }
10138
10139 /**
10140 * @this {CompileContext}
10141 * @type {Handle}
10142 */
10143 function onenterlistitemvalue(token) {
10144 if (getData('expectingFirstListItemValue')) {
10145 const ancestor = this.stack[this.stack.length - 2]
10146 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(ancestor, 'expected nodes on stack')
10147 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(ancestor.type === 'list', 'expected list on stack')
10148 ancestor.start = Number.parseInt(
10149 this.sliceSerialize(token),
10150 micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_7__.constants.numericBaseDecimal
10151 )
10152 setData('expectingFirstListItemValue')
10153 }
10154 }
10155
10156 /**
10157 * @this {CompileContext}
10158 * @type {Handle}
10159 */
10160 function onexitcodefencedfenceinfo() {
10161 const data = this.resume()
10162 const node = this.stack[this.stack.length - 1]
10163 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10164 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'code', 'expected code on stack')
10165 node.lang = data
10166 }
10167
10168 /**
10169 * @this {CompileContext}
10170 * @type {Handle}
10171 */
10172 function onexitcodefencedfencemeta() {
10173 const data = this.resume()
10174 const node = this.stack[this.stack.length - 1]
10175 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10176 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'code', 'expected code on stack')
10177 node.meta = data
10178 }
10179
10180 /**
10181 * @this {CompileContext}
10182 * @type {Handle}
10183 */
10184 function onexitcodefencedfence() {
10185 // Exit if this is the closing fence.
10186 if (getData('flowCodeInside')) return
10187 this.buffer()
10188 setData('flowCodeInside', true)
10189 }
10190
10191 /**
10192 * @this {CompileContext}
10193 * @type {Handle}
10194 */
10195 function onexitcodefenced() {
10196 const data = this.resume()
10197 const node = this.stack[this.stack.length - 1]
10198 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10199 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'code', 'expected code on stack')
10200
10201 node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '')
10202 setData('flowCodeInside')
10203 }
10204
10205 /**
10206 * @this {CompileContext}
10207 * @type {Handle}
10208 */
10209 function onexitcodeindented() {
10210 const data = this.resume()
10211 const node = this.stack[this.stack.length - 1]
10212 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10213 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'code', 'expected code on stack')
10214
10215 node.value = data.replace(/(\r?\n|\r)$/g, '')
10216 }
10217
10218 /**
10219 * @this {CompileContext}
10220 * @type {Handle}
10221 */
10222 function onexitdefinitionlabelstring(token) {
10223 const label = this.resume()
10224 const node = this.stack[this.stack.length - 1]
10225 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10226 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'definition', 'expected definition on stack')
10227
10228 node.label = label
10229 node.identifier = (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_8__.normalizeIdentifier)(
10230 this.sliceSerialize(token)
10231 ).toLowerCase()
10232 }
10233
10234 /**
10235 * @this {CompileContext}
10236 * @type {Handle}
10237 */
10238 function onexitdefinitiontitlestring() {
10239 const data = this.resume()
10240 const node = this.stack[this.stack.length - 1]
10241 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10242 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'definition', 'expected definition on stack')
10243
10244 node.title = data
10245 }
10246
10247 /**
10248 * @this {CompileContext}
10249 * @type {Handle}
10250 */
10251 function onexitdefinitiondestinationstring() {
10252 const data = this.resume()
10253 const node = this.stack[this.stack.length - 1]
10254 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10255 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'definition', 'expected definition on stack')
10256
10257 node.url = data
10258 }
10259
10260 /**
10261 * @this {CompileContext}
10262 * @type {Handle}
10263 */
10264 function onexitatxheadingsequence(token) {
10265 const node = this.stack[this.stack.length - 1]
10266 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10267 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'heading', 'expected heading on stack')
10268
10269 if (!node.depth) {
10270 const depth = this.sliceSerialize(token).length
10271
10272 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
10273 depth === 1 ||
10274 depth === 2 ||
10275 depth === 3 ||
10276 depth === 4 ||
10277 depth === 5 ||
10278 depth === 6,
10279 'expected `depth` between `1` and `6`'
10280 )
10281
10282 node.depth = depth
10283 }
10284 }
10285
10286 /**
10287 * @this {CompileContext}
10288 * @type {Handle}
10289 */
10290 function onexitsetextheadingtext() {
10291 setData('setextHeadingSlurpLineEnding', true)
10292 }
10293
10294 /**
10295 * @this {CompileContext}
10296 * @type {Handle}
10297 */
10298 function onexitsetextheadinglinesequence(token) {
10299 const node = this.stack[this.stack.length - 1]
10300 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10301 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'heading', 'expected heading on stack')
10302
10303 node.depth =
10304 this.sliceSerialize(token).charCodeAt(0) === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_9__.codes.equalsTo ? 1 : 2
10305 }
10306
10307 /**
10308 * @this {CompileContext}
10309 * @type {Handle}
10310 */
10311 function onexitsetextheading() {
10312 setData('setextHeadingSlurpLineEnding')
10313 }
10314
10315 /**
10316 * @this {CompileContext}
10317 * @type {Handle}
10318 */
10319
10320 function onenterdata(token) {
10321 const node = this.stack[this.stack.length - 1]
10322 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10323 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)('children' in node, 'expected parent on stack')
10324
10325 let tail = node.children[node.children.length - 1]
10326
10327 if (!tail || tail.type !== 'text') {
10328 // Add a new text node.
10329 tail = text()
10330 // @ts-expect-error: we’ll add `end` later.
10331 tail.position = {start: point(token.start)}
10332 // @ts-expect-error: Assume `parent` accepts `text`.
10333 node.children.push(tail)
10334 }
10335
10336 this.stack.push(tail)
10337 }
10338
10339 /**
10340 * @this {CompileContext}
10341 * @type {Handle}
10342 */
10343
10344 function onexitdata(token) {
10345 const tail = this.stack.pop()
10346 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(tail, 'expected a `node` to be on the stack')
10347 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)('value' in tail, 'expected a `literal` to be on the stack')
10348 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(tail.position, 'expected `node` to have an open position')
10349 tail.value += this.sliceSerialize(token)
10350 tail.position.end = point(token.end)
10351 }
10352
10353 /**
10354 * @this {CompileContext}
10355 * @type {Handle}
10356 */
10357
10358 function onexitlineending(token) {
10359 const context = this.stack[this.stack.length - 1]
10360 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(context, 'expected `node`')
10361
10362 // If we’re at a hard break, include the line ending in there.
10363 if (getData('atHardBreak')) {
10364 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)('children' in context, 'expected `parent`')
10365 const tail = context.children[context.children.length - 1]
10366 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(tail.position, 'expected tail to have a starting position')
10367 tail.position.end = point(token.end)
10368 setData('atHardBreak')
10369 return
10370 }
10371
10372 if (
10373 !getData('setextHeadingSlurpLineEnding') &&
10374 config.canContainEols.includes(context.type)
10375 ) {
10376 onenterdata.call(this, token)
10377 onexitdata.call(this, token)
10378 }
10379 }
10380
10381 /**
10382 * @this {CompileContext}
10383 * @type {Handle}
10384 */
10385
10386 function onexithardbreak() {
10387 setData('atHardBreak', true)
10388 }
10389
10390 /**
10391 * @this {CompileContext}
10392 * @type {Handle}
10393 */
10394
10395 function onexithtmlflow() {
10396 const data = this.resume()
10397 const node = this.stack[this.stack.length - 1]
10398 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10399 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'html', 'expected html on stack')
10400
10401 node.value = data
10402 }
10403
10404 /**
10405 * @this {CompileContext}
10406 * @type {Handle}
10407 */
10408
10409 function onexithtmltext() {
10410 const data = this.resume()
10411 const node = this.stack[this.stack.length - 1]
10412 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10413 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'html', 'expected html on stack')
10414
10415 node.value = data
10416 }
10417
10418 /**
10419 * @this {CompileContext}
10420 * @type {Handle}
10421 */
10422
10423 function onexitcodetext() {
10424 const data = this.resume()
10425 const node = this.stack[this.stack.length - 1]
10426 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10427 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'inlineCode', 'expected inline code on stack')
10428
10429 node.value = data
10430 }
10431
10432 /**
10433 * @this {CompileContext}
10434 * @type {Handle}
10435 */
10436
10437 function onexitlink() {
10438 const node = this.stack[this.stack.length - 1]
10439 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10440 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'link', 'expected link on stack')
10441
10442 // Note: there are also `identifier` and `label` fields on this link node!
10443 // These are used / cleaned here.
10444
10445 // To do: clean.
10446 if (getData('inReference')) {
10447 /** @type {ReferenceType} */
10448 const referenceType = getData('referenceType') || 'shortcut'
10449
10450 node.type += 'Reference'
10451 // @ts-expect-error: mutate.
10452 node.referenceType = referenceType
10453 // @ts-expect-error: mutate.
10454 delete node.url
10455 delete node.title
10456 } else {
10457 // @ts-expect-error: mutate.
10458 delete node.identifier
10459 // @ts-expect-error: mutate.
10460 delete node.label
10461 }
10462
10463 setData('referenceType')
10464 }
10465
10466 /**
10467 * @this {CompileContext}
10468 * @type {Handle}
10469 */
10470
10471 function onexitimage() {
10472 const node = this.stack[this.stack.length - 1]
10473 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10474 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'image', 'expected image on stack')
10475
10476 // Note: there are also `identifier` and `label` fields on this link node!
10477 // These are used / cleaned here.
10478
10479 // To do: clean.
10480 if (getData('inReference')) {
10481 /** @type {ReferenceType} */
10482 const referenceType = getData('referenceType') || 'shortcut'
10483
10484 node.type += 'Reference'
10485 // @ts-expect-error: mutate.
10486 node.referenceType = referenceType
10487 // @ts-expect-error: mutate.
10488 delete node.url
10489 delete node.title
10490 } else {
10491 // @ts-expect-error: mutate.
10492 delete node.identifier
10493 // @ts-expect-error: mutate.
10494 delete node.label
10495 }
10496
10497 setData('referenceType')
10498 }
10499
10500 /**
10501 * @this {CompileContext}
10502 * @type {Handle}
10503 */
10504
10505 function onexitlabeltext(token) {
10506 const string = this.sliceSerialize(token)
10507 const ancestor = this.stack[this.stack.length - 2]
10508 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(ancestor, 'expected ancestor on stack')
10509 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
10510 ancestor.type === 'image' || ancestor.type === 'link',
10511 'expected image or link on stack'
10512 )
10513
10514 // @ts-expect-error: stash this on the node, as it might become a reference
10515 // later.
10516 ancestor.label = (0,micromark_util_decode_string__WEBPACK_IMPORTED_MODULE_10__.decodeString)(string)
10517 // @ts-expect-error: same as above.
10518 ancestor.identifier = (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_8__.normalizeIdentifier)(string).toLowerCase()
10519 }
10520
10521 /**
10522 * @this {CompileContext}
10523 * @type {Handle}
10524 */
10525
10526 function onexitlabel() {
10527 const fragment = this.stack[this.stack.length - 1]
10528 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(fragment, 'expected node on stack')
10529 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(fragment.type === 'fragment', 'expected fragment on stack')
10530 const value = this.resume()
10531 const node = this.stack[this.stack.length - 1]
10532 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10533 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
10534 node.type === 'image' || node.type === 'link',
10535 'expected image or link on stack'
10536 )
10537
10538 // Assume a reference.
10539 setData('inReference', true)
10540
10541 if (node.type === 'link') {
10542 /** @type {Array<StaticPhrasingContent>} */
10543 // @ts-expect-error: Assume static phrasing content.
10544 const children = fragment.children
10545
10546 node.children = children
10547 } else {
10548 node.alt = value
10549 }
10550 }
10551
10552 /**
10553 * @this {CompileContext}
10554 * @type {Handle}
10555 */
10556
10557 function onexitresourcedestinationstring() {
10558 const data = this.resume()
10559 const node = this.stack[this.stack.length - 1]
10560 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10561 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
10562 node.type === 'image' || node.type === 'link',
10563 'expected image or link on stack'
10564 )
10565 node.url = data
10566 }
10567
10568 /**
10569 * @this {CompileContext}
10570 * @type {Handle}
10571 */
10572
10573 function onexitresourcetitlestring() {
10574 const data = this.resume()
10575 const node = this.stack[this.stack.length - 1]
10576 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10577 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
10578 node.type === 'image' || node.type === 'link',
10579 'expected image or link on stack'
10580 )
10581 node.title = data
10582 }
10583
10584 /**
10585 * @this {CompileContext}
10586 * @type {Handle}
10587 */
10588
10589 function onexitresource() {
10590 setData('inReference')
10591 }
10592
10593 /**
10594 * @this {CompileContext}
10595 * @type {Handle}
10596 */
10597
10598 function onenterreference() {
10599 setData('referenceType', 'collapsed')
10600 }
10601
10602 /**
10603 * @this {CompileContext}
10604 * @type {Handle}
10605 */
10606
10607 function onexitreferencestring(token) {
10608 const label = this.resume()
10609 const node = this.stack[this.stack.length - 1]
10610 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10611 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
10612 node.type === 'image' || node.type === 'link',
10613 'expected image reference or link reference on stack'
10614 )
10615
10616 // @ts-expect-error: stash this on the node, as it might become a reference
10617 // later.
10618 node.label = label
10619 // @ts-expect-error: same as above.
10620 node.identifier = (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_8__.normalizeIdentifier)(
10621 this.sliceSerialize(token)
10622 ).toLowerCase()
10623 setData('referenceType', 'full')
10624 }
10625
10626 /**
10627 * @this {CompileContext}
10628 * @type {Handle}
10629 */
10630
10631 function onexitcharacterreferencemarker(token) {
10632 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
10633 token.type === 'characterReferenceMarkerNumeric' ||
10634 token.type === 'characterReferenceMarkerHexadecimal'
10635 )
10636 setData('characterReferenceType', token.type)
10637 }
10638
10639 /**
10640 * @this {CompileContext}
10641 * @type {Handle}
10642 */
10643 function onexitcharacterreferencevalue(token) {
10644 const data = this.sliceSerialize(token)
10645 const type = getData('characterReferenceType')
10646 /** @type {string} */
10647 let value
10648
10649 if (type) {
10650 value = (0,micromark_util_decode_numeric_character_reference__WEBPACK_IMPORTED_MODULE_11__.decodeNumericCharacterReference)(
10651 data,
10652 type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.characterReferenceMarkerNumeric
10653 ? micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_7__.constants.numericBaseDecimal
10654 : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_7__.constants.numericBaseHexadecimal
10655 )
10656 setData('characterReferenceType')
10657 } else {
10658 const result = (0,decode_named_character_reference__WEBPACK_IMPORTED_MODULE_12__.decodeNamedCharacterReference)(data)
10659 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(result !== false, 'expected reference to decode')
10660 value = result
10661 }
10662
10663 const tail = this.stack.pop()
10664 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(tail, 'expected `node`')
10665 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(tail.position, 'expected `node.position`')
10666 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)('value' in tail, 'expected `node.value`')
10667 tail.value += value
10668 tail.position.end = point(token.end)
10669 }
10670
10671 /**
10672 * @this {CompileContext}
10673 * @type {Handle}
10674 */
10675 function onexitautolinkprotocol(token) {
10676 onexitdata.call(this, token)
10677 const node = this.stack[this.stack.length - 1]
10678 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10679 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'link', 'expected link on stack')
10680
10681 node.url = this.sliceSerialize(token)
10682 }
10683
10684 /**
10685 * @this {CompileContext}
10686 * @type {Handle}
10687 */
10688 function onexitautolinkemail(token) {
10689 onexitdata.call(this, token)
10690 const node = this.stack[this.stack.length - 1]
10691 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node, 'expected node on stack')
10692 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(node.type === 'link', 'expected link on stack')
10693
10694 node.url = 'mailto:' + this.sliceSerialize(token)
10695 }
10696
10697 //
10698 // Creaters.
10699 //
10700
10701 /** @returns {Blockquote} */
10702 function blockQuote() {
10703 return {type: 'blockquote', children: []}
10704 }
10705
10706 /** @returns {Code} */
10707 function codeFlow() {
10708 return {type: 'code', lang: null, meta: null, value: ''}
10709 }
10710
10711 /** @returns {InlineCode} */
10712 function codeText() {
10713 return {type: 'inlineCode', value: ''}
10714 }
10715
10716 /** @returns {Definition} */
10717 function definition() {
10718 return {
10719 type: 'definition',
10720 identifier: '',
10721 label: null,
10722 title: null,
10723 url: ''
10724 }
10725 }
10726
10727 /** @returns {Emphasis} */
10728 function emphasis() {
10729 return {type: 'emphasis', children: []}
10730 }
10731
10732 /** @returns {Heading} */
10733 function heading() {
10734 // @ts-expect-error `depth` will be set later.
10735 return {type: 'heading', depth: undefined, children: []}
10736 }
10737
10738 /** @returns {Break} */
10739 function hardBreak() {
10740 return {type: 'break'}
10741 }
10742
10743 /** @returns {HTML} */
10744 function html() {
10745 return {type: 'html', value: ''}
10746 }
10747
10748 /** @returns {Image} */
10749 function image() {
10750 return {type: 'image', title: null, url: '', alt: null}
10751 }
10752
10753 /** @returns {Link} */
10754 function link() {
10755 return {type: 'link', title: null, url: '', children: []}
10756 }
10757
10758 /**
10759 * @param {Token} token
10760 * @returns {List}
10761 */
10762 function list(token) {
10763 return {
10764 type: 'list',
10765 ordered: token.type === 'listOrdered',
10766 start: null,
10767 // @ts-expect-error Patched.
10768 spread: token._spread,
10769 children: []
10770 }
10771 }
10772
10773 /**
10774 * @param {Token} token
10775 * @returns {ListItem}
10776 */
10777 function listItem(token) {
10778 return {
10779 type: 'listItem',
10780 // @ts-expect-error Patched.
10781 spread: token._spread,
10782 checked: null,
10783 children: []
10784 }
10785 }
10786
10787 /** @returns {Paragraph} */
10788 function paragraph() {
10789 return {type: 'paragraph', children: []}
10790 }
10791
10792 /** @returns {Strong} */
10793 function strong() {
10794 return {type: 'strong', children: []}
10795 }
10796
10797 /** @returns {Text} */
10798 function text() {
10799 return {type: 'text', value: ''}
10800 }
10801
10802 /** @returns {ThematicBreak} */
10803 function thematicBreak() {
10804 return {type: 'thematicBreak'}
10805 }
10806 }
10807
10808 /**
10809 * Copy a point-like value.
10810 *
10811 * @param {Point} d
10812 * Point-like value.
10813 * @returns {Point}
10814 * unist point.
10815 */
10816 function point(d) {
10817 return {line: d.line, column: d.column, offset: d.offset}
10818 }
10819
10820 /**
10821 * @param {Config} combined
10822 * @param {Array<Extension | Array<Extension>>} extensions
10823 * @returns {void}
10824 */
10825 function configure(combined, extensions) {
10826 let index = -1
10827
10828 while (++index < extensions.length) {
10829 const value = extensions[index]
10830
10831 if (Array.isArray(value)) {
10832 configure(combined, value)
10833 } else {
10834 extension(combined, value)
10835 }
10836 }
10837 }
10838
10839 /**
10840 * @param {Config} combined
10841 * @param {Extension} extension
10842 * @returns {void}
10843 */
10844 function extension(combined, extension) {
10845 /** @type {keyof Extension} */
10846 let key
10847
10848 for (key in extension) {
10849 if (own.call(extension, key)) {
10850 if (key === 'canContainEols') {
10851 const right = extension[key]
10852 if (right) {
10853 combined[key].push(...right)
10854 }
10855 } else if (key === 'transforms') {
10856 const right = extension[key]
10857 if (right) {
10858 combined[key].push(...right)
10859 }
10860 } else if (key === 'enter' || key === 'exit') {
10861 const right = extension[key]
10862 if (right) {
10863 Object.assign(combined[key], right)
10864 }
10865 }
10866 }
10867 }
10868 }
10869
10870 /** @type {OnEnterError} */
10871 function defaultOnError(left, right) {
10872 if (left) {
10873 throw new Error(
10874 'Cannot close `' +
10875 left.type +
10876 '` (' +
10877 (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__.stringifyPosition)({start: left.start, end: left.end}) +
10878 '): a different token (`' +
10879 right.type +
10880 '`, ' +
10881 (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__.stringifyPosition)({start: right.start, end: right.end}) +
10882 ') is open'
10883 )
10884 } else {
10885 throw new Error(
10886 'Cannot close document, a token (`' +
10887 right.type +
10888 '`, ' +
10889 (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_5__.stringifyPosition)({start: right.start, end: right.end}) +
10890 ') is still open'
10891 )
10892 }
10893 }
10894
10895
10896 /***/ }),
10897
10898 /***/ "../node_modules/mdast-util-to-hast/lib/footer.js":
10899 /*!********************************************************!*\
10900 !*** ../node_modules/mdast-util-to-hast/lib/footer.js ***!
10901 \********************************************************/
10902 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
10903
10904 "use strict";
10905 __webpack_require__.r(__webpack_exports__);
10906 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10907 /* harmony export */ "footer": () => (/* binding */ footer)
10908 /* harmony export */ });
10909 /* harmony import */ var micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-sanitize-uri */ "../node_modules/micromark-util-sanitize-uri/dev/index.js");
10910 /**
10911 * @typedef {import('hast').Element} Element
10912 * @typedef {import('hast').ElementContent} ElementContent
10913 *
10914 * @typedef {import('./state.js').State} State
10915 */
10916
10917
10918
10919 /**
10920 * Generate a hast footer for called footnote definitions.
10921 *
10922 * @param {State} state
10923 * Info passed around.
10924 * @returns {Element | undefined}
10925 * `section` element or `undefined`.
10926 */
10927 function footer(state) {
10928 /** @type {Array<ElementContent>} */
10929 const listItems = []
10930 let index = -1
10931
10932 while (++index < state.footnoteOrder.length) {
10933 const def = state.footnoteById[state.footnoteOrder[index]]
10934
10935 if (!def) {
10936 continue
10937 }
10938
10939 const content = state.all(def)
10940 const id = String(def.identifier).toUpperCase()
10941 const safeId = (0,micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_0__.normalizeUri)(id.toLowerCase())
10942 let referenceIndex = 0
10943 /** @type {Array<ElementContent>} */
10944 const backReferences = []
10945
10946 while (++referenceIndex <= state.footnoteCounts[id]) {
10947 /** @type {Element} */
10948 const backReference = {
10949 type: 'element',
10950 tagName: 'a',
10951 properties: {
10952 href:
10953 '#' +
10954 state.clobberPrefix +
10955 'fnref-' +
10956 safeId +
10957 (referenceIndex > 1 ? '-' + referenceIndex : ''),
10958 dataFootnoteBackref: true,
10959 className: ['data-footnote-backref'],
10960 ariaLabel: state.footnoteBackLabel
10961 },
10962 children: [{type: 'text', value: '↩'}]
10963 }
10964
10965 if (referenceIndex > 1) {
10966 backReference.children.push({
10967 type: 'element',
10968 tagName: 'sup',
10969 children: [{type: 'text', value: String(referenceIndex)}]
10970 })
10971 }
10972
10973 if (backReferences.length > 0) {
10974 backReferences.push({type: 'text', value: ' '})
10975 }
10976
10977 backReferences.push(backReference)
10978 }
10979
10980 const tail = content[content.length - 1]
10981
10982 if (tail && tail.type === 'element' && tail.tagName === 'p') {
10983 const tailTail = tail.children[tail.children.length - 1]
10984 if (tailTail && tailTail.type === 'text') {
10985 tailTail.value += ' '
10986 } else {
10987 tail.children.push({type: 'text', value: ' '})
10988 }
10989
10990 tail.children.push(...backReferences)
10991 } else {
10992 content.push(...backReferences)
10993 }
10994
10995 /** @type {Element} */
10996 const listItem = {
10997 type: 'element',
10998 tagName: 'li',
10999 properties: {id: state.clobberPrefix + 'fn-' + safeId},
11000 children: state.wrap(content, true)
11001 }
11002
11003 state.patch(def, listItem)
11004
11005 listItems.push(listItem)
11006 }
11007
11008 if (listItems.length === 0) {
11009 return
11010 }
11011
11012 return {
11013 type: 'element',
11014 tagName: 'section',
11015 properties: {dataFootnotes: true, className: ['footnotes']},
11016 children: [
11017 {
11018 type: 'element',
11019 tagName: state.footnoteLabelTagName,
11020 properties: {
11021 // To do: use structured clone.
11022 ...JSON.parse(JSON.stringify(state.footnoteLabelProperties)),
11023 id: 'footnote-label'
11024 },
11025 children: [{type: 'text', value: state.footnoteLabel}]
11026 },
11027 {type: 'text', value: '\n'},
11028 {
11029 type: 'element',
11030 tagName: 'ol',
11031 properties: {},
11032 children: state.wrap(listItems, true)
11033 },
11034 {type: 'text', value: '\n'}
11035 ]
11036 }
11037 }
11038
11039
11040 /***/ }),
11041
11042 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js":
11043 /*!*********************************************************************!*\
11044 !*** ../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js ***!
11045 \*********************************************************************/
11046 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11047
11048 "use strict";
11049 __webpack_require__.r(__webpack_exports__);
11050 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11051 /* harmony export */ "blockquote": () => (/* binding */ blockquote)
11052 /* harmony export */ });
11053 /**
11054 * @typedef {import('hast').Element} Element
11055 * @typedef {import('mdast').Blockquote} Blockquote
11056 * @typedef {import('../state.js').State} State
11057 */
11058
11059 /**
11060 * Turn an mdast `blockquote` node into hast.
11061 *
11062 * @param {State} state
11063 * Info passed around.
11064 * @param {Blockquote} node
11065 * mdast node.
11066 * @returns {Element}
11067 * hast node.
11068 */
11069 function blockquote(state, node) {
11070 /** @type {Element} */
11071 const result = {
11072 type: 'element',
11073 tagName: 'blockquote',
11074 properties: {},
11075 children: state.wrap(state.all(node), true)
11076 }
11077 state.patch(node, result)
11078 return state.applyData(node, result)
11079 }
11080
11081
11082 /***/ }),
11083
11084 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/break.js":
11085 /*!****************************************************************!*\
11086 !*** ../node_modules/mdast-util-to-hast/lib/handlers/break.js ***!
11087 \****************************************************************/
11088 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11089
11090 "use strict";
11091 __webpack_require__.r(__webpack_exports__);
11092 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11093 /* harmony export */ "hardBreak": () => (/* binding */ hardBreak)
11094 /* harmony export */ });
11095 /**
11096 * @typedef {import('hast').Element} Element
11097 * @typedef {import('hast').Text} Text
11098 * @typedef {import('mdast').Break} Break
11099 * @typedef {import('../state.js').State} State
11100 */
11101
11102 /**
11103 * Turn an mdast `break` node into hast.
11104 *
11105 * @param {State} state
11106 * Info passed around.
11107 * @param {Break} node
11108 * mdast node.
11109 * @returns {Array<Element | Text>}
11110 * hast element content.
11111 */
11112 function hardBreak(state, node) {
11113 /** @type {Element} */
11114 const result = {type: 'element', tagName: 'br', properties: {}, children: []}
11115 state.patch(node, result)
11116 return [state.applyData(node, result), {type: 'text', value: '\n'}]
11117 }
11118
11119
11120 /***/ }),
11121
11122 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/code.js":
11123 /*!***************************************************************!*\
11124 !*** ../node_modules/mdast-util-to-hast/lib/handlers/code.js ***!
11125 \***************************************************************/
11126 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11127
11128 "use strict";
11129 __webpack_require__.r(__webpack_exports__);
11130 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11131 /* harmony export */ "code": () => (/* binding */ code)
11132 /* harmony export */ });
11133 /**
11134 * @typedef {import('hast').Element} Element
11135 * @typedef {import('hast').Properties} Properties
11136 * @typedef {import('mdast').Code} Code
11137 * @typedef {import('../state.js').State} State
11138
11139 */
11140
11141 /**
11142 * Turn an mdast `code` node into hast.
11143 *
11144 * @param {State} state
11145 * Info passed around.
11146 * @param {Code} node
11147 * mdast node.
11148 * @returns {Element}
11149 * hast node.
11150 */
11151 function code(state, node) {
11152 const value = node.value ? node.value + '\n' : ''
11153 // To do: next major, use `node.lang` w/o regex, the splitting’s been going
11154 // on for years in remark now.
11155 const lang = node.lang ? node.lang.match(/^[^ \t]+(?=[ \t]|$)/) : null
11156 /** @type {Properties} */
11157 const properties = {}
11158
11159 if (lang) {
11160 properties.className = ['language-' + lang]
11161 }
11162
11163 // Create `<code>`.
11164 /** @type {Element} */
11165 let result = {
11166 type: 'element',
11167 tagName: 'code',
11168 properties,
11169 children: [{type: 'text', value}]
11170 }
11171
11172 if (node.meta) {
11173 result.data = {meta: node.meta}
11174 }
11175
11176 state.patch(node, result)
11177 result = state.applyData(node, result)
11178
11179 // Create `<pre>`.
11180 result = {type: 'element', tagName: 'pre', properties: {}, children: [result]}
11181 state.patch(node, result)
11182 return result
11183 }
11184
11185
11186 /***/ }),
11187
11188 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/delete.js":
11189 /*!*****************************************************************!*\
11190 !*** ../node_modules/mdast-util-to-hast/lib/handlers/delete.js ***!
11191 \*****************************************************************/
11192 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11193
11194 "use strict";
11195 __webpack_require__.r(__webpack_exports__);
11196 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11197 /* harmony export */ "strikethrough": () => (/* binding */ strikethrough)
11198 /* harmony export */ });
11199 /**
11200 * @typedef {import('hast').Element} Element
11201 * @typedef {import('mdast').Delete} Delete
11202 * @typedef {import('../state.js').State} State
11203
11204 */
11205
11206 /**
11207 * Turn an mdast `delete` node into hast.
11208 *
11209 * @param {State} state
11210 * Info passed around.
11211 * @param {Delete} node
11212 * mdast node.
11213 * @returns {Element}
11214 * hast node.
11215 */
11216 function strikethrough(state, node) {
11217 /** @type {Element} */
11218 const result = {
11219 type: 'element',
11220 tagName: 'del',
11221 properties: {},
11222 children: state.all(node)
11223 }
11224 state.patch(node, result)
11225 return state.applyData(node, result)
11226 }
11227
11228
11229 /***/ }),
11230
11231 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js":
11232 /*!*******************************************************************!*\
11233 !*** ../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js ***!
11234 \*******************************************************************/
11235 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11236
11237 "use strict";
11238 __webpack_require__.r(__webpack_exports__);
11239 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11240 /* harmony export */ "emphasis": () => (/* binding */ emphasis)
11241 /* harmony export */ });
11242 /**
11243 * @typedef {import('hast').Element} Element
11244 * @typedef {import('mdast').Emphasis} Emphasis
11245 * @typedef {import('../state.js').State} State
11246 */
11247
11248 /**
11249 * Turn an mdast `emphasis` node into hast.
11250 *
11251 * @param {State} state
11252 * Info passed around.
11253 * @param {Emphasis} node
11254 * mdast node.
11255 * @returns {Element}
11256 * hast node.
11257 */
11258 function emphasis(state, node) {
11259 /** @type {Element} */
11260 const result = {
11261 type: 'element',
11262 tagName: 'em',
11263 properties: {},
11264 children: state.all(node)
11265 }
11266 state.patch(node, result)
11267 return state.applyData(node, result)
11268 }
11269
11270
11271 /***/ }),
11272
11273 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js":
11274 /*!*****************************************************************************!*\
11275 !*** ../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js ***!
11276 \*****************************************************************************/
11277 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11278
11279 "use strict";
11280 __webpack_require__.r(__webpack_exports__);
11281 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11282 /* harmony export */ "footnoteReference": () => (/* binding */ footnoteReference)
11283 /* harmony export */ });
11284 /* harmony import */ var micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-sanitize-uri */ "../node_modules/micromark-util-sanitize-uri/dev/index.js");
11285 /**
11286 * @typedef {import('mdast').FootnoteReference} FootnoteReference
11287 * @typedef {import('hast').Element} Element
11288 * @typedef {import('../state.js').State} State
11289 */
11290
11291
11292
11293 /**
11294 * Turn an mdast `footnoteReference` node into hast.
11295 *
11296 * @param {State} state
11297 * Info passed around.
11298 * @param {FootnoteReference} node
11299 * mdast node.
11300 * @returns {Element}
11301 * hast node.
11302 */
11303 function footnoteReference(state, node) {
11304 const id = String(node.identifier).toUpperCase()
11305 const safeId = (0,micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_0__.normalizeUri)(id.toLowerCase())
11306 const index = state.footnoteOrder.indexOf(id)
11307 /** @type {number} */
11308 let counter
11309
11310 if (index === -1) {
11311 state.footnoteOrder.push(id)
11312 state.footnoteCounts[id] = 1
11313 counter = state.footnoteOrder.length
11314 } else {
11315 state.footnoteCounts[id]++
11316 counter = index + 1
11317 }
11318
11319 const reuseCounter = state.footnoteCounts[id]
11320
11321 /** @type {Element} */
11322 const link = {
11323 type: 'element',
11324 tagName: 'a',
11325 properties: {
11326 href: '#' + state.clobberPrefix + 'fn-' + safeId,
11327 id:
11328 state.clobberPrefix +
11329 'fnref-' +
11330 safeId +
11331 (reuseCounter > 1 ? '-' + reuseCounter : ''),
11332 dataFootnoteRef: true,
11333 ariaDescribedBy: ['footnote-label']
11334 },
11335 children: [{type: 'text', value: String(counter)}]
11336 }
11337 state.patch(node, link)
11338
11339 /** @type {Element} */
11340 const sup = {
11341 type: 'element',
11342 tagName: 'sup',
11343 properties: {},
11344 children: [link]
11345 }
11346 state.patch(node, sup)
11347 return state.applyData(node, sup)
11348 }
11349
11350
11351 /***/ }),
11352
11353 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/footnote.js":
11354 /*!*******************************************************************!*\
11355 !*** ../node_modules/mdast-util-to-hast/lib/handlers/footnote.js ***!
11356 \*******************************************************************/
11357 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11358
11359 "use strict";
11360 __webpack_require__.r(__webpack_exports__);
11361 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11362 /* harmony export */ "footnote": () => (/* binding */ footnote)
11363 /* harmony export */ });
11364 /* harmony import */ var _footnote_reference_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./footnote-reference.js */ "../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js");
11365 /**
11366 * @typedef {import('hast').Element} Element
11367 * @typedef {import('mdast').Footnote} Footnote
11368 * @typedef {import('../state.js').State} State
11369 */
11370
11371
11372
11373 // To do: when both:
11374 // * <https://github.com/micromark/micromark-extension-footnote>
11375 // * <https://github.com/syntax-tree/mdast-util-footnote>
11376 // …are archived, remove this (also from mdast).
11377 // These inline notes are not used in GFM.
11378
11379 /**
11380 * Turn an mdast `footnote` node into hast.
11381 *
11382 * @param {State} state
11383 * Info passed around.
11384 * @param {Footnote} node
11385 * mdast node.
11386 * @returns {Element}
11387 * hast node.
11388 */
11389 function footnote(state, node) {
11390 const footnoteById = state.footnoteById
11391 let no = 1
11392
11393 while (no in footnoteById) no++
11394
11395 const identifier = String(no)
11396
11397 footnoteById[identifier] = {
11398 type: 'footnoteDefinition',
11399 identifier,
11400 children: [{type: 'paragraph', children: node.children}],
11401 position: node.position
11402 }
11403
11404 return (0,_footnote_reference_js__WEBPACK_IMPORTED_MODULE_0__.footnoteReference)(state, {
11405 type: 'footnoteReference',
11406 identifier,
11407 position: node.position
11408 })
11409 }
11410
11411
11412 /***/ }),
11413
11414 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/heading.js":
11415 /*!******************************************************************!*\
11416 !*** ../node_modules/mdast-util-to-hast/lib/handlers/heading.js ***!
11417 \******************************************************************/
11418 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11419
11420 "use strict";
11421 __webpack_require__.r(__webpack_exports__);
11422 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11423 /* harmony export */ "heading": () => (/* binding */ heading)
11424 /* harmony export */ });
11425 /**
11426 * @typedef {import('hast').Element} Element
11427 * @typedef {import('mdast').Heading} Heading
11428 * @typedef {import('../state.js').State} State
11429 */
11430
11431 /**
11432 * Turn an mdast `heading` node into hast.
11433 *
11434 * @param {State} state
11435 * Info passed around.
11436 * @param {Heading} node
11437 * mdast node.
11438 * @returns {Element}
11439 * hast node.
11440 */
11441 function heading(state, node) {
11442 /** @type {Element} */
11443 const result = {
11444 type: 'element',
11445 tagName: 'h' + node.depth,
11446 properties: {},
11447 children: state.all(node)
11448 }
11449 state.patch(node, result)
11450 return state.applyData(node, result)
11451 }
11452
11453
11454 /***/ }),
11455
11456 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/html.js":
11457 /*!***************************************************************!*\
11458 !*** ../node_modules/mdast-util-to-hast/lib/handlers/html.js ***!
11459 \***************************************************************/
11460 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11461
11462 "use strict";
11463 __webpack_require__.r(__webpack_exports__);
11464 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11465 /* harmony export */ "html": () => (/* binding */ html)
11466 /* harmony export */ });
11467 /**
11468 * @typedef {import('hast').Element} Element
11469 * @typedef {import('mdast').HTML} Html
11470 * @typedef {import('../state.js').State} State
11471 * @typedef {import('../../index.js').Raw} Raw
11472 */
11473
11474 /**
11475 * Turn an mdast `html` node into hast (`raw` node in dangerous mode, otherwise
11476 * nothing).
11477 *
11478 * @param {State} state
11479 * Info passed around.
11480 * @param {Html} node
11481 * mdast node.
11482 * @returns {Raw | Element | null}
11483 * hast node.
11484 */
11485 function html(state, node) {
11486 if (state.dangerous) {
11487 /** @type {Raw} */
11488 const result = {type: 'raw', value: node.value}
11489 state.patch(node, result)
11490 return state.applyData(node, result)
11491 }
11492
11493 // To do: next major: return `undefined`.
11494 return null
11495 }
11496
11497
11498 /***/ }),
11499
11500 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js":
11501 /*!**************************************************************************!*\
11502 !*** ../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js ***!
11503 \**************************************************************************/
11504 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11505
11506 "use strict";
11507 __webpack_require__.r(__webpack_exports__);
11508 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11509 /* harmony export */ "imageReference": () => (/* binding */ imageReference)
11510 /* harmony export */ });
11511 /* harmony import */ var micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-sanitize-uri */ "../node_modules/micromark-util-sanitize-uri/dev/index.js");
11512 /* harmony import */ var _revert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../revert.js */ "../node_modules/mdast-util-to-hast/lib/revert.js");
11513 /**
11514 * @typedef {import('hast').ElementContent} ElementContent
11515 * @typedef {import('hast').Element} Element
11516 * @typedef {import('hast').Properties} Properties
11517 * @typedef {import('mdast').ImageReference} ImageReference
11518 * @typedef {import('../state.js').State} State
11519 */
11520
11521
11522
11523
11524 /**
11525 * Turn an mdast `imageReference` node into hast.
11526 *
11527 * @param {State} state
11528 * Info passed around.
11529 * @param {ImageReference} node
11530 * mdast node.
11531 * @returns {ElementContent | Array<ElementContent>}
11532 * hast node.
11533 */
11534 function imageReference(state, node) {
11535 const def = state.definition(node.identifier)
11536
11537 if (!def) {
11538 return (0,_revert_js__WEBPACK_IMPORTED_MODULE_0__.revert)(state, node)
11539 }
11540
11541 /** @type {Properties} */
11542 const properties = {src: (0,micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_1__.normalizeUri)(def.url || ''), alt: node.alt}
11543
11544 if (def.title !== null && def.title !== undefined) {
11545 properties.title = def.title
11546 }
11547
11548 /** @type {Element} */
11549 const result = {type: 'element', tagName: 'img', properties, children: []}
11550 state.patch(node, result)
11551 return state.applyData(node, result)
11552 }
11553
11554
11555 /***/ }),
11556
11557 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/image.js":
11558 /*!****************************************************************!*\
11559 !*** ../node_modules/mdast-util-to-hast/lib/handlers/image.js ***!
11560 \****************************************************************/
11561 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11562
11563 "use strict";
11564 __webpack_require__.r(__webpack_exports__);
11565 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11566 /* harmony export */ "image": () => (/* binding */ image)
11567 /* harmony export */ });
11568 /* harmony import */ var micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-sanitize-uri */ "../node_modules/micromark-util-sanitize-uri/dev/index.js");
11569 /**
11570 * @typedef {import('hast').Element} Element
11571 * @typedef {import('hast').Properties} Properties
11572 * @typedef {import('mdast').Image} Image
11573 * @typedef {import('../state.js').State} State
11574 */
11575
11576
11577
11578 /**
11579 * Turn an mdast `image` node into hast.
11580 *
11581 * @param {State} state
11582 * Info passed around.
11583 * @param {Image} node
11584 * mdast node.
11585 * @returns {Element}
11586 * hast node.
11587 */
11588 function image(state, node) {
11589 /** @type {Properties} */
11590 const properties = {src: (0,micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_0__.normalizeUri)(node.url)}
11591
11592 if (node.alt !== null && node.alt !== undefined) {
11593 properties.alt = node.alt
11594 }
11595
11596 if (node.title !== null && node.title !== undefined) {
11597 properties.title = node.title
11598 }
11599
11600 /** @type {Element} */
11601 const result = {type: 'element', tagName: 'img', properties, children: []}
11602 state.patch(node, result)
11603 return state.applyData(node, result)
11604 }
11605
11606
11607 /***/ }),
11608
11609 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/index.js":
11610 /*!****************************************************************!*\
11611 !*** ../node_modules/mdast-util-to-hast/lib/handlers/index.js ***!
11612 \****************************************************************/
11613 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11614
11615 "use strict";
11616 __webpack_require__.r(__webpack_exports__);
11617 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11618 /* harmony export */ "handlers": () => (/* binding */ handlers)
11619 /* harmony export */ });
11620 /* harmony import */ var _blockquote_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blockquote.js */ "../node_modules/mdast-util-to-hast/lib/handlers/blockquote.js");
11621 /* harmony import */ var _break_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./break.js */ "../node_modules/mdast-util-to-hast/lib/handlers/break.js");
11622 /* harmony import */ var _code_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./code.js */ "../node_modules/mdast-util-to-hast/lib/handlers/code.js");
11623 /* harmony import */ var _delete_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delete.js */ "../node_modules/mdast-util-to-hast/lib/handlers/delete.js");
11624 /* harmony import */ var _emphasis_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./emphasis.js */ "../node_modules/mdast-util-to-hast/lib/handlers/emphasis.js");
11625 /* harmony import */ var _footnote_reference_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./footnote-reference.js */ "../node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js");
11626 /* harmony import */ var _footnote_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./footnote.js */ "../node_modules/mdast-util-to-hast/lib/handlers/footnote.js");
11627 /* harmony import */ var _heading_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./heading.js */ "../node_modules/mdast-util-to-hast/lib/handlers/heading.js");
11628 /* harmony import */ var _html_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./html.js */ "../node_modules/mdast-util-to-hast/lib/handlers/html.js");
11629 /* harmony import */ var _image_reference_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./image-reference.js */ "../node_modules/mdast-util-to-hast/lib/handlers/image-reference.js");
11630 /* harmony import */ var _image_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./image.js */ "../node_modules/mdast-util-to-hast/lib/handlers/image.js");
11631 /* harmony import */ var _inline_code_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./inline-code.js */ "../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js");
11632 /* harmony import */ var _link_reference_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./link-reference.js */ "../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js");
11633 /* harmony import */ var _link_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./link.js */ "../node_modules/mdast-util-to-hast/lib/handlers/link.js");
11634 /* harmony import */ var _list_item_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./list-item.js */ "../node_modules/mdast-util-to-hast/lib/handlers/list-item.js");
11635 /* harmony import */ var _list_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./list.js */ "../node_modules/mdast-util-to-hast/lib/handlers/list.js");
11636 /* harmony import */ var _paragraph_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./paragraph.js */ "../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js");
11637 /* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./root.js */ "../node_modules/mdast-util-to-hast/lib/handlers/root.js");
11638 /* harmony import */ var _strong_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./strong.js */ "../node_modules/mdast-util-to-hast/lib/handlers/strong.js");
11639 /* harmony import */ var _table_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./table.js */ "../node_modules/mdast-util-to-hast/lib/handlers/table.js");
11640 /* harmony import */ var _table_row_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./table-row.js */ "../node_modules/mdast-util-to-hast/lib/handlers/table-row.js");
11641 /* harmony import */ var _table_cell_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./table-cell.js */ "../node_modules/mdast-util-to-hast/lib/handlers/table-cell.js");
11642 /* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./text.js */ "../node_modules/mdast-util-to-hast/lib/handlers/text.js");
11643 /* harmony import */ var _thematic_break_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./thematic-break.js */ "../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js");
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669 /**
11670 * Default handlers for nodes.
11671 */
11672 const handlers = {
11673 blockquote: _blockquote_js__WEBPACK_IMPORTED_MODULE_0__.blockquote,
11674 break: _break_js__WEBPACK_IMPORTED_MODULE_1__.hardBreak,
11675 code: _code_js__WEBPACK_IMPORTED_MODULE_2__.code,
11676 delete: _delete_js__WEBPACK_IMPORTED_MODULE_3__.strikethrough,
11677 emphasis: _emphasis_js__WEBPACK_IMPORTED_MODULE_4__.emphasis,
11678 footnoteReference: _footnote_reference_js__WEBPACK_IMPORTED_MODULE_5__.footnoteReference,
11679 footnote: _footnote_js__WEBPACK_IMPORTED_MODULE_6__.footnote,
11680 heading: _heading_js__WEBPACK_IMPORTED_MODULE_7__.heading,
11681 html: _html_js__WEBPACK_IMPORTED_MODULE_8__.html,
11682 imageReference: _image_reference_js__WEBPACK_IMPORTED_MODULE_9__.imageReference,
11683 image: _image_js__WEBPACK_IMPORTED_MODULE_10__.image,
11684 inlineCode: _inline_code_js__WEBPACK_IMPORTED_MODULE_11__.inlineCode,
11685 linkReference: _link_reference_js__WEBPACK_IMPORTED_MODULE_12__.linkReference,
11686 link: _link_js__WEBPACK_IMPORTED_MODULE_13__.link,
11687 listItem: _list_item_js__WEBPACK_IMPORTED_MODULE_14__.listItem,
11688 list: _list_js__WEBPACK_IMPORTED_MODULE_15__.list,
11689 paragraph: _paragraph_js__WEBPACK_IMPORTED_MODULE_16__.paragraph,
11690 root: _root_js__WEBPACK_IMPORTED_MODULE_17__.root,
11691 strong: _strong_js__WEBPACK_IMPORTED_MODULE_18__.strong,
11692 table: _table_js__WEBPACK_IMPORTED_MODULE_19__.table,
11693 tableCell: _table_cell_js__WEBPACK_IMPORTED_MODULE_20__.tableCell,
11694 tableRow: _table_row_js__WEBPACK_IMPORTED_MODULE_21__.tableRow,
11695 text: _text_js__WEBPACK_IMPORTED_MODULE_22__.text,
11696 thematicBreak: _thematic_break_js__WEBPACK_IMPORTED_MODULE_23__.thematicBreak,
11697 toml: ignore,
11698 yaml: ignore,
11699 definition: ignore,
11700 footnoteDefinition: ignore
11701 }
11702
11703 // Return nothing for nodes that are ignored.
11704 function ignore() {
11705 // To do: next major: return `undefined`.
11706 return null
11707 }
11708
11709
11710 /***/ }),
11711
11712 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js":
11713 /*!**********************************************************************!*\
11714 !*** ../node_modules/mdast-util-to-hast/lib/handlers/inline-code.js ***!
11715 \**********************************************************************/
11716 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11717
11718 "use strict";
11719 __webpack_require__.r(__webpack_exports__);
11720 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11721 /* harmony export */ "inlineCode": () => (/* binding */ inlineCode)
11722 /* harmony export */ });
11723 /**
11724 * @typedef {import('hast').Element} Element
11725 * @typedef {import('hast').Text} Text
11726 * @typedef {import('mdast').InlineCode} InlineCode
11727 * @typedef {import('../state.js').State} State
11728 */
11729
11730 /**
11731 * Turn an mdast `inlineCode` node into hast.
11732 *
11733 * @param {State} state
11734 * Info passed around.
11735 * @param {InlineCode} node
11736 * mdast node.
11737 * @returns {Element}
11738 * hast node.
11739 */
11740 function inlineCode(state, node) {
11741 /** @type {Text} */
11742 const text = {type: 'text', value: node.value.replace(/\r?\n|\r/g, ' ')}
11743 state.patch(node, text)
11744
11745 /** @type {Element} */
11746 const result = {
11747 type: 'element',
11748 tagName: 'code',
11749 properties: {},
11750 children: [text]
11751 }
11752 state.patch(node, result)
11753 return state.applyData(node, result)
11754 }
11755
11756
11757 /***/ }),
11758
11759 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js":
11760 /*!*************************************************************************!*\
11761 !*** ../node_modules/mdast-util-to-hast/lib/handlers/link-reference.js ***!
11762 \*************************************************************************/
11763 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11764
11765 "use strict";
11766 __webpack_require__.r(__webpack_exports__);
11767 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11768 /* harmony export */ "linkReference": () => (/* binding */ linkReference)
11769 /* harmony export */ });
11770 /* harmony import */ var micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-sanitize-uri */ "../node_modules/micromark-util-sanitize-uri/dev/index.js");
11771 /* harmony import */ var _revert_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../revert.js */ "../node_modules/mdast-util-to-hast/lib/revert.js");
11772 /**
11773 * @typedef {import('hast').Element} Element
11774 * @typedef {import('hast').ElementContent} ElementContent
11775 * @typedef {import('hast').Properties} Properties
11776 * @typedef {import('mdast').LinkReference} LinkReference
11777 * @typedef {import('../state.js').State} State
11778 */
11779
11780
11781
11782
11783 /**
11784 * Turn an mdast `linkReference` node into hast.
11785 *
11786 * @param {State} state
11787 * Info passed around.
11788 * @param {LinkReference} node
11789 * mdast node.
11790 * @returns {ElementContent | Array<ElementContent>}
11791 * hast node.
11792 */
11793 function linkReference(state, node) {
11794 const def = state.definition(node.identifier)
11795
11796 if (!def) {
11797 return (0,_revert_js__WEBPACK_IMPORTED_MODULE_0__.revert)(state, node)
11798 }
11799
11800 /** @type {Properties} */
11801 const properties = {href: (0,micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_1__.normalizeUri)(def.url || '')}
11802
11803 if (def.title !== null && def.title !== undefined) {
11804 properties.title = def.title
11805 }
11806
11807 /** @type {Element} */
11808 const result = {
11809 type: 'element',
11810 tagName: 'a',
11811 properties,
11812 children: state.all(node)
11813 }
11814 state.patch(node, result)
11815 return state.applyData(node, result)
11816 }
11817
11818
11819 /***/ }),
11820
11821 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/link.js":
11822 /*!***************************************************************!*\
11823 !*** ../node_modules/mdast-util-to-hast/lib/handlers/link.js ***!
11824 \***************************************************************/
11825 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11826
11827 "use strict";
11828 __webpack_require__.r(__webpack_exports__);
11829 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11830 /* harmony export */ "link": () => (/* binding */ link)
11831 /* harmony export */ });
11832 /* harmony import */ var micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-sanitize-uri */ "../node_modules/micromark-util-sanitize-uri/dev/index.js");
11833 /**
11834 * @typedef {import('hast').Element} Element
11835 * @typedef {import('hast').Properties} Properties
11836 * @typedef {import('mdast').Link} Link
11837 * @typedef {import('../state.js').State} State
11838 */
11839
11840
11841
11842 /**
11843 * Turn an mdast `link` node into hast.
11844 *
11845 * @param {State} state
11846 * Info passed around.
11847 * @param {Link} node
11848 * mdast node.
11849 * @returns {Element}
11850 * hast node.
11851 */
11852 function link(state, node) {
11853 /** @type {Properties} */
11854 const properties = {href: (0,micromark_util_sanitize_uri__WEBPACK_IMPORTED_MODULE_0__.normalizeUri)(node.url)}
11855
11856 if (node.title !== null && node.title !== undefined) {
11857 properties.title = node.title
11858 }
11859
11860 /** @type {Element} */
11861 const result = {
11862 type: 'element',
11863 tagName: 'a',
11864 properties,
11865 children: state.all(node)
11866 }
11867 state.patch(node, result)
11868 return state.applyData(node, result)
11869 }
11870
11871
11872 /***/ }),
11873
11874 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/list-item.js":
11875 /*!********************************************************************!*\
11876 !*** ../node_modules/mdast-util-to-hast/lib/handlers/list-item.js ***!
11877 \********************************************************************/
11878 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11879
11880 "use strict";
11881 __webpack_require__.r(__webpack_exports__);
11882 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11883 /* harmony export */ "listItem": () => (/* binding */ listItem)
11884 /* harmony export */ });
11885 /**
11886 * @typedef {import('hast').Element} Element
11887 * @typedef {import('hast').ElementContent} ElementContent
11888 * @typedef {import('hast').Properties} Properties
11889 * @typedef {import('mdast').Content} Content
11890 * @typedef {import('mdast').ListItem} ListItem
11891 * @typedef {import('mdast').Parent} Parent
11892 * @typedef {import('mdast').Root} Root
11893 * @typedef {import('../state.js').State} State
11894 */
11895
11896 /**
11897 * @typedef {Root | Content} Nodes
11898 * @typedef {Extract<Nodes, Parent>} Parents
11899 */
11900
11901 /**
11902 * Turn an mdast `listItem` node into hast.
11903 *
11904 * @param {State} state
11905 * Info passed around.
11906 * @param {ListItem} node
11907 * mdast node.
11908 * @param {Parents | null | undefined} parent
11909 * Parent of `node`.
11910 * @returns {Element}
11911 * hast node.
11912 */
11913 function listItem(state, node, parent) {
11914 const results = state.all(node)
11915 const loose = parent ? listLoose(parent) : listItemLoose(node)
11916 /** @type {Properties} */
11917 const properties = {}
11918 /** @type {Array<ElementContent>} */
11919 const children = []
11920
11921 if (typeof node.checked === 'boolean') {
11922 const head = results[0]
11923 /** @type {Element} */
11924 let paragraph
11925
11926 if (head && head.type === 'element' && head.tagName === 'p') {
11927 paragraph = head
11928 } else {
11929 paragraph = {type: 'element', tagName: 'p', properties: {}, children: []}
11930 results.unshift(paragraph)
11931 }
11932
11933 if (paragraph.children.length > 0) {
11934 paragraph.children.unshift({type: 'text', value: ' '})
11935 }
11936
11937 paragraph.children.unshift({
11938 type: 'element',
11939 tagName: 'input',
11940 properties: {type: 'checkbox', checked: node.checked, disabled: true},
11941 children: []
11942 })
11943
11944 // According to github-markdown-css, this class hides bullet.
11945 // See: <https://github.com/sindresorhus/github-markdown-css>.
11946 properties.className = ['task-list-item']
11947 }
11948
11949 let index = -1
11950
11951 while (++index < results.length) {
11952 const child = results[index]
11953
11954 // Add eols before nodes, except if this is a loose, first paragraph.
11955 if (
11956 loose ||
11957 index !== 0 ||
11958 child.type !== 'element' ||
11959 child.tagName !== 'p'
11960 ) {
11961 children.push({type: 'text', value: '\n'})
11962 }
11963
11964 if (child.type === 'element' && child.tagName === 'p' && !loose) {
11965 children.push(...child.children)
11966 } else {
11967 children.push(child)
11968 }
11969 }
11970
11971 const tail = results[results.length - 1]
11972
11973 // Add a final eol.
11974 if (tail && (loose || tail.type !== 'element' || tail.tagName !== 'p')) {
11975 children.push({type: 'text', value: '\n'})
11976 }
11977
11978 /** @type {Element} */
11979 const result = {type: 'element', tagName: 'li', properties, children}
11980 state.patch(node, result)
11981 return state.applyData(node, result)
11982 }
11983
11984 /**
11985 * @param {Parents} node
11986 * @return {Boolean}
11987 */
11988 function listLoose(node) {
11989 let loose = false
11990 if (node.type === 'list') {
11991 loose = node.spread || false
11992 const children = node.children
11993 let index = -1
11994
11995 while (!loose && ++index < children.length) {
11996 loose = listItemLoose(children[index])
11997 }
11998 }
11999
12000 return loose
12001 }
12002
12003 /**
12004 * @param {ListItem} node
12005 * @return {Boolean}
12006 */
12007 function listItemLoose(node) {
12008 const spread = node.spread
12009
12010 return spread === undefined || spread === null
12011 ? node.children.length > 1
12012 : spread
12013 }
12014
12015
12016 /***/ }),
12017
12018 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/list.js":
12019 /*!***************************************************************!*\
12020 !*** ../node_modules/mdast-util-to-hast/lib/handlers/list.js ***!
12021 \***************************************************************/
12022 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12023
12024 "use strict";
12025 __webpack_require__.r(__webpack_exports__);
12026 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12027 /* harmony export */ "list": () => (/* binding */ list)
12028 /* harmony export */ });
12029 /**
12030 * @typedef {import('hast').Element} Element
12031 * @typedef {import('hast').Properties} Properties
12032 * @typedef {import('mdast').List} List
12033 * @typedef {import('../state.js').State} State
12034 */
12035
12036 /**
12037 * Turn an mdast `list` node into hast.
12038 *
12039 * @param {State} state
12040 * Info passed around.
12041 * @param {List} node
12042 * mdast node.
12043 * @returns {Element}
12044 * hast node.
12045 */
12046 function list(state, node) {
12047 /** @type {Properties} */
12048 const properties = {}
12049 const results = state.all(node)
12050 let index = -1
12051
12052 if (typeof node.start === 'number' && node.start !== 1) {
12053 properties.start = node.start
12054 }
12055
12056 // Like GitHub, add a class for custom styling.
12057 while (++index < results.length) {
12058 const child = results[index]
12059
12060 if (
12061 child.type === 'element' &&
12062 child.tagName === 'li' &&
12063 child.properties &&
12064 Array.isArray(child.properties.className) &&
12065 child.properties.className.includes('task-list-item')
12066 ) {
12067 properties.className = ['contains-task-list']
12068 break
12069 }
12070 }
12071
12072 /** @type {Element} */
12073 const result = {
12074 type: 'element',
12075 tagName: node.ordered ? 'ol' : 'ul',
12076 properties,
12077 children: state.wrap(results, true)
12078 }
12079 state.patch(node, result)
12080 return state.applyData(node, result)
12081 }
12082
12083
12084 /***/ }),
12085
12086 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js":
12087 /*!********************************************************************!*\
12088 !*** ../node_modules/mdast-util-to-hast/lib/handlers/paragraph.js ***!
12089 \********************************************************************/
12090 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12091
12092 "use strict";
12093 __webpack_require__.r(__webpack_exports__);
12094 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12095 /* harmony export */ "paragraph": () => (/* binding */ paragraph)
12096 /* harmony export */ });
12097 /**
12098 * @typedef {import('hast').Element} Element
12099 * @typedef {import('mdast').Paragraph} Paragraph
12100 * @typedef {import('../state.js').State} State
12101 */
12102
12103 /**
12104 * Turn an mdast `paragraph` node into hast.
12105 *
12106 * @param {State} state
12107 * Info passed around.
12108 * @param {Paragraph} node
12109 * mdast node.
12110 * @returns {Element}
12111 * hast node.
12112 */
12113 function paragraph(state, node) {
12114 /** @type {Element} */
12115 const result = {
12116 type: 'element',
12117 tagName: 'p',
12118 properties: {},
12119 children: state.all(node)
12120 }
12121 state.patch(node, result)
12122 return state.applyData(node, result)
12123 }
12124
12125
12126 /***/ }),
12127
12128 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/root.js":
12129 /*!***************************************************************!*\
12130 !*** ../node_modules/mdast-util-to-hast/lib/handlers/root.js ***!
12131 \***************************************************************/
12132 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12133
12134 "use strict";
12135 __webpack_require__.r(__webpack_exports__);
12136 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12137 /* harmony export */ "root": () => (/* binding */ root)
12138 /* harmony export */ });
12139 /**
12140 * @typedef {import('hast').Root} HastRoot
12141 * @typedef {import('hast').Element} HastElement
12142 * @typedef {import('mdast').Root} MdastRoot
12143 * @typedef {import('../state.js').State} State
12144 */
12145
12146 /**
12147 * Turn an mdast `root` node into hast.
12148 *
12149 * @param {State} state
12150 * Info passed around.
12151 * @param {MdastRoot} node
12152 * mdast node.
12153 * @returns {HastRoot | HastElement}
12154 * hast node.
12155 */
12156 function root(state, node) {
12157 /** @type {HastRoot} */
12158 const result = {type: 'root', children: state.wrap(state.all(node))}
12159 state.patch(node, result)
12160 return state.applyData(node, result)
12161 }
12162
12163
12164 /***/ }),
12165
12166 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/strong.js":
12167 /*!*****************************************************************!*\
12168 !*** ../node_modules/mdast-util-to-hast/lib/handlers/strong.js ***!
12169 \*****************************************************************/
12170 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12171
12172 "use strict";
12173 __webpack_require__.r(__webpack_exports__);
12174 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12175 /* harmony export */ "strong": () => (/* binding */ strong)
12176 /* harmony export */ });
12177 /**
12178 * @typedef {import('hast').Element} Element
12179 * @typedef {import('mdast').Strong} Strong
12180 * @typedef {import('../state.js').State} State
12181 */
12182
12183 /**
12184 * Turn an mdast `strong` node into hast.
12185 *
12186 * @param {State} state
12187 * Info passed around.
12188 * @param {Strong} node
12189 * mdast node.
12190 * @returns {Element}
12191 * hast node.
12192 */
12193 function strong(state, node) {
12194 /** @type {Element} */
12195 const result = {
12196 type: 'element',
12197 tagName: 'strong',
12198 properties: {},
12199 children: state.all(node)
12200 }
12201 state.patch(node, result)
12202 return state.applyData(node, result)
12203 }
12204
12205
12206 /***/ }),
12207
12208 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/table-cell.js":
12209 /*!*********************************************************************!*\
12210 !*** ../node_modules/mdast-util-to-hast/lib/handlers/table-cell.js ***!
12211 \*********************************************************************/
12212 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12213
12214 "use strict";
12215 __webpack_require__.r(__webpack_exports__);
12216 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12217 /* harmony export */ "tableCell": () => (/* binding */ tableCell)
12218 /* harmony export */ });
12219 /**
12220 * @typedef {import('hast').Element} Element
12221 * @typedef {import('mdast').TableCell} TableCell
12222 * @typedef {import('../state.js').State} State
12223 */
12224
12225 /**
12226 * Turn an mdast `tableCell` node into hast.
12227 *
12228 * @param {State} state
12229 * Info passed around.
12230 * @param {TableCell} node
12231 * mdast node.
12232 * @returns {Element}
12233 * hast node.
12234 */
12235 function tableCell(state, node) {
12236 // Note: this function is normally not called: see `table-row` for how rows
12237 // and their cells are compiled.
12238 /** @type {Element} */
12239 const result = {
12240 type: 'element',
12241 tagName: 'td', // Assume body cell.
12242 properties: {},
12243 children: state.all(node)
12244 }
12245 state.patch(node, result)
12246 return state.applyData(node, result)
12247 }
12248
12249
12250 /***/ }),
12251
12252 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/table-row.js":
12253 /*!********************************************************************!*\
12254 !*** ../node_modules/mdast-util-to-hast/lib/handlers/table-row.js ***!
12255 \********************************************************************/
12256 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12257
12258 "use strict";
12259 __webpack_require__.r(__webpack_exports__);
12260 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12261 /* harmony export */ "tableRow": () => (/* binding */ tableRow)
12262 /* harmony export */ });
12263 /**
12264 * @typedef {import('hast').Properties} Properties
12265 * @typedef {import('hast').Element} Element
12266 * @typedef {import('hast').ElementContent} ElementContent
12267 * @typedef {import('mdast').Content} Content
12268 * @typedef {import('mdast').Parent} Parent
12269 * @typedef {import('mdast').Root} Root
12270 * @typedef {import('mdast').TableRow} TableRow
12271 * @typedef {import('../state.js').State} State
12272 */
12273
12274 /**
12275 * @typedef {Root | Content} Nodes
12276 * @typedef {Extract<Nodes, Parent>} Parents
12277 */
12278
12279 /**
12280 * Turn an mdast `tableRow` node into hast.
12281 *
12282 * @param {State} state
12283 * Info passed around.
12284 * @param {TableRow} node
12285 * mdast node.
12286 * @param {Parents | null | undefined} parent
12287 * Parent of `node`.
12288 * @returns {Element}
12289 * hast node.
12290 */
12291 function tableRow(state, node, parent) {
12292 const siblings = parent ? parent.children : undefined
12293 // Generate a body row when without parent.
12294 const rowIndex = siblings ? siblings.indexOf(node) : 1
12295 const tagName = rowIndex === 0 ? 'th' : 'td'
12296 const align = parent && parent.type === 'table' ? parent.align : undefined
12297 const length = align ? align.length : node.children.length
12298 let cellIndex = -1
12299 /** @type {Array<ElementContent>} */
12300 const cells = []
12301
12302 while (++cellIndex < length) {
12303 // Note: can also be undefined.
12304 const cell = node.children[cellIndex]
12305 /** @type {Properties} */
12306 const properties = {}
12307 const alignValue = align ? align[cellIndex] : undefined
12308
12309 if (alignValue) {
12310 properties.align = alignValue
12311 }
12312
12313 /** @type {Element} */
12314 let result = {type: 'element', tagName, properties, children: []}
12315
12316 if (cell) {
12317 result.children = state.all(cell)
12318 state.patch(cell, result)
12319 result = state.applyData(node, result)
12320 }
12321
12322 cells.push(result)
12323 }
12324
12325 /** @type {Element} */
12326 const result = {
12327 type: 'element',
12328 tagName: 'tr',
12329 properties: {},
12330 children: state.wrap(cells, true)
12331 }
12332 state.patch(node, result)
12333 return state.applyData(node, result)
12334 }
12335
12336
12337 /***/ }),
12338
12339 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/table.js":
12340 /*!****************************************************************!*\
12341 !*** ../node_modules/mdast-util-to-hast/lib/handlers/table.js ***!
12342 \****************************************************************/
12343 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12344
12345 "use strict";
12346 __webpack_require__.r(__webpack_exports__);
12347 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12348 /* harmony export */ "table": () => (/* binding */ table)
12349 /* harmony export */ });
12350 /* harmony import */ var unist_util_position__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! unist-util-position */ "../node_modules/unist-util-position/lib/index.js");
12351 /**
12352 * @typedef {import('hast').Element} Element
12353 * @typedef {import('mdast').Table} Table
12354 * @typedef {import('../state.js').State} State
12355 */
12356
12357
12358
12359 /**
12360 * Turn an mdast `table` node into hast.
12361 *
12362 * @param {State} state
12363 * Info passed around.
12364 * @param {Table} node
12365 * mdast node.
12366 * @returns {Element}
12367 * hast node.
12368 */
12369 function table(state, node) {
12370 const rows = state.all(node)
12371 const firstRow = rows.shift()
12372 /** @type {Array<Element>} */
12373 const tableContent = []
12374
12375 if (firstRow) {
12376 /** @type {Element} */
12377 const head = {
12378 type: 'element',
12379 tagName: 'thead',
12380 properties: {},
12381 children: state.wrap([firstRow], true)
12382 }
12383 state.patch(node.children[0], head)
12384 tableContent.push(head)
12385 }
12386
12387 if (rows.length > 0) {
12388 /** @type {Element} */
12389 const body = {
12390 type: 'element',
12391 tagName: 'tbody',
12392 properties: {},
12393 children: state.wrap(rows, true)
12394 }
12395
12396 const start = (0,unist_util_position__WEBPACK_IMPORTED_MODULE_0__.pointStart)(node.children[1])
12397 const end = (0,unist_util_position__WEBPACK_IMPORTED_MODULE_0__.pointEnd)(node.children[node.children.length - 1])
12398 if (start.line && end.line) body.position = {start, end}
12399 tableContent.push(body)
12400 }
12401
12402 /** @type {Element} */
12403 const result = {
12404 type: 'element',
12405 tagName: 'table',
12406 properties: {},
12407 children: state.wrap(tableContent, true)
12408 }
12409 state.patch(node, result)
12410 return state.applyData(node, result)
12411 }
12412
12413
12414 /***/ }),
12415
12416 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/text.js":
12417 /*!***************************************************************!*\
12418 !*** ../node_modules/mdast-util-to-hast/lib/handlers/text.js ***!
12419 \***************************************************************/
12420 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12421
12422 "use strict";
12423 __webpack_require__.r(__webpack_exports__);
12424 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12425 /* harmony export */ "text": () => (/* binding */ text)
12426 /* harmony export */ });
12427 /* harmony import */ var trim_lines__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! trim-lines */ "../node_modules/trim-lines/index.js");
12428 /**
12429 * @typedef {import('hast').Element} HastElement
12430 * @typedef {import('hast').Text} HastText
12431 * @typedef {import('mdast').Text} MdastText
12432 * @typedef {import('../state.js').State} State
12433 */
12434
12435
12436
12437 /**
12438 * Turn an mdast `text` node into hast.
12439 *
12440 * @param {State} state
12441 * Info passed around.
12442 * @param {MdastText} node
12443 * mdast node.
12444 * @returns {HastText | HastElement}
12445 * hast node.
12446 */
12447 function text(state, node) {
12448 /** @type {HastText} */
12449 const result = {type: 'text', value: (0,trim_lines__WEBPACK_IMPORTED_MODULE_0__.trimLines)(String(node.value))}
12450 state.patch(node, result)
12451 return state.applyData(node, result)
12452 }
12453
12454
12455 /***/ }),
12456
12457 /***/ "../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js":
12458 /*!*************************************************************************!*\
12459 !*** ../node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js ***!
12460 \*************************************************************************/
12461 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12462
12463 "use strict";
12464 __webpack_require__.r(__webpack_exports__);
12465 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12466 /* harmony export */ "thematicBreak": () => (/* binding */ thematicBreak)
12467 /* harmony export */ });
12468 /**
12469 * @typedef {import('hast').Element} Element
12470 * @typedef {import('mdast').ThematicBreak} ThematicBreak
12471 * @typedef {import('../state.js').State} State
12472 */
12473
12474 /**
12475 * Turn an mdast `thematicBreak` node into hast.
12476 *
12477 * @param {State} state
12478 * Info passed around.
12479 * @param {ThematicBreak} node
12480 * mdast node.
12481 * @returns {Element}
12482 * hast node.
12483 */
12484 function thematicBreak(state, node) {
12485 /** @type {Element} */
12486 const result = {
12487 type: 'element',
12488 tagName: 'hr',
12489 properties: {},
12490 children: []
12491 }
12492 state.patch(node, result)
12493 return state.applyData(node, result)
12494 }
12495
12496
12497 /***/ }),
12498
12499 /***/ "../node_modules/mdast-util-to-hast/lib/index.js":
12500 /*!*******************************************************!*\
12501 !*** ../node_modules/mdast-util-to-hast/lib/index.js ***!
12502 \*******************************************************/
12503 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12504
12505 "use strict";
12506 __webpack_require__.r(__webpack_exports__);
12507 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12508 /* harmony export */ "toHast": () => (/* binding */ toHast)
12509 /* harmony export */ });
12510 /* harmony import */ var _footer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./footer.js */ "../node_modules/mdast-util-to-hast/lib/footer.js");
12511 /* harmony import */ var _state_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state.js */ "../node_modules/mdast-util-to-hast/lib/state.js");
12512 /**
12513 * @typedef {import('hast').Content} HastContent
12514 * @typedef {import('hast').Root} HastRoot
12515 *
12516 * @typedef {import('mdast').Content} MdastContent
12517 * @typedef {import('mdast').Root} MdastRoot
12518 *
12519 * @typedef {import('./state.js').Options} Options
12520 */
12521
12522 /**
12523 * @typedef {HastRoot | HastContent} HastNodes
12524 * @typedef {MdastRoot | MdastContent} MdastNodes
12525 */
12526
12527
12528
12529
12530 /**
12531 * Transform mdast to hast.
12532 *
12533 * ##### Notes
12534 *
12535 * ###### HTML
12536 *
12537 * Raw HTML is available in mdast as `html` nodes and can be embedded in hast
12538 * as semistandard `raw` nodes.
12539 * Most utilities ignore `raw` nodes but two notable ones don’t:
12540 *
12541 * * `hast-util-to-html` also has an option `allowDangerousHtml` which will
12542 * output the raw HTML.
12543 * This is typically discouraged as noted by the option name but is useful
12544 * if you completely trust authors
12545 * * `hast-util-raw` can handle the raw embedded HTML strings by parsing them
12546 * into standard hast nodes (`element`, `text`, etc).
12547 * This is a heavy task as it needs a full HTML parser, but it is the only
12548 * way to support untrusted content
12549 *
12550 * ###### Footnotes
12551 *
12552 * Many options supported here relate to footnotes.
12553 * Footnotes are not specified by CommonMark, which we follow by default.
12554 * They are supported by GitHub, so footnotes can be enabled in markdown with
12555 * `mdast-util-gfm`.
12556 *
12557 * The options `footnoteBackLabel` and `footnoteLabel` define natural language
12558 * that explains footnotes, which is hidden for sighted users but shown to
12559 * assistive technology.
12560 * When your page is not in English, you must define translated values.
12561 *
12562 * Back references use ARIA attributes, but the section label itself uses a
12563 * heading that is hidden with an `sr-only` class.
12564 * To show it to sighted users, define different attributes in
12565 * `footnoteLabelProperties`.
12566 *
12567 * ###### Clobbering
12568 *
12569 * Footnotes introduces a problem, as it links footnote calls to footnote
12570 * definitions on the page through `id` attributes generated from user content,
12571 * which results in DOM clobbering.
12572 *
12573 * DOM clobbering is this:
12574 *
12575 * ```html
12576 * <p id=x></p>
12577 * <script>alert(x) // `x` now refers to the DOM `p#x` element</script>
12578 * ```
12579 *
12580 * Elements by their ID are made available by browsers on the `window` object,
12581 * which is a security risk.
12582 * Using a prefix solves this problem.
12583 *
12584 * More information on how to handle clobbering and the prefix is explained in
12585 * Example: headings (DOM clobbering) in `rehype-sanitize`.
12586 *
12587 * ###### Unknown nodes
12588 *
12589 * Unknown nodes are nodes with a type that isn’t in `handlers` or `passThrough`.
12590 * The default behavior for unknown nodes is:
12591 *
12592 * * when the node has a `value` (and doesn’t have `data.hName`,
12593 * `data.hProperties`, or `data.hChildren`, see later), create a hast `text`
12594 * node
12595 * * otherwise, create a `<div>` element (which could be changed with
12596 * `data.hName`), with its children mapped from mdast to hast as well
12597 *
12598 * This behavior can be changed by passing an `unknownHandler`.
12599 *
12600 * @param {MdastNodes} tree
12601 * mdast tree.
12602 * @param {Options | null | undefined} [options]
12603 * Configuration.
12604 * @returns {HastNodes | null | undefined}
12605 * hast tree.
12606 */
12607 // To do: next major: always return a single `root`.
12608 function toHast(tree, options) {
12609 const state = (0,_state_js__WEBPACK_IMPORTED_MODULE_0__.createState)(tree, options)
12610 const node = state.one(tree, null)
12611 const foot = (0,_footer_js__WEBPACK_IMPORTED_MODULE_1__.footer)(state)
12612
12613 if (foot) {
12614 // @ts-expect-error If there’s a footer, there were definitions, meaning block
12615 // content.
12616 // So assume `node` is a parent node.
12617 node.children.push({type: 'text', value: '\n'}, foot)
12618 }
12619
12620 // To do: next major: always return root?
12621 return Array.isArray(node) ? {type: 'root', children: node} : node
12622 }
12623
12624
12625 /***/ }),
12626
12627 /***/ "../node_modules/mdast-util-to-hast/lib/revert.js":
12628 /*!********************************************************!*\
12629 !*** ../node_modules/mdast-util-to-hast/lib/revert.js ***!
12630 \********************************************************/
12631 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12632
12633 "use strict";
12634 __webpack_require__.r(__webpack_exports__);
12635 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12636 /* harmony export */ "revert": () => (/* binding */ revert)
12637 /* harmony export */ });
12638 /**
12639 * @typedef {import('hast').ElementContent} ElementContent
12640 *
12641 * @typedef {import('mdast').Content} Content
12642 * @typedef {import('mdast').Reference} Reference
12643 * @typedef {import('mdast').Root} Root
12644 *
12645 * @typedef {import('./state.js').State} State
12646 */
12647
12648 /**
12649 * @typedef {Root | Content} Nodes
12650 * @typedef {Extract<Nodes, Reference>} References
12651 */
12652
12653 // To do: next major: always return array.
12654
12655 /**
12656 * Return the content of a reference without definition as plain text.
12657 *
12658 * @param {State} state
12659 * Info passed around.
12660 * @param {References} node
12661 * Reference node (image, link).
12662 * @returns {ElementContent | Array<ElementContent>}
12663 * hast content.
12664 */
12665 function revert(state, node) {
12666 const subtype = node.referenceType
12667 let suffix = ']'
12668
12669 if (subtype === 'collapsed') {
12670 suffix += '[]'
12671 } else if (subtype === 'full') {
12672 suffix += '[' + (node.label || node.identifier) + ']'
12673 }
12674
12675 if (node.type === 'imageReference') {
12676 return {type: 'text', value: '![' + node.alt + suffix}
12677 }
12678
12679 const contents = state.all(node)
12680 const head = contents[0]
12681
12682 if (head && head.type === 'text') {
12683 head.value = '[' + head.value
12684 } else {
12685 contents.unshift({type: 'text', value: '['})
12686 }
12687
12688 const tail = contents[contents.length - 1]
12689
12690 if (tail && tail.type === 'text') {
12691 tail.value += suffix
12692 } else {
12693 contents.push({type: 'text', value: suffix})
12694 }
12695
12696 return contents
12697 }
12698
12699
12700 /***/ }),
12701
12702 /***/ "../node_modules/mdast-util-to-hast/lib/state.js":
12703 /*!*******************************************************!*\
12704 !*** ../node_modules/mdast-util-to-hast/lib/state.js ***!
12705 \*******************************************************/
12706 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
12707
12708 "use strict";
12709 __webpack_require__.r(__webpack_exports__);
12710 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12711 /* harmony export */ "all": () => (/* binding */ all),
12712 /* harmony export */ "createState": () => (/* binding */ createState),
12713 /* harmony export */ "one": () => (/* binding */ one),
12714 /* harmony export */ "wrap": () => (/* binding */ wrap)
12715 /* harmony export */ });
12716 /* harmony import */ var unist_util_visit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! unist-util-visit */ "../node_modules/unist-util-visit/lib/index.js");
12717 /* harmony import */ var unist_util_position__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! unist-util-position */ "../node_modules/unist-util-position/lib/index.js");
12718 /* harmony import */ var unist_util_generated__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! unist-util-generated */ "../node_modules/unist-util-generated/lib/index.js");
12719 /* harmony import */ var mdast_util_definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mdast-util-definitions */ "../node_modules/mdast-util-definitions/lib/index.js");
12720 /* harmony import */ var _handlers_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./handlers/index.js */ "../node_modules/mdast-util-to-hast/lib/handlers/index.js");
12721 /**
12722 * @typedef {import('hast').Content} HastContent
12723 * @typedef {import('hast').Element} HastElement
12724 * @typedef {import('hast').ElementContent} HastElementContent
12725 * @typedef {import('hast').Properties} HastProperties
12726 * @typedef {import('hast').Root} HastRoot
12727 * @typedef {import('hast').Text} HastText
12728 *
12729 * @typedef {import('mdast').Content} MdastContent
12730 * @typedef {import('mdast').Definition} MdastDefinition
12731 * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition
12732 * @typedef {import('mdast').Parent} MdastParent
12733 * @typedef {import('mdast').Root} MdastRoot
12734 */
12735
12736 /**
12737 * @typedef {HastRoot | HastContent} HastNodes
12738 * @typedef {MdastRoot | MdastContent} MdastNodes
12739 * @typedef {Extract<MdastNodes, MdastParent>} MdastParents
12740 *
12741 * @typedef EmbeddedHastFields
12742 * hast fields.
12743 * @property {string | null | undefined} [hName]
12744 * Generate a specific element with this tag name instead.
12745 * @property {HastProperties | null | undefined} [hProperties]
12746 * Generate an element with these properties instead.
12747 * @property {Array<HastElementContent> | null | undefined} [hChildren]
12748 * Generate an element with this content instead.
12749 *
12750 * @typedef {Record<string, unknown> & EmbeddedHastFields} MdastData
12751 * mdast data with embedded hast fields.
12752 *
12753 * @typedef {MdastNodes & {data?: MdastData | null | undefined}} MdastNodeWithData
12754 * mdast node with embedded hast data.
12755 *
12756 * @typedef PointLike
12757 * Point-like value.
12758 * @property {number | null | undefined} [line]
12759 * Line.
12760 * @property {number | null | undefined} [column]
12761 * Column.
12762 * @property {number | null | undefined} [offset]
12763 * Offset.
12764 *
12765 * @typedef PositionLike
12766 * Position-like value.
12767 * @property {PointLike | null | undefined} [start]
12768 * Point-like value.
12769 * @property {PointLike | null | undefined} [end]
12770 * Point-like value.
12771 *
12772 * @callback Handler
12773 * Handle a node.
12774 * @param {State} state
12775 * Info passed around.
12776 * @param {any} node
12777 * mdast node to handle.
12778 * @param {MdastParents | null | undefined} parent
12779 * Parent of `node`.
12780 * @returns {HastElementContent | Array<HastElementContent> | null | undefined}
12781 * hast node.
12782 *
12783 * @callback HFunctionProps
12784 * Signature of `state` for when props are passed.
12785 * @param {MdastNodes | PositionLike | null | undefined} node
12786 * mdast node or unist position.
12787 * @param {string} tagName
12788 * HTML tag name.
12789 * @param {HastProperties} props
12790 * Properties.
12791 * @param {Array<HastElementContent> | null | undefined} [children]
12792 * hast content.
12793 * @returns {HastElement}
12794 * Compiled element.
12795 *
12796 * @callback HFunctionNoProps
12797 * Signature of `state` for when no props are passed.
12798 * @param {MdastNodes | PositionLike | null | undefined} node
12799 * mdast node or unist position.
12800 * @param {string} tagName
12801 * HTML tag name.
12802 * @param {Array<HastElementContent> | null | undefined} [children]
12803 * hast content.
12804 * @returns {HastElement}
12805 * Compiled element.
12806 *
12807 * @typedef HFields
12808 * Info on `state`.
12809 * @property {boolean} dangerous
12810 * Whether HTML is allowed.
12811 * @property {string} clobberPrefix
12812 * Prefix to use to prevent DOM clobbering.
12813 * @property {string} footnoteLabel
12814 * Label to use to introduce the footnote section.
12815 * @property {string} footnoteLabelTagName
12816 * HTML used for the footnote label.
12817 * @property {HastProperties} footnoteLabelProperties
12818 * Properties on the HTML tag used for the footnote label.
12819 * @property {string} footnoteBackLabel
12820 * Label to use from backreferences back to their footnote call.
12821 * @property {(identifier: string) => MdastDefinition | null} definition
12822 * Definition cache.
12823 * @property {Record<string, MdastFootnoteDefinition>} footnoteById
12824 * Footnote definitions by their identifier.
12825 * @property {Array<string>} footnoteOrder
12826 * Identifiers of order when footnote calls first appear in tree order.
12827 * @property {Record<string, number>} footnoteCounts
12828 * Counts for how often the same footnote was called.
12829 * @property {Handlers} handlers
12830 * Applied handlers.
12831 * @property {Handler} unknownHandler
12832 * Handler for any none not in `passThrough` or otherwise handled.
12833 * @property {(from: MdastNodes, node: HastNodes) => void} patch
12834 * Copy a node’s positional info.
12835 * @property {<Type extends HastNodes>(from: MdastNodes, to: Type) => Type | HastElement} applyData
12836 * Honor the `data` of `from`, and generate an element instead of `node`.
12837 * @property {(node: MdastNodes, parent: MdastParents | null | undefined) => HastElementContent | Array<HastElementContent> | null | undefined} one
12838 * Transform an mdast node to hast.
12839 * @property {(node: MdastNodes) => Array<HastElementContent>} all
12840 * Transform the children of an mdast parent to hast.
12841 * @property {<Type extends HastContent>(nodes: Array<Type>, loose?: boolean | null | undefined) => Array<Type | HastText>} wrap
12842 * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.
12843 * @property {(left: MdastNodeWithData | PositionLike | null | undefined, right: HastElementContent) => HastElementContent} augment
12844 * Like `state` but lower-level and usable on non-elements.
12845 * Deprecated: use `patch` and `applyData`.
12846 * @property {Array<string>} passThrough
12847 * List of node types to pass through untouched (except for their children).
12848 *
12849 * @typedef Options
12850 * Configuration (optional).
12851 * @property {boolean | null | undefined} [allowDangerousHtml=false]
12852 * Whether to persist raw HTML in markdown in the hast tree.
12853 * @property {string | null | undefined} [clobberPrefix='user-content-']
12854 * Prefix to use before the `id` attribute on footnotes to prevent it from
12855 * *clobbering*.
12856 * @property {string | null | undefined} [footnoteBackLabel='Back to content']
12857 * Label to use from backreferences back to their footnote call (affects
12858 * screen readers).
12859 * @property {string | null | undefined} [footnoteLabel='Footnotes']
12860 * Label to use for the footnotes section (affects screen readers).
12861 * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]
12862 * Properties to use on the footnote label (note that `id: 'footnote-label'`
12863 * is always added as footnote calls use it with `aria-describedby` to
12864 * provide an accessible label).
12865 * @property {string | null | undefined} [footnoteLabelTagName='h2']
12866 * Tag name to use for the footnote label.
12867 * @property {Handlers | null | undefined} [handlers]
12868 * Extra handlers for nodes.
12869 * @property {Array<string> | null | undefined} [passThrough]
12870 * List of custom mdast node types to pass through (keep) in hast (note that
12871 * the node itself is passed, but eventual children are transformed).
12872 * @property {Handler | null | undefined} [unknownHandler]
12873 * Handler for all unknown nodes.
12874 *
12875 * @typedef {Record<string, Handler>} Handlers
12876 * Handle nodes.
12877 *
12878 * @typedef {HFunctionProps & HFunctionNoProps & HFields} State
12879 * Info passed around.
12880 */
12881
12882
12883
12884
12885
12886
12887
12888 const own = {}.hasOwnProperty
12889
12890 /**
12891 * Create `state` from an mdast tree.
12892 *
12893 * @param {MdastNodes} tree
12894 * mdast node to transform.
12895 * @param {Options | null | undefined} [options]
12896 * Configuration.
12897 * @returns {State}
12898 * `state` function.
12899 */
12900 function createState(tree, options) {
12901 const settings = options || {}
12902 const dangerous = settings.allowDangerousHtml || false
12903 /** @type {Record<string, MdastFootnoteDefinition>} */
12904 const footnoteById = {}
12905
12906 // To do: next major: add `options` to state, remove:
12907 // `dangerous`, `clobberPrefix`, `footnoteLabel`, `footnoteLabelTagName`,
12908 // `footnoteLabelProperties`, `footnoteBackLabel`, `passThrough`,
12909 // `unknownHandler`.
12910
12911 // To do: next major: move to `state.options.allowDangerousHtml`.
12912 state.dangerous = dangerous
12913 // To do: next major: move to `state.options`.
12914 state.clobberPrefix =
12915 settings.clobberPrefix === undefined || settings.clobberPrefix === null
12916 ? 'user-content-'
12917 : settings.clobberPrefix
12918 // To do: next major: move to `state.options`.
12919 state.footnoteLabel = settings.footnoteLabel || 'Footnotes'
12920 // To do: next major: move to `state.options`.
12921 state.footnoteLabelTagName = settings.footnoteLabelTagName || 'h2'
12922 // To do: next major: move to `state.options`.
12923 state.footnoteLabelProperties = settings.footnoteLabelProperties || {
12924 className: ['sr-only']
12925 }
12926 // To do: next major: move to `state.options`.
12927 state.footnoteBackLabel = settings.footnoteBackLabel || 'Back to content'
12928 // To do: next major: move to `state.options`.
12929 state.unknownHandler = settings.unknownHandler
12930 // To do: next major: move to `state.options`.
12931 state.passThrough = settings.passThrough
12932
12933 state.handlers = {..._handlers_index_js__WEBPACK_IMPORTED_MODULE_0__.handlers, ...settings.handlers}
12934
12935 // To do: next major: replace utility with `definitionById` object, so we
12936 // only walk once (as we need footnotes too).
12937 state.definition = (0,mdast_util_definitions__WEBPACK_IMPORTED_MODULE_1__.definitions)(tree)
12938 state.footnoteById = footnoteById
12939 /** @type {Array<string>} */
12940 state.footnoteOrder = []
12941 /** @type {Record<string, number>} */
12942 state.footnoteCounts = {}
12943
12944 state.patch = patch
12945 state.applyData = applyData
12946 state.one = oneBound
12947 state.all = allBound
12948 state.wrap = wrap
12949 // To do: next major: remove `augment`.
12950 state.augment = augment
12951
12952 ;(0,unist_util_visit__WEBPACK_IMPORTED_MODULE_2__.visit)(tree, 'footnoteDefinition', (definition) => {
12953 const id = String(definition.identifier).toUpperCase()
12954
12955 // Mimick CM behavior of link definitions.
12956 // See: <https://github.com/syntax-tree/mdast-util-definitions/blob/8290999/index.js#L26>.
12957 if (!own.call(footnoteById, id)) {
12958 footnoteById[id] = definition
12959 }
12960 })
12961
12962 // @ts-expect-error Hush, it’s fine!
12963 return state
12964
12965 /**
12966 * Finalise the created `right`, a hast node, from `left`, an mdast node.
12967 *
12968 * @param {MdastNodeWithData | PositionLike | null | undefined} left
12969 * @param {HastElementContent} right
12970 * @returns {HastElementContent}
12971 */
12972 /* c8 ignore start */
12973 // To do: next major: remove.
12974 function augment(left, right) {
12975 // Handle `data.hName`, `data.hProperties, `data.hChildren`.
12976 if (left && 'data' in left && left.data) {
12977 /** @type {MdastData} */
12978 const data = left.data
12979
12980 if (data.hName) {
12981 if (right.type !== 'element') {
12982 right = {
12983 type: 'element',
12984 tagName: '',
12985 properties: {},
12986 children: []
12987 }
12988 }
12989
12990 right.tagName = data.hName
12991 }
12992
12993 if (right.type === 'element' && data.hProperties) {
12994 right.properties = {...right.properties, ...data.hProperties}
12995 }
12996
12997 if ('children' in right && right.children && data.hChildren) {
12998 right.children = data.hChildren
12999 }
13000 }
13001
13002 if (left) {
13003 const ctx = 'type' in left ? left : {position: left}
13004
13005 if (!(0,unist_util_generated__WEBPACK_IMPORTED_MODULE_3__.generated)(ctx)) {
13006 // @ts-expect-error: fine.
13007 right.position = {start: (0,unist_util_position__WEBPACK_IMPORTED_MODULE_4__.pointStart)(ctx), end: (0,unist_util_position__WEBPACK_IMPORTED_MODULE_4__.pointEnd)(ctx)}
13008 }
13009 }
13010
13011 return right
13012 }
13013 /* c8 ignore stop */
13014
13015 /**
13016 * Create an element for `node`.
13017 *
13018 * @type {HFunctionProps}
13019 */
13020 /* c8 ignore start */
13021 // To do: next major: remove.
13022 function state(node, tagName, props, children) {
13023 if (Array.isArray(props)) {
13024 children = props
13025 props = {}
13026 }
13027
13028 // @ts-expect-error augmenting an element yields an element.
13029 return augment(node, {
13030 type: 'element',
13031 tagName,
13032 properties: props || {},
13033 children: children || []
13034 })
13035 }
13036 /* c8 ignore stop */
13037
13038 /**
13039 * Transform an mdast node into a hast node.
13040 *
13041 * @param {MdastNodes} node
13042 * mdast node.
13043 * @param {MdastParents | null | undefined} [parent]
13044 * Parent of `node`.
13045 * @returns {HastElementContent | Array<HastElementContent> | null | undefined}
13046 * Resulting hast node.
13047 */
13048 function oneBound(node, parent) {
13049 // @ts-expect-error: that’s a state :)
13050 return one(state, node, parent)
13051 }
13052
13053 /**
13054 * Transform the children of an mdast node into hast nodes.
13055 *
13056 * @param {MdastNodes} parent
13057 * mdast node to compile
13058 * @returns {Array<HastElementContent>}
13059 * Resulting hast nodes.
13060 */
13061 function allBound(parent) {
13062 // @ts-expect-error: that’s a state :)
13063 return all(state, parent)
13064 }
13065 }
13066
13067 /**
13068 * Copy a node’s positional info.
13069 *
13070 * @param {MdastNodes} from
13071 * mdast node to copy from.
13072 * @param {HastNodes} to
13073 * hast node to copy into.
13074 * @returns {void}
13075 * Nothing.
13076 */
13077 function patch(from, to) {
13078 if (from.position) to.position = (0,unist_util_position__WEBPACK_IMPORTED_MODULE_4__.position)(from)
13079 }
13080
13081 /**
13082 * Honor the `data` of `from` and maybe generate an element instead of `to`.
13083 *
13084 * @template {HastNodes} Type
13085 * Node type.
13086 * @param {MdastNodes} from
13087 * mdast node to use data from.
13088 * @param {Type} to
13089 * hast node to change.
13090 * @returns {Type | HastElement}
13091 * Nothing.
13092 */
13093 function applyData(from, to) {
13094 /** @type {Type | HastElement} */
13095 let result = to
13096
13097 // Handle `data.hName`, `data.hProperties, `data.hChildren`.
13098 if (from && from.data) {
13099 const hName = from.data.hName
13100 const hChildren = from.data.hChildren
13101 const hProperties = from.data.hProperties
13102
13103 if (typeof hName === 'string') {
13104 // Transforming the node resulted in an element with a different name
13105 // than wanted:
13106 if (result.type === 'element') {
13107 result.tagName = hName
13108 }
13109 // Transforming the node resulted in a non-element, which happens for
13110 // raw, text, and root nodes (unless custom handlers are passed).
13111 // The intent is likely to keep the content around (otherwise: pass
13112 // `hChildren`).
13113 else {
13114 result = {
13115 type: 'element',
13116 tagName: hName,
13117 properties: {},
13118 children: []
13119 }
13120
13121 // To do: next major: take the children from the `root`, or inject the
13122 // raw/text/comment or so into the element?
13123 // if ('children' in node) {
13124 // // @ts-expect-error: assume `children` are allowed in elements.
13125 // result.children = node.children
13126 // } else {
13127 // // @ts-expect-error: assume `node` is allowed in elements.
13128 // result.children.push(node)
13129 // }
13130 }
13131 }
13132
13133 if (result.type === 'element' && hProperties) {
13134 result.properties = {...result.properties, ...hProperties}
13135 }
13136
13137 if (
13138 'children' in result &&
13139 result.children &&
13140 hChildren !== null &&
13141 hChildren !== undefined
13142 ) {
13143 // @ts-expect-error: assume valid children are defined.
13144 result.children = hChildren
13145 }
13146 }
13147
13148 return result
13149 }
13150
13151 /**
13152 * Transform an mdast node into a hast node.
13153 *
13154 * @param {State} state
13155 * Info passed around.
13156 * @param {MdastNodes} node
13157 * mdast node.
13158 * @param {MdastParents | null | undefined} [parent]
13159 * Parent of `node`.
13160 * @returns {HastElementContent | Array<HastElementContent> | null | undefined}
13161 * Resulting hast node.
13162 */
13163 // To do: next major: do not expose, keep bound.
13164 function one(state, node, parent) {
13165 const type = node && node.type
13166
13167 // Fail on non-nodes.
13168 if (!type) {
13169 throw new Error('Expected node, got `' + node + '`')
13170 }
13171
13172 if (own.call(state.handlers, type)) {
13173 return state.handlers[type](state, node, parent)
13174 }
13175
13176 if (state.passThrough && state.passThrough.includes(type)) {
13177 // To do: next major: deep clone.
13178 // @ts-expect-error: types of passed through nodes are expected to be added manually.
13179 return 'children' in node ? {...node, children: all(state, node)} : node
13180 }
13181
13182 if (state.unknownHandler) {
13183 return state.unknownHandler(state, node, parent)
13184 }
13185
13186 return defaultUnknownHandler(state, node)
13187 }
13188
13189 /**
13190 * Transform the children of an mdast node into hast nodes.
13191 *
13192 * @param {State} state
13193 * Info passed around.
13194 * @param {MdastNodes} parent
13195 * mdast node to compile
13196 * @returns {Array<HastElementContent>}
13197 * Resulting hast nodes.
13198 */
13199 // To do: next major: do not expose, keep bound.
13200 function all(state, parent) {
13201 /** @type {Array<HastElementContent>} */
13202 const values = []
13203
13204 if ('children' in parent) {
13205 const nodes = parent.children
13206 let index = -1
13207 while (++index < nodes.length) {
13208 const result = one(state, nodes[index], parent)
13209
13210 // To do: see if we van clean this? Can we merge texts?
13211 if (result) {
13212 if (index && nodes[index - 1].type === 'break') {
13213 if (!Array.isArray(result) && result.type === 'text') {
13214 result.value = result.value.replace(/^\s+/, '')
13215 }
13216
13217 if (!Array.isArray(result) && result.type === 'element') {
13218 const head = result.children[0]
13219
13220 if (head && head.type === 'text') {
13221 head.value = head.value.replace(/^\s+/, '')
13222 }
13223 }
13224 }
13225
13226 if (Array.isArray(result)) {
13227 values.push(...result)
13228 } else {
13229 values.push(result)
13230 }
13231 }
13232 }
13233 }
13234
13235 return values
13236 }
13237
13238 /**
13239 * Transform an unknown node.
13240 *
13241 * @param {State} state
13242 * Info passed around.
13243 * @param {MdastNodes} node
13244 * Unknown mdast node.
13245 * @returns {HastText | HastElement}
13246 * Resulting hast node.
13247 */
13248 function defaultUnknownHandler(state, node) {
13249 const data = node.data || {}
13250 /** @type {HastText | HastElement} */
13251 const result =
13252 'value' in node &&
13253 !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))
13254 ? {type: 'text', value: node.value}
13255 : {
13256 type: 'element',
13257 tagName: 'div',
13258 properties: {},
13259 children: all(state, node)
13260 }
13261
13262 state.patch(node, result)
13263 return state.applyData(node, result)
13264 }
13265
13266 /**
13267 * Wrap `nodes` with line endings between each node.
13268 *
13269 * @template {HastContent} Type
13270 * Node type.
13271 * @param {Array<Type>} nodes
13272 * List of nodes to wrap.
13273 * @param {boolean | null | undefined} [loose=false]
13274 * Whether to add line endings at start and end.
13275 * @returns {Array<Type | HastText>}
13276 * Wrapped nodes.
13277 */
13278 function wrap(nodes, loose) {
13279 /** @type {Array<Type | HastText>} */
13280 const result = []
13281 let index = -1
13282
13283 if (loose) {
13284 result.push({type: 'text', value: '\n'})
13285 }
13286
13287 while (++index < nodes.length) {
13288 if (index) result.push({type: 'text', value: '\n'})
13289 result.push(nodes[index])
13290 }
13291
13292 if (loose && nodes.length > 0) {
13293 result.push({type: 'text', value: '\n'})
13294 }
13295
13296 return result
13297 }
13298
13299
13300 /***/ }),
13301
13302 /***/ "../node_modules/mdast-util-to-string/lib/index.js":
13303 /*!*********************************************************!*\
13304 !*** ../node_modules/mdast-util-to-string/lib/index.js ***!
13305 \*********************************************************/
13306 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13307
13308 "use strict";
13309 __webpack_require__.r(__webpack_exports__);
13310 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13311 /* harmony export */ "toString": () => (/* binding */ toString)
13312 /* harmony export */ });
13313 /**
13314 * @typedef {import('mdast').Root|import('mdast').Content} Node
13315 *
13316 * @typedef Options
13317 * Configuration (optional).
13318 * @property {boolean | null | undefined} [includeImageAlt=true]
13319 * Whether to use `alt` for `image`s.
13320 * @property {boolean | null | undefined} [includeHtml=true]
13321 * Whether to use `value` of HTML.
13322 */
13323
13324 /** @type {Options} */
13325 const emptyOptions = {}
13326
13327 /**
13328 * Get the text content of a node or list of nodes.
13329 *
13330 * Prefers the node’s plain-text fields, otherwise serializes its children,
13331 * and if the given value is an array, serialize the nodes in it.
13332 *
13333 * @param {unknown} value
13334 * Thing to serialize, typically `Node`.
13335 * @param {Options | null | undefined} [options]
13336 * Configuration (optional).
13337 * @returns {string}
13338 * Serialized `value`.
13339 */
13340 function toString(value, options) {
13341 const settings = options || emptyOptions
13342 const includeImageAlt =
13343 typeof settings.includeImageAlt === 'boolean'
13344 ? settings.includeImageAlt
13345 : true
13346 const includeHtml =
13347 typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true
13348
13349 return one(value, includeImageAlt, includeHtml)
13350 }
13351
13352 /**
13353 * One node or several nodes.
13354 *
13355 * @param {unknown} value
13356 * Thing to serialize.
13357 * @param {boolean} includeImageAlt
13358 * Include image `alt`s.
13359 * @param {boolean} includeHtml
13360 * Include HTML.
13361 * @returns {string}
13362 * Serialized node.
13363 */
13364 function one(value, includeImageAlt, includeHtml) {
13365 if (node(value)) {
13366 if ('value' in value) {
13367 return value.type === 'html' && !includeHtml ? '' : value.value
13368 }
13369
13370 if (includeImageAlt && 'alt' in value && value.alt) {
13371 return value.alt
13372 }
13373
13374 if ('children' in value) {
13375 return all(value.children, includeImageAlt, includeHtml)
13376 }
13377 }
13378
13379 if (Array.isArray(value)) {
13380 return all(value, includeImageAlt, includeHtml)
13381 }
13382
13383 return ''
13384 }
13385
13386 /**
13387 * Serialize a list of nodes.
13388 *
13389 * @param {Array<unknown>} values
13390 * Thing to serialize.
13391 * @param {boolean} includeImageAlt
13392 * Include image `alt`s.
13393 * @param {boolean} includeHtml
13394 * Include HTML.
13395 * @returns {string}
13396 * Serialized nodes.
13397 */
13398 function all(values, includeImageAlt, includeHtml) {
13399 /** @type {Array<string>} */
13400 const result = []
13401 let index = -1
13402
13403 while (++index < values.length) {
13404 result[index] = one(values[index], includeImageAlt, includeHtml)
13405 }
13406
13407 return result.join('')
13408 }
13409
13410 /**
13411 * Check if `value` looks like a node.
13412 *
13413 * @param {unknown} value
13414 * Thing.
13415 * @returns {value is Node}
13416 * Whether `value` is a node.
13417 */
13418 function node(value) {
13419 return Boolean(value && typeof value === 'object')
13420 }
13421
13422
13423 /***/ }),
13424
13425 /***/ "../node_modules/micromark-core-commonmark/dev/lib/attention.js":
13426 /*!**********************************************************************!*\
13427 !*** ../node_modules/micromark-core-commonmark/dev/lib/attention.js ***!
13428 \**********************************************************************/
13429 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13430
13431 "use strict";
13432 __webpack_require__.r(__webpack_exports__);
13433 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13434 /* harmony export */ "attention": () => (/* binding */ attention)
13435 /* harmony export */ });
13436 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
13437 /* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-chunked */ "../node_modules/micromark-util-chunked/dev/index.js");
13438 /* harmony import */ var micromark_util_classify_character__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-classify-character */ "../node_modules/micromark-util-classify-character/dev/index.js");
13439 /* harmony import */ var micromark_util_resolve_all__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-resolve-all */ "../node_modules/micromark-util-resolve-all/index.js");
13440 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
13441 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
13442 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
13443 /**
13444 * @typedef {import('micromark-util-types').Construct} Construct
13445 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
13446 * @typedef {import('micromark-util-types').Resolver} Resolver
13447 * @typedef {import('micromark-util-types').State} State
13448 * @typedef {import('micromark-util-types').Token} Token
13449 * @typedef {import('micromark-util-types').Event} Event
13450 * @typedef {import('micromark-util-types').Code} Code
13451 * @typedef {import('micromark-util-types').Point} Point
13452 */
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462 /** @type {Construct} */
13463 const attention = {
13464 name: 'attention',
13465 tokenize: tokenizeAttention,
13466 resolveAll: resolveAllAttention
13467 }
13468
13469 /**
13470 * Take all events and resolve attention to emphasis or strong.
13471 *
13472 * @type {Resolver}
13473 */
13474 function resolveAllAttention(events, context) {
13475 let index = -1
13476 /** @type {number} */
13477 let open
13478 /** @type {Token} */
13479 let group
13480 /** @type {Token} */
13481 let text
13482 /** @type {Token} */
13483 let openingSequence
13484 /** @type {Token} */
13485 let closingSequence
13486 /** @type {number} */
13487 let use
13488 /** @type {Event[]} */
13489 let nextEvents
13490 /** @type {number} */
13491 let offset
13492
13493 // Walk through all events.
13494 //
13495 // Note: performance of this is fine on an mb of normal markdown, but it’s
13496 // a bottleneck for malicious stuff.
13497 while (++index < events.length) {
13498 // Find a token that can close.
13499 if (
13500 events[index][0] === 'enter' &&
13501 events[index][1].type === 'attentionSequence' &&
13502 events[index][1]._close
13503 ) {
13504 open = index
13505
13506 // Now walk back to find an opener.
13507 while (open--) {
13508 // Find a token that can open the closer.
13509 if (
13510 events[open][0] === 'exit' &&
13511 events[open][1].type === 'attentionSequence' &&
13512 events[open][1]._open &&
13513 // If the markers are the same:
13514 context.sliceSerialize(events[open][1]).charCodeAt(0) ===
13515 context.sliceSerialize(events[index][1]).charCodeAt(0)
13516 ) {
13517 // If the opening can close or the closing can open,
13518 // and the close size *is not* a multiple of three,
13519 // but the sum of the opening and closing size *is* multiple of three,
13520 // then don’t match.
13521 if (
13522 (events[open][1]._close || events[index][1]._open) &&
13523 (events[index][1].end.offset - events[index][1].start.offset) % 3 &&
13524 !(
13525 (events[open][1].end.offset -
13526 events[open][1].start.offset +
13527 events[index][1].end.offset -
13528 events[index][1].start.offset) %
13529 3
13530 )
13531 ) {
13532 continue
13533 }
13534
13535 // Number of markers to use from the sequence.
13536 use =
13537 events[open][1].end.offset - events[open][1].start.offset > 1 &&
13538 events[index][1].end.offset - events[index][1].start.offset > 1
13539 ? 2
13540 : 1
13541
13542 const start = Object.assign({}, events[open][1].end)
13543 const end = Object.assign({}, events[index][1].start)
13544 movePoint(start, -use)
13545 movePoint(end, use)
13546
13547 openingSequence = {
13548 type: use > 1 ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.strongSequence : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.emphasisSequence,
13549 start,
13550 end: Object.assign({}, events[open][1].end)
13551 }
13552 closingSequence = {
13553 type: use > 1 ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.strongSequence : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.emphasisSequence,
13554 start: Object.assign({}, events[index][1].start),
13555 end
13556 }
13557 text = {
13558 type: use > 1 ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.strongText : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.emphasisText,
13559 start: Object.assign({}, events[open][1].end),
13560 end: Object.assign({}, events[index][1].start)
13561 }
13562 group = {
13563 type: use > 1 ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.strong : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.emphasis,
13564 start: Object.assign({}, openingSequence.start),
13565 end: Object.assign({}, closingSequence.end)
13566 }
13567
13568 events[open][1].end = Object.assign({}, openingSequence.start)
13569 events[index][1].start = Object.assign({}, closingSequence.end)
13570
13571 nextEvents = []
13572
13573 // If there are more markers in the opening, add them before.
13574 if (events[open][1].end.offset - events[open][1].start.offset) {
13575 nextEvents = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(nextEvents, [
13576 ['enter', events[open][1], context],
13577 ['exit', events[open][1], context]
13578 ])
13579 }
13580
13581 // Opening.
13582 nextEvents = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(nextEvents, [
13583 ['enter', group, context],
13584 ['enter', openingSequence, context],
13585 ['exit', openingSequence, context],
13586 ['enter', text, context]
13587 ])
13588
13589 // Between.
13590 nextEvents = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(
13591 nextEvents,
13592 (0,micromark_util_resolve_all__WEBPACK_IMPORTED_MODULE_3__.resolveAll)(
13593 context.parser.constructs.insideSpan.null,
13594 events.slice(open + 1, index),
13595 context
13596 )
13597 )
13598
13599 // Closing.
13600 nextEvents = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(nextEvents, [
13601 ['exit', text, context],
13602 ['enter', closingSequence, context],
13603 ['exit', closingSequence, context],
13604 ['exit', group, context]
13605 ])
13606
13607 // If there are more markers in the closing, add them after.
13608 if (events[index][1].end.offset - events[index][1].start.offset) {
13609 offset = 2
13610 nextEvents = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(nextEvents, [
13611 ['enter', events[index][1], context],
13612 ['exit', events[index][1], context]
13613 ])
13614 } else {
13615 offset = 0
13616 }
13617
13618 (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.splice)(events, open - 1, index - open + 3, nextEvents)
13619
13620 index = open + nextEvents.length - offset - 2
13621 break
13622 }
13623 }
13624 }
13625 }
13626
13627 // Remove remaining sequences.
13628 index = -1
13629
13630 while (++index < events.length) {
13631 if (events[index][1].type === 'attentionSequence') {
13632 events[index][1].type = 'data'
13633 }
13634 }
13635
13636 return events
13637 }
13638
13639 /** @type {Tokenizer} */
13640 function tokenizeAttention(effects, ok) {
13641 const attentionMarkers = this.parser.constructs.attentionMarkers.null
13642 const previous = this.previous
13643 const before = (0,micromark_util_classify_character__WEBPACK_IMPORTED_MODULE_4__.classifyCharacter)(previous)
13644
13645 /** @type {NonNullable<Code>} */
13646 let marker
13647
13648 return start
13649
13650 /** @type {State} */
13651 function start(code) {
13652 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
13653 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.asterisk || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.underscore,
13654 'expected asterisk or underscore'
13655 )
13656 effects.enter('attentionSequence')
13657 marker = code
13658 return sequence(code)
13659 }
13660
13661 /** @type {State} */
13662 function sequence(code) {
13663 if (code === marker) {
13664 effects.consume(code)
13665 return sequence
13666 }
13667
13668 const token = effects.exit('attentionSequence')
13669 const after = (0,micromark_util_classify_character__WEBPACK_IMPORTED_MODULE_4__.classifyCharacter)(code)
13670
13671 const open =
13672 !after ||
13673 (after === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_6__.constants.characterGroupPunctuation && before) ||
13674 attentionMarkers.includes(code)
13675 const close =
13676 !before ||
13677 (before === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_6__.constants.characterGroupPunctuation && after) ||
13678 attentionMarkers.includes(previous)
13679
13680 token._open = Boolean(
13681 marker === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.asterisk ? open : open && (before || !close)
13682 )
13683 token._close = Boolean(
13684 marker === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.asterisk ? close : close && (after || !open)
13685 )
13686 return ok(code)
13687 }
13688 }
13689
13690 /**
13691 * Move a point a bit.
13692 *
13693 * Note: `move` only works inside lines! It’s not possible to move past other
13694 * chunks (replacement characters, tabs, or line endings).
13695 *
13696 * @param {Point} point
13697 * @param {number} offset
13698 * @returns {void}
13699 */
13700 function movePoint(point, offset) {
13701 point.column += offset
13702 point.offset += offset
13703 point._bufferIndex += offset
13704 }
13705
13706
13707 /***/ }),
13708
13709 /***/ "../node_modules/micromark-core-commonmark/dev/lib/autolink.js":
13710 /*!*********************************************************************!*\
13711 !*** ../node_modules/micromark-core-commonmark/dev/lib/autolink.js ***!
13712 \*********************************************************************/
13713 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13714
13715 "use strict";
13716 __webpack_require__.r(__webpack_exports__);
13717 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13718 /* harmony export */ "autolink": () => (/* binding */ autolink)
13719 /* harmony export */ });
13720 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
13721 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
13722 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
13723 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
13724 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
13725 /**
13726 * @typedef {import('micromark-util-types').Construct} Construct
13727 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
13728 * @typedef {import('micromark-util-types').State} State
13729 */
13730
13731
13732
13733
13734
13735
13736
13737 /** @type {Construct} */
13738 const autolink = {name: 'autolink', tokenize: tokenizeAutolink}
13739
13740 /** @type {Tokenizer} */
13741 function tokenizeAutolink(effects, ok, nok) {
13742 let size = 1
13743
13744 return start
13745
13746 /** @type {State} */
13747 function start(code) {
13748 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.lessThan, 'expected `<`')
13749 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolink)
13750 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolinkMarker)
13751 effects.consume(code)
13752 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolinkMarker)
13753 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolinkProtocol)
13754 return open
13755 }
13756
13757 /** @type {State} */
13758 function open(code) {
13759 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlpha)(code)) {
13760 effects.consume(code)
13761 return schemeOrEmailAtext
13762 }
13763
13764 return (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAtext)(code) ? emailAtext(code) : nok(code)
13765 }
13766
13767 /** @type {State} */
13768 function schemeOrEmailAtext(code) {
13769 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.plusSign ||
13770 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash ||
13771 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dot ||
13772 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlphanumeric)(code)
13773 ? schemeInsideOrEmailAtext(code)
13774 : emailAtext(code)
13775 }
13776
13777 /** @type {State} */
13778 function schemeInsideOrEmailAtext(code) {
13779 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.colon) {
13780 effects.consume(code)
13781 return urlInside
13782 }
13783
13784 if (
13785 (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.plusSign ||
13786 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash ||
13787 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dot ||
13788 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlphanumeric)(code)) &&
13789 size++ < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__.constants.autolinkSchemeSizeMax
13790 ) {
13791 effects.consume(code)
13792 return schemeInsideOrEmailAtext
13793 }
13794
13795 return emailAtext(code)
13796 }
13797
13798 /** @type {State} */
13799 function urlInside(code) {
13800 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan) {
13801 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolinkProtocol)
13802 return end(code)
13803 }
13804
13805 if (
13806 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof ||
13807 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.space ||
13808 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.lessThan ||
13809 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiControl)(code)
13810 ) {
13811 return nok(code)
13812 }
13813
13814 effects.consume(code)
13815 return urlInside
13816 }
13817
13818 /** @type {State} */
13819 function emailAtext(code) {
13820 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.atSign) {
13821 effects.consume(code)
13822 size = 0
13823 return emailAtSignOrDot
13824 }
13825
13826 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAtext)(code)) {
13827 effects.consume(code)
13828 return emailAtext
13829 }
13830
13831 return nok(code)
13832 }
13833
13834 /** @type {State} */
13835 function emailAtSignOrDot(code) {
13836 return (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlphanumeric)(code) ? emailLabel(code) : nok(code)
13837 }
13838
13839 /** @type {State} */
13840 function emailLabel(code) {
13841 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dot) {
13842 effects.consume(code)
13843 size = 0
13844 return emailAtSignOrDot
13845 }
13846
13847 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan) {
13848 // Exit, then change the type.
13849 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolinkProtocol).type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolinkEmail
13850 return end(code)
13851 }
13852
13853 return emailValue(code)
13854 }
13855
13856 /** @type {State} */
13857 function emailValue(code) {
13858 if (
13859 (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlphanumeric)(code)) &&
13860 size++ < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__.constants.autolinkDomainSizeMax
13861 ) {
13862 effects.consume(code)
13863 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash ? emailValue : emailLabel
13864 }
13865
13866 return nok(code)
13867 }
13868
13869 /** @type {State} */
13870 function end(code) {
13871 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan, 'expected `>`')
13872 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolinkMarker)
13873 effects.consume(code)
13874 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolinkMarker)
13875 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.autolink)
13876 return ok
13877 }
13878 }
13879
13880
13881 /***/ }),
13882
13883 /***/ "../node_modules/micromark-core-commonmark/dev/lib/blank-line.js":
13884 /*!***********************************************************************!*\
13885 !*** ../node_modules/micromark-core-commonmark/dev/lib/blank-line.js ***!
13886 \***********************************************************************/
13887 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13888
13889 "use strict";
13890 __webpack_require__.r(__webpack_exports__);
13891 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13892 /* harmony export */ "blankLine": () => (/* binding */ blankLine)
13893 /* harmony export */ });
13894 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
13895 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
13896 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
13897 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
13898 /**
13899 * @typedef {import('micromark-util-types').Construct} Construct
13900 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
13901 * @typedef {import('micromark-util-types').State} State
13902 */
13903
13904
13905
13906
13907
13908
13909 /** @type {Construct} */
13910 const blankLine = {tokenize: tokenizeBlankLine, partial: true}
13911
13912 /** @type {Tokenizer} */
13913 function tokenizeBlankLine(effects, ok, nok) {
13914 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_0__.factorySpace)(effects, afterWhitespace, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix)
13915
13916 /** @type {State} */
13917 function afterWhitespace(code) {
13918 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code) ? ok(code) : nok(code)
13919 }
13920 }
13921
13922
13923 /***/ }),
13924
13925 /***/ "../node_modules/micromark-core-commonmark/dev/lib/block-quote.js":
13926 /*!************************************************************************!*\
13927 !*** ../node_modules/micromark-core-commonmark/dev/lib/block-quote.js ***!
13928 \************************************************************************/
13929 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
13930
13931 "use strict";
13932 __webpack_require__.r(__webpack_exports__);
13933 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13934 /* harmony export */ "blockQuote": () => (/* binding */ blockQuote)
13935 /* harmony export */ });
13936 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
13937 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
13938 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
13939 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
13940 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
13941 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
13942 /**
13943 * @typedef {import('micromark-util-types').Construct} Construct
13944 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
13945 * @typedef {import('micromark-util-types').Exiter} Exiter
13946 * @typedef {import('micromark-util-types').State} State
13947 */
13948
13949
13950
13951
13952
13953
13954
13955
13956 /** @type {Construct} */
13957 const blockQuote = {
13958 name: 'blockQuote',
13959 tokenize: tokenizeBlockQuoteStart,
13960 continuation: {tokenize: tokenizeBlockQuoteContinuation},
13961 exit
13962 }
13963
13964 /** @type {Tokenizer} */
13965 function tokenizeBlockQuoteStart(effects, ok, nok) {
13966 const self = this
13967
13968 return start
13969
13970 /** @type {State} */
13971 function start(code) {
13972 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan) {
13973 const state = self.containerState
13974
13975 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(state, 'expected `containerState` to be defined in container')
13976
13977 if (!state.open) {
13978 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuote, {_container: true})
13979 state.open = true
13980 }
13981
13982 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuotePrefix)
13983 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuoteMarker)
13984 effects.consume(code)
13985 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuoteMarker)
13986 return after
13987 }
13988
13989 return nok(code)
13990 }
13991
13992 /** @type {State} */
13993 function after(code) {
13994 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)) {
13995 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuotePrefixWhitespace)
13996 effects.consume(code)
13997 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuotePrefixWhitespace)
13998 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuotePrefix)
13999 return ok
14000 }
14001
14002 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuotePrefix)
14003 return ok(code)
14004 }
14005 }
14006
14007 /** @type {Tokenizer} */
14008 function tokenizeBlockQuoteContinuation(effects, ok, nok) {
14009 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(
14010 effects,
14011 effects.attempt(blockQuote, ok, nok),
14012 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.linePrefix,
14013 this.parser.constructs.disable.null.includes('codeIndented')
14014 ? undefined
14015 : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.tabSize
14016 )
14017 }
14018
14019 /** @type {Exiter} */
14020 function exit(effects) {
14021 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.blockQuote)
14022 }
14023
14024
14025 /***/ }),
14026
14027 /***/ "../node_modules/micromark-core-commonmark/dev/lib/character-escape.js":
14028 /*!*****************************************************************************!*\
14029 !*** ../node_modules/micromark-core-commonmark/dev/lib/character-escape.js ***!
14030 \*****************************************************************************/
14031 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14032
14033 "use strict";
14034 __webpack_require__.r(__webpack_exports__);
14035 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14036 /* harmony export */ "characterEscape": () => (/* binding */ characterEscape)
14037 /* harmony export */ });
14038 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
14039 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
14040 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
14041 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
14042 /**
14043 * @typedef {import('micromark-util-types').Construct} Construct
14044 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
14045 * @typedef {import('micromark-util-types').State} State
14046 */
14047
14048
14049
14050
14051
14052
14053 /** @type {Construct} */
14054 const characterEscape = {
14055 name: 'characterEscape',
14056 tokenize: tokenizeCharacterEscape
14057 }
14058
14059 /** @type {Tokenizer} */
14060 function tokenizeCharacterEscape(effects, ok, nok) {
14061 return start
14062
14063 /** @type {State} */
14064 function start(code) {
14065 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.backslash, 'expected `\\`')
14066 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterEscape)
14067 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.escapeMarker)
14068 effects.consume(code)
14069 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.escapeMarker)
14070 return open
14071 }
14072
14073 /** @type {State} */
14074 function open(code) {
14075 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiPunctuation)(code)) {
14076 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterEscapeValue)
14077 effects.consume(code)
14078 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterEscapeValue)
14079 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterEscape)
14080 return ok
14081 }
14082
14083 return nok(code)
14084 }
14085 }
14086
14087
14088 /***/ }),
14089
14090 /***/ "../node_modules/micromark-core-commonmark/dev/lib/character-reference.js":
14091 /*!********************************************************************************!*\
14092 !*** ../node_modules/micromark-core-commonmark/dev/lib/character-reference.js ***!
14093 \********************************************************************************/
14094 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14095
14096 "use strict";
14097 __webpack_require__.r(__webpack_exports__);
14098 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14099 /* harmony export */ "characterReference": () => (/* binding */ characterReference)
14100 /* harmony export */ });
14101 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
14102 /* harmony import */ var decode_named_character_reference__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! decode-named-character-reference */ "../node_modules/decode-named-character-reference/index.dom.js");
14103 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
14104 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
14105 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
14106 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
14107 /**
14108 * @typedef {import('micromark-util-types').Construct} Construct
14109 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
14110 * @typedef {import('micromark-util-types').Token} Token
14111 * @typedef {import('micromark-util-types').State} State
14112 * @typedef {import('micromark-util-types').Code} Code
14113 */
14114
14115
14116
14117
14118
14119
14120
14121
14122 /** @type {Construct} */
14123 const characterReference = {
14124 name: 'characterReference',
14125 tokenize: tokenizeCharacterReference
14126 }
14127
14128 /** @type {Tokenizer} */
14129 function tokenizeCharacterReference(effects, ok, nok) {
14130 const self = this
14131 let size = 0
14132 /** @type {number} */
14133 let max
14134 /** @type {(code: Code) => code is number} */
14135 let test
14136
14137 return start
14138
14139 /** @type {State} */
14140 function start(code) {
14141 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.ampersand, 'expected `&`')
14142 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReference)
14143 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceMarker)
14144 effects.consume(code)
14145 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceMarker)
14146 return open
14147 }
14148
14149 /** @type {State} */
14150 function open(code) {
14151 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.numberSign) {
14152 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceMarkerNumeric)
14153 effects.consume(code)
14154 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceMarkerNumeric)
14155 return numeric
14156 }
14157
14158 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceValue)
14159 max = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.characterReferenceNamedSizeMax
14160 test = micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlphanumeric
14161 return value(code)
14162 }
14163
14164 /** @type {State} */
14165 function numeric(code) {
14166 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.uppercaseX || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.lowercaseX) {
14167 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceMarkerHexadecimal)
14168 effects.consume(code)
14169 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceMarkerHexadecimal)
14170 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceValue)
14171 max = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.characterReferenceHexadecimalSizeMax
14172 test = micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiHexDigit
14173 return value
14174 }
14175
14176 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceValue)
14177 max = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.characterReferenceDecimalSizeMax
14178 test = micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiDigit
14179 return value(code)
14180 }
14181
14182 /** @type {State} */
14183 function value(code) {
14184 /** @type {Token} */
14185 let token
14186
14187 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.semicolon && size) {
14188 token = effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceValue)
14189
14190 if (
14191 test === micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlphanumeric &&
14192 !(0,decode_named_character_reference__WEBPACK_IMPORTED_MODULE_5__.decodeNamedCharacterReference)(self.sliceSerialize(token))
14193 ) {
14194 return nok(code)
14195 }
14196
14197 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceMarker)
14198 effects.consume(code)
14199 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReferenceMarker)
14200 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.characterReference)
14201 return ok
14202 }
14203
14204 if (test(code) && size++ < max) {
14205 effects.consume(code)
14206 return value
14207 }
14208
14209 return nok(code)
14210 }
14211 }
14212
14213
14214 /***/ }),
14215
14216 /***/ "../node_modules/micromark-core-commonmark/dev/lib/code-fenced.js":
14217 /*!************************************************************************!*\
14218 !*** ../node_modules/micromark-core-commonmark/dev/lib/code-fenced.js ***!
14219 \************************************************************************/
14220 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14221
14222 "use strict";
14223 __webpack_require__.r(__webpack_exports__);
14224 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14225 /* harmony export */ "codeFenced": () => (/* binding */ codeFenced)
14226 /* harmony export */ });
14227 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
14228 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
14229 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
14230 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
14231 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
14232 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
14233 /**
14234 * @typedef {import('micromark-util-types').Construct} Construct
14235 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
14236 * @typedef {import('micromark-util-types').State} State
14237 * @typedef {import('micromark-util-types').Code} Code
14238 */
14239
14240
14241
14242
14243
14244
14245
14246
14247 /** @type {Construct} */
14248 const codeFenced = {
14249 name: 'codeFenced',
14250 tokenize: tokenizeCodeFenced,
14251 concrete: true
14252 }
14253
14254 /** @type {Tokenizer} */
14255 function tokenizeCodeFenced(effects, ok, nok) {
14256 const self = this
14257 /** @type {Construct} */
14258 const closingFenceConstruct = {tokenize: tokenizeClosingFence, partial: true}
14259 /** @type {Construct} */
14260 const nonLazyLine = {tokenize: tokenizeNonLazyLine, partial: true}
14261 const tail = this.events[this.events.length - 1]
14262 const initialPrefix =
14263 tail && tail[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix
14264 ? tail[2].sliceSerialize(tail[1], true).length
14265 : 0
14266 let sizeOpen = 0
14267 /** @type {NonNullable<Code>} */
14268 let marker
14269
14270 return start
14271
14272 /** @type {State} */
14273 function start(code) {
14274 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
14275 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.tilde,
14276 'expected `` ` `` or `~`'
14277 )
14278 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFenced)
14279 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFence)
14280 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFenceSequence)
14281 marker = code
14282 return sequenceOpen(code)
14283 }
14284
14285 /** @type {State} */
14286 function sequenceOpen(code) {
14287 if (code === marker) {
14288 effects.consume(code)
14289 sizeOpen++
14290 return sequenceOpen
14291 }
14292
14293 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFenceSequence)
14294 return sizeOpen < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.codeFencedSequenceSizeMin
14295 ? nok(code)
14296 : (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(effects, infoOpen, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.whitespace)(code)
14297 }
14298
14299 /** @type {State} */
14300 function infoOpen(code) {
14301 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
14302 return openAfter(code)
14303 }
14304
14305 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFenceInfo)
14306 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkString, {contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.contentTypeString})
14307 return info(code)
14308 }
14309
14310 /** @type {State} */
14311 function info(code) {
14312 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEndingOrSpace)(code)) {
14313 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkString)
14314 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFenceInfo)
14315 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(effects, infoAfter, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.whitespace)(code)
14316 }
14317
14318 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent && code === marker) return nok(code)
14319 effects.consume(code)
14320 return info
14321 }
14322
14323 /** @type {State} */
14324 function infoAfter(code) {
14325 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
14326 return openAfter(code)
14327 }
14328
14329 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFenceMeta)
14330 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkString, {contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.contentTypeString})
14331 return meta(code)
14332 }
14333
14334 /** @type {State} */
14335 function meta(code) {
14336 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
14337 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkString)
14338 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFenceMeta)
14339 return openAfter(code)
14340 }
14341
14342 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent && code === marker) return nok(code)
14343 effects.consume(code)
14344 return meta
14345 }
14346
14347 /** @type {State} */
14348 function openAfter(code) {
14349 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFence)
14350 return self.interrupt ? ok(code) : contentStart(code)
14351 }
14352
14353 /** @type {State} */
14354 function contentStart(code) {
14355 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof) {
14356 return after(code)
14357 }
14358
14359 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
14360 return effects.attempt(
14361 nonLazyLine,
14362 effects.attempt(
14363 closingFenceConstruct,
14364 after,
14365 initialPrefix
14366 ? (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(
14367 effects,
14368 contentStart,
14369 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix,
14370 initialPrefix + 1
14371 )
14372 : contentStart
14373 ),
14374 after
14375 )(code)
14376 }
14377
14378 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFlowValue)
14379 return contentContinue(code)
14380 }
14381
14382 /** @type {State} */
14383 function contentContinue(code) {
14384 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
14385 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFlowValue)
14386 return contentStart(code)
14387 }
14388
14389 effects.consume(code)
14390 return contentContinue
14391 }
14392
14393 /** @type {State} */
14394 function after(code) {
14395 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFenced)
14396 return ok(code)
14397 }
14398
14399 /** @type {Tokenizer} */
14400 function tokenizeNonLazyLine(effects, ok, nok) {
14401 const self = this
14402
14403 return start
14404
14405 /** @type {State} */
14406 function start(code) {
14407 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code), 'expected eol')
14408 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding)
14409 effects.consume(code)
14410 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding)
14411 return lineStart
14412 }
14413
14414 /** @type {State} */
14415 function lineStart(code) {
14416 return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
14417 }
14418 }
14419
14420 /** @type {Tokenizer} */
14421 function tokenizeClosingFence(effects, ok, nok) {
14422 let size = 0
14423
14424 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(
14425 effects,
14426 closingSequenceStart,
14427 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix,
14428 this.parser.constructs.disable.null.includes('codeIndented')
14429 ? undefined
14430 : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.tabSize
14431 )
14432
14433 /** @type {State} */
14434 function closingSequenceStart(code) {
14435 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFence)
14436 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFenceSequence)
14437 return closingSequence(code)
14438 }
14439
14440 /** @type {State} */
14441 function closingSequence(code) {
14442 if (code === marker) {
14443 effects.consume(code)
14444 size++
14445 return closingSequence
14446 }
14447
14448 if (size < sizeOpen) return nok(code)
14449 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFenceSequence)
14450 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(effects, closingSequenceEnd, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.whitespace)(code)
14451 }
14452
14453 /** @type {State} */
14454 function closingSequenceEnd(code) {
14455 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
14456 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeFencedFence)
14457 return ok(code)
14458 }
14459
14460 return nok(code)
14461 }
14462 }
14463 }
14464
14465
14466 /***/ }),
14467
14468 /***/ "../node_modules/micromark-core-commonmark/dev/lib/code-indented.js":
14469 /*!**************************************************************************!*\
14470 !*** ../node_modules/micromark-core-commonmark/dev/lib/code-indented.js ***!
14471 \**************************************************************************/
14472 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14473
14474 "use strict";
14475 __webpack_require__.r(__webpack_exports__);
14476 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14477 /* harmony export */ "codeIndented": () => (/* binding */ codeIndented)
14478 /* harmony export */ });
14479 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
14480 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
14481 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
14482 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
14483 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
14484 /**
14485 * @typedef {import('micromark-util-types').Construct} Construct
14486 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
14487 * @typedef {import('micromark-util-types').Resolver} Resolver
14488 * @typedef {import('micromark-util-types').Token} Token
14489 * @typedef {import('micromark-util-types').State} State
14490 */
14491
14492
14493
14494
14495
14496
14497
14498 /** @type {Construct} */
14499 const codeIndented = {
14500 name: 'codeIndented',
14501 tokenize: tokenizeCodeIndented
14502 }
14503
14504 /** @type {Construct} */
14505 const indentedContent = {tokenize: tokenizeIndentedContent, partial: true}
14506
14507 /** @type {Tokenizer} */
14508 function tokenizeCodeIndented(effects, ok, nok) {
14509 const self = this
14510 return start
14511
14512 /** @type {State} */
14513 function start(code) {
14514 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.codeIndented)
14515 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_1__.factorySpace)(
14516 effects,
14517 afterStartPrefix,
14518 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.linePrefix,
14519 micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.tabSize + 1
14520 )(code)
14521 }
14522
14523 /** @type {State} */
14524 function afterStartPrefix(code) {
14525 const tail = self.events[self.events.length - 1]
14526 return tail &&
14527 tail[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.linePrefix &&
14528 tail[2].sliceSerialize(tail[1], true).length >= micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.tabSize
14529 ? afterPrefix(code)
14530 : nok(code)
14531 }
14532
14533 /** @type {State} */
14534 function afterPrefix(code) {
14535 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof) {
14536 return after(code)
14537 }
14538
14539 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)) {
14540 return effects.attempt(indentedContent, afterPrefix, after)(code)
14541 }
14542
14543 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.codeFlowValue)
14544 return content(code)
14545 }
14546
14547 /** @type {State} */
14548 function content(code) {
14549 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)) {
14550 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.codeFlowValue)
14551 return afterPrefix(code)
14552 }
14553
14554 effects.consume(code)
14555 return content
14556 }
14557
14558 /** @type {State} */
14559 function after(code) {
14560 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.codeIndented)
14561 return ok(code)
14562 }
14563 }
14564
14565 /** @type {Tokenizer} */
14566 function tokenizeIndentedContent(effects, ok, nok) {
14567 const self = this
14568
14569 return start
14570
14571 /** @type {State} */
14572 function start(code) {
14573 // If this is a lazy line, it can’t be code.
14574 if (self.parser.lazy[self.now().line]) {
14575 return nok(code)
14576 }
14577
14578 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)) {
14579 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.lineEnding)
14580 effects.consume(code)
14581 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.lineEnding)
14582 return start
14583 }
14584
14585 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_1__.factorySpace)(
14586 effects,
14587 afterPrefix,
14588 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.linePrefix,
14589 micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.tabSize + 1
14590 )(code)
14591 }
14592
14593 /** @type {State} */
14594 function afterPrefix(code) {
14595 const tail = self.events[self.events.length - 1]
14596 return tail &&
14597 tail[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_0__.types.linePrefix &&
14598 tail[2].sliceSerialize(tail[1], true).length >= micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.tabSize
14599 ? ok(code)
14600 : (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)
14601 ? start(code)
14602 : nok(code)
14603 }
14604 }
14605
14606
14607 /***/ }),
14608
14609 /***/ "../node_modules/micromark-core-commonmark/dev/lib/code-text.js":
14610 /*!**********************************************************************!*\
14611 !*** ../node_modules/micromark-core-commonmark/dev/lib/code-text.js ***!
14612 \**********************************************************************/
14613 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14614
14615 "use strict";
14616 __webpack_require__.r(__webpack_exports__);
14617 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14618 /* harmony export */ "codeText": () => (/* binding */ codeText)
14619 /* harmony export */ });
14620 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
14621 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
14622 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
14623 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
14624 /**
14625 * @typedef {import('micromark-util-types').Construct} Construct
14626 * @typedef {import('micromark-util-types').Resolver} Resolver
14627 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
14628 * @typedef {import('micromark-util-types').Previous} Previous
14629 * @typedef {import('micromark-util-types').Token} Token
14630 * @typedef {import('micromark-util-types').State} State
14631 */
14632
14633
14634
14635
14636
14637
14638 /** @type {Construct} */
14639 const codeText = {
14640 name: 'codeText',
14641 tokenize: tokenizeCodeText,
14642 resolve: resolveCodeText,
14643 previous
14644 }
14645
14646 /** @type {Resolver} */
14647 function resolveCodeText(events) {
14648 let tailExitIndex = events.length - 4
14649 let headEnterIndex = 3
14650 /** @type {number} */
14651 let index
14652 /** @type {number|undefined} */
14653 let enter
14654
14655 // If we start and end with an EOL or a space.
14656 if (
14657 (events[headEnterIndex][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding ||
14658 events[headEnterIndex][1].type === 'space') &&
14659 (events[tailExitIndex][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding ||
14660 events[tailExitIndex][1].type === 'space')
14661 ) {
14662 index = headEnterIndex
14663
14664 // And we have data.
14665 while (++index < tailExitIndex) {
14666 if (events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextData) {
14667 // Then we have padding.
14668 events[headEnterIndex][1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextPadding
14669 events[tailExitIndex][1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextPadding
14670 headEnterIndex += 2
14671 tailExitIndex -= 2
14672 break
14673 }
14674 }
14675 }
14676
14677 // Merge adjacent spaces and data.
14678 index = headEnterIndex - 1
14679 tailExitIndex++
14680
14681 while (++index <= tailExitIndex) {
14682 if (enter === undefined) {
14683 if (
14684 index !== tailExitIndex &&
14685 events[index][1].type !== micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding
14686 ) {
14687 enter = index
14688 }
14689 } else if (
14690 index === tailExitIndex ||
14691 events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding
14692 ) {
14693 events[enter][1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextData
14694
14695 if (index !== enter + 2) {
14696 events[enter][1].end = events[index - 1][1].end
14697 events.splice(enter + 2, index - enter - 2)
14698 tailExitIndex -= index - enter - 2
14699 index = enter + 2
14700 }
14701
14702 enter = undefined
14703 }
14704 }
14705
14706 return events
14707 }
14708
14709 /** @type {Previous} */
14710 function previous(code) {
14711 // If there is a previous code, there will always be a tail.
14712 return (
14713 code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent ||
14714 this.events[this.events.length - 1][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.characterEscape
14715 )
14716 }
14717
14718 /** @type {Tokenizer} */
14719 function tokenizeCodeText(effects, ok, nok) {
14720 const self = this
14721 let sizeOpen = 0
14722 /** @type {number} */
14723 let size
14724 /** @type {Token} */
14725 let token
14726
14727 return start
14728
14729 /** @type {State} */
14730 function start(code) {
14731 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent, 'expected `` ` ``')
14732 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(previous.call(self, self.previous), 'expected correct previous')
14733 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeText)
14734 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextSequence)
14735 return openingSequence(code)
14736 }
14737
14738 /** @type {State} */
14739 function openingSequence(code) {
14740 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent) {
14741 effects.consume(code)
14742 sizeOpen++
14743 return openingSequence
14744 }
14745
14746 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextSequence)
14747 return gap(code)
14748 }
14749
14750 /** @type {State} */
14751 function gap(code) {
14752 // EOF.
14753 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof) {
14754 return nok(code)
14755 }
14756
14757 // Closing fence?
14758 // Could also be data.
14759 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent) {
14760 token = effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextSequence)
14761 size = 0
14762 return closingSequence(code)
14763 }
14764
14765 // Tabs don’t work, and virtual spaces don’t make sense.
14766 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.space) {
14767 effects.enter('space')
14768 effects.consume(code)
14769 effects.exit('space')
14770 return gap
14771 }
14772
14773 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
14774 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding)
14775 effects.consume(code)
14776 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding)
14777 return gap
14778 }
14779
14780 // Data.
14781 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextData)
14782 return data(code)
14783 }
14784
14785 // In code.
14786 /** @type {State} */
14787 function data(code) {
14788 if (
14789 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof ||
14790 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.space ||
14791 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent ||
14792 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)
14793 ) {
14794 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextData)
14795 return gap(code)
14796 }
14797
14798 effects.consume(code)
14799 return data
14800 }
14801
14802 // Closing fence.
14803 /** @type {State} */
14804 function closingSequence(code) {
14805 // More.
14806 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent) {
14807 effects.consume(code)
14808 size++
14809 return closingSequence
14810 }
14811
14812 // Done!
14813 if (size === sizeOpen) {
14814 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextSequence)
14815 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeText)
14816 return ok(code)
14817 }
14818
14819 // More or less accents: mark as data.
14820 token.type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.codeTextData
14821 return data(code)
14822 }
14823 }
14824
14825
14826 /***/ }),
14827
14828 /***/ "../node_modules/micromark-core-commonmark/dev/lib/content.js":
14829 /*!********************************************************************!*\
14830 !*** ../node_modules/micromark-core-commonmark/dev/lib/content.js ***!
14831 \********************************************************************/
14832 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14833
14834 "use strict";
14835 __webpack_require__.r(__webpack_exports__);
14836 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14837 /* harmony export */ "content": () => (/* binding */ content)
14838 /* harmony export */ });
14839 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
14840 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
14841 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
14842 /* harmony import */ var micromark_util_subtokenize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-subtokenize */ "../node_modules/micromark-util-subtokenize/dev/index.js");
14843 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
14844 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
14845 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
14846 /**
14847 * @typedef {import('micromark-util-types').Construct} Construct
14848 * @typedef {import('micromark-util-types').Resolver} Resolver
14849 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
14850 * @typedef {import('micromark-util-types').Token} Token
14851 * @typedef {import('micromark-util-types').State} State
14852 */
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862 /**
14863 * No name because it must not be turned off.
14864 * @type {Construct}
14865 */
14866 const content = {tokenize: tokenizeContent, resolve: resolveContent}
14867
14868 /** @type {Construct} */
14869 const continuationConstruct = {tokenize: tokenizeContinuation, partial: true}
14870
14871 /**
14872 * Content is transparent: it’s parsed right now. That way, definitions are also
14873 * parsed right now: before text in paragraphs (specifically, media) are parsed.
14874 *
14875 * @type {Resolver}
14876 */
14877 function resolveContent(events) {
14878 ;(0,micromark_util_subtokenize__WEBPACK_IMPORTED_MODULE_1__.subtokenize)(events)
14879 return events
14880 }
14881
14882 /** @type {Tokenizer} */
14883 function tokenizeContent(effects, ok) {
14884 /** @type {Token} */
14885 let previous
14886
14887 return start
14888
14889 /** @type {State} */
14890 function start(code) {
14891 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
14892 code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof && !(0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code),
14893 'expected no eof or eol'
14894 )
14895
14896 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.content)
14897 previous = effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.chunkContent, {
14898 contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.contentTypeContent
14899 })
14900 return data(code)
14901 }
14902
14903 /** @type {State} */
14904 function data(code) {
14905 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof) {
14906 return contentEnd(code)
14907 }
14908
14909 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
14910 return effects.check(
14911 continuationConstruct,
14912 contentContinue,
14913 contentEnd
14914 )(code)
14915 }
14916
14917 // Data.
14918 effects.consume(code)
14919 return data
14920 }
14921
14922 /** @type {State} */
14923 function contentEnd(code) {
14924 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.chunkContent)
14925 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.content)
14926 return ok(code)
14927 }
14928
14929 /** @type {State} */
14930 function contentContinue(code) {
14931 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code), 'expected eol')
14932 effects.consume(code)
14933 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.chunkContent)
14934 previous.next = effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.chunkContent, {
14935 contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.contentTypeContent,
14936 previous
14937 })
14938 previous = previous.next
14939 return data
14940 }
14941 }
14942
14943 /** @type {Tokenizer} */
14944 function tokenizeContinuation(effects, ok, nok) {
14945 const self = this
14946
14947 return startLookahead
14948
14949 /** @type {State} */
14950 function startLookahead(code) {
14951 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code), 'expected a line ending')
14952 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.chunkContent)
14953 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding)
14954 effects.consume(code)
14955 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding)
14956 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_6__.factorySpace)(effects, prefixed, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.linePrefix)
14957 }
14958
14959 /** @type {State} */
14960 function prefixed(code) {
14961 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
14962 return nok(code)
14963 }
14964
14965 const tail = self.events[self.events.length - 1]
14966
14967 if (
14968 !self.parser.constructs.disable.null.includes('codeIndented') &&
14969 tail &&
14970 tail[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.linePrefix &&
14971 tail[2].sliceSerialize(tail[1], true).length >= micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.tabSize
14972 ) {
14973 return ok(code)
14974 }
14975
14976 return effects.interrupt(self.parser.constructs.flow, nok, ok)(code)
14977 }
14978 }
14979
14980
14981 /***/ }),
14982
14983 /***/ "../node_modules/micromark-core-commonmark/dev/lib/definition.js":
14984 /*!***********************************************************************!*\
14985 !*** ../node_modules/micromark-core-commonmark/dev/lib/definition.js ***!
14986 \***********************************************************************/
14987 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
14988
14989 "use strict";
14990 __webpack_require__.r(__webpack_exports__);
14991 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14992 /* harmony export */ "definition": () => (/* binding */ definition)
14993 /* harmony export */ });
14994 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
14995 /* harmony import */ var micromark_factory_destination__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-factory-destination */ "../node_modules/micromark-factory-destination/dev/index.js");
14996 /* harmony import */ var micromark_factory_label__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-factory-label */ "../node_modules/micromark-factory-label/dev/index.js");
14997 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
14998 /* harmony import */ var micromark_factory_title__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! micromark-factory-title */ "../node_modules/micromark-factory-title/dev/index.js");
14999 /* harmony import */ var micromark_factory_whitespace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-factory-whitespace */ "../node_modules/micromark-factory-whitespace/dev/index.js");
15000 /* harmony import */ var micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-normalize-identifier */ "../node_modules/micromark-util-normalize-identifier/dev/index.js");
15001 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
15002 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
15003 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
15004 /**
15005 * @typedef {import('micromark-util-types').Construct} Construct
15006 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
15007 * @typedef {import('micromark-util-types').State} State
15008 */
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021 /** @type {Construct} */
15022 const definition = {name: 'definition', tokenize: tokenizeDefinition}
15023
15024 /** @type {Construct} */
15025 const titleConstruct = {tokenize: tokenizeTitle, partial: true}
15026
15027 /** @type {Tokenizer} */
15028 function tokenizeDefinition(effects, ok, nok) {
15029 const self = this
15030 /** @type {string} */
15031 let identifier
15032
15033 return start
15034
15035 /** @type {State} */
15036 function start(code) {
15037 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftSquareBracket, 'expected `[`')
15038 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definition)
15039 return micromark_factory_label__WEBPACK_IMPORTED_MODULE_3__.factoryLabel.call(
15040 self,
15041 effects,
15042 labelAfter,
15043 nok,
15044 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionLabel,
15045 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionLabelMarker,
15046 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionLabelString
15047 )(code)
15048 }
15049
15050 /** @type {State} */
15051 function labelAfter(code) {
15052 identifier = (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_4__.normalizeIdentifier)(
15053 self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
15054 )
15055
15056 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.colon) {
15057 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionMarker)
15058 effects.consume(code)
15059 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionMarker)
15060
15061 // Note: blank lines can’t exist in content.
15062 return (0,micromark_factory_whitespace__WEBPACK_IMPORTED_MODULE_5__.factoryWhitespace)(
15063 effects,
15064 (0,micromark_factory_destination__WEBPACK_IMPORTED_MODULE_6__.factoryDestination)(
15065 effects,
15066 effects.attempt(
15067 titleConstruct,
15068 (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__.factorySpace)(effects, after, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.whitespace),
15069 (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__.factorySpace)(effects, after, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.whitespace)
15070 ),
15071 nok,
15072 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionDestination,
15073 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionDestinationLiteral,
15074 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionDestinationLiteralMarker,
15075 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionDestinationRaw,
15076 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionDestinationString
15077 )
15078 )
15079 }
15080
15081 return nok(code)
15082 }
15083
15084 /** @type {State} */
15085 function after(code) {
15086 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_8__.markdownLineEnding)(code)) {
15087 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definition)
15088
15089 if (!self.parser.defined.includes(identifier)) {
15090 self.parser.defined.push(identifier)
15091 }
15092
15093 return ok(code)
15094 }
15095
15096 return nok(code)
15097 }
15098 }
15099
15100 /** @type {Tokenizer} */
15101 function tokenizeTitle(effects, ok, nok) {
15102 return start
15103
15104 /** @type {State} */
15105 function start(code) {
15106 return (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_8__.markdownLineEndingOrSpace)(code)
15107 ? (0,micromark_factory_whitespace__WEBPACK_IMPORTED_MODULE_5__.factoryWhitespace)(effects, before)(code)
15108 : nok(code)
15109 }
15110
15111 /** @type {State} */
15112 function before(code) {
15113 if (
15114 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.quotationMark ||
15115 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.apostrophe ||
15116 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftParenthesis
15117 ) {
15118 return (0,micromark_factory_title__WEBPACK_IMPORTED_MODULE_9__.factoryTitle)(
15119 effects,
15120 (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__.factorySpace)(effects, after, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.whitespace),
15121 nok,
15122 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionTitle,
15123 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionTitleMarker,
15124 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.definitionTitleString
15125 )(code)
15126 }
15127
15128 return nok(code)
15129 }
15130
15131 /** @type {State} */
15132 function after(code) {
15133 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_8__.markdownLineEnding)(code) ? ok(code) : nok(code)
15134 }
15135 }
15136
15137
15138 /***/ }),
15139
15140 /***/ "../node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js":
15141 /*!******************************************************************************!*\
15142 !*** ../node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js ***!
15143 \******************************************************************************/
15144 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
15145
15146 "use strict";
15147 __webpack_require__.r(__webpack_exports__);
15148 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15149 /* harmony export */ "hardBreakEscape": () => (/* binding */ hardBreakEscape)
15150 /* harmony export */ });
15151 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
15152 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
15153 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
15154 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
15155 /**
15156 * @typedef {import('micromark-util-types').Construct} Construct
15157 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
15158 * @typedef {import('micromark-util-types').State} State
15159 */
15160
15161
15162
15163
15164
15165
15166 /** @type {Construct} */
15167 const hardBreakEscape = {
15168 name: 'hardBreakEscape',
15169 tokenize: tokenizeHardBreakEscape
15170 }
15171
15172 /** @type {Tokenizer} */
15173 function tokenizeHardBreakEscape(effects, ok, nok) {
15174 return start
15175
15176 /** @type {State} */
15177 function start(code) {
15178 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.backslash, 'expected `\\`')
15179 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.hardBreakEscape)
15180 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.escapeMarker)
15181 effects.consume(code)
15182 return open
15183 }
15184
15185 /** @type {State} */
15186 function open(code) {
15187 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
15188 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.escapeMarker)
15189 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.hardBreakEscape)
15190 return ok(code)
15191 }
15192
15193 return nok(code)
15194 }
15195 }
15196
15197
15198 /***/ }),
15199
15200 /***/ "../node_modules/micromark-core-commonmark/dev/lib/heading-atx.js":
15201 /*!************************************************************************!*\
15202 !*** ../node_modules/micromark-core-commonmark/dev/lib/heading-atx.js ***!
15203 \************************************************************************/
15204 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
15205
15206 "use strict";
15207 __webpack_require__.r(__webpack_exports__);
15208 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15209 /* harmony export */ "headingAtx": () => (/* binding */ headingAtx)
15210 /* harmony export */ });
15211 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
15212 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
15213 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
15214 /* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-chunked */ "../node_modules/micromark-util-chunked/dev/index.js");
15215 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
15216 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
15217 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
15218 /**
15219 * @typedef {import('micromark-util-types').Construct} Construct
15220 * @typedef {import('micromark-util-types').Resolver} Resolver
15221 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
15222 * @typedef {import('micromark-util-types').Token} Token
15223 * @typedef {import('micromark-util-types').State} State
15224 */
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234 /** @type {Construct} */
15235 const headingAtx = {
15236 name: 'headingAtx',
15237 tokenize: tokenizeHeadingAtx,
15238 resolve: resolveHeadingAtx
15239 }
15240
15241 /** @type {Resolver} */
15242 function resolveHeadingAtx(events, context) {
15243 let contentEnd = events.length - 2
15244 let contentStart = 3
15245 /** @type {Token} */
15246 let content
15247 /** @type {Token} */
15248 let text
15249
15250 // Prefix whitespace, part of the opening.
15251 if (events[contentStart][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.whitespace) {
15252 contentStart += 2
15253 }
15254
15255 // Suffix whitespace, part of the closing.
15256 if (
15257 contentEnd - 2 > contentStart &&
15258 events[contentEnd][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.whitespace
15259 ) {
15260 contentEnd -= 2
15261 }
15262
15263 if (
15264 events[contentEnd][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeadingSequence &&
15265 (contentStart === contentEnd - 1 ||
15266 (contentEnd - 4 > contentStart &&
15267 events[contentEnd - 2][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.whitespace))
15268 ) {
15269 contentEnd -= contentStart + 1 === contentEnd ? 2 : 4
15270 }
15271
15272 if (contentEnd > contentStart) {
15273 content = {
15274 type: micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeadingText,
15275 start: events[contentStart][1].start,
15276 end: events[contentEnd][1].end
15277 }
15278 text = {
15279 type: micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkText,
15280 start: events[contentStart][1].start,
15281 end: events[contentEnd][1].end,
15282 // @ts-expect-error Constants are fine to assign.
15283 contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.contentTypeText
15284 }
15285
15286 ;(0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_3__.splice)(events, contentStart, contentEnd - contentStart + 1, [
15287 ['enter', content, context],
15288 ['enter', text, context],
15289 ['exit', text, context],
15290 ['exit', content, context]
15291 ])
15292 }
15293
15294 return events
15295 }
15296
15297 /** @type {Tokenizer} */
15298 function tokenizeHeadingAtx(effects, ok, nok) {
15299 const self = this
15300 let size = 0
15301
15302 return start
15303
15304 /** @type {State} */
15305 function start(code) {
15306 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.numberSign, 'expected `#`')
15307 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeading)
15308 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeadingSequence)
15309 return fenceOpenInside(code)
15310 }
15311
15312 /** @type {State} */
15313 function fenceOpenInside(code) {
15314 if (
15315 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.numberSign &&
15316 size++ < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.atxHeadingOpeningFenceSizeMax
15317 ) {
15318 effects.consume(code)
15319 return fenceOpenInside
15320 }
15321
15322 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEndingOrSpace)(code)) {
15323 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeadingSequence)
15324 return self.interrupt ? ok(code) : headingBreak(code)
15325 }
15326
15327 return nok(code)
15328 }
15329
15330 /** @type {State} */
15331 function headingBreak(code) {
15332 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.numberSign) {
15333 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeadingSequence)
15334 return sequence(code)
15335 }
15336
15337 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
15338 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeading)
15339 return ok(code)
15340 }
15341
15342 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownSpace)(code)) {
15343 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_6__.factorySpace)(effects, headingBreak, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.whitespace)(code)
15344 }
15345
15346 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeadingText)
15347 return data(code)
15348 }
15349
15350 /** @type {State} */
15351 function sequence(code) {
15352 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.numberSign) {
15353 effects.consume(code)
15354 return sequence
15355 }
15356
15357 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeadingSequence)
15358 return headingBreak(code)
15359 }
15360
15361 /** @type {State} */
15362 function data(code) {
15363 if (
15364 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.eof ||
15365 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.numberSign ||
15366 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEndingOrSpace)(code)
15367 ) {
15368 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.atxHeadingText)
15369 return headingBreak(code)
15370 }
15371
15372 effects.consume(code)
15373 return data
15374 }
15375 }
15376
15377
15378 /***/ }),
15379
15380 /***/ "../node_modules/micromark-core-commonmark/dev/lib/html-flow.js":
15381 /*!**********************************************************************!*\
15382 !*** ../node_modules/micromark-core-commonmark/dev/lib/html-flow.js ***!
15383 \**********************************************************************/
15384 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
15385
15386 "use strict";
15387 __webpack_require__.r(__webpack_exports__);
15388 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15389 /* harmony export */ "htmlFlow": () => (/* binding */ htmlFlow)
15390 /* harmony export */ });
15391 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
15392 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
15393 /* harmony import */ var micromark_util_html_tag_name__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-html-tag-name */ "../node_modules/micromark-util-html-tag-name/index.js");
15394 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
15395 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
15396 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
15397 /* harmony import */ var _blank_line_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./blank-line.js */ "../node_modules/micromark-core-commonmark/dev/lib/blank-line.js");
15398 /**
15399 * @typedef {import('micromark-util-types').Construct} Construct
15400 * @typedef {import('micromark-util-types').Resolver} Resolver
15401 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
15402 * @typedef {import('micromark-util-types').State} State
15403 * @typedef {import('micromark-util-types').Code} Code
15404 */
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414 /** @type {Construct} */
15415 const htmlFlow = {
15416 name: 'htmlFlow',
15417 tokenize: tokenizeHtmlFlow,
15418 resolveTo: resolveToHtmlFlow,
15419 concrete: true
15420 }
15421
15422 /** @type {Construct} */
15423 const nextBlankConstruct = {tokenize: tokenizeNextBlank, partial: true}
15424
15425 /** @type {Resolver} */
15426 function resolveToHtmlFlow(events) {
15427 let index = events.length
15428
15429 while (index--) {
15430 if (
15431 events[index][0] === 'enter' &&
15432 events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.htmlFlow
15433 ) {
15434 break
15435 }
15436 }
15437
15438 if (index > 1 && events[index - 2][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix) {
15439 // Add the prefix start to the HTML token.
15440 events[index][1].start = events[index - 2][1].start
15441 // Add the prefix start to the HTML line token.
15442 events[index + 1][1].start = events[index - 2][1].start
15443 // Remove the line prefix.
15444 events.splice(index - 2, 2)
15445 }
15446
15447 return events
15448 }
15449
15450 /** @type {Tokenizer} */
15451 function tokenizeHtmlFlow(effects, ok, nok) {
15452 const self = this
15453 /** @type {number} */
15454 let kind
15455 /** @type {boolean} */
15456 let startTag
15457 /** @type {string} */
15458 let buffer
15459 /** @type {number} */
15460 let index
15461 /** @type {Code} */
15462 let marker
15463
15464 return start
15465
15466 /** @type {State} */
15467 function start(code) {
15468 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.lessThan, 'expected `<`')
15469 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.htmlFlow)
15470 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.htmlFlowData)
15471 effects.consume(code)
15472 return open
15473 }
15474
15475 /** @type {State} */
15476 function open(code) {
15477 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.exclamationMark) {
15478 effects.consume(code)
15479 return declarationStart
15480 }
15481
15482 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.slash) {
15483 effects.consume(code)
15484 return tagCloseStart
15485 }
15486
15487 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.questionMark) {
15488 effects.consume(code)
15489 kind = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlInstruction
15490 // While we’re in an instruction instead of a declaration, we’re on a `?`
15491 // right now, so we do need to search for `>`, similar to declarations.
15492 return self.interrupt ? ok : continuationDeclarationInside
15493 }
15494
15495 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlpha)(code)) {
15496 effects.consume(code)
15497 buffer = String.fromCharCode(code)
15498 startTag = true
15499 return tagName
15500 }
15501
15502 return nok(code)
15503 }
15504
15505 /** @type {State} */
15506 function declarationStart(code) {
15507 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash) {
15508 effects.consume(code)
15509 kind = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlComment
15510 return commentOpenInside
15511 }
15512
15513 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.leftSquareBracket) {
15514 effects.consume(code)
15515 kind = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlCdata
15516 buffer = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.cdataOpeningString
15517 index = 0
15518 return cdataOpenInside
15519 }
15520
15521 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlpha)(code)) {
15522 effects.consume(code)
15523 kind = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlDeclaration
15524 return self.interrupt ? ok : continuationDeclarationInside
15525 }
15526
15527 return nok(code)
15528 }
15529
15530 /** @type {State} */
15531 function commentOpenInside(code) {
15532 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash) {
15533 effects.consume(code)
15534 return self.interrupt ? ok : continuationDeclarationInside
15535 }
15536
15537 return nok(code)
15538 }
15539
15540 /** @type {State} */
15541 function cdataOpenInside(code) {
15542 if (code === buffer.charCodeAt(index++)) {
15543 effects.consume(code)
15544 return index === buffer.length
15545 ? self.interrupt
15546 ? ok
15547 : continuation
15548 : cdataOpenInside
15549 }
15550
15551 return nok(code)
15552 }
15553
15554 /** @type {State} */
15555 function tagCloseStart(code) {
15556 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlpha)(code)) {
15557 effects.consume(code)
15558 buffer = String.fromCharCode(code)
15559 return tagName
15560 }
15561
15562 return nok(code)
15563 }
15564
15565 /** @type {State} */
15566 function tagName(code) {
15567 if (
15568 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof ||
15569 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.slash ||
15570 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan ||
15571 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEndingOrSpace)(code)
15572 ) {
15573 if (
15574 code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.slash &&
15575 startTag &&
15576 micromark_util_html_tag_name__WEBPACK_IMPORTED_MODULE_5__.htmlRawNames.includes(buffer.toLowerCase())
15577 ) {
15578 kind = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlRaw
15579 return self.interrupt ? ok(code) : continuation(code)
15580 }
15581
15582 if (micromark_util_html_tag_name__WEBPACK_IMPORTED_MODULE_5__.htmlBlockNames.includes(buffer.toLowerCase())) {
15583 kind = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlBasic
15584
15585 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.slash) {
15586 effects.consume(code)
15587 return basicSelfClosing
15588 }
15589
15590 return self.interrupt ? ok(code) : continuation(code)
15591 }
15592
15593 kind = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlComplete
15594 // Do not support complete HTML when interrupting
15595 return self.interrupt && !self.parser.lazy[self.now().line]
15596 ? nok(code)
15597 : startTag
15598 ? completeAttributeNameBefore(code)
15599 : completeClosingTagAfter(code)
15600 }
15601
15602 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlphanumeric)(code)) {
15603 effects.consume(code)
15604 buffer += String.fromCharCode(code)
15605 return tagName
15606 }
15607
15608 return nok(code)
15609 }
15610
15611 /** @type {State} */
15612 function basicSelfClosing(code) {
15613 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan) {
15614 effects.consume(code)
15615 return self.interrupt ? ok : continuation
15616 }
15617
15618 return nok(code)
15619 }
15620
15621 /** @type {State} */
15622 function completeClosingTagAfter(code) {
15623 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownSpace)(code)) {
15624 effects.consume(code)
15625 return completeClosingTagAfter
15626 }
15627
15628 return completeEnd(code)
15629 }
15630
15631 /** @type {State} */
15632 function completeAttributeNameBefore(code) {
15633 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.slash) {
15634 effects.consume(code)
15635 return completeEnd
15636 }
15637
15638 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.colon || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.underscore || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlpha)(code)) {
15639 effects.consume(code)
15640 return completeAttributeName
15641 }
15642
15643 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownSpace)(code)) {
15644 effects.consume(code)
15645 return completeAttributeNameBefore
15646 }
15647
15648 return completeEnd(code)
15649 }
15650
15651 /** @type {State} */
15652 function completeAttributeName(code) {
15653 if (
15654 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash ||
15655 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dot ||
15656 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.colon ||
15657 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.underscore ||
15658 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlphanumeric)(code)
15659 ) {
15660 effects.consume(code)
15661 return completeAttributeName
15662 }
15663
15664 return completeAttributeNameAfter(code)
15665 }
15666
15667 /** @type {State} */
15668 function completeAttributeNameAfter(code) {
15669 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.equalsTo) {
15670 effects.consume(code)
15671 return completeAttributeValueBefore
15672 }
15673
15674 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownSpace)(code)) {
15675 effects.consume(code)
15676 return completeAttributeNameAfter
15677 }
15678
15679 return completeAttributeNameBefore(code)
15680 }
15681
15682 /** @type {State} */
15683 function completeAttributeValueBefore(code) {
15684 if (
15685 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof ||
15686 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.lessThan ||
15687 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.equalsTo ||
15688 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan ||
15689 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent
15690 ) {
15691 return nok(code)
15692 }
15693
15694 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.quotationMark || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.apostrophe) {
15695 effects.consume(code)
15696 marker = code
15697 return completeAttributeValueQuoted
15698 }
15699
15700 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownSpace)(code)) {
15701 effects.consume(code)
15702 return completeAttributeValueBefore
15703 }
15704
15705 marker = null
15706 return completeAttributeValueUnquoted(code)
15707 }
15708
15709 /** @type {State} */
15710 function completeAttributeValueQuoted(code) {
15711 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)) {
15712 return nok(code)
15713 }
15714
15715 if (code === marker) {
15716 effects.consume(code)
15717 return completeAttributeValueQuotedAfter
15718 }
15719
15720 effects.consume(code)
15721 return completeAttributeValueQuoted
15722 }
15723
15724 /** @type {State} */
15725 function completeAttributeValueUnquoted(code) {
15726 if (
15727 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof ||
15728 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.quotationMark ||
15729 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.apostrophe ||
15730 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.lessThan ||
15731 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.equalsTo ||
15732 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan ||
15733 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.graveAccent ||
15734 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEndingOrSpace)(code)
15735 ) {
15736 return completeAttributeNameAfter(code)
15737 }
15738
15739 effects.consume(code)
15740 return completeAttributeValueUnquoted
15741 }
15742
15743 /** @type {State} */
15744 function completeAttributeValueQuotedAfter(code) {
15745 if (
15746 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.slash ||
15747 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan ||
15748 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownSpace)(code)
15749 ) {
15750 return completeAttributeNameBefore(code)
15751 }
15752
15753 return nok(code)
15754 }
15755
15756 /** @type {State} */
15757 function completeEnd(code) {
15758 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan) {
15759 effects.consume(code)
15760 return completeAfter
15761 }
15762
15763 return nok(code)
15764 }
15765
15766 /** @type {State} */
15767 function completeAfter(code) {
15768 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownSpace)(code)) {
15769 effects.consume(code)
15770 return completeAfter
15771 }
15772
15773 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)
15774 ? continuation(code)
15775 : nok(code)
15776 }
15777
15778 /** @type {State} */
15779 function continuation(code) {
15780 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash && kind === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlComment) {
15781 effects.consume(code)
15782 return continuationCommentInside
15783 }
15784
15785 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.lessThan && kind === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlRaw) {
15786 effects.consume(code)
15787 return continuationRawTagOpen
15788 }
15789
15790 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan && kind === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlDeclaration) {
15791 effects.consume(code)
15792 return continuationClose
15793 }
15794
15795 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.questionMark && kind === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlInstruction) {
15796 effects.consume(code)
15797 return continuationDeclarationInside
15798 }
15799
15800 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.rightSquareBracket && kind === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlCdata) {
15801 effects.consume(code)
15802 return continuationCharacterDataInside
15803 }
15804
15805 if (
15806 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code) &&
15807 (kind === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlBasic || kind === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlComplete)
15808 ) {
15809 return effects.check(
15810 nextBlankConstruct,
15811 continuationClose,
15812 continuationAtLineEnding
15813 )(code)
15814 }
15815
15816 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)) {
15817 return continuationAtLineEnding(code)
15818 }
15819
15820 effects.consume(code)
15821 return continuation
15822 }
15823
15824 /** @type {State} */
15825 function continuationAtLineEnding(code) {
15826 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.htmlFlowData)
15827 return htmlContinueStart(code)
15828 }
15829
15830 /** @type {State} */
15831 function htmlContinueStart(code) {
15832 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof) {
15833 return done(code)
15834 }
15835
15836 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)) {
15837 return effects.attempt(
15838 {tokenize: htmlLineEnd, partial: true},
15839 htmlContinueStart,
15840 done
15841 )(code)
15842 }
15843
15844 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.htmlFlowData)
15845 return continuation(code)
15846 }
15847
15848 /** @type {Tokenizer} */
15849 function htmlLineEnd(effects, ok, nok) {
15850 return start
15851
15852 /** @type {State} */
15853 function start(code) {
15854 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code), 'expected eol')
15855 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding)
15856 effects.consume(code)
15857 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding)
15858 return lineStart
15859 }
15860
15861 /** @type {State} */
15862 function lineStart(code) {
15863 return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
15864 }
15865 }
15866
15867 /** @type {State} */
15868 function continuationCommentInside(code) {
15869 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash) {
15870 effects.consume(code)
15871 return continuationDeclarationInside
15872 }
15873
15874 return continuation(code)
15875 }
15876
15877 /** @type {State} */
15878 function continuationRawTagOpen(code) {
15879 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.slash) {
15880 effects.consume(code)
15881 buffer = ''
15882 return continuationRawEndTag
15883 }
15884
15885 return continuation(code)
15886 }
15887
15888 /** @type {State} */
15889 function continuationRawEndTag(code) {
15890 if (
15891 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan &&
15892 micromark_util_html_tag_name__WEBPACK_IMPORTED_MODULE_5__.htmlRawNames.includes(buffer.toLowerCase())
15893 ) {
15894 effects.consume(code)
15895 return continuationClose
15896 }
15897
15898 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.asciiAlpha)(code) && buffer.length < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlRawSizeMax) {
15899 effects.consume(code)
15900 buffer += String.fromCharCode(code)
15901 return continuationRawEndTag
15902 }
15903
15904 return continuation(code)
15905 }
15906
15907 /** @type {State} */
15908 function continuationCharacterDataInside(code) {
15909 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.rightSquareBracket) {
15910 effects.consume(code)
15911 return continuationDeclarationInside
15912 }
15913
15914 return continuation(code)
15915 }
15916
15917 /** @type {State} */
15918 function continuationDeclarationInside(code) {
15919 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.greaterThan) {
15920 effects.consume(code)
15921 return continuationClose
15922 }
15923
15924 // More dashes.
15925 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash && kind === micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.htmlComment) {
15926 effects.consume(code)
15927 return continuationDeclarationInside
15928 }
15929
15930 return continuation(code)
15931 }
15932
15933 /** @type {State} */
15934 function continuationClose(code) {
15935 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)) {
15936 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.htmlFlowData)
15937 return done(code)
15938 }
15939
15940 effects.consume(code)
15941 return continuationClose
15942 }
15943
15944 /** @type {State} */
15945 function done(code) {
15946 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.htmlFlow)
15947 return ok(code)
15948 }
15949 }
15950
15951 /** @type {Tokenizer} */
15952 function tokenizeNextBlank(effects, ok, nok) {
15953 return start
15954
15955 /** @type {State} */
15956 function start(code) {
15957 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code), 'expected a line ending')
15958 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.htmlFlowData)
15959 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEndingBlank)
15960 effects.consume(code)
15961 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEndingBlank)
15962 return effects.attempt(_blank_line_js__WEBPACK_IMPORTED_MODULE_6__.blankLine, ok, nok)
15963 }
15964 }
15965
15966
15967 /***/ }),
15968
15969 /***/ "../node_modules/micromark-core-commonmark/dev/lib/html-text.js":
15970 /*!**********************************************************************!*\
15971 !*** ../node_modules/micromark-core-commonmark/dev/lib/html-text.js ***!
15972 \**********************************************************************/
15973 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
15974
15975 "use strict";
15976 __webpack_require__.r(__webpack_exports__);
15977 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15978 /* harmony export */ "htmlText": () => (/* binding */ htmlText)
15979 /* harmony export */ });
15980 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
15981 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
15982 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
15983 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
15984 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
15985 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
15986 /**
15987 * @typedef {import('micromark-util-types').Construct} Construct
15988 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
15989 * @typedef {import('micromark-util-types').State} State
15990 * @typedef {import('micromark-util-types').Code} Code
15991 */
15992
15993
15994
15995
15996
15997
15998
15999
16000 /** @type {Construct} */
16001 const htmlText = {name: 'htmlText', tokenize: tokenizeHtmlText}
16002
16003 /** @type {Tokenizer} */
16004 function tokenizeHtmlText(effects, ok, nok) {
16005 const self = this
16006 /** @type {NonNullable<Code>|undefined} */
16007 let marker
16008 /** @type {string} */
16009 let buffer
16010 /** @type {number} */
16011 let index
16012 /** @type {State} */
16013 let returnState
16014
16015 return start
16016
16017 /** @type {State} */
16018 function start(code) {
16019 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.lessThan, 'expected `<`')
16020 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.htmlText)
16021 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.htmlTextData)
16022 effects.consume(code)
16023 return open
16024 }
16025
16026 /** @type {State} */
16027 function open(code) {
16028 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.exclamationMark) {
16029 effects.consume(code)
16030 return declarationOpen
16031 }
16032
16033 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.slash) {
16034 effects.consume(code)
16035 return tagCloseStart
16036 }
16037
16038 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.questionMark) {
16039 effects.consume(code)
16040 return instruction
16041 }
16042
16043 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlpha)(code)) {
16044 effects.consume(code)
16045 return tagOpen
16046 }
16047
16048 return nok(code)
16049 }
16050
16051 /** @type {State} */
16052 function declarationOpen(code) {
16053 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash) {
16054 effects.consume(code)
16055 return commentOpen
16056 }
16057
16058 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftSquareBracket) {
16059 effects.consume(code)
16060 buffer = micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__.constants.cdataOpeningString
16061 index = 0
16062 return cdataOpen
16063 }
16064
16065 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlpha)(code)) {
16066 effects.consume(code)
16067 return declaration
16068 }
16069
16070 return nok(code)
16071 }
16072
16073 /** @type {State} */
16074 function commentOpen(code) {
16075 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash) {
16076 effects.consume(code)
16077 return commentStart
16078 }
16079
16080 return nok(code)
16081 }
16082
16083 /** @type {State} */
16084 function commentStart(code) {
16085 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan) {
16086 return nok(code)
16087 }
16088
16089 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash) {
16090 effects.consume(code)
16091 return commentStartDash
16092 }
16093
16094 return comment(code)
16095 }
16096
16097 /** @type {State} */
16098 function commentStartDash(code) {
16099 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan) {
16100 return nok(code)
16101 }
16102
16103 return comment(code)
16104 }
16105
16106 /** @type {State} */
16107 function comment(code) {
16108 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
16109 return nok(code)
16110 }
16111
16112 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash) {
16113 effects.consume(code)
16114 return commentClose
16115 }
16116
16117 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16118 returnState = comment
16119 return atLineEnding(code)
16120 }
16121
16122 effects.consume(code)
16123 return comment
16124 }
16125
16126 /** @type {State} */
16127 function commentClose(code) {
16128 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash) {
16129 effects.consume(code)
16130 return end
16131 }
16132
16133 return comment(code)
16134 }
16135
16136 /** @type {State} */
16137 function cdataOpen(code) {
16138 if (code === buffer.charCodeAt(index++)) {
16139 effects.consume(code)
16140 return index === buffer.length ? cdata : cdataOpen
16141 }
16142
16143 return nok(code)
16144 }
16145
16146 /** @type {State} */
16147 function cdata(code) {
16148 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
16149 return nok(code)
16150 }
16151
16152 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.rightSquareBracket) {
16153 effects.consume(code)
16154 return cdataClose
16155 }
16156
16157 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16158 returnState = cdata
16159 return atLineEnding(code)
16160 }
16161
16162 effects.consume(code)
16163 return cdata
16164 }
16165
16166 /** @type {State} */
16167 function cdataClose(code) {
16168 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.rightSquareBracket) {
16169 effects.consume(code)
16170 return cdataEnd
16171 }
16172
16173 return cdata(code)
16174 }
16175
16176 /** @type {State} */
16177 function cdataEnd(code) {
16178 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan) {
16179 return end(code)
16180 }
16181
16182 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.rightSquareBracket) {
16183 effects.consume(code)
16184 return cdataEnd
16185 }
16186
16187 return cdata(code)
16188 }
16189
16190 /** @type {State} */
16191 function declaration(code) {
16192 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan) {
16193 return end(code)
16194 }
16195
16196 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16197 returnState = declaration
16198 return atLineEnding(code)
16199 }
16200
16201 effects.consume(code)
16202 return declaration
16203 }
16204
16205 /** @type {State} */
16206 function instruction(code) {
16207 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
16208 return nok(code)
16209 }
16210
16211 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.questionMark) {
16212 effects.consume(code)
16213 return instructionClose
16214 }
16215
16216 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16217 returnState = instruction
16218 return atLineEnding(code)
16219 }
16220
16221 effects.consume(code)
16222 return instruction
16223 }
16224
16225 /** @type {State} */
16226 function instructionClose(code) {
16227 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan ? end(code) : instruction(code)
16228 }
16229
16230 /** @type {State} */
16231 function tagCloseStart(code) {
16232 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlpha)(code)) {
16233 effects.consume(code)
16234 return tagClose
16235 }
16236
16237 return nok(code)
16238 }
16239
16240 /** @type {State} */
16241 function tagClose(code) {
16242 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlphanumeric)(code)) {
16243 effects.consume(code)
16244 return tagClose
16245 }
16246
16247 return tagCloseBetween(code)
16248 }
16249
16250 /** @type {State} */
16251 function tagCloseBetween(code) {
16252 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16253 returnState = tagCloseBetween
16254 return atLineEnding(code)
16255 }
16256
16257 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)) {
16258 effects.consume(code)
16259 return tagCloseBetween
16260 }
16261
16262 return end(code)
16263 }
16264
16265 /** @type {State} */
16266 function tagOpen(code) {
16267 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlphanumeric)(code)) {
16268 effects.consume(code)
16269 return tagOpen
16270 }
16271
16272 if (
16273 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.slash ||
16274 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan ||
16275 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEndingOrSpace)(code)
16276 ) {
16277 return tagOpenBetween(code)
16278 }
16279
16280 return nok(code)
16281 }
16282
16283 /** @type {State} */
16284 function tagOpenBetween(code) {
16285 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.slash) {
16286 effects.consume(code)
16287 return end
16288 }
16289
16290 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.colon || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.underscore || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlpha)(code)) {
16291 effects.consume(code)
16292 return tagOpenAttributeName
16293 }
16294
16295 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16296 returnState = tagOpenBetween
16297 return atLineEnding(code)
16298 }
16299
16300 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)) {
16301 effects.consume(code)
16302 return tagOpenBetween
16303 }
16304
16305 return end(code)
16306 }
16307
16308 /** @type {State} */
16309 function tagOpenAttributeName(code) {
16310 if (
16311 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash ||
16312 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dot ||
16313 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.colon ||
16314 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.underscore ||
16315 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiAlphanumeric)(code)
16316 ) {
16317 effects.consume(code)
16318 return tagOpenAttributeName
16319 }
16320
16321 return tagOpenAttributeNameAfter(code)
16322 }
16323
16324 /** @type {State} */
16325 function tagOpenAttributeNameAfter(code) {
16326 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.equalsTo) {
16327 effects.consume(code)
16328 return tagOpenAttributeValueBefore
16329 }
16330
16331 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16332 returnState = tagOpenAttributeNameAfter
16333 return atLineEnding(code)
16334 }
16335
16336 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)) {
16337 effects.consume(code)
16338 return tagOpenAttributeNameAfter
16339 }
16340
16341 return tagOpenBetween(code)
16342 }
16343
16344 /** @type {State} */
16345 function tagOpenAttributeValueBefore(code) {
16346 if (
16347 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof ||
16348 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.lessThan ||
16349 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.equalsTo ||
16350 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan ||
16351 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.graveAccent
16352 ) {
16353 return nok(code)
16354 }
16355
16356 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.quotationMark || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.apostrophe) {
16357 effects.consume(code)
16358 marker = code
16359 return tagOpenAttributeValueQuoted
16360 }
16361
16362 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16363 returnState = tagOpenAttributeValueBefore
16364 return atLineEnding(code)
16365 }
16366
16367 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)) {
16368 effects.consume(code)
16369 return tagOpenAttributeValueBefore
16370 }
16371
16372 effects.consume(code)
16373 marker = undefined
16374 return tagOpenAttributeValueUnquoted
16375 }
16376
16377 /** @type {State} */
16378 function tagOpenAttributeValueQuoted(code) {
16379 if (code === marker) {
16380 effects.consume(code)
16381 return tagOpenAttributeValueQuotedAfter
16382 }
16383
16384 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
16385 return nok(code)
16386 }
16387
16388 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
16389 returnState = tagOpenAttributeValueQuoted
16390 return atLineEnding(code)
16391 }
16392
16393 effects.consume(code)
16394 return tagOpenAttributeValueQuoted
16395 }
16396
16397 /** @type {State} */
16398 function tagOpenAttributeValueQuotedAfter(code) {
16399 if (
16400 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan ||
16401 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.slash ||
16402 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEndingOrSpace)(code)
16403 ) {
16404 return tagOpenBetween(code)
16405 }
16406
16407 return nok(code)
16408 }
16409
16410 /** @type {State} */
16411 function tagOpenAttributeValueUnquoted(code) {
16412 if (
16413 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof ||
16414 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.quotationMark ||
16415 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.apostrophe ||
16416 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.lessThan ||
16417 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.equalsTo ||
16418 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.graveAccent
16419 ) {
16420 return nok(code)
16421 }
16422
16423 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEndingOrSpace)(code)) {
16424 return tagOpenBetween(code)
16425 }
16426
16427 effects.consume(code)
16428 return tagOpenAttributeValueUnquoted
16429 }
16430
16431 // We can’t have blank lines in content, so no need to worry about empty
16432 // tokens.
16433 /** @type {State} */
16434 function atLineEnding(code) {
16435 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(returnState, 'expected return state')
16436 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code), 'expected eol')
16437 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.htmlTextData)
16438 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.lineEnding)
16439 effects.consume(code)
16440 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.lineEnding)
16441 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_5__.factorySpace)(
16442 effects,
16443 afterPrefix,
16444 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.linePrefix,
16445 self.parser.constructs.disable.null.includes('codeIndented')
16446 ? undefined
16447 : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__.constants.tabSize
16448 )
16449 }
16450
16451 /** @type {State} */
16452 function afterPrefix(code) {
16453 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.htmlTextData)
16454 return returnState(code)
16455 }
16456
16457 /** @type {State} */
16458 function end(code) {
16459 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.greaterThan) {
16460 effects.consume(code)
16461 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.htmlTextData)
16462 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.htmlText)
16463 return ok
16464 }
16465
16466 return nok(code)
16467 }
16468 }
16469
16470
16471 /***/ }),
16472
16473 /***/ "../node_modules/micromark-core-commonmark/dev/lib/label-end.js":
16474 /*!**********************************************************************!*\
16475 !*** ../node_modules/micromark-core-commonmark/dev/lib/label-end.js ***!
16476 \**********************************************************************/
16477 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
16478
16479 "use strict";
16480 __webpack_require__.r(__webpack_exports__);
16481 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16482 /* harmony export */ "labelEnd": () => (/* binding */ labelEnd)
16483 /* harmony export */ });
16484 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
16485 /* harmony import */ var micromark_factory_destination__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! micromark-factory-destination */ "../node_modules/micromark-factory-destination/dev/index.js");
16486 /* harmony import */ var micromark_factory_label__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! micromark-factory-label */ "../node_modules/micromark-factory-label/dev/index.js");
16487 /* harmony import */ var micromark_factory_title__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! micromark-factory-title */ "../node_modules/micromark-factory-title/dev/index.js");
16488 /* harmony import */ var micromark_factory_whitespace__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-factory-whitespace */ "../node_modules/micromark-factory-whitespace/dev/index.js");
16489 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
16490 /* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-chunked */ "../node_modules/micromark-util-chunked/dev/index.js");
16491 /* harmony import */ var micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-normalize-identifier */ "../node_modules/micromark-util-normalize-identifier/dev/index.js");
16492 /* harmony import */ var micromark_util_resolve_all__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-resolve-all */ "../node_modules/micromark-util-resolve-all/index.js");
16493 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
16494 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
16495 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
16496 /**
16497 * @typedef {import('micromark-util-types').Construct} Construct
16498 * @typedef {import('micromark-util-types').Resolver} Resolver
16499 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
16500 * @typedef {import('micromark-util-types').Event} Event
16501 * @typedef {import('micromark-util-types').Token} Token
16502 * @typedef {import('micromark-util-types').State} State
16503 * @typedef {import('micromark-util-types').Code} Code
16504 */
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519 /** @type {Construct} */
16520 const labelEnd = {
16521 name: 'labelEnd',
16522 tokenize: tokenizeLabelEnd,
16523 resolveTo: resolveToLabelEnd,
16524 resolveAll: resolveAllLabelEnd
16525 }
16526
16527 /** @type {Construct} */
16528 const resourceConstruct = {tokenize: tokenizeResource}
16529 /** @type {Construct} */
16530 const fullReferenceConstruct = {tokenize: tokenizeFullReference}
16531 /** @type {Construct} */
16532 const collapsedReferenceConstruct = {tokenize: tokenizeCollapsedReference}
16533
16534 /** @type {Resolver} */
16535 function resolveAllLabelEnd(events) {
16536 let index = -1
16537 /** @type {Token} */
16538 let token
16539
16540 while (++index < events.length) {
16541 token = events[index][1]
16542
16543 if (
16544 token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelImage ||
16545 token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelLink ||
16546 token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelEnd
16547 ) {
16548 // Remove the marker.
16549 events.splice(index + 1, token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelImage ? 4 : 2)
16550 token.type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data
16551 index++
16552 }
16553 }
16554
16555 return events
16556 }
16557
16558 /** @type {Resolver} */
16559 function resolveToLabelEnd(events, context) {
16560 let index = events.length
16561 let offset = 0
16562 /** @type {Token} */
16563 let token
16564 /** @type {number|undefined} */
16565 let open
16566 /** @type {number|undefined} */
16567 let close
16568 /** @type {Event[]} */
16569 let media
16570
16571 // Find an opening.
16572 while (index--) {
16573 token = events[index][1]
16574
16575 if (open) {
16576 // If we see another link, or inactive link label, we’ve been here before.
16577 if (
16578 token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.link ||
16579 (token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelLink && token._inactive)
16580 ) {
16581 break
16582 }
16583
16584 // Mark other link openings as inactive, as we can’t have links in
16585 // links.
16586 if (events[index][0] === 'enter' && token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelLink) {
16587 token._inactive = true
16588 }
16589 } else if (close) {
16590 if (
16591 events[index][0] === 'enter' &&
16592 (token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelImage || token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelLink) &&
16593 !token._balanced
16594 ) {
16595 open = index
16596
16597 if (token.type !== micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelLink) {
16598 offset = 2
16599 break
16600 }
16601 }
16602 } else if (token.type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelEnd) {
16603 close = index
16604 }
16605 }
16606
16607 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(open !== undefined, '`open` is supposed to be found')
16608 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(close !== undefined, '`close` is supposed to be found')
16609
16610 const group = {
16611 type: events[open][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelLink ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.link : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.image,
16612 start: Object.assign({}, events[open][1].start),
16613 end: Object.assign({}, events[events.length - 1][1].end)
16614 }
16615
16616 const label = {
16617 type: micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.label,
16618 start: Object.assign({}, events[open][1].start),
16619 end: Object.assign({}, events[close][1].end)
16620 }
16621
16622 const text = {
16623 type: micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelText,
16624 start: Object.assign({}, events[open + offset + 2][1].end),
16625 end: Object.assign({}, events[close - 2][1].start)
16626 }
16627
16628 media = [
16629 ['enter', group, context],
16630 ['enter', label, context]
16631 ]
16632
16633 // Opening marker.
16634 media = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(media, events.slice(open + 1, open + offset + 3))
16635
16636 // Text open.
16637 media = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(media, [['enter', text, context]])
16638
16639 // Between.
16640 media = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(
16641 media,
16642 (0,micromark_util_resolve_all__WEBPACK_IMPORTED_MODULE_3__.resolveAll)(
16643 context.parser.constructs.insideSpan.null,
16644 events.slice(open + offset + 4, close - 3),
16645 context
16646 )
16647 )
16648
16649 // Text close, marker close, label close.
16650 media = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(media, [
16651 ['exit', text, context],
16652 events[close - 2],
16653 events[close - 1],
16654 ['exit', label, context]
16655 ])
16656
16657 // Reference, resource, or so.
16658 media = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(media, events.slice(close + 1))
16659
16660 // Media close.
16661 media = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.push)(media, [['exit', group, context]])
16662
16663 ;(0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.splice)(events, open, events.length, media)
16664
16665 return events
16666 }
16667
16668 /** @type {Tokenizer} */
16669 function tokenizeLabelEnd(effects, ok, nok) {
16670 const self = this
16671 let index = self.events.length
16672 /** @type {Token} */
16673 let labelStart
16674 /** @type {boolean} */
16675 let defined
16676
16677 // Find an opening.
16678 while (index--) {
16679 if (
16680 (self.events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelImage ||
16681 self.events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelLink) &&
16682 !self.events[index][1]._balanced
16683 ) {
16684 labelStart = self.events[index][1]
16685 break
16686 }
16687 }
16688
16689 return start
16690
16691 /** @type {State} */
16692 function start(code) {
16693 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.rightSquareBracket, 'expected `]`')
16694
16695 if (!labelStart) {
16696 return nok(code)
16697 }
16698
16699 // It’s a balanced bracket, but contains a link.
16700 if (labelStart._inactive) return balanced(code)
16701 defined = self.parser.defined.includes(
16702 (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_5__.normalizeIdentifier)(
16703 self.sliceSerialize({start: labelStart.end, end: self.now()})
16704 )
16705 )
16706 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelEnd)
16707 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelMarker)
16708 effects.consume(code)
16709 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelMarker)
16710 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.labelEnd)
16711 return afterLabelEnd
16712 }
16713
16714 /** @type {State} */
16715 function afterLabelEnd(code) {
16716 // Resource: `[asd](fgh)`.
16717 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.leftParenthesis) {
16718 return effects.attempt(
16719 resourceConstruct,
16720 ok,
16721 defined ? ok : balanced
16722 )(code)
16723 }
16724
16725 // Collapsed (`[asd][]`) or full (`[asd][fgh]`) reference?
16726 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.leftSquareBracket) {
16727 return effects.attempt(
16728 fullReferenceConstruct,
16729 ok,
16730 defined
16731 ? effects.attempt(collapsedReferenceConstruct, ok, balanced)
16732 : balanced
16733 )(code)
16734 }
16735
16736 // Shortcut reference: `[asd]`?
16737 return defined ? ok(code) : balanced(code)
16738 }
16739
16740 /** @type {State} */
16741 function balanced(code) {
16742 labelStart._balanced = true
16743 return nok(code)
16744 }
16745 }
16746
16747 /** @type {Tokenizer} */
16748 function tokenizeResource(effects, ok, nok) {
16749 return start
16750
16751 /** @type {State} */
16752 function start(code) {
16753 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.leftParenthesis, 'expected left paren')
16754 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resource)
16755 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceMarker)
16756 effects.consume(code)
16757 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceMarker)
16758 return (0,micromark_factory_whitespace__WEBPACK_IMPORTED_MODULE_6__.factoryWhitespace)(effects, open)
16759 }
16760
16761 /** @type {State} */
16762 function open(code) {
16763 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.rightParenthesis) {
16764 return end(code)
16765 }
16766
16767 return (0,micromark_factory_destination__WEBPACK_IMPORTED_MODULE_7__.factoryDestination)(
16768 effects,
16769 destinationAfter,
16770 nok,
16771 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceDestination,
16772 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceDestinationLiteral,
16773 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceDestinationLiteralMarker,
16774 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceDestinationRaw,
16775 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceDestinationString,
16776 micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_8__.constants.linkResourceDestinationBalanceMax
16777 )(code)
16778 }
16779
16780 /** @type {State} */
16781 function destinationAfter(code) {
16782 return (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_9__.markdownLineEndingOrSpace)(code)
16783 ? (0,micromark_factory_whitespace__WEBPACK_IMPORTED_MODULE_6__.factoryWhitespace)(effects, between)(code)
16784 : end(code)
16785 }
16786
16787 /** @type {State} */
16788 function between(code) {
16789 if (
16790 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.quotationMark ||
16791 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.apostrophe ||
16792 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.leftParenthesis
16793 ) {
16794 return (0,micromark_factory_title__WEBPACK_IMPORTED_MODULE_10__.factoryTitle)(
16795 effects,
16796 (0,micromark_factory_whitespace__WEBPACK_IMPORTED_MODULE_6__.factoryWhitespace)(effects, end),
16797 nok,
16798 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceTitle,
16799 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceTitleMarker,
16800 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceTitleString
16801 )(code)
16802 }
16803
16804 return end(code)
16805 }
16806
16807 /** @type {State} */
16808 function end(code) {
16809 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.rightParenthesis) {
16810 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceMarker)
16811 effects.consume(code)
16812 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resourceMarker)
16813 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.resource)
16814 return ok
16815 }
16816
16817 return nok(code)
16818 }
16819 }
16820
16821 /** @type {Tokenizer} */
16822 function tokenizeFullReference(effects, ok, nok) {
16823 const self = this
16824
16825 return start
16826
16827 /** @type {State} */
16828 function start(code) {
16829 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.leftSquareBracket, 'expected left bracket')
16830 return micromark_factory_label__WEBPACK_IMPORTED_MODULE_11__.factoryLabel.call(
16831 self,
16832 effects,
16833 afterLabel,
16834 nok,
16835 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.reference,
16836 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.referenceMarker,
16837 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.referenceString
16838 )(code)
16839 }
16840
16841 /** @type {State} */
16842 function afterLabel(code) {
16843 return self.parser.defined.includes(
16844 (0,micromark_util_normalize_identifier__WEBPACK_IMPORTED_MODULE_5__.normalizeIdentifier)(
16845 self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
16846 )
16847 )
16848 ? ok(code)
16849 : nok(code)
16850 }
16851 }
16852
16853 /** @type {Tokenizer} */
16854 function tokenizeCollapsedReference(effects, ok, nok) {
16855 return start
16856
16857 /** @type {State} */
16858 function start(code) {
16859 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.leftSquareBracket, 'expected left bracket')
16860 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.reference)
16861 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.referenceMarker)
16862 effects.consume(code)
16863 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.referenceMarker)
16864 return open
16865 }
16866
16867 /** @type {State} */
16868 function open(code) {
16869 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_4__.codes.rightSquareBracket) {
16870 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.referenceMarker)
16871 effects.consume(code)
16872 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.referenceMarker)
16873 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.reference)
16874 return ok
16875 }
16876
16877 return nok(code)
16878 }
16879 }
16880
16881
16882 /***/ }),
16883
16884 /***/ "../node_modules/micromark-core-commonmark/dev/lib/label-start-image.js":
16885 /*!******************************************************************************!*\
16886 !*** ../node_modules/micromark-core-commonmark/dev/lib/label-start-image.js ***!
16887 \******************************************************************************/
16888 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
16889
16890 "use strict";
16891 __webpack_require__.r(__webpack_exports__);
16892 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16893 /* harmony export */ "labelStartImage": () => (/* binding */ labelStartImage)
16894 /* harmony export */ });
16895 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
16896 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
16897 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
16898 /* harmony import */ var _label_end_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./label-end.js */ "../node_modules/micromark-core-commonmark/dev/lib/label-end.js");
16899 /**
16900 * @typedef {import('micromark-util-types').Construct} Construct
16901 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
16902 * @typedef {import('micromark-util-types').State} State
16903 */
16904
16905
16906
16907
16908
16909
16910 /** @type {Construct} */
16911 const labelStartImage = {
16912 name: 'labelStartImage',
16913 tokenize: tokenizeLabelStartImage,
16914 resolveAll: _label_end_js__WEBPACK_IMPORTED_MODULE_1__.labelEnd.resolveAll
16915 }
16916
16917 /** @type {Tokenizer} */
16918 function tokenizeLabelStartImage(effects, ok, nok) {
16919 const self = this
16920
16921 return start
16922
16923 /** @type {State} */
16924 function start(code) {
16925 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.exclamationMark, 'expected `!`')
16926 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelImage)
16927 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelImageMarker)
16928 effects.consume(code)
16929 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelImageMarker)
16930 return open
16931 }
16932
16933 /** @type {State} */
16934 function open(code) {
16935 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.leftSquareBracket) {
16936 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelMarker)
16937 effects.consume(code)
16938 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelMarker)
16939 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelImage)
16940 return after
16941 }
16942
16943 return nok(code)
16944 }
16945
16946 /** @type {State} */
16947 function after(code) {
16948 /* To do: remove in the future once we’ve switched from
16949 * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
16950 * which doesn’t need this */
16951 /* Hidden footnotes hook */
16952 /* c8 ignore next 3 */
16953 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.caret &&
16954 '_hiddenFootnoteSupport' in self.parser.constructs
16955 ? nok(code)
16956 : ok(code)
16957 }
16958 }
16959
16960
16961 /***/ }),
16962
16963 /***/ "../node_modules/micromark-core-commonmark/dev/lib/label-start-link.js":
16964 /*!*****************************************************************************!*\
16965 !*** ../node_modules/micromark-core-commonmark/dev/lib/label-start-link.js ***!
16966 \*****************************************************************************/
16967 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
16968
16969 "use strict";
16970 __webpack_require__.r(__webpack_exports__);
16971 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16972 /* harmony export */ "labelStartLink": () => (/* binding */ labelStartLink)
16973 /* harmony export */ });
16974 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
16975 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
16976 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
16977 /* harmony import */ var _label_end_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./label-end.js */ "../node_modules/micromark-core-commonmark/dev/lib/label-end.js");
16978 /**
16979 * @typedef {import('micromark-util-types').Construct} Construct
16980 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
16981 * @typedef {import('micromark-util-types').State} State
16982 */
16983
16984
16985
16986
16987
16988
16989 /** @type {Construct} */
16990 const labelStartLink = {
16991 name: 'labelStartLink',
16992 tokenize: tokenizeLabelStartLink,
16993 resolveAll: _label_end_js__WEBPACK_IMPORTED_MODULE_1__.labelEnd.resolveAll
16994 }
16995
16996 /** @type {Tokenizer} */
16997 function tokenizeLabelStartLink(effects, ok, nok) {
16998 const self = this
16999
17000 return start
17001
17002 /** @type {State} */
17003 function start(code) {
17004 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.leftSquareBracket, 'expected `[`')
17005 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelLink)
17006 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelMarker)
17007 effects.consume(code)
17008 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelMarker)
17009 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.labelLink)
17010 return after
17011 }
17012
17013 /** @type {State} */
17014 function after(code) {
17015 /* To do: remove in the future once we’ve switched from
17016 * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
17017 * which doesn’t need this */
17018 /* Hidden footnotes hook. */
17019 /* c8 ignore next 3 */
17020 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.caret &&
17021 '_hiddenFootnoteSupport' in self.parser.constructs
17022 ? nok(code)
17023 : ok(code)
17024 }
17025 }
17026
17027
17028 /***/ }),
17029
17030 /***/ "../node_modules/micromark-core-commonmark/dev/lib/line-ending.js":
17031 /*!************************************************************************!*\
17032 !*** ../node_modules/micromark-core-commonmark/dev/lib/line-ending.js ***!
17033 \************************************************************************/
17034 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
17035
17036 "use strict";
17037 __webpack_require__.r(__webpack_exports__);
17038 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17039 /* harmony export */ "lineEnding": () => (/* binding */ lineEnding)
17040 /* harmony export */ });
17041 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
17042 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
17043 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
17044 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
17045 /**
17046 * @typedef {import('micromark-util-types').Construct} Construct
17047 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
17048 * @typedef {import('micromark-util-types').State} State
17049 */
17050
17051
17052
17053
17054
17055
17056 /** @type {Construct} */
17057 const lineEnding = {name: 'lineEnding', tokenize: tokenizeLineEnding}
17058
17059 /** @type {Tokenizer} */
17060 function tokenizeLineEnding(effects, ok) {
17061 return start
17062
17063 /** @type {State} */
17064 function start(code) {
17065 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_1__.markdownLineEnding)(code), 'expected eol')
17066 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.lineEnding)
17067 effects.consume(code)
17068 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.lineEnding)
17069 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_3__.factorySpace)(effects, ok, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.linePrefix)
17070 }
17071 }
17072
17073
17074 /***/ }),
17075
17076 /***/ "../node_modules/micromark-core-commonmark/dev/lib/list.js":
17077 /*!*****************************************************************!*\
17078 !*** ../node_modules/micromark-core-commonmark/dev/lib/list.js ***!
17079 \*****************************************************************/
17080 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
17081
17082 "use strict";
17083 __webpack_require__.r(__webpack_exports__);
17084 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17085 /* harmony export */ "list": () => (/* binding */ list)
17086 /* harmony export */ });
17087 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
17088 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
17089 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
17090 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
17091 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
17092 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
17093 /* harmony import */ var _blank_line_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./blank-line.js */ "../node_modules/micromark-core-commonmark/dev/lib/blank-line.js");
17094 /* harmony import */ var _thematic_break_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./thematic-break.js */ "../node_modules/micromark-core-commonmark/dev/lib/thematic-break.js");
17095 /**
17096 * @typedef {import('micromark-util-types').Construct} Construct
17097 * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
17098 * @typedef {import('micromark-util-types').Exiter} Exiter
17099 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
17100 * @typedef {import('micromark-util-types').State} State
17101 * @typedef {import('micromark-util-types').Code} Code
17102 */
17103
17104 /**
17105 * @typedef {Record<string, unknown> & {marker: Code, type: string, size: number}} ListContainerState
17106 * @typedef {TokenizeContext & {containerState: ListContainerState}} TokenizeContextWithState
17107 */
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118 /** @type {Construct} */
17119 const list = {
17120 name: 'list',
17121 tokenize: tokenizeListStart,
17122 continuation: {tokenize: tokenizeListContinuation},
17123 exit: tokenizeListEnd
17124 }
17125
17126 /** @type {Construct} */
17127 const listItemPrefixWhitespaceConstruct = {
17128 tokenize: tokenizeListItemPrefixWhitespace,
17129 partial: true
17130 }
17131
17132 /** @type {Construct} */
17133 const indentConstruct = {tokenize: tokenizeIndent, partial: true}
17134
17135 /**
17136 * @type {Tokenizer}
17137 * @this {TokenizeContextWithState}
17138 */
17139 function tokenizeListStart(effects, ok, nok) {
17140 const self = this
17141 const tail = self.events[self.events.length - 1]
17142 let initialSize =
17143 tail && tail[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix
17144 ? tail[2].sliceSerialize(tail[1], true).length
17145 : 0
17146 let size = 0
17147
17148 return start
17149
17150 /** @type {State} */
17151 function start(code) {
17152 const kind =
17153 self.containerState.type ||
17154 (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.asterisk || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.plusSign || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash
17155 ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listUnordered
17156 : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listOrdered)
17157
17158 if (
17159 kind === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listUnordered
17160 ? !self.containerState.marker || code === self.containerState.marker
17161 : (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiDigit)(code)
17162 ) {
17163 if (!self.containerState.type) {
17164 self.containerState.type = kind
17165 effects.enter(kind, {_container: true})
17166 }
17167
17168 if (kind === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listUnordered) {
17169 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemPrefix)
17170 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.asterisk || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash
17171 ? effects.check(_thematic_break_js__WEBPACK_IMPORTED_MODULE_4__.thematicBreak, nok, atMarker)(code)
17172 : atMarker(code)
17173 }
17174
17175 if (!self.interrupt || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.digit1) {
17176 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemPrefix)
17177 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemValue)
17178 return inside(code)
17179 }
17180 }
17181
17182 return nok(code)
17183 }
17184
17185 /** @type {State} */
17186 function inside(code) {
17187 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.asciiDigit)(code) && ++size < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.listItemValueSizeMax) {
17188 effects.consume(code)
17189 return inside
17190 }
17191
17192 if (
17193 (!self.interrupt || size < 2) &&
17194 (self.containerState.marker
17195 ? code === self.containerState.marker
17196 : code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.rightParenthesis || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dot)
17197 ) {
17198 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemValue)
17199 return atMarker(code)
17200 }
17201
17202 return nok(code)
17203 }
17204
17205 /**
17206 * @type {State}
17207 **/
17208 function atMarker(code) {
17209 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof, 'eof (`null`) is not a marker')
17210 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemMarker)
17211 effects.consume(code)
17212 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemMarker)
17213 self.containerState.marker = self.containerState.marker || code
17214 return effects.check(
17215 _blank_line_js__WEBPACK_IMPORTED_MODULE_6__.blankLine,
17216 // Can’t be empty when interrupting.
17217 self.interrupt ? nok : onBlank,
17218 effects.attempt(
17219 listItemPrefixWhitespaceConstruct,
17220 endOfPrefix,
17221 otherPrefix
17222 )
17223 )
17224 }
17225
17226 /** @type {State} */
17227 function onBlank(code) {
17228 self.containerState.initialBlankLine = true
17229 initialSize++
17230 return endOfPrefix(code)
17231 }
17232
17233 /** @type {State} */
17234 function otherPrefix(code) {
17235 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)) {
17236 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemPrefixWhitespace)
17237 effects.consume(code)
17238 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemPrefixWhitespace)
17239 return endOfPrefix
17240 }
17241
17242 return nok(code)
17243 }
17244
17245 /** @type {State} */
17246 function endOfPrefix(code) {
17247 self.containerState.size =
17248 initialSize +
17249 self.sliceSerialize(effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemPrefix), true).length
17250 return ok(code)
17251 }
17252 }
17253
17254 /**
17255 * @type {Tokenizer}
17256 * @this {TokenizeContextWithState}
17257 */
17258 function tokenizeListContinuation(effects, ok, nok) {
17259 const self = this
17260
17261 self.containerState._closeFlow = undefined
17262
17263 return effects.check(_blank_line_js__WEBPACK_IMPORTED_MODULE_6__.blankLine, onBlank, notBlank)
17264
17265 /** @type {State} */
17266 function onBlank(code) {
17267 self.containerState.furtherBlankLines =
17268 self.containerState.furtherBlankLines ||
17269 self.containerState.initialBlankLine
17270
17271 // We have a blank line.
17272 // Still, try to consume at most the items size.
17273 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__.factorySpace)(
17274 effects,
17275 ok,
17276 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemIndent,
17277 self.containerState.size + 1
17278 )(code)
17279 }
17280
17281 /** @type {State} */
17282 function notBlank(code) {
17283 if (self.containerState.furtherBlankLines || !(0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)) {
17284 self.containerState.furtherBlankLines = undefined
17285 self.containerState.initialBlankLine = undefined
17286 return notInCurrentItem(code)
17287 }
17288
17289 self.containerState.furtherBlankLines = undefined
17290 self.containerState.initialBlankLine = undefined
17291 return effects.attempt(indentConstruct, ok, notInCurrentItem)(code)
17292 }
17293
17294 /** @type {State} */
17295 function notInCurrentItem(code) {
17296 // While we do continue, we signal that the flow should be closed.
17297 self.containerState._closeFlow = true
17298 // As we’re closing flow, we’re no longer interrupting.
17299 self.interrupt = undefined
17300 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__.factorySpace)(
17301 effects,
17302 effects.attempt(list, ok, nok),
17303 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix,
17304 self.parser.constructs.disable.null.includes('codeIndented')
17305 ? undefined
17306 : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.tabSize
17307 )(code)
17308 }
17309 }
17310
17311 /**
17312 * @type {Tokenizer}
17313 * @this {TokenizeContextWithState}
17314 */
17315 function tokenizeIndent(effects, ok, nok) {
17316 const self = this
17317
17318 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__.factorySpace)(
17319 effects,
17320 afterPrefix,
17321 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemIndent,
17322 self.containerState.size + 1
17323 )
17324
17325 /** @type {State} */
17326 function afterPrefix(code) {
17327 const tail = self.events[self.events.length - 1]
17328 return tail &&
17329 tail[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemIndent &&
17330 tail[2].sliceSerialize(tail[1], true).length === self.containerState.size
17331 ? ok(code)
17332 : nok(code)
17333 }
17334 }
17335
17336 /**
17337 * @type {Exiter}
17338 * @this {TokenizeContextWithState}
17339 */
17340 function tokenizeListEnd(effects) {
17341 effects.exit(this.containerState.type)
17342 }
17343
17344 /**
17345 * @type {Tokenizer}
17346 * @this {TokenizeContextWithState}
17347 */
17348 function tokenizeListItemPrefixWhitespace(effects, ok, nok) {
17349 const self = this
17350
17351 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_7__.factorySpace)(
17352 effects,
17353 afterPrefix,
17354 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemPrefixWhitespace,
17355 self.parser.constructs.disable.null.includes('codeIndented')
17356 ? undefined
17357 : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.tabSize + 1
17358 )
17359
17360 /** @type {State} */
17361 function afterPrefix(code) {
17362 const tail = self.events[self.events.length - 1]
17363
17364 return !(0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code) &&
17365 tail &&
17366 tail[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemPrefixWhitespace
17367 ? ok(code)
17368 : nok(code)
17369 }
17370 }
17371
17372
17373 /***/ }),
17374
17375 /***/ "../node_modules/micromark-core-commonmark/dev/lib/setext-underline.js":
17376 /*!*****************************************************************************!*\
17377 !*** ../node_modules/micromark-core-commonmark/dev/lib/setext-underline.js ***!
17378 \*****************************************************************************/
17379 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
17380
17381 "use strict";
17382 __webpack_require__.r(__webpack_exports__);
17383 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17384 /* harmony export */ "setextUnderline": () => (/* binding */ setextUnderline)
17385 /* harmony export */ });
17386 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
17387 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
17388 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
17389 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
17390 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
17391 /**
17392 * @typedef {import('micromark-util-types').Construct} Construct
17393 * @typedef {import('micromark-util-types').Resolver} Resolver
17394 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
17395 * @typedef {import('micromark-util-types').State} State
17396 * @typedef {import('micromark-util-types').Code} Code
17397 */
17398
17399
17400
17401
17402
17403
17404
17405 /** @type {Construct} */
17406 const setextUnderline = {
17407 name: 'setextUnderline',
17408 tokenize: tokenizeSetextUnderline,
17409 resolveTo: resolveToSetextUnderline
17410 }
17411
17412 /** @type {Resolver} */
17413 function resolveToSetextUnderline(events, context) {
17414 let index = events.length
17415 /** @type {number|undefined} */
17416 let content
17417 /** @type {number|undefined} */
17418 let text
17419 /** @type {number|undefined} */
17420 let definition
17421
17422 // Find the opening of the content.
17423 // It’ll always exist: we don’t tokenize if it isn’t there.
17424 while (index--) {
17425 if (events[index][0] === 'enter') {
17426 if (events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.content) {
17427 content = index
17428 break
17429 }
17430
17431 if (events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.paragraph) {
17432 text = index
17433 }
17434 }
17435 // Exit
17436 else {
17437 if (events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.content) {
17438 // Remove the content end (if needed we’ll add it later)
17439 events.splice(index, 1)
17440 }
17441
17442 if (!definition && events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.definition) {
17443 definition = index
17444 }
17445 }
17446 }
17447
17448 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(text !== undefined, 'expected a `text` index to be found')
17449 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(content !== undefined, 'expected a `text` index to be found')
17450
17451 const heading = {
17452 type: micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.setextHeading,
17453 start: Object.assign({}, events[text][1].start),
17454 end: Object.assign({}, events[events.length - 1][1].end)
17455 }
17456
17457 // Change the paragraph to setext heading text.
17458 events[text][1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.setextHeadingText
17459
17460 // If we have definitions in the content, we’ll keep on having content,
17461 // but we need move it.
17462 if (definition) {
17463 events.splice(text, 0, ['enter', heading, context])
17464 events.splice(definition + 1, 0, ['exit', events[content][1], context])
17465 events[content][1].end = Object.assign({}, events[definition][1].end)
17466 } else {
17467 events[content][1] = heading
17468 }
17469
17470 // Add the heading exit at the end.
17471 events.push(['exit', heading, context])
17472
17473 return events
17474 }
17475
17476 /** @type {Tokenizer} */
17477 function tokenizeSetextUnderline(effects, ok, nok) {
17478 const self = this
17479 let index = self.events.length
17480 /** @type {NonNullable<Code>} */
17481 let marker
17482 /** @type {boolean} */
17483 let paragraph
17484
17485 // Find an opening.
17486 while (index--) {
17487 // Skip enter/exit of line ending, line prefix, and content.
17488 // We can now either have a definition or a paragraph.
17489 if (
17490 self.events[index][1].type !== micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding &&
17491 self.events[index][1].type !== micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix &&
17492 self.events[index][1].type !== micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.content
17493 ) {
17494 paragraph = self.events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.paragraph
17495 break
17496 }
17497 }
17498
17499 return start
17500
17501 /** @type {State} */
17502 function start(code) {
17503 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
17504 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.dash || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.equalsTo,
17505 'expected `=` or `-`'
17506 )
17507
17508 if (!self.parser.lazy[self.now().line] && (self.interrupt || paragraph)) {
17509 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.setextHeadingLine)
17510 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.setextHeadingLineSequence)
17511 marker = code
17512 return closingSequence(code)
17513 }
17514
17515 return nok(code)
17516 }
17517
17518 /** @type {State} */
17519 function closingSequence(code) {
17520 if (code === marker) {
17521 effects.consume(code)
17522 return closingSequence
17523 }
17524
17525 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.setextHeadingLineSequence)
17526 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_3__.factorySpace)(effects, closingSequenceEnd, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineSuffix)(code)
17527 }
17528
17529 /** @type {State} */
17530 function closingSequenceEnd(code) {
17531 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_4__.markdownLineEnding)(code)) {
17532 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.setextHeadingLine)
17533 return ok(code)
17534 }
17535
17536 return nok(code)
17537 }
17538 }
17539
17540
17541 /***/ }),
17542
17543 /***/ "../node_modules/micromark-core-commonmark/dev/lib/thematic-break.js":
17544 /*!***************************************************************************!*\
17545 !*** ../node_modules/micromark-core-commonmark/dev/lib/thematic-break.js ***!
17546 \***************************************************************************/
17547 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
17548
17549 "use strict";
17550 __webpack_require__.r(__webpack_exports__);
17551 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17552 /* harmony export */ "thematicBreak": () => (/* binding */ thematicBreak)
17553 /* harmony export */ });
17554 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
17555 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
17556 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
17557 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
17558 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
17559 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
17560 /**
17561 * @typedef {import('micromark-util-types').Construct} Construct
17562 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
17563 * @typedef {import('micromark-util-types').State} State
17564 * @typedef {import('micromark-util-types').Code} Code
17565 */
17566
17567
17568
17569
17570
17571
17572
17573
17574 /** @type {Construct} */
17575 const thematicBreak = {
17576 name: 'thematicBreak',
17577 tokenize: tokenizeThematicBreak
17578 }
17579
17580 /** @type {Tokenizer} */
17581 function tokenizeThematicBreak(effects, ok, nok) {
17582 let size = 0
17583 /** @type {NonNullable<Code>} */
17584 let marker
17585
17586 return start
17587
17588 /** @type {State} */
17589 function start(code) {
17590 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
17591 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.asterisk ||
17592 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.dash ||
17593 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.underscore,
17594 'expected `*`, `-`, or `_`'
17595 )
17596
17597 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.thematicBreak)
17598 marker = code
17599 return atBreak(code)
17600 }
17601
17602 /** @type {State} */
17603 function atBreak(code) {
17604 if (code === marker) {
17605 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.thematicBreakSequence)
17606 return sequence(code)
17607 }
17608
17609 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)) {
17610 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(effects, atBreak, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.whitespace)(code)
17611 }
17612
17613 if (
17614 size < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.thematicBreakMarkerCountMin ||
17615 (code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof && !(0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code))
17616 ) {
17617 return nok(code)
17618 }
17619
17620 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.thematicBreak)
17621 return ok(code)
17622 }
17623
17624 /** @type {State} */
17625 function sequence(code) {
17626 if (code === marker) {
17627 effects.consume(code)
17628 size++
17629 return sequence
17630 }
17631
17632 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.thematicBreakSequence)
17633 return atBreak(code)
17634 }
17635 }
17636
17637
17638 /***/ }),
17639
17640 /***/ "../node_modules/micromark-factory-destination/dev/index.js":
17641 /*!******************************************************************!*\
17642 !*** ../node_modules/micromark-factory-destination/dev/index.js ***!
17643 \******************************************************************/
17644 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
17645
17646 "use strict";
17647 __webpack_require__.r(__webpack_exports__);
17648 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17649 /* harmony export */ "factoryDestination": () => (/* binding */ factoryDestination)
17650 /* harmony export */ });
17651 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
17652 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
17653 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
17654 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
17655 /**
17656 * @typedef {import('micromark-util-types').Effects} Effects
17657 * @typedef {import('micromark-util-types').State} State
17658 */
17659
17660
17661
17662
17663
17664
17665 /**
17666 * @param {Effects} effects
17667 * @param {State} ok
17668 * @param {State} nok
17669 * @param {string} type
17670 * @param {string} literalType
17671 * @param {string} literalMarkerType
17672 * @param {string} rawType
17673 * @param {string} stringType
17674 * @param {number} [max=Infinity]
17675 * @returns {State}
17676 */
17677 // eslint-disable-next-line max-params
17678 function factoryDestination(
17679 effects,
17680 ok,
17681 nok,
17682 type,
17683 literalType,
17684 literalMarkerType,
17685 rawType,
17686 stringType,
17687 max
17688 ) {
17689 const limit = max || Number.POSITIVE_INFINITY
17690 let balance = 0
17691
17692 return start
17693
17694 /** @type {State} */
17695 function start(code) {
17696 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lessThan) {
17697 effects.enter(type)
17698 effects.enter(literalType)
17699 effects.enter(literalMarkerType)
17700 effects.consume(code)
17701 effects.exit(literalMarkerType)
17702 return destinationEnclosedBefore
17703 }
17704
17705 if (
17706 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof ||
17707 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.rightParenthesis ||
17708 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_1__.asciiControl)(code)
17709 ) {
17710 return nok(code)
17711 }
17712
17713 effects.enter(type)
17714 effects.enter(rawType)
17715 effects.enter(stringType)
17716 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.chunkString, {contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.contentTypeString})
17717 return destinationRaw(code)
17718 }
17719
17720 /** @type {State} */
17721 function destinationEnclosedBefore(code) {
17722 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.greaterThan) {
17723 effects.enter(literalMarkerType)
17724 effects.consume(code)
17725 effects.exit(literalMarkerType)
17726 effects.exit(literalType)
17727 effects.exit(type)
17728 return ok
17729 }
17730
17731 effects.enter(stringType)
17732 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.chunkString, {contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_3__.constants.contentTypeString})
17733 return destinationEnclosed(code)
17734 }
17735
17736 /** @type {State} */
17737 function destinationEnclosed(code) {
17738 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.greaterThan) {
17739 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.chunkString)
17740 effects.exit(stringType)
17741 return destinationEnclosedBefore(code)
17742 }
17743
17744 if (
17745 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof ||
17746 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lessThan ||
17747 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_1__.markdownLineEnding)(code)
17748 ) {
17749 return nok(code)
17750 }
17751
17752 effects.consume(code)
17753 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.backslash
17754 ? destinationEnclosedEscape
17755 : destinationEnclosed
17756 }
17757
17758 /** @type {State} */
17759 function destinationEnclosedEscape(code) {
17760 if (
17761 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lessThan ||
17762 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.greaterThan ||
17763 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.backslash
17764 ) {
17765 effects.consume(code)
17766 return destinationEnclosed
17767 }
17768
17769 return destinationEnclosed(code)
17770 }
17771
17772 /** @type {State} */
17773 function destinationRaw(code) {
17774 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.leftParenthesis) {
17775 if (++balance > limit) return nok(code)
17776 effects.consume(code)
17777 return destinationRaw
17778 }
17779
17780 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.rightParenthesis) {
17781 if (!balance--) {
17782 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.chunkString)
17783 effects.exit(stringType)
17784 effects.exit(rawType)
17785 effects.exit(type)
17786 return ok(code)
17787 }
17788
17789 effects.consume(code)
17790 return destinationRaw
17791 }
17792
17793 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_1__.markdownLineEndingOrSpace)(code)) {
17794 if (balance) return nok(code)
17795 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_2__.types.chunkString)
17796 effects.exit(stringType)
17797 effects.exit(rawType)
17798 effects.exit(type)
17799 return ok(code)
17800 }
17801
17802 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_1__.asciiControl)(code)) return nok(code)
17803 effects.consume(code)
17804 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.backslash ? destinationRawEscape : destinationRaw
17805 }
17806
17807 /** @type {State} */
17808 function destinationRawEscape(code) {
17809 if (
17810 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.leftParenthesis ||
17811 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.rightParenthesis ||
17812 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.backslash
17813 ) {
17814 effects.consume(code)
17815 return destinationRaw
17816 }
17817
17818 return destinationRaw(code)
17819 }
17820 }
17821
17822
17823 /***/ }),
17824
17825 /***/ "../node_modules/micromark-factory-label/dev/index.js":
17826 /*!************************************************************!*\
17827 !*** ../node_modules/micromark-factory-label/dev/index.js ***!
17828 \************************************************************/
17829 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
17830
17831 "use strict";
17832 __webpack_require__.r(__webpack_exports__);
17833 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17834 /* harmony export */ "factoryLabel": () => (/* binding */ factoryLabel)
17835 /* harmony export */ });
17836 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
17837 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
17838 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
17839 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
17840 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
17841 /**
17842 * @typedef {import('micromark-util-types').Effects} Effects
17843 * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
17844 * @typedef {import('micromark-util-types').State} State
17845 */
17846
17847
17848
17849
17850
17851
17852
17853 /**
17854 * @this {TokenizeContext}
17855 * @param {Effects} effects
17856 * @param {State} ok
17857 * @param {State} nok
17858 * @param {string} type
17859 * @param {string} markerType
17860 * @param {string} stringType
17861 * @returns {State}
17862 */
17863 // eslint-disable-next-line max-params
17864 function factoryLabel(effects, ok, nok, type, markerType, stringType) {
17865 const self = this
17866 let size = 0
17867 /** @type {boolean} */
17868 let data
17869
17870 return start
17871
17872 /** @type {State} */
17873 function start(code) {
17874 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftSquareBracket, 'expected `[`')
17875 effects.enter(type)
17876 effects.enter(markerType)
17877 effects.consume(code)
17878 effects.exit(markerType)
17879 effects.enter(stringType)
17880 return atBreak
17881 }
17882
17883 /** @type {State} */
17884 function atBreak(code) {
17885 if (
17886 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof ||
17887 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftSquareBracket ||
17888 (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.rightSquareBracket && !data) ||
17889 /* To do: remove in the future once we’ve switched from
17890 * `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
17891 * which doesn’t need this */
17892 /* Hidden footnotes hook */
17893 /* c8 ignore next 3 */
17894 (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.caret &&
17895 !size &&
17896 '_hiddenFootnoteSupport' in self.parser.constructs) ||
17897 size > micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.linkReferenceSizeMax
17898 ) {
17899 return nok(code)
17900 }
17901
17902 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.rightSquareBracket) {
17903 effects.exit(stringType)
17904 effects.enter(markerType)
17905 effects.consume(code)
17906 effects.exit(markerType)
17907 effects.exit(type)
17908 return ok
17909 }
17910
17911 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code)) {
17912 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding)
17913 effects.consume(code)
17914 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding)
17915 return atBreak
17916 }
17917
17918 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.chunkString, {contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.contentTypeString})
17919 return label(code)
17920 }
17921
17922 /** @type {State} */
17923 function label(code) {
17924 if (
17925 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof ||
17926 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftSquareBracket ||
17927 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.rightSquareBracket ||
17928 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownLineEnding)(code) ||
17929 size++ > micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.linkReferenceSizeMax
17930 ) {
17931 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.chunkString)
17932 return atBreak(code)
17933 }
17934
17935 effects.consume(code)
17936 data = data || !(0,micromark_util_character__WEBPACK_IMPORTED_MODULE_3__.markdownSpace)(code)
17937 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.backslash ? labelEscape : label
17938 }
17939
17940 /** @type {State} */
17941 function labelEscape(code) {
17942 if (
17943 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftSquareBracket ||
17944 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.backslash ||
17945 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.rightSquareBracket
17946 ) {
17947 effects.consume(code)
17948 size++
17949 return label
17950 }
17951
17952 return label(code)
17953 }
17954 }
17955
17956
17957 /***/ }),
17958
17959 /***/ "../node_modules/micromark-factory-space/dev/index.js":
17960 /*!************************************************************!*\
17961 !*** ../node_modules/micromark-factory-space/dev/index.js ***!
17962 \************************************************************/
17963 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
17964
17965 "use strict";
17966 __webpack_require__.r(__webpack_exports__);
17967 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17968 /* harmony export */ "factorySpace": () => (/* binding */ factorySpace)
17969 /* harmony export */ });
17970 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
17971 /**
17972 * @typedef {import('micromark-util-types').Effects} Effects
17973 * @typedef {import('micromark-util-types').State} State
17974 */
17975
17976
17977
17978 /**
17979 * @param {Effects} effects
17980 * @param {State} ok
17981 * @param {string} type
17982 * @param {number} [max=Infinity]
17983 * @returns {State}
17984 */
17985 function factorySpace(effects, ok, type, max) {
17986 const limit = max ? max - 1 : Number.POSITIVE_INFINITY
17987 let size = 0
17988
17989 return start
17990
17991 /** @type {State} */
17992 function start(code) {
17993 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_0__.markdownSpace)(code)) {
17994 effects.enter(type)
17995 return prefix(code)
17996 }
17997
17998 return ok(code)
17999 }
18000
18001 /** @type {State} */
18002 function prefix(code) {
18003 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_0__.markdownSpace)(code) && size++ < limit) {
18004 effects.consume(code)
18005 return prefix
18006 }
18007
18008 effects.exit(type)
18009 return ok(code)
18010 }
18011 }
18012
18013
18014 /***/ }),
18015
18016 /***/ "../node_modules/micromark-factory-title/dev/index.js":
18017 /*!************************************************************!*\
18018 !*** ../node_modules/micromark-factory-title/dev/index.js ***!
18019 \************************************************************/
18020 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18021
18022 "use strict";
18023 __webpack_require__.r(__webpack_exports__);
18024 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18025 /* harmony export */ "factoryTitle": () => (/* binding */ factoryTitle)
18026 /* harmony export */ });
18027 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
18028 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
18029 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
18030 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
18031 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
18032 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
18033 /**
18034 * @typedef {import('micromark-util-types').Effects} Effects
18035 * @typedef {import('micromark-util-types').State} State
18036 * @typedef {import('micromark-util-types').Code} Code
18037 */
18038
18039
18040
18041
18042
18043
18044
18045
18046 /**
18047 * @param {Effects} effects
18048 * @param {State} ok
18049 * @param {State} nok
18050 * @param {string} type
18051 * @param {string} markerType
18052 * @param {string} stringType
18053 * @returns {State}
18054 */
18055 // eslint-disable-next-line max-params
18056 function factoryTitle(effects, ok, nok, type, markerType, stringType) {
18057 /** @type {NonNullable<Code>} */
18058 let marker
18059
18060 return start
18061
18062 /** @type {State} */
18063 function start(code) {
18064 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
18065 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.quotationMark ||
18066 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.apostrophe ||
18067 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftParenthesis,
18068 'expected `"`, `\'`, or `(`'
18069 )
18070 effects.enter(type)
18071 effects.enter(markerType)
18072 effects.consume(code)
18073 effects.exit(markerType)
18074 marker = code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.leftParenthesis ? micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.rightParenthesis : code
18075 return atFirstTitleBreak
18076 }
18077
18078 /** @type {State} */
18079 function atFirstTitleBreak(code) {
18080 if (code === marker) {
18081 effects.enter(markerType)
18082 effects.consume(code)
18083 effects.exit(markerType)
18084 effects.exit(type)
18085 return ok
18086 }
18087
18088 effects.enter(stringType)
18089 return atTitleBreak(code)
18090 }
18091
18092 /** @type {State} */
18093 function atTitleBreak(code) {
18094 if (code === marker) {
18095 effects.exit(stringType)
18096 return atFirstTitleBreak(marker)
18097 }
18098
18099 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
18100 return nok(code)
18101 }
18102
18103 // Note: blank lines can’t exist in content.
18104 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.markdownLineEnding)(code)) {
18105 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.lineEnding)
18106 effects.consume(code)
18107 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.lineEnding)
18108 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(effects, atTitleBreak, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.linePrefix)
18109 }
18110
18111 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.chunkString, {contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.contentTypeString})
18112 return title(code)
18113 }
18114
18115 /** @type {State} */
18116 function title(code) {
18117 if (code === marker || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.markdownLineEnding)(code)) {
18118 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.chunkString)
18119 return atTitleBreak(code)
18120 }
18121
18122 effects.consume(code)
18123 return code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.backslash ? titleEscape : title
18124 }
18125
18126 /** @type {State} */
18127 function titleEscape(code) {
18128 if (code === marker || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.backslash) {
18129 effects.consume(code)
18130 return title
18131 }
18132
18133 return title(code)
18134 }
18135 }
18136
18137
18138 /***/ }),
18139
18140 /***/ "../node_modules/micromark-factory-whitespace/dev/index.js":
18141 /*!*****************************************************************!*\
18142 !*** ../node_modules/micromark-factory-whitespace/dev/index.js ***!
18143 \*****************************************************************/
18144 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18145
18146 "use strict";
18147 __webpack_require__.r(__webpack_exports__);
18148 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18149 /* harmony export */ "factoryWhitespace": () => (/* binding */ factoryWhitespace)
18150 /* harmony export */ });
18151 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
18152 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
18153 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
18154 /**
18155 * @typedef {import('micromark-util-types').Effects} Effects
18156 * @typedef {import('micromark-util-types').State} State
18157 */
18158
18159
18160
18161
18162
18163 /**
18164 * @param {Effects} effects
18165 * @param {State} ok
18166 */
18167 function factoryWhitespace(effects, ok) {
18168 /** @type {boolean} */
18169 let seen
18170
18171 return start
18172
18173 /** @type {State} */
18174 function start(code) {
18175 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_0__.markdownLineEnding)(code)) {
18176 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding)
18177 effects.consume(code)
18178 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding)
18179 seen = true
18180 return start
18181 }
18182
18183 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_0__.markdownSpace)(code)) {
18184 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_2__.factorySpace)(
18185 effects,
18186 start,
18187 seen ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineSuffix
18188 )(code)
18189 }
18190
18191 return ok(code)
18192 }
18193 }
18194
18195
18196 /***/ }),
18197
18198 /***/ "../node_modules/micromark-util-character/dev/index.js":
18199 /*!*************************************************************!*\
18200 !*** ../node_modules/micromark-util-character/dev/index.js ***!
18201 \*************************************************************/
18202 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18203
18204 "use strict";
18205 __webpack_require__.r(__webpack_exports__);
18206 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18207 /* harmony export */ "asciiAlpha": () => (/* binding */ asciiAlpha),
18208 /* harmony export */ "asciiAlphanumeric": () => (/* binding */ asciiAlphanumeric),
18209 /* harmony export */ "asciiAtext": () => (/* binding */ asciiAtext),
18210 /* harmony export */ "asciiControl": () => (/* binding */ asciiControl),
18211 /* harmony export */ "asciiDigit": () => (/* binding */ asciiDigit),
18212 /* harmony export */ "asciiHexDigit": () => (/* binding */ asciiHexDigit),
18213 /* harmony export */ "asciiPunctuation": () => (/* binding */ asciiPunctuation),
18214 /* harmony export */ "markdownLineEnding": () => (/* binding */ markdownLineEnding),
18215 /* harmony export */ "markdownLineEndingOrSpace": () => (/* binding */ markdownLineEndingOrSpace),
18216 /* harmony export */ "markdownSpace": () => (/* binding */ markdownSpace),
18217 /* harmony export */ "unicodePunctuation": () => (/* binding */ unicodePunctuation),
18218 /* harmony export */ "unicodeWhitespace": () => (/* binding */ unicodeWhitespace)
18219 /* harmony export */ });
18220 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
18221 /* harmony import */ var _lib_unicode_punctuation_regex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/unicode-punctuation-regex.js */ "../node_modules/micromark-util-character/dev/lib/unicode-punctuation-regex.js");
18222 /**
18223 * @typedef {import('micromark-util-types').Code} Code
18224 */
18225
18226
18227
18228
18229 /**
18230 * Check whether the character code represents an ASCII alpha (`a` through `z`,
18231 * case insensitive).
18232 *
18233 * An **ASCII alpha** is an ASCII upper alpha or ASCII lower alpha.
18234 *
18235 * An **ASCII upper alpha** is a character in the inclusive range U+0041 (`A`)
18236 * to U+005A (`Z`).
18237 *
18238 * An **ASCII lower alpha** is a character in the inclusive range U+0061 (`a`)
18239 * to U+007A (`z`).
18240 */
18241 const asciiAlpha = regexCheck(/[A-Za-z]/)
18242
18243 /**
18244 * Check whether the character code represents an ASCII digit (`0` through `9`).
18245 *
18246 * An **ASCII digit** is a character in the inclusive range U+0030 (`0`) to
18247 * U+0039 (`9`).
18248 */
18249 const asciiDigit = regexCheck(/\d/)
18250
18251 /**
18252 * Check whether the character code represents an ASCII hex digit (`a` through
18253 * `f`, case insensitive, or `0` through `9`).
18254 *
18255 * An **ASCII hex digit** is an ASCII digit (see `asciiDigit`), ASCII upper hex
18256 * digit, or an ASCII lower hex digit.
18257 *
18258 * An **ASCII upper hex digit** is a character in the inclusive range U+0041
18259 * (`A`) to U+0046 (`F`).
18260 *
18261 * An **ASCII lower hex digit** is a character in the inclusive range U+0061
18262 * (`a`) to U+0066 (`f`).
18263 */
18264 const asciiHexDigit = regexCheck(/[\dA-Fa-f]/)
18265
18266 /**
18267 * Check whether the character code represents an ASCII alphanumeric (`a`
18268 * through `z`, case insensitive, or `0` through `9`).
18269 *
18270 * An **ASCII alphanumeric** is an ASCII digit (see `asciiDigit`) or ASCII alpha
18271 * (see `asciiAlpha`).
18272 */
18273 const asciiAlphanumeric = regexCheck(/[\dA-Za-z]/)
18274
18275 /**
18276 * Check whether the character code represents ASCII punctuation.
18277 *
18278 * An **ASCII punctuation** is a character in the inclusive ranges U+0021
18279 * EXCLAMATION MARK (`!`) to U+002F SLASH (`/`), U+003A COLON (`:`) to U+0040 AT
18280 * SIGN (`@`), U+005B LEFT SQUARE BRACKET (`[`) to U+0060 GRAVE ACCENT
18281 * (`` ` ``), or U+007B LEFT CURLY BRACE (`{`) to U+007E TILDE (`~`).
18282 */
18283 const asciiPunctuation = regexCheck(/[!-/:-@[-`{-~]/)
18284
18285 /**
18286 * Check whether the character code represents an ASCII atext.
18287 *
18288 * atext is an ASCII alphanumeric (see `asciiAlphanumeric`), or a character in
18289 * the inclusive ranges U+0023 NUMBER SIGN (`#`) to U+0027 APOSTROPHE (`'`),
18290 * U+002A ASTERISK (`*`), U+002B PLUS SIGN (`+`), U+002D DASH (`-`), U+002F
18291 * SLASH (`/`), U+003D EQUALS TO (`=`), U+003F QUESTION MARK (`?`), U+005E
18292 * CARET (`^`) to U+0060 GRAVE ACCENT (`` ` ``), or U+007B LEFT CURLY BRACE
18293 * (`{`) to U+007E TILDE (`~`).
18294 *
18295 * See:
18296 * **\[RFC5322]**:
18297 * [Internet Message Format](https://tools.ietf.org/html/rfc5322).
18298 * P. Resnick.
18299 * IETF.
18300 */
18301 const asciiAtext = regexCheck(/[#-'*+\--9=?A-Z^-~]/)
18302
18303 /**
18304 * Check whether a character code is an ASCII control character.
18305 *
18306 * An **ASCII control** is a character in the inclusive range U+0000 NULL (NUL)
18307 * to U+001F (US), or U+007F (DEL).
18308 *
18309 * @param {Code} code
18310 * @returns {code is number}
18311 */
18312 function asciiControl(code) {
18313 return (
18314 // Special whitespace codes (which have negative values), C0 and Control
18315 // character DEL
18316 code !== null && (code < micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.space || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.del)
18317 )
18318 }
18319
18320 /**
18321 * Check whether a character code is a markdown line ending (see
18322 * `markdownLineEnding`) or markdown space (see `markdownSpace`).
18323 *
18324 * @param {Code} code
18325 * @returns {code is number}
18326 */
18327 function markdownLineEndingOrSpace(code) {
18328 return code !== null && (code < micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.nul || code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.space)
18329 }
18330
18331 /**
18332 * Check whether a character code is a markdown line ending.
18333 *
18334 * A **markdown line ending** is the virtual characters M-0003 CARRIAGE RETURN
18335 * LINE FEED (CRLF), M-0004 LINE FEED (LF) and M-0005 CARRIAGE RETURN (CR).
18336 *
18337 * In micromark, the actual character U+000A LINE FEED (LF) and U+000D CARRIAGE
18338 * RETURN (CR) are replaced by these virtual characters depending on whether
18339 * they occurred together.
18340 *
18341 * @param {Code} code
18342 * @returns {code is number}
18343 */
18344 function markdownLineEnding(code) {
18345 return code !== null && code < micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.horizontalTab
18346 }
18347
18348 /**
18349 * Check whether a character code is a markdown space.
18350 *
18351 * A **markdown space** is the concrete character U+0020 SPACE (SP) and the
18352 * virtual characters M-0001 VIRTUAL SPACE (VS) and M-0002 HORIZONTAL TAB (HT).
18353 *
18354 * In micromark, the actual character U+0009 CHARACTER TABULATION (HT) is
18355 * replaced by one M-0002 HORIZONTAL TAB (HT) and between 0 and 3 M-0001 VIRTUAL
18356 * SPACE (VS) characters, depending on the column at which the tab occurred.
18357 *
18358 * @param {Code} code
18359 * @returns {code is number}
18360 */
18361 function markdownSpace(code) {
18362 return (
18363 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.horizontalTab ||
18364 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.virtualSpace ||
18365 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.space
18366 )
18367 }
18368
18369 /**
18370 * Check whether the character code represents Unicode whitespace.
18371 *
18372 * Note that this does handle micromark specific markdown whitespace characters.
18373 * See `markdownLineEndingOrSpace` to check that.
18374 *
18375 * A **Unicode whitespace** is a character in the Unicode `Zs` (Separator,
18376 * Space) category, or U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF),
18377 * U+000C (FF), or U+000D CARRIAGE RETURN (CR) (**\[UNICODE]**).
18378 *
18379 * See:
18380 * **\[UNICODE]**:
18381 * [The Unicode Standard](https://www.unicode.org/versions/).
18382 * Unicode Consortium.
18383 */
18384 const unicodeWhitespace = regexCheck(/\s/)
18385
18386 /**
18387 * Check whether the character code represents Unicode punctuation.
18388 *
18389 * A **Unicode punctuation** is a character in the Unicode `Pc` (Punctuation,
18390 * Connector), `Pd` (Punctuation, Dash), `Pe` (Punctuation, Close), `Pf`
18391 * (Punctuation, Final quote), `Pi` (Punctuation, Initial quote), `Po`
18392 * (Punctuation, Other), or `Ps` (Punctuation, Open) categories, or an ASCII
18393 * punctuation (see `asciiPunctuation`).
18394 *
18395 * See:
18396 * **\[UNICODE]**:
18397 * [The Unicode Standard](https://www.unicode.org/versions/).
18398 * Unicode Consortium.
18399 */
18400 // Size note: removing ASCII from the regex and using `asciiPunctuation` here
18401 // In fact adds to the bundle size.
18402 const unicodePunctuation = regexCheck(_lib_unicode_punctuation_regex_js__WEBPACK_IMPORTED_MODULE_1__.unicodePunctuationRegex)
18403
18404 /**
18405 * Create a code check from a regex.
18406 *
18407 * @param {RegExp} regex
18408 * @returns {(code: Code) => code is number}
18409 */
18410 function regexCheck(regex) {
18411 return check
18412
18413 /**
18414 * Check whether a code matches the bound regex.
18415 *
18416 * @param {Code} code Character code
18417 * @returns {code is number} Whether the character code matches the bound regex
18418 */
18419 function check(code) {
18420 return code !== null && regex.test(String.fromCharCode(code))
18421 }
18422 }
18423
18424
18425 /***/ }),
18426
18427 /***/ "../node_modules/micromark-util-character/dev/lib/unicode-punctuation-regex.js":
18428 /*!*************************************************************************************!*\
18429 !*** ../node_modules/micromark-util-character/dev/lib/unicode-punctuation-regex.js ***!
18430 \*************************************************************************************/
18431 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18432
18433 "use strict";
18434 __webpack_require__.r(__webpack_exports__);
18435 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18436 /* harmony export */ "unicodePunctuationRegex": () => (/* binding */ unicodePunctuationRegex)
18437 /* harmony export */ });
18438 // This module is generated by `script/`.
18439 //
18440 // CommonMark handles attention (emphasis, strong) markers based on what comes
18441 // before or after them.
18442 // One such difference is if those characters are Unicode punctuation.
18443 // This script is generated from the Unicode data.
18444 const unicodePunctuationRegex =
18445 /[!-/:-@[-`{-~\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/
18446
18447
18448 /***/ }),
18449
18450 /***/ "../node_modules/micromark-util-chunked/dev/index.js":
18451 /*!***********************************************************!*\
18452 !*** ../node_modules/micromark-util-chunked/dev/index.js ***!
18453 \***********************************************************/
18454 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18455
18456 "use strict";
18457 __webpack_require__.r(__webpack_exports__);
18458 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18459 /* harmony export */ "push": () => (/* binding */ push),
18460 /* harmony export */ "splice": () => (/* binding */ splice)
18461 /* harmony export */ });
18462 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
18463
18464
18465 /**
18466 * Like `Array#splice`, but smarter for giant arrays.
18467 *
18468 * `Array#splice` takes all items to be inserted as individual argument which
18469 * causes a stack overflow in V8 when trying to insert 100k items for instance.
18470 *
18471 * Otherwise, this does not return the removed items, and takes `items` as an
18472 * array instead of rest parameters.
18473 *
18474 * @template {unknown} T
18475 * @param {T[]} list
18476 * @param {number} start
18477 * @param {number} remove
18478 * @param {T[]} items
18479 * @returns {void}
18480 */
18481 function splice(list, start, remove, items) {
18482 const end = list.length
18483 let chunkStart = 0
18484 /** @type {unknown[]} */
18485 let parameters
18486
18487 // Make start between zero and `end` (included).
18488 if (start < 0) {
18489 start = -start > end ? 0 : end + start
18490 } else {
18491 start = start > end ? end : start
18492 }
18493
18494 remove = remove > 0 ? remove : 0
18495
18496 // No need to chunk the items if there’s only a couple (10k) items.
18497 if (items.length < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_0__.constants.v8MaxSafeChunkSize) {
18498 parameters = Array.from(items)
18499 parameters.unshift(start, remove)
18500 // @ts-expect-error Hush, it’s fine.
18501 ;[].splice.apply(list, parameters)
18502 } else {
18503 // Delete `remove` items starting from `start`
18504 if (remove) [].splice.apply(list, [start, remove])
18505
18506 // Insert the items in chunks to not cause stack overflows.
18507 while (chunkStart < items.length) {
18508 parameters = items.slice(
18509 chunkStart,
18510 chunkStart + micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_0__.constants.v8MaxSafeChunkSize
18511 )
18512 parameters.unshift(start, 0)
18513 // @ts-expect-error Hush, it’s fine.
18514 ;[].splice.apply(list, parameters)
18515
18516 chunkStart += micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_0__.constants.v8MaxSafeChunkSize
18517 start += micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_0__.constants.v8MaxSafeChunkSize
18518 }
18519 }
18520 }
18521
18522 /**
18523 * Append `items` (an array) at the end of `list` (another array).
18524 * When `list` was empty, returns `items` instead.
18525 *
18526 * This prevents a potentially expensive operation when `list` is empty,
18527 * and adds items in batches to prevent V8 from hanging.
18528 *
18529 * @template {unknown} T
18530 * @param {T[]} list
18531 * @param {T[]} items
18532 * @returns {T[]}
18533 */
18534 function push(list, items) {
18535 if (list.length > 0) {
18536 splice(list, list.length, 0, items)
18537 return list
18538 }
18539
18540 return items
18541 }
18542
18543
18544 /***/ }),
18545
18546 /***/ "../node_modules/micromark-util-classify-character/dev/index.js":
18547 /*!**********************************************************************!*\
18548 !*** ../node_modules/micromark-util-classify-character/dev/index.js ***!
18549 \**********************************************************************/
18550 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18551
18552 "use strict";
18553 __webpack_require__.r(__webpack_exports__);
18554 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18555 /* harmony export */ "classifyCharacter": () => (/* binding */ classifyCharacter)
18556 /* harmony export */ });
18557 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
18558 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
18559 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
18560 /**
18561 * @typedef {import('micromark-util-types').Code} Code
18562 */
18563
18564
18565
18566
18567
18568 /**
18569 * Classify whether a character code represents whitespace, punctuation, or
18570 * something else.
18571 *
18572 * Used for attention (emphasis, strong), whose sequences can open or close
18573 * based on the class of surrounding characters.
18574 *
18575 * Note that eof (`null`) is seen as whitespace.
18576 *
18577 * @param {Code} code
18578 * @returns {number|undefined}
18579 */
18580 function classifyCharacter(code) {
18581 if (
18582 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof ||
18583 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_1__.markdownLineEndingOrSpace)(code) ||
18584 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_1__.unicodeWhitespace)(code)
18585 ) {
18586 return micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.characterGroupWhitespace
18587 }
18588
18589 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_1__.unicodePunctuation)(code)) {
18590 return micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.characterGroupPunctuation
18591 }
18592 }
18593
18594
18595 /***/ }),
18596
18597 /***/ "../node_modules/micromark-util-combine-extensions/index.js":
18598 /*!******************************************************************!*\
18599 !*** ../node_modules/micromark-util-combine-extensions/index.js ***!
18600 \******************************************************************/
18601 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18602
18603 "use strict";
18604 __webpack_require__.r(__webpack_exports__);
18605 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18606 /* harmony export */ "combineExtensions": () => (/* binding */ combineExtensions),
18607 /* harmony export */ "combineHtmlExtensions": () => (/* binding */ combineHtmlExtensions)
18608 /* harmony export */ });
18609 /* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-chunked */ "../node_modules/micromark-util-chunked/dev/index.js");
18610 /**
18611 * @typedef {import('micromark-util-types').NormalizedExtension} NormalizedExtension
18612 * @typedef {import('micromark-util-types').Extension} Extension
18613 * @typedef {import('micromark-util-types').Construct} Construct
18614 * @typedef {import('micromark-util-types').HtmlExtension} HtmlExtension
18615 */
18616
18617
18618
18619 const hasOwnProperty = {}.hasOwnProperty
18620
18621 /**
18622 * Combine several syntax extensions into one.
18623 *
18624 * @param {Extension[]} extensions List of syntax extensions.
18625 * @returns {NormalizedExtension} A single combined extension.
18626 */
18627 function combineExtensions(extensions) {
18628 /** @type {NormalizedExtension} */
18629 const all = {}
18630 let index = -1
18631
18632 while (++index < extensions.length) {
18633 syntaxExtension(all, extensions[index])
18634 }
18635
18636 return all
18637 }
18638
18639 /**
18640 * Merge `extension` into `all`.
18641 *
18642 * @param {NormalizedExtension} all Extension to merge into.
18643 * @param {Extension} extension Extension to merge.
18644 * @returns {void}
18645 */
18646 function syntaxExtension(all, extension) {
18647 /** @type {string} */
18648 let hook
18649
18650 for (hook in extension) {
18651 const maybe = hasOwnProperty.call(all, hook) ? all[hook] : undefined
18652 const left = maybe || (all[hook] = {})
18653 const right = extension[hook]
18654 /** @type {string} */
18655 let code
18656
18657 for (code in right) {
18658 if (!hasOwnProperty.call(left, code)) left[code] = []
18659 const value = right[code]
18660 constructs(
18661 // @ts-expect-error Looks like a list.
18662 left[code],
18663 Array.isArray(value) ? value : value ? [value] : []
18664 )
18665 }
18666 }
18667 }
18668
18669 /**
18670 * Merge `list` into `existing` (both lists of constructs).
18671 * Mutates `existing`.
18672 *
18673 * @param {unknown[]} existing
18674 * @param {unknown[]} list
18675 * @returns {void}
18676 */
18677 function constructs(existing, list) {
18678 let index = -1
18679 /** @type {unknown[]} */
18680 const before = []
18681
18682 while (++index < list.length) {
18683 // @ts-expect-error Looks like an object.
18684 ;(list[index].add === 'after' ? existing : before).push(list[index])
18685 }
18686
18687 (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_0__.splice)(existing, 0, 0, before)
18688 }
18689
18690 /**
18691 * Combine several HTML extensions into one.
18692 *
18693 * @param {HtmlExtension[]} htmlExtensions List of HTML extensions.
18694 * @returns {HtmlExtension} A single combined extension.
18695 */
18696 function combineHtmlExtensions(htmlExtensions) {
18697 /** @type {HtmlExtension} */
18698 const handlers = {}
18699 let index = -1
18700
18701 while (++index < htmlExtensions.length) {
18702 htmlExtension(handlers, htmlExtensions[index])
18703 }
18704
18705 return handlers
18706 }
18707
18708 /**
18709 * Merge `extension` into `all`.
18710 *
18711 * @param {HtmlExtension} all Extension to merge into.
18712 * @param {HtmlExtension} extension Extension to merge.
18713 * @returns {void}
18714 */
18715 function htmlExtension(all, extension) {
18716 /** @type {string} */
18717 let hook
18718
18719 for (hook in extension) {
18720 const maybe = hasOwnProperty.call(all, hook) ? all[hook] : undefined
18721 const left = maybe || (all[hook] = {})
18722 const right = extension[hook]
18723 /** @type {string} */
18724 let type
18725
18726 if (right) {
18727 for (type in right) {
18728 left[type] = right[type]
18729 }
18730 }
18731 }
18732 }
18733
18734
18735 /***/ }),
18736
18737 /***/ "../node_modules/micromark-util-decode-numeric-character-reference/dev/index.js":
18738 /*!**************************************************************************************!*\
18739 !*** ../node_modules/micromark-util-decode-numeric-character-reference/dev/index.js ***!
18740 \**************************************************************************************/
18741 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18742
18743 "use strict";
18744 __webpack_require__.r(__webpack_exports__);
18745 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18746 /* harmony export */ "decodeNumericCharacterReference": () => (/* binding */ decodeNumericCharacterReference)
18747 /* harmony export */ });
18748 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
18749 /* harmony import */ var micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/values.js */ "../node_modules/micromark-util-symbol/values.js");
18750
18751
18752
18753 /**
18754 * Turn the number (in string form as either hexa- or plain decimal) coming from
18755 * a numeric character reference into a character.
18756 *
18757 * @param {string} value
18758 * Value to decode.
18759 * @param {number} base
18760 * Numeric base.
18761 * @returns {string}
18762 */
18763 function decodeNumericCharacterReference(value, base) {
18764 const code = Number.parseInt(value, base)
18765
18766 if (
18767 // C0 except for HT, LF, FF, CR, space
18768 code < micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.ht ||
18769 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.vt ||
18770 (code > micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.cr && code < micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.space) ||
18771 // Control character (DEL) of the basic block and C1 controls.
18772 (code > micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.tilde && code < 160) ||
18773 // Lone high surrogates and low surrogates.
18774 (code > 55295 && code < 57344) ||
18775 // Noncharacters.
18776 (code > 64975 && code < 65008) ||
18777 (code & 65535) === 65535 ||
18778 (code & 65535) === 65534 ||
18779 // Out of range
18780 code > 1114111
18781 ) {
18782 return micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_1__.values.replacementCharacter
18783 }
18784
18785 return String.fromCharCode(code)
18786 }
18787
18788
18789 /***/ }),
18790
18791 /***/ "../node_modules/micromark-util-decode-string/dev/index.js":
18792 /*!*****************************************************************!*\
18793 !*** ../node_modules/micromark-util-decode-string/dev/index.js ***!
18794 \*****************************************************************/
18795 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18796
18797 "use strict";
18798 __webpack_require__.r(__webpack_exports__);
18799 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18800 /* harmony export */ "decodeString": () => (/* binding */ decodeString)
18801 /* harmony export */ });
18802 /* harmony import */ var decode_named_character_reference__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! decode-named-character-reference */ "../node_modules/decode-named-character-reference/index.dom.js");
18803 /* harmony import */ var micromark_util_decode_numeric_character_reference__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-decode-numeric-character-reference */ "../node_modules/micromark-util-decode-numeric-character-reference/dev/index.js");
18804 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
18805 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
18806
18807
18808
18809
18810
18811 const characterEscapeOrReference =
18812 /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi
18813
18814 /**
18815 * Utility to decode markdown strings (which occur in places such as fenced
18816 * code info strings, destinations, labels, and titles).
18817 * The “string” content type allows character escapes and -references.
18818 * This decodes those.
18819 *
18820 * @param {string} value
18821 * @returns {string}
18822 */
18823 function decodeString(value) {
18824 return value.replace(characterEscapeOrReference, decode)
18825 }
18826
18827 /**
18828 * @param {string} $0
18829 * @param {string} $1
18830 * @param {string} $2
18831 * @returns {string}
18832 */
18833 function decode($0, $1, $2) {
18834 if ($1) {
18835 // Escape.
18836 return $1
18837 }
18838
18839 // Reference.
18840 const head = $2.charCodeAt(0)
18841
18842 if (head === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.numberSign) {
18843 const head = $2.charCodeAt(1)
18844 const hex = head === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lowercaseX || head === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.uppercaseX
18845 return (0,micromark_util_decode_numeric_character_reference__WEBPACK_IMPORTED_MODULE_1__.decodeNumericCharacterReference)(
18846 $2.slice(hex ? 2 : 1),
18847 hex ? micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.numericBaseHexadecimal : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.numericBaseDecimal
18848 )
18849 }
18850
18851 return (0,decode_named_character_reference__WEBPACK_IMPORTED_MODULE_3__.decodeNamedCharacterReference)($2) || $0
18852 }
18853
18854
18855 /***/ }),
18856
18857 /***/ "../node_modules/micromark-util-encode/index.js":
18858 /*!******************************************************!*\
18859 !*** ../node_modules/micromark-util-encode/index.js ***!
18860 \******************************************************/
18861 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18862
18863 "use strict";
18864 __webpack_require__.r(__webpack_exports__);
18865 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18866 /* harmony export */ "encode": () => (/* binding */ encode)
18867 /* harmony export */ });
18868 const characterReferences = {'"': 'quot', '&': 'amp', '<': 'lt', '>': 'gt'}
18869
18870 /**
18871 * Encode only the dangerous HTML characters.
18872 *
18873 * This ensures that certain characters which have special meaning in HTML are
18874 * dealt with.
18875 * Technically, we can skip `>` and `"` in many cases, but CM includes them.
18876 *
18877 * @param {string} value
18878 * @returns {string}
18879 */
18880 function encode(value) {
18881 return value.replace(/["&<>]/g, replace)
18882
18883 /**
18884 * @param {string} value
18885 * @returns {string}
18886 */
18887 function replace(value) {
18888 // @ts-expect-error Hush, it’s fine.
18889 return '&' + characterReferences[value] + ';'
18890 }
18891 }
18892
18893
18894 /***/ }),
18895
18896 /***/ "../node_modules/micromark-util-html-tag-name/index.js":
18897 /*!*************************************************************!*\
18898 !*** ../node_modules/micromark-util-html-tag-name/index.js ***!
18899 \*************************************************************/
18900 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
18901
18902 "use strict";
18903 __webpack_require__.r(__webpack_exports__);
18904 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18905 /* harmony export */ "htmlBlockNames": () => (/* binding */ htmlBlockNames),
18906 /* harmony export */ "htmlRawNames": () => (/* binding */ htmlRawNames)
18907 /* harmony export */ });
18908 /**
18909 * List of lowercase HTML tag names which when parsing HTML (flow), result
18910 * in more relaxed rules (condition 6): because they are known blocks, the
18911 * HTML-like syntax doesn’t have to be strictly parsed.
18912 * For tag names not in this list, a more strict algorithm (condition 7) is used
18913 * to detect whether the HTML-like syntax is seen as HTML (flow) or not.
18914 *
18915 * This is copied from:
18916 * <https://spec.commonmark.org/0.30/#html-blocks>.
18917 */
18918 const htmlBlockNames = [
18919 'address',
18920 'article',
18921 'aside',
18922 'base',
18923 'basefont',
18924 'blockquote',
18925 'body',
18926 'caption',
18927 'center',
18928 'col',
18929 'colgroup',
18930 'dd',
18931 'details',
18932 'dialog',
18933 'dir',
18934 'div',
18935 'dl',
18936 'dt',
18937 'fieldset',
18938 'figcaption',
18939 'figure',
18940 'footer',
18941 'form',
18942 'frame',
18943 'frameset',
18944 'h1',
18945 'h2',
18946 'h3',
18947 'h4',
18948 'h5',
18949 'h6',
18950 'head',
18951 'header',
18952 'hr',
18953 'html',
18954 'iframe',
18955 'legend',
18956 'li',
18957 'link',
18958 'main',
18959 'menu',
18960 'menuitem',
18961 'nav',
18962 'noframes',
18963 'ol',
18964 'optgroup',
18965 'option',
18966 'p',
18967 'param',
18968 'section',
18969 'summary',
18970 'table',
18971 'tbody',
18972 'td',
18973 'tfoot',
18974 'th',
18975 'thead',
18976 'title',
18977 'tr',
18978 'track',
18979 'ul'
18980 ]
18981
18982 /**
18983 * List of lowercase HTML tag names which when parsing HTML (flow), result in
18984 * HTML that can include lines w/o exiting, until a closing tag also in this
18985 * list is found (condition 1).
18986 *
18987 * This module is copied from:
18988 * <https://spec.commonmark.org/0.30/#html-blocks>.
18989 *
18990 * Note that `textarea` was added in `CommonMark@0.30`.
18991 */
18992 const htmlRawNames = ['pre', 'script', 'style', 'textarea']
18993
18994
18995 /***/ }),
18996
18997 /***/ "../node_modules/micromark-util-normalize-identifier/dev/index.js":
18998 /*!************************************************************************!*\
18999 !*** ../node_modules/micromark-util-normalize-identifier/dev/index.js ***!
19000 \************************************************************************/
19001 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19002
19003 "use strict";
19004 __webpack_require__.r(__webpack_exports__);
19005 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19006 /* harmony export */ "normalizeIdentifier": () => (/* binding */ normalizeIdentifier)
19007 /* harmony export */ });
19008 /* harmony import */ var micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/values.js */ "../node_modules/micromark-util-symbol/values.js");
19009
19010
19011 /**
19012 * Normalize an identifier (such as used in definitions).
19013 *
19014 * @param {string} value
19015 * @returns {string}
19016 */
19017 function normalizeIdentifier(value) {
19018 return (
19019 value
19020 // Collapse Markdown whitespace.
19021 .replace(/[\t\n\r ]+/g, micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_0__.values.space)
19022 // Trim.
19023 .replace(/^ | $/g, '')
19024 // Some characters are considered “uppercase”, but if their lowercase
19025 // counterpart is uppercased will result in a different uppercase
19026 // character.
19027 // Hence, to get that form, we perform both lower- and uppercase.
19028 // Upper case makes sure keys will not interact with default prototypal
19029 // methods: no method is uppercase.
19030 .toLowerCase()
19031 .toUpperCase()
19032 )
19033 }
19034
19035
19036 /***/ }),
19037
19038 /***/ "../node_modules/micromark-util-resolve-all/index.js":
19039 /*!***********************************************************!*\
19040 !*** ../node_modules/micromark-util-resolve-all/index.js ***!
19041 \***********************************************************/
19042 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19043
19044 "use strict";
19045 __webpack_require__.r(__webpack_exports__);
19046 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19047 /* harmony export */ "resolveAll": () => (/* binding */ resolveAll)
19048 /* harmony export */ });
19049 /**
19050 * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
19051 * @typedef {import('micromark-util-types').Event} Event
19052 * @typedef {import('micromark-util-types').Resolver} Resolver
19053 */
19054
19055 /**
19056 * Call all `resolveAll`s.
19057 *
19058 * @param {{resolveAll?: Resolver}[]} constructs
19059 * @param {Event[]} events
19060 * @param {TokenizeContext} context
19061 * @returns {Event[]}
19062 */
19063 function resolveAll(constructs, events, context) {
19064 /** @type {Resolver[]} */
19065 const called = []
19066 let index = -1
19067
19068 while (++index < constructs.length) {
19069 const resolve = constructs[index].resolveAll
19070
19071 if (resolve && !called.includes(resolve)) {
19072 events = resolve(events, context)
19073 called.push(resolve)
19074 }
19075 }
19076
19077 return events
19078 }
19079
19080
19081 /***/ }),
19082
19083 /***/ "../node_modules/micromark-util-sanitize-uri/dev/index.js":
19084 /*!****************************************************************!*\
19085 !*** ../node_modules/micromark-util-sanitize-uri/dev/index.js ***!
19086 \****************************************************************/
19087 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19088
19089 "use strict";
19090 __webpack_require__.r(__webpack_exports__);
19091 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19092 /* harmony export */ "normalizeUri": () => (/* binding */ normalizeUri),
19093 /* harmony export */ "sanitizeUri": () => (/* binding */ sanitizeUri)
19094 /* harmony export */ });
19095 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
19096 /* harmony import */ var micromark_util_encode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-encode */ "../node_modules/micromark-util-encode/index.js");
19097 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
19098 /* harmony import */ var micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/values.js */ "../node_modules/micromark-util-symbol/values.js");
19099
19100
19101
19102
19103
19104 /**
19105 * Make a value safe for injection as a URL.
19106 *
19107 * This encodes unsafe characters with percent-encoding and skips already
19108 * encoded sequences (see `normalizeUri` below).
19109 * Further unsafe characters are encoded as character references (see
19110 * `micromark-util-encode`).
19111 *
19112 * Then, a regex of allowed protocols can be given, in which case the URL is
19113 * sanitized.
19114 * For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`,
19115 * or `/^https?$/i` for `img[src]`.
19116 * If the URL includes an unknown protocol (one not matched by `protocol`, such
19117 * as a dangerous example, `javascript:`), the value is ignored.
19118 *
19119 * @param {string|undefined} url
19120 * @param {RegExp} [protocol]
19121 * @returns {string}
19122 */
19123 function sanitizeUri(url, protocol) {
19124 const value = (0,micromark_util_encode__WEBPACK_IMPORTED_MODULE_0__.encode)(normalizeUri(url || ''))
19125
19126 if (!protocol) {
19127 return value
19128 }
19129
19130 const colon = value.indexOf(':')
19131 const questionMark = value.indexOf('?')
19132 const numberSign = value.indexOf('#')
19133 const slash = value.indexOf('/')
19134
19135 if (
19136 // If there is no protocol, it’s relative.
19137 colon < 0 ||
19138 // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.
19139 (slash > -1 && colon > slash) ||
19140 (questionMark > -1 && colon > questionMark) ||
19141 (numberSign > -1 && colon > numberSign) ||
19142 // It is a protocol, it should be allowed.
19143 protocol.test(value.slice(0, colon))
19144 ) {
19145 return value
19146 }
19147
19148 return ''
19149 }
19150
19151 /**
19152 * Normalize a URL (such as used in definitions).
19153 *
19154 * Encode unsafe characters with percent-encoding, skipping already encoded
19155 * sequences.
19156 *
19157 * @param {string} value
19158 * @returns {string}
19159 */
19160 function normalizeUri(value) {
19161 /** @type {Array<string>} */
19162 const result = []
19163 let index = -1
19164 let start = 0
19165 let skip = 0
19166
19167 while (++index < value.length) {
19168 const code = value.charCodeAt(index)
19169 /** @type {string} */
19170 let replace = ''
19171
19172 // A correct percent encoded value.
19173 if (
19174 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.percentSign &&
19175 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.asciiAlphanumeric)(value.charCodeAt(index + 1)) &&
19176 (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.asciiAlphanumeric)(value.charCodeAt(index + 2))
19177 ) {
19178 skip = 2
19179 }
19180 // ASCII.
19181 else if (code < 128) {
19182 if (!/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code))) {
19183 replace = String.fromCharCode(code)
19184 }
19185 }
19186 // Astral.
19187 else if (code > 55295 && code < 57344) {
19188 const next = value.charCodeAt(index + 1)
19189
19190 // A correct surrogate pair.
19191 if (code < 56320 && next > 56319 && next < 57344) {
19192 replace = String.fromCharCode(code, next)
19193 skip = 1
19194 }
19195 // Lone surrogate.
19196 else {
19197 replace = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_3__.values.replacementCharacter
19198 }
19199 }
19200 // Unicode.
19201 else {
19202 replace = String.fromCharCode(code)
19203 }
19204
19205 if (replace) {
19206 result.push(value.slice(start, index), encodeURIComponent(replace))
19207 start = index + skip + 1
19208 replace = ''
19209 }
19210
19211 if (skip) {
19212 index += skip
19213 skip = 0
19214 }
19215 }
19216
19217 return result.join('') + value.slice(start)
19218 }
19219
19220
19221 /***/ }),
19222
19223 /***/ "../node_modules/micromark-util-subtokenize/dev/index.js":
19224 /*!***************************************************************!*\
19225 !*** ../node_modules/micromark-util-subtokenize/dev/index.js ***!
19226 \***************************************************************/
19227 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19228
19229 "use strict";
19230 __webpack_require__.r(__webpack_exports__);
19231 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19232 /* harmony export */ "subtokenize": () => (/* binding */ subtokenize)
19233 /* harmony export */ });
19234 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
19235 /* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-chunked */ "../node_modules/micromark-util-chunked/dev/index.js");
19236 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
19237 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
19238 /**
19239 * @typedef {import('micromark-util-types').Token} Token
19240 * @typedef {import('micromark-util-types').Chunk} Chunk
19241 * @typedef {import('micromark-util-types').Event} Event
19242 */
19243
19244
19245
19246
19247
19248
19249 /**
19250 * Tokenize subcontent.
19251 *
19252 * @param {Event[]} events
19253 * @returns {boolean}
19254 */
19255 function subtokenize(events) {
19256 /** @type {Record<string, number>} */
19257 const jumps = {}
19258 let index = -1
19259 /** @type {Event} */
19260 let event
19261 /** @type {number|undefined} */
19262 let lineIndex
19263 /** @type {number} */
19264 let otherIndex
19265 /** @type {Event} */
19266 let otherEvent
19267 /** @type {Event[]} */
19268 let parameters
19269 /** @type {Event[]} */
19270 let subevents
19271 /** @type {boolean|undefined} */
19272 let more
19273
19274 while (++index < events.length) {
19275 while (index in jumps) {
19276 index = jumps[index]
19277 }
19278
19279 event = events[index]
19280
19281 // Add a hook for the GFM tasklist extension, which needs to know if text
19282 // is in the first content of a list item.
19283 if (
19284 index &&
19285 event[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow &&
19286 events[index - 1][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.listItemPrefix
19287 ) {
19288 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(event[1]._tokenizer, 'expected `_tokenizer` on subtokens')
19289 subevents = event[1]._tokenizer.events
19290 otherIndex = 0
19291
19292 if (
19293 otherIndex < subevents.length &&
19294 subevents[otherIndex][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEndingBlank
19295 ) {
19296 otherIndex += 2
19297 }
19298
19299 if (
19300 otherIndex < subevents.length &&
19301 subevents[otherIndex][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.content
19302 ) {
19303 while (++otherIndex < subevents.length) {
19304 if (subevents[otherIndex][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.content) {
19305 break
19306 }
19307
19308 if (subevents[otherIndex][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkText) {
19309 subevents[otherIndex][1]._isInFirstContentOfListItem = true
19310 otherIndex++
19311 }
19312 }
19313 }
19314 }
19315
19316 // Enter.
19317 if (event[0] === 'enter') {
19318 if (event[1].contentType) {
19319 Object.assign(jumps, subcontent(events, index))
19320 index = jumps[index]
19321 more = true
19322 }
19323 }
19324 // Exit.
19325 else if (event[1]._container) {
19326 otherIndex = index
19327 lineIndex = undefined
19328
19329 while (otherIndex--) {
19330 otherEvent = events[otherIndex]
19331
19332 if (
19333 otherEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding ||
19334 otherEvent[1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEndingBlank
19335 ) {
19336 if (otherEvent[0] === 'enter') {
19337 if (lineIndex) {
19338 events[lineIndex][1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEndingBlank
19339 }
19340
19341 otherEvent[1].type = micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding
19342 lineIndex = otherIndex
19343 }
19344 } else {
19345 break
19346 }
19347 }
19348
19349 if (lineIndex) {
19350 // Fix position.
19351 event[1].end = Object.assign({}, events[lineIndex][1].start)
19352
19353 // Switch container exit w/ line endings.
19354 parameters = events.slice(lineIndex, index)
19355 parameters.unshift(event)
19356 ;(0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.splice)(events, lineIndex, index - lineIndex + 1, parameters)
19357 }
19358 }
19359 }
19360
19361 return !more
19362 }
19363
19364 /**
19365 * Tokenize embedded tokens.
19366 *
19367 * @param {Event[]} events
19368 * @param {number} eventIndex
19369 * @returns {Record<string, number>}
19370 */
19371 function subcontent(events, eventIndex) {
19372 const token = events[eventIndex][1]
19373 const context = events[eventIndex][2]
19374 let startPosition = eventIndex - 1
19375 /** @type {number[]} */
19376 const startPositions = []
19377 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(token.contentType, 'expected `contentType` on subtokens')
19378 const tokenizer =
19379 token._tokenizer || context.parser[token.contentType](token.start)
19380 const childEvents = tokenizer.events
19381 /** @type {[number, number][]} */
19382 const jumps = []
19383 /** @type {Record<string, number>} */
19384 const gaps = {}
19385 /** @type {Chunk[]} */
19386 let stream
19387 /** @type {Token|undefined} */
19388 let previous
19389 let index = -1
19390 /** @type {Token|undefined} */
19391 let current = token
19392 let adjust = 0
19393 let start = 0
19394 const breaks = [start]
19395
19396 // Loop forward through the linked tokens to pass them in order to the
19397 // subtokenizer.
19398 while (current) {
19399 // Find the position of the event for this token.
19400 while (events[++startPosition][1] !== current) {
19401 // Empty.
19402 }
19403
19404 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
19405 !previous || current.previous === previous,
19406 'expected previous to match'
19407 )
19408 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(!previous || previous.next === current, 'expected next to match')
19409
19410 startPositions.push(startPosition)
19411
19412 if (!current._tokenizer) {
19413 stream = context.sliceStream(current)
19414
19415 if (!current.next) {
19416 stream.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof)
19417 }
19418
19419 if (previous) {
19420 tokenizer.defineSkip(current.start)
19421 }
19422
19423 if (current._isInFirstContentOfListItem) {
19424 tokenizer._gfmTasklistFirstContentOfListItem = true
19425 }
19426
19427 tokenizer.write(stream)
19428
19429 if (current._isInFirstContentOfListItem) {
19430 tokenizer._gfmTasklistFirstContentOfListItem = undefined
19431 }
19432 }
19433
19434 // Unravel the next token.
19435 previous = current
19436 current = current.next
19437 }
19438
19439 // Now, loop back through all events (and linked tokens), to figure out which
19440 // parts belong where.
19441 current = token
19442
19443 while (++index < childEvents.length) {
19444 if (
19445 // Find a void token that includes a break.
19446 childEvents[index][0] === 'exit' &&
19447 childEvents[index - 1][0] === 'enter' &&
19448 childEvents[index][1].type === childEvents[index - 1][1].type &&
19449 childEvents[index][1].start.line !== childEvents[index][1].end.line
19450 ) {
19451 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(current, 'expected a current token')
19452 start = index + 1
19453 breaks.push(start)
19454 // Help GC.
19455 current._tokenizer = undefined
19456 current.previous = undefined
19457 current = current.next
19458 }
19459 }
19460
19461 // Help GC.
19462 tokenizer.events = []
19463
19464 // If there’s one more token (which is the cases for lines that end in an
19465 // EOF), that’s perfect: the last point we found starts it.
19466 // If there isn’t then make sure any remaining content is added to it.
19467 if (current) {
19468 // Help GC.
19469 current._tokenizer = undefined
19470 current.previous = undefined
19471 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(!current.next, 'expected no next token')
19472 } else {
19473 breaks.pop()
19474 }
19475
19476 // Now splice the events from the subtokenizer into the current events,
19477 // moving back to front so that splice indices aren’t affected.
19478 index = breaks.length
19479
19480 while (index--) {
19481 const slice = childEvents.slice(breaks[index], breaks[index + 1])
19482 const start = startPositions.pop()
19483 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(start !== undefined, 'expected a start position when splicing')
19484 jumps.unshift([start, start + slice.length - 1])
19485 ;(0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.splice)(events, start, 2, slice)
19486 }
19487
19488 index = -1
19489
19490 while (++index < jumps.length) {
19491 gaps[adjust + jumps[index][0]] = adjust + jumps[index][1]
19492 adjust += jumps[index][1] - jumps[index][0] - 1
19493 }
19494
19495 return gaps
19496 }
19497
19498
19499 /***/ }),
19500
19501 /***/ "../node_modules/micromark-util-symbol/codes.js":
19502 /*!******************************************************!*\
19503 !*** ../node_modules/micromark-util-symbol/codes.js ***!
19504 \******************************************************/
19505 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19506
19507 "use strict";
19508 __webpack_require__.r(__webpack_exports__);
19509 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19510 /* harmony export */ "codes": () => (/* binding */ codes)
19511 /* harmony export */ });
19512 /**
19513 * Character codes.
19514 *
19515 * This module is compiled away!
19516 *
19517 * micromark works based on character codes.
19518 * This module contains constants for the ASCII block and the replacement
19519 * character.
19520 * A couple of them are handled in a special way, such as the line endings
19521 * (CR, LF, and CR+LF, commonly known as end-of-line: EOLs), the tab (horizontal
19522 * tab) and its expansion based on what column it’s at (virtual space),
19523 * and the end-of-file (eof) character.
19524 * As values are preprocessed before handling them, the actual characters LF,
19525 * CR, HT, and NUL (which is present as the replacement character), are
19526 * guaranteed to not exist.
19527 *
19528 * Unicode basic latin block.
19529 */
19530 const codes = {
19531 carriageReturn: -5,
19532 lineFeed: -4,
19533 carriageReturnLineFeed: -3,
19534 horizontalTab: -2,
19535 virtualSpace: -1,
19536 eof: null,
19537 nul: 0,
19538 soh: 1,
19539 stx: 2,
19540 etx: 3,
19541 eot: 4,
19542 enq: 5,
19543 ack: 6,
19544 bel: 7,
19545 bs: 8,
19546 ht: 9, // `\t`
19547 lf: 10, // `\n`
19548 vt: 11, // `\v`
19549 ff: 12, // `\f`
19550 cr: 13, // `\r`
19551 so: 14,
19552 si: 15,
19553 dle: 16,
19554 dc1: 17,
19555 dc2: 18,
19556 dc3: 19,
19557 dc4: 20,
19558 nak: 21,
19559 syn: 22,
19560 etb: 23,
19561 can: 24,
19562 em: 25,
19563 sub: 26,
19564 esc: 27,
19565 fs: 28,
19566 gs: 29,
19567 rs: 30,
19568 us: 31,
19569 space: 32,
19570 exclamationMark: 33, // `!`
19571 quotationMark: 34, // `"`
19572 numberSign: 35, // `#`
19573 dollarSign: 36, // `$`
19574 percentSign: 37, // `%`
19575 ampersand: 38, // `&`
19576 apostrophe: 39, // `'`
19577 leftParenthesis: 40, // `(`
19578 rightParenthesis: 41, // `)`
19579 asterisk: 42, // `*`
19580 plusSign: 43, // `+`
19581 comma: 44, // `,`
19582 dash: 45, // `-`
19583 dot: 46, // `.`
19584 slash: 47, // `/`
19585 digit0: 48, // `0`
19586 digit1: 49, // `1`
19587 digit2: 50, // `2`
19588 digit3: 51, // `3`
19589 digit4: 52, // `4`
19590 digit5: 53, // `5`
19591 digit6: 54, // `6`
19592 digit7: 55, // `7`
19593 digit8: 56, // `8`
19594 digit9: 57, // `9`
19595 colon: 58, // `:`
19596 semicolon: 59, // `;`
19597 lessThan: 60, // `<`
19598 equalsTo: 61, // `=`
19599 greaterThan: 62, // `>`
19600 questionMark: 63, // `?`
19601 atSign: 64, // `@`
19602 uppercaseA: 65, // `A`
19603 uppercaseB: 66, // `B`
19604 uppercaseC: 67, // `C`
19605 uppercaseD: 68, // `D`
19606 uppercaseE: 69, // `E`
19607 uppercaseF: 70, // `F`
19608 uppercaseG: 71, // `G`
19609 uppercaseH: 72, // `H`
19610 uppercaseI: 73, // `I`
19611 uppercaseJ: 74, // `J`
19612 uppercaseK: 75, // `K`
19613 uppercaseL: 76, // `L`
19614 uppercaseM: 77, // `M`
19615 uppercaseN: 78, // `N`
19616 uppercaseO: 79, // `O`
19617 uppercaseP: 80, // `P`
19618 uppercaseQ: 81, // `Q`
19619 uppercaseR: 82, // `R`
19620 uppercaseS: 83, // `S`
19621 uppercaseT: 84, // `T`
19622 uppercaseU: 85, // `U`
19623 uppercaseV: 86, // `V`
19624 uppercaseW: 87, // `W`
19625 uppercaseX: 88, // `X`
19626 uppercaseY: 89, // `Y`
19627 uppercaseZ: 90, // `Z`
19628 leftSquareBracket: 91, // `[`
19629 backslash: 92, // `\`
19630 rightSquareBracket: 93, // `]`
19631 caret: 94, // `^`
19632 underscore: 95, // `_`
19633 graveAccent: 96, // `` ` ``
19634 lowercaseA: 97, // `a`
19635 lowercaseB: 98, // `b`
19636 lowercaseC: 99, // `c`
19637 lowercaseD: 100, // `d`
19638 lowercaseE: 101, // `e`
19639 lowercaseF: 102, // `f`
19640 lowercaseG: 103, // `g`
19641 lowercaseH: 104, // `h`
19642 lowercaseI: 105, // `i`
19643 lowercaseJ: 106, // `j`
19644 lowercaseK: 107, // `k`
19645 lowercaseL: 108, // `l`
19646 lowercaseM: 109, // `m`
19647 lowercaseN: 110, // `n`
19648 lowercaseO: 111, // `o`
19649 lowercaseP: 112, // `p`
19650 lowercaseQ: 113, // `q`
19651 lowercaseR: 114, // `r`
19652 lowercaseS: 115, // `s`
19653 lowercaseT: 116, // `t`
19654 lowercaseU: 117, // `u`
19655 lowercaseV: 118, // `v`
19656 lowercaseW: 119, // `w`
19657 lowercaseX: 120, // `x`
19658 lowercaseY: 121, // `y`
19659 lowercaseZ: 122, // `z`
19660 leftCurlyBrace: 123, // `{`
19661 verticalBar: 124, // `|`
19662 rightCurlyBrace: 125, // `}`
19663 tilde: 126, // `~`
19664 del: 127,
19665 // Unicode Specials block.
19666 byteOrderMarker: 65279,
19667 // Unicode Specials block.
19668 replacementCharacter: 65533 // ``
19669 }
19670
19671
19672 /***/ }),
19673
19674 /***/ "../node_modules/micromark-util-symbol/constants.js":
19675 /*!**********************************************************!*\
19676 !*** ../node_modules/micromark-util-symbol/constants.js ***!
19677 \**********************************************************/
19678 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19679
19680 "use strict";
19681 __webpack_require__.r(__webpack_exports__);
19682 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19683 /* harmony export */ "constants": () => (/* binding */ constants)
19684 /* harmony export */ });
19685 /**
19686 * This module is compiled away!
19687 *
19688 * Parsing markdown comes with a couple of constants, such as minimum or maximum
19689 * sizes of certain sequences.
19690 * Additionally, there are a couple symbols used inside micromark.
19691 * These are all defined here, but compiled away by scripts.
19692 */
19693 const constants = {
19694 attentionSideBefore: 1, // Symbol to mark an attention sequence as before content: `*a`
19695 attentionSideAfter: 2, // Symbol to mark an attention sequence as after content: `a*`
19696 atxHeadingOpeningFenceSizeMax: 6, // 6 number signs is fine, 7 isn’t.
19697 autolinkDomainSizeMax: 63, // 63 characters is fine, 64 is too many.
19698 autolinkSchemeSizeMax: 32, // 32 characters is fine, 33 is too many.
19699 cdataOpeningString: 'CDATA[', // And preceded by `<![`.
19700 characterGroupWhitespace: 1, // Symbol used to indicate a character is whitespace
19701 characterGroupPunctuation: 2, // Symbol used to indicate a character is punctuation
19702 characterReferenceDecimalSizeMax: 7, // `&#9999999;`.
19703 characterReferenceHexadecimalSizeMax: 6, // `&#xff9999;`.
19704 characterReferenceNamedSizeMax: 31, // `&CounterClockwiseContourIntegral;`.
19705 codeFencedSequenceSizeMin: 3, // At least 3 ticks or tildes are needed.
19706 contentTypeDocument: 'document',
19707 contentTypeFlow: 'flow',
19708 contentTypeContent: 'content',
19709 contentTypeString: 'string',
19710 contentTypeText: 'text',
19711 hardBreakPrefixSizeMin: 2, // At least 2 trailing spaces are needed.
19712 htmlRaw: 1, // Symbol for `<script>`
19713 htmlComment: 2, // Symbol for `<!---->`
19714 htmlInstruction: 3, // Symbol for `<?php?>`
19715 htmlDeclaration: 4, // Symbol for `<!doctype>`
19716 htmlCdata: 5, // Symbol for `<![CDATA[]]>`
19717 htmlBasic: 6, // Symbol for `<div`
19718 htmlComplete: 7, // Symbol for `<x>`
19719 htmlRawSizeMax: 8, // Length of `textarea`.
19720 linkResourceDestinationBalanceMax: 32, // See: <https://spec.commonmark.org/0.30/#link-destination>, <https://github.com/remarkjs/react-markdown/issues/658#issuecomment-984345577>
19721 linkReferenceSizeMax: 999, // See: <https://spec.commonmark.org/0.30/#link-label>
19722 listItemValueSizeMax: 10, // See: <https://spec.commonmark.org/0.30/#ordered-list-marker>
19723 numericBaseDecimal: 10,
19724 numericBaseHexadecimal: 0x10,
19725 tabSize: 4, // Tabs have a hard-coded size of 4, per CommonMark.
19726 thematicBreakMarkerCountMin: 3, // At least 3 asterisks, dashes, or underscores are needed.
19727 v8MaxSafeChunkSize: 10000 // V8 (and potentially others) have problems injecting giant arrays into other arrays, hence we operate in chunks.
19728 }
19729
19730
19731 /***/ }),
19732
19733 /***/ "../node_modules/micromark-util-symbol/types.js":
19734 /*!******************************************************!*\
19735 !*** ../node_modules/micromark-util-symbol/types.js ***!
19736 \******************************************************/
19737 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
19738
19739 "use strict";
19740 __webpack_require__.r(__webpack_exports__);
19741 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19742 /* harmony export */ "types": () => (/* binding */ types)
19743 /* harmony export */ });
19744 /**
19745 * This module is compiled away!
19746 *
19747 * Here is the list of all types of tokens exposed by micromark, with a short
19748 * explanation of what they include and where they are found.
19749 * In picking names, generally, the rule is to be as explicit as possible
19750 * instead of reusing names.
19751 * For example, there is a `definitionDestination` and a `resourceDestination`,
19752 * instead of one shared name.
19753 */
19754
19755 const types = {
19756 // Generic type for data, such as in a title, a destination, etc.
19757 data: 'data',
19758
19759 // Generic type for syntactic whitespace (tabs, virtual spaces, spaces).
19760 // Such as, between a fenced code fence and an info string.
19761 whitespace: 'whitespace',
19762
19763 // Generic type for line endings (line feed, carriage return, carriage return +
19764 // line feed).
19765 lineEnding: 'lineEnding',
19766
19767 // A line ending, but ending a blank line.
19768 lineEndingBlank: 'lineEndingBlank',
19769
19770 // Generic type for whitespace (tabs, virtual spaces, spaces) at the start of a
19771 // line.
19772 linePrefix: 'linePrefix',
19773
19774 // Generic type for whitespace (tabs, virtual spaces, spaces) at the end of a
19775 // line.
19776 lineSuffix: 'lineSuffix',
19777
19778 // Whole ATX heading:
19779 //
19780 // ```markdown
19781 // #
19782 // ## Alpha
19783 // ### Bravo ###
19784 // ```
19785 //
19786 // Includes `atxHeadingSequence`, `whitespace`, `atxHeadingText`.
19787 atxHeading: 'atxHeading',
19788
19789 // Sequence of number signs in an ATX heading (`###`).
19790 atxHeadingSequence: 'atxHeadingSequence',
19791
19792 // Content in an ATX heading (`alpha`).
19793 // Includes text.
19794 atxHeadingText: 'atxHeadingText',
19795
19796 // Whole autolink (`<https://example.com>` or `<admin@example.com>`)
19797 // Includes `autolinkMarker` and `autolinkProtocol` or `autolinkEmail`.
19798 autolink: 'autolink',
19799
19800 // Email autolink w/o markers (`admin@example.com`)
19801 autolinkEmail: 'autolinkEmail',
19802
19803 // Marker around an `autolinkProtocol` or `autolinkEmail` (`<` or `>`).
19804 autolinkMarker: 'autolinkMarker',
19805
19806 // Protocol autolink w/o markers (`https://example.com`)
19807 autolinkProtocol: 'autolinkProtocol',
19808
19809 // A whole character escape (`\-`).
19810 // Includes `escapeMarker` and `characterEscapeValue`.
19811 characterEscape: 'characterEscape',
19812
19813 // The escaped character (`-`).
19814 characterEscapeValue: 'characterEscapeValue',
19815
19816 // A whole character reference (`&amp;`, `&#8800;`, or `&#x1D306;`).
19817 // Includes `characterReferenceMarker`, an optional
19818 // `characterReferenceMarkerNumeric`, in which case an optional
19819 // `characterReferenceMarkerHexadecimal`, and a `characterReferenceValue`.
19820 characterReference: 'characterReference',
19821
19822 // The start or end marker (`&` or `;`).
19823 characterReferenceMarker: 'characterReferenceMarker',
19824
19825 // Mark reference as numeric (`#`).
19826 characterReferenceMarkerNumeric: 'characterReferenceMarkerNumeric',
19827
19828 // Mark reference as numeric (`x` or `X`).
19829 characterReferenceMarkerHexadecimal: 'characterReferenceMarkerHexadecimal',
19830
19831 // Value of character reference w/o markers (`amp`, `8800`, or `1D306`).
19832 characterReferenceValue: 'characterReferenceValue',
19833
19834 // Whole fenced code:
19835 //
19836 // ````markdown
19837 // ```js
19838 // alert(1)
19839 // ```
19840 // ````
19841 codeFenced: 'codeFenced',
19842
19843 // A fenced code fence, including whitespace, sequence, info, and meta
19844 // (` ```js `).
19845 codeFencedFence: 'codeFencedFence',
19846
19847 // Sequence of grave accent or tilde characters (` ``` `) in a fence.
19848 codeFencedFenceSequence: 'codeFencedFenceSequence',
19849
19850 // Info word (`js`) in a fence.
19851 // Includes string.
19852 codeFencedFenceInfo: 'codeFencedFenceInfo',
19853
19854 // Meta words (`highlight="1"`) in a fence.
19855 // Includes string.
19856 codeFencedFenceMeta: 'codeFencedFenceMeta',
19857
19858 // A line of code.
19859 codeFlowValue: 'codeFlowValue',
19860
19861 // Whole indented code:
19862 //
19863 // ```markdown
19864 // alert(1)
19865 // ```
19866 //
19867 // Includes `lineEnding`, `linePrefix`, and `codeFlowValue`.
19868 codeIndented: 'codeIndented',
19869
19870 // A text code (``` `alpha` ```).
19871 // Includes `codeTextSequence`, `codeTextData`, `lineEnding`, and can include
19872 // `codeTextPadding`.
19873 codeText: 'codeText',
19874
19875 codeTextData: 'codeTextData',
19876
19877 // A space or line ending right after or before a tick.
19878 codeTextPadding: 'codeTextPadding',
19879
19880 // A text code fence (` `` `).
19881 codeTextSequence: 'codeTextSequence',
19882
19883 // Whole content:
19884 //
19885 // ```markdown
19886 // [a]: b
19887 // c
19888 // =
19889 // d
19890 // ```
19891 //
19892 // Includes `paragraph` and `definition`.
19893 content: 'content',
19894 // Whole definition:
19895 //
19896 // ```markdown
19897 // [micromark]: https://github.com/micromark/micromark
19898 // ```
19899 //
19900 // Includes `definitionLabel`, `definitionMarker`, `whitespace`,
19901 // `definitionDestination`, and optionally `lineEnding` and `definitionTitle`.
19902 definition: 'definition',
19903
19904 // Destination of a definition (`https://github.com/micromark/micromark` or
19905 // `<https://github.com/micromark/micromark>`).
19906 // Includes `definitionDestinationLiteral` or `definitionDestinationRaw`.
19907 definitionDestination: 'definitionDestination',
19908
19909 // Enclosed destination of a definition
19910 // (`<https://github.com/micromark/micromark>`).
19911 // Includes `definitionDestinationLiteralMarker` and optionally
19912 // `definitionDestinationString`.
19913 definitionDestinationLiteral: 'definitionDestinationLiteral',
19914
19915 // Markers of an enclosed definition destination (`<` or `>`).
19916 definitionDestinationLiteralMarker: 'definitionDestinationLiteralMarker',
19917
19918 // Unenclosed destination of a definition
19919 // (`https://github.com/micromark/micromark`).
19920 // Includes `definitionDestinationString`.
19921 definitionDestinationRaw: 'definitionDestinationRaw',
19922
19923 // Text in an destination (`https://github.com/micromark/micromark`).
19924 // Includes string.
19925 definitionDestinationString: 'definitionDestinationString',
19926
19927 // Label of a definition (`[micromark]`).
19928 // Includes `definitionLabelMarker` and `definitionLabelString`.
19929 definitionLabel: 'definitionLabel',
19930
19931 // Markers of a definition label (`[` or `]`).
19932 definitionLabelMarker: 'definitionLabelMarker',
19933
19934 // Value of a definition label (`micromark`).
19935 // Includes string.
19936 definitionLabelString: 'definitionLabelString',
19937
19938 // Marker between a label and a destination (`:`).
19939 definitionMarker: 'definitionMarker',
19940
19941 // Title of a definition (`"x"`, `'y'`, or `(z)`).
19942 // Includes `definitionTitleMarker` and optionally `definitionTitleString`.
19943 definitionTitle: 'definitionTitle',
19944
19945 // Marker around a title of a definition (`"`, `'`, `(`, or `)`).
19946 definitionTitleMarker: 'definitionTitleMarker',
19947
19948 // Data without markers in a title (`z`).
19949 // Includes string.
19950 definitionTitleString: 'definitionTitleString',
19951
19952 // Emphasis (`*alpha*`).
19953 // Includes `emphasisSequence` and `emphasisText`.
19954 emphasis: 'emphasis',
19955
19956 // Sequence of emphasis markers (`*` or `_`).
19957 emphasisSequence: 'emphasisSequence',
19958
19959 // Emphasis text (`alpha`).
19960 // Includes text.
19961 emphasisText: 'emphasisText',
19962
19963 // The character escape marker (`\`).
19964 escapeMarker: 'escapeMarker',
19965
19966 // A hard break created with a backslash (`\\n`).
19967 // Includes `escapeMarker` (does not include the line ending)
19968 hardBreakEscape: 'hardBreakEscape',
19969
19970 // A hard break created with trailing spaces (` \n`).
19971 // Does not include the line ending.
19972 hardBreakTrailing: 'hardBreakTrailing',
19973
19974 // Flow HTML:
19975 //
19976 // ```markdown
19977 // <div
19978 // ```
19979 //
19980 // Inlcudes `lineEnding`, `htmlFlowData`.
19981 htmlFlow: 'htmlFlow',
19982
19983 htmlFlowData: 'htmlFlowData',
19984
19985 // HTML in text (the tag in `a <i> b`).
19986 // Includes `lineEnding`, `htmlTextData`.
19987 htmlText: 'htmlText',
19988
19989 htmlTextData: 'htmlTextData',
19990
19991 // Whole image (`![alpha](bravo)`, `![alpha][bravo]`, `![alpha][]`, or
19992 // `![alpha]`).
19993 // Includes `label` and an optional `resource` or `reference`.
19994 image: 'image',
19995
19996 // Whole link label (`[*alpha*]`).
19997 // Includes `labelLink` or `labelImage`, `labelText`, and `labelEnd`.
19998 label: 'label',
19999
20000 // Text in an label (`*alpha*`).
20001 // Includes text.
20002 labelText: 'labelText',
20003
20004 // Start a link label (`[`).
20005 // Includes a `labelMarker`.
20006 labelLink: 'labelLink',
20007
20008 // Start an image label (`![`).
20009 // Includes `labelImageMarker` and `labelMarker`.
20010 labelImage: 'labelImage',
20011
20012 // Marker of a label (`[` or `]`).
20013 labelMarker: 'labelMarker',
20014
20015 // Marker to start an image (`!`).
20016 labelImageMarker: 'labelImageMarker',
20017
20018 // End a label (`]`).
20019 // Includes `labelMarker`.
20020 labelEnd: 'labelEnd',
20021
20022 // Whole link (`[alpha](bravo)`, `[alpha][bravo]`, `[alpha][]`, or `[alpha]`).
20023 // Includes `label` and an optional `resource` or `reference`.
20024 link: 'link',
20025
20026 // Whole paragraph:
20027 //
20028 // ```markdown
20029 // alpha
20030 // bravo.
20031 // ```
20032 //
20033 // Includes text.
20034 paragraph: 'paragraph',
20035
20036 // A reference (`[alpha]` or `[]`).
20037 // Includes `referenceMarker` and an optional `referenceString`.
20038 reference: 'reference',
20039
20040 // A reference marker (`[` or `]`).
20041 referenceMarker: 'referenceMarker',
20042
20043 // Reference text (`alpha`).
20044 // Includes string.
20045 referenceString: 'referenceString',
20046
20047 // A resource (`(https://example.com "alpha")`).
20048 // Includes `resourceMarker`, an optional `resourceDestination` with an optional
20049 // `whitespace` and `resourceTitle`.
20050 resource: 'resource',
20051
20052 // A resource destination (`https://example.com`).
20053 // Includes `resourceDestinationLiteral` or `resourceDestinationRaw`.
20054 resourceDestination: 'resourceDestination',
20055
20056 // A literal resource destination (`<https://example.com>`).
20057 // Includes `resourceDestinationLiteralMarker` and optionally
20058 // `resourceDestinationString`.
20059 resourceDestinationLiteral: 'resourceDestinationLiteral',
20060
20061 // A resource destination marker (`<` or `>`).
20062 resourceDestinationLiteralMarker: 'resourceDestinationLiteralMarker',
20063
20064 // A raw resource destination (`https://example.com`).
20065 // Includes `resourceDestinationString`.
20066 resourceDestinationRaw: 'resourceDestinationRaw',
20067
20068 // Resource destination text (`https://example.com`).
20069 // Includes string.
20070 resourceDestinationString: 'resourceDestinationString',
20071
20072 // A resource marker (`(` or `)`).
20073 resourceMarker: 'resourceMarker',
20074
20075 // A resource title (`"alpha"`, `'alpha'`, or `(alpha)`).
20076 // Includes `resourceTitleMarker` and optionally `resourceTitleString`.
20077 resourceTitle: 'resourceTitle',
20078
20079 // A resource title marker (`"`, `'`, `(`, or `)`).
20080 resourceTitleMarker: 'resourceTitleMarker',
20081
20082 // Resource destination title (`alpha`).
20083 // Includes string.
20084 resourceTitleString: 'resourceTitleString',
20085
20086 // Whole setext heading:
20087 //
20088 // ```markdown
20089 // alpha
20090 // bravo
20091 // =====
20092 // ```
20093 //
20094 // Includes `setextHeadingText`, `lineEnding`, `linePrefix`, and
20095 // `setextHeadingLine`.
20096 setextHeading: 'setextHeading',
20097
20098 // Content in a setext heading (`alpha\nbravo`).
20099 // Includes text.
20100 setextHeadingText: 'setextHeadingText',
20101
20102 // Underline in a setext heading, including whitespace suffix (`==`).
20103 // Includes `setextHeadingLineSequence`.
20104 setextHeadingLine: 'setextHeadingLine',
20105
20106 // Sequence of equals or dash characters in underline in a setext heading (`-`).
20107 setextHeadingLineSequence: 'setextHeadingLineSequence',
20108
20109 // Strong (`**alpha**`).
20110 // Includes `strongSequence` and `strongText`.
20111 strong: 'strong',
20112
20113 // Sequence of strong markers (`**` or `__`).
20114 strongSequence: 'strongSequence',
20115
20116 // Strong text (`alpha`).
20117 // Includes text.
20118 strongText: 'strongText',
20119
20120 // Whole thematic break:
20121 //
20122 // ```markdown
20123 // * * *
20124 // ```
20125 //
20126 // Includes `thematicBreakSequence` and `whitespace`.
20127 thematicBreak: 'thematicBreak',
20128
20129 // A sequence of one or more thematic break markers (`***`).
20130 thematicBreakSequence: 'thematicBreakSequence',
20131
20132 // Whole block quote:
20133 //
20134 // ```markdown
20135 // > a
20136 // >
20137 // > b
20138 // ```
20139 //
20140 // Includes `blockQuotePrefix` and flow.
20141 blockQuote: 'blockQuote',
20142 // The `>` or `> ` of a block quote.
20143 blockQuotePrefix: 'blockQuotePrefix',
20144 // The `>` of a block quote prefix.
20145 blockQuoteMarker: 'blockQuoteMarker',
20146 // The optional ` ` of a block quote prefix.
20147 blockQuotePrefixWhitespace: 'blockQuotePrefixWhitespace',
20148
20149 // Whole unordered list:
20150 //
20151 // ```markdown
20152 // - a
20153 // b
20154 // ```
20155 //
20156 // Includes `listItemPrefix`, flow, and optionally `listItemIndent` on further
20157 // lines.
20158 listOrdered: 'listOrdered',
20159
20160 // Whole ordered list:
20161 //
20162 // ```markdown
20163 // 1. a
20164 // b
20165 // ```
20166 //
20167 // Includes `listItemPrefix`, flow, and optionally `listItemIndent` on further
20168 // lines.
20169 listUnordered: 'listUnordered',
20170
20171 // The indent of further list item lines.
20172 listItemIndent: 'listItemIndent',
20173
20174 // A marker, as in, `*`, `+`, `-`, `.`, or `)`.
20175 listItemMarker: 'listItemMarker',
20176
20177 // The thing that starts a list item, such as `1. `.
20178 // Includes `listItemValue` if ordered, `listItemMarker`, and
20179 // `listItemPrefixWhitespace` (unless followed by a line ending).
20180 listItemPrefix: 'listItemPrefix',
20181
20182 // The whitespace after a marker.
20183 listItemPrefixWhitespace: 'listItemPrefixWhitespace',
20184
20185 // The numerical value of an ordered item.
20186 listItemValue: 'listItemValue',
20187
20188 // Internal types used for subtokenizers, compiled away
20189 chunkDocument: 'chunkDocument',
20190 chunkContent: 'chunkContent',
20191 chunkFlow: 'chunkFlow',
20192 chunkText: 'chunkText',
20193 chunkString: 'chunkString'
20194 }
20195
20196
20197 /***/ }),
20198
20199 /***/ "../node_modules/micromark-util-symbol/values.js":
20200 /*!*******************************************************!*\
20201 !*** ../node_modules/micromark-util-symbol/values.js ***!
20202 \*******************************************************/
20203 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20204
20205 "use strict";
20206 __webpack_require__.r(__webpack_exports__);
20207 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20208 /* harmony export */ "values": () => (/* binding */ values)
20209 /* harmony export */ });
20210 // This module is compiled away!
20211 //
20212 // While micromark works based on character codes, this module includes the
20213 // string versions of ’em.
20214 // The C0 block, except for LF, CR, HT, and w/ the replacement character added,
20215 // are available here.
20216 const values = {
20217 ht: '\t',
20218 lf: '\n',
20219 cr: '\r',
20220 space: ' ',
20221 exclamationMark: '!',
20222 quotationMark: '"',
20223 numberSign: '#',
20224 dollarSign: '$',
20225 percentSign: '%',
20226 ampersand: '&',
20227 apostrophe: "'",
20228 leftParenthesis: '(',
20229 rightParenthesis: ')',
20230 asterisk: '*',
20231 plusSign: '+',
20232 comma: ',',
20233 dash: '-',
20234 dot: '.',
20235 slash: '/',
20236 digit0: '0',
20237 digit1: '1',
20238 digit2: '2',
20239 digit3: '3',
20240 digit4: '4',
20241 digit5: '5',
20242 digit6: '6',
20243 digit7: '7',
20244 digit8: '8',
20245 digit9: '9',
20246 colon: ':',
20247 semicolon: ';',
20248 lessThan: '<',
20249 equalsTo: '=',
20250 greaterThan: '>',
20251 questionMark: '?',
20252 atSign: '@',
20253 uppercaseA: 'A',
20254 uppercaseB: 'B',
20255 uppercaseC: 'C',
20256 uppercaseD: 'D',
20257 uppercaseE: 'E',
20258 uppercaseF: 'F',
20259 uppercaseG: 'G',
20260 uppercaseH: 'H',
20261 uppercaseI: 'I',
20262 uppercaseJ: 'J',
20263 uppercaseK: 'K',
20264 uppercaseL: 'L',
20265 uppercaseM: 'M',
20266 uppercaseN: 'N',
20267 uppercaseO: 'O',
20268 uppercaseP: 'P',
20269 uppercaseQ: 'Q',
20270 uppercaseR: 'R',
20271 uppercaseS: 'S',
20272 uppercaseT: 'T',
20273 uppercaseU: 'U',
20274 uppercaseV: 'V',
20275 uppercaseW: 'W',
20276 uppercaseX: 'X',
20277 uppercaseY: 'Y',
20278 uppercaseZ: 'Z',
20279 leftSquareBracket: '[',
20280 backslash: '\\',
20281 rightSquareBracket: ']',
20282 caret: '^',
20283 underscore: '_',
20284 graveAccent: '`',
20285 lowercaseA: 'a',
20286 lowercaseB: 'b',
20287 lowercaseC: 'c',
20288 lowercaseD: 'd',
20289 lowercaseE: 'e',
20290 lowercaseF: 'f',
20291 lowercaseG: 'g',
20292 lowercaseH: 'h',
20293 lowercaseI: 'i',
20294 lowercaseJ: 'j',
20295 lowercaseK: 'k',
20296 lowercaseL: 'l',
20297 lowercaseM: 'm',
20298 lowercaseN: 'n',
20299 lowercaseO: 'o',
20300 lowercaseP: 'p',
20301 lowercaseQ: 'q',
20302 lowercaseR: 'r',
20303 lowercaseS: 's',
20304 lowercaseT: 't',
20305 lowercaseU: 'u',
20306 lowercaseV: 'v',
20307 lowercaseW: 'w',
20308 lowercaseX: 'x',
20309 lowercaseY: 'y',
20310 lowercaseZ: 'z',
20311 leftCurlyBrace: '{',
20312 verticalBar: '|',
20313 rightCurlyBrace: '}',
20314 tilde: '~',
20315 replacementCharacter: ''
20316 }
20317
20318
20319 /***/ }),
20320
20321 /***/ "../node_modules/micromark/dev/lib/constructs.js":
20322 /*!*******************************************************!*\
20323 !*** ../node_modules/micromark/dev/lib/constructs.js ***!
20324 \*******************************************************/
20325 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20326
20327 "use strict";
20328 __webpack_require__.r(__webpack_exports__);
20329 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20330 /* harmony export */ "attentionMarkers": () => (/* binding */ attentionMarkers),
20331 /* harmony export */ "contentInitial": () => (/* binding */ contentInitial),
20332 /* harmony export */ "disable": () => (/* binding */ disable),
20333 /* harmony export */ "document": () => (/* binding */ document),
20334 /* harmony export */ "flow": () => (/* binding */ flow),
20335 /* harmony export */ "flowInitial": () => (/* binding */ flowInitial),
20336 /* harmony export */ "insideSpan": () => (/* binding */ insideSpan),
20337 /* harmony export */ "string": () => (/* binding */ string),
20338 /* harmony export */ "text": () => (/* binding */ text)
20339 /* harmony export */ });
20340 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/list.js");
20341 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/block-quote.js");
20342 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/definition.js");
20343 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/code-indented.js");
20344 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/heading-atx.js");
20345 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/thematic-break.js");
20346 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/setext-underline.js");
20347 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/html-flow.js");
20348 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/code-fenced.js");
20349 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/character-reference.js");
20350 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/character-escape.js");
20351 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/line-ending.js");
20352 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/label-start-image.js");
20353 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/attention.js");
20354 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/autolink.js");
20355 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/html-text.js");
20356 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/label-start-link.js");
20357 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/hard-break-escape.js");
20358 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/label-end.js");
20359 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/code-text.js");
20360 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
20361 /* harmony import */ var _initialize_text_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./initialize/text.js */ "../node_modules/micromark/dev/lib/initialize/text.js");
20362 /**
20363 * @typedef {import('micromark-util-types').Extension} Extension
20364 */
20365
20366
20367
20368
20369
20370 /** @type {Extension['document']} */
20371 const document = {
20372 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.asterisk]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20373 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.plusSign]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20374 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.dash]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20375 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit0]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20376 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit1]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20377 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit2]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20378 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit3]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20379 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit4]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20380 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit5]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20381 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit6]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20382 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit7]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20383 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit8]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20384 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.digit9]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.list,
20385 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.greaterThan]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_2__.blockQuote
20386 }
20387
20388 /** @type {Extension['contentInitial']} */
20389 const contentInitial = {
20390 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.leftSquareBracket]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_3__.definition
20391 }
20392
20393 /** @type {Extension['flowInitial']} */
20394 const flowInitial = {
20395 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.horizontalTab]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_4__.codeIndented,
20396 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.virtualSpace]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_4__.codeIndented,
20397 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.space]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_4__.codeIndented
20398 }
20399
20400 /** @type {Extension['flow']} */
20401 const flow = {
20402 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.numberSign]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_5__.headingAtx,
20403 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.asterisk]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_6__.thematicBreak,
20404 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.dash]: [micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_7__.setextUnderline, micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_6__.thematicBreak],
20405 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lessThan]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_8__.htmlFlow,
20406 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.equalsTo]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_7__.setextUnderline,
20407 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.underscore]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_6__.thematicBreak,
20408 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.graveAccent]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_9__.codeFenced,
20409 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.tilde]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_9__.codeFenced
20410 }
20411
20412 /** @type {Extension['string']} */
20413 const string = {
20414 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.ampersand]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_10__.characterReference,
20415 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.backslash]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_11__.characterEscape
20416 }
20417
20418 /** @type {Extension['text']} */
20419 const text = {
20420 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturn]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_12__.lineEnding,
20421 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lineFeed]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_12__.lineEnding,
20422 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturnLineFeed]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_12__.lineEnding,
20423 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.exclamationMark]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_13__.labelStartImage,
20424 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.ampersand]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_10__.characterReference,
20425 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.asterisk]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_14__.attention,
20426 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lessThan]: [micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_15__.autolink, micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_16__.htmlText],
20427 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.leftSquareBracket]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_17__.labelStartLink,
20428 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.backslash]: [micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_18__.hardBreakEscape, micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_11__.characterEscape],
20429 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.rightSquareBracket]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_19__.labelEnd,
20430 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.underscore]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_14__.attention,
20431 [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.graveAccent]: micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_20__.codeText
20432 }
20433
20434 /** @type {Extension['insideSpan']} */
20435 const insideSpan = {null: [micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_14__.attention, _initialize_text_js__WEBPACK_IMPORTED_MODULE_21__.resolver]}
20436
20437 /** @type {Extension['attentionMarkers']} */
20438 const attentionMarkers = {null: [micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.asterisk, micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.underscore]}
20439
20440 /** @type {Extension['disable']} */
20441 const disable = {null: []}
20442
20443
20444 /***/ }),
20445
20446 /***/ "../node_modules/micromark/dev/lib/create-tokenizer.js":
20447 /*!*************************************************************!*\
20448 !*** ../node_modules/micromark/dev/lib/create-tokenizer.js ***!
20449 \*************************************************************/
20450 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
20451
20452 "use strict";
20453 __webpack_require__.r(__webpack_exports__);
20454 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20455 /* harmony export */ "createTokenizer": () => (/* binding */ createTokenizer)
20456 /* harmony export */ });
20457 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
20458 /* harmony import */ var debug__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! debug */ "../node_modules/debug/src/browser.js");
20459 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
20460 /* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-chunked */ "../node_modules/micromark-util-chunked/dev/index.js");
20461 /* harmony import */ var micromark_util_resolve_all__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-resolve-all */ "../node_modules/micromark-util-resolve-all/index.js");
20462 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
20463 /* harmony import */ var micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-util-symbol/values.js */ "../node_modules/micromark-util-symbol/values.js");
20464 /**
20465 * @typedef {import('micromark-util-types').Code} Code
20466 * @typedef {import('micromark-util-types').Chunk} Chunk
20467 * @typedef {import('micromark-util-types').Point} Point
20468 * @typedef {import('micromark-util-types').Token} Token
20469 * @typedef {import('micromark-util-types').Effects} Effects
20470 * @typedef {import('micromark-util-types').State} State
20471 * @typedef {import('micromark-util-types').Construct} Construct
20472 * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
20473 * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord
20474 * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
20475 * @typedef {import('micromark-util-types').ParseContext} ParseContext
20476 */
20477
20478 /**
20479 * @typedef Info
20480 * @property {() => void} restore
20481 * @property {number} from
20482 *
20483 * @callback ReturnHandle
20484 * Handle a successful run.
20485 * @param {Construct} construct
20486 * @param {Info} info
20487 * @returns {void}
20488 */
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498 const debug = debug__WEBPACK_IMPORTED_MODULE_1__('micromark')
20499
20500 /**
20501 * Create a tokenizer.
20502 * Tokenizers deal with one type of data (e.g., containers, flow, text).
20503 * The parser is the object dealing with it all.
20504 * `initialize` works like other constructs, except that only its `tokenize`
20505 * function is used, in which case it doesn’t receive an `ok` or `nok`.
20506 * `from` can be given to set the point before the first character, although
20507 * when further lines are indented, they must be set with `defineSkip`.
20508 *
20509 * @param {ParseContext} parser
20510 * @param {InitialConstruct} initialize
20511 * @param {Omit<Point, '_index'|'_bufferIndex'>} [from]
20512 * @returns {TokenizeContext}
20513 */
20514 function createTokenizer(parser, initialize, from) {
20515 /** @type {Point} */
20516 let point = Object.assign(
20517 from ? Object.assign({}, from) : {line: 1, column: 1, offset: 0},
20518 {_index: 0, _bufferIndex: -1}
20519 )
20520 /** @type {Record<string, number>} */
20521 const columnStart = {}
20522 /** @type {Array<Construct>} */
20523 const resolveAllConstructs = []
20524 /** @type {Array<Chunk>} */
20525 let chunks = []
20526 /** @type {Array<Token>} */
20527 let stack = []
20528 /** @type {boolean|undefined} */
20529 let consumed = true
20530
20531 /**
20532 * Tools used for tokenizing.
20533 *
20534 * @type {Effects}
20535 */
20536 const effects = {
20537 consume,
20538 enter,
20539 exit,
20540 attempt: constructFactory(onsuccessfulconstruct),
20541 check: constructFactory(onsuccessfulcheck),
20542 interrupt: constructFactory(onsuccessfulcheck, {interrupt: true})
20543 }
20544
20545 /**
20546 * State and tools for resolving and serializing.
20547 *
20548 * @type {TokenizeContext}
20549 */
20550 const context = {
20551 previous: micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof,
20552 code: micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof,
20553 containerState: {},
20554 events: [],
20555 parser,
20556 sliceStream,
20557 sliceSerialize,
20558 now,
20559 defineSkip,
20560 write
20561 }
20562
20563 /**
20564 * The state function.
20565 *
20566 * @type {State|void}
20567 */
20568 let state = initialize.tokenize.call(context, effects)
20569
20570 /**
20571 * Track which character we expect to be consumed, to catch bugs.
20572 *
20573 * @type {Code}
20574 */
20575 let expectedCode
20576
20577 if (initialize.resolveAll) {
20578 resolveAllConstructs.push(initialize)
20579 }
20580
20581 return context
20582
20583 /** @type {TokenizeContext['write']} */
20584 function write(slice) {
20585 chunks = (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_3__.push)(chunks, slice)
20586
20587 main()
20588
20589 // Exit if we’re not done, resolve might change stuff.
20590 if (chunks[chunks.length - 1] !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.eof) {
20591 return []
20592 }
20593
20594 addResult(initialize, 0)
20595
20596 // Otherwise, resolve, and exit.
20597 context.events = (0,micromark_util_resolve_all__WEBPACK_IMPORTED_MODULE_4__.resolveAll)(resolveAllConstructs, context.events, context)
20598
20599 return context.events
20600 }
20601
20602 //
20603 // Tools.
20604 //
20605
20606 /** @type {TokenizeContext['sliceSerialize']} */
20607 function sliceSerialize(token, expandTabs) {
20608 return serializeChunks(sliceStream(token), expandTabs)
20609 }
20610
20611 /** @type {TokenizeContext['sliceStream']} */
20612 function sliceStream(token) {
20613 return sliceChunks(chunks, token)
20614 }
20615
20616 /** @type {TokenizeContext['now']} */
20617 function now() {
20618 return Object.assign({}, point)
20619 }
20620
20621 /** @type {TokenizeContext['defineSkip']} */
20622 function defineSkip(value) {
20623 columnStart[value.line] = value.column
20624 accountForPotentialSkip()
20625 debug('position: define skip: `%j`', point)
20626 }
20627
20628 //
20629 // State management.
20630 //
20631
20632 /**
20633 * Main loop (note that `_index` and `_bufferIndex` in `point` are modified by
20634 * `consume`).
20635 * Here is where we walk through the chunks, which either include strings of
20636 * several characters, or numerical character codes.
20637 * The reason to do this in a loop instead of a call is so the stack can
20638 * drain.
20639 *
20640 * @returns {void}
20641 */
20642 function main() {
20643 /** @type {number} */
20644 let chunkIndex
20645
20646 while (point._index < chunks.length) {
20647 const chunk = chunks[point._index]
20648
20649 // If we’re in a buffer chunk, loop through it.
20650 if (typeof chunk === 'string') {
20651 chunkIndex = point._index
20652
20653 if (point._bufferIndex < 0) {
20654 point._bufferIndex = 0
20655 }
20656
20657 while (
20658 point._index === chunkIndex &&
20659 point._bufferIndex < chunk.length
20660 ) {
20661 go(chunk.charCodeAt(point._bufferIndex))
20662 }
20663 } else {
20664 go(chunk)
20665 }
20666 }
20667 }
20668
20669 /**
20670 * Deal with one code.
20671 *
20672 * @param {Code} code
20673 * @returns {void}
20674 */
20675 function go(code) {
20676 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(consumed === true, 'expected character to be consumed')
20677 consumed = undefined
20678 debug('main: passing `%s` to %s', code, state && state.name)
20679 expectedCode = code
20680 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(typeof state === 'function', 'expected state')
20681 state = state(code)
20682 }
20683
20684 /** @type {Effects['consume']} */
20685 function consume(code) {
20686 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === expectedCode, 'expected given code to equal expected code')
20687
20688 debug('consume: `%s`', code)
20689
20690 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
20691 consumed === undefined,
20692 'expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used'
20693 )
20694 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
20695 code === null
20696 ? context.events.length === 0 ||
20697 context.events[context.events.length - 1][0] === 'exit'
20698 : context.events[context.events.length - 1][0] === 'enter',
20699 'expected last token to be open'
20700 )
20701
20702 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
20703 point.line++
20704 point.column = 1
20705 point.offset += code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.carriageReturnLineFeed ? 2 : 1
20706 accountForPotentialSkip()
20707 debug('position: after eol: `%j`', point)
20708 } else if (code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.virtualSpace) {
20709 point.column++
20710 point.offset++
20711 }
20712
20713 // Not in a string chunk.
20714 if (point._bufferIndex < 0) {
20715 point._index++
20716 } else {
20717 point._bufferIndex++
20718
20719 // At end of string chunk.
20720 // @ts-expect-error Points w/ non-negative `_bufferIndex` reference
20721 // strings.
20722 if (point._bufferIndex === chunks[point._index].length) {
20723 point._bufferIndex = -1
20724 point._index++
20725 }
20726 }
20727
20728 // Expose the previous character.
20729 context.previous = code
20730
20731 // Mark as consumed.
20732 consumed = true
20733 }
20734
20735 /** @type {Effects['enter']} */
20736 function enter(type, fields) {
20737 /** @type {Token} */
20738 // @ts-expect-error Patch instead of assign required fields to help GC.
20739 const token = fields || {}
20740 token.type = type
20741 token.start = now()
20742
20743 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(typeof type === 'string', 'expected string type')
20744 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(type.length > 0, 'expected non-empty string')
20745 debug('enter: `%s`', type)
20746
20747 context.events.push(['enter', token, context])
20748
20749 stack.push(token)
20750
20751 return token
20752 }
20753
20754 /** @type {Effects['exit']} */
20755 function exit(type) {
20756 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(typeof type === 'string', 'expected string type')
20757 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(type.length > 0, 'expected non-empty string')
20758
20759 const token = stack.pop()
20760 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(token, 'cannot close w/o open tokens')
20761 token.end = now()
20762
20763 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(type === token.type, 'expected exit token to match current token')
20764
20765 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
20766 !(
20767 token.start._index === token.end._index &&
20768 token.start._bufferIndex === token.end._bufferIndex
20769 ),
20770 'expected non-empty token (`' + type + '`)'
20771 )
20772
20773 debug('exit: `%s`', token.type)
20774 context.events.push(['exit', token, context])
20775
20776 return token
20777 }
20778
20779 /**
20780 * Use results.
20781 *
20782 * @type {ReturnHandle}
20783 */
20784 function onsuccessfulconstruct(construct, info) {
20785 addResult(construct, info.from)
20786 }
20787
20788 /**
20789 * Discard results.
20790 *
20791 * @type {ReturnHandle}
20792 */
20793 function onsuccessfulcheck(_, info) {
20794 info.restore()
20795 }
20796
20797 /**
20798 * Factory to attempt/check/interrupt.
20799 *
20800 * @param {ReturnHandle} onreturn
20801 * @param {Record<string, unknown>} [fields]
20802 */
20803 function constructFactory(onreturn, fields) {
20804 return hook
20805
20806 /**
20807 * Handle either an object mapping codes to constructs, a list of
20808 * constructs, or a single construct.
20809 *
20810 * @param {Construct|Array<Construct>|ConstructRecord} constructs
20811 * @param {State} returnState
20812 * @param {State} [bogusState]
20813 * @returns {State}
20814 */
20815 function hook(constructs, returnState, bogusState) {
20816 /** @type {Array<Construct>} */
20817 let listOfConstructs
20818 /** @type {number} */
20819 let constructIndex
20820 /** @type {Construct} */
20821 let currentConstruct
20822 /** @type {Info} */
20823 let info
20824
20825 return Array.isArray(constructs)
20826 ? /* c8 ignore next 1 */
20827 handleListOfConstructs(constructs)
20828 : 'tokenize' in constructs
20829 ? // @ts-expect-error Looks like a construct.
20830 handleListOfConstructs([constructs])
20831 : handleMapOfConstructs(constructs)
20832
20833 /**
20834 * Handle a list of construct.
20835 *
20836 * @param {ConstructRecord} map
20837 * @returns {State}
20838 */
20839 function handleMapOfConstructs(map) {
20840 return start
20841
20842 /** @type {State} */
20843 function start(code) {
20844 const def = code !== null && map[code]
20845 const all = code !== null && map.null
20846 const list = [
20847 // To do: add more extension tests.
20848 /* c8 ignore next 2 */
20849 ...(Array.isArray(def) ? def : def ? [def] : []),
20850 ...(Array.isArray(all) ? all : all ? [all] : [])
20851 ]
20852
20853 return handleListOfConstructs(list)(code)
20854 }
20855 }
20856
20857 /**
20858 * Handle a list of construct.
20859 *
20860 * @param {Array<Construct>} list
20861 * @returns {State}
20862 */
20863 function handleListOfConstructs(list) {
20864 listOfConstructs = list
20865 constructIndex = 0
20866
20867 if (list.length === 0) {
20868 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(bogusState, 'expected `bogusState` to be given')
20869 return bogusState
20870 }
20871
20872 return handleConstruct(list[constructIndex])
20873 }
20874
20875 /**
20876 * Handle a single construct.
20877 *
20878 * @param {Construct} construct
20879 * @returns {State}
20880 */
20881 function handleConstruct(construct) {
20882 return start
20883
20884 /** @type {State} */
20885 function start(code) {
20886 // To do: not needed to store if there is no bogus state, probably?
20887 // Currently doesn’t work because `inspect` in document does a check
20888 // w/o a bogus, which doesn’t make sense. But it does seem to help perf
20889 // by not storing.
20890 info = store()
20891 currentConstruct = construct
20892
20893 if (!construct.partial) {
20894 context.currentConstruct = construct
20895 }
20896
20897 if (
20898 construct.name &&
20899 context.parser.constructs.disable.null.includes(construct.name)
20900 ) {
20901 return nok(code)
20902 }
20903
20904 return construct.tokenize.call(
20905 // If we do have fields, create an object w/ `context` as its
20906 // prototype.
20907 // This allows a “live binding”, which is needed for `interrupt`.
20908 fields ? Object.assign(Object.create(context), fields) : context,
20909 effects,
20910 ok,
20911 nok
20912 )(code)
20913 }
20914 }
20915
20916 /** @type {State} */
20917 function ok(code) {
20918 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === expectedCode, 'expected code')
20919 consumed = true
20920 onreturn(currentConstruct, info)
20921 return returnState
20922 }
20923
20924 /** @type {State} */
20925 function nok(code) {
20926 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(code === expectedCode, 'expected code')
20927 consumed = true
20928 info.restore()
20929
20930 if (++constructIndex < listOfConstructs.length) {
20931 return handleConstruct(listOfConstructs[constructIndex])
20932 }
20933
20934 return bogusState
20935 }
20936 }
20937 }
20938
20939 /**
20940 * @param {Construct} construct
20941 * @param {number} from
20942 * @returns {void}
20943 */
20944 function addResult(construct, from) {
20945 if (construct.resolveAll && !resolveAllConstructs.includes(construct)) {
20946 resolveAllConstructs.push(construct)
20947 }
20948
20949 if (construct.resolve) {
20950 (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_3__.splice)(
20951 context.events,
20952 from,
20953 context.events.length - from,
20954 construct.resolve(context.events.slice(from), context)
20955 )
20956 }
20957
20958 if (construct.resolveTo) {
20959 context.events = construct.resolveTo(context.events, context)
20960 }
20961
20962 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
20963 construct.partial ||
20964 context.events.length === 0 ||
20965 context.events[context.events.length - 1][0] === 'exit',
20966 'expected last token to end'
20967 )
20968 }
20969
20970 /**
20971 * Store state.
20972 *
20973 * @returns {Info}
20974 */
20975 function store() {
20976 const startPoint = now()
20977 const startPrevious = context.previous
20978 const startCurrentConstruct = context.currentConstruct
20979 const startEventsIndex = context.events.length
20980 const startStack = Array.from(stack)
20981
20982 return {restore, from: startEventsIndex}
20983
20984 /**
20985 * Restore state.
20986 *
20987 * @returns {void}
20988 */
20989 function restore() {
20990 point = startPoint
20991 context.previous = startPrevious
20992 context.currentConstruct = startCurrentConstruct
20993 context.events.length = startEventsIndex
20994 stack = startStack
20995 accountForPotentialSkip()
20996 debug('position: restore: `%j`', point)
20997 }
20998 }
20999
21000 /**
21001 * Move the current point a bit forward in the line when it’s on a column
21002 * skip.
21003 *
21004 * @returns {void}
21005 */
21006 function accountForPotentialSkip() {
21007 if (point.line in columnStart && point.column < 2) {
21008 point.column = columnStart[point.line]
21009 point.offset += columnStart[point.line] - 1
21010 }
21011 }
21012 }
21013
21014 /**
21015 * Get the chunks from a slice of chunks in the range of a token.
21016 *
21017 * @param {Array<Chunk>} chunks
21018 * @param {Pick<Token, 'start'|'end'>} token
21019 * @returns {Array<Chunk>}
21020 */
21021 function sliceChunks(chunks, token) {
21022 const startIndex = token.start._index
21023 const startBufferIndex = token.start._bufferIndex
21024 const endIndex = token.end._index
21025 const endBufferIndex = token.end._bufferIndex
21026 /** @type {Array<Chunk>} */
21027 let view
21028
21029 if (startIndex === endIndex) {
21030 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(endBufferIndex > -1, 'expected non-negative end buffer index')
21031 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(startBufferIndex > -1, 'expected non-negative start buffer index')
21032 // @ts-expect-error `_bufferIndex` is used on string chunks.
21033 view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]
21034 } else {
21035 view = chunks.slice(startIndex, endIndex)
21036
21037 if (startBufferIndex > -1) {
21038 // @ts-expect-error `_bufferIndex` is used on string chunks.
21039 view[0] = view[0].slice(startBufferIndex)
21040 }
21041
21042 if (endBufferIndex > 0) {
21043 // @ts-expect-error `_bufferIndex` is used on string chunks.
21044 view.push(chunks[endIndex].slice(0, endBufferIndex))
21045 }
21046 }
21047
21048 return view
21049 }
21050
21051 /**
21052 * Get the string value of a slice of chunks.
21053 *
21054 * @param {Array<Chunk>} chunks
21055 * @param {boolean} [expandTabs=false]
21056 * @returns {string}
21057 */
21058 function serializeChunks(chunks, expandTabs) {
21059 let index = -1
21060 /** @type {Array<string>} */
21061 const result = []
21062 /** @type {boolean|undefined} */
21063 let atTab
21064
21065 while (++index < chunks.length) {
21066 const chunk = chunks[index]
21067 /** @type {string} */
21068 let value
21069
21070 if (typeof chunk === 'string') {
21071 value = chunk
21072 } else
21073 switch (chunk) {
21074 case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.carriageReturn: {
21075 value = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.cr
21076
21077 break
21078 }
21079
21080 case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.lineFeed: {
21081 value = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.lf
21082
21083 break
21084 }
21085
21086 case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.carriageReturnLineFeed: {
21087 value = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.cr + micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.lf
21088
21089 break
21090 }
21091
21092 case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.horizontalTab: {
21093 value = expandTabs ? micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.space : micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.ht
21094
21095 break
21096 }
21097
21098 case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.virtualSpace: {
21099 if (!expandTabs && atTab) continue
21100 value = micromark_util_symbol_values_js__WEBPACK_IMPORTED_MODULE_6__.values.space
21101
21102 break
21103 }
21104
21105 default: {
21106 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(typeof chunk === 'number', 'expected number')
21107 // Currently only replacement character.
21108 value = String.fromCharCode(chunk)
21109 }
21110 }
21111
21112 atTab = chunk === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_2__.codes.horizontalTab
21113 result.push(value)
21114 }
21115
21116 return result.join('')
21117 }
21118
21119
21120 /***/ }),
21121
21122 /***/ "../node_modules/micromark/dev/lib/initialize/content.js":
21123 /*!***************************************************************!*\
21124 !*** ../node_modules/micromark/dev/lib/initialize/content.js ***!
21125 \***************************************************************/
21126 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
21127
21128 "use strict";
21129 __webpack_require__.r(__webpack_exports__);
21130 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21131 /* harmony export */ "content": () => (/* binding */ content)
21132 /* harmony export */ });
21133 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
21134 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
21135 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
21136 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
21137 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
21138 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
21139 /**
21140 * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
21141 * @typedef {import('micromark-util-types').Initializer} Initializer
21142 * @typedef {import('micromark-util-types').Token} Token
21143 * @typedef {import('micromark-util-types').State} State
21144 */
21145
21146
21147
21148
21149
21150
21151
21152
21153 /** @type {InitialConstruct} */
21154 const content = {tokenize: initializeContent}
21155
21156 /** @type {Initializer} */
21157 function initializeContent(effects) {
21158 const contentStart = effects.attempt(
21159 this.parser.constructs.contentInitial,
21160 afterContentStartConstruct,
21161 paragraphInitial
21162 )
21163 /** @type {Token} */
21164 let previous
21165
21166 return contentStart
21167
21168 /** @type {State} */
21169 function afterContentStartConstruct(code) {
21170 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21171 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.markdownLineEnding)(code),
21172 'expected eol or eof'
21173 )
21174
21175 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
21176 effects.consume(code)
21177 return
21178 }
21179
21180 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.lineEnding)
21181 effects.consume(code)
21182 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.lineEnding)
21183 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_4__.factorySpace)(effects, contentStart, micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.linePrefix)
21184 }
21185
21186 /** @type {State} */
21187 function paragraphInitial(code) {
21188 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21189 code !== micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof && !(0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.markdownLineEnding)(code),
21190 'expected anything other than a line ending or EOF'
21191 )
21192 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.paragraph)
21193 return lineStart(code)
21194 }
21195
21196 /** @type {State} */
21197 function lineStart(code) {
21198 const token = effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.chunkText, {
21199 contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_5__.constants.contentTypeText,
21200 previous
21201 })
21202
21203 if (previous) {
21204 previous.next = token
21205 }
21206
21207 previous = token
21208
21209 return data(code)
21210 }
21211
21212 /** @type {State} */
21213 function data(code) {
21214 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_1__.codes.eof) {
21215 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.chunkText)
21216 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.paragraph)
21217 effects.consume(code)
21218 return
21219 }
21220
21221 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_2__.markdownLineEnding)(code)) {
21222 effects.consume(code)
21223 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_3__.types.chunkText)
21224 return lineStart
21225 }
21226
21227 // Data.
21228 effects.consume(code)
21229 return data
21230 }
21231 }
21232
21233
21234 /***/ }),
21235
21236 /***/ "../node_modules/micromark/dev/lib/initialize/document.js":
21237 /*!****************************************************************!*\
21238 !*** ../node_modules/micromark/dev/lib/initialize/document.js ***!
21239 \****************************************************************/
21240 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
21241
21242 "use strict";
21243 __webpack_require__.r(__webpack_exports__);
21244 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21245 /* harmony export */ "document": () => (/* binding */ document)
21246 /* harmony export */ });
21247 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
21248 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
21249 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
21250 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
21251 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
21252 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
21253 /* harmony import */ var micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-chunked */ "../node_modules/micromark-util-chunked/dev/index.js");
21254 /**
21255 * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
21256 * @typedef {import('micromark-util-types').Initializer} Initializer
21257 * @typedef {import('micromark-util-types').Construct} Construct
21258 * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
21259 * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
21260 * @typedef {import('micromark-util-types').Token} Token
21261 * @typedef {import('micromark-util-types').State} State
21262 * @typedef {import('micromark-util-types').Point} Point
21263 */
21264
21265 /**
21266 * @typedef {Record<string, unknown>} StackState
21267 * @typedef {[Construct, StackState]} StackItem
21268 */
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278 /** @type {InitialConstruct} */
21279 const document = {tokenize: initializeDocument}
21280
21281 /** @type {Construct} */
21282 const containerConstruct = {tokenize: tokenizeContainer}
21283
21284 /** @type {Initializer} */
21285 function initializeDocument(effects) {
21286 const self = this
21287 /** @type {Array<StackItem>} */
21288 const stack = []
21289 let continued = 0
21290 /** @type {TokenizeContext|undefined} */
21291 let childFlow
21292 /** @type {Token|undefined} */
21293 let childToken
21294 /** @type {number} */
21295 let lineStartOffset
21296
21297 return start
21298
21299 /** @type {State} */
21300 function start(code) {
21301 // First we iterate through the open blocks, starting with the root
21302 // document, and descending through last children down to the last open
21303 // block.
21304 // Each block imposes a condition that the line must satisfy if the block is
21305 // to remain open.
21306 // For example, a block quote requires a `>` character.
21307 // A paragraph requires a non-blank line.
21308 // In this phase we may match all or just some of the open blocks.
21309 // But we cannot close unmatched blocks yet, because we may have a lazy
21310 // continuation line.
21311 if (continued < stack.length) {
21312 const item = stack[continued]
21313 self.containerState = item[1]
21314 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21315 item[0].continuation,
21316 'expected `continuation` to be defined on container construct'
21317 )
21318 return effects.attempt(
21319 item[0].continuation,
21320 documentContinue,
21321 checkNewContainers
21322 )(code)
21323 }
21324
21325 // Done.
21326 return checkNewContainers(code)
21327 }
21328
21329 /** @type {State} */
21330 function documentContinue(code) {
21331 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21332 self.containerState,
21333 'expected `containerState` to be defined after continuation'
21334 )
21335
21336 continued++
21337
21338 // Note: this field is called `_closeFlow` but it also closes containers.
21339 // Perhaps a good idea to rename it but it’s already used in the wild by
21340 // extensions.
21341 if (self.containerState._closeFlow) {
21342 self.containerState._closeFlow = undefined
21343
21344 if (childFlow) {
21345 closeFlow()
21346 }
21347
21348 // Note: this algorithm for moving events around is similar to the
21349 // algorithm when dealing with lazy lines in `writeToChild`.
21350 const indexBeforeExits = self.events.length
21351 let indexBeforeFlow = indexBeforeExits
21352 /** @type {Point|undefined} */
21353 let point
21354
21355 // Find the flow chunk.
21356 while (indexBeforeFlow--) {
21357 if (
21358 self.events[indexBeforeFlow][0] === 'exit' &&
21359 self.events[indexBeforeFlow][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow
21360 ) {
21361 point = self.events[indexBeforeFlow][1].end
21362 break
21363 }
21364 }
21365
21366 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(point, 'could not find previous flow chunk')
21367
21368 exitContainers(continued)
21369
21370 // Fix positions.
21371 let index = indexBeforeExits
21372
21373 while (index < self.events.length) {
21374 self.events[index][1].end = Object.assign({}, point)
21375 index++
21376 }
21377
21378 // Inject the exits earlier (they’re still also at the end).
21379 (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.splice)(
21380 self.events,
21381 indexBeforeFlow + 1,
21382 0,
21383 self.events.slice(indexBeforeExits)
21384 )
21385
21386 // Discard the duplicate exits.
21387 self.events.length = index
21388
21389 return checkNewContainers(code)
21390 }
21391
21392 return start(code)
21393 }
21394
21395 /** @type {State} */
21396 function checkNewContainers(code) {
21397 // Next, after consuming the continuation markers for existing blocks, we
21398 // look for new block starts (e.g. `>` for a block quote).
21399 // If we encounter a new block start, we close any blocks unmatched in
21400 // step 1 before creating the new block as a child of the last matched
21401 // block.
21402 if (continued === stack.length) {
21403 // No need to `check` whether there’s a container, of `exitContainers`
21404 // would be moot.
21405 // We can instead immediately `attempt` to parse one.
21406 if (!childFlow) {
21407 return documentContinued(code)
21408 }
21409
21410 // If we have concrete content, such as block HTML or fenced code,
21411 // we can’t have containers “pierce” into them, so we can immediately
21412 // start.
21413 if (childFlow.currentConstruct && childFlow.currentConstruct.concrete) {
21414 return flowStart(code)
21415 }
21416
21417 // If we do have flow, it could still be a blank line,
21418 // but we’d be interrupting it w/ a new container if there’s a current
21419 // construct.
21420 self.interrupt = Boolean(
21421 childFlow.currentConstruct && !childFlow._gfmTableDynamicInterruptHack
21422 )
21423 }
21424
21425 // Check if there is a new container.
21426 self.containerState = {}
21427 return effects.check(
21428 containerConstruct,
21429 thereIsANewContainer,
21430 thereIsNoNewContainer
21431 )(code)
21432 }
21433
21434 /** @type {State} */
21435 function thereIsANewContainer(code) {
21436 if (childFlow) closeFlow()
21437 exitContainers(continued)
21438 return documentContinued(code)
21439 }
21440
21441 /** @type {State} */
21442 function thereIsNoNewContainer(code) {
21443 self.parser.lazy[self.now().line] = continued !== stack.length
21444 lineStartOffset = self.now().offset
21445 return flowStart(code)
21446 }
21447
21448 /** @type {State} */
21449 function documentContinued(code) {
21450 // Try new containers.
21451 self.containerState = {}
21452 return effects.attempt(
21453 containerConstruct,
21454 containerContinue,
21455 flowStart
21456 )(code)
21457 }
21458
21459 /** @type {State} */
21460 function containerContinue(code) {
21461 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21462 self.currentConstruct,
21463 'expected `currentConstruct` to be defined on tokenizer'
21464 )
21465 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21466 self.containerState,
21467 'expected `containerState` to be defined on tokenizer'
21468 )
21469 continued++
21470 stack.push([self.currentConstruct, self.containerState])
21471 // Try another.
21472 return documentContinued(code)
21473 }
21474
21475 /** @type {State} */
21476 function flowStart(code) {
21477 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof) {
21478 if (childFlow) closeFlow()
21479 exitContainers(0)
21480 effects.consume(code)
21481 return
21482 }
21483
21484 childFlow = childFlow || self.parser.flow(self.now())
21485 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow, {
21486 contentType: micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__.constants.contentTypeFlow,
21487 previous: childToken,
21488 _tokenizer: childFlow
21489 })
21490
21491 return flowContinue(code)
21492 }
21493
21494 /** @type {State} */
21495 function flowContinue(code) {
21496 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof) {
21497 writeToChild(effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow), true)
21498 exitContainers(0)
21499 effects.consume(code)
21500 return
21501 }
21502
21503 if ((0,micromark_util_character__WEBPACK_IMPORTED_MODULE_5__.markdownLineEnding)(code)) {
21504 effects.consume(code)
21505 writeToChild(effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow))
21506 // Get ready for the next line.
21507 continued = 0
21508 self.interrupt = undefined
21509 return start
21510 }
21511
21512 effects.consume(code)
21513 return flowContinue
21514 }
21515
21516 /**
21517 * @param {Token} token
21518 * @param {boolean} [eof]
21519 * @returns {void}
21520 */
21521 function writeToChild(token, eof) {
21522 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(childFlow, 'expected `childFlow` to be defined when continuing')
21523 const stream = self.sliceStream(token)
21524 if (eof) stream.push(null)
21525 token.previous = childToken
21526 if (childToken) childToken.next = token
21527 childToken = token
21528 childFlow.defineSkip(token.start)
21529 childFlow.write(stream)
21530
21531 // Alright, so we just added a lazy line:
21532 //
21533 // ```markdown
21534 // > a
21535 // b.
21536 //
21537 // Or:
21538 //
21539 // > ~~~c
21540 // d
21541 //
21542 // Or:
21543 //
21544 // > | e |
21545 // f
21546 // ```
21547 //
21548 // The construct in the second example (fenced code) does not accept lazy
21549 // lines, so it marked itself as done at the end of its first line, and
21550 // then the content construct parses `d`.
21551 // Most constructs in markdown match on the first line: if the first line
21552 // forms a construct, a non-lazy line can’t “unmake” it.
21553 //
21554 // The construct in the third example is potentially a GFM table, and
21555 // those are *weird*.
21556 // It *could* be a table, from the first line, if the following line
21557 // matches a condition.
21558 // In this case, that second line is lazy, which “unmakes” the first line
21559 // and turns the whole into one content block.
21560 //
21561 // We’ve now parsed the non-lazy and the lazy line, and can figure out
21562 // whether the lazy line started a new flow block.
21563 // If it did, we exit the current containers between the two flow blocks.
21564 if (self.parser.lazy[token.start.line]) {
21565 let index = childFlow.events.length
21566
21567 while (index--) {
21568 if (
21569 // The token starts before the line ending…
21570 childFlow.events[index][1].start.offset < lineStartOffset &&
21571 // …and either is not ended yet…
21572 (!childFlow.events[index][1].end ||
21573 // …or ends after it.
21574 childFlow.events[index][1].end.offset > lineStartOffset)
21575 ) {
21576 // Exit: there’s still something open, which means it’s a lazy line
21577 // part of something.
21578 return
21579 }
21580 }
21581
21582 // Note: this algorithm for moving events around is similar to the
21583 // algorithm when closing flow in `documentContinue`.
21584 const indexBeforeExits = self.events.length
21585 let indexBeforeFlow = indexBeforeExits
21586 /** @type {boolean|undefined} */
21587 let seen
21588 /** @type {Point|undefined} */
21589 let point
21590
21591 // Find the previous chunk (the one before the lazy line).
21592 while (indexBeforeFlow--) {
21593 if (
21594 self.events[indexBeforeFlow][0] === 'exit' &&
21595 self.events[indexBeforeFlow][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.chunkFlow
21596 ) {
21597 if (seen) {
21598 point = self.events[indexBeforeFlow][1].end
21599 break
21600 }
21601
21602 seen = true
21603 }
21604 }
21605
21606 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(point, 'could not find previous flow chunk')
21607
21608 exitContainers(continued)
21609
21610 // Fix positions.
21611 index = indexBeforeExits
21612
21613 while (index < self.events.length) {
21614 self.events[index][1].end = Object.assign({}, point)
21615 index++
21616 }
21617
21618 // Inject the exits earlier (they’re still also at the end).
21619 (0,micromark_util_chunked__WEBPACK_IMPORTED_MODULE_2__.splice)(
21620 self.events,
21621 indexBeforeFlow + 1,
21622 0,
21623 self.events.slice(indexBeforeExits)
21624 )
21625
21626 // Discard the duplicate exits.
21627 self.events.length = index
21628 }
21629 }
21630
21631 /**
21632 * @param {number} size
21633 * @returns {void}
21634 */
21635 function exitContainers(size) {
21636 let index = stack.length
21637
21638 // Exit open containers.
21639 while (index-- > size) {
21640 const entry = stack[index]
21641 self.containerState = entry[1]
21642 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21643 entry[0].exit,
21644 'expected `exit` to be defined on container construct'
21645 )
21646 entry[0].exit.call(self, effects)
21647 }
21648
21649 stack.length = size
21650 }
21651
21652 function closeFlow() {
21653 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21654 self.containerState,
21655 'expected `containerState` to be defined when closing flow'
21656 )
21657 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(childFlow, 'expected `childFlow` to be defined when closing it')
21658 childFlow.write([micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_3__.codes.eof])
21659 childToken = undefined
21660 childFlow = undefined
21661 self.containerState._closeFlow = undefined
21662 }
21663 }
21664
21665 /** @type {Tokenizer} */
21666 function tokenizeContainer(effects, ok, nok) {
21667 return (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_6__.factorySpace)(
21668 effects,
21669 effects.attempt(this.parser.constructs.document, ok, nok),
21670 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.linePrefix,
21671 this.parser.constructs.disable.null.includes('codeIndented')
21672 ? undefined
21673 : micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_4__.constants.tabSize
21674 )
21675 }
21676
21677
21678 /***/ }),
21679
21680 /***/ "../node_modules/micromark/dev/lib/initialize/flow.js":
21681 /*!************************************************************!*\
21682 !*** ../node_modules/micromark/dev/lib/initialize/flow.js ***!
21683 \************************************************************/
21684 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
21685
21686 "use strict";
21687 __webpack_require__.r(__webpack_exports__);
21688 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21689 /* harmony export */ "flow": () => (/* binding */ flow)
21690 /* harmony export */ });
21691 /* harmony import */ var uvu_assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uvu/assert */ "../node_modules/uvu/assert/index.mjs");
21692 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/blank-line.js");
21693 /* harmony import */ var micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! micromark-core-commonmark */ "../node_modules/micromark-core-commonmark/dev/lib/content.js");
21694 /* harmony import */ var micromark_factory_space__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-factory-space */ "../node_modules/micromark-factory-space/dev/index.js");
21695 /* harmony import */ var micromark_util_character__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! micromark-util-character */ "../node_modules/micromark-util-character/dev/index.js");
21696 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
21697 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
21698 /**
21699 * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
21700 * @typedef {import('micromark-util-types').Initializer} Initializer
21701 * @typedef {import('micromark-util-types').State} State
21702 */
21703
21704
21705
21706
21707
21708
21709
21710
21711 /** @type {InitialConstruct} */
21712 const flow = {tokenize: initializeFlow}
21713
21714 /** @type {Initializer} */
21715 function initializeFlow(effects) {
21716 const self = this
21717 const initial = effects.attempt(
21718 // Try to parse a blank line.
21719 micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_1__.blankLine,
21720 atBlankEnding,
21721 // Try to parse initial flow (essentially, only code).
21722 effects.attempt(
21723 this.parser.constructs.flowInitial,
21724 afterConstruct,
21725 (0,micromark_factory_space__WEBPACK_IMPORTED_MODULE_2__.factorySpace)(
21726 effects,
21727 effects.attempt(
21728 this.parser.constructs.flow,
21729 afterConstruct,
21730 effects.attempt(micromark_core_commonmark__WEBPACK_IMPORTED_MODULE_3__.content, afterConstruct)
21731 ),
21732 micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.linePrefix
21733 )
21734 )
21735 )
21736
21737 return initial
21738
21739 /** @type {State} */
21740 function atBlankEnding(code) {
21741 ;(0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21742 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_6__.markdownLineEnding)(code),
21743 'expected eol or eof'
21744 )
21745
21746 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.eof) {
21747 effects.consume(code)
21748 return
21749 }
21750
21751 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank)
21752 effects.consume(code)
21753 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEndingBlank)
21754 self.currentConstruct = undefined
21755 return initial
21756 }
21757
21758 /** @type {State} */
21759 function afterConstruct(code) {
21760 (0,uvu_assert__WEBPACK_IMPORTED_MODULE_0__.ok)(
21761 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.eof || (0,micromark_util_character__WEBPACK_IMPORTED_MODULE_6__.markdownLineEnding)(code),
21762 'expected eol or eof'
21763 )
21764
21765 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_5__.codes.eof) {
21766 effects.consume(code)
21767 return
21768 }
21769
21770 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding)
21771 effects.consume(code)
21772 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_4__.types.lineEnding)
21773 self.currentConstruct = undefined
21774 return initial
21775 }
21776 }
21777
21778
21779 /***/ }),
21780
21781 /***/ "../node_modules/micromark/dev/lib/initialize/text.js":
21782 /*!************************************************************!*\
21783 !*** ../node_modules/micromark/dev/lib/initialize/text.js ***!
21784 \************************************************************/
21785 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
21786
21787 "use strict";
21788 __webpack_require__.r(__webpack_exports__);
21789 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21790 /* harmony export */ "resolver": () => (/* binding */ resolver),
21791 /* harmony export */ "string": () => (/* binding */ string),
21792 /* harmony export */ "text": () => (/* binding */ text)
21793 /* harmony export */ });
21794 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
21795 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
21796 /* harmony import */ var micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/types.js */ "../node_modules/micromark-util-symbol/types.js");
21797 /**
21798 * @typedef {import('micromark-util-types').Resolver} Resolver
21799 * @typedef {import('micromark-util-types').Initializer} Initializer
21800 * @typedef {import('micromark-util-types').Construct} Construct
21801 * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
21802 * @typedef {import('micromark-util-types').State} State
21803 * @typedef {import('micromark-util-types').Code} Code
21804 */
21805
21806
21807
21808
21809
21810 const resolver = {resolveAll: createResolver()}
21811 const string = initializeFactory('string')
21812 const text = initializeFactory('text')
21813
21814 /**
21815 * @param {'string'|'text'} field
21816 * @returns {InitialConstruct}
21817 */
21818 function initializeFactory(field) {
21819 return {
21820 tokenize: initializeText,
21821 resolveAll: createResolver(
21822 field === 'text' ? resolveAllLineSuffixes : undefined
21823 )
21824 }
21825
21826 /** @type {Initializer} */
21827 function initializeText(effects) {
21828 const self = this
21829 const constructs = this.parser.constructs[field]
21830 const text = effects.attempt(constructs, start, notText)
21831
21832 return start
21833
21834 /** @type {State} */
21835 function start(code) {
21836 return atBreak(code) ? text(code) : notText(code)
21837 }
21838
21839 /** @type {State} */
21840 function notText(code) {
21841 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof) {
21842 effects.consume(code)
21843 return
21844 }
21845
21846 effects.enter(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data)
21847 effects.consume(code)
21848 return data
21849 }
21850
21851 /** @type {State} */
21852 function data(code) {
21853 if (atBreak(code)) {
21854 effects.exit(micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data)
21855 return text(code)
21856 }
21857
21858 // Data.
21859 effects.consume(code)
21860 return data
21861 }
21862
21863 /**
21864 * @param {Code} code
21865 * @returns {boolean}
21866 */
21867 function atBreak(code) {
21868 if (code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof) {
21869 return true
21870 }
21871
21872 const list = constructs[code]
21873 let index = -1
21874
21875 if (list) {
21876 while (++index < list.length) {
21877 const item = list[index]
21878 if (!item.previous || item.previous.call(self, self.previous)) {
21879 return true
21880 }
21881 }
21882 }
21883
21884 return false
21885 }
21886 }
21887 }
21888
21889 /**
21890 * @param {Resolver} [extraResolver]
21891 * @returns {Resolver}
21892 */
21893 function createResolver(extraResolver) {
21894 return resolveAllText
21895
21896 /** @type {Resolver} */
21897 function resolveAllText(events, context) {
21898 let index = -1
21899 /** @type {number|undefined} */
21900 let enter
21901
21902 // A rather boring computation (to merge adjacent `data` events) which
21903 // improves mm performance by 29%.
21904 while (++index <= events.length) {
21905 if (enter === undefined) {
21906 if (events[index] && events[index][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data) {
21907 enter = index
21908 index++
21909 }
21910 } else if (!events[index] || events[index][1].type !== micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data) {
21911 // Don’t do anything if there is one data token.
21912 if (index !== enter + 2) {
21913 events[enter][1].end = events[index - 1][1].end
21914 events.splice(enter + 2, index - enter - 2)
21915 index = enter + 2
21916 }
21917
21918 enter = undefined
21919 }
21920 }
21921
21922 return extraResolver ? extraResolver(events, context) : events
21923 }
21924 }
21925
21926 /**
21927 * A rather ugly set of instructions which again looks at chunks in the input
21928 * stream.
21929 * The reason to do this here is that it is *much* faster to parse in reverse.
21930 * And that we can’t hook into `null` to split the line suffix before an EOF.
21931 * To do: figure out if we can make this into a clean utility, or even in core.
21932 * As it will be useful for GFMs literal autolink extension (and maybe even
21933 * tables?)
21934 *
21935 * @type {Resolver}
21936 */
21937 function resolveAllLineSuffixes(events, context) {
21938 let eventIndex = 0 // Skip first.
21939
21940 while (++eventIndex <= events.length) {
21941 if (
21942 (eventIndex === events.length ||
21943 events[eventIndex][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineEnding) &&
21944 events[eventIndex - 1][1].type === micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.data
21945 ) {
21946 const data = events[eventIndex - 1][1]
21947 const chunks = context.sliceStream(data)
21948 let index = chunks.length
21949 let bufferIndex = -1
21950 let size = 0
21951 /** @type {boolean|undefined} */
21952 let tabs
21953
21954 while (index--) {
21955 const chunk = chunks[index]
21956
21957 if (typeof chunk === 'string') {
21958 bufferIndex = chunk.length
21959
21960 while (chunk.charCodeAt(bufferIndex - 1) === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.space) {
21961 size++
21962 bufferIndex--
21963 }
21964
21965 if (bufferIndex) break
21966 bufferIndex = -1
21967 }
21968 // Number
21969 else if (chunk === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.horizontalTab) {
21970 tabs = true
21971 size++
21972 } else if (chunk === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.virtualSpace) {
21973 // Empty
21974 } else {
21975 // Replacement character, exit.
21976 index++
21977 break
21978 }
21979 }
21980
21981 if (size) {
21982 const token = {
21983 type:
21984 eventIndex === events.length ||
21985 tabs ||
21986 size < micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_2__.constants.hardBreakPrefixSizeMin
21987 ? micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.lineSuffix
21988 : micromark_util_symbol_types_js__WEBPACK_IMPORTED_MODULE_1__.types.hardBreakTrailing,
21989 start: {
21990 line: data.end.line,
21991 column: data.end.column - size,
21992 offset: data.end.offset - size,
21993 _index: data.start._index + index,
21994 _bufferIndex: index
21995 ? bufferIndex
21996 : data.start._bufferIndex + bufferIndex
21997 },
21998 end: Object.assign({}, data.end)
21999 }
22000
22001 data.end = Object.assign({}, token.start)
22002
22003 if (data.start.offset === data.end.offset) {
22004 Object.assign(data, token)
22005 } else {
22006 events.splice(
22007 eventIndex,
22008 0,
22009 ['enter', token, context],
22010 ['exit', token, context]
22011 )
22012 eventIndex += 2
22013 }
22014 }
22015
22016 eventIndex++
22017 }
22018 }
22019
22020 return events
22021 }
22022
22023
22024 /***/ }),
22025
22026 /***/ "../node_modules/micromark/dev/lib/parse.js":
22027 /*!**************************************************!*\
22028 !*** ../node_modules/micromark/dev/lib/parse.js ***!
22029 \**************************************************/
22030 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22031
22032 "use strict";
22033 __webpack_require__.r(__webpack_exports__);
22034 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22035 /* harmony export */ "parse": () => (/* binding */ parse)
22036 /* harmony export */ });
22037 /* harmony import */ var micromark_util_combine_extensions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-combine-extensions */ "../node_modules/micromark-util-combine-extensions/index.js");
22038 /* harmony import */ var _initialize_content_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./initialize/content.js */ "../node_modules/micromark/dev/lib/initialize/content.js");
22039 /* harmony import */ var _initialize_document_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./initialize/document.js */ "../node_modules/micromark/dev/lib/initialize/document.js");
22040 /* harmony import */ var _initialize_flow_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./initialize/flow.js */ "../node_modules/micromark/dev/lib/initialize/flow.js");
22041 /* harmony import */ var _initialize_text_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./initialize/text.js */ "../node_modules/micromark/dev/lib/initialize/text.js");
22042 /* harmony import */ var _create_tokenizer_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./create-tokenizer.js */ "../node_modules/micromark/dev/lib/create-tokenizer.js");
22043 /* harmony import */ var _constructs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructs.js */ "../node_modules/micromark/dev/lib/constructs.js");
22044 /**
22045 * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
22046 * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension
22047 * @typedef {import('micromark-util-types').ParseOptions} ParseOptions
22048 * @typedef {import('micromark-util-types').ParseContext} ParseContext
22049 * @typedef {import('micromark-util-types').Create} Create
22050 */
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060 /**
22061 * @param {ParseOptions} [options]
22062 * @returns {ParseContext}
22063 */
22064 function parse(options = {}) {
22065 /** @type {FullNormalizedExtension} */
22066 // @ts-expect-error `defaultConstructs` is full, so the result will be too.
22067 const constructs = (0,micromark_util_combine_extensions__WEBPACK_IMPORTED_MODULE_0__.combineExtensions)(
22068 // @ts-expect-error Same as above.
22069 [_constructs_js__WEBPACK_IMPORTED_MODULE_1__].concat(options.extensions || [])
22070 )
22071 /** @type {ParseContext} */
22072 const parser = {
22073 defined: [],
22074 lazy: {},
22075 constructs,
22076 content: create(_initialize_content_js__WEBPACK_IMPORTED_MODULE_2__.content),
22077 document: create(_initialize_document_js__WEBPACK_IMPORTED_MODULE_3__.document),
22078 flow: create(_initialize_flow_js__WEBPACK_IMPORTED_MODULE_4__.flow),
22079 string: create(_initialize_text_js__WEBPACK_IMPORTED_MODULE_5__.string),
22080 text: create(_initialize_text_js__WEBPACK_IMPORTED_MODULE_5__.text)
22081 }
22082
22083 return parser
22084
22085 /**
22086 * @param {InitialConstruct} initial
22087 */
22088 function create(initial) {
22089 return creator
22090 /** @type {Create} */
22091 function creator(from) {
22092 return (0,_create_tokenizer_js__WEBPACK_IMPORTED_MODULE_6__.createTokenizer)(parser, initial, from)
22093 }
22094 }
22095 }
22096
22097
22098 /***/ }),
22099
22100 /***/ "../node_modules/micromark/dev/lib/postprocess.js":
22101 /*!********************************************************!*\
22102 !*** ../node_modules/micromark/dev/lib/postprocess.js ***!
22103 \********************************************************/
22104 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22105
22106 "use strict";
22107 __webpack_require__.r(__webpack_exports__);
22108 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22109 /* harmony export */ "postprocess": () => (/* binding */ postprocess)
22110 /* harmony export */ });
22111 /* harmony import */ var micromark_util_subtokenize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-subtokenize */ "../node_modules/micromark-util-subtokenize/dev/index.js");
22112 /**
22113 * @typedef {import('micromark-util-types').Event} Event
22114 */
22115
22116
22117
22118 /**
22119 * @param {Array<Event>} events
22120 * @returns {Array<Event>}
22121 */
22122 function postprocess(events) {
22123 while (!(0,micromark_util_subtokenize__WEBPACK_IMPORTED_MODULE_0__.subtokenize)(events)) {
22124 // Empty
22125 }
22126
22127 return events
22128 }
22129
22130
22131 /***/ }),
22132
22133 /***/ "../node_modules/micromark/dev/lib/preprocess.js":
22134 /*!*******************************************************!*\
22135 !*** ../node_modules/micromark/dev/lib/preprocess.js ***!
22136 \*******************************************************/
22137 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22138
22139 "use strict";
22140 __webpack_require__.r(__webpack_exports__);
22141 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22142 /* harmony export */ "preprocess": () => (/* binding */ preprocess)
22143 /* harmony export */ });
22144 /* harmony import */ var micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! micromark-util-symbol/codes.js */ "../node_modules/micromark-util-symbol/codes.js");
22145 /* harmony import */ var micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! micromark-util-symbol/constants.js */ "../node_modules/micromark-util-symbol/constants.js");
22146 /**
22147 * @typedef {import('micromark-util-types').Encoding} Encoding
22148 * @typedef {import('micromark-util-types').Value} Value
22149 * @typedef {import('micromark-util-types').Chunk} Chunk
22150 * @typedef {import('micromark-util-types').Code} Code
22151 */
22152
22153 /**
22154 * @callback Preprocessor
22155 * @param {Value} value
22156 * @param {Encoding} [encoding]
22157 * @param {boolean} [end=false]
22158 * @returns {Array<Chunk>}
22159 */
22160
22161
22162
22163
22164 const search = /[\0\t\n\r]/g
22165
22166 /**
22167 * @returns {Preprocessor}
22168 */
22169 function preprocess() {
22170 let column = 1
22171 let buffer = ''
22172 /** @type {boolean|undefined} */
22173 let start = true
22174 /** @type {boolean|undefined} */
22175 let atCarriageReturn
22176
22177 return preprocessor
22178
22179 /** @type {Preprocessor} */
22180 function preprocessor(value, encoding, end) {
22181 /** @type {Array<Chunk>} */
22182 const chunks = []
22183 /** @type {RegExpMatchArray|null} */
22184 let match
22185 /** @type {number} */
22186 let next
22187 /** @type {number} */
22188 let startPosition
22189 /** @type {number} */
22190 let endPosition
22191 /** @type {Code} */
22192 let code
22193
22194 // @ts-expect-error `Buffer` does allow an encoding.
22195 value = buffer + value.toString(encoding)
22196 startPosition = 0
22197 buffer = ''
22198
22199 if (start) {
22200 if (value.charCodeAt(0) === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.byteOrderMarker) {
22201 startPosition++
22202 }
22203
22204 start = undefined
22205 }
22206
22207 while (startPosition < value.length) {
22208 search.lastIndex = startPosition
22209 match = search.exec(value)
22210 endPosition =
22211 match && match.index !== undefined ? match.index : value.length
22212 code = value.charCodeAt(endPosition)
22213
22214 if (!match) {
22215 buffer = value.slice(startPosition)
22216 break
22217 }
22218
22219 if (
22220 code === micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lf &&
22221 startPosition === endPosition &&
22222 atCarriageReturn
22223 ) {
22224 chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturnLineFeed)
22225 atCarriageReturn = undefined
22226 } else {
22227 if (atCarriageReturn) {
22228 chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturn)
22229 atCarriageReturn = undefined
22230 }
22231
22232 if (startPosition < endPosition) {
22233 chunks.push(value.slice(startPosition, endPosition))
22234 column += endPosition - startPosition
22235 }
22236
22237 switch (code) {
22238 case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.nul: {
22239 chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.replacementCharacter)
22240 column++
22241
22242 break
22243 }
22244
22245 case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.ht: {
22246 next = Math.ceil(column / micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_1__.constants.tabSize) * micromark_util_symbol_constants_js__WEBPACK_IMPORTED_MODULE_1__.constants.tabSize
22247 chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.horizontalTab)
22248 while (column++ < next) chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.virtualSpace)
22249
22250 break
22251 }
22252
22253 case micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lf: {
22254 chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.lineFeed)
22255 column = 1
22256
22257 break
22258 }
22259
22260 default: {
22261 atCarriageReturn = true
22262 column = 1
22263 }
22264 }
22265 }
22266
22267 startPosition = endPosition + 1
22268 }
22269
22270 if (end) {
22271 if (atCarriageReturn) chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.carriageReturn)
22272 if (buffer) chunks.push(buffer)
22273 chunks.push(micromark_util_symbol_codes_js__WEBPACK_IMPORTED_MODULE_0__.codes.eof)
22274 }
22275
22276 return chunks
22277 }
22278 }
22279
22280
22281 /***/ }),
22282
22283 /***/ "../node_modules/property-information/index.js":
22284 /*!*****************************************************!*\
22285 !*** ../node_modules/property-information/index.js ***!
22286 \*****************************************************/
22287 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22288
22289 "use strict";
22290 __webpack_require__.r(__webpack_exports__);
22291 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22292 /* harmony export */ "find": () => (/* reexport safe */ _lib_find_js__WEBPACK_IMPORTED_MODULE_0__.find),
22293 /* harmony export */ "hastToReact": () => (/* reexport safe */ _lib_hast_to_react_js__WEBPACK_IMPORTED_MODULE_1__.hastToReact),
22294 /* harmony export */ "html": () => (/* binding */ html),
22295 /* harmony export */ "normalize": () => (/* reexport safe */ _lib_normalize_js__WEBPACK_IMPORTED_MODULE_2__.normalize),
22296 /* harmony export */ "svg": () => (/* binding */ svg)
22297 /* harmony export */ });
22298 /* harmony import */ var _lib_util_merge_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/util/merge.js */ "../node_modules/property-information/lib/util/merge.js");
22299 /* harmony import */ var _lib_xlink_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/xlink.js */ "../node_modules/property-information/lib/xlink.js");
22300 /* harmony import */ var _lib_xml_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/xml.js */ "../node_modules/property-information/lib/xml.js");
22301 /* harmony import */ var _lib_xmlns_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/xmlns.js */ "../node_modules/property-information/lib/xmlns.js");
22302 /* harmony import */ var _lib_aria_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./lib/aria.js */ "../node_modules/property-information/lib/aria.js");
22303 /* harmony import */ var _lib_html_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./lib/html.js */ "../node_modules/property-information/lib/html.js");
22304 /* harmony import */ var _lib_svg_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./lib/svg.js */ "../node_modules/property-information/lib/svg.js");
22305 /* harmony import */ var _lib_find_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/find.js */ "../node_modules/property-information/lib/find.js");
22306 /* harmony import */ var _lib_hast_to_react_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/hast-to-react.js */ "../node_modules/property-information/lib/hast-to-react.js");
22307 /* harmony import */ var _lib_normalize_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/normalize.js */ "../node_modules/property-information/lib/normalize.js");
22308 /**
22309 * @typedef {import('./lib/util/info.js').Info} Info
22310 * @typedef {import('./lib/util/schema.js').Schema} Schema
22311 */
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324 const html = (0,_lib_util_merge_js__WEBPACK_IMPORTED_MODULE_3__.merge)([_lib_xml_js__WEBPACK_IMPORTED_MODULE_4__.xml, _lib_xlink_js__WEBPACK_IMPORTED_MODULE_5__.xlink, _lib_xmlns_js__WEBPACK_IMPORTED_MODULE_6__.xmlns, _lib_aria_js__WEBPACK_IMPORTED_MODULE_7__.aria, _lib_html_js__WEBPACK_IMPORTED_MODULE_8__.html], 'html')
22325 const svg = (0,_lib_util_merge_js__WEBPACK_IMPORTED_MODULE_3__.merge)([_lib_xml_js__WEBPACK_IMPORTED_MODULE_4__.xml, _lib_xlink_js__WEBPACK_IMPORTED_MODULE_5__.xlink, _lib_xmlns_js__WEBPACK_IMPORTED_MODULE_6__.xmlns, _lib_aria_js__WEBPACK_IMPORTED_MODULE_7__.aria, _lib_svg_js__WEBPACK_IMPORTED_MODULE_9__.svg], 'svg')
22326
22327
22328 /***/ }),
22329
22330 /***/ "../node_modules/property-information/lib/aria.js":
22331 /*!********************************************************!*\
22332 !*** ../node_modules/property-information/lib/aria.js ***!
22333 \********************************************************/
22334 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22335
22336 "use strict";
22337 __webpack_require__.r(__webpack_exports__);
22338 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22339 /* harmony export */ "aria": () => (/* binding */ aria)
22340 /* harmony export */ });
22341 /* harmony import */ var _util_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/types.js */ "../node_modules/property-information/lib/util/types.js");
22342 /* harmony import */ var _util_create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/create.js */ "../node_modules/property-information/lib/util/create.js");
22343
22344
22345
22346 const aria = (0,_util_create_js__WEBPACK_IMPORTED_MODULE_0__.create)({
22347 transform(_, prop) {
22348 return prop === 'role' ? prop : 'aria-' + prop.slice(4).toLowerCase()
22349 },
22350 properties: {
22351 ariaActiveDescendant: null,
22352 ariaAtomic: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22353 ariaAutoComplete: null,
22354 ariaBusy: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22355 ariaChecked: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22356 ariaColCount: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22357 ariaColIndex: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22358 ariaColSpan: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22359 ariaControls: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
22360 ariaCurrent: null,
22361 ariaDescribedBy: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
22362 ariaDetails: null,
22363 ariaDisabled: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22364 ariaDropEffect: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
22365 ariaErrorMessage: null,
22366 ariaExpanded: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22367 ariaFlowTo: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
22368 ariaGrabbed: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22369 ariaHasPopup: null,
22370 ariaHidden: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22371 ariaInvalid: null,
22372 ariaKeyShortcuts: null,
22373 ariaLabel: null,
22374 ariaLabelledBy: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
22375 ariaLevel: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22376 ariaLive: null,
22377 ariaModal: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22378 ariaMultiLine: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22379 ariaMultiSelectable: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22380 ariaOrientation: null,
22381 ariaOwns: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
22382 ariaPlaceholder: null,
22383 ariaPosInSet: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22384 ariaPressed: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22385 ariaReadOnly: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22386 ariaRelevant: null,
22387 ariaRequired: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22388 ariaRoleDescription: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.spaceSeparated,
22389 ariaRowCount: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22390 ariaRowIndex: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22391 ariaRowSpan: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22392 ariaSelected: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.booleanish,
22393 ariaSetSize: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22394 ariaSort: null,
22395 ariaValueMax: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22396 ariaValueMin: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22397 ariaValueNow: _util_types_js__WEBPACK_IMPORTED_MODULE_1__.number,
22398 ariaValueText: null,
22399 role: null
22400 }
22401 })
22402
22403
22404 /***/ }),
22405
22406 /***/ "../node_modules/property-information/lib/find.js":
22407 /*!********************************************************!*\
22408 !*** ../node_modules/property-information/lib/find.js ***!
22409 \********************************************************/
22410 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22411
22412 "use strict";
22413 __webpack_require__.r(__webpack_exports__);
22414 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22415 /* harmony export */ "find": () => (/* binding */ find)
22416 /* harmony export */ });
22417 /* harmony import */ var _normalize_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./normalize.js */ "../node_modules/property-information/lib/normalize.js");
22418 /* harmony import */ var _util_defined_info_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/defined-info.js */ "../node_modules/property-information/lib/util/defined-info.js");
22419 /* harmony import */ var _util_info_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/info.js */ "../node_modules/property-information/lib/util/info.js");
22420 /**
22421 * @typedef {import('./util/schema.js').Schema} Schema
22422 */
22423
22424
22425
22426
22427
22428 const valid = /^data[-\w.:]+$/i
22429 const dash = /-[a-z]/g
22430 const cap = /[A-Z]/g
22431
22432 /**
22433 * @param {Schema} schema
22434 * @param {string} value
22435 * @returns {Info}
22436 */
22437 function find(schema, value) {
22438 const normal = (0,_normalize_js__WEBPACK_IMPORTED_MODULE_0__.normalize)(value)
22439 let prop = value
22440 let Type = _util_info_js__WEBPACK_IMPORTED_MODULE_1__.Info
22441
22442 if (normal in schema.normal) {
22443 return schema.property[schema.normal[normal]]
22444 }
22445
22446 if (normal.length > 4 && normal.slice(0, 4) === 'data' && valid.test(value)) {
22447 // Attribute or property.
22448 if (value.charAt(4) === '-') {
22449 // Turn it into a property.
22450 const rest = value.slice(5).replace(dash, camelcase)
22451 prop = 'data' + rest.charAt(0).toUpperCase() + rest.slice(1)
22452 } else {
22453 // Turn it into an attribute.
22454 const rest = value.slice(4)
22455
22456 if (!dash.test(rest)) {
22457 let dashes = rest.replace(cap, kebab)
22458
22459 if (dashes.charAt(0) !== '-') {
22460 dashes = '-' + dashes
22461 }
22462
22463 value = 'data' + dashes
22464 }
22465 }
22466
22467 Type = _util_defined_info_js__WEBPACK_IMPORTED_MODULE_2__.DefinedInfo
22468 }
22469
22470 return new Type(prop, value)
22471 }
22472
22473 /**
22474 * @param {string} $0
22475 * @returns {string}
22476 */
22477 function kebab($0) {
22478 return '-' + $0.toLowerCase()
22479 }
22480
22481 /**
22482 * @param {string} $0
22483 * @returns {string}
22484 */
22485 function camelcase($0) {
22486 return $0.charAt(1).toUpperCase()
22487 }
22488
22489
22490 /***/ }),
22491
22492 /***/ "../node_modules/property-information/lib/hast-to-react.js":
22493 /*!*****************************************************************!*\
22494 !*** ../node_modules/property-information/lib/hast-to-react.js ***!
22495 \*****************************************************************/
22496 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22497
22498 "use strict";
22499 __webpack_require__.r(__webpack_exports__);
22500 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22501 /* harmony export */ "hastToReact": () => (/* binding */ hastToReact)
22502 /* harmony export */ });
22503 /**
22504 * `hast` is close to `React`, but differs in a couple of cases.
22505 *
22506 * To get a React property from a hast property, check if it is in
22507 * `hastToReact`, if it is, then use the corresponding value,
22508 * otherwise, use the hast property.
22509 *
22510 * @type {Record<string, string>}
22511 */
22512 const hastToReact = {
22513 classId: 'classID',
22514 dataType: 'datatype',
22515 itemId: 'itemID',
22516 strokeDashArray: 'strokeDasharray',
22517 strokeDashOffset: 'strokeDashoffset',
22518 strokeLineCap: 'strokeLinecap',
22519 strokeLineJoin: 'strokeLinejoin',
22520 strokeMiterLimit: 'strokeMiterlimit',
22521 typeOf: 'typeof',
22522 xLinkActuate: 'xlinkActuate',
22523 xLinkArcRole: 'xlinkArcrole',
22524 xLinkHref: 'xlinkHref',
22525 xLinkRole: 'xlinkRole',
22526 xLinkShow: 'xlinkShow',
22527 xLinkTitle: 'xlinkTitle',
22528 xLinkType: 'xlinkType',
22529 xmlnsXLink: 'xmlnsXlink'
22530 }
22531
22532
22533 /***/ }),
22534
22535 /***/ "../node_modules/property-information/lib/html.js":
22536 /*!********************************************************!*\
22537 !*** ../node_modules/property-information/lib/html.js ***!
22538 \********************************************************/
22539 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22540
22541 "use strict";
22542 __webpack_require__.r(__webpack_exports__);
22543 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22544 /* harmony export */ "html": () => (/* binding */ html)
22545 /* harmony export */ });
22546 /* harmony import */ var _util_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/types.js */ "../node_modules/property-information/lib/util/types.js");
22547 /* harmony import */ var _util_create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/create.js */ "../node_modules/property-information/lib/util/create.js");
22548 /* harmony import */ var _util_case_insensitive_transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/case-insensitive-transform.js */ "../node_modules/property-information/lib/util/case-insensitive-transform.js");
22549
22550
22551
22552
22553 const html = (0,_util_create_js__WEBPACK_IMPORTED_MODULE_0__.create)({
22554 space: 'html',
22555 attributes: {
22556 acceptcharset: 'accept-charset',
22557 classname: 'class',
22558 htmlfor: 'for',
22559 httpequiv: 'http-equiv'
22560 },
22561 transform: _util_case_insensitive_transform_js__WEBPACK_IMPORTED_MODULE_1__.caseInsensitiveTransform,
22562 mustUseProperty: ['checked', 'multiple', 'muted', 'selected'],
22563 properties: {
22564 // Standard Properties.
22565 abbr: null,
22566 accept: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
22567 acceptCharset: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22568 accessKey: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22569 action: null,
22570 allow: null,
22571 allowFullScreen: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22572 allowPaymentRequest: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22573 allowUserMedia: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22574 alt: null,
22575 as: null,
22576 async: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22577 autoCapitalize: null,
22578 autoComplete: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22579 autoFocus: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22580 autoPlay: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22581 capture: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22582 charSet: null,
22583 checked: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22584 cite: null,
22585 className: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22586 cols: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22587 colSpan: null,
22588 content: null,
22589 contentEditable: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish,
22590 controls: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22591 controlsList: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22592 coords: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number | _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
22593 crossOrigin: null,
22594 data: null,
22595 dateTime: null,
22596 decoding: null,
22597 default: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22598 defer: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22599 dir: null,
22600 dirName: null,
22601 disabled: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22602 download: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.overloadedBoolean,
22603 draggable: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish,
22604 encType: null,
22605 enterKeyHint: null,
22606 form: null,
22607 formAction: null,
22608 formEncType: null,
22609 formMethod: null,
22610 formNoValidate: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22611 formTarget: null,
22612 headers: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22613 height: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22614 hidden: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22615 high: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22616 href: null,
22617 hrefLang: null,
22618 htmlFor: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22619 httpEquiv: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22620 id: null,
22621 imageSizes: null,
22622 imageSrcSet: null,
22623 inputMode: null,
22624 integrity: null,
22625 is: null,
22626 isMap: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22627 itemId: null,
22628 itemProp: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22629 itemRef: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22630 itemScope: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22631 itemType: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22632 kind: null,
22633 label: null,
22634 lang: null,
22635 language: null,
22636 list: null,
22637 loading: null,
22638 loop: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22639 low: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22640 manifest: null,
22641 max: null,
22642 maxLength: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22643 media: null,
22644 method: null,
22645 min: null,
22646 minLength: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22647 multiple: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22648 muted: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22649 name: null,
22650 nonce: null,
22651 noModule: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22652 noValidate: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22653 onAbort: null,
22654 onAfterPrint: null,
22655 onAuxClick: null,
22656 onBeforeMatch: null,
22657 onBeforePrint: null,
22658 onBeforeUnload: null,
22659 onBlur: null,
22660 onCancel: null,
22661 onCanPlay: null,
22662 onCanPlayThrough: null,
22663 onChange: null,
22664 onClick: null,
22665 onClose: null,
22666 onContextLost: null,
22667 onContextMenu: null,
22668 onContextRestored: null,
22669 onCopy: null,
22670 onCueChange: null,
22671 onCut: null,
22672 onDblClick: null,
22673 onDrag: null,
22674 onDragEnd: null,
22675 onDragEnter: null,
22676 onDragExit: null,
22677 onDragLeave: null,
22678 onDragOver: null,
22679 onDragStart: null,
22680 onDrop: null,
22681 onDurationChange: null,
22682 onEmptied: null,
22683 onEnded: null,
22684 onError: null,
22685 onFocus: null,
22686 onFormData: null,
22687 onHashChange: null,
22688 onInput: null,
22689 onInvalid: null,
22690 onKeyDown: null,
22691 onKeyPress: null,
22692 onKeyUp: null,
22693 onLanguageChange: null,
22694 onLoad: null,
22695 onLoadedData: null,
22696 onLoadedMetadata: null,
22697 onLoadEnd: null,
22698 onLoadStart: null,
22699 onMessage: null,
22700 onMessageError: null,
22701 onMouseDown: null,
22702 onMouseEnter: null,
22703 onMouseLeave: null,
22704 onMouseMove: null,
22705 onMouseOut: null,
22706 onMouseOver: null,
22707 onMouseUp: null,
22708 onOffline: null,
22709 onOnline: null,
22710 onPageHide: null,
22711 onPageShow: null,
22712 onPaste: null,
22713 onPause: null,
22714 onPlay: null,
22715 onPlaying: null,
22716 onPopState: null,
22717 onProgress: null,
22718 onRateChange: null,
22719 onRejectionHandled: null,
22720 onReset: null,
22721 onResize: null,
22722 onScroll: null,
22723 onScrollEnd: null,
22724 onSecurityPolicyViolation: null,
22725 onSeeked: null,
22726 onSeeking: null,
22727 onSelect: null,
22728 onSlotChange: null,
22729 onStalled: null,
22730 onStorage: null,
22731 onSubmit: null,
22732 onSuspend: null,
22733 onTimeUpdate: null,
22734 onToggle: null,
22735 onUnhandledRejection: null,
22736 onUnload: null,
22737 onVolumeChange: null,
22738 onWaiting: null,
22739 onWheel: null,
22740 open: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22741 optimum: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22742 pattern: null,
22743 ping: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22744 placeholder: null,
22745 playsInline: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22746 poster: null,
22747 preload: null,
22748 readOnly: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22749 referrerPolicy: null,
22750 rel: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22751 required: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22752 reversed: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22753 rows: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22754 rowSpan: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22755 sandbox: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
22756 scope: null,
22757 scoped: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22758 seamless: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22759 selected: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22760 shape: null,
22761 size: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22762 sizes: null,
22763 slot: null,
22764 span: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22765 spellCheck: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish,
22766 src: null,
22767 srcDoc: null,
22768 srcLang: null,
22769 srcSet: null,
22770 start: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22771 step: null,
22772 style: null,
22773 tabIndex: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22774 target: null,
22775 title: null,
22776 translate: null,
22777 type: null,
22778 typeMustMatch: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22779 useMap: null,
22780 value: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish,
22781 width: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22782 wrap: null,
22783
22784 // Legacy.
22785 // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
22786 align: null, // Several. Use CSS `text-align` instead,
22787 aLink: null, // `<body>`. Use CSS `a:active {color}` instead
22788 archive: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated, // `<object>`. List of URIs to archives
22789 axis: null, // `<td>` and `<th>`. Use `scope` on `<th>`
22790 background: null, // `<body>`. Use CSS `background-image` instead
22791 bgColor: null, // `<body>` and table elements. Use CSS `background-color` instead
22792 border: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<table>`. Use CSS `border-width` instead,
22793 borderColor: null, // `<table>`. Use CSS `border-color` instead,
22794 bottomMargin: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<body>`
22795 cellPadding: null, // `<table>`
22796 cellSpacing: null, // `<table>`
22797 char: null, // Several table elements. When `align=char`, sets the character to align on
22798 charOff: null, // Several table elements. When `char`, offsets the alignment
22799 classId: null, // `<object>`
22800 clear: null, // `<br>`. Use CSS `clear` instead
22801 code: null, // `<object>`
22802 codeBase: null, // `<object>`
22803 codeType: null, // `<object>`
22804 color: null, // `<font>` and `<hr>`. Use CSS instead
22805 compact: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean, // Lists. Use CSS to reduce space between items instead
22806 declare: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean, // `<object>`
22807 event: null, // `<script>`
22808 face: null, // `<font>`. Use CSS instead
22809 frame: null, // `<table>`
22810 frameBorder: null, // `<iframe>`. Use CSS `border` instead
22811 hSpace: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<img>` and `<object>`
22812 leftMargin: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<body>`
22813 link: null, // `<body>`. Use CSS `a:link {color: *}` instead
22814 longDesc: null, // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
22815 lowSrc: null, // `<img>`. Use a `<picture>`
22816 marginHeight: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<body>`
22817 marginWidth: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<body>`
22818 noResize: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean, // `<frame>`
22819 noHref: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean, // `<area>`. Use no href instead of an explicit `nohref`
22820 noShade: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean, // `<hr>`. Use background-color and height instead of borders
22821 noWrap: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean, // `<td>` and `<th>`
22822 object: null, // `<applet>`
22823 profile: null, // `<head>`
22824 prompt: null, // `<isindex>`
22825 rev: null, // `<link>`
22826 rightMargin: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<body>`
22827 rules: null, // `<table>`
22828 scheme: null, // `<meta>`
22829 scrolling: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.booleanish, // `<frame>`. Use overflow in the child context
22830 standby: null, // `<object>`
22831 summary: null, // `<table>`
22832 text: null, // `<body>`. Use CSS `color` instead
22833 topMargin: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<body>`
22834 valueType: null, // `<param>`
22835 version: null, // `<html>`. Use a doctype.
22836 vAlign: null, // Several. Use CSS `vertical-align` instead
22837 vLink: null, // `<body>`. Use CSS `a:visited {color}` instead
22838 vSpace: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number, // `<img>` and `<object>`
22839
22840 // Non-standard Properties.
22841 allowTransparency: null,
22842 autoCorrect: null,
22843 autoSave: null,
22844 disablePictureInPicture: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22845 disableRemotePlayback: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
22846 prefix: null,
22847 property: null,
22848 results: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
22849 security: null,
22850 unselectable: null
22851 }
22852 })
22853
22854
22855 /***/ }),
22856
22857 /***/ "../node_modules/property-information/lib/normalize.js":
22858 /*!*************************************************************!*\
22859 !*** ../node_modules/property-information/lib/normalize.js ***!
22860 \*************************************************************/
22861 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22862
22863 "use strict";
22864 __webpack_require__.r(__webpack_exports__);
22865 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22866 /* harmony export */ "normalize": () => (/* binding */ normalize)
22867 /* harmony export */ });
22868 /**
22869 * @param {string} value
22870 * @returns {string}
22871 */
22872 function normalize(value) {
22873 return value.toLowerCase()
22874 }
22875
22876
22877 /***/ }),
22878
22879 /***/ "../node_modules/property-information/lib/svg.js":
22880 /*!*******************************************************!*\
22881 !*** ../node_modules/property-information/lib/svg.js ***!
22882 \*******************************************************/
22883 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
22884
22885 "use strict";
22886 __webpack_require__.r(__webpack_exports__);
22887 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22888 /* harmony export */ "svg": () => (/* binding */ svg)
22889 /* harmony export */ });
22890 /* harmony import */ var _util_types_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util/types.js */ "../node_modules/property-information/lib/util/types.js");
22891 /* harmony import */ var _util_create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/create.js */ "../node_modules/property-information/lib/util/create.js");
22892 /* harmony import */ var _util_case_sensitive_transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/case-sensitive-transform.js */ "../node_modules/property-information/lib/util/case-sensitive-transform.js");
22893
22894
22895
22896
22897 const svg = (0,_util_create_js__WEBPACK_IMPORTED_MODULE_0__.create)({
22898 space: 'svg',
22899 attributes: {
22900 accentHeight: 'accent-height',
22901 alignmentBaseline: 'alignment-baseline',
22902 arabicForm: 'arabic-form',
22903 baselineShift: 'baseline-shift',
22904 capHeight: 'cap-height',
22905 className: 'class',
22906 clipPath: 'clip-path',
22907 clipRule: 'clip-rule',
22908 colorInterpolation: 'color-interpolation',
22909 colorInterpolationFilters: 'color-interpolation-filters',
22910 colorProfile: 'color-profile',
22911 colorRendering: 'color-rendering',
22912 crossOrigin: 'crossorigin',
22913 dataType: 'datatype',
22914 dominantBaseline: 'dominant-baseline',
22915 enableBackground: 'enable-background',
22916 fillOpacity: 'fill-opacity',
22917 fillRule: 'fill-rule',
22918 floodColor: 'flood-color',
22919 floodOpacity: 'flood-opacity',
22920 fontFamily: 'font-family',
22921 fontSize: 'font-size',
22922 fontSizeAdjust: 'font-size-adjust',
22923 fontStretch: 'font-stretch',
22924 fontStyle: 'font-style',
22925 fontVariant: 'font-variant',
22926 fontWeight: 'font-weight',
22927 glyphName: 'glyph-name',
22928 glyphOrientationHorizontal: 'glyph-orientation-horizontal',
22929 glyphOrientationVertical: 'glyph-orientation-vertical',
22930 hrefLang: 'hreflang',
22931 horizAdvX: 'horiz-adv-x',
22932 horizOriginX: 'horiz-origin-x',
22933 horizOriginY: 'horiz-origin-y',
22934 imageRendering: 'image-rendering',
22935 letterSpacing: 'letter-spacing',
22936 lightingColor: 'lighting-color',
22937 markerEnd: 'marker-end',
22938 markerMid: 'marker-mid',
22939 markerStart: 'marker-start',
22940 navDown: 'nav-down',
22941 navDownLeft: 'nav-down-left',
22942 navDownRight: 'nav-down-right',
22943 navLeft: 'nav-left',
22944 navNext: 'nav-next',
22945 navPrev: 'nav-prev',
22946 navRight: 'nav-right',
22947 navUp: 'nav-up',
22948 navUpLeft: 'nav-up-left',
22949 navUpRight: 'nav-up-right',
22950 onAbort: 'onabort',
22951 onActivate: 'onactivate',
22952 onAfterPrint: 'onafterprint',
22953 onBeforePrint: 'onbeforeprint',
22954 onBegin: 'onbegin',
22955 onCancel: 'oncancel',
22956 onCanPlay: 'oncanplay',
22957 onCanPlayThrough: 'oncanplaythrough',
22958 onChange: 'onchange',
22959 onClick: 'onclick',
22960 onClose: 'onclose',
22961 onCopy: 'oncopy',
22962 onCueChange: 'oncuechange',
22963 onCut: 'oncut',
22964 onDblClick: 'ondblclick',
22965 onDrag: 'ondrag',
22966 onDragEnd: 'ondragend',
22967 onDragEnter: 'ondragenter',
22968 onDragExit: 'ondragexit',
22969 onDragLeave: 'ondragleave',
22970 onDragOver: 'ondragover',
22971 onDragStart: 'ondragstart',
22972 onDrop: 'ondrop',
22973 onDurationChange: 'ondurationchange',
22974 onEmptied: 'onemptied',
22975 onEnd: 'onend',
22976 onEnded: 'onended',
22977 onError: 'onerror',
22978 onFocus: 'onfocus',
22979 onFocusIn: 'onfocusin',
22980 onFocusOut: 'onfocusout',
22981 onHashChange: 'onhashchange',
22982 onInput: 'oninput',
22983 onInvalid: 'oninvalid',
22984 onKeyDown: 'onkeydown',
22985 onKeyPress: 'onkeypress',
22986 onKeyUp: 'onkeyup',
22987 onLoad: 'onload',
22988 onLoadedData: 'onloadeddata',
22989 onLoadedMetadata: 'onloadedmetadata',
22990 onLoadStart: 'onloadstart',
22991 onMessage: 'onmessage',
22992 onMouseDown: 'onmousedown',
22993 onMouseEnter: 'onmouseenter',
22994 onMouseLeave: 'onmouseleave',
22995 onMouseMove: 'onmousemove',
22996 onMouseOut: 'onmouseout',
22997 onMouseOver: 'onmouseover',
22998 onMouseUp: 'onmouseup',
22999 onMouseWheel: 'onmousewheel',
23000 onOffline: 'onoffline',
23001 onOnline: 'ononline',
23002 onPageHide: 'onpagehide',
23003 onPageShow: 'onpageshow',
23004 onPaste: 'onpaste',
23005 onPause: 'onpause',
23006 onPlay: 'onplay',
23007 onPlaying: 'onplaying',
23008 onPopState: 'onpopstate',
23009 onProgress: 'onprogress',
23010 onRateChange: 'onratechange',
23011 onRepeat: 'onrepeat',
23012 onReset: 'onreset',
23013 onResize: 'onresize',
23014 onScroll: 'onscroll',
23015 onSeeked: 'onseeked',
23016 onSeeking: 'onseeking',
23017 onSelect: 'onselect',
23018 onShow: 'onshow',
23019 onStalled: 'onstalled',
23020 onStorage: 'onstorage',
23021 onSubmit: 'onsubmit',
23022 onSuspend: 'onsuspend',
23023 onTimeUpdate: 'ontimeupdate',
23024 onToggle: 'ontoggle',
23025 onUnload: 'onunload',
23026 onVolumeChange: 'onvolumechange',
23027 onWaiting: 'onwaiting',
23028 onZoom: 'onzoom',
23029 overlinePosition: 'overline-position',
23030 overlineThickness: 'overline-thickness',
23031 paintOrder: 'paint-order',
23032 panose1: 'panose-1',
23033 pointerEvents: 'pointer-events',
23034 referrerPolicy: 'referrerpolicy',
23035 renderingIntent: 'rendering-intent',
23036 shapeRendering: 'shape-rendering',
23037 stopColor: 'stop-color',
23038 stopOpacity: 'stop-opacity',
23039 strikethroughPosition: 'strikethrough-position',
23040 strikethroughThickness: 'strikethrough-thickness',
23041 strokeDashArray: 'stroke-dasharray',
23042 strokeDashOffset: 'stroke-dashoffset',
23043 strokeLineCap: 'stroke-linecap',
23044 strokeLineJoin: 'stroke-linejoin',
23045 strokeMiterLimit: 'stroke-miterlimit',
23046 strokeOpacity: 'stroke-opacity',
23047 strokeWidth: 'stroke-width',
23048 tabIndex: 'tabindex',
23049 textAnchor: 'text-anchor',
23050 textDecoration: 'text-decoration',
23051 textRendering: 'text-rendering',
23052 typeOf: 'typeof',
23053 underlinePosition: 'underline-position',
23054 underlineThickness: 'underline-thickness',
23055 unicodeBidi: 'unicode-bidi',
23056 unicodeRange: 'unicode-range',
23057 unitsPerEm: 'units-per-em',
23058 vAlphabetic: 'v-alphabetic',
23059 vHanging: 'v-hanging',
23060 vIdeographic: 'v-ideographic',
23061 vMathematical: 'v-mathematical',
23062 vectorEffect: 'vector-effect',
23063 vertAdvY: 'vert-adv-y',
23064 vertOriginX: 'vert-origin-x',
23065 vertOriginY: 'vert-origin-y',
23066 wordSpacing: 'word-spacing',
23067 writingMode: 'writing-mode',
23068 xHeight: 'x-height',
23069 // These were camelcased in Tiny. Now lowercased in SVG 2
23070 playbackOrder: 'playbackorder',
23071 timelineBegin: 'timelinebegin'
23072 },
23073 transform: _util_case_sensitive_transform_js__WEBPACK_IMPORTED_MODULE_1__.caseSensitiveTransform,
23074 properties: {
23075 about: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23076 accentHeight: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23077 accumulate: null,
23078 additive: null,
23079 alignmentBaseline: null,
23080 alphabetic: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23081 amplitude: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23082 arabicForm: null,
23083 ascent: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23084 attributeName: null,
23085 attributeType: null,
23086 azimuth: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23087 bandwidth: null,
23088 baselineShift: null,
23089 baseFrequency: null,
23090 baseProfile: null,
23091 bbox: null,
23092 begin: null,
23093 bias: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23094 by: null,
23095 calcMode: null,
23096 capHeight: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23097 className: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
23098 clip: null,
23099 clipPath: null,
23100 clipPathUnits: null,
23101 clipRule: null,
23102 color: null,
23103 colorInterpolation: null,
23104 colorInterpolationFilters: null,
23105 colorProfile: null,
23106 colorRendering: null,
23107 content: null,
23108 contentScriptType: null,
23109 contentStyleType: null,
23110 crossOrigin: null,
23111 cursor: null,
23112 cx: null,
23113 cy: null,
23114 d: null,
23115 dataType: null,
23116 defaultAction: null,
23117 descent: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23118 diffuseConstant: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23119 direction: null,
23120 display: null,
23121 dur: null,
23122 divisor: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23123 dominantBaseline: null,
23124 download: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.boolean,
23125 dx: null,
23126 dy: null,
23127 edgeMode: null,
23128 editable: null,
23129 elevation: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23130 enableBackground: null,
23131 end: null,
23132 event: null,
23133 exponent: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23134 externalResourcesRequired: null,
23135 fill: null,
23136 fillOpacity: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23137 fillRule: null,
23138 filter: null,
23139 filterRes: null,
23140 filterUnits: null,
23141 floodColor: null,
23142 floodOpacity: null,
23143 focusable: null,
23144 focusHighlight: null,
23145 fontFamily: null,
23146 fontSize: null,
23147 fontSizeAdjust: null,
23148 fontStretch: null,
23149 fontStyle: null,
23150 fontVariant: null,
23151 fontWeight: null,
23152 format: null,
23153 fr: null,
23154 from: null,
23155 fx: null,
23156 fy: null,
23157 g1: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
23158 g2: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
23159 glyphName: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaSeparated,
23160 glyphOrientationHorizontal: null,
23161 glyphOrientationVertical: null,
23162 glyphRef: null,
23163 gradientTransform: null,
23164 gradientUnits: null,
23165 handler: null,
23166 hanging: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23167 hatchContentUnits: null,
23168 hatchUnits: null,
23169 height: null,
23170 href: null,
23171 hrefLang: null,
23172 horizAdvX: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23173 horizOriginX: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23174 horizOriginY: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23175 id: null,
23176 ideographic: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23177 imageRendering: null,
23178 initialVisibility: null,
23179 in: null,
23180 in2: null,
23181 intercept: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23182 k: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23183 k1: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23184 k2: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23185 k3: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23186 k4: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23187 kernelMatrix: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23188 kernelUnitLength: null,
23189 keyPoints: null, // SEMI_COLON_SEPARATED
23190 keySplines: null, // SEMI_COLON_SEPARATED
23191 keyTimes: null, // SEMI_COLON_SEPARATED
23192 kerning: null,
23193 lang: null,
23194 lengthAdjust: null,
23195 letterSpacing: null,
23196 lightingColor: null,
23197 limitingConeAngle: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23198 local: null,
23199 markerEnd: null,
23200 markerMid: null,
23201 markerStart: null,
23202 markerHeight: null,
23203 markerUnits: null,
23204 markerWidth: null,
23205 mask: null,
23206 maskContentUnits: null,
23207 maskUnits: null,
23208 mathematical: null,
23209 max: null,
23210 media: null,
23211 mediaCharacterEncoding: null,
23212 mediaContentEncodings: null,
23213 mediaSize: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23214 mediaTime: null,
23215 method: null,
23216 min: null,
23217 mode: null,
23218 name: null,
23219 navDown: null,
23220 navDownLeft: null,
23221 navDownRight: null,
23222 navLeft: null,
23223 navNext: null,
23224 navPrev: null,
23225 navRight: null,
23226 navUp: null,
23227 navUpLeft: null,
23228 navUpRight: null,
23229 numOctaves: null,
23230 observer: null,
23231 offset: null,
23232 onAbort: null,
23233 onActivate: null,
23234 onAfterPrint: null,
23235 onBeforePrint: null,
23236 onBegin: null,
23237 onCancel: null,
23238 onCanPlay: null,
23239 onCanPlayThrough: null,
23240 onChange: null,
23241 onClick: null,
23242 onClose: null,
23243 onCopy: null,
23244 onCueChange: null,
23245 onCut: null,
23246 onDblClick: null,
23247 onDrag: null,
23248 onDragEnd: null,
23249 onDragEnter: null,
23250 onDragExit: null,
23251 onDragLeave: null,
23252 onDragOver: null,
23253 onDragStart: null,
23254 onDrop: null,
23255 onDurationChange: null,
23256 onEmptied: null,
23257 onEnd: null,
23258 onEnded: null,
23259 onError: null,
23260 onFocus: null,
23261 onFocusIn: null,
23262 onFocusOut: null,
23263 onHashChange: null,
23264 onInput: null,
23265 onInvalid: null,
23266 onKeyDown: null,
23267 onKeyPress: null,
23268 onKeyUp: null,
23269 onLoad: null,
23270 onLoadedData: null,
23271 onLoadedMetadata: null,
23272 onLoadStart: null,
23273 onMessage: null,
23274 onMouseDown: null,
23275 onMouseEnter: null,
23276 onMouseLeave: null,
23277 onMouseMove: null,
23278 onMouseOut: null,
23279 onMouseOver: null,
23280 onMouseUp: null,
23281 onMouseWheel: null,
23282 onOffline: null,
23283 onOnline: null,
23284 onPageHide: null,
23285 onPageShow: null,
23286 onPaste: null,
23287 onPause: null,
23288 onPlay: null,
23289 onPlaying: null,
23290 onPopState: null,
23291 onProgress: null,
23292 onRateChange: null,
23293 onRepeat: null,
23294 onReset: null,
23295 onResize: null,
23296 onScroll: null,
23297 onSeeked: null,
23298 onSeeking: null,
23299 onSelect: null,
23300 onShow: null,
23301 onStalled: null,
23302 onStorage: null,
23303 onSubmit: null,
23304 onSuspend: null,
23305 onTimeUpdate: null,
23306 onToggle: null,
23307 onUnload: null,
23308 onVolumeChange: null,
23309 onWaiting: null,
23310 onZoom: null,
23311 opacity: null,
23312 operator: null,
23313 order: null,
23314 orient: null,
23315 orientation: null,
23316 origin: null,
23317 overflow: null,
23318 overlay: null,
23319 overlinePosition: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23320 overlineThickness: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23321 paintOrder: null,
23322 panose1: null,
23323 path: null,
23324 pathLength: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23325 patternContentUnits: null,
23326 patternTransform: null,
23327 patternUnits: null,
23328 phase: null,
23329 ping: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.spaceSeparated,
23330 pitch: null,
23331 playbackOrder: null,
23332 pointerEvents: null,
23333 points: null,
23334 pointsAtX: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23335 pointsAtY: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23336 pointsAtZ: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23337 preserveAlpha: null,
23338 preserveAspectRatio: null,
23339 primitiveUnits: null,
23340 propagate: null,
23341 property: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23342 r: null,
23343 radius: null,
23344 referrerPolicy: null,
23345 refX: null,
23346 refY: null,
23347 rel: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23348 rev: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23349 renderingIntent: null,
23350 repeatCount: null,
23351 repeatDur: null,
23352 requiredExtensions: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23353 requiredFeatures: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23354 requiredFonts: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23355 requiredFormats: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23356 resource: null,
23357 restart: null,
23358 result: null,
23359 rotate: null,
23360 rx: null,
23361 ry: null,
23362 scale: null,
23363 seed: null,
23364 shapeRendering: null,
23365 side: null,
23366 slope: null,
23367 snapshotTime: null,
23368 specularConstant: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23369 specularExponent: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23370 spreadMethod: null,
23371 spacing: null,
23372 startOffset: null,
23373 stdDeviation: null,
23374 stemh: null,
23375 stemv: null,
23376 stitchTiles: null,
23377 stopColor: null,
23378 stopOpacity: null,
23379 strikethroughPosition: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23380 strikethroughThickness: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23381 string: null,
23382 stroke: null,
23383 strokeDashArray: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23384 strokeDashOffset: null,
23385 strokeLineCap: null,
23386 strokeLineJoin: null,
23387 strokeMiterLimit: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23388 strokeOpacity: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23389 strokeWidth: null,
23390 style: null,
23391 surfaceScale: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23392 syncBehavior: null,
23393 syncBehaviorDefault: null,
23394 syncMaster: null,
23395 syncTolerance: null,
23396 syncToleranceDefault: null,
23397 systemLanguage: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23398 tabIndex: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23399 tableValues: null,
23400 target: null,
23401 targetX: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23402 targetY: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23403 textAnchor: null,
23404 textDecoration: null,
23405 textRendering: null,
23406 textLength: null,
23407 timelineBegin: null,
23408 title: null,
23409 transformBehavior: null,
23410 type: null,
23411 typeOf: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.commaOrSpaceSeparated,
23412 to: null,
23413 transform: null,
23414 u1: null,
23415 u2: null,
23416 underlinePosition: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23417 underlineThickness: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23418 unicode: null,
23419 unicodeBidi: null,
23420 unicodeRange: null,
23421 unitsPerEm: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23422 values: null,
23423 vAlphabetic: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23424 vMathematical: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23425 vectorEffect: null,
23426 vHanging: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23427 vIdeographic: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23428 version: null,
23429 vertAdvY: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23430 vertOriginX: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23431 vertOriginY: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23432 viewBox: null,
23433 viewTarget: null,
23434 visibility: null,
23435 width: null,
23436 widths: null,
23437 wordSpacing: null,
23438 writingMode: null,
23439 x: null,
23440 x1: null,
23441 x2: null,
23442 xChannelSelector: null,
23443 xHeight: _util_types_js__WEBPACK_IMPORTED_MODULE_2__.number,
23444 y: null,
23445 y1: null,
23446 y2: null,
23447 yChannelSelector: null,
23448 z: null,
23449 zoomAndPan: null
23450 }
23451 })
23452
23453
23454 /***/ }),
23455
23456 /***/ "../node_modules/property-information/lib/util/case-insensitive-transform.js":
23457 /*!***********************************************************************************!*\
23458 !*** ../node_modules/property-information/lib/util/case-insensitive-transform.js ***!
23459 \***********************************************************************************/
23460 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23461
23462 "use strict";
23463 __webpack_require__.r(__webpack_exports__);
23464 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23465 /* harmony export */ "caseInsensitiveTransform": () => (/* binding */ caseInsensitiveTransform)
23466 /* harmony export */ });
23467 /* harmony import */ var _case_sensitive_transform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./case-sensitive-transform.js */ "../node_modules/property-information/lib/util/case-sensitive-transform.js");
23468
23469
23470 /**
23471 * @param {Record<string, string>} attributes
23472 * @param {string} property
23473 * @returns {string}
23474 */
23475 function caseInsensitiveTransform(attributes, property) {
23476 return (0,_case_sensitive_transform_js__WEBPACK_IMPORTED_MODULE_0__.caseSensitiveTransform)(attributes, property.toLowerCase())
23477 }
23478
23479
23480 /***/ }),
23481
23482 /***/ "../node_modules/property-information/lib/util/case-sensitive-transform.js":
23483 /*!*********************************************************************************!*\
23484 !*** ../node_modules/property-information/lib/util/case-sensitive-transform.js ***!
23485 \*********************************************************************************/
23486 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23487
23488 "use strict";
23489 __webpack_require__.r(__webpack_exports__);
23490 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23491 /* harmony export */ "caseSensitiveTransform": () => (/* binding */ caseSensitiveTransform)
23492 /* harmony export */ });
23493 /**
23494 * @param {Record<string, string>} attributes
23495 * @param {string} attribute
23496 * @returns {string}
23497 */
23498 function caseSensitiveTransform(attributes, attribute) {
23499 return attribute in attributes ? attributes[attribute] : attribute
23500 }
23501
23502
23503 /***/ }),
23504
23505 /***/ "../node_modules/property-information/lib/util/create.js":
23506 /*!***************************************************************!*\
23507 !*** ../node_modules/property-information/lib/util/create.js ***!
23508 \***************************************************************/
23509 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23510
23511 "use strict";
23512 __webpack_require__.r(__webpack_exports__);
23513 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23514 /* harmony export */ "create": () => (/* binding */ create)
23515 /* harmony export */ });
23516 /* harmony import */ var _normalize_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../normalize.js */ "../node_modules/property-information/lib/normalize.js");
23517 /* harmony import */ var _schema_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schema.js */ "../node_modules/property-information/lib/util/schema.js");
23518 /* harmony import */ var _defined_info_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defined-info.js */ "../node_modules/property-information/lib/util/defined-info.js");
23519 /**
23520 * @typedef {import('./schema.js').Properties} Properties
23521 * @typedef {import('./schema.js').Normal} Normal
23522 *
23523 * @typedef {Record<string, string>} Attributes
23524 *
23525 * @typedef {Object} Definition
23526 * @property {Record<string, number|null>} properties
23527 * @property {(attributes: Attributes, property: string) => string} transform
23528 * @property {string} [space]
23529 * @property {Attributes} [attributes]
23530 * @property {Array<string>} [mustUseProperty]
23531 */
23532
23533
23534
23535
23536
23537 const own = {}.hasOwnProperty
23538
23539 /**
23540 * @param {Definition} definition
23541 * @returns {Schema}
23542 */
23543 function create(definition) {
23544 /** @type {Properties} */
23545 const property = {}
23546 /** @type {Normal} */
23547 const normal = {}
23548 /** @type {string} */
23549 let prop
23550
23551 for (prop in definition.properties) {
23552 if (own.call(definition.properties, prop)) {
23553 const value = definition.properties[prop]
23554 const info = new _defined_info_js__WEBPACK_IMPORTED_MODULE_0__.DefinedInfo(
23555 prop,
23556 definition.transform(definition.attributes || {}, prop),
23557 value,
23558 definition.space
23559 )
23560
23561 if (
23562 definition.mustUseProperty &&
23563 definition.mustUseProperty.includes(prop)
23564 ) {
23565 info.mustUseProperty = true
23566 }
23567
23568 property[prop] = info
23569
23570 normal[(0,_normalize_js__WEBPACK_IMPORTED_MODULE_1__.normalize)(prop)] = prop
23571 normal[(0,_normalize_js__WEBPACK_IMPORTED_MODULE_1__.normalize)(info.attribute)] = prop
23572 }
23573 }
23574
23575 return new _schema_js__WEBPACK_IMPORTED_MODULE_2__.Schema(property, normal, definition.space)
23576 }
23577
23578
23579 /***/ }),
23580
23581 /***/ "../node_modules/property-information/lib/util/defined-info.js":
23582 /*!*********************************************************************!*\
23583 !*** ../node_modules/property-information/lib/util/defined-info.js ***!
23584 \*********************************************************************/
23585 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23586
23587 "use strict";
23588 __webpack_require__.r(__webpack_exports__);
23589 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23590 /* harmony export */ "DefinedInfo": () => (/* binding */ DefinedInfo)
23591 /* harmony export */ });
23592 /* harmony import */ var _info_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./info.js */ "../node_modules/property-information/lib/util/info.js");
23593 /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types.js */ "../node_modules/property-information/lib/util/types.js");
23594
23595
23596
23597 /** @type {Array<keyof types>} */
23598 // @ts-expect-error: hush.
23599 const checks = Object.keys(_types_js__WEBPACK_IMPORTED_MODULE_0__)
23600
23601 class DefinedInfo extends _info_js__WEBPACK_IMPORTED_MODULE_1__.Info {
23602 /**
23603 * @constructor
23604 * @param {string} property
23605 * @param {string} attribute
23606 * @param {number|null} [mask]
23607 * @param {string} [space]
23608 */
23609 constructor(property, attribute, mask, space) {
23610 let index = -1
23611
23612 super(property, attribute)
23613
23614 mark(this, 'space', space)
23615
23616 if (typeof mask === 'number') {
23617 while (++index < checks.length) {
23618 const check = checks[index]
23619 mark(this, checks[index], (mask & _types_js__WEBPACK_IMPORTED_MODULE_0__[check]) === _types_js__WEBPACK_IMPORTED_MODULE_0__[check])
23620 }
23621 }
23622 }
23623 }
23624
23625 DefinedInfo.prototype.defined = true
23626
23627 /**
23628 * @param {DefinedInfo} values
23629 * @param {string} key
23630 * @param {unknown} value
23631 */
23632 function mark(values, key, value) {
23633 if (value) {
23634 // @ts-expect-error: assume `value` matches the expected value of `key`.
23635 values[key] = value
23636 }
23637 }
23638
23639
23640 /***/ }),
23641
23642 /***/ "../node_modules/property-information/lib/util/info.js":
23643 /*!*************************************************************!*\
23644 !*** ../node_modules/property-information/lib/util/info.js ***!
23645 \*************************************************************/
23646 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23647
23648 "use strict";
23649 __webpack_require__.r(__webpack_exports__);
23650 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23651 /* harmony export */ "Info": () => (/* binding */ Info)
23652 /* harmony export */ });
23653 class Info {
23654 /**
23655 * @constructor
23656 * @param {string} property
23657 * @param {string} attribute
23658 */
23659 constructor(property, attribute) {
23660 /** @type {string} */
23661 this.property = property
23662 /** @type {string} */
23663 this.attribute = attribute
23664 }
23665 }
23666
23667 /** @type {string|null} */
23668 Info.prototype.space = null
23669 Info.prototype.boolean = false
23670 Info.prototype.booleanish = false
23671 Info.prototype.overloadedBoolean = false
23672 Info.prototype.number = false
23673 Info.prototype.commaSeparated = false
23674 Info.prototype.spaceSeparated = false
23675 Info.prototype.commaOrSpaceSeparated = false
23676 Info.prototype.mustUseProperty = false
23677 Info.prototype.defined = false
23678
23679
23680 /***/ }),
23681
23682 /***/ "../node_modules/property-information/lib/util/merge.js":
23683 /*!**************************************************************!*\
23684 !*** ../node_modules/property-information/lib/util/merge.js ***!
23685 \**************************************************************/
23686 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23687
23688 "use strict";
23689 __webpack_require__.r(__webpack_exports__);
23690 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23691 /* harmony export */ "merge": () => (/* binding */ merge)
23692 /* harmony export */ });
23693 /* harmony import */ var _schema_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schema.js */ "../node_modules/property-information/lib/util/schema.js");
23694 /**
23695 * @typedef {import('./schema.js').Properties} Properties
23696 * @typedef {import('./schema.js').Normal} Normal
23697 */
23698
23699
23700
23701 /**
23702 * @param {Schema[]} definitions
23703 * @param {string} [space]
23704 * @returns {Schema}
23705 */
23706 function merge(definitions, space) {
23707 /** @type {Properties} */
23708 const property = {}
23709 /** @type {Normal} */
23710 const normal = {}
23711 let index = -1
23712
23713 while (++index < definitions.length) {
23714 Object.assign(property, definitions[index].property)
23715 Object.assign(normal, definitions[index].normal)
23716 }
23717
23718 return new _schema_js__WEBPACK_IMPORTED_MODULE_0__.Schema(property, normal, space)
23719 }
23720
23721
23722 /***/ }),
23723
23724 /***/ "../node_modules/property-information/lib/util/schema.js":
23725 /*!***************************************************************!*\
23726 !*** ../node_modules/property-information/lib/util/schema.js ***!
23727 \***************************************************************/
23728 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23729
23730 "use strict";
23731 __webpack_require__.r(__webpack_exports__);
23732 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23733 /* harmony export */ "Schema": () => (/* binding */ Schema)
23734 /* harmony export */ });
23735 /**
23736 * @typedef {import('./info.js').Info} Info
23737 * @typedef {Record<string, Info>} Properties
23738 * @typedef {Record<string, string>} Normal
23739 */
23740
23741 class Schema {
23742 /**
23743 * @constructor
23744 * @param {Properties} property
23745 * @param {Normal} normal
23746 * @param {string} [space]
23747 */
23748 constructor(property, normal, space) {
23749 this.property = property
23750 this.normal = normal
23751 if (space) {
23752 this.space = space
23753 }
23754 }
23755 }
23756
23757 /** @type {Properties} */
23758 Schema.prototype.property = {}
23759 /** @type {Normal} */
23760 Schema.prototype.normal = {}
23761 /** @type {string|null} */
23762 Schema.prototype.space = null
23763
23764
23765 /***/ }),
23766
23767 /***/ "../node_modules/property-information/lib/util/types.js":
23768 /*!**************************************************************!*\
23769 !*** ../node_modules/property-information/lib/util/types.js ***!
23770 \**************************************************************/
23771 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23772
23773 "use strict";
23774 __webpack_require__.r(__webpack_exports__);
23775 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23776 /* harmony export */ "boolean": () => (/* binding */ boolean),
23777 /* harmony export */ "booleanish": () => (/* binding */ booleanish),
23778 /* harmony export */ "commaOrSpaceSeparated": () => (/* binding */ commaOrSpaceSeparated),
23779 /* harmony export */ "commaSeparated": () => (/* binding */ commaSeparated),
23780 /* harmony export */ "number": () => (/* binding */ number),
23781 /* harmony export */ "overloadedBoolean": () => (/* binding */ overloadedBoolean),
23782 /* harmony export */ "spaceSeparated": () => (/* binding */ spaceSeparated)
23783 /* harmony export */ });
23784 let powers = 0
23785
23786 const boolean = increment()
23787 const booleanish = increment()
23788 const overloadedBoolean = increment()
23789 const number = increment()
23790 const spaceSeparated = increment()
23791 const commaSeparated = increment()
23792 const commaOrSpaceSeparated = increment()
23793
23794 function increment() {
23795 return 2 ** ++powers
23796 }
23797
23798
23799 /***/ }),
23800
23801 /***/ "../node_modules/property-information/lib/xlink.js":
23802 /*!*********************************************************!*\
23803 !*** ../node_modules/property-information/lib/xlink.js ***!
23804 \*********************************************************/
23805 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23806
23807 "use strict";
23808 __webpack_require__.r(__webpack_exports__);
23809 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23810 /* harmony export */ "xlink": () => (/* binding */ xlink)
23811 /* harmony export */ });
23812 /* harmony import */ var _util_create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/create.js */ "../node_modules/property-information/lib/util/create.js");
23813
23814
23815 const xlink = (0,_util_create_js__WEBPACK_IMPORTED_MODULE_0__.create)({
23816 space: 'xlink',
23817 transform(_, prop) {
23818 return 'xlink:' + prop.slice(5).toLowerCase()
23819 },
23820 properties: {
23821 xLinkActuate: null,
23822 xLinkArcRole: null,
23823 xLinkHref: null,
23824 xLinkRole: null,
23825 xLinkShow: null,
23826 xLinkTitle: null,
23827 xLinkType: null
23828 }
23829 })
23830
23831
23832 /***/ }),
23833
23834 /***/ "../node_modules/property-information/lib/xml.js":
23835 /*!*******************************************************!*\
23836 !*** ../node_modules/property-information/lib/xml.js ***!
23837 \*******************************************************/
23838 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23839
23840 "use strict";
23841 __webpack_require__.r(__webpack_exports__);
23842 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23843 /* harmony export */ "xml": () => (/* binding */ xml)
23844 /* harmony export */ });
23845 /* harmony import */ var _util_create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/create.js */ "../node_modules/property-information/lib/util/create.js");
23846
23847
23848 const xml = (0,_util_create_js__WEBPACK_IMPORTED_MODULE_0__.create)({
23849 space: 'xml',
23850 transform(_, prop) {
23851 return 'xml:' + prop.slice(3).toLowerCase()
23852 },
23853 properties: {xmlLang: null, xmlBase: null, xmlSpace: null}
23854 })
23855
23856
23857 /***/ }),
23858
23859 /***/ "../node_modules/property-information/lib/xmlns.js":
23860 /*!*********************************************************!*\
23861 !*** ../node_modules/property-information/lib/xmlns.js ***!
23862 \*********************************************************/
23863 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23864
23865 "use strict";
23866 __webpack_require__.r(__webpack_exports__);
23867 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23868 /* harmony export */ "xmlns": () => (/* binding */ xmlns)
23869 /* harmony export */ });
23870 /* harmony import */ var _util_create_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util/create.js */ "../node_modules/property-information/lib/util/create.js");
23871 /* harmony import */ var _util_case_insensitive_transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util/case-insensitive-transform.js */ "../node_modules/property-information/lib/util/case-insensitive-transform.js");
23872
23873
23874
23875 const xmlns = (0,_util_create_js__WEBPACK_IMPORTED_MODULE_0__.create)({
23876 space: 'xmlns',
23877 attributes: {xmlnsxlink: 'xmlns:xlink'},
23878 transform: _util_case_insensitive_transform_js__WEBPACK_IMPORTED_MODULE_1__.caseInsensitiveTransform,
23879 properties: {xmlns: null, xmlnsXLink: null}
23880 })
23881
23882
23883 /***/ }),
23884
23885 /***/ "../node_modules/react-markdown/index.js":
23886 /*!***********************************************!*\
23887 !*** ../node_modules/react-markdown/index.js ***!
23888 \***********************************************/
23889 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23890
23891 "use strict";
23892 __webpack_require__.r(__webpack_exports__);
23893 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23894 /* harmony export */ "default": () => (/* reexport safe */ _lib_react_markdown_js__WEBPACK_IMPORTED_MODULE_1__.ReactMarkdown),
23895 /* harmony export */ "uriTransformer": () => (/* reexport safe */ _lib_uri_transformer_js__WEBPACK_IMPORTED_MODULE_0__.uriTransformer)
23896 /* harmony export */ });
23897 /* harmony import */ var _lib_uri_transformer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/uri-transformer.js */ "../node_modules/react-markdown/lib/uri-transformer.js");
23898 /* harmony import */ var _lib_react_markdown_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/react-markdown.js */ "../node_modules/react-markdown/lib/react-markdown.js");
23899 /**
23900 * @typedef {import('./lib/react-markdown.js').ReactMarkdownOptions} Options
23901 * @typedef {import('./lib/ast-to-react.js').Components} Components
23902 */
23903
23904
23905
23906
23907
23908
23909 /***/ }),
23910
23911 /***/ "../node_modules/react-markdown/lib/ast-to-react.js":
23912 /*!**********************************************************!*\
23913 !*** ../node_modules/react-markdown/lib/ast-to-react.js ***!
23914 \**********************************************************/
23915 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
23916
23917 "use strict";
23918 __webpack_require__.r(__webpack_exports__);
23919 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23920 /* harmony export */ "childrenToReact": () => (/* binding */ childrenToReact)
23921 /* harmony export */ });
23922 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
23923 /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-is */ "../node_modules/react-is/index.js");
23924 /* harmony import */ var hast_util_whitespace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! hast-util-whitespace */ "../node_modules/hast-util-whitespace/index.js");
23925 /* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! property-information */ "../node_modules/property-information/index.js");
23926 /* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! property-information */ "../node_modules/property-information/lib/find.js");
23927 /* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! property-information */ "../node_modules/property-information/lib/hast-to-react.js");
23928 /* harmony import */ var space_separated_tokens__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! space-separated-tokens */ "../node_modules/space-separated-tokens/index.js");
23929 /* harmony import */ var comma_separated_tokens__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! comma-separated-tokens */ "../node_modules/comma-separated-tokens/index.js");
23930 /* harmony import */ var style_to_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! style-to-object */ "../node_modules/style-to-object/index.mjs");
23931 /* harmony import */ var _uri_transformer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uri-transformer.js */ "../node_modules/react-markdown/lib/uri-transformer.js");
23932 /**
23933 * @template T
23934 * @typedef {import('react').ComponentType<T>} ComponentType<T>
23935 */
23936
23937 /**
23938 * @template {import('react').ElementType} T
23939 * @typedef {import('react').ComponentPropsWithoutRef<T>} ComponentPropsWithoutRef<T>
23940 */
23941
23942 /**
23943 * @typedef {import('react').ReactNode} ReactNode
23944 * @typedef {import('unist').Position} Position
23945 * @typedef {import('hast').Element} Element
23946 * @typedef {import('hast').ElementContent} ElementContent
23947 * @typedef {import('hast').Root} Root
23948 * @typedef {import('hast').Text} Text
23949 * @typedef {import('hast').Comment} Comment
23950 * @typedef {import('hast').DocType} Doctype
23951 * @typedef {import('property-information').Info} Info
23952 * @typedef {import('property-information').Schema} Schema
23953 * @typedef {import('./complex-types.js').ReactMarkdownProps} ReactMarkdownProps
23954 *
23955 * @typedef Raw
23956 * @property {'raw'} type
23957 * @property {string} value
23958 *
23959 * @typedef Context
23960 * @property {Options} options
23961 * @property {Schema} schema
23962 * @property {number} listDepth
23963 *
23964 * @callback TransformLink
23965 * @param {string} href
23966 * @param {Array<ElementContent>} children
23967 * @param {string?} title
23968 * @returns {string}
23969 *
23970 * @callback TransformImage
23971 * @param {string} src
23972 * @param {string} alt
23973 * @param {string?} title
23974 * @returns {string}
23975 *
23976 * @typedef {import('react').HTMLAttributeAnchorTarget} TransformLinkTargetType
23977 *
23978 * @callback TransformLinkTarget
23979 * @param {string} href
23980 * @param {Array<ElementContent>} children
23981 * @param {string?} title
23982 * @returns {TransformLinkTargetType|undefined}
23983 *
23984 * @typedef {keyof JSX.IntrinsicElements} ReactMarkdownNames
23985 *
23986 * To do: is `data-sourcepos` typeable?
23987 *
23988 * @typedef {ComponentPropsWithoutRef<'code'> & ReactMarkdownProps & {inline?: boolean}} CodeProps
23989 * @typedef {ComponentPropsWithoutRef<'h1'> & ReactMarkdownProps & {level: number}} HeadingProps
23990 * @typedef {ComponentPropsWithoutRef<'li'> & ReactMarkdownProps & {checked: boolean|null, index: number, ordered: boolean}} LiProps
23991 * @typedef {ComponentPropsWithoutRef<'ol'> & ReactMarkdownProps & {depth: number, ordered: true}} OrderedListProps
23992 * @typedef {ComponentPropsWithoutRef<'td'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: false}} TableDataCellProps
23993 * @typedef {ComponentPropsWithoutRef<'th'> & ReactMarkdownProps & {style?: Record<string, unknown>, isHeader: true}} TableHeaderCellProps
23994 * @typedef {ComponentPropsWithoutRef<'tr'> & ReactMarkdownProps & {isHeader: boolean}} TableRowProps
23995 * @typedef {ComponentPropsWithoutRef<'ul'> & ReactMarkdownProps & {depth: number, ordered: false}} UnorderedListProps
23996 *
23997 * @typedef {ComponentType<CodeProps>} CodeComponent
23998 * @typedef {ComponentType<HeadingProps>} HeadingComponent
23999 * @typedef {ComponentType<LiProps>} LiComponent
24000 * @typedef {ComponentType<OrderedListProps>} OrderedListComponent
24001 * @typedef {ComponentType<TableDataCellProps>} TableDataCellComponent
24002 * @typedef {ComponentType<TableHeaderCellProps>} TableHeaderCellComponent
24003 * @typedef {ComponentType<TableRowProps>} TableRowComponent
24004 * @typedef {ComponentType<UnorderedListProps>} UnorderedListComponent
24005 *
24006 * @typedef SpecialComponents
24007 * @property {CodeComponent|ReactMarkdownNames} code
24008 * @property {HeadingComponent|ReactMarkdownNames} h1
24009 * @property {HeadingComponent|ReactMarkdownNames} h2
24010 * @property {HeadingComponent|ReactMarkdownNames} h3
24011 * @property {HeadingComponent|ReactMarkdownNames} h4
24012 * @property {HeadingComponent|ReactMarkdownNames} h5
24013 * @property {HeadingComponent|ReactMarkdownNames} h6
24014 * @property {LiComponent|ReactMarkdownNames} li
24015 * @property {OrderedListComponent|ReactMarkdownNames} ol
24016 * @property {TableDataCellComponent|ReactMarkdownNames} td
24017 * @property {TableHeaderCellComponent|ReactMarkdownNames} th
24018 * @property {TableRowComponent|ReactMarkdownNames} tr
24019 * @property {UnorderedListComponent|ReactMarkdownNames} ul
24020 *
24021 * @typedef {Partial<Omit<import('./complex-types.js').NormalComponents, keyof SpecialComponents> & SpecialComponents>} Components
24022 *
24023 * @typedef Options
24024 * @property {boolean} [sourcePos=false]
24025 * @property {boolean} [rawSourcePos=false]
24026 * @property {boolean} [skipHtml=false]
24027 * @property {boolean} [includeElementIndex=false]
24028 * @property {null|false|TransformLink} [transformLinkUri]
24029 * @property {TransformImage} [transformImageUri]
24030 * @property {TransformLinkTargetType|TransformLinkTarget} [linkTarget]
24031 * @property {Components} [components]
24032 */
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043 const own = {}.hasOwnProperty
24044
24045 // The table-related elements that must not contain whitespace text according
24046 // to React.
24047 const tableElements = new Set(['table', 'thead', 'tbody', 'tfoot', 'tr'])
24048
24049 /**
24050 * @param {Context} context
24051 * @param {Element|Root} node
24052 */
24053 function childrenToReact(context, node) {
24054 /** @type {Array<ReactNode>} */
24055 const children = []
24056 let childIndex = -1
24057 /** @type {Comment|Doctype|Element|Raw|Text} */
24058 let child
24059
24060 while (++childIndex < node.children.length) {
24061 child = node.children[childIndex]
24062
24063 if (child.type === 'element') {
24064 children.push(toReact(context, child, childIndex, node))
24065 } else if (child.type === 'text') {
24066 // Currently, a warning is triggered by react for *any* white space in
24067 // tables.
24068 // So we drop it.
24069 // See: <https://github.com/facebook/react/pull/7081>.
24070 // See: <https://github.com/facebook/react/pull/7515>.
24071 // See: <https://github.com/remarkjs/remark-react/issues/64>.
24072 // See: <https://github.com/remarkjs/react-markdown/issues/576>.
24073 if (
24074 node.type !== 'element' ||
24075 !tableElements.has(node.tagName) ||
24076 !(0,hast_util_whitespace__WEBPACK_IMPORTED_MODULE_3__.whitespace)(child)
24077 ) {
24078 children.push(child.value)
24079 }
24080 } else if (child.type === 'raw' && !context.options.skipHtml) {
24081 // Default behavior is to show (encoded) HTML.
24082 children.push(child.value)
24083 }
24084 }
24085
24086 return children
24087 }
24088
24089 /**
24090 * @param {Context} context
24091 * @param {Element} node
24092 * @param {number} index
24093 * @param {Element|Root} parent
24094 */
24095 function toReact(context, node, index, parent) {
24096 const options = context.options
24097 const transform =
24098 options.transformLinkUri === undefined
24099 ? _uri_transformer_js__WEBPACK_IMPORTED_MODULE_4__.uriTransformer
24100 : options.transformLinkUri
24101 const parentSchema = context.schema
24102 /** @type {ReactMarkdownNames} */
24103 // @ts-expect-error assume a known HTML/SVG element.
24104 const name = node.tagName
24105 /** @type {Record<string, unknown>} */
24106 const properties = {}
24107 let schema = parentSchema
24108 /** @type {string} */
24109 let property
24110
24111 if (parentSchema.space === 'html' && name === 'svg') {
24112 schema = property_information__WEBPACK_IMPORTED_MODULE_5__.svg
24113 context.schema = schema
24114 }
24115
24116 if (node.properties) {
24117 for (property in node.properties) {
24118 if (own.call(node.properties, property)) {
24119 addProperty(properties, property, node.properties[property], context)
24120 }
24121 }
24122 }
24123
24124 if (name === 'ol' || name === 'ul') {
24125 context.listDepth++
24126 }
24127
24128 const children = childrenToReact(context, node)
24129
24130 if (name === 'ol' || name === 'ul') {
24131 context.listDepth--
24132 }
24133
24134 // Restore parent schema.
24135 context.schema = parentSchema
24136
24137 // Nodes created by plugins do not have positional info, in which case we use
24138 // an object that matches the position interface.
24139 const position = node.position || {
24140 start: {line: null, column: null, offset: null},
24141 end: {line: null, column: null, offset: null}
24142 }
24143 const component =
24144 options.components && own.call(options.components, name)
24145 ? options.components[name]
24146 : name
24147 const basic = typeof component === 'string' || component === react__WEBPACK_IMPORTED_MODULE_0__.Fragment
24148
24149 if (!react_is__WEBPACK_IMPORTED_MODULE_1__.isValidElementType(component)) {
24150 throw new TypeError(
24151 `Component for name \`${name}\` not defined or is not renderable`
24152 )
24153 }
24154
24155 properties.key = index
24156
24157 if (name === 'a' && options.linkTarget) {
24158 properties.target =
24159 typeof options.linkTarget === 'function'
24160 ? options.linkTarget(
24161 String(properties.href || ''),
24162 node.children,
24163 typeof properties.title === 'string' ? properties.title : null
24164 )
24165 : options.linkTarget
24166 }
24167
24168 if (name === 'a' && transform) {
24169 properties.href = transform(
24170 String(properties.href || ''),
24171 node.children,
24172 typeof properties.title === 'string' ? properties.title : null
24173 )
24174 }
24175
24176 if (
24177 !basic &&
24178 name === 'code' &&
24179 parent.type === 'element' &&
24180 parent.tagName !== 'pre'
24181 ) {
24182 properties.inline = true
24183 }
24184
24185 if (
24186 !basic &&
24187 (name === 'h1' ||
24188 name === 'h2' ||
24189 name === 'h3' ||
24190 name === 'h4' ||
24191 name === 'h5' ||
24192 name === 'h6')
24193 ) {
24194 properties.level = Number.parseInt(name.charAt(1), 10)
24195 }
24196
24197 if (name === 'img' && options.transformImageUri) {
24198 properties.src = options.transformImageUri(
24199 String(properties.src || ''),
24200 String(properties.alt || ''),
24201 typeof properties.title === 'string' ? properties.title : null
24202 )
24203 }
24204
24205 if (!basic && name === 'li' && parent.type === 'element') {
24206 const input = getInputElement(node)
24207 properties.checked =
24208 input && input.properties ? Boolean(input.properties.checked) : null
24209 properties.index = getElementsBeforeCount(parent, node)
24210 properties.ordered = parent.tagName === 'ol'
24211 }
24212
24213 if (!basic && (name === 'ol' || name === 'ul')) {
24214 properties.ordered = name === 'ol'
24215 properties.depth = context.listDepth
24216 }
24217
24218 if (name === 'td' || name === 'th') {
24219 if (properties.align) {
24220 if (!properties.style) properties.style = {}
24221 // @ts-expect-error assume `style` is an object
24222 properties.style.textAlign = properties.align
24223 delete properties.align
24224 }
24225
24226 if (!basic) {
24227 properties.isHeader = name === 'th'
24228 }
24229 }
24230
24231 if (!basic && name === 'tr' && parent.type === 'element') {
24232 properties.isHeader = Boolean(parent.tagName === 'thead')
24233 }
24234
24235 // If `sourcePos` is given, pass source information (line/column info from markdown source).
24236 if (options.sourcePos) {
24237 properties['data-sourcepos'] = flattenPosition(position)
24238 }
24239
24240 if (!basic && options.rawSourcePos) {
24241 properties.sourcePosition = node.position
24242 }
24243
24244 // If `includeElementIndex` is given, pass node index info to components.
24245 if (!basic && options.includeElementIndex) {
24246 properties.index = getElementsBeforeCount(parent, node)
24247 properties.siblingCount = getElementsBeforeCount(parent)
24248 }
24249
24250 if (!basic) {
24251 properties.node = node
24252 }
24253
24254 // Ensure no React warnings are emitted for void elements w/ children.
24255 return children.length > 0
24256 ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(component, properties, children)
24257 : react__WEBPACK_IMPORTED_MODULE_0__.createElement(component, properties)
24258 }
24259
24260 /**
24261 * @param {Element|Root} node
24262 * @returns {Element?}
24263 */
24264 function getInputElement(node) {
24265 let index = -1
24266
24267 while (++index < node.children.length) {
24268 const child = node.children[index]
24269
24270 if (child.type === 'element' && child.tagName === 'input') {
24271 return child
24272 }
24273 }
24274
24275 return null
24276 }
24277
24278 /**
24279 * @param {Element|Root} parent
24280 * @param {Element} [node]
24281 * @returns {number}
24282 */
24283 function getElementsBeforeCount(parent, node) {
24284 let index = -1
24285 let count = 0
24286
24287 while (++index < parent.children.length) {
24288 if (parent.children[index] === node) break
24289 if (parent.children[index].type === 'element') count++
24290 }
24291
24292 return count
24293 }
24294
24295 /**
24296 * @param {Record<string, unknown>} props
24297 * @param {string} prop
24298 * @param {unknown} value
24299 * @param {Context} ctx
24300 */
24301 function addProperty(props, prop, value, ctx) {
24302 const info = (0,property_information__WEBPACK_IMPORTED_MODULE_6__.find)(ctx.schema, prop)
24303 let result = value
24304
24305 // Ignore nullish and `NaN` values.
24306 // eslint-disable-next-line no-self-compare
24307 if (result === null || result === undefined || result !== result) {
24308 return
24309 }
24310
24311 // Accept `array`.
24312 // Most props are space-separated.
24313 if (Array.isArray(result)) {
24314 result = info.commaSeparated ? (0,comma_separated_tokens__WEBPACK_IMPORTED_MODULE_7__.stringify)(result) : (0,space_separated_tokens__WEBPACK_IMPORTED_MODULE_8__.stringify)(result)
24315 }
24316
24317 if (info.property === 'style' && typeof result === 'string') {
24318 result = parseStyle(result)
24319 }
24320
24321 if (info.space && info.property) {
24322 props[
24323 own.call(property_information__WEBPACK_IMPORTED_MODULE_9__.hastToReact, info.property)
24324 ? property_information__WEBPACK_IMPORTED_MODULE_9__.hastToReact[info.property]
24325 : info.property
24326 ] = result
24327 } else if (info.attribute) {
24328 props[info.attribute] = result
24329 }
24330 }
24331
24332 /**
24333 * @param {string} value
24334 * @returns {Record<string, string>}
24335 */
24336 function parseStyle(value) {
24337 /** @type {Record<string, string>} */
24338 const result = {}
24339
24340 try {
24341 ;(0,style_to_object__WEBPACK_IMPORTED_MODULE_2__["default"])(value, iterator)
24342 } catch {
24343 // Silent.
24344 }
24345
24346 return result
24347
24348 /**
24349 * @param {string} name
24350 * @param {string} v
24351 */
24352 function iterator(name, v) {
24353 const k = name.slice(0, 4) === '-ms-' ? `ms-${name.slice(4)}` : name
24354 result[k.replace(/-([a-z])/g, styleReplacer)] = v
24355 }
24356 }
24357
24358 /**
24359 * @param {unknown} _
24360 * @param {string} $1
24361 */
24362 function styleReplacer(_, $1) {
24363 return $1.toUpperCase()
24364 }
24365
24366 /**
24367 * @param {Position|{start: {line: null, column: null, offset: null}, end: {line: null, column: null, offset: null}}} pos
24368 * @returns {string}
24369 */
24370 function flattenPosition(pos) {
24371 return [
24372 pos.start.line,
24373 ':',
24374 pos.start.column,
24375 '-',
24376 pos.end.line,
24377 ':',
24378 pos.end.column
24379 ]
24380 .map(String)
24381 .join('')
24382 }
24383
24384
24385 /***/ }),
24386
24387 /***/ "../node_modules/react-markdown/lib/react-markdown.js":
24388 /*!************************************************************!*\
24389 !*** ../node_modules/react-markdown/lib/react-markdown.js ***!
24390 \************************************************************/
24391 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24392
24393 "use strict";
24394 __webpack_require__.r(__webpack_exports__);
24395 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24396 /* harmony export */ "ReactMarkdown": () => (/* binding */ ReactMarkdown)
24397 /* harmony export */ });
24398 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
24399 /* harmony import */ var vfile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vfile */ "../node_modules/vfile/lib/index.js");
24400 /* harmony import */ var unified__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! unified */ "../node_modules/unified/lib/index.js");
24401 /* harmony import */ var remark_parse__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! remark-parse */ "../node_modules/remark-parse/index.js");
24402 /* harmony import */ var remark_rehype__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! remark-rehype */ "../node_modules/remark-rehype/lib/index.js");
24403 /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
24404 /* harmony import */ var property_information__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! property-information */ "../node_modules/property-information/index.js");
24405 /* harmony import */ var _rehype_filter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./rehype-filter.js */ "../node_modules/react-markdown/lib/rehype-filter.js");
24406 /* harmony import */ var _ast_to_react_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ast-to-react.js */ "../node_modules/react-markdown/lib/ast-to-react.js");
24407 /**
24408 * @typedef {import('react').ReactNode} ReactNode
24409 * @typedef {import('react').ReactElement<{}>} ReactElement
24410 * @typedef {import('unified').PluggableList} PluggableList
24411 * @typedef {import('hast').Root} Root
24412 * @typedef {import('./rehype-filter.js').Options} FilterOptions
24413 * @typedef {import('./ast-to-react.js').Options} TransformOptions
24414 *
24415 * @typedef CoreOptions
24416 * @property {string} children
24417 *
24418 * @typedef PluginOptions
24419 * @property {PluggableList} [remarkPlugins=[]]
24420 * @property {PluggableList} [rehypePlugins=[]]
24421 * @property {import('remark-rehype').Options | undefined} [remarkRehypeOptions={}]
24422 *
24423 * @typedef LayoutOptions
24424 * @property {string} [className]
24425 *
24426 * @typedef {CoreOptions & PluginOptions & LayoutOptions & FilterOptions & TransformOptions} ReactMarkdownOptions
24427 *
24428 * @typedef Deprecation
24429 * @property {string} id
24430 * @property {string} [to]
24431 */
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443 const own = {}.hasOwnProperty
24444 const changelog =
24445 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'
24446
24447 /** @type {Record<string, Deprecation>} */
24448 const deprecated = {
24449 plugins: {to: 'remarkPlugins', id: 'change-plugins-to-remarkplugins'},
24450 renderers: {to: 'components', id: 'change-renderers-to-components'},
24451 astPlugins: {id: 'remove-buggy-html-in-markdown-parser'},
24452 allowDangerousHtml: {id: 'remove-buggy-html-in-markdown-parser'},
24453 escapeHtml: {id: 'remove-buggy-html-in-markdown-parser'},
24454 source: {to: 'children', id: 'change-source-to-children'},
24455 allowNode: {
24456 to: 'allowElement',
24457 id: 'replace-allownode-allowedtypes-and-disallowedtypes'
24458 },
24459 allowedTypes: {
24460 to: 'allowedElements',
24461 id: 'replace-allownode-allowedtypes-and-disallowedtypes'
24462 },
24463 disallowedTypes: {
24464 to: 'disallowedElements',
24465 id: 'replace-allownode-allowedtypes-and-disallowedtypes'
24466 },
24467 includeNodeIndex: {
24468 to: 'includeElementIndex',
24469 id: 'change-includenodeindex-to-includeelementindex'
24470 }
24471 }
24472
24473 /**
24474 * React component to render markdown.
24475 *
24476 * @param {ReactMarkdownOptions} options
24477 * @returns {ReactElement}
24478 */
24479 function ReactMarkdown(options) {
24480 for (const key in deprecated) {
24481 if (own.call(deprecated, key) && own.call(options, key)) {
24482 const deprecation = deprecated[key]
24483 console.warn(
24484 `[react-markdown] Warning: please ${
24485 deprecation.to ? `use \`${deprecation.to}\` instead of` : 'remove'
24486 } \`${key}\` (see <${changelog}#${deprecation.id}> for more info)`
24487 )
24488 delete deprecated[key]
24489 }
24490 }
24491
24492 const processor = (0,unified__WEBPACK_IMPORTED_MODULE_1__.unified)()
24493 .use(remark_parse__WEBPACK_IMPORTED_MODULE_2__["default"])
24494 .use(options.remarkPlugins || [])
24495 .use(remark_rehype__WEBPACK_IMPORTED_MODULE_3__["default"], {
24496 ...options.remarkRehypeOptions,
24497 allowDangerousHtml: true
24498 })
24499 .use(options.rehypePlugins || [])
24500 .use(_rehype_filter_js__WEBPACK_IMPORTED_MODULE_4__["default"], options)
24501
24502 const file = new vfile__WEBPACK_IMPORTED_MODULE_5__.VFile()
24503
24504 if (typeof options.children === 'string') {
24505 file.value = options.children
24506 } else if (options.children !== undefined && options.children !== null) {
24507 console.warn(
24508 `[react-markdown] Warning: please pass a string as \`children\` (not: \`${options.children}\`)`
24509 )
24510 }
24511
24512 const hastNode = processor.runSync(processor.parse(file), file)
24513
24514 if (hastNode.type !== 'root') {
24515 throw new TypeError('Expected a `root` node')
24516 }
24517
24518 /** @type {ReactElement} */
24519 let result = react__WEBPACK_IMPORTED_MODULE_0__.createElement(
24520 react__WEBPACK_IMPORTED_MODULE_0__.Fragment,
24521 {},
24522 (0,_ast_to_react_js__WEBPACK_IMPORTED_MODULE_6__.childrenToReact)({options, schema: property_information__WEBPACK_IMPORTED_MODULE_7__.html, listDepth: 0}, hastNode)
24523 )
24524
24525 if (options.className) {
24526 result = react__WEBPACK_IMPORTED_MODULE_0__.createElement('div', {className: options.className}, result)
24527 }
24528
24529 return result
24530 }
24531
24532 ReactMarkdown.propTypes = {
24533 // Core options:
24534 children: prop_types__WEBPACK_IMPORTED_MODULE_8__.string,
24535 // Layout options:
24536 className: prop_types__WEBPACK_IMPORTED_MODULE_8__.string,
24537 // Filter options:
24538 allowElement: prop_types__WEBPACK_IMPORTED_MODULE_8__.func,
24539 allowedElements: prop_types__WEBPACK_IMPORTED_MODULE_8__.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8__.string),
24540 disallowedElements: prop_types__WEBPACK_IMPORTED_MODULE_8__.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_8__.string),
24541 unwrapDisallowed: prop_types__WEBPACK_IMPORTED_MODULE_8__.bool,
24542 // Plugin options:
24543 remarkPlugins: prop_types__WEBPACK_IMPORTED_MODULE_8__.arrayOf(
24544 prop_types__WEBPACK_IMPORTED_MODULE_8__.oneOfType([
24545 prop_types__WEBPACK_IMPORTED_MODULE_8__.object,
24546 prop_types__WEBPACK_IMPORTED_MODULE_8__.func,
24547 prop_types__WEBPACK_IMPORTED_MODULE_8__.arrayOf(
24548 prop_types__WEBPACK_IMPORTED_MODULE_8__.oneOfType([
24549 prop_types__WEBPACK_IMPORTED_MODULE_8__.bool,
24550 prop_types__WEBPACK_IMPORTED_MODULE_8__.string,
24551 prop_types__WEBPACK_IMPORTED_MODULE_8__.object,
24552 prop_types__WEBPACK_IMPORTED_MODULE_8__.func,
24553 prop_types__WEBPACK_IMPORTED_MODULE_8__.arrayOf(
24554 // prettier-ignore
24555 // type-coverage:ignore-next-line
24556 prop_types__WEBPACK_IMPORTED_MODULE_8__.any
24557 )
24558 ])
24559 )
24560 ])
24561 ),
24562 rehypePlugins: prop_types__WEBPACK_IMPORTED_MODULE_8__.arrayOf(
24563 prop_types__WEBPACK_IMPORTED_MODULE_8__.oneOfType([
24564 prop_types__WEBPACK_IMPORTED_MODULE_8__.object,
24565 prop_types__WEBPACK_IMPORTED_MODULE_8__.func,
24566 prop_types__WEBPACK_IMPORTED_MODULE_8__.arrayOf(
24567 prop_types__WEBPACK_IMPORTED_MODULE_8__.oneOfType([
24568 prop_types__WEBPACK_IMPORTED_MODULE_8__.bool,
24569 prop_types__WEBPACK_IMPORTED_MODULE_8__.string,
24570 prop_types__WEBPACK_IMPORTED_MODULE_8__.object,
24571 prop_types__WEBPACK_IMPORTED_MODULE_8__.func,
24572 prop_types__WEBPACK_IMPORTED_MODULE_8__.arrayOf(
24573 // prettier-ignore
24574 // type-coverage:ignore-next-line
24575 prop_types__WEBPACK_IMPORTED_MODULE_8__.any
24576 )
24577 ])
24578 )
24579 ])
24580 ),
24581 // Transform options:
24582 sourcePos: prop_types__WEBPACK_IMPORTED_MODULE_8__.bool,
24583 rawSourcePos: prop_types__WEBPACK_IMPORTED_MODULE_8__.bool,
24584 skipHtml: prop_types__WEBPACK_IMPORTED_MODULE_8__.bool,
24585 includeElementIndex: prop_types__WEBPACK_IMPORTED_MODULE_8__.bool,
24586 transformLinkUri: prop_types__WEBPACK_IMPORTED_MODULE_8__.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8__.func, prop_types__WEBPACK_IMPORTED_MODULE_8__.bool]),
24587 linkTarget: prop_types__WEBPACK_IMPORTED_MODULE_8__.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_8__.func, prop_types__WEBPACK_IMPORTED_MODULE_8__.string]),
24588 transformImageUri: prop_types__WEBPACK_IMPORTED_MODULE_8__.func,
24589 components: prop_types__WEBPACK_IMPORTED_MODULE_8__.object
24590 }
24591
24592
24593 /***/ }),
24594
24595 /***/ "../node_modules/react-markdown/lib/rehype-filter.js":
24596 /*!***********************************************************!*\
24597 !*** ../node_modules/react-markdown/lib/rehype-filter.js ***!
24598 \***********************************************************/
24599 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24600
24601 "use strict";
24602 __webpack_require__.r(__webpack_exports__);
24603 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24604 /* harmony export */ "default": () => (/* binding */ rehypeFilter)
24605 /* harmony export */ });
24606 /* harmony import */ var unist_util_visit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! unist-util-visit */ "../node_modules/unist-util-visit/lib/index.js");
24607
24608
24609 /**
24610 * @typedef {import('unist').Node} Node
24611 * @typedef {import('hast').Root} Root
24612 * @typedef {import('hast').Element} Element
24613 *
24614 * @callback AllowElement
24615 * @param {Element} element
24616 * @param {number} index
24617 * @param {Element|Root} parent
24618 * @returns {boolean|undefined}
24619 *
24620 * @typedef Options
24621 * @property {Array<string>} [allowedElements]
24622 * @property {Array<string>} [disallowedElements=[]]
24623 * @property {AllowElement} [allowElement]
24624 * @property {boolean} [unwrapDisallowed=false]
24625 */
24626
24627 /**
24628 * @type {import('unified').Plugin<[Options], Root>}
24629 */
24630 function rehypeFilter(options) {
24631 if (options.allowedElements && options.disallowedElements) {
24632 throw new TypeError(
24633 'Only one of `allowedElements` and `disallowedElements` should be defined'
24634 )
24635 }
24636
24637 if (
24638 options.allowedElements ||
24639 options.disallowedElements ||
24640 options.allowElement
24641 ) {
24642 return (tree) => {
24643 (0,unist_util_visit__WEBPACK_IMPORTED_MODULE_0__.visit)(tree, 'element', (node, index, parent_) => {
24644 const parent = /** @type {Element|Root} */ (parent_)
24645 /** @type {boolean|undefined} */
24646 let remove
24647
24648 if (options.allowedElements) {
24649 remove = !options.allowedElements.includes(node.tagName)
24650 } else if (options.disallowedElements) {
24651 remove = options.disallowedElements.includes(node.tagName)
24652 }
24653
24654 if (!remove && options.allowElement && typeof index === 'number') {
24655 remove = !options.allowElement(node, index, parent)
24656 }
24657
24658 if (remove && typeof index === 'number') {
24659 if (options.unwrapDisallowed && node.children) {
24660 parent.children.splice(index, 1, ...node.children)
24661 } else {
24662 parent.children.splice(index, 1)
24663 }
24664
24665 return index
24666 }
24667
24668 return undefined
24669 })
24670 }
24671 }
24672 }
24673
24674
24675 /***/ }),
24676
24677 /***/ "../node_modules/react-markdown/lib/uri-transformer.js":
24678 /*!*************************************************************!*\
24679 !*** ../node_modules/react-markdown/lib/uri-transformer.js ***!
24680 \*************************************************************/
24681 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24682
24683 "use strict";
24684 __webpack_require__.r(__webpack_exports__);
24685 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24686 /* harmony export */ "uriTransformer": () => (/* binding */ uriTransformer)
24687 /* harmony export */ });
24688 const protocols = ['http', 'https', 'mailto', 'tel']
24689
24690 /**
24691 * @param {string} uri
24692 * @returns {string}
24693 */
24694 function uriTransformer(uri) {
24695 const url = (uri || '').trim()
24696 const first = url.charAt(0)
24697
24698 if (first === '#' || first === '/') {
24699 return url
24700 }
24701
24702 const colon = url.indexOf(':')
24703 if (colon === -1) {
24704 return url
24705 }
24706
24707 let index = -1
24708
24709 while (++index < protocols.length) {
24710 const protocol = protocols[index]
24711
24712 if (
24713 colon === protocol.length &&
24714 url.slice(0, protocol.length).toLowerCase() === protocol
24715 ) {
24716 return url
24717 }
24718 }
24719
24720 index = url.indexOf('?')
24721 if (index !== -1 && colon > index) {
24722 return url
24723 }
24724
24725 index = url.indexOf('#')
24726 if (index !== -1 && colon > index) {
24727 return url
24728 }
24729
24730 // eslint-disable-next-line no-script-url
24731 return 'javascript:void(0)'
24732 }
24733
24734
24735 /***/ }),
24736
24737 /***/ "../node_modules/remark-parse/index.js":
24738 /*!*********************************************!*\
24739 !*** ../node_modules/remark-parse/index.js ***!
24740 \*********************************************/
24741 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24742
24743 "use strict";
24744 __webpack_require__.r(__webpack_exports__);
24745 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24746 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
24747 /* harmony export */ });
24748 /* harmony import */ var _lib_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/index.js */ "../node_modules/remark-parse/lib/index.js");
24749
24750
24751 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_lib_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
24752
24753
24754 /***/ }),
24755
24756 /***/ "../node_modules/remark-parse/lib/index.js":
24757 /*!*************************************************!*\
24758 !*** ../node_modules/remark-parse/lib/index.js ***!
24759 \*************************************************/
24760 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24761
24762 "use strict";
24763 __webpack_require__.r(__webpack_exports__);
24764 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24765 /* harmony export */ "default": () => (/* binding */ remarkParse)
24766 /* harmony export */ });
24767 /* harmony import */ var mdast_util_from_markdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mdast-util-from-markdown */ "../node_modules/mdast-util-from-markdown/dev/lib/index.js");
24768 /**
24769 * @typedef {import('mdast').Root} Root
24770 * @typedef {import('mdast-util-from-markdown').Options} Options
24771 */
24772
24773
24774
24775 /** @type {import('unified').Plugin<[Options?] | void[], string, Root>} */
24776 function remarkParse(options) {
24777 /** @type {import('unified').ParserFunction<Root>} */
24778 const parser = (doc) => {
24779 // Assume options.
24780 const settings = /** @type {Options} */ (this.data('settings'))
24781
24782 return (0,mdast_util_from_markdown__WEBPACK_IMPORTED_MODULE_0__.fromMarkdown)(
24783 doc,
24784 Object.assign({}, settings, options, {
24785 // Note: these options are not in the readme.
24786 // The goal is for them to be set by plugins on `data` instead of being
24787 // passed by users.
24788 extensions: this.data('micromarkExtensions') || [],
24789 mdastExtensions: this.data('fromMarkdownExtensions') || []
24790 })
24791 )
24792 }
24793
24794 Object.assign(this, {Parser: parser})
24795 }
24796
24797
24798 /***/ }),
24799
24800 /***/ "../node_modules/remark-rehype/lib/index.js":
24801 /*!**************************************************!*\
24802 !*** ../node_modules/remark-rehype/lib/index.js ***!
24803 \**************************************************/
24804 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24805
24806 "use strict";
24807 __webpack_require__.r(__webpack_exports__);
24808 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24809 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
24810 /* harmony export */ });
24811 /* harmony import */ var mdast_util_to_hast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mdast-util-to-hast */ "../node_modules/mdast-util-to-hast/lib/index.js");
24812 /**
24813 * @typedef {import('hast').Root} HastRoot
24814 * @typedef {import('mdast').Root} MdastRoot
24815 * @typedef {import('mdast-util-to-hast').Options} Options
24816 * @typedef {import('unified').Processor<any, any, any, any>} Processor
24817 *
24818 * @typedef {import('mdast-util-to-hast')} DoNotTouchAsThisImportIncludesRawInTree
24819 */
24820
24821
24822
24823 // Note: the `<MdastRoot, HastRoot>` overload doesn’t seem to work :'(
24824
24825 /**
24826 * Plugin that turns markdown into HTML to support rehype.
24827 *
24828 * * If a destination processor is given, that processor runs with a new HTML
24829 * (hast) tree (bridge-mode).
24830 * As the given processor runs with a hast tree, and rehype plugins support
24831 * hast, that means rehype plugins can be used with the given processor.
24832 * The hast tree is discarded in the end.
24833 * It’s highly unlikely that you want to do this.
24834 * * The common case is to not pass a destination processor, in which case the
24835 * current processor continues running with a new HTML (hast) tree
24836 * (mutate-mode).
24837 * As the current processor continues with a hast tree, and rehype plugins
24838 * support hast, that means rehype plugins can be used after
24839 * `remark-rehype`.
24840 * It’s likely that this is what you want to do.
24841 *
24842 * @param destination
24843 * Optional unified processor.
24844 * @param options
24845 * Options passed to `mdast-util-to-hast`.
24846 */
24847 const remarkRehype =
24848 /** @type {(import('unified').Plugin<[Processor, Options?]|[null|undefined, Options?]|[Options]|[], MdastRoot>)} */
24849 (
24850 function (destination, options) {
24851 return destination && 'run' in destination
24852 ? bridge(destination, options)
24853 : mutate(destination || options)
24854 }
24855 )
24856
24857 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (remarkRehype);
24858
24859 /**
24860 * Bridge-mode.
24861 * Runs the destination with the new hast tree.
24862 *
24863 * @type {import('unified').Plugin<[Processor, Options?], MdastRoot>}
24864 */
24865 function bridge(destination, options) {
24866 return (node, file, next) => {
24867 destination.run((0,mdast_util_to_hast__WEBPACK_IMPORTED_MODULE_0__.toHast)(node, options), file, (error) => {
24868 next(error)
24869 })
24870 }
24871 }
24872
24873 /**
24874 * Mutate-mode.
24875 * Further plugins run on the hast tree.
24876 *
24877 * @type {import('unified').Plugin<[Options?]|void[], MdastRoot, HastRoot>}
24878 */
24879 function mutate(options) {
24880 // @ts-expect-error: assume a corresponding node is returned by `toHast`.
24881 return (node) => (0,mdast_util_to_hast__WEBPACK_IMPORTED_MODULE_0__.toHast)(node, options)
24882 }
24883
24884
24885 /***/ }),
24886
24887 /***/ "../node_modules/space-separated-tokens/index.js":
24888 /*!*******************************************************!*\
24889 !*** ../node_modules/space-separated-tokens/index.js ***!
24890 \*******************************************************/
24891 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24892
24893 "use strict";
24894 __webpack_require__.r(__webpack_exports__);
24895 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24896 /* harmony export */ "parse": () => (/* binding */ parse),
24897 /* harmony export */ "stringify": () => (/* binding */ stringify)
24898 /* harmony export */ });
24899 /**
24900 * Parse space-separated tokens to an array of strings.
24901 *
24902 * @param {string} value
24903 * Space-separated tokens.
24904 * @returns {Array<string>}
24905 * List of tokens.
24906 */
24907 function parse(value) {
24908 const input = String(value || '').trim()
24909 return input ? input.split(/[ \t\n\r\f]+/g) : []
24910 }
24911
24912 /**
24913 * Serialize an array of strings as space separated-tokens.
24914 *
24915 * @param {Array<string|number>} values
24916 * List of tokens.
24917 * @returns {string}
24918 * Space-separated tokens.
24919 */
24920 function stringify(values) {
24921 return values.join(' ').trim()
24922 }
24923
24924
24925 /***/ }),
24926
24927 /***/ "../node_modules/style-to-object/index.mjs":
24928 /*!*************************************************!*\
24929 !*** ../node_modules/style-to-object/index.mjs ***!
24930 \*************************************************/
24931 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24932
24933 "use strict";
24934 __webpack_require__.r(__webpack_exports__);
24935 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24936 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
24937 /* harmony export */ });
24938 /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "../node_modules/style-to-object/index.js");
24939
24940
24941 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_index_js__WEBPACK_IMPORTED_MODULE_0__);
24942
24943
24944 /***/ }),
24945
24946 /***/ "../node_modules/trim-lines/index.js":
24947 /*!*******************************************!*\
24948 !*** ../node_modules/trim-lines/index.js ***!
24949 \*******************************************/
24950 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
24951
24952 "use strict";
24953 __webpack_require__.r(__webpack_exports__);
24954 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24955 /* harmony export */ "trimLines": () => (/* binding */ trimLines)
24956 /* harmony export */ });
24957 const tab = 9 /* `\t` */
24958 const space = 32 /* ` ` */
24959
24960 /**
24961 * Remove initial and final spaces and tabs at the line breaks in `value`.
24962 * Does not trim initial and final spaces and tabs of the value itself.
24963 *
24964 * @param {string} value
24965 * Value to trim.
24966 * @returns {string}
24967 * Trimmed value.
24968 */
24969 function trimLines(value) {
24970 const source = String(value)
24971 const search = /\r?\n|\r/g
24972 let match = search.exec(source)
24973 let last = 0
24974 /** @type {Array<string>} */
24975 const lines = []
24976
24977 while (match) {
24978 lines.push(
24979 trimLine(source.slice(last, match.index), last > 0, true),
24980 match[0]
24981 )
24982
24983 last = match.index + match[0].length
24984 match = search.exec(source)
24985 }
24986
24987 lines.push(trimLine(source.slice(last), last > 0, false))
24988
24989 return lines.join('')
24990 }
24991
24992 /**
24993 * @param {string} value
24994 * Line to trim.
24995 * @param {boolean} start
24996 * Whether to trim the start of the line.
24997 * @param {boolean} end
24998 * Whether to trim the end of the line.
24999 * @returns {string}
25000 * Trimmed line.
25001 */
25002 function trimLine(value, start, end) {
25003 let startIndex = 0
25004 let endIndex = value.length
25005
25006 if (start) {
25007 let code = value.codePointAt(startIndex)
25008
25009 while (code === tab || code === space) {
25010 startIndex++
25011 code = value.codePointAt(startIndex)
25012 }
25013 }
25014
25015 if (end) {
25016 let code = value.codePointAt(endIndex - 1)
25017
25018 while (code === tab || code === space) {
25019 endIndex--
25020 code = value.codePointAt(endIndex - 1)
25021 }
25022 }
25023
25024 return endIndex > startIndex ? value.slice(startIndex, endIndex) : ''
25025 }
25026
25027
25028 /***/ }),
25029
25030 /***/ "../node_modules/trough/index.js":
25031 /*!***************************************!*\
25032 !*** ../node_modules/trough/index.js ***!
25033 \***************************************/
25034 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25035
25036 "use strict";
25037 __webpack_require__.r(__webpack_exports__);
25038 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25039 /* harmony export */ "trough": () => (/* binding */ trough),
25040 /* harmony export */ "wrap": () => (/* binding */ wrap)
25041 /* harmony export */ });
25042 /**
25043 * @typedef {(error?: Error|null|undefined, ...output: Array<any>) => void} Callback
25044 * @typedef {(...input: Array<any>) => any} Middleware
25045 *
25046 * @typedef {(...input: Array<any>) => void} Run
25047 * Call all middleware.
25048 * @typedef {(fn: Middleware) => Pipeline} Use
25049 * Add `fn` (middleware) to the list.
25050 * @typedef {{run: Run, use: Use}} Pipeline
25051 * Middleware.
25052 */
25053
25054 /**
25055 * Create new middleware.
25056 *
25057 * @returns {Pipeline}
25058 */
25059 function trough() {
25060 /** @type {Array<Middleware>} */
25061 const fns = []
25062 /** @type {Pipeline} */
25063 const pipeline = {run, use}
25064
25065 return pipeline
25066
25067 /** @type {Run} */
25068 function run(...values) {
25069 let middlewareIndex = -1
25070 /** @type {Callback} */
25071 const callback = values.pop()
25072
25073 if (typeof callback !== 'function') {
25074 throw new TypeError('Expected function as last argument, not ' + callback)
25075 }
25076
25077 next(null, ...values)
25078
25079 /**
25080 * Run the next `fn`, or we’re done.
25081 *
25082 * @param {Error|null|undefined} error
25083 * @param {Array<any>} output
25084 */
25085 function next(error, ...output) {
25086 const fn = fns[++middlewareIndex]
25087 let index = -1
25088
25089 if (error) {
25090 callback(error)
25091 return
25092 }
25093
25094 // Copy non-nullish input into values.
25095 while (++index < values.length) {
25096 if (output[index] === null || output[index] === undefined) {
25097 output[index] = values[index]
25098 }
25099 }
25100
25101 // Save the newly created `output` for the next call.
25102 values = output
25103
25104 // Next or done.
25105 if (fn) {
25106 wrap(fn, next)(...output)
25107 } else {
25108 callback(null, ...output)
25109 }
25110 }
25111 }
25112
25113 /** @type {Use} */
25114 function use(middelware) {
25115 if (typeof middelware !== 'function') {
25116 throw new TypeError(
25117 'Expected `middelware` to be a function, not ' + middelware
25118 )
25119 }
25120
25121 fns.push(middelware)
25122 return pipeline
25123 }
25124 }
25125
25126 /**
25127 * Wrap `middleware`.
25128 * Can be sync or async; return a promise, receive a callback, or return new
25129 * values and errors.
25130 *
25131 * @param {Middleware} middleware
25132 * @param {Callback} callback
25133 */
25134 function wrap(middleware, callback) {
25135 /** @type {boolean} */
25136 let called
25137
25138 return wrapped
25139
25140 /**
25141 * Call `middleware`.
25142 * @this {any}
25143 * @param {Array<any>} parameters
25144 * @returns {void}
25145 */
25146 function wrapped(...parameters) {
25147 const fnExpectsCallback = middleware.length > parameters.length
25148 /** @type {any} */
25149 let result
25150
25151 if (fnExpectsCallback) {
25152 parameters.push(done)
25153 }
25154
25155 try {
25156 result = middleware.apply(this, parameters)
25157 } catch (error) {
25158 const exception = /** @type {Error} */ (error)
25159
25160 // Well, this is quite the pickle.
25161 // `middleware` received a callback and called it synchronously, but that
25162 // threw an error.
25163 // The only thing left to do is to throw the thing instead.
25164 if (fnExpectsCallback && called) {
25165 throw exception
25166 }
25167
25168 return done(exception)
25169 }
25170
25171 if (!fnExpectsCallback) {
25172 if (result instanceof Promise) {
25173 result.then(then, done)
25174 } else if (result instanceof Error) {
25175 done(result)
25176 } else {
25177 then(result)
25178 }
25179 }
25180 }
25181
25182 /**
25183 * Call `callback`, only once.
25184 * @type {Callback}
25185 */
25186 function done(error, ...output) {
25187 if (!called) {
25188 called = true
25189 callback(error, ...output)
25190 }
25191 }
25192
25193 /**
25194 * Call `done` with one value.
25195 *
25196 * @param {any} [value]
25197 */
25198 function then(value) {
25199 done(null, value)
25200 }
25201 }
25202
25203
25204 /***/ }),
25205
25206 /***/ "../node_modules/unified/lib/index.js":
25207 /*!********************************************!*\
25208 !*** ../node_modules/unified/lib/index.js ***!
25209 \********************************************/
25210 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25211
25212 "use strict";
25213 __webpack_require__.r(__webpack_exports__);
25214 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25215 /* harmony export */ "unified": () => (/* binding */ unified)
25216 /* harmony export */ });
25217 /* harmony import */ var bail__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! bail */ "../node_modules/bail/index.js");
25218 /* harmony import */ var is_buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-buffer */ "../node_modules/is-buffer/index.js");
25219 /* harmony import */ var extend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! extend */ "../node_modules/extend/index.js");
25220 /* harmony import */ var is_plain_obj__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! is-plain-obj */ "../node_modules/is-plain-obj/index.js");
25221 /* harmony import */ var trough__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! trough */ "../node_modules/trough/index.js");
25222 /* harmony import */ var vfile__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vfile */ "../node_modules/vfile/lib/index.js");
25223 /**
25224 * @typedef {import('unist').Node} Node
25225 * @typedef {import('vfile').VFileCompatible} VFileCompatible
25226 * @typedef {import('vfile').VFileValue} VFileValue
25227 * @typedef {import('..').Processor} Processor
25228 * @typedef {import('..').Plugin} Plugin
25229 * @typedef {import('..').Preset} Preset
25230 * @typedef {import('..').Pluggable} Pluggable
25231 * @typedef {import('..').PluggableList} PluggableList
25232 * @typedef {import('..').Transformer} Transformer
25233 * @typedef {import('..').Parser} Parser
25234 * @typedef {import('..').Compiler} Compiler
25235 * @typedef {import('..').RunCallback} RunCallback
25236 * @typedef {import('..').ProcessCallback} ProcessCallback
25237 *
25238 * @typedef Context
25239 * @property {Node} tree
25240 * @property {VFile} file
25241 */
25242
25243
25244
25245
25246
25247
25248
25249
25250 // Expose a frozen processor.
25251 const unified = base().freeze()
25252
25253 const own = {}.hasOwnProperty
25254
25255 // Function to create the first processor.
25256 /**
25257 * @returns {Processor}
25258 */
25259 function base() {
25260 const transformers = (0,trough__WEBPACK_IMPORTED_MODULE_3__.trough)()
25261 /** @type {Processor['attachers']} */
25262 const attachers = []
25263 /** @type {Record<string, unknown>} */
25264 let namespace = {}
25265 /** @type {boolean|undefined} */
25266 let frozen
25267 let freezeIndex = -1
25268
25269 // Data management.
25270 // @ts-expect-error: overloads are handled.
25271 processor.data = data
25272 processor.Parser = undefined
25273 processor.Compiler = undefined
25274
25275 // Lock.
25276 processor.freeze = freeze
25277
25278 // Plugins.
25279 processor.attachers = attachers
25280 // @ts-expect-error: overloads are handled.
25281 processor.use = use
25282
25283 // API.
25284 processor.parse = parse
25285 processor.stringify = stringify
25286 // @ts-expect-error: overloads are handled.
25287 processor.run = run
25288 processor.runSync = runSync
25289 // @ts-expect-error: overloads are handled.
25290 processor.process = process
25291 processor.processSync = processSync
25292
25293 // Expose.
25294 return processor
25295
25296 // Create a new processor based on the processor in the current scope.
25297 /** @type {Processor} */
25298 function processor() {
25299 const destination = base()
25300 let index = -1
25301
25302 while (++index < attachers.length) {
25303 destination.use(...attachers[index])
25304 }
25305
25306 destination.data(extend__WEBPACK_IMPORTED_MODULE_1__(true, {}, namespace))
25307
25308 return destination
25309 }
25310
25311 /**
25312 * @param {string|Record<string, unknown>} [key]
25313 * @param {unknown} [value]
25314 * @returns {unknown}
25315 */
25316 function data(key, value) {
25317 if (typeof key === 'string') {
25318 // Set `key`.
25319 if (arguments.length === 2) {
25320 assertUnfrozen('data', frozen)
25321 namespace[key] = value
25322 return processor
25323 }
25324
25325 // Get `key`.
25326 return (own.call(namespace, key) && namespace[key]) || null
25327 }
25328
25329 // Set space.
25330 if (key) {
25331 assertUnfrozen('data', frozen)
25332 namespace = key
25333 return processor
25334 }
25335
25336 // Get space.
25337 return namespace
25338 }
25339
25340 /** @type {Processor['freeze']} */
25341 function freeze() {
25342 if (frozen) {
25343 return processor
25344 }
25345
25346 while (++freezeIndex < attachers.length) {
25347 const [attacher, ...options] = attachers[freezeIndex]
25348
25349 if (options[0] === false) {
25350 continue
25351 }
25352
25353 if (options[0] === true) {
25354 options[0] = undefined
25355 }
25356
25357 /** @type {Transformer|void} */
25358 const transformer = attacher.call(processor, ...options)
25359
25360 if (typeof transformer === 'function') {
25361 transformers.use(transformer)
25362 }
25363 }
25364
25365 frozen = true
25366 freezeIndex = Number.POSITIVE_INFINITY
25367
25368 return processor
25369 }
25370
25371 /**
25372 * @param {Pluggable|null|undefined} [value]
25373 * @param {...unknown} options
25374 * @returns {Processor}
25375 */
25376 function use(value, ...options) {
25377 /** @type {Record<string, unknown>|undefined} */
25378 let settings
25379
25380 assertUnfrozen('use', frozen)
25381
25382 if (value === null || value === undefined) {
25383 // Empty.
25384 } else if (typeof value === 'function') {
25385 addPlugin(value, ...options)
25386 } else if (typeof value === 'object') {
25387 if (Array.isArray(value)) {
25388 addList(value)
25389 } else {
25390 addPreset(value)
25391 }
25392 } else {
25393 throw new TypeError('Expected usable value, not `' + value + '`')
25394 }
25395
25396 if (settings) {
25397 namespace.settings = Object.assign(namespace.settings || {}, settings)
25398 }
25399
25400 return processor
25401
25402 /**
25403 * @param {import('..').Pluggable<unknown[]>} value
25404 * @returns {void}
25405 */
25406 function add(value) {
25407 if (typeof value === 'function') {
25408 addPlugin(value)
25409 } else if (typeof value === 'object') {
25410 if (Array.isArray(value)) {
25411 const [plugin, ...options] = value
25412 addPlugin(plugin, ...options)
25413 } else {
25414 addPreset(value)
25415 }
25416 } else {
25417 throw new TypeError('Expected usable value, not `' + value + '`')
25418 }
25419 }
25420
25421 /**
25422 * @param {Preset} result
25423 * @returns {void}
25424 */
25425 function addPreset(result) {
25426 addList(result.plugins)
25427
25428 if (result.settings) {
25429 settings = Object.assign(settings || {}, result.settings)
25430 }
25431 }
25432
25433 /**
25434 * @param {PluggableList|null|undefined} [plugins]
25435 * @returns {void}
25436 */
25437 function addList(plugins) {
25438 let index = -1
25439
25440 if (plugins === null || plugins === undefined) {
25441 // Empty.
25442 } else if (Array.isArray(plugins)) {
25443 while (++index < plugins.length) {
25444 const thing = plugins[index]
25445 add(thing)
25446 }
25447 } else {
25448 throw new TypeError('Expected a list of plugins, not `' + plugins + '`')
25449 }
25450 }
25451
25452 /**
25453 * @param {Plugin} plugin
25454 * @param {...unknown} [value]
25455 * @returns {void}
25456 */
25457 function addPlugin(plugin, value) {
25458 let index = -1
25459 /** @type {Processor['attachers'][number]|undefined} */
25460 let entry
25461
25462 while (++index < attachers.length) {
25463 if (attachers[index][0] === plugin) {
25464 entry = attachers[index]
25465 break
25466 }
25467 }
25468
25469 if (entry) {
25470 if ((0,is_plain_obj__WEBPACK_IMPORTED_MODULE_2__["default"])(entry[1]) && (0,is_plain_obj__WEBPACK_IMPORTED_MODULE_2__["default"])(value)) {
25471 value = extend__WEBPACK_IMPORTED_MODULE_1__(true, entry[1], value)
25472 }
25473
25474 entry[1] = value
25475 } else {
25476 // @ts-expect-error: fine.
25477 attachers.push([...arguments])
25478 }
25479 }
25480 }
25481
25482 /** @type {Processor['parse']} */
25483 function parse(doc) {
25484 processor.freeze()
25485 const file = vfile(doc)
25486 const Parser = processor.Parser
25487 assertParser('parse', Parser)
25488
25489 if (newable(Parser, 'parse')) {
25490 // @ts-expect-error: `newable` checks this.
25491 return new Parser(String(file), file).parse()
25492 }
25493
25494 // @ts-expect-error: `newable` checks this.
25495 return Parser(String(file), file) // eslint-disable-line new-cap
25496 }
25497
25498 /** @type {Processor['stringify']} */
25499 function stringify(node, doc) {
25500 processor.freeze()
25501 const file = vfile(doc)
25502 const Compiler = processor.Compiler
25503 assertCompiler('stringify', Compiler)
25504 assertNode(node)
25505
25506 if (newable(Compiler, 'compile')) {
25507 // @ts-expect-error: `newable` checks this.
25508 return new Compiler(node, file).compile()
25509 }
25510
25511 // @ts-expect-error: `newable` checks this.
25512 return Compiler(node, file) // eslint-disable-line new-cap
25513 }
25514
25515 /**
25516 * @param {Node} node
25517 * @param {VFileCompatible|RunCallback} [doc]
25518 * @param {RunCallback} [callback]
25519 * @returns {Promise<Node>|void}
25520 */
25521 function run(node, doc, callback) {
25522 assertNode(node)
25523 processor.freeze()
25524
25525 if (!callback && typeof doc === 'function') {
25526 callback = doc
25527 doc = undefined
25528 }
25529
25530 if (!callback) {
25531 return new Promise(executor)
25532 }
25533
25534 executor(null, callback)
25535
25536 /**
25537 * @param {null|((node: Node) => void)} resolve
25538 * @param {(error: Error) => void} reject
25539 * @returns {void}
25540 */
25541 function executor(resolve, reject) {
25542 // @ts-expect-error: `doc` can’t be a callback anymore, we checked.
25543 transformers.run(node, vfile(doc), done)
25544
25545 /**
25546 * @param {Error|null} error
25547 * @param {Node} tree
25548 * @param {VFile} file
25549 * @returns {void}
25550 */
25551 function done(error, tree, file) {
25552 tree = tree || node
25553 if (error) {
25554 reject(error)
25555 } else if (resolve) {
25556 resolve(tree)
25557 } else {
25558 // @ts-expect-error: `callback` is defined if `resolve` is not.
25559 callback(null, tree, file)
25560 }
25561 }
25562 }
25563 }
25564
25565 /** @type {Processor['runSync']} */
25566 function runSync(node, file) {
25567 /** @type {Node|undefined} */
25568 let result
25569 /** @type {boolean|undefined} */
25570 let complete
25571
25572 processor.run(node, file, done)
25573
25574 assertDone('runSync', 'run', complete)
25575
25576 // @ts-expect-error: we either bailed on an error or have a tree.
25577 return result
25578
25579 /**
25580 * @param {Error|null} [error]
25581 * @param {Node} [tree]
25582 * @returns {void}
25583 */
25584 function done(error, tree) {
25585 ;(0,bail__WEBPACK_IMPORTED_MODULE_4__.bail)(error)
25586 result = tree
25587 complete = true
25588 }
25589 }
25590
25591 /**
25592 * @param {VFileCompatible} doc
25593 * @param {ProcessCallback} [callback]
25594 * @returns {Promise<VFile>|undefined}
25595 */
25596 function process(doc, callback) {
25597 processor.freeze()
25598 assertParser('process', processor.Parser)
25599 assertCompiler('process', processor.Compiler)
25600
25601 if (!callback) {
25602 return new Promise(executor)
25603 }
25604
25605 executor(null, callback)
25606
25607 /**
25608 * @param {null|((file: VFile) => void)} resolve
25609 * @param {(error?: Error|null|undefined) => void} reject
25610 * @returns {void}
25611 */
25612 function executor(resolve, reject) {
25613 const file = vfile(doc)
25614
25615 processor.run(processor.parse(file), file, (error, tree, file) => {
25616 if (error || !tree || !file) {
25617 done(error)
25618 } else {
25619 /** @type {unknown} */
25620 const result = processor.stringify(tree, file)
25621
25622 if (result === undefined || result === null) {
25623 // Empty.
25624 } else if (looksLikeAVFileValue(result)) {
25625 file.value = result
25626 } else {
25627 file.result = result
25628 }
25629
25630 done(error, file)
25631 }
25632 })
25633
25634 /**
25635 * @param {Error|null|undefined} [error]
25636 * @param {VFile|undefined} [file]
25637 * @returns {void}
25638 */
25639 function done(error, file) {
25640 if (error || !file) {
25641 reject(error)
25642 } else if (resolve) {
25643 resolve(file)
25644 } else {
25645 // @ts-expect-error: `callback` is defined if `resolve` is not.
25646 callback(null, file)
25647 }
25648 }
25649 }
25650 }
25651
25652 /** @type {Processor['processSync']} */
25653 function processSync(doc) {
25654 /** @type {boolean|undefined} */
25655 let complete
25656
25657 processor.freeze()
25658 assertParser('processSync', processor.Parser)
25659 assertCompiler('processSync', processor.Compiler)
25660
25661 const file = vfile(doc)
25662
25663 processor.process(file, done)
25664
25665 assertDone('processSync', 'process', complete)
25666
25667 return file
25668
25669 /**
25670 * @param {Error|null|undefined} [error]
25671 * @returns {void}
25672 */
25673 function done(error) {
25674 complete = true
25675 ;(0,bail__WEBPACK_IMPORTED_MODULE_4__.bail)(error)
25676 }
25677 }
25678 }
25679
25680 /**
25681 * Check if `value` is a constructor.
25682 *
25683 * @param {unknown} value
25684 * @param {string} name
25685 * @returns {boolean}
25686 */
25687 function newable(value, name) {
25688 return (
25689 typeof value === 'function' &&
25690 // Prototypes do exist.
25691 // type-coverage:ignore-next-line
25692 value.prototype &&
25693 // A function with keys in its prototype is probably a constructor.
25694 // Classes’ prototype methods are not enumerable, so we check if some value
25695 // exists in the prototype.
25696 // type-coverage:ignore-next-line
25697 (keys(value.prototype) || name in value.prototype)
25698 )
25699 }
25700
25701 /**
25702 * Check if `value` is an object with keys.
25703 *
25704 * @param {Record<string, unknown>} value
25705 * @returns {boolean}
25706 */
25707 function keys(value) {
25708 /** @type {string} */
25709 let key
25710
25711 for (key in value) {
25712 if (own.call(value, key)) {
25713 return true
25714 }
25715 }
25716
25717 return false
25718 }
25719
25720 /**
25721 * Assert a parser is available.
25722 *
25723 * @param {string} name
25724 * @param {unknown} value
25725 * @returns {asserts value is Parser}
25726 */
25727 function assertParser(name, value) {
25728 if (typeof value !== 'function') {
25729 throw new TypeError('Cannot `' + name + '` without `Parser`')
25730 }
25731 }
25732
25733 /**
25734 * Assert a compiler is available.
25735 *
25736 * @param {string} name
25737 * @param {unknown} value
25738 * @returns {asserts value is Compiler}
25739 */
25740 function assertCompiler(name, value) {
25741 if (typeof value !== 'function') {
25742 throw new TypeError('Cannot `' + name + '` without `Compiler`')
25743 }
25744 }
25745
25746 /**
25747 * Assert the processor is not frozen.
25748 *
25749 * @param {string} name
25750 * @param {unknown} frozen
25751 * @returns {asserts frozen is false}
25752 */
25753 function assertUnfrozen(name, frozen) {
25754 if (frozen) {
25755 throw new Error(
25756 'Cannot call `' +
25757 name +
25758 '` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.'
25759 )
25760 }
25761 }
25762
25763 /**
25764 * Assert `node` is a unist node.
25765 *
25766 * @param {unknown} node
25767 * @returns {asserts node is Node}
25768 */
25769 function assertNode(node) {
25770 // `isPlainObj` unfortunately uses `any` instead of `unknown`.
25771 // type-coverage:ignore-next-line
25772 if (!(0,is_plain_obj__WEBPACK_IMPORTED_MODULE_2__["default"])(node) || typeof node.type !== 'string') {
25773 throw new TypeError('Expected node, got `' + node + '`')
25774 // Fine.
25775 }
25776 }
25777
25778 /**
25779 * Assert that `complete` is `true`.
25780 *
25781 * @param {string} name
25782 * @param {string} asyncName
25783 * @param {unknown} complete
25784 * @returns {asserts complete is true}
25785 */
25786 function assertDone(name, asyncName, complete) {
25787 if (!complete) {
25788 throw new Error(
25789 '`' + name + '` finished async. Use `' + asyncName + '` instead'
25790 )
25791 }
25792 }
25793
25794 /**
25795 * @param {VFileCompatible} [value]
25796 * @returns {VFile}
25797 */
25798 function vfile(value) {
25799 return looksLikeAVFile(value) ? value : new vfile__WEBPACK_IMPORTED_MODULE_5__.VFile(value)
25800 }
25801
25802 /**
25803 * @param {VFileCompatible} [value]
25804 * @returns {value is VFile}
25805 */
25806 function looksLikeAVFile(value) {
25807 return Boolean(
25808 value &&
25809 typeof value === 'object' &&
25810 'message' in value &&
25811 'messages' in value
25812 )
25813 }
25814
25815 /**
25816 * @param {unknown} [value]
25817 * @returns {value is VFileValue}
25818 */
25819 function looksLikeAVFileValue(value) {
25820 return typeof value === 'string' || is_buffer__WEBPACK_IMPORTED_MODULE_0__(value)
25821 }
25822
25823
25824 /***/ }),
25825
25826 /***/ "../node_modules/unist-util-generated/lib/index.js":
25827 /*!*********************************************************!*\
25828 !*** ../node_modules/unist-util-generated/lib/index.js ***!
25829 \*********************************************************/
25830 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25831
25832 "use strict";
25833 __webpack_require__.r(__webpack_exports__);
25834 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25835 /* harmony export */ "generated": () => (/* binding */ generated)
25836 /* harmony export */ });
25837 /**
25838 * @typedef PointLike
25839 * @property {number | null | undefined} [line]
25840 * @property {number | null | undefined} [column]
25841 * @property {number | null | undefined} [offset]
25842 *
25843 * @typedef PositionLike
25844 * @property {PointLike | null | undefined} [start]
25845 * @property {PointLike | null | undefined} [end]
25846 *
25847 * @typedef NodeLike
25848 * @property {PositionLike | null | undefined} [position]
25849 */
25850
25851 /**
25852 * Check if `node` is generated.
25853 *
25854 * @param {NodeLike | null | undefined} [node]
25855 * Node to check.
25856 * @returns {boolean}
25857 * Whether `node` is generated (does not have positional info).
25858 */
25859 function generated(node) {
25860 return (
25861 !node ||
25862 !node.position ||
25863 !node.position.start ||
25864 !node.position.start.line ||
25865 !node.position.start.column ||
25866 !node.position.end ||
25867 !node.position.end.line ||
25868 !node.position.end.column
25869 )
25870 }
25871
25872
25873 /***/ }),
25874
25875 /***/ "../node_modules/unist-util-is/lib/index.js":
25876 /*!**************************************************!*\
25877 !*** ../node_modules/unist-util-is/lib/index.js ***!
25878 \**************************************************/
25879 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
25880
25881 "use strict";
25882 __webpack_require__.r(__webpack_exports__);
25883 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
25884 /* harmony export */ "convert": () => (/* binding */ convert),
25885 /* harmony export */ "is": () => (/* binding */ is)
25886 /* harmony export */ });
25887 /**
25888 * @typedef {import('unist').Node} Node
25889 * @typedef {import('unist').Parent} Parent
25890 */
25891
25892 /**
25893 * @typedef {Record<string, unknown>} Props
25894 * @typedef {null | undefined | string | Props | TestFunctionAnything | Array<string | Props | TestFunctionAnything>} Test
25895 * Check for an arbitrary node, unaware of TypeScript inferral.
25896 *
25897 * @callback TestFunctionAnything
25898 * Check if a node passes a test, unaware of TypeScript inferral.
25899 * @param {unknown} this
25900 * The given context.
25901 * @param {Node} node
25902 * A node.
25903 * @param {number | null | undefined} [index]
25904 * The node’s position in its parent.
25905 * @param {Parent | null | undefined} [parent]
25906 * The node’s parent.
25907 * @returns {boolean | void}
25908 * Whether this node passes the test.
25909 */
25910
25911 /**
25912 * @template {Node} Kind
25913 * Node type.
25914 * @typedef {Kind['type'] | Partial<Kind> | TestFunctionPredicate<Kind> | Array<Kind['type'] | Partial<Kind> | TestFunctionPredicate<Kind>>} PredicateTest
25915 * Check for a node that can be inferred by TypeScript.
25916 */
25917
25918 /**
25919 * Check if a node passes a certain test.
25920 *
25921 * @template {Node} Kind
25922 * Node type.
25923 * @callback TestFunctionPredicate
25924 * Complex test function for a node that can be inferred by TypeScript.
25925 * @param {Node} node
25926 * A node.
25927 * @param {number | null | undefined} [index]
25928 * The node’s position in its parent.
25929 * @param {Parent | null | undefined} [parent]
25930 * The node’s parent.
25931 * @returns {node is Kind}
25932 * Whether this node passes the test.
25933 */
25934
25935 /**
25936 * @callback AssertAnything
25937 * Check that an arbitrary value is a node, unaware of TypeScript inferral.
25938 * @param {unknown} [node]
25939 * Anything (typically a node).
25940 * @param {number | null | undefined} [index]
25941 * The node’s position in its parent.
25942 * @param {Parent | null | undefined} [parent]
25943 * The node’s parent.
25944 * @returns {boolean}
25945 * Whether this is a node and passes a test.
25946 */
25947
25948 /**
25949 * Check if a node is a node and passes a certain node test.
25950 *
25951 * @template {Node} Kind
25952 * Node type.
25953 * @callback AssertPredicate
25954 * Check that an arbitrary value is a specific node, aware of TypeScript.
25955 * @param {unknown} [node]
25956 * Anything (typically a node).
25957 * @param {number | null | undefined} [index]
25958 * The node’s position in its parent.
25959 * @param {Parent | null | undefined} [parent]
25960 * The node’s parent.
25961 * @returns {node is Kind}
25962 * Whether this is a node and passes a test.
25963 */
25964
25965 /**
25966 * Check if `node` is a `Node` and whether it passes the given test.
25967 *
25968 * @param node
25969 * Thing to check, typically `Node`.
25970 * @param test
25971 * A check for a specific node.
25972 * @param index
25973 * The node’s position in its parent.
25974 * @param parent
25975 * The node’s parent.
25976 * @returns
25977 * Whether `node` is a node and passes a test.
25978 */
25979 const is =
25980 /**
25981 * @type {(
25982 * (() => false) &
25983 * (<Kind extends Node = Node>(node: unknown, test: PredicateTest<Kind>, index: number, parent: Parent, context?: unknown) => node is Kind) &
25984 * (<Kind extends Node = Node>(node: unknown, test: PredicateTest<Kind>, index?: null | undefined, parent?: null | undefined, context?: unknown) => node is Kind) &
25985 * ((node: unknown, test: Test, index: number, parent: Parent, context?: unknown) => boolean) &
25986 * ((node: unknown, test?: Test, index?: null | undefined, parent?: null | undefined, context?: unknown) => boolean)
25987 * )}
25988 */
25989 (
25990 /**
25991 * @param {unknown} [node]
25992 * @param {Test} [test]
25993 * @param {number | null | undefined} [index]
25994 * @param {Parent | null | undefined} [parent]
25995 * @param {unknown} [context]
25996 * @returns {boolean}
25997 */
25998 // eslint-disable-next-line max-params
25999 function is(node, test, index, parent, context) {
26000 const check = convert(test)
26001
26002 if (
26003 index !== undefined &&
26004 index !== null &&
26005 (typeof index !== 'number' ||
26006 index < 0 ||
26007 index === Number.POSITIVE_INFINITY)
26008 ) {
26009 throw new Error('Expected positive finite index')
26010 }
26011
26012 if (
26013 parent !== undefined &&
26014 parent !== null &&
26015 (!is(parent) || !parent.children)
26016 ) {
26017 throw new Error('Expected parent node')
26018 }
26019
26020 if (
26021 (parent === undefined || parent === null) !==
26022 (index === undefined || index === null)
26023 ) {
26024 throw new Error('Expected both parent and index')
26025 }
26026
26027 // @ts-expect-error Looks like a node.
26028 return node && node.type && typeof node.type === 'string'
26029 ? Boolean(check.call(context, node, index, parent))
26030 : false
26031 }
26032 )
26033
26034 /**
26035 * Generate an assertion from a test.
26036 *
26037 * Useful if you’re going to test many nodes, for example when creating a
26038 * utility where something else passes a compatible test.
26039 *
26040 * The created function is a bit faster because it expects valid input only:
26041 * a `node`, `index`, and `parent`.
26042 *
26043 * @param test
26044 * * when nullish, checks if `node` is a `Node`.
26045 * * when `string`, works like passing `(node) => node.type === test`.
26046 * * when `function` checks if function passed the node is true.
26047 * * when `object`, checks that all keys in test are in node, and that they have (strictly) equal values.
26048 * * when `array`, checks if any one of the subtests pass.
26049 * @returns
26050 * An assertion.
26051 */
26052 const convert =
26053 /**
26054 * @type {(
26055 * (<Kind extends Node>(test: PredicateTest<Kind>) => AssertPredicate<Kind>) &
26056 * ((test?: Test) => AssertAnything)
26057 * )}
26058 */
26059 (
26060 /**
26061 * @param {Test} [test]
26062 * @returns {AssertAnything}
26063 */
26064 function (test) {
26065 if (test === undefined || test === null) {
26066 return ok
26067 }
26068
26069 if (typeof test === 'string') {
26070 return typeFactory(test)
26071 }
26072
26073 if (typeof test === 'object') {
26074 return Array.isArray(test) ? anyFactory(test) : propsFactory(test)
26075 }
26076
26077 if (typeof test === 'function') {
26078 return castFactory(test)
26079 }
26080
26081 throw new Error('Expected function, string, or object as test')
26082 }
26083 )
26084
26085 /**
26086 * @param {Array<string | Props | TestFunctionAnything>} tests
26087 * @returns {AssertAnything}
26088 */
26089 function anyFactory(tests) {
26090 /** @type {Array<AssertAnything>} */
26091 const checks = []
26092 let index = -1
26093
26094 while (++index < tests.length) {
26095 checks[index] = convert(tests[index])
26096 }
26097
26098 return castFactory(any)
26099
26100 /**
26101 * @this {unknown}
26102 * @param {Array<unknown>} parameters
26103 * @returns {boolean}
26104 */
26105 function any(...parameters) {
26106 let index = -1
26107
26108 while (++index < checks.length) {
26109 if (checks[index].call(this, ...parameters)) return true
26110 }
26111
26112 return false
26113 }
26114 }
26115
26116 /**
26117 * Turn an object into a test for a node with a certain fields.
26118 *
26119 * @param {Props} check
26120 * @returns {AssertAnything}
26121 */
26122 function propsFactory(check) {
26123 return castFactory(all)
26124
26125 /**
26126 * @param {Node} node
26127 * @returns {boolean}
26128 */
26129 function all(node) {
26130 /** @type {string} */
26131 let key
26132
26133 for (key in check) {
26134 // @ts-expect-error: hush, it sure works as an index.
26135 if (node[key] !== check[key]) return false
26136 }
26137
26138 return true
26139 }
26140 }
26141
26142 /**
26143 * Turn a string into a test for a node with a certain type.
26144 *
26145 * @param {string} check
26146 * @returns {AssertAnything}
26147 */
26148 function typeFactory(check) {
26149 return castFactory(type)
26150
26151 /**
26152 * @param {Node} node
26153 */
26154 function type(node) {
26155 return node && node.type === check
26156 }
26157 }
26158
26159 /**
26160 * Turn a custom test into a test for a node that passes that test.
26161 *
26162 * @param {TestFunctionAnything} check
26163 * @returns {AssertAnything}
26164 */
26165 function castFactory(check) {
26166 return assertion
26167
26168 /**
26169 * @this {unknown}
26170 * @param {unknown} node
26171 * @param {Array<unknown>} parameters
26172 * @returns {boolean}
26173 */
26174 function assertion(node, ...parameters) {
26175 return Boolean(
26176 node &&
26177 typeof node === 'object' &&
26178 'type' in node &&
26179 // @ts-expect-error: fine.
26180 Boolean(check.call(this, node, ...parameters))
26181 )
26182 }
26183 }
26184
26185 function ok() {
26186 return true
26187 }
26188
26189
26190 /***/ }),
26191
26192 /***/ "../node_modules/unist-util-position/lib/index.js":
26193 /*!********************************************************!*\
26194 !*** ../node_modules/unist-util-position/lib/index.js ***!
26195 \********************************************************/
26196 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
26197
26198 "use strict";
26199 __webpack_require__.r(__webpack_exports__);
26200 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26201 /* harmony export */ "pointEnd": () => (/* binding */ pointEnd),
26202 /* harmony export */ "pointStart": () => (/* binding */ pointStart),
26203 /* harmony export */ "position": () => (/* binding */ position)
26204 /* harmony export */ });
26205 /**
26206 * @typedef {import('unist').Position} Position
26207 * @typedef {import('unist').Node} Node
26208 * @typedef {import('unist').Point} Point
26209 */
26210
26211 /**
26212 * @typedef NodeLike
26213 * @property {string} type
26214 * @property {PositionLike | null | undefined} [position]
26215 *
26216 * @typedef PositionLike
26217 * @property {PointLike | null | undefined} [start]
26218 * @property {PointLike | null | undefined} [end]
26219 *
26220 * @typedef PointLike
26221 * @property {number | null | undefined} [line]
26222 * @property {number | null | undefined} [column]
26223 * @property {number | null | undefined} [offset]
26224 */
26225
26226 /**
26227 * Get the starting point of `node`.
26228 *
26229 * @param node
26230 * Node.
26231 * @returns
26232 * Point.
26233 */
26234 const pointStart = point('start')
26235
26236 /**
26237 * Get the ending point of `node`.
26238 *
26239 * @param node
26240 * Node.
26241 * @returns
26242 * Point.
26243 */
26244 const pointEnd = point('end')
26245
26246 /**
26247 * Get the positional info of `node`.
26248 *
26249 * @param {NodeLike | Node | null | undefined} [node]
26250 * Node.
26251 * @returns {Position}
26252 * Position.
26253 */
26254 function position(node) {
26255 return {start: pointStart(node), end: pointEnd(node)}
26256 }
26257
26258 /**
26259 * Get the positional info of `node`.
26260 *
26261 * @param {'start' | 'end'} type
26262 * Side.
26263 * @returns
26264 * Getter.
26265 */
26266 function point(type) {
26267 return point
26268
26269 /**
26270 * Get the point info of `node` at a bound side.
26271 *
26272 * @param {NodeLike | Node | null | undefined} [node]
26273 * @returns {Point}
26274 */
26275 function point(node) {
26276 const point = (node && node.position && node.position[type]) || {}
26277
26278 // To do: next major: don’t return points when invalid.
26279 return {
26280 // @ts-expect-error: in practice, null is allowed.
26281 line: point.line || null,
26282 // @ts-expect-error: in practice, null is allowed.
26283 column: point.column || null,
26284 // @ts-expect-error: in practice, null is allowed.
26285 offset: point.offset > -1 ? point.offset : null
26286 }
26287 }
26288 }
26289
26290
26291 /***/ }),
26292
26293 /***/ "../node_modules/unist-util-stringify-position/lib/index.js":
26294 /*!******************************************************************!*\
26295 !*** ../node_modules/unist-util-stringify-position/lib/index.js ***!
26296 \******************************************************************/
26297 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
26298
26299 "use strict";
26300 __webpack_require__.r(__webpack_exports__);
26301 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26302 /* harmony export */ "stringifyPosition": () => (/* binding */ stringifyPosition)
26303 /* harmony export */ });
26304 /**
26305 * @typedef {import('unist').Node} Node
26306 * @typedef {import('unist').Point} Point
26307 * @typedef {import('unist').Position} Position
26308 */
26309
26310 /**
26311 * @typedef NodeLike
26312 * @property {string} type
26313 * @property {PositionLike | null | undefined} [position]
26314 *
26315 * @typedef PositionLike
26316 * @property {PointLike | null | undefined} [start]
26317 * @property {PointLike | null | undefined} [end]
26318 *
26319 * @typedef PointLike
26320 * @property {number | null | undefined} [line]
26321 * @property {number | null | undefined} [column]
26322 * @property {number | null | undefined} [offset]
26323 */
26324
26325 /**
26326 * Serialize the positional info of a point, position (start and end points),
26327 * or node.
26328 *
26329 * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value]
26330 * Node, position, or point.
26331 * @returns {string}
26332 * Pretty printed positional info of a node (`string`).
26333 *
26334 * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)
26335 * or a point `l:c` (when given `point`), where `l` stands for line, `c` for
26336 * column, `s` for `start`, and `e` for end.
26337 * An empty string (`''`) is returned if the given value is neither `node`,
26338 * `position`, nor `point`.
26339 */
26340 function stringifyPosition(value) {
26341 // Nothing.
26342 if (!value || typeof value !== 'object') {
26343 return ''
26344 }
26345
26346 // Node.
26347 if ('position' in value || 'type' in value) {
26348 return position(value.position)
26349 }
26350
26351 // Position.
26352 if ('start' in value || 'end' in value) {
26353 return position(value)
26354 }
26355
26356 // Point.
26357 if ('line' in value || 'column' in value) {
26358 return point(value)
26359 }
26360
26361 // ?
26362 return ''
26363 }
26364
26365 /**
26366 * @param {Point | PointLike | null | undefined} point
26367 * @returns {string}
26368 */
26369 function point(point) {
26370 return index(point && point.line) + ':' + index(point && point.column)
26371 }
26372
26373 /**
26374 * @param {Position | PositionLike | null | undefined} pos
26375 * @returns {string}
26376 */
26377 function position(pos) {
26378 return point(pos && pos.start) + '-' + point(pos && pos.end)
26379 }
26380
26381 /**
26382 * @param {number | null | undefined} value
26383 * @returns {number}
26384 */
26385 function index(value) {
26386 return value && typeof value === 'number' ? value : 1
26387 }
26388
26389
26390 /***/ }),
26391
26392 /***/ "../node_modules/unist-util-visit-parents/lib/color.browser.js":
26393 /*!*********************************************************************!*\
26394 !*** ../node_modules/unist-util-visit-parents/lib/color.browser.js ***!
26395 \*********************************************************************/
26396 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
26397
26398 "use strict";
26399 __webpack_require__.r(__webpack_exports__);
26400 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26401 /* harmony export */ "color": () => (/* binding */ color)
26402 /* harmony export */ });
26403 /**
26404 * @param {string} d
26405 * @returns {string}
26406 */
26407 function color(d) {
26408 return d
26409 }
26410
26411
26412 /***/ }),
26413
26414 /***/ "../node_modules/unist-util-visit-parents/lib/index.js":
26415 /*!*************************************************************!*\
26416 !*** ../node_modules/unist-util-visit-parents/lib/index.js ***!
26417 \*************************************************************/
26418 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
26419
26420 "use strict";
26421 __webpack_require__.r(__webpack_exports__);
26422 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26423 /* harmony export */ "CONTINUE": () => (/* binding */ CONTINUE),
26424 /* harmony export */ "EXIT": () => (/* binding */ EXIT),
26425 /* harmony export */ "SKIP": () => (/* binding */ SKIP),
26426 /* harmony export */ "visitParents": () => (/* binding */ visitParents)
26427 /* harmony export */ });
26428 /* harmony import */ var unist_util_is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! unist-util-is */ "../node_modules/unist-util-is/lib/index.js");
26429 /* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "../node_modules/unist-util-visit-parents/lib/color.browser.js");
26430 /**
26431 * @typedef {import('unist').Node} Node
26432 * @typedef {import('unist').Parent} Parent
26433 * @typedef {import('unist-util-is').Test} Test
26434 */
26435
26436 /**
26437 * @typedef {boolean | 'skip'} Action
26438 * Union of the action types.
26439 *
26440 * @typedef {number} Index
26441 * Move to the sibling at `index` next (after node itself is completely
26442 * traversed).
26443 *
26444 * Useful if mutating the tree, such as removing the node the visitor is
26445 * currently on, or any of its previous siblings.
26446 * Results less than 0 or greater than or equal to `children.length` stop
26447 * traversing the parent.
26448 *
26449 * @typedef {[(Action | null | undefined | void)?, (Index | null | undefined)?]} ActionTuple
26450 * List with one or two values, the first an action, the second an index.
26451 *
26452 * @typedef {Action | ActionTuple | Index | null | undefined | void} VisitorResult
26453 * Any value that can be returned from a visitor.
26454 */
26455
26456 /**
26457 * @template {Node} [Visited=Node]
26458 * Visited node type.
26459 * @template {Parent} [Ancestor=Parent]
26460 * Ancestor type.
26461 * @callback Visitor
26462 * Handle a node (matching `test`, if given).
26463 *
26464 * Visitors are free to transform `node`.
26465 * They can also transform the parent of node (the last of `ancestors`).
26466 *
26467 * Replacing `node` itself, if `SKIP` is not returned, still causes its
26468 * descendants to be walked (which is a bug).
26469 *
26470 * When adding or removing previous siblings of `node` (or next siblings, in
26471 * case of reverse), the `Visitor` should return a new `Index` to specify the
26472 * sibling to traverse after `node` is traversed.
26473 * Adding or removing next siblings of `node` (or previous siblings, in case
26474 * of reverse) is handled as expected without needing to return a new `Index`.
26475 *
26476 * Removing the children property of an ancestor still results in them being
26477 * traversed.
26478 * @param {Visited} node
26479 * Found node.
26480 * @param {Array<Ancestor>} ancestors
26481 * Ancestors of `node`.
26482 * @returns {VisitorResult}
26483 * What to do next.
26484 *
26485 * An `Index` is treated as a tuple of `[CONTINUE, Index]`.
26486 * An `Action` is treated as a tuple of `[Action]`.
26487 *
26488 * Passing a tuple back only makes sense if the `Action` is `SKIP`.
26489 * When the `Action` is `EXIT`, that action can be returned.
26490 * When the `Action` is `CONTINUE`, `Index` can be returned.
26491 */
26492
26493 /**
26494 * @template {Node} [Tree=Node]
26495 * Tree type.
26496 * @template {Test} [Check=string]
26497 * Test type.
26498 * @typedef {Visitor<import('./complex-types.js').Matches<import('./complex-types.js').InclusiveDescendant<Tree>, Check>, Extract<import('./complex-types.js').InclusiveDescendant<Tree>, Parent>>} BuildVisitor
26499 * Build a typed `Visitor` function from a tree and a test.
26500 *
26501 * It will infer which values are passed as `node` and which as `parents`.
26502 */
26503
26504
26505
26506
26507 /**
26508 * Continue traversing as normal.
26509 */
26510 const CONTINUE = true
26511
26512 /**
26513 * Stop traversing immediately.
26514 */
26515 const EXIT = false
26516
26517 /**
26518 * Do not traverse this node’s children.
26519 */
26520 const SKIP = 'skip'
26521
26522 /**
26523 * Visit nodes, with ancestral information.
26524 *
26525 * This algorithm performs *depth-first* *tree traversal* in *preorder*
26526 * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).
26527 *
26528 * You can choose for which nodes `visitor` is called by passing a `test`.
26529 * For complex tests, you should test yourself in `visitor`, as it will be
26530 * faster and will have improved type information.
26531 *
26532 * Walking the tree is an intensive task.
26533 * Make use of the return values of the visitor when possible.
26534 * Instead of walking a tree multiple times, walk it once, use `unist-util-is`
26535 * to check if a node matches, and then perform different operations.
26536 *
26537 * You can change the tree.
26538 * See `Visitor` for more info.
26539 *
26540 * @param tree
26541 * Tree to traverse.
26542 * @param test
26543 * `unist-util-is`-compatible test
26544 * @param visitor
26545 * Handle each node.
26546 * @param reverse
26547 * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).
26548 * @returns
26549 * Nothing.
26550 */
26551 const visitParents =
26552 /**
26553 * @type {(
26554 * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &
26555 * (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)
26556 * )}
26557 */
26558 (
26559 /**
26560 * @param {Node} tree
26561 * @param {Test} test
26562 * @param {Visitor<Node>} visitor
26563 * @param {boolean | null | undefined} [reverse]
26564 * @returns {void}
26565 */
26566 function (tree, test, visitor, reverse) {
26567 if (typeof test === 'function' && typeof visitor !== 'function') {
26568 reverse = visitor
26569 // @ts-expect-error no visitor given, so `visitor` is test.
26570 visitor = test
26571 test = null
26572 }
26573
26574 const is = (0,unist_util_is__WEBPACK_IMPORTED_MODULE_0__.convert)(test)
26575 const step = reverse ? -1 : 1
26576
26577 factory(tree, undefined, [])()
26578
26579 /**
26580 * @param {Node} node
26581 * @param {number | undefined} index
26582 * @param {Array<Parent>} parents
26583 */
26584 function factory(node, index, parents) {
26585 /** @type {Record<string, unknown>} */
26586 // @ts-expect-error: hush
26587 const value = node && typeof node === 'object' ? node : {}
26588
26589 if (typeof value.type === 'string') {
26590 const name =
26591 // `hast`
26592 typeof value.tagName === 'string'
26593 ? value.tagName
26594 : // `xast`
26595 typeof value.name === 'string'
26596 ? value.name
26597 : undefined
26598
26599 Object.defineProperty(visit, 'name', {
26600 value:
26601 'node (' + (0,_color_js__WEBPACK_IMPORTED_MODULE_1__.color)(node.type + (name ? '<' + name + '>' : '')) + ')'
26602 })
26603 }
26604
26605 return visit
26606
26607 function visit() {
26608 /** @type {ActionTuple} */
26609 let result = []
26610 /** @type {ActionTuple} */
26611 let subresult
26612 /** @type {number} */
26613 let offset
26614 /** @type {Array<Parent>} */
26615 let grandparents
26616
26617 if (!test || is(node, index, parents[parents.length - 1] || null)) {
26618 result = toResult(visitor(node, parents))
26619
26620 if (result[0] === EXIT) {
26621 return result
26622 }
26623 }
26624
26625 // @ts-expect-error looks like a parent.
26626 if (node.children && result[0] !== SKIP) {
26627 // @ts-expect-error looks like a parent.
26628 offset = (reverse ? node.children.length : -1) + step
26629 // @ts-expect-error looks like a parent.
26630 grandparents = parents.concat(node)
26631
26632 // @ts-expect-error looks like a parent.
26633 while (offset > -1 && offset < node.children.length) {
26634 // @ts-expect-error looks like a parent.
26635 subresult = factory(node.children[offset], offset, grandparents)()
26636
26637 if (subresult[0] === EXIT) {
26638 return subresult
26639 }
26640
26641 offset =
26642 typeof subresult[1] === 'number' ? subresult[1] : offset + step
26643 }
26644 }
26645
26646 return result
26647 }
26648 }
26649 }
26650 )
26651
26652 /**
26653 * Turn a return value into a clean result.
26654 *
26655 * @param {VisitorResult} value
26656 * Valid return values from visitors.
26657 * @returns {ActionTuple}
26658 * Clean result.
26659 */
26660 function toResult(value) {
26661 if (Array.isArray(value)) {
26662 return value
26663 }
26664
26665 if (typeof value === 'number') {
26666 return [CONTINUE, value]
26667 }
26668
26669 return [value]
26670 }
26671
26672
26673 /***/ }),
26674
26675 /***/ "../node_modules/unist-util-visit/lib/index.js":
26676 /*!*****************************************************!*\
26677 !*** ../node_modules/unist-util-visit/lib/index.js ***!
26678 \*****************************************************/
26679 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
26680
26681 "use strict";
26682 __webpack_require__.r(__webpack_exports__);
26683 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26684 /* harmony export */ "CONTINUE": () => (/* reexport safe */ unist_util_visit_parents__WEBPACK_IMPORTED_MODULE_0__.CONTINUE),
26685 /* harmony export */ "EXIT": () => (/* reexport safe */ unist_util_visit_parents__WEBPACK_IMPORTED_MODULE_0__.EXIT),
26686 /* harmony export */ "SKIP": () => (/* reexport safe */ unist_util_visit_parents__WEBPACK_IMPORTED_MODULE_0__.SKIP),
26687 /* harmony export */ "visit": () => (/* binding */ visit)
26688 /* harmony export */ });
26689 /* harmony import */ var unist_util_visit_parents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! unist-util-visit-parents */ "../node_modules/unist-util-visit-parents/lib/index.js");
26690 /**
26691 * @typedef {import('unist').Node} Node
26692 * @typedef {import('unist').Parent} Parent
26693 * @typedef {import('unist-util-is').Test} Test
26694 * @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
26695 */
26696
26697 /**
26698 * Check if `Child` can be a child of `Ancestor`.
26699 *
26700 * Returns the ancestor when `Child` can be a child of `Ancestor`, or returns
26701 * `never`.
26702 *
26703 * @template {Node} Ancestor
26704 * Node type.
26705 * @template {Node} Child
26706 * Node type.
26707 * @typedef {(
26708 * Ancestor extends Parent
26709 * ? Child extends Ancestor['children'][number]
26710 * ? Ancestor
26711 * : never
26712 * : never
26713 * )} ParentsOf
26714 */
26715
26716 /**
26717 * @template {Node} [Visited=Node]
26718 * Visited node type.
26719 * @template {Parent} [Ancestor=Parent]
26720 * Ancestor type.
26721 * @callback Visitor
26722 * Handle a node (matching `test`, if given).
26723 *
26724 * Visitors are free to transform `node`.
26725 * They can also transform `parent`.
26726 *
26727 * Replacing `node` itself, if `SKIP` is not returned, still causes its
26728 * descendants to be walked (which is a bug).
26729 *
26730 * When adding or removing previous siblings of `node` (or next siblings, in
26731 * case of reverse), the `Visitor` should return a new `Index` to specify the
26732 * sibling to traverse after `node` is traversed.
26733 * Adding or removing next siblings of `node` (or previous siblings, in case
26734 * of reverse) is handled as expected without needing to return a new `Index`.
26735 *
26736 * Removing the children property of `parent` still results in them being
26737 * traversed.
26738 * @param {Visited} node
26739 * Found node.
26740 * @param {Visited extends Node ? number | null : never} index
26741 * Index of `node` in `parent`.
26742 * @param {Ancestor extends Node ? Ancestor | null : never} parent
26743 * Parent of `node`.
26744 * @returns {VisitorResult}
26745 * What to do next.
26746 *
26747 * An `Index` is treated as a tuple of `[CONTINUE, Index]`.
26748 * An `Action` is treated as a tuple of `[Action]`.
26749 *
26750 * Passing a tuple back only makes sense if the `Action` is `SKIP`.
26751 * When the `Action` is `EXIT`, that action can be returned.
26752 * When the `Action` is `CONTINUE`, `Index` can be returned.
26753 */
26754
26755 /**
26756 * Build a typed `Visitor` function from a node and all possible parents.
26757 *
26758 * It will infer which values are passed as `node` and which as `parent`.
26759 *
26760 * @template {Node} Visited
26761 * Node type.
26762 * @template {Parent} Ancestor
26763 * Parent type.
26764 * @typedef {Visitor<Visited, ParentsOf<Ancestor, Visited>>} BuildVisitorFromMatch
26765 */
26766
26767 /**
26768 * Build a typed `Visitor` function from a list of descendants and a test.
26769 *
26770 * It will infer which values are passed as `node` and which as `parent`.
26771 *
26772 * @template {Node} Descendant
26773 * Node type.
26774 * @template {Test} Check
26775 * Test type.
26776 * @typedef {(
26777 * BuildVisitorFromMatch<
26778 * import('unist-util-visit-parents/complex-types.js').Matches<Descendant, Check>,
26779 * Extract<Descendant, Parent>
26780 * >
26781 * )} BuildVisitorFromDescendants
26782 */
26783
26784 /**
26785 * Build a typed `Visitor` function from a tree and a test.
26786 *
26787 * It will infer which values are passed as `node` and which as `parent`.
26788 *
26789 * @template {Node} [Tree=Node]
26790 * Node type.
26791 * @template {Test} [Check=string]
26792 * Test type.
26793 * @typedef {(
26794 * BuildVisitorFromDescendants<
26795 * import('unist-util-visit-parents/complex-types.js').InclusiveDescendant<Tree>,
26796 * Check
26797 * >
26798 * )} BuildVisitor
26799 */
26800
26801
26802
26803 /**
26804 * Visit nodes.
26805 *
26806 * This algorithm performs *depth-first* *tree traversal* in *preorder*
26807 * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).
26808 *
26809 * You can choose for which nodes `visitor` is called by passing a `test`.
26810 * For complex tests, you should test yourself in `visitor`, as it will be
26811 * faster and will have improved type information.
26812 *
26813 * Walking the tree is an intensive task.
26814 * Make use of the return values of the visitor when possible.
26815 * Instead of walking a tree multiple times, walk it once, use `unist-util-is`
26816 * to check if a node matches, and then perform different operations.
26817 *
26818 * You can change the tree.
26819 * See `Visitor` for more info.
26820 *
26821 * @param tree
26822 * Tree to traverse.
26823 * @param test
26824 * `unist-util-is`-compatible test
26825 * @param visitor
26826 * Handle each node.
26827 * @param reverse
26828 * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).
26829 * @returns
26830 * Nothing.
26831 */
26832 const visit =
26833 /**
26834 * @type {(
26835 * (<Tree extends Node, Check extends Test>(tree: Tree, test: Check, visitor: BuildVisitor<Tree, Check>, reverse?: boolean | null | undefined) => void) &
26836 * (<Tree extends Node>(tree: Tree, visitor: BuildVisitor<Tree>, reverse?: boolean | null | undefined) => void)
26837 * )}
26838 */
26839 (
26840 /**
26841 * @param {Node} tree
26842 * @param {Test} test
26843 * @param {Visitor} visitor
26844 * @param {boolean | null | undefined} [reverse]
26845 * @returns {void}
26846 */
26847 function (tree, test, visitor, reverse) {
26848 if (typeof test === 'function' && typeof visitor !== 'function') {
26849 reverse = visitor
26850 visitor = test
26851 test = null
26852 }
26853
26854 (0,unist_util_visit_parents__WEBPACK_IMPORTED_MODULE_0__.visitParents)(tree, test, overload, reverse)
26855
26856 /**
26857 * @param {Node} node
26858 * @param {Array<Parent>} parents
26859 */
26860 function overload(node, parents) {
26861 const parent = parents[parents.length - 1]
26862 return visitor(
26863 node,
26864 parent ? parent.children.indexOf(node) : null,
26865 parent
26866 )
26867 }
26868 }
26869 )
26870
26871
26872
26873
26874 /***/ }),
26875
26876 /***/ "../node_modules/uvu/assert/index.mjs":
26877 /*!********************************************!*\
26878 !*** ../node_modules/uvu/assert/index.mjs ***!
26879 \********************************************/
26880 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
26881
26882 "use strict";
26883 __webpack_require__.r(__webpack_exports__);
26884 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
26885 /* harmony export */ "Assertion": () => (/* binding */ Assertion),
26886 /* harmony export */ "equal": () => (/* binding */ equal),
26887 /* harmony export */ "fixture": () => (/* binding */ fixture),
26888 /* harmony export */ "instance": () => (/* binding */ instance),
26889 /* harmony export */ "is": () => (/* binding */ is),
26890 /* harmony export */ "match": () => (/* binding */ match),
26891 /* harmony export */ "not": () => (/* binding */ not),
26892 /* harmony export */ "ok": () => (/* binding */ ok),
26893 /* harmony export */ "snapshot": () => (/* binding */ snapshot),
26894 /* harmony export */ "throws": () => (/* binding */ throws),
26895 /* harmony export */ "type": () => (/* binding */ type),
26896 /* harmony export */ "unreachable": () => (/* binding */ unreachable)
26897 /* harmony export */ });
26898 /* harmony import */ var dequal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dequal */ "../node_modules/dequal/dist/index.mjs");
26899 /* harmony import */ var uvu_diff__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! uvu/diff */ "../node_modules/uvu/diff/index.mjs");
26900
26901
26902
26903 function dedent(str) {
26904 str = str.replace(/\r?\n/g, '\n');
26905 let arr = str.match(/^[ \t]*(?=\S)/gm);
26906 let i = 0, min = 1/0, len = (arr||[]).length;
26907 for (; i < len; i++) min = Math.min(min, arr[i].length);
26908 return len && min ? str.replace(new RegExp(`^[ \\t]{${min}}`, 'gm'), '') : str;
26909 }
26910
26911 class Assertion extends Error {
26912 constructor(opts={}) {
26913 super(opts.message);
26914 this.name = 'Assertion';
26915 this.code = 'ERR_ASSERTION';
26916 if (Error.captureStackTrace) {
26917 Error.captureStackTrace(this, this.constructor);
26918 }
26919 this.details = opts.details || false;
26920 this.generated = !!opts.generated;
26921 this.operator = opts.operator;
26922 this.expects = opts.expects;
26923 this.actual = opts.actual;
26924 }
26925 }
26926
26927 function assert(bool, actual, expects, operator, detailer, backup, msg) {
26928 if (bool) return;
26929 let message = msg || backup;
26930 if (msg instanceof Error) throw msg;
26931 let details = detailer && detailer(actual, expects);
26932 throw new Assertion({ actual, expects, operator, message, details, generated: !msg });
26933 }
26934
26935 function ok(val, msg) {
26936 assert(!!val, false, true, 'ok', false, 'Expected value to be truthy', msg);
26937 }
26938
26939 function is(val, exp, msg) {
26940 assert(val === exp, val, exp, 'is', uvu_diff__WEBPACK_IMPORTED_MODULE_1__.compare, 'Expected values to be strictly equal:', msg);
26941 }
26942
26943 function equal(val, exp, msg) {
26944 assert((0,dequal__WEBPACK_IMPORTED_MODULE_0__.dequal)(val, exp), val, exp, 'equal', uvu_diff__WEBPACK_IMPORTED_MODULE_1__.compare, 'Expected values to be deeply equal:', msg);
26945 }
26946
26947 function unreachable(msg) {
26948 assert(false, true, false, 'unreachable', false, 'Expected not to be reached!', msg);
26949 }
26950
26951 function type(val, exp, msg) {
26952 let tmp = typeof val;
26953 assert(tmp === exp, tmp, exp, 'type', false, `Expected "${tmp}" to be "${exp}"`, msg);
26954 }
26955
26956 function instance(val, exp, msg) {
26957 let name = '`' + (exp.name || exp.constructor.name) + '`';
26958 assert(val instanceof exp, val, exp, 'instance', false, `Expected value to be an instance of ${name}`, msg);
26959 }
26960
26961 function match(val, exp, msg) {
26962 if (typeof exp === 'string') {
26963 assert(val.includes(exp), val, exp, 'match', false, `Expected value to include "${exp}" substring`, msg);
26964 } else {
26965 assert(exp.test(val), val, exp, 'match', false, `Expected value to match \`${String(exp)}\` pattern`, msg);
26966 }
26967 }
26968
26969 function snapshot(val, exp, msg) {
26970 val=dedent(val); exp=dedent(exp);
26971 assert(val === exp, val, exp, 'snapshot', uvu_diff__WEBPACK_IMPORTED_MODULE_1__.lines, 'Expected value to match snapshot:', msg);
26972 }
26973
26974 const lineNums = (x, y) => (0,uvu_diff__WEBPACK_IMPORTED_MODULE_1__.lines)(x, y, 1);
26975 function fixture(val, exp, msg) {
26976 val=dedent(val); exp=dedent(exp);
26977 assert(val === exp, val, exp, 'fixture', lineNums, 'Expected value to match fixture:', msg);
26978 }
26979
26980 function throws(blk, exp, msg) {
26981 if (!msg && typeof exp === 'string') {
26982 msg = exp; exp = null;
26983 }
26984
26985 try {
26986 blk();
26987 assert(false, false, true, 'throws', false, 'Expected function to throw', msg);
26988 } catch (err) {
26989 if (err instanceof Assertion) throw err;
26990
26991 if (typeof exp === 'function') {
26992 assert(exp(err), false, true, 'throws', false, 'Expected function to throw matching exception', msg);
26993 } else if (exp instanceof RegExp) {
26994 assert(exp.test(err.message), false, true, 'throws', false, `Expected function to throw exception matching \`${String(exp)}\` pattern`, msg);
26995 }
26996 }
26997 }
26998
26999 // ---
27000
27001 function not(val, msg) {
27002 assert(!val, true, false, 'not', false, 'Expected value to be falsey', msg);
27003 }
27004
27005 not.ok = not;
27006
27007 is.not = function (val, exp, msg) {
27008 assert(val !== exp, val, exp, 'is.not', false, 'Expected values not to be strictly equal', msg);
27009 }
27010
27011 not.equal = function (val, exp, msg) {
27012 assert(!(0,dequal__WEBPACK_IMPORTED_MODULE_0__.dequal)(val, exp), val, exp, 'not.equal', false, 'Expected values not to be deeply equal', msg);
27013 }
27014
27015 not.type = function (val, exp, msg) {
27016 let tmp = typeof val;
27017 assert(tmp !== exp, tmp, exp, 'not.type', false, `Expected "${tmp}" not to be "${exp}"`, msg);
27018 }
27019
27020 not.instance = function (val, exp, msg) {
27021 let name = '`' + (exp.name || exp.constructor.name) + '`';
27022 assert(!(val instanceof exp), val, exp, 'not.instance', false, `Expected value not to be an instance of ${name}`, msg);
27023 }
27024
27025 not.snapshot = function (val, exp, msg) {
27026 val=dedent(val); exp=dedent(exp);
27027 assert(val !== exp, val, exp, 'not.snapshot', false, 'Expected value not to match snapshot', msg);
27028 }
27029
27030 not.fixture = function (val, exp, msg) {
27031 val=dedent(val); exp=dedent(exp);
27032 assert(val !== exp, val, exp, 'not.fixture', false, 'Expected value not to match fixture', msg);
27033 }
27034
27035 not.match = function (val, exp, msg) {
27036 if (typeof exp === 'string') {
27037 assert(!val.includes(exp), val, exp, 'not.match', false, `Expected value not to include "${exp}" substring`, msg);
27038 } else {
27039 assert(!exp.test(val), val, exp, 'not.match', false, `Expected value not to match \`${String(exp)}\` pattern`, msg);
27040 }
27041 }
27042
27043 not.throws = function (blk, exp, msg) {
27044 if (!msg && typeof exp === 'string') {
27045 msg = exp; exp = null;
27046 }
27047
27048 try {
27049 blk();
27050 } catch (err) {
27051 if (typeof exp === 'function') {
27052 assert(!exp(err), true, false, 'not.throws', false, 'Expected function not to throw matching exception', msg);
27053 } else if (exp instanceof RegExp) {
27054 assert(!exp.test(err.message), true, false, 'not.throws', false, `Expected function not to throw exception matching \`${String(exp)}\` pattern`, msg);
27055 } else if (!exp) {
27056 assert(false, true, false, 'not.throws', false, 'Expected function not to throw', msg);
27057 }
27058 }
27059 }
27060
27061
27062 /***/ }),
27063
27064 /***/ "../node_modules/uvu/diff/index.mjs":
27065 /*!******************************************!*\
27066 !*** ../node_modules/uvu/diff/index.mjs ***!
27067 \******************************************/
27068 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
27069
27070 "use strict";
27071 __webpack_require__.r(__webpack_exports__);
27072 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27073 /* harmony export */ "arrays": () => (/* binding */ arrays),
27074 /* harmony export */ "chars": () => (/* binding */ chars),
27075 /* harmony export */ "circular": () => (/* binding */ circular),
27076 /* harmony export */ "compare": () => (/* binding */ compare),
27077 /* harmony export */ "direct": () => (/* binding */ direct),
27078 /* harmony export */ "lines": () => (/* binding */ lines),
27079 /* harmony export */ "sort": () => (/* binding */ sort),
27080 /* harmony export */ "stringify": () => (/* binding */ stringify)
27081 /* harmony export */ });
27082 /* harmony import */ var kleur__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! kleur */ "../node_modules/uvu/node_modules/kleur/index.mjs");
27083 /* harmony import */ var diff__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! diff */ "../node_modules/diff/lib/index.mjs");
27084
27085
27086
27087 const colors = {
27088 '--': kleur__WEBPACK_IMPORTED_MODULE_0__["default"].red,
27089 '··': kleur__WEBPACK_IMPORTED_MODULE_0__["default"].grey,
27090 '++': kleur__WEBPACK_IMPORTED_MODULE_0__["default"].green,
27091 };
27092
27093 const TITLE = kleur__WEBPACK_IMPORTED_MODULE_0__["default"].dim().italic;
27094 const TAB=kleur__WEBPACK_IMPORTED_MODULE_0__["default"].dim('→'), SPACE=kleur__WEBPACK_IMPORTED_MODULE_0__["default"].dim('·'), NL=kleur__WEBPACK_IMPORTED_MODULE_0__["default"].dim('↵');
27095 const LOG = (sym, str) => colors[sym](sym + PRETTY(str)) + '\n';
27096 const LINE = (num, x) => kleur__WEBPACK_IMPORTED_MODULE_0__["default"].dim('L' + String(num).padStart(x, '0') + ' ');
27097 const PRETTY = str => str.replace(/[ ]/g, SPACE).replace(/\t/g, TAB).replace(/(\r?\n)/g, NL);
27098
27099 function line(obj, prev, pad) {
27100 let char = obj.removed ? '--' : obj.added ? '++' : '··';
27101 let arr = obj.value.replace(/\r?\n$/, '').split('\n');
27102 let i=0, tmp, out='';
27103
27104 if (obj.added) out += colors[char]().underline(TITLE('Expected:')) + '\n';
27105 else if (obj.removed) out += colors[char]().underline(TITLE('Actual:')) + '\n';
27106
27107 for (; i < arr.length; i++) {
27108 tmp = arr[i];
27109 if (tmp != null) {
27110 if (prev) out += LINE(prev + i, pad);
27111 out += LOG(char, tmp || '\n');
27112 }
27113 }
27114
27115 return out;
27116 }
27117
27118 // TODO: want better diffing
27119 //~> complex items bail outright
27120 function arrays(input, expect) {
27121 let arr = diff__WEBPACK_IMPORTED_MODULE_1__.diffArrays(input, expect);
27122 let i=0, j=0, k=0, tmp, val, char, isObj, str;
27123 let out = LOG('··', '[');
27124
27125 for (; i < arr.length; i++) {
27126 char = (tmp = arr[i]).removed ? '--' : tmp.added ? '++' : '··';
27127
27128 if (tmp.added) {
27129 out += colors[char]().underline(TITLE('Expected:')) + '\n';
27130 } else if (tmp.removed) {
27131 out += colors[char]().underline(TITLE('Actual:')) + '\n';
27132 }
27133
27134 for (j=0; j < tmp.value.length; j++) {
27135 isObj = (tmp.value[j] && typeof tmp.value[j] === 'object');
27136 val = stringify(tmp.value[j]).split(/\r?\n/g);
27137 for (k=0; k < val.length;) {
27138 str = ' ' + val[k++] + (isObj ? '' : ',');
27139 if (isObj && k === val.length && (j + 1) < tmp.value.length) str += ',';
27140 out += LOG(char, str);
27141 }
27142 }
27143 }
27144
27145 return out + LOG('··', ']');
27146 }
27147
27148 function lines(input, expect, linenum = 0) {
27149 let i=0, tmp, output='';
27150 let arr = diff__WEBPACK_IMPORTED_MODULE_1__.diffLines(input, expect);
27151 let pad = String(expect.split(/\r?\n/g).length - linenum).length;
27152
27153 for (; i < arr.length; i++) {
27154 output += line(tmp = arr[i], linenum, pad);
27155 if (linenum && !tmp.removed) linenum += tmp.count;
27156 }
27157
27158 return output;
27159 }
27160
27161 function chars(input, expect) {
27162 let arr = diff__WEBPACK_IMPORTED_MODULE_1__.diffChars(input, expect);
27163 let i=0, output='', tmp;
27164
27165 let l1 = input.length;
27166 let l2 = expect.length;
27167
27168 let p1 = PRETTY(input);
27169 let p2 = PRETTY(expect);
27170
27171 tmp = arr[i];
27172
27173 if (l1 === l2) {
27174 // no length offsets
27175 } else if (tmp.removed && arr[i + 1]) {
27176 let del = tmp.count - arr[i + 1].count;
27177 if (del == 0) {
27178 // wash~
27179 } else if (del > 0) {
27180 expect = ' '.repeat(del) + expect;
27181 p2 = ' '.repeat(del) + p2;
27182 l2 += del;
27183 } else if (del < 0) {
27184 input = ' '.repeat(-del) + input;
27185 p1 = ' '.repeat(-del) + p1;
27186 l1 += -del;
27187 }
27188 }
27189
27190 output += direct(p1, p2, l1, l2);
27191
27192 if (l1 === l2) {
27193 for (tmp=' '; i < l1; i++) {
27194 tmp += input[i] === expect[i] ? ' ' : '^';
27195 }
27196 } else {
27197 for (tmp=' '; i < arr.length; i++) {
27198 tmp += ((arr[i].added || arr[i].removed) ? '^' : ' ').repeat(Math.max(arr[i].count, 0));
27199 if (i + 1 < arr.length && ((arr[i].added && arr[i+1].removed) || (arr[i].removed && arr[i+1].added))) {
27200 arr[i + 1].count -= arr[i].count;
27201 }
27202 }
27203 }
27204
27205 return output + kleur__WEBPACK_IMPORTED_MODULE_0__["default"].red(tmp);
27206 }
27207
27208 function direct(input, expect, lenA = String(input).length, lenB = String(expect).length) {
27209 let gutter = 4;
27210 let lenC = Math.max(lenA, lenB);
27211 let typeA=typeof input, typeB=typeof expect;
27212
27213 if (typeA !== typeB) {
27214 gutter = 2;
27215
27216 let delA = gutter + lenC - lenA;
27217 let delB = gutter + lenC - lenB;
27218
27219 input += ' '.repeat(delA) + kleur__WEBPACK_IMPORTED_MODULE_0__["default"].dim(`[${typeA}]`);
27220 expect += ' '.repeat(delB) + kleur__WEBPACK_IMPORTED_MODULE_0__["default"].dim(`[${typeB}]`);
27221
27222 lenA += delA + typeA.length + 2;
27223 lenB += delB + typeB.length + 2;
27224 lenC = Math.max(lenA, lenB);
27225 }
27226
27227 let output = colors['++']('++' + expect + ' '.repeat(gutter + lenC - lenB) + TITLE('(Expected)')) + '\n';
27228 return output + colors['--']('--' + input + ' '.repeat(gutter + lenC - lenA) + TITLE('(Actual)')) + '\n';
27229 }
27230
27231 function sort(input, expect) {
27232 var k, i=0, tmp, isArr = Array.isArray(input);
27233 var keys=[], out=isArr ? Array(input.length) : {};
27234
27235 if (isArr) {
27236 for (i=0; i < out.length; i++) {
27237 tmp = input[i];
27238 if (!tmp || typeof tmp !== 'object') out[i] = tmp;
27239 else out[i] = sort(tmp, expect[i]); // might not be right
27240 }
27241 } else {
27242 for (k in expect)
27243 keys.push(k);
27244
27245 for (; i < keys.length; i++) {
27246 if (Object.prototype.hasOwnProperty.call(input, k = keys[i])) {
27247 if (!(tmp = input[k]) || typeof tmp !== 'object') out[k] = tmp;
27248 else out[k] = sort(tmp, expect[k]);
27249 }
27250 }
27251
27252 for (k in input) {
27253 if (!out.hasOwnProperty(k)) {
27254 out[k] = input[k]; // expect didnt have
27255 }
27256 }
27257 }
27258
27259 return out;
27260 }
27261
27262 function circular() {
27263 var cache = new Set;
27264 return function print(key, val) {
27265 if (val === void 0) return '[__VOID__]';
27266 if (typeof val === 'number' && val !== val) return '[__NAN__]';
27267 if (typeof val === 'bigint') return val.toString();
27268 if (!val || typeof val !== 'object') return val;
27269 if (cache.has(val)) return '[Circular]';
27270 cache.add(val); return val;
27271 }
27272 }
27273
27274 function stringify(input) {
27275 return JSON.stringify(input, circular(), 2).replace(/"\[__NAN__\]"/g, 'NaN').replace(/"\[__VOID__\]"/g, 'undefined');
27276 }
27277
27278 function compare(input, expect) {
27279 if (Array.isArray(expect) && Array.isArray(input)) return arrays(input, expect);
27280 if (expect instanceof RegExp) return chars(''+input, ''+expect);
27281
27282 let isA = input && typeof input == 'object';
27283 let isB = expect && typeof expect == 'object';
27284
27285 if (isA && isB) input = sort(input, expect);
27286 if (isB) expect = stringify(expect);
27287 if (isA) input = stringify(input);
27288
27289 if (expect && typeof expect == 'object') {
27290 input = stringify(sort(input, expect));
27291 expect = stringify(expect);
27292 }
27293
27294 isA = typeof input == 'string';
27295 isB = typeof expect == 'string';
27296
27297 if (isA && /\r?\n/.test(input)) return lines(input, ''+expect);
27298 if (isB && /\r?\n/.test(expect)) return lines(''+input, expect);
27299 if (isA && isB) return chars(input, expect);
27300
27301 return direct(input, expect);
27302 }
27303
27304
27305 /***/ }),
27306
27307 /***/ "../node_modules/uvu/node_modules/kleur/index.mjs":
27308 /*!********************************************************!*\
27309 !*** ../node_modules/uvu/node_modules/kleur/index.mjs ***!
27310 \********************************************************/
27311 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
27312
27313 "use strict";
27314 __webpack_require__.r(__webpack_exports__);
27315 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27316 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
27317 /* harmony export */ });
27318
27319
27320 let FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM, isTTY=true;
27321 if (typeof process !== 'undefined') {
27322 ({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
27323 isTTY = process.stdout && process.stdout.isTTY;
27324 }
27325
27326 const $ = {
27327 enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== 'dumb' && (
27328 FORCE_COLOR != null && FORCE_COLOR !== '0' || isTTY
27329 ),
27330
27331 // modifiers
27332 reset: init(0, 0),
27333 bold: init(1, 22),
27334 dim: init(2, 22),
27335 italic: init(3, 23),
27336 underline: init(4, 24),
27337 inverse: init(7, 27),
27338 hidden: init(8, 28),
27339 strikethrough: init(9, 29),
27340
27341 // colors
27342 black: init(30, 39),
27343 red: init(31, 39),
27344 green: init(32, 39),
27345 yellow: init(33, 39),
27346 blue: init(34, 39),
27347 magenta: init(35, 39),
27348 cyan: init(36, 39),
27349 white: init(37, 39),
27350 gray: init(90, 39),
27351 grey: init(90, 39),
27352
27353 // background colors
27354 bgBlack: init(40, 49),
27355 bgRed: init(41, 49),
27356 bgGreen: init(42, 49),
27357 bgYellow: init(43, 49),
27358 bgBlue: init(44, 49),
27359 bgMagenta: init(45, 49),
27360 bgCyan: init(46, 49),
27361 bgWhite: init(47, 49)
27362 };
27363
27364 function run(arr, str) {
27365 let i=0, tmp, beg='', end='';
27366 for (; i < arr.length; i++) {
27367 tmp = arr[i];
27368 beg += tmp.open;
27369 end += tmp.close;
27370 if (!!~str.indexOf(tmp.close)) {
27371 str = str.replace(tmp.rgx, tmp.close + tmp.open);
27372 }
27373 }
27374 return beg + str + end;
27375 }
27376
27377 function chain(has, keys) {
27378 let ctx = { has, keys };
27379
27380 ctx.reset = $.reset.bind(ctx);
27381 ctx.bold = $.bold.bind(ctx);
27382 ctx.dim = $.dim.bind(ctx);
27383 ctx.italic = $.italic.bind(ctx);
27384 ctx.underline = $.underline.bind(ctx);
27385 ctx.inverse = $.inverse.bind(ctx);
27386 ctx.hidden = $.hidden.bind(ctx);
27387 ctx.strikethrough = $.strikethrough.bind(ctx);
27388
27389 ctx.black = $.black.bind(ctx);
27390 ctx.red = $.red.bind(ctx);
27391 ctx.green = $.green.bind(ctx);
27392 ctx.yellow = $.yellow.bind(ctx);
27393 ctx.blue = $.blue.bind(ctx);
27394 ctx.magenta = $.magenta.bind(ctx);
27395 ctx.cyan = $.cyan.bind(ctx);
27396 ctx.white = $.white.bind(ctx);
27397 ctx.gray = $.gray.bind(ctx);
27398 ctx.grey = $.grey.bind(ctx);
27399
27400 ctx.bgBlack = $.bgBlack.bind(ctx);
27401 ctx.bgRed = $.bgRed.bind(ctx);
27402 ctx.bgGreen = $.bgGreen.bind(ctx);
27403 ctx.bgYellow = $.bgYellow.bind(ctx);
27404 ctx.bgBlue = $.bgBlue.bind(ctx);
27405 ctx.bgMagenta = $.bgMagenta.bind(ctx);
27406 ctx.bgCyan = $.bgCyan.bind(ctx);
27407 ctx.bgWhite = $.bgWhite.bind(ctx);
27408
27409 return ctx;
27410 }
27411
27412 function init(open, close) {
27413 let blk = {
27414 open: `\x1b[${open}m`,
27415 close: `\x1b[${close}m`,
27416 rgx: new RegExp(`\\x1b\\[${close}m`, 'g')
27417 };
27418 return function (txt) {
27419 if (this !== void 0 && this.has !== void 0) {
27420 !!~this.has.indexOf(open) || (this.has.push(open),this.keys.push(blk));
27421 return txt === void 0 ? this : $.enabled ? run(this.keys, txt+'') : txt+'';
27422 }
27423 return txt === void 0 ? chain([open], [blk]) : $.enabled ? run([blk], txt+'') : txt+'';
27424 };
27425 }
27426
27427 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ($);
27428
27429
27430 /***/ }),
27431
27432 /***/ "../node_modules/vfile-message/lib/index.js":
27433 /*!**************************************************!*\
27434 !*** ../node_modules/vfile-message/lib/index.js ***!
27435 \**************************************************/
27436 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
27437
27438 "use strict";
27439 __webpack_require__.r(__webpack_exports__);
27440 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27441 /* harmony export */ "VFileMessage": () => (/* binding */ VFileMessage)
27442 /* harmony export */ });
27443 /* harmony import */ var unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! unist-util-stringify-position */ "../node_modules/unist-util-stringify-position/lib/index.js");
27444 /**
27445 * @typedef {import('unist').Node} Node
27446 * @typedef {import('unist').Position} Position
27447 * @typedef {import('unist').Point} Point
27448 * @typedef {object & {type: string, position?: Position | undefined}} NodeLike
27449 */
27450
27451
27452
27453 /**
27454 * Message.
27455 */
27456 class VFileMessage extends Error {
27457 /**
27458 * Create a message for `reason` at `place` from `origin`.
27459 *
27460 * When an error is passed in as `reason`, the `stack` is copied.
27461 *
27462 * @param {string | Error | VFileMessage} reason
27463 * Reason for message, uses the stack and message of the error if given.
27464 *
27465 * > 👉 **Note**: you should use markdown.
27466 * @param {Node | NodeLike | Position | Point | null | undefined} [place]
27467 * Place in file where the message occurred.
27468 * @param {string | null | undefined} [origin]
27469 * Place in code where the message originates (example:
27470 * `'my-package:my-rule'` or `'my-rule'`).
27471 * @returns
27472 * Instance of `VFileMessage`.
27473 */
27474 // To do: next major: expose `undefined` everywhere instead of `null`.
27475 constructor(reason, place, origin) {
27476 /** @type {[string | null, string | null]} */
27477 const parts = [null, null]
27478 /** @type {Position} */
27479 let position = {
27480 // @ts-expect-error: we always follows the structure of `position`.
27481 start: {line: null, column: null},
27482 // @ts-expect-error: "
27483 end: {line: null, column: null}
27484 }
27485
27486 super()
27487
27488 if (typeof place === 'string') {
27489 origin = place
27490 place = undefined
27491 }
27492
27493 if (typeof origin === 'string') {
27494 const index = origin.indexOf(':')
27495
27496 if (index === -1) {
27497 parts[1] = origin
27498 } else {
27499 parts[0] = origin.slice(0, index)
27500 parts[1] = origin.slice(index + 1)
27501 }
27502 }
27503
27504 if (place) {
27505 // Node.
27506 if ('type' in place || 'position' in place) {
27507 if (place.position) {
27508 // To do: next major: deep clone.
27509 // @ts-expect-error: looks like a position.
27510 position = place.position
27511 }
27512 }
27513 // Position.
27514 else if ('start' in place || 'end' in place) {
27515 // @ts-expect-error: looks like a position.
27516 // To do: next major: deep clone.
27517 position = place
27518 }
27519 // Point.
27520 else if ('line' in place || 'column' in place) {
27521 // To do: next major: deep clone.
27522 position.start = place
27523 }
27524 }
27525
27526 // Fields from `Error`.
27527 /**
27528 * Serialized positional info of error.
27529 *
27530 * On normal errors, this would be something like `ParseError`, buit in
27531 * `VFile` messages we use this space to show where an error happened.
27532 */
27533 this.name = (0,unist_util_stringify_position__WEBPACK_IMPORTED_MODULE_0__.stringifyPosition)(place) || '1:1'
27534
27535 /**
27536 * Reason for message.
27537 *
27538 * @type {string}
27539 */
27540 this.message = typeof reason === 'object' ? reason.message : reason
27541
27542 /**
27543 * Stack of message.
27544 *
27545 * This is used by normal errors to show where something happened in
27546 * programming code, irrelevant for `VFile` messages,
27547 *
27548 * @type {string}
27549 */
27550 this.stack = ''
27551
27552 if (typeof reason === 'object' && reason.stack) {
27553 this.stack = reason.stack
27554 }
27555
27556 /**
27557 * Reason for message.
27558 *
27559 * > 👉 **Note**: you should use markdown.
27560 *
27561 * @type {string}
27562 */
27563 this.reason = this.message
27564
27565 /* eslint-disable no-unused-expressions */
27566 /**
27567 * State of problem.
27568 *
27569 * * `true` — marks associated file as no longer processable (error)
27570 * * `false` — necessitates a (potential) change (warning)
27571 * * `null | undefined` — for things that might not need changing (info)
27572 *
27573 * @type {boolean | null | undefined}
27574 */
27575 this.fatal
27576
27577 /**
27578 * Starting line of error.
27579 *
27580 * @type {number | null}
27581 */
27582 this.line = position.start.line
27583
27584 /**
27585 * Starting column of error.
27586 *
27587 * @type {number | null}
27588 */
27589 this.column = position.start.column
27590
27591 /**
27592 * Full unist position.
27593 *
27594 * @type {Position | null}
27595 */
27596 this.position = position
27597
27598 /**
27599 * Namespace of message (example: `'my-package'`).
27600 *
27601 * @type {string | null}
27602 */
27603 this.source = parts[0]
27604
27605 /**
27606 * Category of message (example: `'my-rule'`).
27607 *
27608 * @type {string | null}
27609 */
27610 this.ruleId = parts[1]
27611
27612 /**
27613 * Path of a file (used throughout the `VFile` ecosystem).
27614 *
27615 * @type {string | null}
27616 */
27617 this.file
27618
27619 // The following fields are “well known”.
27620 // Not standard.
27621 // Feel free to add other non-standard fields to your messages.
27622
27623 /**
27624 * Specify the source value that’s being reported, which is deemed
27625 * incorrect.
27626 *
27627 * @type {string | null}
27628 */
27629 this.actual
27630
27631 /**
27632 * Suggest acceptable values that can be used instead of `actual`.
27633 *
27634 * @type {Array<string> | null}
27635 */
27636 this.expected
27637
27638 /**
27639 * Link to docs for the message.
27640 *
27641 * > 👉 **Note**: this must be an absolute URL that can be passed as `x`
27642 * > to `new URL(x)`.
27643 *
27644 * @type {string | null}
27645 */
27646 this.url
27647
27648 /**
27649 * Long form description of the message (you should use markdown).
27650 *
27651 * @type {string | null}
27652 */
27653 this.note
27654 /* eslint-enable no-unused-expressions */
27655 }
27656 }
27657
27658 VFileMessage.prototype.file = ''
27659 VFileMessage.prototype.name = ''
27660 VFileMessage.prototype.reason = ''
27661 VFileMessage.prototype.message = ''
27662 VFileMessage.prototype.stack = ''
27663 VFileMessage.prototype.fatal = null
27664 VFileMessage.prototype.column = null
27665 VFileMessage.prototype.line = null
27666 VFileMessage.prototype.source = null
27667 VFileMessage.prototype.ruleId = null
27668 VFileMessage.prototype.position = null
27669
27670
27671 /***/ }),
27672
27673 /***/ "../node_modules/vfile/lib/index.js":
27674 /*!******************************************!*\
27675 !*** ../node_modules/vfile/lib/index.js ***!
27676 \******************************************/
27677 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
27678
27679 "use strict";
27680 __webpack_require__.r(__webpack_exports__);
27681 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27682 /* harmony export */ "VFile": () => (/* binding */ VFile)
27683 /* harmony export */ });
27684 /* harmony import */ var is_buffer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-buffer */ "../node_modules/is-buffer/index.js");
27685 /* harmony import */ var vfile_message__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vfile-message */ "../node_modules/vfile-message/lib/index.js");
27686 /* harmony import */ var _minpath_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./minpath.js */ "../node_modules/vfile/lib/minpath.browser.js");
27687 /* harmony import */ var _minproc_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./minproc.js */ "../node_modules/vfile/lib/minproc.browser.js");
27688 /* harmony import */ var _minurl_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minurl.js */ "../node_modules/vfile/lib/minurl.shared.js");
27689 /* harmony import */ var _minurl_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minurl.js */ "../node_modules/vfile/lib/minurl.browser.js");
27690 /**
27691 * @typedef {import('unist').Node} Node
27692 * @typedef {import('unist').Position} Position
27693 * @typedef {import('unist').Point} Point
27694 * @typedef {import('./minurl.shared.js').URL} URL
27695 * @typedef {import('../index.js').Data} Data
27696 * @typedef {import('../index.js').Value} Value
27697 */
27698
27699 /**
27700 * @typedef {Record<string, unknown> & {type: string, position?: Position | undefined}} NodeLike
27701 *
27702 * @typedef {'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex'} BufferEncoding
27703 * Encodings supported by the buffer class.
27704 *
27705 * This is a copy of the types from Node, copied to prevent Node globals from
27706 * being needed.
27707 * Copied from: <https://github.com/DefinitelyTyped/DefinitelyTyped/blob/90a4ec8/types/node/buffer.d.ts#L170>
27708 *
27709 * @typedef {Options | URL | Value | VFile} Compatible
27710 * Things that can be passed to the constructor.
27711 *
27712 * @typedef VFileCoreOptions
27713 * Set multiple values.
27714 * @property {Value | null | undefined} [value]
27715 * Set `value`.
27716 * @property {string | null | undefined} [cwd]
27717 * Set `cwd`.
27718 * @property {Array<string> | null | undefined} [history]
27719 * Set `history`.
27720 * @property {URL | string | null | undefined} [path]
27721 * Set `path`.
27722 * @property {string | null | undefined} [basename]
27723 * Set `basename`.
27724 * @property {string | null | undefined} [stem]
27725 * Set `stem`.
27726 * @property {string | null | undefined} [extname]
27727 * Set `extname`.
27728 * @property {string | null | undefined} [dirname]
27729 * Set `dirname`.
27730 * @property {Data | null | undefined} [data]
27731 * Set `data`.
27732 *
27733 * @typedef Map
27734 * Raw source map.
27735 *
27736 * See:
27737 * <https://github.com/mozilla/source-map/blob/58819f0/source-map.d.ts#L15-L23>.
27738 * @property {number} version
27739 * Which version of the source map spec this map is following.
27740 * @property {Array<string>} sources
27741 * An array of URLs to the original source files.
27742 * @property {Array<string>} names
27743 * An array of identifiers which can be referenced by individual mappings.
27744 * @property {string | undefined} [sourceRoot]
27745 * The URL root from which all sources are relative.
27746 * @property {Array<string> | undefined} [sourcesContent]
27747 * An array of contents of the original source files.
27748 * @property {string} mappings
27749 * A string of base64 VLQs which contain the actual mappings.
27750 * @property {string} file
27751 * The generated file this source map is associated with.
27752 *
27753 * @typedef {{[key: string]: unknown} & VFileCoreOptions} Options
27754 * Configuration.
27755 *
27756 * A bunch of keys that will be shallow copied over to the new file.
27757 *
27758 * @typedef {Record<string, unknown>} ReporterSettings
27759 * Configuration for reporters.
27760 */
27761
27762 /**
27763 * @template {ReporterSettings} Settings
27764 * Options type.
27765 * @callback Reporter
27766 * Type for a reporter.
27767 * @param {Array<VFile>} files
27768 * Files to report.
27769 * @param {Settings} options
27770 * Configuration.
27771 * @returns {string}
27772 * Report.
27773 */
27774
27775
27776
27777
27778
27779
27780
27781 /**
27782 * Order of setting (least specific to most), we need this because otherwise
27783 * `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a
27784 * stem can be set.
27785 *
27786 * @type {Array<'basename' | 'dirname' | 'extname' | 'history' | 'path' | 'stem'>}
27787 */
27788 const order = ['history', 'path', 'basename', 'stem', 'extname', 'dirname']
27789
27790 class VFile {
27791 /**
27792 * Create a new virtual file.
27793 *
27794 * `options` is treated as:
27795 *
27796 * * `string` or `Buffer` — `{value: options}`
27797 * * `URL` — `{path: options}`
27798 * * `VFile` — shallow copies its data over to the new file
27799 * * `object` — all fields are shallow copied over to the new file
27800 *
27801 * Path related fields are set in the following order (least specific to
27802 * most specific): `history`, `path`, `basename`, `stem`, `extname`,
27803 * `dirname`.
27804 *
27805 * You cannot set `dirname` or `extname` without setting either `history`,
27806 * `path`, `basename`, or `stem` too.
27807 *
27808 * @param {Compatible | null | undefined} [value]
27809 * File value.
27810 * @returns
27811 * New instance.
27812 */
27813 constructor(value) {
27814 /** @type {Options | VFile} */
27815 let options
27816
27817 if (!value) {
27818 options = {}
27819 } else if (typeof value === 'string' || buffer(value)) {
27820 options = {value}
27821 } else if ((0,_minurl_js__WEBPACK_IMPORTED_MODULE_1__.isUrl)(value)) {
27822 options = {path: value}
27823 } else {
27824 options = value
27825 }
27826
27827 /**
27828 * Place to store custom information (default: `{}`).
27829 *
27830 * It’s OK to store custom data directly on the file but moving it to
27831 * `data` is recommended.
27832 *
27833 * @type {Data}
27834 */
27835 this.data = {}
27836
27837 /**
27838 * List of messages associated with the file.
27839 *
27840 * @type {Array<VFileMessage>}
27841 */
27842 this.messages = []
27843
27844 /**
27845 * List of filepaths the file moved between.
27846 *
27847 * The first is the original path and the last is the current path.
27848 *
27849 * @type {Array<string>}
27850 */
27851 this.history = []
27852
27853 /**
27854 * Base of `path` (default: `process.cwd()` or `'/'` in browsers).
27855 *
27856 * @type {string}
27857 */
27858 this.cwd = _minproc_js__WEBPACK_IMPORTED_MODULE_2__.proc.cwd()
27859
27860 /* eslint-disable no-unused-expressions */
27861 /**
27862 * Raw value.
27863 *
27864 * @type {Value}
27865 */
27866 this.value
27867
27868 // The below are non-standard, they are “well-known”.
27869 // As in, used in several tools.
27870
27871 /**
27872 * Whether a file was saved to disk.
27873 *
27874 * This is used by vfile reporters.
27875 *
27876 * @type {boolean}
27877 */
27878 this.stored
27879
27880 /**
27881 * Custom, non-string, compiled, representation.
27882 *
27883 * This is used by unified to store non-string results.
27884 * One example is when turning markdown into React nodes.
27885 *
27886 * @type {unknown}
27887 */
27888 this.result
27889
27890 /**
27891 * Source map.
27892 *
27893 * This type is equivalent to the `RawSourceMap` type from the `source-map`
27894 * module.
27895 *
27896 * @type {Map | null | undefined}
27897 */
27898 this.map
27899 /* eslint-enable no-unused-expressions */
27900
27901 // Set path related properties in the correct order.
27902 let index = -1
27903
27904 while (++index < order.length) {
27905 const prop = order[index]
27906
27907 // Note: we specifically use `in` instead of `hasOwnProperty` to accept
27908 // `vfile`s too.
27909 if (
27910 prop in options &&
27911 options[prop] !== undefined &&
27912 options[prop] !== null
27913 ) {
27914 // @ts-expect-error: TS doesn’t understand basic reality.
27915 this[prop] = prop === 'history' ? [...options[prop]] : options[prop]
27916 }
27917 }
27918
27919 /** @type {string} */
27920 let prop
27921
27922 // Set non-path related properties.
27923 for (prop in options) {
27924 // @ts-expect-error: fine to set other things.
27925 if (!order.includes(prop)) {
27926 // @ts-expect-error: fine to set other things.
27927 this[prop] = options[prop]
27928 }
27929 }
27930 }
27931
27932 /**
27933 * Get the full path (example: `'~/index.min.js'`).
27934 *
27935 * @returns {string}
27936 */
27937 get path() {
27938 return this.history[this.history.length - 1]
27939 }
27940
27941 /**
27942 * Set the full path (example: `'~/index.min.js'`).
27943 *
27944 * Cannot be nullified.
27945 * You can set a file URL (a `URL` object with a `file:` protocol) which will
27946 * be turned into a path with `url.fileURLToPath`.
27947 *
27948 * @param {string | URL} path
27949 */
27950 set path(path) {
27951 if ((0,_minurl_js__WEBPACK_IMPORTED_MODULE_1__.isUrl)(path)) {
27952 path = (0,_minurl_js__WEBPACK_IMPORTED_MODULE_3__.urlToPath)(path)
27953 }
27954
27955 assertNonEmpty(path, 'path')
27956
27957 if (this.path !== path) {
27958 this.history.push(path)
27959 }
27960 }
27961
27962 /**
27963 * Get the parent path (example: `'~'`).
27964 */
27965 get dirname() {
27966 return typeof this.path === 'string' ? _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.dirname(this.path) : undefined
27967 }
27968
27969 /**
27970 * Set the parent path (example: `'~'`).
27971 *
27972 * Cannot be set if there’s no `path` yet.
27973 */
27974 set dirname(dirname) {
27975 assertPath(this.basename, 'dirname')
27976 this.path = _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.join(dirname || '', this.basename)
27977 }
27978
27979 /**
27980 * Get the basename (including extname) (example: `'index.min.js'`).
27981 */
27982 get basename() {
27983 return typeof this.path === 'string' ? _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.basename(this.path) : undefined
27984 }
27985
27986 /**
27987 * Set basename (including extname) (`'index.min.js'`).
27988 *
27989 * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
27990 * on windows).
27991 * Cannot be nullified (use `file.path = file.dirname` instead).
27992 */
27993 set basename(basename) {
27994 assertNonEmpty(basename, 'basename')
27995 assertPart(basename, 'basename')
27996 this.path = _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.join(this.dirname || '', basename)
27997 }
27998
27999 /**
28000 * Get the extname (including dot) (example: `'.js'`).
28001 */
28002 get extname() {
28003 return typeof this.path === 'string' ? _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.extname(this.path) : undefined
28004 }
28005
28006 /**
28007 * Set the extname (including dot) (example: `'.js'`).
28008 *
28009 * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
28010 * on windows).
28011 * Cannot be set if there’s no `path` yet.
28012 */
28013 set extname(extname) {
28014 assertPart(extname, 'extname')
28015 assertPath(this.dirname, 'extname')
28016
28017 if (extname) {
28018 if (extname.charCodeAt(0) !== 46 /* `.` */) {
28019 throw new Error('`extname` must start with `.`')
28020 }
28021
28022 if (extname.includes('.', 1)) {
28023 throw new Error('`extname` cannot contain multiple dots')
28024 }
28025 }
28026
28027 this.path = _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.join(this.dirname, this.stem + (extname || ''))
28028 }
28029
28030 /**
28031 * Get the stem (basename w/o extname) (example: `'index.min'`).
28032 */
28033 get stem() {
28034 return typeof this.path === 'string'
28035 ? _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.basename(this.path, this.extname)
28036 : undefined
28037 }
28038
28039 /**
28040 * Set the stem (basename w/o extname) (example: `'index.min'`).
28041 *
28042 * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
28043 * on windows).
28044 * Cannot be nullified (use `file.path = file.dirname` instead).
28045 */
28046 set stem(stem) {
28047 assertNonEmpty(stem, 'stem')
28048 assertPart(stem, 'stem')
28049 this.path = _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.join(this.dirname || '', stem + (this.extname || ''))
28050 }
28051
28052 /**
28053 * Serialize the file.
28054 *
28055 * @param {BufferEncoding | null | undefined} [encoding='utf8']
28056 * Character encoding to understand `value` as when it’s a `Buffer`
28057 * (default: `'utf8'`).
28058 * @returns {string}
28059 * Serialized file.
28060 */
28061 toString(encoding) {
28062 return (this.value || '').toString(encoding || undefined)
28063 }
28064
28065 /**
28066 * Create a warning message associated with the file.
28067 *
28068 * Its `fatal` is set to `false` and `file` is set to the current file path.
28069 * Its added to `file.messages`.
28070 *
28071 * @param {string | Error | VFileMessage} reason
28072 * Reason for message, uses the stack and message of the error if given.
28073 * @param {Node | NodeLike | Position | Point | null | undefined} [place]
28074 * Place in file where the message occurred.
28075 * @param {string | null | undefined} [origin]
28076 * Place in code where the message originates (example:
28077 * `'my-package:my-rule'` or `'my-rule'`).
28078 * @returns {VFileMessage}
28079 * Message.
28080 */
28081 message(reason, place, origin) {
28082 const message = new vfile_message__WEBPACK_IMPORTED_MODULE_5__.VFileMessage(reason, place, origin)
28083
28084 if (this.path) {
28085 message.name = this.path + ':' + message.name
28086 message.file = this.path
28087 }
28088
28089 message.fatal = false
28090
28091 this.messages.push(message)
28092
28093 return message
28094 }
28095
28096 /**
28097 * Create an info message associated with the file.
28098 *
28099 * Its `fatal` is set to `null` and `file` is set to the current file path.
28100 * Its added to `file.messages`.
28101 *
28102 * @param {string | Error | VFileMessage} reason
28103 * Reason for message, uses the stack and message of the error if given.
28104 * @param {Node | NodeLike | Position | Point | null | undefined} [place]
28105 * Place in file where the message occurred.
28106 * @param {string | null | undefined} [origin]
28107 * Place in code where the message originates (example:
28108 * `'my-package:my-rule'` or `'my-rule'`).
28109 * @returns {VFileMessage}
28110 * Message.
28111 */
28112 info(reason, place, origin) {
28113 const message = this.message(reason, place, origin)
28114
28115 message.fatal = null
28116
28117 return message
28118 }
28119
28120 /**
28121 * Create a fatal error associated with the file.
28122 *
28123 * Its `fatal` is set to `true` and `file` is set to the current file path.
28124 * Its added to `file.messages`.
28125 *
28126 * > 👉 **Note**: a fatal error means that a file is no longer processable.
28127 *
28128 * @param {string | Error | VFileMessage} reason
28129 * Reason for message, uses the stack and message of the error if given.
28130 * @param {Node | NodeLike | Position | Point | null | undefined} [place]
28131 * Place in file where the message occurred.
28132 * @param {string | null | undefined} [origin]
28133 * Place in code where the message originates (example:
28134 * `'my-package:my-rule'` or `'my-rule'`).
28135 * @returns {never}
28136 * Message.
28137 * @throws {VFileMessage}
28138 * Message.
28139 */
28140 fail(reason, place, origin) {
28141 const message = this.message(reason, place, origin)
28142
28143 message.fatal = true
28144
28145 throw message
28146 }
28147 }
28148
28149 /**
28150 * Assert that `part` is not a path (as in, does not contain `path.sep`).
28151 *
28152 * @param {string | null | undefined} part
28153 * File path part.
28154 * @param {string} name
28155 * Part name.
28156 * @returns {void}
28157 * Nothing.
28158 */
28159 function assertPart(part, name) {
28160 if (part && part.includes(_minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.sep)) {
28161 throw new Error(
28162 '`' + name + '` cannot be a path: did not expect `' + _minpath_js__WEBPACK_IMPORTED_MODULE_4__.path.sep + '`'
28163 )
28164 }
28165 }
28166
28167 /**
28168 * Assert that `part` is not empty.
28169 *
28170 * @param {string | undefined} part
28171 * Thing.
28172 * @param {string} name
28173 * Part name.
28174 * @returns {asserts part is string}
28175 * Nothing.
28176 */
28177 function assertNonEmpty(part, name) {
28178 if (!part) {
28179 throw new Error('`' + name + '` cannot be empty')
28180 }
28181 }
28182
28183 /**
28184 * Assert `path` exists.
28185 *
28186 * @param {string | undefined} path
28187 * Path.
28188 * @param {string} name
28189 * Dependency name.
28190 * @returns {asserts path is string}
28191 * Nothing.
28192 */
28193 function assertPath(path, name) {
28194 if (!path) {
28195 throw new Error('Setting `' + name + '` requires `path` to be set too')
28196 }
28197 }
28198
28199 /**
28200 * Assert `value` is a buffer.
28201 *
28202 * @param {unknown} value
28203 * thing.
28204 * @returns {value is Buffer}
28205 * Whether `value` is a Node.js buffer.
28206 */
28207 function buffer(value) {
28208 return is_buffer__WEBPACK_IMPORTED_MODULE_0__(value)
28209 }
28210
28211
28212 /***/ }),
28213
28214 /***/ "../node_modules/vfile/lib/minpath.browser.js":
28215 /*!****************************************************!*\
28216 !*** ../node_modules/vfile/lib/minpath.browser.js ***!
28217 \****************************************************/
28218 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28219
28220 "use strict";
28221 __webpack_require__.r(__webpack_exports__);
28222 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28223 /* harmony export */ "path": () => (/* binding */ path)
28224 /* harmony export */ });
28225 // A derivative work based on:
28226 // <https://github.com/browserify/path-browserify>.
28227 // Which is licensed:
28228 //
28229 // MIT License
28230 //
28231 // Copyright (c) 2013 James Halliday
28232 //
28233 // Permission is hereby granted, free of charge, to any person obtaining a copy of
28234 // this software and associated documentation files (the "Software"), to deal in
28235 // the Software without restriction, including without limitation the rights to
28236 // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
28237 // the Software, and to permit persons to whom the Software is furnished to do so,
28238 // subject to the following conditions:
28239 //
28240 // The above copyright notice and this permission notice shall be included in all
28241 // copies or substantial portions of the Software.
28242 //
28243 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28244 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
28245 // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
28246 // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
28247 // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28248 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28249 // A derivative work based on:
28250 //
28251 // Parts of that are extracted from Node’s internal `path` module:
28252 // <https://github.com/nodejs/node/blob/master/lib/path.js>.
28253 // Which is licensed:
28254 //
28255 // Copyright Joyent, Inc. and other Node contributors.
28256 //
28257 // Permission is hereby granted, free of charge, to any person obtaining a
28258 // copy of this software and associated documentation files (the
28259 // "Software"), to deal in the Software without restriction, including
28260 // without limitation the rights to use, copy, modify, merge, publish,
28261 // distribute, sublicense, and/or sell copies of the Software, and to permit
28262 // persons to whom the Software is furnished to do so, subject to the
28263 // following conditions:
28264 //
28265 // The above copyright notice and this permission notice shall be included
28266 // in all copies or substantial portions of the Software.
28267 //
28268 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
28269 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28270 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
28271 // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
28272 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
28273 // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
28274 // USE OR OTHER DEALINGS IN THE SOFTWARE.
28275
28276 const path = {basename, dirname, extname, join, sep: '/'}
28277
28278 /* eslint-disable max-depth, complexity */
28279
28280 /**
28281 * Get the basename from a path.
28282 *
28283 * @param {string} path
28284 * File path.
28285 * @param {string | undefined} [ext]
28286 * Extension to strip.
28287 * @returns {string}
28288 * Stem or basename.
28289 */
28290 function basename(path, ext) {
28291 if (ext !== undefined && typeof ext !== 'string') {
28292 throw new TypeError('"ext" argument must be a string')
28293 }
28294
28295 assertPath(path)
28296 let start = 0
28297 let end = -1
28298 let index = path.length
28299 /** @type {boolean | undefined} */
28300 let seenNonSlash
28301
28302 if (ext === undefined || ext.length === 0 || ext.length > path.length) {
28303 while (index--) {
28304 if (path.charCodeAt(index) === 47 /* `/` */) {
28305 // If we reached a path separator that was not part of a set of path
28306 // separators at the end of the string, stop now.
28307 if (seenNonSlash) {
28308 start = index + 1
28309 break
28310 }
28311 } else if (end < 0) {
28312 // We saw the first non-path separator, mark this as the end of our
28313 // path component.
28314 seenNonSlash = true
28315 end = index + 1
28316 }
28317 }
28318
28319 return end < 0 ? '' : path.slice(start, end)
28320 }
28321
28322 if (ext === path) {
28323 return ''
28324 }
28325
28326 let firstNonSlashEnd = -1
28327 let extIndex = ext.length - 1
28328
28329 while (index--) {
28330 if (path.charCodeAt(index) === 47 /* `/` */) {
28331 // If we reached a path separator that was not part of a set of path
28332 // separators at the end of the string, stop now.
28333 if (seenNonSlash) {
28334 start = index + 1
28335 break
28336 }
28337 } else {
28338 if (firstNonSlashEnd < 0) {
28339 // We saw the first non-path separator, remember this index in case
28340 // we need it if the extension ends up not matching.
28341 seenNonSlash = true
28342 firstNonSlashEnd = index + 1
28343 }
28344
28345 if (extIndex > -1) {
28346 // Try to match the explicit extension.
28347 if (path.charCodeAt(index) === ext.charCodeAt(extIndex--)) {
28348 if (extIndex < 0) {
28349 // We matched the extension, so mark this as the end of our path
28350 // component
28351 end = index
28352 }
28353 } else {
28354 // Extension does not match, so our result is the entire path
28355 // component
28356 extIndex = -1
28357 end = firstNonSlashEnd
28358 }
28359 }
28360 }
28361 }
28362
28363 if (start === end) {
28364 end = firstNonSlashEnd
28365 } else if (end < 0) {
28366 end = path.length
28367 }
28368
28369 return path.slice(start, end)
28370 }
28371
28372 /**
28373 * Get the dirname from a path.
28374 *
28375 * @param {string} path
28376 * File path.
28377 * @returns {string}
28378 * File path.
28379 */
28380 function dirname(path) {
28381 assertPath(path)
28382
28383 if (path.length === 0) {
28384 return '.'
28385 }
28386
28387 let end = -1
28388 let index = path.length
28389 /** @type {boolean | undefined} */
28390 let unmatchedSlash
28391
28392 // Prefix `--` is important to not run on `0`.
28393 while (--index) {
28394 if (path.charCodeAt(index) === 47 /* `/` */) {
28395 if (unmatchedSlash) {
28396 end = index
28397 break
28398 }
28399 } else if (!unmatchedSlash) {
28400 // We saw the first non-path separator
28401 unmatchedSlash = true
28402 }
28403 }
28404
28405 return end < 0
28406 ? path.charCodeAt(0) === 47 /* `/` */
28407 ? '/'
28408 : '.'
28409 : end === 1 && path.charCodeAt(0) === 47 /* `/` */
28410 ? '//'
28411 : path.slice(0, end)
28412 }
28413
28414 /**
28415 * Get an extname from a path.
28416 *
28417 * @param {string} path
28418 * File path.
28419 * @returns {string}
28420 * Extname.
28421 */
28422 function extname(path) {
28423 assertPath(path)
28424
28425 let index = path.length
28426
28427 let end = -1
28428 let startPart = 0
28429 let startDot = -1
28430 // Track the state of characters (if any) we see before our first dot and
28431 // after any path separator we find.
28432 let preDotState = 0
28433 /** @type {boolean | undefined} */
28434 let unmatchedSlash
28435
28436 while (index--) {
28437 const code = path.charCodeAt(index)
28438
28439 if (code === 47 /* `/` */) {
28440 // If we reached a path separator that was not part of a set of path
28441 // separators at the end of the string, stop now.
28442 if (unmatchedSlash) {
28443 startPart = index + 1
28444 break
28445 }
28446
28447 continue
28448 }
28449
28450 if (end < 0) {
28451 // We saw the first non-path separator, mark this as the end of our
28452 // extension.
28453 unmatchedSlash = true
28454 end = index + 1
28455 }
28456
28457 if (code === 46 /* `.` */) {
28458 // If this is our first dot, mark it as the start of our extension.
28459 if (startDot < 0) {
28460 startDot = index
28461 } else if (preDotState !== 1) {
28462 preDotState = 1
28463 }
28464 } else if (startDot > -1) {
28465 // We saw a non-dot and non-path separator before our dot, so we should
28466 // have a good chance at having a non-empty extension.
28467 preDotState = -1
28468 }
28469 }
28470
28471 if (
28472 startDot < 0 ||
28473 end < 0 ||
28474 // We saw a non-dot character immediately before the dot.
28475 preDotState === 0 ||
28476 // The (right-most) trimmed path component is exactly `..`.
28477 (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)
28478 ) {
28479 return ''
28480 }
28481
28482 return path.slice(startDot, end)
28483 }
28484
28485 /**
28486 * Join segments from a path.
28487 *
28488 * @param {Array<string>} segments
28489 * Path segments.
28490 * @returns {string}
28491 * File path.
28492 */
28493 function join(...segments) {
28494 let index = -1
28495 /** @type {string | undefined} */
28496 let joined
28497
28498 while (++index < segments.length) {
28499 assertPath(segments[index])
28500
28501 if (segments[index]) {
28502 joined =
28503 joined === undefined ? segments[index] : joined + '/' + segments[index]
28504 }
28505 }
28506
28507 return joined === undefined ? '.' : normalize(joined)
28508 }
28509
28510 /**
28511 * Normalize a basic file path.
28512 *
28513 * @param {string} path
28514 * File path.
28515 * @returns {string}
28516 * File path.
28517 */
28518 // Note: `normalize` is not exposed as `path.normalize`, so some code is
28519 // manually removed from it.
28520 function normalize(path) {
28521 assertPath(path)
28522
28523 const absolute = path.charCodeAt(0) === 47 /* `/` */
28524
28525 // Normalize the path according to POSIX rules.
28526 let value = normalizeString(path, !absolute)
28527
28528 if (value.length === 0 && !absolute) {
28529 value = '.'
28530 }
28531
28532 if (value.length > 0 && path.charCodeAt(path.length - 1) === 47 /* / */) {
28533 value += '/'
28534 }
28535
28536 return absolute ? '/' + value : value
28537 }
28538
28539 /**
28540 * Resolve `.` and `..` elements in a path with directory names.
28541 *
28542 * @param {string} path
28543 * File path.
28544 * @param {boolean} allowAboveRoot
28545 * Whether `..` can move above root.
28546 * @returns {string}
28547 * File path.
28548 */
28549 function normalizeString(path, allowAboveRoot) {
28550 let result = ''
28551 let lastSegmentLength = 0
28552 let lastSlash = -1
28553 let dots = 0
28554 let index = -1
28555 /** @type {number | undefined} */
28556 let code
28557 /** @type {number} */
28558 let lastSlashIndex
28559
28560 while (++index <= path.length) {
28561 if (index < path.length) {
28562 code = path.charCodeAt(index)
28563 } else if (code === 47 /* `/` */) {
28564 break
28565 } else {
28566 code = 47 /* `/` */
28567 }
28568
28569 if (code === 47 /* `/` */) {
28570 if (lastSlash === index - 1 || dots === 1) {
28571 // Empty.
28572 } else if (lastSlash !== index - 1 && dots === 2) {
28573 if (
28574 result.length < 2 ||
28575 lastSegmentLength !== 2 ||
28576 result.charCodeAt(result.length - 1) !== 46 /* `.` */ ||
28577 result.charCodeAt(result.length - 2) !== 46 /* `.` */
28578 ) {
28579 if (result.length > 2) {
28580 lastSlashIndex = result.lastIndexOf('/')
28581
28582 if (lastSlashIndex !== result.length - 1) {
28583 if (lastSlashIndex < 0) {
28584 result = ''
28585 lastSegmentLength = 0
28586 } else {
28587 result = result.slice(0, lastSlashIndex)
28588 lastSegmentLength = result.length - 1 - result.lastIndexOf('/')
28589 }
28590
28591 lastSlash = index
28592 dots = 0
28593 continue
28594 }
28595 } else if (result.length > 0) {
28596 result = ''
28597 lastSegmentLength = 0
28598 lastSlash = index
28599 dots = 0
28600 continue
28601 }
28602 }
28603
28604 if (allowAboveRoot) {
28605 result = result.length > 0 ? result + '/..' : '..'
28606 lastSegmentLength = 2
28607 }
28608 } else {
28609 if (result.length > 0) {
28610 result += '/' + path.slice(lastSlash + 1, index)
28611 } else {
28612 result = path.slice(lastSlash + 1, index)
28613 }
28614
28615 lastSegmentLength = index - lastSlash - 1
28616 }
28617
28618 lastSlash = index
28619 dots = 0
28620 } else if (code === 46 /* `.` */ && dots > -1) {
28621 dots++
28622 } else {
28623 dots = -1
28624 }
28625 }
28626
28627 return result
28628 }
28629
28630 /**
28631 * Make sure `path` is a string.
28632 *
28633 * @param {string} path
28634 * File path.
28635 * @returns {asserts path is string}
28636 * Nothing.
28637 */
28638 function assertPath(path) {
28639 if (typeof path !== 'string') {
28640 throw new TypeError(
28641 'Path must be a string. Received ' + JSON.stringify(path)
28642 )
28643 }
28644 }
28645
28646 /* eslint-enable max-depth, complexity */
28647
28648
28649 /***/ }),
28650
28651 /***/ "../node_modules/vfile/lib/minproc.browser.js":
28652 /*!****************************************************!*\
28653 !*** ../node_modules/vfile/lib/minproc.browser.js ***!
28654 \****************************************************/
28655 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28656
28657 "use strict";
28658 __webpack_require__.r(__webpack_exports__);
28659 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28660 /* harmony export */ "proc": () => (/* binding */ proc)
28661 /* harmony export */ });
28662 // Somewhat based on:
28663 // <https://github.com/defunctzombie/node-process/blob/master/browser.js>.
28664 // But I don’t think one tiny line of code can be copyrighted. 😅
28665 const proc = {cwd}
28666
28667 function cwd() {
28668 return '/'
28669 }
28670
28671
28672 /***/ }),
28673
28674 /***/ "../node_modules/vfile/lib/minurl.browser.js":
28675 /*!***************************************************!*\
28676 !*** ../node_modules/vfile/lib/minurl.browser.js ***!
28677 \***************************************************/
28678 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28679
28680 "use strict";
28681 __webpack_require__.r(__webpack_exports__);
28682 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28683 /* harmony export */ "isUrl": () => (/* reexport safe */ _minurl_shared_js__WEBPACK_IMPORTED_MODULE_0__.isUrl),
28684 /* harmony export */ "urlToPath": () => (/* binding */ urlToPath)
28685 /* harmony export */ });
28686 /* harmony import */ var _minurl_shared_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./minurl.shared.js */ "../node_modules/vfile/lib/minurl.shared.js");
28687 /// <reference lib="dom" />
28688
28689
28690
28691 // See: <https://github.com/nodejs/node/blob/fcf8ba4/lib/internal/url.js>
28692
28693 /**
28694 * @param {string | URL} path
28695 * File URL.
28696 * @returns {string}
28697 * File URL.
28698 */
28699 function urlToPath(path) {
28700 if (typeof path === 'string') {
28701 path = new URL(path)
28702 } else if (!(0,_minurl_shared_js__WEBPACK_IMPORTED_MODULE_0__.isUrl)(path)) {
28703 /** @type {NodeJS.ErrnoException} */
28704 const error = new TypeError(
28705 'The "path" argument must be of type string or an instance of URL. Received `' +
28706 path +
28707 '`'
28708 )
28709 error.code = 'ERR_INVALID_ARG_TYPE'
28710 throw error
28711 }
28712
28713 if (path.protocol !== 'file:') {
28714 /** @type {NodeJS.ErrnoException} */
28715 const error = new TypeError('The URL must be of scheme file')
28716 error.code = 'ERR_INVALID_URL_SCHEME'
28717 throw error
28718 }
28719
28720 return getPathFromURLPosix(path)
28721 }
28722
28723 /**
28724 * Get a path from a POSIX URL.
28725 *
28726 * @param {URL} url
28727 * URL.
28728 * @returns {string}
28729 * File path.
28730 */
28731 function getPathFromURLPosix(url) {
28732 if (url.hostname !== '') {
28733 /** @type {NodeJS.ErrnoException} */
28734 const error = new TypeError(
28735 'File URL host must be "localhost" or empty on darwin'
28736 )
28737 error.code = 'ERR_INVALID_FILE_URL_HOST'
28738 throw error
28739 }
28740
28741 const pathname = url.pathname
28742 let index = -1
28743
28744 while (++index < pathname.length) {
28745 if (
28746 pathname.charCodeAt(index) === 37 /* `%` */ &&
28747 pathname.charCodeAt(index + 1) === 50 /* `2` */
28748 ) {
28749 const third = pathname.charCodeAt(index + 2)
28750 if (third === 70 /* `F` */ || third === 102 /* `f` */) {
28751 /** @type {NodeJS.ErrnoException} */
28752 const error = new TypeError(
28753 'File URL path must not include encoded / characters'
28754 )
28755 error.code = 'ERR_INVALID_FILE_URL_PATH'
28756 throw error
28757 }
28758 }
28759 }
28760
28761 return decodeURIComponent(pathname)
28762 }
28763
28764
28765
28766
28767 /***/ }),
28768
28769 /***/ "../node_modules/vfile/lib/minurl.shared.js":
28770 /*!**************************************************!*\
28771 !*** ../node_modules/vfile/lib/minurl.shared.js ***!
28772 \**************************************************/
28773 /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
28774
28775 "use strict";
28776 __webpack_require__.r(__webpack_exports__);
28777 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28778 /* harmony export */ "isUrl": () => (/* binding */ isUrl)
28779 /* harmony export */ });
28780 /**
28781 * @typedef URL
28782 * @property {string} hash
28783 * @property {string} host
28784 * @property {string} hostname
28785 * @property {string} href
28786 * @property {string} origin
28787 * @property {string} password
28788 * @property {string} pathname
28789 * @property {string} port
28790 * @property {string} protocol
28791 * @property {string} search
28792 * @property {any} searchParams
28793 * @property {string} username
28794 * @property {() => string} toString
28795 * @property {() => string} toJSON
28796 */
28797
28798 /**
28799 * Check if `fileUrlOrPath` looks like a URL.
28800 *
28801 * @param {unknown} fileUrlOrPath
28802 * File path or URL.
28803 * @returns {fileUrlOrPath is URL}
28804 * Whether it’s a URL.
28805 */
28806 // From: <https://github.com/nodejs/node/blob/fcf8ba4/lib/internal/url.js#L1501>
28807 function isUrl(fileUrlOrPath) {
28808 return (
28809 fileUrlOrPath !== null &&
28810 typeof fileUrlOrPath === 'object' &&
28811 // @ts-expect-error: indexable.
28812 fileUrlOrPath.href &&
28813 // @ts-expect-error: indexable.
28814 fileUrlOrPath.origin
28815 )
28816 }
28817
28818
28819 /***/ })
28820
28821 /******/ });
28822 /************************************************************************/
28823 /******/ // The module cache
28824 /******/ var __webpack_module_cache__ = {};
28825 /******/
28826 /******/ // The require function
28827 /******/ function __webpack_require__(moduleId) {
28828 /******/ // Check if module is in cache
28829 /******/ var cachedModule = __webpack_module_cache__[moduleId];
28830 /******/ if (cachedModule !== undefined) {
28831 /******/ return cachedModule.exports;
28832 /******/ }
28833 /******/ // Create a new module (and put it into the cache)
28834 /******/ var module = __webpack_module_cache__[moduleId] = {
28835 /******/ // no module.id needed
28836 /******/ // no module.loaded needed
28837 /******/ exports: {}
28838 /******/ };
28839 /******/
28840 /******/ // Execute the module function
28841 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
28842 /******/
28843 /******/ // Return the exports of the module
28844 /******/ return module.exports;
28845 /******/ }
28846 /******/
28847 /************************************************************************/
28848 /******/ /* webpack/runtime/define property getters */
28849 /******/ (() => {
28850 /******/ // define getter functions for harmony exports
28851 /******/ __webpack_require__.d = (exports, definition) => {
28852 /******/ for(var key in definition) {
28853 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
28854 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
28855 /******/ }
28856 /******/ }
28857 /******/ };
28858 /******/ })();
28859 /******/
28860 /******/ /* webpack/runtime/hasOwnProperty shorthand */
28861 /******/ (() => {
28862 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
28863 /******/ })();
28864 /******/
28865 /******/ /* webpack/runtime/make namespace object */
28866 /******/ (() => {
28867 /******/ // define __esModule on exports
28868 /******/ __webpack_require__.r = (exports) => {
28869 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
28870 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
28871 /******/ }
28872 /******/ Object.defineProperty(exports, '__esModule', { value: true });
28873 /******/ };
28874 /******/ })();
28875 /******/
28876 /************************************************************************/
28877 var __webpack_exports__ = {};
28878 // This entry need to be wrapped in an IIFE because it need to be in strict mode.
28879 (() => {
28880 "use strict";
28881 /*!**********************************************!*\
28882 !*** ../modules/ai/assets/js/admin/index.js ***!
28883 \**********************************************/
28884
28885
28886 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
28887 var _app = _interopRequireDefault(__webpack_require__(/*! elementor/modules/ai/assets/js/editor/app */ "../modules/ai/assets/js/editor/app.js"));
28888 // Temporary solution for exposing the AI App.
28889 window.__UNSTABLE__elementorAI = {
28890 App: _app.default
28891 };
28892 })();
28893
28894 /******/ })()
28895 ;
28896 //# sourceMappingURL=ai-admin.js.map