@pitchfork-ui/react 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -5
- package/dist/components/Alert/Alert.css +83 -0
- package/dist/{index8.js → components/Alert/Alert2.js} +3 -3
- package/dist/components/Avatar/Avatar.css +97 -0
- package/dist/{index10.js → components/Avatar/Avatar2.js} +2 -2
- package/dist/components/Badge/Badge.css +26 -0
- package/dist/{index23.js → components/Badge/Badge2.js} +2 -2
- package/dist/components/BadgeGroup/BadgeGroup.css +115 -0
- package/dist/{index14.js → components/BadgeGroup/BadgeGroup2.js} +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.css +45 -0
- package/dist/{index18.js → components/Breadcrumbs/Breadcrumbs2.js} +2 -2
- package/dist/components/Button/Button.css +93 -0
- package/dist/{index12.js → components/Button/Button2.js} +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.css +107 -0
- package/dist/{index16.js → components/ButtonGroup/ButtonGroup2.js} +2 -2
- package/dist/components/Calendar/Calendar.css +144 -0
- package/dist/{index40.js → components/Calendar/Calendar2.js} +4 -4
- package/dist/components/Card/Card.css +23 -0
- package/dist/{index25.js → components/Card/Card2.js} +2 -2
- package/dist/components/Carousel/Carousel.css +122 -0
- package/dist/{index42.js → components/Carousel/Carousel2.js} +3 -3
- package/dist/components/Checkbox/Checkbox.css +62 -0
- package/dist/{index29.js → components/Checkbox/Checkbox2.js} +2 -2
- package/dist/components/CodeSnippet/CodeSnippet.css +155 -0
- package/dist/{index46.js → components/CodeSnippet/CodeSnippet2.js} +6 -6
- package/dist/components/ContentDivider/ContentDivider.css +38 -0
- package/dist/{index48.js → components/ContentDivider/ContentDivider2.js} +2 -2
- package/dist/components/CreditCard/CreditCard.css +139 -0
- package/dist/{index27.js → components/CreditCard/CreditCard2.js} +2 -2
- package/dist/components/DatePicker/DatePicker.css +91 -0
- package/dist/{index50.js → components/DatePicker/DatePicker2.js} +9 -9
- package/dist/components/Dropdown/Dropdown.css +132 -0
- package/dist/{index38.js → components/Dropdown/Dropdown2.js} +8 -8
- package/dist/components/EmptyState/EmptyState.css +72 -0
- package/dist/{index52.js → components/EmptyState/EmptyState2.js} +3 -3
- package/dist/components/FileUploader/FileUploader.css +135 -0
- package/dist/{index54.js → components/FileUploader/FileUploader2.js} +4 -4
- package/dist/components/GaugeChart/GaugeChart.css +46 -0
- package/dist/components/GaugeChart/GaugeChart2.js +73 -0
- package/dist/components/HeaderNavigation/HeaderNavigation.css +87 -0
- package/dist/{index56.js → components/HeaderNavigation/HeaderNavigation2.js} +2 -2
- package/dist/components/Icon/Icon.css +6 -0
- package/dist/{index6.js → components/Icon/Icon2.js} +2 -2
- package/dist/components/InlineCTA/InlineCTA.css +86 -0
- package/dist/{index58.js → components/InlineCTA/InlineCTA2.js} +3 -3
- package/dist/components/Input/Input.css +75 -0
- package/dist/{index21.js → components/Input/Input2.js} +3 -3
- package/dist/components/LineBarCharts/LineBarChart.css +122 -0
- package/dist/{index60.js → components/LineBarCharts/LineBarChart2.js} +11 -3
- package/dist/components/LoadingIndicators/LoadingIndicators.css +107 -0
- package/dist/{index62.js → components/LoadingIndicators/LoadingIndicators2.js} +2 -2
- package/dist/components/Metrics/Metrics.css +106 -0
- package/dist/{index64.js → components/Metrics/Metrics2.js} +3 -3
- package/dist/components/Modal/Modal.css +136 -0
- package/dist/{index66.js → components/Modal/Modal2.js} +4 -4
- package/dist/components/MultiSelect/MultiSelect.css +157 -0
- package/dist/{index68.js → components/MultiSelect/MultiSelect2.js} +11 -11
- package/dist/components/Notification/Notification.css +187 -0
- package/dist/{index70.js → components/Notification/Notification2.js} +3 -3
- package/dist/components/PageHeader/PageHeader.css +85 -0
- package/dist/{index72.js → components/PageHeader/PageHeader2.js} +3 -3
- package/dist/components/Pagination/Pagination.css +101 -0
- package/dist/{index74.js → components/Pagination/Pagination2.js} +2 -2
- package/dist/components/PieChart/PieChart.css +81 -0
- package/dist/{index76.js → components/PieChart/PieChart2.js} +2 -2
- package/dist/components/ProgressIndicators/ProgressIndicators.css +77 -0
- package/dist/{index78.js → components/ProgressIndicators/ProgressIndicators2.js} +2 -2
- package/dist/components/ProgressSteps/ProgressSteps.css +158 -0
- package/dist/{index80.js → components/ProgressSteps/ProgressSteps2.js} +2 -2
- package/dist/components/RadarChart/RadarChart.css +97 -0
- package/dist/{index82.js → components/RadarChart/RadarChart2.js} +2 -2
- package/dist/components/RadioButton/RadioButton.css +21 -0
- package/dist/{index84.js → components/RadioButton/RadioButton2.js} +2 -2
- package/dist/components/RadioGroup/RadioGroup.css +64 -0
- package/dist/{index86.js → components/RadioGroup/RadioGroup2.js} +2 -2
- package/dist/components/Rating/Rating.css +91 -0
- package/dist/{index88.js → components/Rating/Rating2.js} +3 -3
- package/dist/components/RichTextEditor/RichTextEditor.css +94 -0
- package/dist/{index90.js → components/RichTextEditor/RichTextEditor2.js} +4 -4
- package/dist/components/SectionFooter/SectionFooter.css +59 -0
- package/dist/{index92.js → components/SectionFooter/SectionFooter2.js} +2 -2
- package/dist/components/SectionHeader/SectionHeader.css +78 -0
- package/dist/{index94.js → components/SectionHeader/SectionHeader2.js} +2 -2
- package/dist/components/Select/Select.css +137 -0
- package/dist/{index102.js → components/Select/Select2.js} +11 -11
- package/dist/components/SidebarNavigation/SidebarNavigation.css +116 -0
- package/dist/{index96.js → components/SidebarNavigation/SidebarNavigation2.js} +2 -2
- package/dist/components/SlideoutMenu/SlideoutMenu.css +161 -0
- package/dist/{index98.js → components/SlideoutMenu/SlideoutMenu2.js} +3 -3
- package/dist/components/Slider/Slider.css +106 -0
- package/dist/{index104.js → components/Slider/Slider2.js} +2 -2
- package/dist/components/Sparkline/Sparkline.css +17 -0
- package/dist/components/Sparkline/Sparkline2.js +99 -0
- package/dist/components/Switch/Switch.css +59 -0
- package/dist/{index100.js → components/Switch/Switch2.js} +2 -2
- package/dist/components/Table/Table.css +126 -0
- package/dist/{index108.js → components/Table/Table2.js} +2 -2
- package/dist/components/Tabs/Tabs.css +112 -0
- package/dist/{index110.js → components/Tabs/Tabs2.js} +2 -2
- package/dist/components/Tag/Tag.css +64 -0
- package/dist/{index106.js → components/Tag/Tag2.js} +3 -3
- package/dist/components/Textarea/Textarea.css +52 -0
- package/dist/{index112.js → components/Textarea/Textarea2.js} +3 -3
- package/dist/components/Tooltip/Tooltip.css +26 -0
- package/dist/{index114.js → components/Tooltip/Tooltip2.js} +2 -2
- package/dist/components/TreeView/TreeView.css +109 -0
- package/dist/{index116.js → components/TreeView/TreeView2.js} +2 -2
- package/dist/components/UtilityButton/UtilityButton.css +90 -0
- package/dist/{index118.js → components/UtilityButton/UtilityButton2.js} +2 -2
- package/dist/components/VideoPlayer/VideoPlayer.css +41 -0
- package/dist/{index120.js → components/VideoPlayer/VideoPlayer2.js} +2 -2
- package/dist/{index33.js → hooks/useDisclosure.js} +1 -1
- package/dist/{index34.js → hooks/useFocusTrap.js} +1 -1
- package/dist/index.cjs +380 -4450
- package/dist/index.js +65 -63
- package/dist/src/components/GaugeChart/GaugeChart.d.ts +17 -0
- package/dist/src/components/GaugeChart/GaugeChart.test.d.ts +1 -0
- package/dist/src/components/GaugeChart/index.d.ts +1 -0
- package/dist/src/components/LineBarCharts/LineBarChart.d.ts +2 -0
- package/dist/src/components/Sparkline/Sparkline.d.ts +15 -0
- package/dist/src/components/Sparkline/Sparkline.test.d.ts +1 -0
- package/dist/src/components/Sparkline/index.d.ts +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/styles/theme.css +779 -0
- package/dist/styles.css +124 -5
- package/dist/{index19.js → utils/FieldWrapper.js} +1 -1
- package/package.json +8 -4
- package/theme.starter.css +57 -0
- package/dist/index43.js +0 -16
- package/dist/index44.js +0 -4232
- /package/dist/{index3.js → a11y/index.js} +0 -0
- /package/dist/{index30.js → hooks/useAnchoredPosition.js} +0 -0
- /package/dist/{index31.js → hooks/useComposedRefs.js} +0 -0
- /package/dist/{index32.js → hooks/useControllableState.js} +0 -0
- /package/dist/{index35.js → hooks/useListNavigation.js} +0 -0
- /package/dist/{index36.js → hooks/useOutsideInteraction.js} +0 -0
- /package/dist/{index4.js → utils/cx.js} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
3
|
-
var __create
|
|
4
|
-
var __defProp
|
|
5
|
-
var __getOwnPropDesc
|
|
6
|
-
var __getOwnPropNames
|
|
7
|
-
var __getProtoOf
|
|
8
|
-
var __hasOwnProp
|
|
9
|
-
var __copyProps
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames
|
|
2
|
+
require('./styles.css');//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
11
|
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
13
|
get: ((k) => from[k]).bind(null, key),
|
|
14
|
-
enumerable: !(desc = __getOwnPropDesc
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
23
|
//#endregion
|
|
24
24
|
let react = require("react");
|
|
25
|
-
react = __toESM
|
|
25
|
+
react = __toESM(react, 1);
|
|
26
26
|
let _fortawesome_free_regular_svg_icons = require("@fortawesome/free-regular-svg-icons");
|
|
27
27
|
let _fortawesome_react_fontawesome = require("@fortawesome/react-fontawesome");
|
|
28
28
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
29
29
|
let react_dom = require("react-dom");
|
|
30
|
+
let prism_react_renderer = require("prism-react-renderer");
|
|
30
31
|
//#region src/a11y/index.ts
|
|
31
32
|
var Keys = {
|
|
32
33
|
ArrowDown: "ArrowDown",
|
|
@@ -1180,4448 +1181,204 @@ var Calendar = (0, react.forwardRef)(function Calendar({ className, value, defau
|
|
|
1180
1181
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1181
1182
|
type: "button",
|
|
1182
1183
|
className: "pf-calendar__nav",
|
|
1183
|
-
"aria-label": "Next month",
|
|
1184
|
-
disabled: isNextMonthDisabled,
|
|
1185
|
-
onClick: () => {
|
|
1186
|
-
setDisplayMonth((current) => clampToYearRange(addMonths(current, 1)));
|
|
1187
|
-
},
|
|
1188
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
1189
|
-
name: "square-caret-right",
|
|
1190
|
-
"aria-hidden": true
|
|
1191
|
-
})
|
|
1192
|
-
})
|
|
1193
|
-
]
|
|
1194
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1195
|
-
className: "pf-calendar__grid",
|
|
1196
|
-
role: "grid",
|
|
1197
|
-
"aria-label": monthLabel,
|
|
1198
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1199
|
-
role: "row",
|
|
1200
|
-
style: { display: "contents" },
|
|
1201
|
-
"aria-hidden": true,
|
|
1202
|
-
children: WEEKDAY_LABELS.map((day) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1203
|
-
role: "columnheader",
|
|
1204
|
-
className: "pf-calendar__weekday",
|
|
1205
|
-
children: day
|
|
1206
|
-
}, day))
|
|
1207
|
-
}), Array.from({ length: 6 }, (_, week) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1208
|
-
role: "row",
|
|
1209
|
-
style: { display: "contents" },
|
|
1210
|
-
children: dayItems.slice(week * 7, (week + 1) * 7).map(({ date, inCurrentMonth }) => {
|
|
1211
|
-
const isSelected = selectedDate ? isSameDay(selectedDate, date) : false;
|
|
1212
|
-
const isToday = isSameDay(today, date);
|
|
1213
|
-
const isDisabled = Boolean(disabledDates?.(date));
|
|
1214
|
-
if (!showOutsideDays && !inCurrentMonth) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1215
|
-
className: "pf-calendar__day-empty",
|
|
1216
|
-
"aria-hidden": true
|
|
1217
|
-
}, date.toISOString());
|
|
1218
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1219
|
-
type: "button",
|
|
1220
|
-
role: "gridcell",
|
|
1221
|
-
className: cx("pf-calendar__day", !inCurrentMonth && "pf-calendar__day--outside", isToday && "pf-calendar__day--today", isSelected && "pf-calendar__day--selected"),
|
|
1222
|
-
"aria-label": new Intl.DateTimeFormat("en-US", {
|
|
1223
|
-
month: "long",
|
|
1224
|
-
day: "numeric",
|
|
1225
|
-
year: "numeric"
|
|
1226
|
-
}).format(date),
|
|
1227
|
-
"aria-selected": isSelected,
|
|
1228
|
-
"aria-current": isToday ? "date" : void 0,
|
|
1229
|
-
disabled: isDisabled,
|
|
1230
|
-
onClick: () => {
|
|
1231
|
-
selectDate(date);
|
|
1232
|
-
},
|
|
1233
|
-
children: date.getDate()
|
|
1234
|
-
}, date.toISOString());
|
|
1235
|
-
})
|
|
1236
|
-
}, week))]
|
|
1237
|
-
})]
|
|
1238
|
-
}),
|
|
1239
|
-
description ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1240
|
-
className: "pf-field__description",
|
|
1241
|
-
id: descriptionId,
|
|
1242
|
-
children: description
|
|
1243
|
-
}) : null,
|
|
1244
|
-
error ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1245
|
-
className: "pf-field__error",
|
|
1246
|
-
id: errorId,
|
|
1247
|
-
children: error
|
|
1248
|
-
}) : null
|
|
1249
|
-
]
|
|
1250
|
-
});
|
|
1251
|
-
});
|
|
1252
|
-
Calendar.displayName = "Calendar";
|
|
1253
|
-
//#endregion
|
|
1254
|
-
//#region src/components/Carousel/Carousel.tsx
|
|
1255
|
-
var clamp$2 = (value, min, max) => {
|
|
1256
|
-
return Math.min(Math.max(value, min), max);
|
|
1257
|
-
};
|
|
1258
|
-
var Carousel = (0, react.forwardRef)(function Carousel({ className, slides, initialIndex = 0, loop = true, showIndicators = true, autoPlay = false, autoPlayInterval = 5e3, onIndexChange, "aria-label": ariaLabel = "Carousel", ...props }, ref) {
|
|
1259
|
-
const totalSlides = slides.length;
|
|
1260
|
-
const [activeIndex, setActiveIndex] = (0, react.useState)(clamp$2(initialIndex, 0, Math.max(totalSlides - 1, 0)));
|
|
1261
|
-
const resolvedActiveIndex = clamp$2(activeIndex, 0, Math.max(totalSlides - 1, 0));
|
|
1262
|
-
const goToIndex = (nextIndex) => {
|
|
1263
|
-
if (totalSlides === 0) return;
|
|
1264
|
-
const resolvedIndex = loop ? (nextIndex % totalSlides + totalSlides) % totalSlides : clamp$2(nextIndex, 0, totalSlides - 1);
|
|
1265
|
-
setActiveIndex(resolvedIndex);
|
|
1266
|
-
onIndexChange?.(resolvedIndex);
|
|
1267
|
-
};
|
|
1268
|
-
(0, react.useEffect)(() => {
|
|
1269
|
-
if (!autoPlay || totalSlides < 2) return;
|
|
1270
|
-
const interval = window.setInterval(() => {
|
|
1271
|
-
setActiveIndex((current) => {
|
|
1272
|
-
const next = loop ? (current + 1) % totalSlides : Math.min(current + 1, totalSlides - 1);
|
|
1273
|
-
onIndexChange?.(next);
|
|
1274
|
-
return next;
|
|
1275
|
-
});
|
|
1276
|
-
}, autoPlayInterval);
|
|
1277
|
-
return () => {
|
|
1278
|
-
window.clearInterval(interval);
|
|
1279
|
-
};
|
|
1280
|
-
}, [
|
|
1281
|
-
autoPlay,
|
|
1282
|
-
autoPlayInterval,
|
|
1283
|
-
loop,
|
|
1284
|
-
onIndexChange,
|
|
1285
|
-
totalSlides
|
|
1286
|
-
]);
|
|
1287
|
-
const isPrevDisabled = !loop && resolvedActiveIndex <= 0;
|
|
1288
|
-
const isNextDisabled = !loop && resolvedActiveIndex >= totalSlides - 1;
|
|
1289
|
-
const slideLabel = (0, react.useMemo)(() => {
|
|
1290
|
-
if (totalSlides === 0) return "No slides";
|
|
1291
|
-
return `Slide ${resolvedActiveIndex + 1} of ${totalSlides}`;
|
|
1292
|
-
}, [resolvedActiveIndex, totalSlides]);
|
|
1293
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1294
|
-
ref,
|
|
1295
|
-
className: cx("pf-carousel", className),
|
|
1296
|
-
"aria-label": ariaLabel,
|
|
1297
|
-
...props,
|
|
1298
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1299
|
-
className: "pf-carousel__viewport",
|
|
1300
|
-
role: "region",
|
|
1301
|
-
"aria-roledescription": "carousel",
|
|
1302
|
-
"aria-label": slideLabel,
|
|
1303
|
-
children: totalSlides === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1304
|
-
className: "pf-carousel__empty",
|
|
1305
|
-
role: "status",
|
|
1306
|
-
children: "Add at least one slide."
|
|
1307
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1308
|
-
className: "pf-carousel__track",
|
|
1309
|
-
style: { transform: `translateX(-${resolvedActiveIndex * 100}%)` },
|
|
1310
|
-
children: slides.map((slide, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1311
|
-
className: "pf-carousel__slide",
|
|
1312
|
-
role: "group",
|
|
1313
|
-
"aria-roledescription": "slide",
|
|
1314
|
-
"aria-label": `Slide ${index + 1} of ${totalSlides}`,
|
|
1315
|
-
"aria-hidden": index !== resolvedActiveIndex,
|
|
1316
|
-
children: slide
|
|
1317
|
-
}, `slide-${index}`))
|
|
1318
|
-
})
|
|
1319
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1320
|
-
className: "pf-carousel__controls",
|
|
1321
|
-
onKeyDown: (event) => {
|
|
1322
|
-
if (event.key === "ArrowLeft") {
|
|
1323
|
-
event.preventDefault();
|
|
1324
|
-
goToIndex(resolvedActiveIndex - 1);
|
|
1325
|
-
} else if (event.key === "ArrowRight") {
|
|
1326
|
-
event.preventDefault();
|
|
1327
|
-
goToIndex(resolvedActiveIndex + 1);
|
|
1328
|
-
}
|
|
1329
|
-
},
|
|
1330
|
-
children: [
|
|
1331
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1332
|
-
type: "button",
|
|
1333
|
-
className: "pf-carousel__nav",
|
|
1334
|
-
"aria-label": "Previous slide",
|
|
1335
|
-
disabled: isPrevDisabled || totalSlides < 2,
|
|
1336
|
-
onClick: () => {
|
|
1337
|
-
goToIndex(resolvedActiveIndex - 1);
|
|
1338
|
-
},
|
|
1339
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
1340
|
-
name: "square-caret-left",
|
|
1341
|
-
"aria-hidden": true
|
|
1342
|
-
})
|
|
1343
|
-
}),
|
|
1344
|
-
showIndicators && totalSlides > 1 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1345
|
-
className: "pf-carousel__indicators",
|
|
1346
|
-
"aria-label": "Slide indicators",
|
|
1347
|
-
children: slides.map((_, index) => {
|
|
1348
|
-
const isActive = index === resolvedActiveIndex;
|
|
1349
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1350
|
-
type: "button",
|
|
1351
|
-
className: cx("pf-carousel__indicator", isActive && "pf-carousel__indicator--active"),
|
|
1352
|
-
"aria-label": `Go to slide ${index + 1}`,
|
|
1353
|
-
"aria-current": isActive ? "true" : void 0,
|
|
1354
|
-
onClick: () => {
|
|
1355
|
-
goToIndex(index);
|
|
1356
|
-
}
|
|
1357
|
-
}, `indicator-${index}`);
|
|
1358
|
-
})
|
|
1359
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1360
|
-
className: "pf-carousel__indicator-spacer",
|
|
1361
|
-
"aria-hidden": true
|
|
1362
|
-
}),
|
|
1363
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1364
|
-
type: "button",
|
|
1365
|
-
className: "pf-carousel__nav",
|
|
1366
|
-
"aria-label": "Next slide",
|
|
1367
|
-
disabled: isNextDisabled || totalSlides < 2,
|
|
1368
|
-
onClick: () => {
|
|
1369
|
-
goToIndex(resolvedActiveIndex + 1);
|
|
1370
|
-
},
|
|
1371
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
1372
|
-
name: "square-caret-right",
|
|
1373
|
-
"aria-hidden": true
|
|
1374
|
-
})
|
|
1375
|
-
})
|
|
1376
|
-
]
|
|
1377
|
-
})]
|
|
1378
|
-
});
|
|
1379
|
-
});
|
|
1380
|
-
Carousel.displayName = "Carousel";
|
|
1381
|
-
//#endregion
|
|
1382
|
-
//#region ../../node_modules/clsx/dist/clsx.mjs
|
|
1383
|
-
function r(e) {
|
|
1384
|
-
var t, f, n = "";
|
|
1385
|
-
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
1386
|
-
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
1387
|
-
var o = e.length;
|
|
1388
|
-
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
1389
|
-
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
1390
|
-
return n;
|
|
1391
|
-
}
|
|
1392
|
-
function clsx() {
|
|
1393
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
1394
|
-
return n;
|
|
1395
|
-
}
|
|
1396
|
-
//#endregion
|
|
1397
|
-
//#region ../../node_modules/prism-react-renderer/dist/index.mjs
|
|
1398
|
-
var __create = Object.create;
|
|
1399
|
-
var __defProp = Object.defineProperty;
|
|
1400
|
-
var __defProps = Object.defineProperties;
|
|
1401
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
1402
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
1403
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
1404
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
1405
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
1406
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1407
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
1408
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
1409
|
-
enumerable: true,
|
|
1410
|
-
configurable: true,
|
|
1411
|
-
writable: true,
|
|
1412
|
-
value
|
|
1413
|
-
}) : obj[key] = value;
|
|
1414
|
-
var __spreadValues = (a, b) => {
|
|
1415
|
-
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
1416
|
-
if (__getOwnPropSymbols) {
|
|
1417
|
-
for (var prop of __getOwnPropSymbols(b)) if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
1418
|
-
}
|
|
1419
|
-
return a;
|
|
1420
|
-
};
|
|
1421
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
1422
|
-
var __objRest = (source, exclude) => {
|
|
1423
|
-
var target = {};
|
|
1424
|
-
for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
1425
|
-
if (source != null && __getOwnPropSymbols) {
|
|
1426
|
-
for (var prop of __getOwnPropSymbols(source)) if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
|
|
1427
|
-
}
|
|
1428
|
-
return target;
|
|
1429
|
-
};
|
|
1430
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
1431
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
1432
|
-
};
|
|
1433
|
-
var __export = (target, all) => {
|
|
1434
|
-
for (var name in all) __defProp(target, name, {
|
|
1435
|
-
get: all[name],
|
|
1436
|
-
enumerable: true
|
|
1437
|
-
});
|
|
1438
|
-
};
|
|
1439
|
-
var __copyProps = (to, from, except, desc) => {
|
|
1440
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
1441
|
-
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
1442
|
-
get: () => from[key],
|
|
1443
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
1444
|
-
});
|
|
1445
|
-
}
|
|
1446
|
-
return to;
|
|
1447
|
-
};
|
|
1448
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
1449
|
-
value: mod,
|
|
1450
|
-
enumerable: true
|
|
1451
|
-
}) : target, mod));
|
|
1452
|
-
var Prism = __toESM(__commonJS({ "../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(exports, module) {
|
|
1453
|
-
var Prism2 = function() {
|
|
1454
|
-
var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;
|
|
1455
|
-
var uniqueId = 0;
|
|
1456
|
-
var plainTextGrammar = {};
|
|
1457
|
-
var _ = {
|
|
1458
|
-
/**
|
|
1459
|
-
* A namespace for utility methods.
|
|
1460
|
-
*
|
|
1461
|
-
* All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
|
|
1462
|
-
* change or disappear at any time.
|
|
1463
|
-
*
|
|
1464
|
-
* @namespace
|
|
1465
|
-
* @memberof Prism
|
|
1466
|
-
*/
|
|
1467
|
-
util: {
|
|
1468
|
-
encode: function encode(tokens) {
|
|
1469
|
-
if (tokens instanceof Token) return new Token(tokens.type, encode(tokens.content), tokens.alias);
|
|
1470
|
-
else if (Array.isArray(tokens)) return tokens.map(encode);
|
|
1471
|
-
else return tokens.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
1472
|
-
},
|
|
1473
|
-
/**
|
|
1474
|
-
* Returns the name of the type of the given value.
|
|
1475
|
-
*
|
|
1476
|
-
* @param {any} o
|
|
1477
|
-
* @returns {string}
|
|
1478
|
-
* @example
|
|
1479
|
-
* type(null) === 'Null'
|
|
1480
|
-
* type(undefined) === 'Undefined'
|
|
1481
|
-
* type(123) === 'Number'
|
|
1482
|
-
* type('foo') === 'String'
|
|
1483
|
-
* type(true) === 'Boolean'
|
|
1484
|
-
* type([1, 2]) === 'Array'
|
|
1485
|
-
* type({}) === 'Object'
|
|
1486
|
-
* type(String) === 'Function'
|
|
1487
|
-
* type(/abc+/) === 'RegExp'
|
|
1488
|
-
*/
|
|
1489
|
-
type: function(o) {
|
|
1490
|
-
return Object.prototype.toString.call(o).slice(8, -1);
|
|
1491
|
-
},
|
|
1492
|
-
/**
|
|
1493
|
-
* Returns a unique number for the given object. Later calls will still return the same number.
|
|
1494
|
-
*
|
|
1495
|
-
* @param {Object} obj
|
|
1496
|
-
* @returns {number}
|
|
1497
|
-
*/
|
|
1498
|
-
objId: function(obj) {
|
|
1499
|
-
if (!obj["__id"]) Object.defineProperty(obj, "__id", { value: ++uniqueId });
|
|
1500
|
-
return obj["__id"];
|
|
1501
|
-
},
|
|
1502
|
-
/**
|
|
1503
|
-
* Creates a deep clone of the given object.
|
|
1504
|
-
*
|
|
1505
|
-
* The main intended use of this function is to clone language definitions.
|
|
1506
|
-
*
|
|
1507
|
-
* @param {T} o
|
|
1508
|
-
* @param {Record<number, any>} [visited]
|
|
1509
|
-
* @returns {T}
|
|
1510
|
-
* @template T
|
|
1511
|
-
*/
|
|
1512
|
-
clone: function deepClone(o, visited) {
|
|
1513
|
-
visited = visited || {};
|
|
1514
|
-
var clone;
|
|
1515
|
-
var id;
|
|
1516
|
-
switch (_.util.type(o)) {
|
|
1517
|
-
case "Object":
|
|
1518
|
-
id = _.util.objId(o);
|
|
1519
|
-
if (visited[id]) return visited[id];
|
|
1520
|
-
clone = {};
|
|
1521
|
-
visited[id] = clone;
|
|
1522
|
-
for (var key in o) if (o.hasOwnProperty(key)) clone[key] = deepClone(o[key], visited);
|
|
1523
|
-
return clone;
|
|
1524
|
-
case "Array":
|
|
1525
|
-
id = _.util.objId(o);
|
|
1526
|
-
if (visited[id]) return visited[id];
|
|
1527
|
-
clone = [];
|
|
1528
|
-
visited[id] = clone;
|
|
1529
|
-
/** @type {Array} */
|
|
1530
|
-
/** @type {any} */
|
|
1531
|
-
o.forEach(function(v, i) {
|
|
1532
|
-
clone[i] = deepClone(v, visited);
|
|
1533
|
-
});
|
|
1534
|
-
return clone;
|
|
1535
|
-
default: return o;
|
|
1536
|
-
}
|
|
1537
|
-
},
|
|
1538
|
-
/**
|
|
1539
|
-
* Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
|
|
1540
|
-
*
|
|
1541
|
-
* If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
|
|
1542
|
-
*
|
|
1543
|
-
* @param {Element} element
|
|
1544
|
-
* @returns {string}
|
|
1545
|
-
*/
|
|
1546
|
-
getLanguage: function(element) {
|
|
1547
|
-
while (element) {
|
|
1548
|
-
var m = lang.exec(element.className);
|
|
1549
|
-
if (m) return m[1].toLowerCase();
|
|
1550
|
-
element = element.parentElement;
|
|
1551
|
-
}
|
|
1552
|
-
return "none";
|
|
1553
|
-
},
|
|
1554
|
-
/**
|
|
1555
|
-
* Sets the Prism `language-xxxx` class of the given element.
|
|
1556
|
-
*
|
|
1557
|
-
* @param {Element} element
|
|
1558
|
-
* @param {string} language
|
|
1559
|
-
* @returns {void}
|
|
1560
|
-
*/
|
|
1561
|
-
setLanguage: function(element, language) {
|
|
1562
|
-
element.className = element.className.replace(RegExp(lang, "gi"), "");
|
|
1563
|
-
element.classList.add("language-" + language);
|
|
1564
|
-
},
|
|
1565
|
-
/**
|
|
1566
|
-
* Returns whether a given class is active for `element`.
|
|
1567
|
-
*
|
|
1568
|
-
* The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
|
|
1569
|
-
* if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
|
|
1570
|
-
* given class is just the given class with a `no-` prefix.
|
|
1571
|
-
*
|
|
1572
|
-
* Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
|
|
1573
|
-
* closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
|
|
1574
|
-
* ancestors have the given class or the negated version of it, then the default activation will be returned.
|
|
1575
|
-
*
|
|
1576
|
-
* In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
|
|
1577
|
-
* version of it, the class is considered active.
|
|
1578
|
-
*
|
|
1579
|
-
* @param {Element} element
|
|
1580
|
-
* @param {string} className
|
|
1581
|
-
* @param {boolean} [defaultActivation=false]
|
|
1582
|
-
* @returns {boolean}
|
|
1583
|
-
*/
|
|
1584
|
-
isActive: function(element, className, defaultActivation) {
|
|
1585
|
-
var no = "no-" + className;
|
|
1586
|
-
while (element) {
|
|
1587
|
-
var classList = element.classList;
|
|
1588
|
-
if (classList.contains(className)) return true;
|
|
1589
|
-
if (classList.contains(no)) return false;
|
|
1590
|
-
element = element.parentElement;
|
|
1591
|
-
}
|
|
1592
|
-
return !!defaultActivation;
|
|
1593
|
-
}
|
|
1594
|
-
},
|
|
1595
|
-
/**
|
|
1596
|
-
* This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
|
|
1597
|
-
*
|
|
1598
|
-
* @namespace
|
|
1599
|
-
* @memberof Prism
|
|
1600
|
-
* @public
|
|
1601
|
-
*/
|
|
1602
|
-
languages: {
|
|
1603
|
-
/**
|
|
1604
|
-
* The grammar for plain, unformatted text.
|
|
1605
|
-
*/
|
|
1606
|
-
plain: plainTextGrammar,
|
|
1607
|
-
plaintext: plainTextGrammar,
|
|
1608
|
-
text: plainTextGrammar,
|
|
1609
|
-
txt: plainTextGrammar,
|
|
1610
|
-
/**
|
|
1611
|
-
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
1612
|
-
*
|
|
1613
|
-
* If a token in `redef` also appears in the copied language, then the existing token in the copied language
|
|
1614
|
-
* will be overwritten at its original position.
|
|
1615
|
-
*
|
|
1616
|
-
* ## Best practices
|
|
1617
|
-
*
|
|
1618
|
-
* Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
|
|
1619
|
-
* doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
|
|
1620
|
-
* understand the language definition because, normally, the order of tokens matters in Prism grammars.
|
|
1621
|
-
*
|
|
1622
|
-
* Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
|
|
1623
|
-
* Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
|
|
1624
|
-
*
|
|
1625
|
-
* @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
|
|
1626
|
-
* @param {Grammar} redef The new tokens to append.
|
|
1627
|
-
* @returns {Grammar} The new language created.
|
|
1628
|
-
* @public
|
|
1629
|
-
* @example
|
|
1630
|
-
* Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
|
|
1631
|
-
* // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
|
|
1632
|
-
* // at its original position
|
|
1633
|
-
* 'comment': { ... },
|
|
1634
|
-
* // CSS doesn't have a 'color' token, so this token will be appended
|
|
1635
|
-
* 'color': /\b(?:red|green|blue)\b/
|
|
1636
|
-
* });
|
|
1637
|
-
*/
|
|
1638
|
-
extend: function(id, redef) {
|
|
1639
|
-
var lang2 = _.util.clone(_.languages[id]);
|
|
1640
|
-
for (var key in redef) lang2[key] = redef[key];
|
|
1641
|
-
return lang2;
|
|
1642
|
-
},
|
|
1643
|
-
/**
|
|
1644
|
-
* Inserts tokens _before_ another token in a language definition or any other grammar.
|
|
1645
|
-
*
|
|
1646
|
-
* ## Usage
|
|
1647
|
-
*
|
|
1648
|
-
* This helper method makes it easy to modify existing languages. For example, the CSS language definition
|
|
1649
|
-
* not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
|
|
1650
|
-
* in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
|
|
1651
|
-
* appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
|
|
1652
|
-
* this:
|
|
1653
|
-
*
|
|
1654
|
-
* ```js
|
|
1655
|
-
* Prism.languages.markup.style = {
|
|
1656
|
-
* // token
|
|
1657
|
-
* };
|
|
1658
|
-
* ```
|
|
1659
|
-
*
|
|
1660
|
-
* then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
|
|
1661
|
-
* before existing tokens. For the CSS example above, you would use it like this:
|
|
1662
|
-
*
|
|
1663
|
-
* ```js
|
|
1664
|
-
* Prism.languages.insertBefore('markup', 'cdata', {
|
|
1665
|
-
* 'style': {
|
|
1666
|
-
* // token
|
|
1667
|
-
* }
|
|
1668
|
-
* });
|
|
1669
|
-
* ```
|
|
1670
|
-
*
|
|
1671
|
-
* ## Special cases
|
|
1672
|
-
*
|
|
1673
|
-
* If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
|
|
1674
|
-
* will be ignored.
|
|
1675
|
-
*
|
|
1676
|
-
* This behavior can be used to insert tokens after `before`:
|
|
1677
|
-
*
|
|
1678
|
-
* ```js
|
|
1679
|
-
* Prism.languages.insertBefore('markup', 'comment', {
|
|
1680
|
-
* 'comment': Prism.languages.markup.comment,
|
|
1681
|
-
* // tokens after 'comment'
|
|
1682
|
-
* });
|
|
1683
|
-
* ```
|
|
1684
|
-
*
|
|
1685
|
-
* ## Limitations
|
|
1686
|
-
*
|
|
1687
|
-
* The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
|
|
1688
|
-
* properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
|
|
1689
|
-
* differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
|
|
1690
|
-
* deleting properties which is necessary to insert at arbitrary positions.
|
|
1691
|
-
*
|
|
1692
|
-
* To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
|
|
1693
|
-
* Instead, it will create a new object and replace all references to the target object with the new one. This
|
|
1694
|
-
* can be done without temporarily deleting properties, so the iteration order is well-defined.
|
|
1695
|
-
*
|
|
1696
|
-
* However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
|
|
1697
|
-
* you hold the target object in a variable, then the value of the variable will not change.
|
|
1698
|
-
*
|
|
1699
|
-
* ```js
|
|
1700
|
-
* var oldMarkup = Prism.languages.markup;
|
|
1701
|
-
* var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
|
|
1702
|
-
*
|
|
1703
|
-
* assert(oldMarkup !== Prism.languages.markup);
|
|
1704
|
-
* assert(newMarkup === Prism.languages.markup);
|
|
1705
|
-
* ```
|
|
1706
|
-
*
|
|
1707
|
-
* @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
|
|
1708
|
-
* object to be modified.
|
|
1709
|
-
* @param {string} before The key to insert before.
|
|
1710
|
-
* @param {Grammar} insert An object containing the key-value pairs to be inserted.
|
|
1711
|
-
* @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
|
|
1712
|
-
* object to be modified.
|
|
1713
|
-
*
|
|
1714
|
-
* Defaults to `Prism.languages`.
|
|
1715
|
-
* @returns {Grammar} The new grammar object.
|
|
1716
|
-
* @public
|
|
1717
|
-
*/
|
|
1718
|
-
insertBefore: function(inside, before, insert, root) {
|
|
1719
|
-
root = root || _.languages;
|
|
1720
|
-
var grammar = root[inside];
|
|
1721
|
-
var ret = {};
|
|
1722
|
-
for (var token in grammar) if (grammar.hasOwnProperty(token)) {
|
|
1723
|
-
if (token == before) {
|
|
1724
|
-
for (var newToken in insert) if (insert.hasOwnProperty(newToken)) ret[newToken] = insert[newToken];
|
|
1725
|
-
}
|
|
1726
|
-
if (!insert.hasOwnProperty(token)) ret[token] = grammar[token];
|
|
1727
|
-
}
|
|
1728
|
-
var old = root[inside];
|
|
1729
|
-
root[inside] = ret;
|
|
1730
|
-
_.languages.DFS(_.languages, function(key, value) {
|
|
1731
|
-
if (value === old && key != inside) this[key] = ret;
|
|
1732
|
-
});
|
|
1733
|
-
return ret;
|
|
1734
|
-
},
|
|
1735
|
-
DFS: function DFS(o, callback, type, visited) {
|
|
1736
|
-
visited = visited || {};
|
|
1737
|
-
var objId = _.util.objId;
|
|
1738
|
-
for (var i in o) if (o.hasOwnProperty(i)) {
|
|
1739
|
-
callback.call(o, i, o[i], type || i);
|
|
1740
|
-
var property = o[i];
|
|
1741
|
-
var propertyType = _.util.type(property);
|
|
1742
|
-
if (propertyType === "Object" && !visited[objId(property)]) {
|
|
1743
|
-
visited[objId(property)] = true;
|
|
1744
|
-
DFS(property, callback, null, visited);
|
|
1745
|
-
} else if (propertyType === "Array" && !visited[objId(property)]) {
|
|
1746
|
-
visited[objId(property)] = true;
|
|
1747
|
-
DFS(property, callback, i, visited);
|
|
1748
|
-
}
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
},
|
|
1752
|
-
plugins: {},
|
|
1753
|
-
/**
|
|
1754
|
-
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
|
1755
|
-
* and the language definitions to use, and returns a string with the HTML produced.
|
|
1756
|
-
*
|
|
1757
|
-
* The following hooks will be run:
|
|
1758
|
-
* 1. `before-tokenize`
|
|
1759
|
-
* 2. `after-tokenize`
|
|
1760
|
-
* 3. `wrap`: On each {@link Token}.
|
|
1761
|
-
*
|
|
1762
|
-
* @param {string} text A string with the code to be highlighted.
|
|
1763
|
-
* @param {Grammar} grammar An object containing the tokens to use.
|
|
1764
|
-
*
|
|
1765
|
-
* Usually a language definition like `Prism.languages.markup`.
|
|
1766
|
-
* @param {string} language The name of the language definition passed to `grammar`.
|
|
1767
|
-
* @returns {string} The highlighted HTML.
|
|
1768
|
-
* @memberof Prism
|
|
1769
|
-
* @public
|
|
1770
|
-
* @example
|
|
1771
|
-
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
1772
|
-
*/
|
|
1773
|
-
highlight: function(text, grammar, language) {
|
|
1774
|
-
var env = {
|
|
1775
|
-
code: text,
|
|
1776
|
-
grammar,
|
|
1777
|
-
language
|
|
1778
|
-
};
|
|
1779
|
-
_.hooks.run("before-tokenize", env);
|
|
1780
|
-
if (!env.grammar) throw new Error("The language \"" + env.language + "\" has no grammar.");
|
|
1781
|
-
env.tokens = _.tokenize(env.code, env.grammar);
|
|
1782
|
-
_.hooks.run("after-tokenize", env);
|
|
1783
|
-
return Token.stringify(_.util.encode(env.tokens), env.language);
|
|
1784
|
-
},
|
|
1785
|
-
/**
|
|
1786
|
-
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
1787
|
-
* and the language definitions to use, and returns an array with the tokenized code.
|
|
1788
|
-
*
|
|
1789
|
-
* When the language definition includes nested tokens, the function is called recursively on each of these tokens.
|
|
1790
|
-
*
|
|
1791
|
-
* This method could be useful in other contexts as well, as a very crude parser.
|
|
1792
|
-
*
|
|
1793
|
-
* @param {string} text A string with the code to be highlighted.
|
|
1794
|
-
* @param {Grammar} grammar An object containing the tokens to use.
|
|
1795
|
-
*
|
|
1796
|
-
* Usually a language definition like `Prism.languages.markup`.
|
|
1797
|
-
* @returns {TokenStream} An array of strings and tokens, a token stream.
|
|
1798
|
-
* @memberof Prism
|
|
1799
|
-
* @public
|
|
1800
|
-
* @example
|
|
1801
|
-
* let code = `var foo = 0;`;
|
|
1802
|
-
* let tokens = Prism.tokenize(code, Prism.languages.javascript);
|
|
1803
|
-
* tokens.forEach(token => {
|
|
1804
|
-
* if (token instanceof Prism.Token && token.type === 'number') {
|
|
1805
|
-
* console.log(`Found numeric literal: ${token.content}`);
|
|
1806
|
-
* }
|
|
1807
|
-
* });
|
|
1808
|
-
*/
|
|
1809
|
-
tokenize: function(text, grammar) {
|
|
1810
|
-
var rest = grammar.rest;
|
|
1811
|
-
if (rest) {
|
|
1812
|
-
for (var token in rest) grammar[token] = rest[token];
|
|
1813
|
-
delete grammar.rest;
|
|
1814
|
-
}
|
|
1815
|
-
var tokenList = new LinkedList();
|
|
1816
|
-
addAfter(tokenList, tokenList.head, text);
|
|
1817
|
-
matchGrammar(text, tokenList, grammar, tokenList.head, 0);
|
|
1818
|
-
return toArray(tokenList);
|
|
1819
|
-
},
|
|
1820
|
-
/**
|
|
1821
|
-
* @namespace
|
|
1822
|
-
* @memberof Prism
|
|
1823
|
-
* @public
|
|
1824
|
-
*/
|
|
1825
|
-
hooks: {
|
|
1826
|
-
all: {},
|
|
1827
|
-
/**
|
|
1828
|
-
* Adds the given callback to the list of callbacks for the given hook.
|
|
1829
|
-
*
|
|
1830
|
-
* The callback will be invoked when the hook it is registered for is run.
|
|
1831
|
-
* Hooks are usually directly run by a highlight function but you can also run hooks yourself.
|
|
1832
|
-
*
|
|
1833
|
-
* One callback function can be registered to multiple hooks and the same hook multiple times.
|
|
1834
|
-
*
|
|
1835
|
-
* @param {string} name The name of the hook.
|
|
1836
|
-
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
1837
|
-
* @public
|
|
1838
|
-
*/
|
|
1839
|
-
add: function(name, callback) {
|
|
1840
|
-
var hooks2 = _.hooks.all;
|
|
1841
|
-
hooks2[name] = hooks2[name] || [];
|
|
1842
|
-
hooks2[name].push(callback);
|
|
1843
|
-
},
|
|
1844
|
-
/**
|
|
1845
|
-
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
1846
|
-
*
|
|
1847
|
-
* Callbacks will be invoked synchronously and in the order in which they were registered.
|
|
1848
|
-
*
|
|
1849
|
-
* @param {string} name The name of the hook.
|
|
1850
|
-
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
1851
|
-
* @public
|
|
1852
|
-
*/
|
|
1853
|
-
run: function(name, env) {
|
|
1854
|
-
var callbacks = _.hooks.all[name];
|
|
1855
|
-
if (!callbacks || !callbacks.length) return;
|
|
1856
|
-
for (var i = 0, callback; callback = callbacks[i++];) callback(env);
|
|
1857
|
-
}
|
|
1858
|
-
},
|
|
1859
|
-
Token
|
|
1860
|
-
};
|
|
1861
|
-
function Token(type, content, alias, matchedStr) {
|
|
1862
|
-
this.type = type;
|
|
1863
|
-
this.content = content;
|
|
1864
|
-
this.alias = alias;
|
|
1865
|
-
this.length = (matchedStr || "").length | 0;
|
|
1866
|
-
}
|
|
1867
|
-
Token.stringify = function stringify(o, language) {
|
|
1868
|
-
if (typeof o == "string") return o;
|
|
1869
|
-
if (Array.isArray(o)) {
|
|
1870
|
-
var s = "";
|
|
1871
|
-
o.forEach(function(e) {
|
|
1872
|
-
s += stringify(e, language);
|
|
1873
|
-
});
|
|
1874
|
-
return s;
|
|
1875
|
-
}
|
|
1876
|
-
var env = {
|
|
1877
|
-
type: o.type,
|
|
1878
|
-
content: stringify(o.content, language),
|
|
1879
|
-
tag: "span",
|
|
1880
|
-
classes: ["token", o.type],
|
|
1881
|
-
attributes: {},
|
|
1882
|
-
language
|
|
1883
|
-
};
|
|
1884
|
-
var aliases = o.alias;
|
|
1885
|
-
if (aliases) if (Array.isArray(aliases)) Array.prototype.push.apply(env.classes, aliases);
|
|
1886
|
-
else env.classes.push(aliases);
|
|
1887
|
-
_.hooks.run("wrap", env);
|
|
1888
|
-
var attributes = "";
|
|
1889
|
-
for (var name in env.attributes) attributes += " " + name + "=\"" + (env.attributes[name] || "").replace(/"/g, """) + "\"";
|
|
1890
|
-
return "<" + env.tag + " class=\"" + env.classes.join(" ") + "\"" + attributes + ">" + env.content + "</" + env.tag + ">";
|
|
1891
|
-
};
|
|
1892
|
-
function matchPattern(pattern, pos, text, lookbehind) {
|
|
1893
|
-
pattern.lastIndex = pos;
|
|
1894
|
-
var match = pattern.exec(text);
|
|
1895
|
-
if (match && lookbehind && match[1]) {
|
|
1896
|
-
var lookbehindLength = match[1].length;
|
|
1897
|
-
match.index += lookbehindLength;
|
|
1898
|
-
match[0] = match[0].slice(lookbehindLength);
|
|
1899
|
-
}
|
|
1900
|
-
return match;
|
|
1901
|
-
}
|
|
1902
|
-
function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {
|
|
1903
|
-
for (var token in grammar) {
|
|
1904
|
-
if (!grammar.hasOwnProperty(token) || !grammar[token]) continue;
|
|
1905
|
-
var patterns = grammar[token];
|
|
1906
|
-
patterns = Array.isArray(patterns) ? patterns : [patterns];
|
|
1907
|
-
for (var j = 0; j < patterns.length; ++j) {
|
|
1908
|
-
if (rematch && rematch.cause == token + "," + j) return;
|
|
1909
|
-
var patternObj = patterns[j];
|
|
1910
|
-
var inside = patternObj.inside;
|
|
1911
|
-
var lookbehind = !!patternObj.lookbehind;
|
|
1912
|
-
var greedy = !!patternObj.greedy;
|
|
1913
|
-
var alias = patternObj.alias;
|
|
1914
|
-
if (greedy && !patternObj.pattern.global) {
|
|
1915
|
-
var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];
|
|
1916
|
-
patternObj.pattern = RegExp(patternObj.pattern.source, flags + "g");
|
|
1917
|
-
}
|
|
1918
|
-
var pattern = patternObj.pattern || patternObj;
|
|
1919
|
-
for (var currentNode = startNode.next, pos = startPos; currentNode !== tokenList.tail; pos += currentNode.value.length, currentNode = currentNode.next) {
|
|
1920
|
-
if (rematch && pos >= rematch.reach) break;
|
|
1921
|
-
var str = currentNode.value;
|
|
1922
|
-
if (tokenList.length > text.length) return;
|
|
1923
|
-
if (str instanceof Token) continue;
|
|
1924
|
-
var removeCount = 1;
|
|
1925
|
-
var match;
|
|
1926
|
-
if (greedy) {
|
|
1927
|
-
match = matchPattern(pattern, pos, text, lookbehind);
|
|
1928
|
-
if (!match || match.index >= text.length) break;
|
|
1929
|
-
var from = match.index;
|
|
1930
|
-
var to = match.index + match[0].length;
|
|
1931
|
-
var p = pos;
|
|
1932
|
-
p += currentNode.value.length;
|
|
1933
|
-
while (from >= p) {
|
|
1934
|
-
currentNode = currentNode.next;
|
|
1935
|
-
p += currentNode.value.length;
|
|
1936
|
-
}
|
|
1937
|
-
p -= currentNode.value.length;
|
|
1938
|
-
pos = p;
|
|
1939
|
-
if (currentNode.value instanceof Token) continue;
|
|
1940
|
-
for (var k = currentNode; k !== tokenList.tail && (p < to || typeof k.value === "string"); k = k.next) {
|
|
1941
|
-
removeCount++;
|
|
1942
|
-
p += k.value.length;
|
|
1943
|
-
}
|
|
1944
|
-
removeCount--;
|
|
1945
|
-
str = text.slice(pos, p);
|
|
1946
|
-
match.index -= pos;
|
|
1947
|
-
} else {
|
|
1948
|
-
match = matchPattern(pattern, 0, str, lookbehind);
|
|
1949
|
-
if (!match) continue;
|
|
1950
|
-
}
|
|
1951
|
-
var from = match.index;
|
|
1952
|
-
var matchStr = match[0];
|
|
1953
|
-
var before = str.slice(0, from);
|
|
1954
|
-
var after = str.slice(from + matchStr.length);
|
|
1955
|
-
var reach = pos + str.length;
|
|
1956
|
-
if (rematch && reach > rematch.reach) rematch.reach = reach;
|
|
1957
|
-
var removeFrom = currentNode.prev;
|
|
1958
|
-
if (before) {
|
|
1959
|
-
removeFrom = addAfter(tokenList, removeFrom, before);
|
|
1960
|
-
pos += before.length;
|
|
1961
|
-
}
|
|
1962
|
-
removeRange(tokenList, removeFrom, removeCount);
|
|
1963
|
-
var wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);
|
|
1964
|
-
currentNode = addAfter(tokenList, removeFrom, wrapped);
|
|
1965
|
-
if (after) addAfter(tokenList, currentNode, after);
|
|
1966
|
-
if (removeCount > 1) {
|
|
1967
|
-
var nestedRematch = {
|
|
1968
|
-
cause: token + "," + j,
|
|
1969
|
-
reach
|
|
1970
|
-
};
|
|
1971
|
-
matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);
|
|
1972
|
-
if (rematch && nestedRematch.reach > rematch.reach) rematch.reach = nestedRematch.reach;
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
function LinkedList() {
|
|
1979
|
-
var head = {
|
|
1980
|
-
value: null,
|
|
1981
|
-
prev: null,
|
|
1982
|
-
next: null
|
|
1983
|
-
};
|
|
1984
|
-
var tail = {
|
|
1985
|
-
value: null,
|
|
1986
|
-
prev: head,
|
|
1987
|
-
next: null
|
|
1988
|
-
};
|
|
1989
|
-
head.next = tail;
|
|
1990
|
-
this.head = head;
|
|
1991
|
-
this.tail = tail;
|
|
1992
|
-
this.length = 0;
|
|
1993
|
-
}
|
|
1994
|
-
function addAfter(list, node, value) {
|
|
1995
|
-
var next = node.next;
|
|
1996
|
-
var newNode = {
|
|
1997
|
-
value,
|
|
1998
|
-
prev: node,
|
|
1999
|
-
next
|
|
2000
|
-
};
|
|
2001
|
-
node.next = newNode;
|
|
2002
|
-
next.prev = newNode;
|
|
2003
|
-
list.length++;
|
|
2004
|
-
return newNode;
|
|
2005
|
-
}
|
|
2006
|
-
function removeRange(list, node, count) {
|
|
2007
|
-
var next = node.next;
|
|
2008
|
-
for (var i = 0; i < count && next !== list.tail; i++) next = next.next;
|
|
2009
|
-
node.next = next;
|
|
2010
|
-
next.prev = node;
|
|
2011
|
-
list.length -= i;
|
|
2012
|
-
}
|
|
2013
|
-
function toArray(list) {
|
|
2014
|
-
var array = [];
|
|
2015
|
-
var node = list.head.next;
|
|
2016
|
-
while (node !== list.tail) {
|
|
2017
|
-
array.push(node.value);
|
|
2018
|
-
node = node.next;
|
|
2019
|
-
}
|
|
2020
|
-
return array;
|
|
2021
|
-
}
|
|
2022
|
-
return _;
|
|
2023
|
-
}();
|
|
2024
|
-
module.exports = Prism2;
|
|
2025
|
-
Prism2.default = Prism2;
|
|
2026
|
-
} })());
|
|
2027
|
-
Prism.languages.markup = {
|
|
2028
|
-
comment: {
|
|
2029
|
-
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
2030
|
-
greedy: true
|
|
2031
|
-
},
|
|
2032
|
-
prolog: {
|
|
2033
|
-
pattern: /<\?[\s\S]+?\?>/,
|
|
2034
|
-
greedy: true
|
|
2035
|
-
},
|
|
2036
|
-
doctype: {
|
|
2037
|
-
pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
|
|
2038
|
-
greedy: true,
|
|
2039
|
-
inside: {
|
|
2040
|
-
"internal-subset": {
|
|
2041
|
-
pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/,
|
|
2042
|
-
lookbehind: true,
|
|
2043
|
-
greedy: true,
|
|
2044
|
-
inside: null
|
|
2045
|
-
},
|
|
2046
|
-
string: {
|
|
2047
|
-
pattern: /"[^"]*"|'[^']*'/,
|
|
2048
|
-
greedy: true
|
|
2049
|
-
},
|
|
2050
|
-
punctuation: /^<!|>$|[[\]]/,
|
|
2051
|
-
"doctype-tag": /^DOCTYPE/i,
|
|
2052
|
-
name: /[^\s<>'"]+/
|
|
2053
|
-
}
|
|
2054
|
-
},
|
|
2055
|
-
cdata: {
|
|
2056
|
-
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
2057
|
-
greedy: true
|
|
2058
|
-
},
|
|
2059
|
-
tag: {
|
|
2060
|
-
pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
|
|
2061
|
-
greedy: true,
|
|
2062
|
-
inside: {
|
|
2063
|
-
tag: {
|
|
2064
|
-
pattern: /^<\/?[^\s>\/]+/,
|
|
2065
|
-
inside: {
|
|
2066
|
-
punctuation: /^<\/?/,
|
|
2067
|
-
namespace: /^[^\s>\/:]+:/
|
|
2068
|
-
}
|
|
2069
|
-
},
|
|
2070
|
-
"special-attr": [],
|
|
2071
|
-
"attr-value": {
|
|
2072
|
-
pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
|
|
2073
|
-
inside: { punctuation: [{
|
|
2074
|
-
pattern: /^=/,
|
|
2075
|
-
alias: "attr-equals"
|
|
2076
|
-
}, {
|
|
2077
|
-
pattern: /^(\s*)["']|["']$/,
|
|
2078
|
-
lookbehind: true
|
|
2079
|
-
}] }
|
|
2080
|
-
},
|
|
2081
|
-
punctuation: /\/?>/,
|
|
2082
|
-
"attr-name": {
|
|
2083
|
-
pattern: /[^\s>\/]+/,
|
|
2084
|
-
inside: { namespace: /^[^\s>\/:]+:/ }
|
|
2085
|
-
}
|
|
2086
|
-
}
|
|
2087
|
-
},
|
|
2088
|
-
entity: [{
|
|
2089
|
-
pattern: /&[\da-z]{1,8};/i,
|
|
2090
|
-
alias: "named-entity"
|
|
2091
|
-
}, /&#x?[\da-f]{1,8};/i]
|
|
2092
|
-
}, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.languages.markup.doctype.inside["internal-subset"].inside = Prism.languages.markup, Prism.hooks.add("wrap", function(e) {
|
|
2093
|
-
"entity" === e.type && (e.attributes.title = e.content.replace(/&/, "&"));
|
|
2094
|
-
}), Object.defineProperty(Prism.languages.markup.tag, "addInlined", { value: function(e, n) {
|
|
2095
|
-
var t = {}, t = (t["language-" + n] = {
|
|
2096
|
-
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
2097
|
-
lookbehind: true,
|
|
2098
|
-
inside: Prism.languages[n]
|
|
2099
|
-
}, t.cdata = /^<!\[CDATA\[|\]\]>$/i, { "included-cdata": {
|
|
2100
|
-
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
2101
|
-
inside: t
|
|
2102
|
-
} }), n = (t["language-" + n] = {
|
|
2103
|
-
pattern: /[\s\S]+/,
|
|
2104
|
-
inside: Prism.languages[n]
|
|
2105
|
-
}, {});
|
|
2106
|
-
n[e] = {
|
|
2107
|
-
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
2108
|
-
return e;
|
|
2109
|
-
}), "i"),
|
|
2110
|
-
lookbehind: true,
|
|
2111
|
-
greedy: true,
|
|
2112
|
-
inside: t
|
|
2113
|
-
}, Prism.languages.insertBefore("markup", "cdata", n);
|
|
2114
|
-
} }), Object.defineProperty(Prism.languages.markup.tag, "addAttribute", { value: function(e, n) {
|
|
2115
|
-
Prism.languages.markup.tag.inside["special-attr"].push({
|
|
2116
|
-
pattern: RegExp(/(^|["'\s])/.source + "(?:" + e + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"),
|
|
2117
|
-
lookbehind: true,
|
|
2118
|
-
inside: {
|
|
2119
|
-
"attr-name": /^[^\s=]+/,
|
|
2120
|
-
"attr-value": {
|
|
2121
|
-
pattern: /=[\s\S]+/,
|
|
2122
|
-
inside: {
|
|
2123
|
-
value: {
|
|
2124
|
-
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
|
2125
|
-
lookbehind: true,
|
|
2126
|
-
alias: [n, "language-" + n],
|
|
2127
|
-
inside: Prism.languages[n]
|
|
2128
|
-
},
|
|
2129
|
-
punctuation: [{
|
|
2130
|
-
pattern: /^=/,
|
|
2131
|
-
alias: "attr-equals"
|
|
2132
|
-
}, /"|'/]
|
|
2133
|
-
}
|
|
2134
|
-
}
|
|
2135
|
-
}
|
|
2136
|
-
});
|
|
2137
|
-
} }), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup, Prism.languages.xml = Prism.languages.extend("markup", {}), Prism.languages.ssml = Prism.languages.xml, Prism.languages.atom = Prism.languages.xml, Prism.languages.rss = Prism.languages.xml, function(e) {
|
|
2138
|
-
var n = {
|
|
2139
|
-
pattern: /\\[\\(){}[\]^$+*?|.]/,
|
|
2140
|
-
alias: "escape"
|
|
2141
|
-
}, t = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/, a = "(?:[^\\\\-]|" + t.source + ")", a = RegExp(a + "-" + a), r = {
|
|
2142
|
-
pattern: /(<|')[^<>']+(?=[>']$)/,
|
|
2143
|
-
lookbehind: true,
|
|
2144
|
-
alias: "variable"
|
|
2145
|
-
};
|
|
2146
|
-
e.languages.regex = {
|
|
2147
|
-
"char-class": {
|
|
2148
|
-
pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,
|
|
2149
|
-
lookbehind: true,
|
|
2150
|
-
inside: {
|
|
2151
|
-
"char-class-negation": {
|
|
2152
|
-
pattern: /(^\[)\^/,
|
|
2153
|
-
lookbehind: true,
|
|
2154
|
-
alias: "operator"
|
|
2155
|
-
},
|
|
2156
|
-
"char-class-punctuation": {
|
|
2157
|
-
pattern: /^\[|\]$/,
|
|
2158
|
-
alias: "punctuation"
|
|
2159
|
-
},
|
|
2160
|
-
range: {
|
|
2161
|
-
pattern: a,
|
|
2162
|
-
inside: {
|
|
2163
|
-
escape: t,
|
|
2164
|
-
"range-punctuation": {
|
|
2165
|
-
pattern: /-/,
|
|
2166
|
-
alias: "operator"
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
},
|
|
2170
|
-
"special-escape": n,
|
|
2171
|
-
"char-set": {
|
|
2172
|
-
pattern: /\\[wsd]|\\p\{[^{}]+\}/i,
|
|
2173
|
-
alias: "class-name"
|
|
2174
|
-
},
|
|
2175
|
-
escape: t
|
|
2176
|
-
}
|
|
2177
|
-
},
|
|
2178
|
-
"special-escape": n,
|
|
2179
|
-
"char-set": {
|
|
2180
|
-
pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i,
|
|
2181
|
-
alias: "class-name"
|
|
2182
|
-
},
|
|
2183
|
-
backreference: [{
|
|
2184
|
-
pattern: /\\(?![123][0-7]{2})[1-9]/,
|
|
2185
|
-
alias: "keyword"
|
|
2186
|
-
}, {
|
|
2187
|
-
pattern: /\\k<[^<>']+>/,
|
|
2188
|
-
alias: "keyword",
|
|
2189
|
-
inside: { "group-name": r }
|
|
2190
|
-
}],
|
|
2191
|
-
anchor: {
|
|
2192
|
-
pattern: /[$^]|\\[ABbGZz]/,
|
|
2193
|
-
alias: "function"
|
|
2194
|
-
},
|
|
2195
|
-
escape: t,
|
|
2196
|
-
group: [{
|
|
2197
|
-
pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,
|
|
2198
|
-
alias: "punctuation",
|
|
2199
|
-
inside: { "group-name": r }
|
|
2200
|
-
}, {
|
|
2201
|
-
pattern: /\)/,
|
|
2202
|
-
alias: "punctuation"
|
|
2203
|
-
}],
|
|
2204
|
-
quantifier: {
|
|
2205
|
-
pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,
|
|
2206
|
-
alias: "number"
|
|
2207
|
-
},
|
|
2208
|
-
alternation: {
|
|
2209
|
-
pattern: /\|/,
|
|
2210
|
-
alias: "keyword"
|
|
2211
|
-
}
|
|
2212
|
-
};
|
|
2213
|
-
}(Prism), Prism.languages.clike = {
|
|
2214
|
-
comment: [{
|
|
2215
|
-
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
2216
|
-
lookbehind: true,
|
|
2217
|
-
greedy: true
|
|
2218
|
-
}, {
|
|
2219
|
-
pattern: /(^|[^\\:])\/\/.*/,
|
|
2220
|
-
lookbehind: true,
|
|
2221
|
-
greedy: true
|
|
2222
|
-
}],
|
|
2223
|
-
string: {
|
|
2224
|
-
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
2225
|
-
greedy: true
|
|
2226
|
-
},
|
|
2227
|
-
"class-name": {
|
|
2228
|
-
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
|
|
2229
|
-
lookbehind: true,
|
|
2230
|
-
inside: { punctuation: /[.\\]/ }
|
|
2231
|
-
},
|
|
2232
|
-
keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
|
|
2233
|
-
boolean: /\b(?:false|true)\b/,
|
|
2234
|
-
function: /\b\w+(?=\()/,
|
|
2235
|
-
number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
|
|
2236
|
-
operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
|
|
2237
|
-
punctuation: /[{}[\];(),.:]/
|
|
2238
|
-
}, Prism.languages.javascript = Prism.languages.extend("clike", {
|
|
2239
|
-
"class-name": [Prism.languages.clike["class-name"], {
|
|
2240
|
-
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
|
|
2241
|
-
lookbehind: true
|
|
2242
|
-
}],
|
|
2243
|
-
keyword: [{
|
|
2244
|
-
pattern: /((?:^|\})\s*)catch\b/,
|
|
2245
|
-
lookbehind: true
|
|
2246
|
-
}, {
|
|
2247
|
-
pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
|
|
2248
|
-
lookbehind: true
|
|
2249
|
-
}],
|
|
2250
|
-
function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
|
|
2251
|
-
number: {
|
|
2252
|
-
pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source),
|
|
2253
|
-
lookbehind: true
|
|
2254
|
-
},
|
|
2255
|
-
operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
|
|
2256
|
-
}), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", {
|
|
2257
|
-
regex: {
|
|
2258
|
-
pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),
|
|
2259
|
-
lookbehind: true,
|
|
2260
|
-
greedy: true,
|
|
2261
|
-
inside: {
|
|
2262
|
-
"regex-source": {
|
|
2263
|
-
pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
|
|
2264
|
-
lookbehind: true,
|
|
2265
|
-
alias: "language-regex",
|
|
2266
|
-
inside: Prism.languages.regex
|
|
2267
|
-
},
|
|
2268
|
-
"regex-delimiter": /^\/|\/$/,
|
|
2269
|
-
"regex-flags": /^[a-z]+$/
|
|
2270
|
-
}
|
|
2271
|
-
},
|
|
2272
|
-
"function-variable": {
|
|
2273
|
-
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
|
|
2274
|
-
alias: "function"
|
|
2275
|
-
},
|
|
2276
|
-
parameter: [
|
|
2277
|
-
{
|
|
2278
|
-
pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
|
|
2279
|
-
lookbehind: true,
|
|
2280
|
-
inside: Prism.languages.javascript
|
|
2281
|
-
},
|
|
2282
|
-
{
|
|
2283
|
-
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
|
|
2284
|
-
lookbehind: true,
|
|
2285
|
-
inside: Prism.languages.javascript
|
|
2286
|
-
},
|
|
2287
|
-
{
|
|
2288
|
-
pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
|
|
2289
|
-
lookbehind: true,
|
|
2290
|
-
inside: Prism.languages.javascript
|
|
2291
|
-
},
|
|
2292
|
-
{
|
|
2293
|
-
pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
|
|
2294
|
-
lookbehind: true,
|
|
2295
|
-
inside: Prism.languages.javascript
|
|
2296
|
-
}
|
|
2297
|
-
],
|
|
2298
|
-
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
|
|
2299
|
-
}), Prism.languages.insertBefore("javascript", "string", {
|
|
2300
|
-
hashbang: {
|
|
2301
|
-
pattern: /^#!.*/,
|
|
2302
|
-
greedy: true,
|
|
2303
|
-
alias: "comment"
|
|
2304
|
-
},
|
|
2305
|
-
"template-string": {
|
|
2306
|
-
pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
|
|
2307
|
-
greedy: true,
|
|
2308
|
-
inside: {
|
|
2309
|
-
"template-punctuation": {
|
|
2310
|
-
pattern: /^`|`$/,
|
|
2311
|
-
alias: "string"
|
|
2312
|
-
},
|
|
2313
|
-
interpolation: {
|
|
2314
|
-
pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
2315
|
-
lookbehind: true,
|
|
2316
|
-
inside: {
|
|
2317
|
-
"interpolation-punctuation": {
|
|
2318
|
-
pattern: /^\$\{|\}$/,
|
|
2319
|
-
alias: "punctuation"
|
|
2320
|
-
},
|
|
2321
|
-
rest: Prism.languages.javascript
|
|
2322
|
-
}
|
|
2323
|
-
},
|
|
2324
|
-
string: /[\s\S]+/
|
|
2325
|
-
}
|
|
2326
|
-
},
|
|
2327
|
-
"string-property": {
|
|
2328
|
-
pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
|
|
2329
|
-
lookbehind: true,
|
|
2330
|
-
greedy: true,
|
|
2331
|
-
alias: "property"
|
|
2332
|
-
}
|
|
2333
|
-
}), Prism.languages.insertBefore("javascript", "operator", { "literal-property": {
|
|
2334
|
-
pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
|
|
2335
|
-
lookbehind: true,
|
|
2336
|
-
alias: "property"
|
|
2337
|
-
} }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism.languages.js = Prism.languages.javascript, Prism.languages.actionscript = Prism.languages.extend("javascript", {
|
|
2338
|
-
keyword: /\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,
|
|
2339
|
-
operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/
|
|
2340
|
-
}), Prism.languages.actionscript["class-name"].alias = "function", delete Prism.languages.actionscript.parameter, delete Prism.languages.actionscript["literal-property"], Prism.languages.markup && Prism.languages.insertBefore("actionscript", "string", { xml: {
|
|
2341
|
-
pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,
|
|
2342
|
-
lookbehind: true,
|
|
2343
|
-
inside: Prism.languages.markup
|
|
2344
|
-
} }), function(e) {
|
|
2345
|
-
var n = /#(?!\{).+/, t = {
|
|
2346
|
-
pattern: /#\{[^}]+\}/,
|
|
2347
|
-
alias: "variable"
|
|
2348
|
-
};
|
|
2349
|
-
e.languages.coffeescript = e.languages.extend("javascript", {
|
|
2350
|
-
comment: n,
|
|
2351
|
-
string: [{
|
|
2352
|
-
pattern: /'(?:\\[\s\S]|[^\\'])*'/,
|
|
2353
|
-
greedy: true
|
|
2354
|
-
}, {
|
|
2355
|
-
pattern: /"(?:\\[\s\S]|[^\\"])*"/,
|
|
2356
|
-
greedy: true,
|
|
2357
|
-
inside: { interpolation: t }
|
|
2358
|
-
}],
|
|
2359
|
-
keyword: /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
|
|
2360
|
-
"class-member": {
|
|
2361
|
-
pattern: /@(?!\d)\w+/,
|
|
2362
|
-
alias: "variable"
|
|
2363
|
-
}
|
|
2364
|
-
}), e.languages.insertBefore("coffeescript", "comment", {
|
|
2365
|
-
"multiline-comment": {
|
|
2366
|
-
pattern: /###[\s\S]+?###/,
|
|
2367
|
-
alias: "comment"
|
|
2368
|
-
},
|
|
2369
|
-
"block-regex": {
|
|
2370
|
-
pattern: /\/{3}[\s\S]*?\/{3}/,
|
|
2371
|
-
alias: "regex",
|
|
2372
|
-
inside: {
|
|
2373
|
-
comment: n,
|
|
2374
|
-
interpolation: t
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
}), e.languages.insertBefore("coffeescript", "string", {
|
|
2378
|
-
"inline-javascript": {
|
|
2379
|
-
pattern: /`(?:\\[\s\S]|[^\\`])*`/,
|
|
2380
|
-
inside: {
|
|
2381
|
-
delimiter: {
|
|
2382
|
-
pattern: /^`|`$/,
|
|
2383
|
-
alias: "punctuation"
|
|
2384
|
-
},
|
|
2385
|
-
script: {
|
|
2386
|
-
pattern: /[\s\S]+/,
|
|
2387
|
-
alias: "language-javascript",
|
|
2388
|
-
inside: e.languages.javascript
|
|
2389
|
-
}
|
|
2390
|
-
}
|
|
2391
|
-
},
|
|
2392
|
-
"multiline-string": [{
|
|
2393
|
-
pattern: /'''[\s\S]*?'''/,
|
|
2394
|
-
greedy: true,
|
|
2395
|
-
alias: "string"
|
|
2396
|
-
}, {
|
|
2397
|
-
pattern: /"""[\s\S]*?"""/,
|
|
2398
|
-
greedy: true,
|
|
2399
|
-
alias: "string",
|
|
2400
|
-
inside: { interpolation: t }
|
|
2401
|
-
}]
|
|
2402
|
-
}), e.languages.insertBefore("coffeescript", "keyword", { property: /(?!\d)\w+(?=\s*:(?!:))/ }), delete e.languages.coffeescript["template-string"], e.languages.coffee = e.languages.coffeescript;
|
|
2403
|
-
}(Prism), function(l) {
|
|
2404
|
-
var e = l.languages.javadoclike = {
|
|
2405
|
-
parameter: {
|
|
2406
|
-
pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,
|
|
2407
|
-
lookbehind: true
|
|
2408
|
-
},
|
|
2409
|
-
keyword: {
|
|
2410
|
-
pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,
|
|
2411
|
-
lookbehind: true
|
|
2412
|
-
},
|
|
2413
|
-
punctuation: /[{}]/
|
|
2414
|
-
};
|
|
2415
|
-
Object.defineProperty(e, "addSupport", { value: function(e2, o) {
|
|
2416
|
-
(e2 = "string" == typeof e2 ? [e2] : e2).forEach(function(e3) {
|
|
2417
|
-
var n = function(e4) {
|
|
2418
|
-
e4.inside || (e4.inside = {}), e4.inside.rest = o;
|
|
2419
|
-
}, t = "doc-comment";
|
|
2420
|
-
if (a = l.languages[e3]) {
|
|
2421
|
-
var a, r = a[t];
|
|
2422
|
-
if ((r = r ? r : (a = l.languages.insertBefore(e3, "comment", { "doc-comment": {
|
|
2423
|
-
pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,
|
|
2424
|
-
lookbehind: true,
|
|
2425
|
-
alias: "comment"
|
|
2426
|
-
} }))[t]) instanceof RegExp && (r = a[t] = { pattern: r }), Array.isArray(r)) for (var s = 0, i = r.length; s < i; s++) r[s] instanceof RegExp && (r[s] = { pattern: r[s] }), n(r[s]);
|
|
2427
|
-
else n(r);
|
|
2428
|
-
}
|
|
2429
|
-
});
|
|
2430
|
-
} }), e.addSupport([
|
|
2431
|
-
"java",
|
|
2432
|
-
"javascript",
|
|
2433
|
-
"php"
|
|
2434
|
-
], e);
|
|
2435
|
-
}(Prism), function(e) {
|
|
2436
|
-
var n = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/, n = (e.languages.css = {
|
|
2437
|
-
comment: /\/\*[\s\S]*?\*\//,
|
|
2438
|
-
atrule: {
|
|
2439
|
-
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + n.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
|
2440
|
-
inside: {
|
|
2441
|
-
rule: /^@[\w-]+/,
|
|
2442
|
-
"selector-function-argument": {
|
|
2443
|
-
pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
|
|
2444
|
-
lookbehind: true,
|
|
2445
|
-
alias: "selector"
|
|
2446
|
-
},
|
|
2447
|
-
keyword: {
|
|
2448
|
-
pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
|
|
2449
|
-
lookbehind: true
|
|
2450
|
-
}
|
|
2451
|
-
}
|
|
2452
|
-
},
|
|
2453
|
-
url: {
|
|
2454
|
-
pattern: RegExp("\\burl\\((?:" + n.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
|
|
2455
|
-
greedy: true,
|
|
2456
|
-
inside: {
|
|
2457
|
-
function: /^url/i,
|
|
2458
|
-
punctuation: /^\(|\)$/,
|
|
2459
|
-
string: {
|
|
2460
|
-
pattern: RegExp("^" + n.source + "$"),
|
|
2461
|
-
alias: "url"
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
},
|
|
2465
|
-
selector: {
|
|
2466
|
-
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + n.source + ")*(?=\\s*\\{)"),
|
|
2467
|
-
lookbehind: true
|
|
2468
|
-
},
|
|
2469
|
-
string: {
|
|
2470
|
-
pattern: n,
|
|
2471
|
-
greedy: true
|
|
2472
|
-
},
|
|
2473
|
-
property: {
|
|
2474
|
-
pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
|
|
2475
|
-
lookbehind: true
|
|
2476
|
-
},
|
|
2477
|
-
important: /!important\b/i,
|
|
2478
|
-
function: {
|
|
2479
|
-
pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
|
|
2480
|
-
lookbehind: true
|
|
2481
|
-
},
|
|
2482
|
-
punctuation: /[(){};:,]/
|
|
2483
|
-
}, e.languages.css.atrule.inside.rest = e.languages.css, e.languages.markup);
|
|
2484
|
-
n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
|
|
2485
|
-
}(Prism), function(e) {
|
|
2486
|
-
var n = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, n = (e.languages.css.selector = {
|
|
2487
|
-
pattern: e.languages.css.selector.pattern,
|
|
2488
|
-
lookbehind: true,
|
|
2489
|
-
inside: n = {
|
|
2490
|
-
"pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
|
|
2491
|
-
"pseudo-class": /:[-\w]+/,
|
|
2492
|
-
class: /\.[-\w]+/,
|
|
2493
|
-
id: /#[-\w]+/,
|
|
2494
|
-
attribute: {
|
|
2495
|
-
pattern: RegExp(`\\[(?:[^[\\]"']|` + n.source + ")*\\]"),
|
|
2496
|
-
greedy: true,
|
|
2497
|
-
inside: {
|
|
2498
|
-
punctuation: /^\[|\]$/,
|
|
2499
|
-
"case-sensitivity": {
|
|
2500
|
-
pattern: /(\s)[si]$/i,
|
|
2501
|
-
lookbehind: true,
|
|
2502
|
-
alias: "keyword"
|
|
2503
|
-
},
|
|
2504
|
-
namespace: {
|
|
2505
|
-
pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,
|
|
2506
|
-
lookbehind: true,
|
|
2507
|
-
inside: { punctuation: /\|$/ }
|
|
2508
|
-
},
|
|
2509
|
-
"attr-name": {
|
|
2510
|
-
pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,
|
|
2511
|
-
lookbehind: true
|
|
2512
|
-
},
|
|
2513
|
-
"attr-value": [n, {
|
|
2514
|
-
pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,
|
|
2515
|
-
lookbehind: true
|
|
2516
|
-
}],
|
|
2517
|
-
operator: /[|~*^$]?=/
|
|
2518
|
-
}
|
|
2519
|
-
},
|
|
2520
|
-
"n-th": [{
|
|
2521
|
-
pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,
|
|
2522
|
-
lookbehind: true,
|
|
2523
|
-
inside: {
|
|
2524
|
-
number: /[\dn]+/,
|
|
2525
|
-
operator: /[+-]/
|
|
2526
|
-
}
|
|
2527
|
-
}, {
|
|
2528
|
-
pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i,
|
|
2529
|
-
lookbehind: true
|
|
2530
|
-
}],
|
|
2531
|
-
combinator: />|\+|~|\|\|/,
|
|
2532
|
-
punctuation: /[(),]/
|
|
2533
|
-
}
|
|
2534
|
-
}, e.languages.css.atrule.inside["selector-function-argument"].inside = n, e.languages.insertBefore("css", "property", { variable: {
|
|
2535
|
-
pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,
|
|
2536
|
-
lookbehind: true
|
|
2537
|
-
} }), {
|
|
2538
|
-
pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
|
|
2539
|
-
lookbehind: true
|
|
2540
|
-
}), t = {
|
|
2541
|
-
pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
|
|
2542
|
-
lookbehind: true
|
|
2543
|
-
};
|
|
2544
|
-
e.languages.insertBefore("css", "function", {
|
|
2545
|
-
operator: {
|
|
2546
|
-
pattern: /(\s)[+\-*\/](?=\s)/,
|
|
2547
|
-
lookbehind: true
|
|
2548
|
-
},
|
|
2549
|
-
hexcode: {
|
|
2550
|
-
pattern: /\B#[\da-f]{3,8}\b/i,
|
|
2551
|
-
alias: "color"
|
|
2552
|
-
},
|
|
2553
|
-
color: [{
|
|
2554
|
-
pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
|
|
2555
|
-
lookbehind: true
|
|
2556
|
-
}, {
|
|
2557
|
-
pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
|
|
2558
|
-
inside: {
|
|
2559
|
-
unit: n,
|
|
2560
|
-
number: t,
|
|
2561
|
-
function: /[\w-]+(?=\()/,
|
|
2562
|
-
punctuation: /[(),]/
|
|
2563
|
-
}
|
|
2564
|
-
}],
|
|
2565
|
-
entity: /\\[\da-f]{1,8}/i,
|
|
2566
|
-
unit: n,
|
|
2567
|
-
number: t
|
|
2568
|
-
});
|
|
2569
|
-
}(Prism), function(e) {
|
|
2570
|
-
var n = /[*&][^\s[\]{},]+/, t = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, a = "(?:" + t.source + "(?:[ ]+" + n.source + ")?|" + n.source + "(?:[ ]+" + t.source + ")?)", r = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
|
|
2571
|
-
return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
|
|
2572
|
-
}), s = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
|
|
2573
|
-
function i(e2, n2) {
|
|
2574
|
-
n2 = (n2 || "").replace(/m/g, "") + "m";
|
|
2575
|
-
var t2 = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
|
|
2576
|
-
return a;
|
|
2577
|
-
}).replace(/<<value>>/g, function() {
|
|
2578
|
-
return e2;
|
|
2579
|
-
});
|
|
2580
|
-
return RegExp(t2, n2);
|
|
2581
|
-
}
|
|
2582
|
-
e.languages.yaml = {
|
|
2583
|
-
scalar: {
|
|
2584
|
-
pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
|
|
2585
|
-
return a;
|
|
2586
|
-
})),
|
|
2587
|
-
lookbehind: true,
|
|
2588
|
-
alias: "string"
|
|
2589
|
-
},
|
|
2590
|
-
comment: /#.*/,
|
|
2591
|
-
key: {
|
|
2592
|
-
pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
|
|
2593
|
-
return a;
|
|
2594
|
-
}).replace(/<<key>>/g, function() {
|
|
2595
|
-
return "(?:" + r + "|" + s + ")";
|
|
2596
|
-
})),
|
|
2597
|
-
lookbehind: true,
|
|
2598
|
-
greedy: true,
|
|
2599
|
-
alias: "atrule"
|
|
2600
|
-
},
|
|
2601
|
-
directive: {
|
|
2602
|
-
pattern: /(^[ \t]*)%.+/m,
|
|
2603
|
-
lookbehind: true,
|
|
2604
|
-
alias: "important"
|
|
2605
|
-
},
|
|
2606
|
-
datetime: {
|
|
2607
|
-
pattern: i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),
|
|
2608
|
-
lookbehind: true,
|
|
2609
|
-
alias: "number"
|
|
2610
|
-
},
|
|
2611
|
-
boolean: {
|
|
2612
|
-
pattern: i(/false|true/.source, "i"),
|
|
2613
|
-
lookbehind: true,
|
|
2614
|
-
alias: "important"
|
|
2615
|
-
},
|
|
2616
|
-
null: {
|
|
2617
|
-
pattern: i(/null|~/.source, "i"),
|
|
2618
|
-
lookbehind: true,
|
|
2619
|
-
alias: "important"
|
|
2620
|
-
},
|
|
2621
|
-
string: {
|
|
2622
|
-
pattern: i(s),
|
|
2623
|
-
lookbehind: true,
|
|
2624
|
-
greedy: true
|
|
2625
|
-
},
|
|
2626
|
-
number: {
|
|
2627
|
-
pattern: i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"),
|
|
2628
|
-
lookbehind: true
|
|
2629
|
-
},
|
|
2630
|
-
tag: t,
|
|
2631
|
-
important: n,
|
|
2632
|
-
punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
|
|
2633
|
-
}, e.languages.yml = e.languages.yaml;
|
|
2634
|
-
}(Prism), function(o) {
|
|
2635
|
-
var n = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
|
2636
|
-
function e(e2) {
|
|
2637
|
-
return e2 = e2.replace(/<inner>/g, function() {
|
|
2638
|
-
return n;
|
|
2639
|
-
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + e2 + ")");
|
|
2640
|
-
}
|
|
2641
|
-
var t = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, a = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
|
2642
|
-
return t;
|
|
2643
|
-
}), r = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source, l = (o.languages.markdown = o.languages.extend("markup", {}), o.languages.insertBefore("markdown", "prolog", {
|
|
2644
|
-
"front-matter-block": {
|
|
2645
|
-
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
|
2646
|
-
lookbehind: true,
|
|
2647
|
-
greedy: true,
|
|
2648
|
-
inside: {
|
|
2649
|
-
punctuation: /^---|---$/,
|
|
2650
|
-
"front-matter": {
|
|
2651
|
-
pattern: /\S+(?:\s+\S+)*/,
|
|
2652
|
-
alias: ["yaml", "language-yaml"],
|
|
2653
|
-
inside: o.languages.yaml
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
},
|
|
2657
|
-
blockquote: {
|
|
2658
|
-
pattern: /^>(?:[\t ]*>)*/m,
|
|
2659
|
-
alias: "punctuation"
|
|
2660
|
-
},
|
|
2661
|
-
table: {
|
|
2662
|
-
pattern: RegExp("^" + a + r + "(?:" + a + ")*", "m"),
|
|
2663
|
-
inside: {
|
|
2664
|
-
"table-data-rows": {
|
|
2665
|
-
pattern: RegExp("^(" + a + r + ")(?:" + a + ")*$"),
|
|
2666
|
-
lookbehind: true,
|
|
2667
|
-
inside: {
|
|
2668
|
-
"table-data": {
|
|
2669
|
-
pattern: RegExp(t),
|
|
2670
|
-
inside: o.languages.markdown
|
|
2671
|
-
},
|
|
2672
|
-
punctuation: /\|/
|
|
2673
|
-
}
|
|
2674
|
-
},
|
|
2675
|
-
"table-line": {
|
|
2676
|
-
pattern: RegExp("^(" + a + ")" + r + "$"),
|
|
2677
|
-
lookbehind: true,
|
|
2678
|
-
inside: { punctuation: /\||:?-{3,}:?/ }
|
|
2679
|
-
},
|
|
2680
|
-
"table-header-row": {
|
|
2681
|
-
pattern: RegExp("^" + a + "$"),
|
|
2682
|
-
inside: {
|
|
2683
|
-
"table-header": {
|
|
2684
|
-
pattern: RegExp(t),
|
|
2685
|
-
alias: "important",
|
|
2686
|
-
inside: o.languages.markdown
|
|
2687
|
-
},
|
|
2688
|
-
punctuation: /\|/
|
|
2689
|
-
}
|
|
2690
|
-
}
|
|
2691
|
-
}
|
|
2692
|
-
},
|
|
2693
|
-
code: [{
|
|
2694
|
-
pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,
|
|
2695
|
-
lookbehind: true,
|
|
2696
|
-
alias: "keyword"
|
|
2697
|
-
}, {
|
|
2698
|
-
pattern: /^```[\s\S]*?^```$/m,
|
|
2699
|
-
greedy: true,
|
|
2700
|
-
inside: {
|
|
2701
|
-
"code-block": {
|
|
2702
|
-
pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,
|
|
2703
|
-
lookbehind: true
|
|
2704
|
-
},
|
|
2705
|
-
"code-language": {
|
|
2706
|
-
pattern: /^(```).+/,
|
|
2707
|
-
lookbehind: true
|
|
2708
|
-
},
|
|
2709
|
-
punctuation: /```/
|
|
2710
|
-
}
|
|
2711
|
-
}],
|
|
2712
|
-
title: [{
|
|
2713
|
-
pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,
|
|
2714
|
-
alias: "important",
|
|
2715
|
-
inside: { punctuation: /==+$|--+$/ }
|
|
2716
|
-
}, {
|
|
2717
|
-
pattern: /(^\s*)#.+/m,
|
|
2718
|
-
lookbehind: true,
|
|
2719
|
-
alias: "important",
|
|
2720
|
-
inside: { punctuation: /^#+|#+$/ }
|
|
2721
|
-
}],
|
|
2722
|
-
hr: {
|
|
2723
|
-
pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,
|
|
2724
|
-
lookbehind: true,
|
|
2725
|
-
alias: "punctuation"
|
|
2726
|
-
},
|
|
2727
|
-
list: {
|
|
2728
|
-
pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,
|
|
2729
|
-
lookbehind: true,
|
|
2730
|
-
alias: "punctuation"
|
|
2731
|
-
},
|
|
2732
|
-
"url-reference": {
|
|
2733
|
-
pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,
|
|
2734
|
-
inside: {
|
|
2735
|
-
variable: {
|
|
2736
|
-
pattern: /^(!?\[)[^\]]+/,
|
|
2737
|
-
lookbehind: true
|
|
2738
|
-
},
|
|
2739
|
-
string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,
|
|
2740
|
-
punctuation: /^[\[\]!:]|[<>]/
|
|
2741
|
-
},
|
|
2742
|
-
alias: "url"
|
|
2743
|
-
},
|
|
2744
|
-
bold: {
|
|
2745
|
-
pattern: e(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
|
|
2746
|
-
lookbehind: true,
|
|
2747
|
-
greedy: true,
|
|
2748
|
-
inside: {
|
|
2749
|
-
content: {
|
|
2750
|
-
pattern: /(^..)[\s\S]+(?=..$)/,
|
|
2751
|
-
lookbehind: true,
|
|
2752
|
-
inside: {}
|
|
2753
|
-
},
|
|
2754
|
-
punctuation: /\*\*|__/
|
|
2755
|
-
}
|
|
2756
|
-
},
|
|
2757
|
-
italic: {
|
|
2758
|
-
pattern: e(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
|
|
2759
|
-
lookbehind: true,
|
|
2760
|
-
greedy: true,
|
|
2761
|
-
inside: {
|
|
2762
|
-
content: {
|
|
2763
|
-
pattern: /(^.)[\s\S]+(?=.$)/,
|
|
2764
|
-
lookbehind: true,
|
|
2765
|
-
inside: {}
|
|
2766
|
-
},
|
|
2767
|
-
punctuation: /[*_]/
|
|
2768
|
-
}
|
|
2769
|
-
},
|
|
2770
|
-
strike: {
|
|
2771
|
-
pattern: e(/(~~?)(?:(?!~)<inner>)+\2/.source),
|
|
2772
|
-
lookbehind: true,
|
|
2773
|
-
greedy: true,
|
|
2774
|
-
inside: {
|
|
2775
|
-
content: {
|
|
2776
|
-
pattern: /(^~~?)[\s\S]+(?=\1$)/,
|
|
2777
|
-
lookbehind: true,
|
|
2778
|
-
inside: {}
|
|
2779
|
-
},
|
|
2780
|
-
punctuation: /~~?/
|
|
2781
|
-
}
|
|
2782
|
-
},
|
|
2783
|
-
"code-snippet": {
|
|
2784
|
-
pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,
|
|
2785
|
-
lookbehind: true,
|
|
2786
|
-
greedy: true,
|
|
2787
|
-
alias: ["code", "keyword"]
|
|
2788
|
-
},
|
|
2789
|
-
url: {
|
|
2790
|
-
pattern: e(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
|
|
2791
|
-
lookbehind: true,
|
|
2792
|
-
greedy: true,
|
|
2793
|
-
inside: {
|
|
2794
|
-
operator: /^!/,
|
|
2795
|
-
content: {
|
|
2796
|
-
pattern: /(^\[)[^\]]+(?=\])/,
|
|
2797
|
-
lookbehind: true,
|
|
2798
|
-
inside: {}
|
|
2799
|
-
},
|
|
2800
|
-
variable: {
|
|
2801
|
-
pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/,
|
|
2802
|
-
lookbehind: true
|
|
2803
|
-
},
|
|
2804
|
-
url: {
|
|
2805
|
-
pattern: /(^\]\()[^\s)]+/,
|
|
2806
|
-
lookbehind: true
|
|
2807
|
-
},
|
|
2808
|
-
string: {
|
|
2809
|
-
pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,
|
|
2810
|
-
lookbehind: true
|
|
2811
|
-
}
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
}), [
|
|
2815
|
-
"url",
|
|
2816
|
-
"bold",
|
|
2817
|
-
"italic",
|
|
2818
|
-
"strike"
|
|
2819
|
-
].forEach(function(n2) {
|
|
2820
|
-
[
|
|
2821
|
-
"url",
|
|
2822
|
-
"bold",
|
|
2823
|
-
"italic",
|
|
2824
|
-
"strike",
|
|
2825
|
-
"code-snippet"
|
|
2826
|
-
].forEach(function(e2) {
|
|
2827
|
-
n2 !== e2 && (o.languages.markdown[n2].inside.content.inside[e2] = o.languages.markdown[e2]);
|
|
2828
|
-
});
|
|
2829
|
-
}), o.hooks.add("after-tokenize", function(e2) {
|
|
2830
|
-
"markdown" !== e2.language && "md" !== e2.language || function e3(n2) {
|
|
2831
|
-
if (n2 && "string" != typeof n2) for (var t2 = 0, a2 = n2.length; t2 < a2; t2++) {
|
|
2832
|
-
var r2, s = n2[t2];
|
|
2833
|
-
"code" !== s.type ? e3(s.content) : (r2 = s.content[1], s = s.content[3], r2 && s && "code-language" === r2.type && "code-block" === s.type && "string" == typeof r2.content && (r2 = r2.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp"), r2 = "language-" + (r2 = (/[a-z][\w-]*/i.exec(r2) || [""])[0].toLowerCase()), s.alias ? "string" == typeof s.alias ? s.alias = [s.alias, r2] : s.alias.push(r2) : s.alias = [r2]));
|
|
2834
|
-
}
|
|
2835
|
-
}(e2.tokens);
|
|
2836
|
-
}), o.hooks.add("wrap", function(e2) {
|
|
2837
|
-
if ("code-block" === e2.type) {
|
|
2838
|
-
for (var n2 = "", t2 = 0, a2 = e2.classes.length; t2 < a2; t2++) {
|
|
2839
|
-
var r2 = e2.classes[t2], r2 = /language-(.+)/.exec(r2);
|
|
2840
|
-
if (r2) {
|
|
2841
|
-
n2 = r2[1];
|
|
2842
|
-
break;
|
|
2843
|
-
}
|
|
2844
|
-
}
|
|
2845
|
-
var s, i = o.languages[n2];
|
|
2846
|
-
i ? e2.content = o.highlight(function(e3) {
|
|
2847
|
-
e3 = e3.replace(l, "");
|
|
2848
|
-
return e3 = e3.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(e4, n3) {
|
|
2849
|
-
var t3;
|
|
2850
|
-
return "#" === (n3 = n3.toLowerCase())[0] ? (t3 = "x" === n3[1] ? parseInt(n3.slice(2), 16) : Number(n3.slice(1)), c(t3)) : u[n3] || e4;
|
|
2851
|
-
});
|
|
2852
|
-
}(e2.content), i, n2) : n2 && "none" !== n2 && o.plugins.autoloader && (s = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(0x2386f26fc10000 * Math.random()), e2.attributes.id = s, o.plugins.autoloader.loadLanguages(n2, function() {
|
|
2853
|
-
var e3 = document.getElementById(s);
|
|
2854
|
-
e3 && (e3.innerHTML = o.highlight(e3.textContent, o.languages[n2], n2));
|
|
2855
|
-
}));
|
|
2856
|
-
}
|
|
2857
|
-
}), RegExp(o.languages.markup.tag.pattern.source, "gi")), u = {
|
|
2858
|
-
amp: "&",
|
|
2859
|
-
lt: "<",
|
|
2860
|
-
gt: ">",
|
|
2861
|
-
quot: "\""
|
|
2862
|
-
}, c = String.fromCodePoint || String.fromCharCode;
|
|
2863
|
-
o.languages.md = o.languages.markdown;
|
|
2864
|
-
}(Prism), Prism.languages.graphql = {
|
|
2865
|
-
comment: /#.*/,
|
|
2866
|
-
description: {
|
|
2867
|
-
pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,
|
|
2868
|
-
greedy: true,
|
|
2869
|
-
alias: "string",
|
|
2870
|
-
inside: { "language-markdown": {
|
|
2871
|
-
pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,
|
|
2872
|
-
lookbehind: true,
|
|
2873
|
-
inside: Prism.languages.markdown
|
|
2874
|
-
} }
|
|
2875
|
-
},
|
|
2876
|
-
string: {
|
|
2877
|
-
pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,
|
|
2878
|
-
greedy: true
|
|
2879
|
-
},
|
|
2880
|
-
number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
|
|
2881
|
-
boolean: /\b(?:false|true)\b/,
|
|
2882
|
-
variable: /\$[a-z_]\w*/i,
|
|
2883
|
-
directive: {
|
|
2884
|
-
pattern: /@[a-z_]\w*/i,
|
|
2885
|
-
alias: "function"
|
|
2886
|
-
},
|
|
2887
|
-
"attr-name": {
|
|
2888
|
-
pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,
|
|
2889
|
-
greedy: true
|
|
2890
|
-
},
|
|
2891
|
-
"atom-input": {
|
|
2892
|
-
pattern: /\b[A-Z]\w*Input\b/,
|
|
2893
|
-
alias: "class-name"
|
|
2894
|
-
},
|
|
2895
|
-
scalar: /\b(?:Boolean|Float|ID|Int|String)\b/,
|
|
2896
|
-
constant: /\b[A-Z][A-Z_\d]*\b/,
|
|
2897
|
-
"class-name": {
|
|
2898
|
-
pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,
|
|
2899
|
-
lookbehind: true
|
|
2900
|
-
},
|
|
2901
|
-
fragment: {
|
|
2902
|
-
pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,
|
|
2903
|
-
lookbehind: true,
|
|
2904
|
-
alias: "function"
|
|
2905
|
-
},
|
|
2906
|
-
"definition-mutation": {
|
|
2907
|
-
pattern: /(\bmutation\s+)[a-zA-Z_]\w*/,
|
|
2908
|
-
lookbehind: true,
|
|
2909
|
-
alias: "function"
|
|
2910
|
-
},
|
|
2911
|
-
"definition-query": {
|
|
2912
|
-
pattern: /(\bquery\s+)[a-zA-Z_]\w*/,
|
|
2913
|
-
lookbehind: true,
|
|
2914
|
-
alias: "function"
|
|
2915
|
-
},
|
|
2916
|
-
keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,
|
|
2917
|
-
operator: /[!=|&]|\.{3}/,
|
|
2918
|
-
"property-query": /\w+(?=\s*\()/,
|
|
2919
|
-
object: /\w+(?=\s*\{)/,
|
|
2920
|
-
punctuation: /[!(){}\[\]:=,]/,
|
|
2921
|
-
property: /\w+/
|
|
2922
|
-
}, Prism.hooks.add("after-tokenize", function(e) {
|
|
2923
|
-
if ("graphql" === e.language) for (var i = e.tokens.filter(function(e2) {
|
|
2924
|
-
return "string" != typeof e2 && "comment" !== e2.type && "scalar" !== e2.type;
|
|
2925
|
-
}), o = 0; o < i.length;) {
|
|
2926
|
-
var n = i[o++];
|
|
2927
|
-
if ("keyword" === n.type && "mutation" === n.content) {
|
|
2928
|
-
var t = [];
|
|
2929
|
-
if (p(["definition-mutation", "punctuation"]) && "(" === c(1).content) {
|
|
2930
|
-
o += 2;
|
|
2931
|
-
var a = d(/^\($/, /^\)$/);
|
|
2932
|
-
if (-1 === a) continue;
|
|
2933
|
-
for (; o < a; o++) {
|
|
2934
|
-
var r = c(0);
|
|
2935
|
-
"variable" === r.type && (g(r, "variable-input"), t.push(r.content));
|
|
2936
|
-
}
|
|
2937
|
-
o = a + 1;
|
|
2938
|
-
}
|
|
2939
|
-
if (p(["punctuation", "property-query"]) && "{" === c(0).content && (o++, g(c(0), "property-mutation"), 0 < t.length)) {
|
|
2940
|
-
var s = d(/^\{$/, /^\}$/);
|
|
2941
|
-
if (-1 !== s) for (var l = o; l < s; l++) {
|
|
2942
|
-
var u = i[l];
|
|
2943
|
-
"variable" === u.type && 0 <= t.indexOf(u.content) && g(u, "variable-input");
|
|
2944
|
-
}
|
|
2945
|
-
}
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
function c(e2) {
|
|
2949
|
-
return i[o + e2];
|
|
2950
|
-
}
|
|
2951
|
-
function p(e2, n2) {
|
|
2952
|
-
n2 = n2 || 0;
|
|
2953
|
-
for (var t2 = 0; t2 < e2.length; t2++) {
|
|
2954
|
-
var a2 = c(t2 + n2);
|
|
2955
|
-
if (!a2 || a2.type !== e2[t2]) return;
|
|
2956
|
-
}
|
|
2957
|
-
return 1;
|
|
2958
|
-
}
|
|
2959
|
-
function d(e2, n2) {
|
|
2960
|
-
for (var t2 = 1, a2 = o; a2 < i.length; a2++) {
|
|
2961
|
-
var r2 = i[a2], s2 = r2.content;
|
|
2962
|
-
if ("punctuation" === r2.type && "string" == typeof s2) {
|
|
2963
|
-
if (e2.test(s2)) t2++;
|
|
2964
|
-
else if (n2.test(s2) && 0 === --t2) return a2;
|
|
2965
|
-
}
|
|
2966
|
-
}
|
|
2967
|
-
return -1;
|
|
2968
|
-
}
|
|
2969
|
-
function g(e2, n2) {
|
|
2970
|
-
var t2 = e2.alias;
|
|
2971
|
-
t2 ? Array.isArray(t2) || (e2.alias = t2 = [t2]) : e2.alias = t2 = [], t2.push(n2);
|
|
2972
|
-
}
|
|
2973
|
-
}), Prism.languages.sql = {
|
|
2974
|
-
comment: {
|
|
2975
|
-
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
|
|
2976
|
-
lookbehind: true
|
|
2977
|
-
},
|
|
2978
|
-
variable: [{
|
|
2979
|
-
pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
|
|
2980
|
-
greedy: true
|
|
2981
|
-
}, /@[\w.$]+/],
|
|
2982
|
-
string: {
|
|
2983
|
-
pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
|
|
2984
|
-
greedy: true,
|
|
2985
|
-
lookbehind: true
|
|
2986
|
-
},
|
|
2987
|
-
identifier: {
|
|
2988
|
-
pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
|
|
2989
|
-
greedy: true,
|
|
2990
|
-
lookbehind: true,
|
|
2991
|
-
inside: { punctuation: /^`|`$/ }
|
|
2992
|
-
},
|
|
2993
|
-
function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,
|
|
2994
|
-
keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,
|
|
2995
|
-
boolean: /\b(?:FALSE|NULL|TRUE)\b/i,
|
|
2996
|
-
number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
|
|
2997
|
-
operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
|
|
2998
|
-
punctuation: /[;[\]()`,.]/
|
|
2999
|
-
}, function(b) {
|
|
3000
|
-
var e = b.languages.javascript["template-string"], t = e.pattern.source, m = e.inside.interpolation, f = m.inside["interpolation-punctuation"], s = m.pattern.source;
|
|
3001
|
-
function n(e2, n2) {
|
|
3002
|
-
if (b.languages[e2]) return {
|
|
3003
|
-
pattern: RegExp("((?:" + n2 + ")\\s*)" + t),
|
|
3004
|
-
lookbehind: true,
|
|
3005
|
-
greedy: true,
|
|
3006
|
-
inside: {
|
|
3007
|
-
"template-punctuation": {
|
|
3008
|
-
pattern: /^`|`$/,
|
|
3009
|
-
alias: "string"
|
|
3010
|
-
},
|
|
3011
|
-
"embedded-code": {
|
|
3012
|
-
pattern: /[\s\S]+/,
|
|
3013
|
-
alias: e2
|
|
3014
|
-
}
|
|
3015
|
-
}
|
|
3016
|
-
};
|
|
3017
|
-
}
|
|
3018
|
-
function h(e2, n2, t2) {
|
|
3019
|
-
e2 = {
|
|
3020
|
-
code: e2,
|
|
3021
|
-
grammar: n2,
|
|
3022
|
-
language: t2
|
|
3023
|
-
};
|
|
3024
|
-
return b.hooks.run("before-tokenize", e2), e2.tokens = b.tokenize(e2.code, e2.grammar), b.hooks.run("after-tokenize", e2), e2.tokens;
|
|
3025
|
-
}
|
|
3026
|
-
function l(a2, e2, r) {
|
|
3027
|
-
var n2 = b.tokenize(a2, { interpolation: {
|
|
3028
|
-
pattern: RegExp(s),
|
|
3029
|
-
lookbehind: true
|
|
3030
|
-
} }), p = 0, d = {}, n2 = h(n2.map(function(e3) {
|
|
3031
|
-
if ("string" == typeof e3) return e3;
|
|
3032
|
-
for (var n3, t2, e3 = e3.content; -1 !== a2.indexOf((t2 = p++, n3 = "___" + r.toUpperCase() + "_" + t2 + "___")););
|
|
3033
|
-
return d[n3] = e3, n3;
|
|
3034
|
-
}).join(""), e2, r), g = Object.keys(d);
|
|
3035
|
-
return p = 0, function e3(n3) {
|
|
3036
|
-
for (var t2 = 0; t2 < n3.length; t2++) {
|
|
3037
|
-
if (p >= g.length) return;
|
|
3038
|
-
var a3, r2, s2, i, o, l2, u2, c = n3[t2];
|
|
3039
|
-
"string" == typeof c || "string" == typeof c.content ? (a3 = g[p], -1 !== (u2 = (l2 = "string" == typeof c ? c : c.content).indexOf(a3)) && (++p, r2 = l2.substring(0, u2), o = d[a3], s2 = void 0, (i = {})["interpolation-punctuation"] = f, 3 === (i = b.tokenize(o, i)).length && ((s2 = [1, 1]).push.apply(s2, h(i[1], b.languages.javascript, "javascript")), i.splice.apply(i, s2)), s2 = new b.Token("interpolation", i, m.alias, o), i = l2.substring(u2 + a3.length), o = [], r2 && o.push(r2), o.push(s2), i && (e3(l2 = [i]), o.push.apply(o, l2)), "string" == typeof c ? (n3.splice.apply(n3, [t2, 1].concat(o)), t2 += o.length - 1) : c.content = o)) : (u2 = c.content, Array.isArray(u2) ? e3(u2) : e3([u2]));
|
|
3040
|
-
}
|
|
3041
|
-
}(n2), new b.Token(r, n2, "language-" + r, a2);
|
|
3042
|
-
}
|
|
3043
|
-
b.languages.javascript["template-string"] = [
|
|
3044
|
-
n("css", /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),
|
|
3045
|
-
n("html", /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),
|
|
3046
|
-
n("svg", /\bsvg/.source),
|
|
3047
|
-
n("markdown", /\b(?:markdown|md)/.source),
|
|
3048
|
-
n("graphql", /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),
|
|
3049
|
-
n("sql", /\bsql/.source),
|
|
3050
|
-
e
|
|
3051
|
-
].filter(Boolean);
|
|
3052
|
-
var a = {
|
|
3053
|
-
javascript: true,
|
|
3054
|
-
js: true,
|
|
3055
|
-
typescript: true,
|
|
3056
|
-
ts: true,
|
|
3057
|
-
jsx: true,
|
|
3058
|
-
tsx: true
|
|
3059
|
-
};
|
|
3060
|
-
function u(e2) {
|
|
3061
|
-
return "string" == typeof e2 ? e2 : Array.isArray(e2) ? e2.map(u).join("") : u(e2.content);
|
|
3062
|
-
}
|
|
3063
|
-
b.hooks.add("after-tokenize", function(e2) {
|
|
3064
|
-
e2.language in a && function e3(n2) {
|
|
3065
|
-
for (var t2 = 0, a2 = n2.length; t2 < a2; t2++) {
|
|
3066
|
-
var r, s2, i, o = n2[t2];
|
|
3067
|
-
"string" != typeof o && (r = o.content, Array.isArray(r) ? "template-string" === o.type ? (o = r[1], 3 === r.length && "string" != typeof o && "embedded-code" === o.type && (s2 = u(o), o = o.alias, o = Array.isArray(o) ? o[0] : o, i = b.languages[o]) && (r[1] = l(s2, i, o))) : e3(r) : "string" != typeof r && e3([r]));
|
|
3068
|
-
}
|
|
3069
|
-
}(e2.tokens);
|
|
3070
|
-
});
|
|
3071
|
-
}(Prism), function(e) {
|
|
3072
|
-
e.languages.typescript = e.languages.extend("javascript", {
|
|
3073
|
-
"class-name": {
|
|
3074
|
-
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
|
|
3075
|
-
lookbehind: true,
|
|
3076
|
-
greedy: true,
|
|
3077
|
-
inside: null
|
|
3078
|
-
},
|
|
3079
|
-
builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
|
|
3080
|
-
}), e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
|
|
3081
|
-
var n = e.languages.extend("typescript", {});
|
|
3082
|
-
delete n["class-name"], e.languages.typescript["class-name"].inside = n, e.languages.insertBefore("typescript", "function", {
|
|
3083
|
-
decorator: {
|
|
3084
|
-
pattern: /@[$\w\xA0-\uFFFF]+/,
|
|
3085
|
-
inside: {
|
|
3086
|
-
at: {
|
|
3087
|
-
pattern: /^@/,
|
|
3088
|
-
alias: "operator"
|
|
3089
|
-
},
|
|
3090
|
-
function: /^[\s\S]+/
|
|
3091
|
-
}
|
|
3092
|
-
},
|
|
3093
|
-
"generic-function": {
|
|
3094
|
-
pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
|
|
3095
|
-
greedy: true,
|
|
3096
|
-
inside: {
|
|
3097
|
-
function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
|
|
3098
|
-
generic: {
|
|
3099
|
-
pattern: /<[\s\S]+/,
|
|
3100
|
-
alias: "class-name",
|
|
3101
|
-
inside: n
|
|
3102
|
-
}
|
|
3103
|
-
}
|
|
3104
|
-
}
|
|
3105
|
-
}), e.languages.ts = e.languages.typescript;
|
|
3106
|
-
}(Prism), function(e) {
|
|
3107
|
-
var n = e.languages.javascript, t = /\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source, a = "(@(?:arg|argument|param|property)\\s+(?:" + t + "\\s+)?)";
|
|
3108
|
-
e.languages.jsdoc = e.languages.extend("javadoclike", { parameter: {
|
|
3109
|
-
pattern: RegExp(a + /(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),
|
|
3110
|
-
lookbehind: true,
|
|
3111
|
-
inside: { punctuation: /\./ }
|
|
3112
|
-
} }), e.languages.insertBefore("jsdoc", "keyword", {
|
|
3113
|
-
"optional-parameter": {
|
|
3114
|
-
pattern: RegExp(a + /\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),
|
|
3115
|
-
lookbehind: true,
|
|
3116
|
-
inside: {
|
|
3117
|
-
parameter: {
|
|
3118
|
-
pattern: /(^\[)[$\w\xA0-\uFFFF\.]+/,
|
|
3119
|
-
lookbehind: true,
|
|
3120
|
-
inside: { punctuation: /\./ }
|
|
3121
|
-
},
|
|
3122
|
-
code: {
|
|
3123
|
-
pattern: /(=)[\s\S]*(?=\]$)/,
|
|
3124
|
-
lookbehind: true,
|
|
3125
|
-
inside: n,
|
|
3126
|
-
alias: "language-javascript"
|
|
3127
|
-
},
|
|
3128
|
-
punctuation: /[=[\]]/
|
|
3129
|
-
}
|
|
3130
|
-
},
|
|
3131
|
-
"class-name": [{
|
|
3132
|
-
pattern: RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g, function() {
|
|
3133
|
-
return t;
|
|
3134
|
-
})),
|
|
3135
|
-
lookbehind: true,
|
|
3136
|
-
inside: { punctuation: /\./ }
|
|
3137
|
-
}, {
|
|
3138
|
-
pattern: RegExp("(@[a-z]+\\s+)" + t),
|
|
3139
|
-
lookbehind: true,
|
|
3140
|
-
inside: {
|
|
3141
|
-
string: n.string,
|
|
3142
|
-
number: n.number,
|
|
3143
|
-
boolean: n.boolean,
|
|
3144
|
-
keyword: e.languages.typescript.keyword,
|
|
3145
|
-
operator: /=>|\.\.\.|[&|?:*]/,
|
|
3146
|
-
punctuation: /[.,;=<>{}()[\]]/
|
|
3147
|
-
}
|
|
3148
|
-
}],
|
|
3149
|
-
example: {
|
|
3150
|
-
pattern: /(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,
|
|
3151
|
-
lookbehind: true,
|
|
3152
|
-
inside: { code: {
|
|
3153
|
-
pattern: /^([\t ]*(?:\*\s*)?)\S.*$/m,
|
|
3154
|
-
lookbehind: true,
|
|
3155
|
-
inside: n,
|
|
3156
|
-
alias: "language-javascript"
|
|
3157
|
-
} }
|
|
3158
|
-
}
|
|
3159
|
-
}), e.languages.javadoclike.addSupport("javascript", e.languages.jsdoc);
|
|
3160
|
-
}(Prism), function(e) {
|
|
3161
|
-
e.languages.flow = e.languages.extend("javascript", {}), e.languages.insertBefore("flow", "keyword", { type: [{
|
|
3162
|
-
pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,
|
|
3163
|
-
alias: "class-name"
|
|
3164
|
-
}] }), e.languages.flow["function-variable"].pattern = /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i, delete e.languages.flow.parameter, e.languages.insertBefore("flow", "operator", { "flow-punctuation": {
|
|
3165
|
-
pattern: /\{\||\|\}/,
|
|
3166
|
-
alias: "punctuation"
|
|
3167
|
-
} }), Array.isArray(e.languages.flow.keyword) || (e.languages.flow.keyword = [e.languages.flow.keyword]), e.languages.flow.keyword.unshift({
|
|
3168
|
-
pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
|
|
3169
|
-
lookbehind: true
|
|
3170
|
-
}, {
|
|
3171
|
-
pattern: /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,
|
|
3172
|
-
lookbehind: true
|
|
3173
|
-
});
|
|
3174
|
-
}(Prism), Prism.languages.n4js = Prism.languages.extend("javascript", { keyword: /\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/ }), Prism.languages.insertBefore("n4js", "constant", { annotation: {
|
|
3175
|
-
pattern: /@+\w+/,
|
|
3176
|
-
alias: "operator"
|
|
3177
|
-
} }), Prism.languages.n4jsd = Prism.languages.n4js, function(e) {
|
|
3178
|
-
function n(e2, n2) {
|
|
3179
|
-
return RegExp(e2.replace(/<ID>/g, function() {
|
|
3180
|
-
return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source;
|
|
3181
|
-
}), n2);
|
|
3182
|
-
}
|
|
3183
|
-
e.languages.insertBefore("javascript", "function-variable", { "method-variable": {
|
|
3184
|
-
pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source),
|
|
3185
|
-
lookbehind: true,
|
|
3186
|
-
alias: [
|
|
3187
|
-
"function-variable",
|
|
3188
|
-
"method",
|
|
3189
|
-
"function",
|
|
3190
|
-
"property-access"
|
|
3191
|
-
]
|
|
3192
|
-
} }), e.languages.insertBefore("javascript", "function", { method: {
|
|
3193
|
-
pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source),
|
|
3194
|
-
lookbehind: true,
|
|
3195
|
-
alias: ["function", "property-access"]
|
|
3196
|
-
} }), e.languages.insertBefore("javascript", "constant", { "known-class-name": [{
|
|
3197
|
-
pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,
|
|
3198
|
-
alias: "class-name"
|
|
3199
|
-
}, {
|
|
3200
|
-
pattern: /\b(?:[A-Z]\w*)Error\b/,
|
|
3201
|
-
alias: "class-name"
|
|
3202
|
-
}] }), e.languages.insertBefore("javascript", "keyword", {
|
|
3203
|
-
imports: {
|
|
3204
|
-
pattern: n(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),
|
|
3205
|
-
lookbehind: true,
|
|
3206
|
-
inside: e.languages.javascript
|
|
3207
|
-
},
|
|
3208
|
-
exports: {
|
|
3209
|
-
pattern: n(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),
|
|
3210
|
-
lookbehind: true,
|
|
3211
|
-
inside: e.languages.javascript
|
|
3212
|
-
}
|
|
3213
|
-
}), e.languages.javascript.keyword.unshift({
|
|
3214
|
-
pattern: /\b(?:as|default|export|from|import)\b/,
|
|
3215
|
-
alias: "module"
|
|
3216
|
-
}, {
|
|
3217
|
-
pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,
|
|
3218
|
-
alias: "control-flow"
|
|
3219
|
-
}, {
|
|
3220
|
-
pattern: /\bnull\b/,
|
|
3221
|
-
alias: ["null", "nil"]
|
|
3222
|
-
}, {
|
|
3223
|
-
pattern: /\bundefined\b/,
|
|
3224
|
-
alias: "nil"
|
|
3225
|
-
}), e.languages.insertBefore("javascript", "operator", {
|
|
3226
|
-
spread: {
|
|
3227
|
-
pattern: /\.{3}/,
|
|
3228
|
-
alias: "operator"
|
|
3229
|
-
},
|
|
3230
|
-
arrow: {
|
|
3231
|
-
pattern: /=>/,
|
|
3232
|
-
alias: "operator"
|
|
3233
|
-
}
|
|
3234
|
-
}), e.languages.insertBefore("javascript", "punctuation", {
|
|
3235
|
-
"property-access": {
|
|
3236
|
-
pattern: n(/(\.\s*)#?<ID>/.source),
|
|
3237
|
-
lookbehind: true
|
|
3238
|
-
},
|
|
3239
|
-
"maybe-class-name": {
|
|
3240
|
-
pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,
|
|
3241
|
-
lookbehind: true
|
|
3242
|
-
},
|
|
3243
|
-
dom: {
|
|
3244
|
-
pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,
|
|
3245
|
-
alias: "variable"
|
|
3246
|
-
},
|
|
3247
|
-
console: {
|
|
3248
|
-
pattern: /\bconsole(?=\s*\.)/,
|
|
3249
|
-
alias: "class-name"
|
|
3250
|
-
}
|
|
3251
|
-
});
|
|
3252
|
-
for (var t = [
|
|
3253
|
-
"function",
|
|
3254
|
-
"function-variable",
|
|
3255
|
-
"method",
|
|
3256
|
-
"method-variable",
|
|
3257
|
-
"property-access"
|
|
3258
|
-
], a = 0; a < t.length; a++) {
|
|
3259
|
-
var r = t[a], s = e.languages.javascript[r], r = (s = "RegExp" === e.util.type(s) ? e.languages.javascript[r] = { pattern: s } : s).inside || {};
|
|
3260
|
-
(s.inside = r)["maybe-class-name"] = /^[A-Z][\s\S]*/;
|
|
3261
|
-
}
|
|
3262
|
-
}(Prism), function(s) {
|
|
3263
|
-
var e = s.util.clone(s.languages.javascript), t = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, a = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, r = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
|
|
3264
|
-
function n(e2, n2) {
|
|
3265
|
-
return e2 = e2.replace(/<S>/g, function() {
|
|
3266
|
-
return t;
|
|
3267
|
-
}).replace(/<BRACES>/g, function() {
|
|
3268
|
-
return a;
|
|
3269
|
-
}).replace(/<SPREAD>/g, function() {
|
|
3270
|
-
return r;
|
|
3271
|
-
}), RegExp(e2, n2);
|
|
3272
|
-
}
|
|
3273
|
-
r = n(r).source, s.languages.jsx = s.languages.extend("markup", e), s.languages.jsx.tag.pattern = n(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source), s.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, s.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, s.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, s.languages.jsx.tag.inside.comment = e.comment, s.languages.insertBefore("inside", "attr-name", { spread: {
|
|
3274
|
-
pattern: n(/<SPREAD>/.source),
|
|
3275
|
-
inside: s.languages.jsx
|
|
3276
|
-
} }, s.languages.jsx.tag), s.languages.insertBefore("inside", "special-attr", { script: {
|
|
3277
|
-
pattern: n(/=<BRACES>/.source),
|
|
3278
|
-
alias: "language-javascript",
|
|
3279
|
-
inside: {
|
|
3280
|
-
"script-punctuation": {
|
|
3281
|
-
pattern: /^=(?=\{)/,
|
|
3282
|
-
alias: "punctuation"
|
|
3283
|
-
},
|
|
3284
|
-
rest: s.languages.jsx
|
|
3285
|
-
}
|
|
3286
|
-
} }, s.languages.jsx.tag);
|
|
3287
|
-
function i(e2) {
|
|
3288
|
-
for (var n2 = [], t2 = 0; t2 < e2.length; t2++) {
|
|
3289
|
-
var a2 = e2[t2], r2 = false;
|
|
3290
|
-
"string" != typeof a2 && ("tag" === a2.type && a2.content[0] && "tag" === a2.content[0].type ? "</" === a2.content[0].content[0].content ? 0 < n2.length && n2[n2.length - 1].tagName === o(a2.content[0].content[1]) && n2.pop() : "/>" !== a2.content[a2.content.length - 1].content && n2.push({
|
|
3291
|
-
tagName: o(a2.content[0].content[1]),
|
|
3292
|
-
openedBraces: 0
|
|
3293
|
-
}) : 0 < n2.length && "punctuation" === a2.type && "{" === a2.content ? n2[n2.length - 1].openedBraces++ : 0 < n2.length && 0 < n2[n2.length - 1].openedBraces && "punctuation" === a2.type && "}" === a2.content ? n2[n2.length - 1].openedBraces-- : r2 = true), (r2 || "string" == typeof a2) && 0 < n2.length && 0 === n2[n2.length - 1].openedBraces && (r2 = o(a2), t2 < e2.length - 1 && ("string" == typeof e2[t2 + 1] || "plain-text" === e2[t2 + 1].type) && (r2 += o(e2[t2 + 1]), e2.splice(t2 + 1, 1)), 0 < t2 && ("string" == typeof e2[t2 - 1] || "plain-text" === e2[t2 - 1].type) && (r2 = o(e2[t2 - 1]) + r2, e2.splice(t2 - 1, 1), t2--), e2[t2] = new s.Token("plain-text", r2, null, r2)), a2.content && "string" != typeof a2.content && i(a2.content);
|
|
3294
|
-
}
|
|
3295
|
-
}
|
|
3296
|
-
var o = function(e2) {
|
|
3297
|
-
return e2 ? "string" == typeof e2 ? e2 : "string" == typeof e2.content ? e2.content : e2.content.map(o).join("") : "";
|
|
3298
|
-
};
|
|
3299
|
-
s.hooks.add("after-tokenize", function(e2) {
|
|
3300
|
-
"jsx" !== e2.language && "tsx" !== e2.language || i(e2.tokens);
|
|
3301
|
-
});
|
|
3302
|
-
}(Prism), function(e) {
|
|
3303
|
-
var n = e.util.clone(e.languages.typescript), n = (e.languages.tsx = e.languages.extend("jsx", n), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"], e.languages.tsx.tag);
|
|
3304
|
-
n.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + n.pattern.source + ")", n.pattern.flags), n.lookbehind = true;
|
|
3305
|
-
}(Prism), Prism.languages.swift = {
|
|
3306
|
-
comment: {
|
|
3307
|
-
pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
|
|
3308
|
-
lookbehind: true,
|
|
3309
|
-
greedy: true
|
|
3310
|
-
},
|
|
3311
|
-
"string-literal": [{
|
|
3312
|
-
pattern: RegExp(/(^|[^"#])/.source + "(?:" + /"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source + "|" + /"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source + ")" + /(?!["#])/.source),
|
|
3313
|
-
lookbehind: true,
|
|
3314
|
-
greedy: true,
|
|
3315
|
-
inside: {
|
|
3316
|
-
interpolation: {
|
|
3317
|
-
pattern: /(\\\()(?:[^()]|\([^()]*\))*(?=\))/,
|
|
3318
|
-
lookbehind: true,
|
|
3319
|
-
inside: null
|
|
3320
|
-
},
|
|
3321
|
-
"interpolation-punctuation": {
|
|
3322
|
-
pattern: /^\)|\\\($/,
|
|
3323
|
-
alias: "punctuation"
|
|
3324
|
-
},
|
|
3325
|
-
punctuation: /\\(?=[\r\n])/,
|
|
3326
|
-
string: /[\s\S]+/
|
|
3327
|
-
}
|
|
3328
|
-
}, {
|
|
3329
|
-
pattern: RegExp(/(^|[^"#])(#+)/.source + "(?:" + /"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source + "|" + /"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source + ")\\2"),
|
|
3330
|
-
lookbehind: true,
|
|
3331
|
-
greedy: true,
|
|
3332
|
-
inside: {
|
|
3333
|
-
interpolation: {
|
|
3334
|
-
pattern: /(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,
|
|
3335
|
-
lookbehind: true,
|
|
3336
|
-
inside: null
|
|
3337
|
-
},
|
|
3338
|
-
"interpolation-punctuation": {
|
|
3339
|
-
pattern: /^\)|\\#+\($/,
|
|
3340
|
-
alias: "punctuation"
|
|
3341
|
-
},
|
|
3342
|
-
string: /[\s\S]+/
|
|
3343
|
-
}
|
|
3344
|
-
}],
|
|
3345
|
-
directive: {
|
|
3346
|
-
pattern: RegExp(/#/.source + "(?:" + /(?:elseif|if)\b/.source + "(?:[ ]*" + /(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source + ")+|" + /(?:else|endif)\b/.source + ")"),
|
|
3347
|
-
alias: "property",
|
|
3348
|
-
inside: {
|
|
3349
|
-
"directive-name": /^#\w+/,
|
|
3350
|
-
boolean: /\b(?:false|true)\b/,
|
|
3351
|
-
number: /\b\d+(?:\.\d+)*\b/,
|
|
3352
|
-
operator: /!|&&|\|\||[<>]=?/,
|
|
3353
|
-
punctuation: /[(),]/
|
|
3354
|
-
}
|
|
3355
|
-
},
|
|
3356
|
-
literal: {
|
|
3357
|
-
pattern: /#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,
|
|
3358
|
-
alias: "constant"
|
|
3359
|
-
},
|
|
3360
|
-
"other-directive": {
|
|
3361
|
-
pattern: /#\w+\b/,
|
|
3362
|
-
alias: "property"
|
|
3363
|
-
},
|
|
3364
|
-
attribute: {
|
|
3365
|
-
pattern: /@\w+/,
|
|
3366
|
-
alias: "atrule"
|
|
3367
|
-
},
|
|
3368
|
-
"function-definition": {
|
|
3369
|
-
pattern: /(\bfunc\s+)\w+/,
|
|
3370
|
-
lookbehind: true,
|
|
3371
|
-
alias: "function"
|
|
3372
|
-
},
|
|
3373
|
-
label: {
|
|
3374
|
-
pattern: /\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,
|
|
3375
|
-
lookbehind: true,
|
|
3376
|
-
alias: "important"
|
|
3377
|
-
},
|
|
3378
|
-
keyword: /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,
|
|
3379
|
-
boolean: /\b(?:false|true)\b/,
|
|
3380
|
-
nil: {
|
|
3381
|
-
pattern: /\bnil\b/,
|
|
3382
|
-
alias: "constant"
|
|
3383
|
-
},
|
|
3384
|
-
"short-argument": /\$\d+\b/,
|
|
3385
|
-
omit: {
|
|
3386
|
-
pattern: /\b_\b/,
|
|
3387
|
-
alias: "keyword"
|
|
3388
|
-
},
|
|
3389
|
-
number: /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,
|
|
3390
|
-
"class-name": /\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,
|
|
3391
|
-
function: /\b[a-z_]\w*(?=\s*\()/i,
|
|
3392
|
-
constant: /\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,
|
|
3393
|
-
operator: /[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,
|
|
3394
|
-
punctuation: /[{}[\]();,.:\\]/
|
|
3395
|
-
}, Prism.languages.swift["string-literal"].forEach(function(e) {
|
|
3396
|
-
e.inside.interpolation.inside = Prism.languages.swift;
|
|
3397
|
-
}), function(e) {
|
|
3398
|
-
e.languages.kotlin = e.languages.extend("clike", {
|
|
3399
|
-
keyword: {
|
|
3400
|
-
pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
|
|
3401
|
-
lookbehind: true
|
|
3402
|
-
},
|
|
3403
|
-
function: [{
|
|
3404
|
-
pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,
|
|
3405
|
-
greedy: true
|
|
3406
|
-
}, {
|
|
3407
|
-
pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,
|
|
3408
|
-
lookbehind: true,
|
|
3409
|
-
greedy: true
|
|
3410
|
-
}],
|
|
3411
|
-
number: /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,
|
|
3412
|
-
operator: /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/
|
|
3413
|
-
}), delete e.languages.kotlin["class-name"];
|
|
3414
|
-
var n = {
|
|
3415
|
-
"interpolation-punctuation": {
|
|
3416
|
-
pattern: /^\$\{?|\}$/,
|
|
3417
|
-
alias: "punctuation"
|
|
3418
|
-
},
|
|
3419
|
-
expression: {
|
|
3420
|
-
pattern: /[\s\S]+/,
|
|
3421
|
-
inside: e.languages.kotlin
|
|
3422
|
-
}
|
|
3423
|
-
};
|
|
3424
|
-
e.languages.insertBefore("kotlin", "string", {
|
|
3425
|
-
"string-literal": [{
|
|
3426
|
-
pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,
|
|
3427
|
-
alias: "multiline",
|
|
3428
|
-
inside: {
|
|
3429
|
-
interpolation: {
|
|
3430
|
-
pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i,
|
|
3431
|
-
inside: n
|
|
3432
|
-
},
|
|
3433
|
-
string: /[\s\S]+/
|
|
3434
|
-
}
|
|
3435
|
-
}, {
|
|
3436
|
-
pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,
|
|
3437
|
-
alias: "singleline",
|
|
3438
|
-
inside: {
|
|
3439
|
-
interpolation: {
|
|
3440
|
-
pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,
|
|
3441
|
-
lookbehind: true,
|
|
3442
|
-
inside: n
|
|
3443
|
-
},
|
|
3444
|
-
string: /[\s\S]+/
|
|
3445
|
-
}
|
|
3446
|
-
}],
|
|
3447
|
-
char: {
|
|
3448
|
-
pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,
|
|
3449
|
-
greedy: true
|
|
3450
|
-
}
|
|
3451
|
-
}), delete e.languages.kotlin.string, e.languages.insertBefore("kotlin", "keyword", { annotation: {
|
|
3452
|
-
pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,
|
|
3453
|
-
alias: "builtin"
|
|
3454
|
-
} }), e.languages.insertBefore("kotlin", "function", { label: {
|
|
3455
|
-
pattern: /\b\w+@|@\w+\b/,
|
|
3456
|
-
alias: "symbol"
|
|
3457
|
-
} }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
|
|
3458
|
-
}(Prism), Prism.languages.c = Prism.languages.extend("clike", {
|
|
3459
|
-
comment: {
|
|
3460
|
-
pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
3461
|
-
greedy: true
|
|
3462
|
-
},
|
|
3463
|
-
string: {
|
|
3464
|
-
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
3465
|
-
greedy: true
|
|
3466
|
-
},
|
|
3467
|
-
"class-name": {
|
|
3468
|
-
pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
|
|
3469
|
-
lookbehind: true
|
|
3470
|
-
},
|
|
3471
|
-
keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,
|
|
3472
|
-
function: /\b[a-z_]\w*(?=\s*\()/i,
|
|
3473
|
-
number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
|
|
3474
|
-
operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
|
|
3475
|
-
}), Prism.languages.insertBefore("c", "string", { char: {
|
|
3476
|
-
pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
|
|
3477
|
-
greedy: true
|
|
3478
|
-
} }), Prism.languages.insertBefore("c", "string", { macro: {
|
|
3479
|
-
pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
|
|
3480
|
-
lookbehind: true,
|
|
3481
|
-
greedy: true,
|
|
3482
|
-
alias: "property",
|
|
3483
|
-
inside: {
|
|
3484
|
-
string: [{
|
|
3485
|
-
pattern: /^(#\s*include\s*)<[^>]+>/,
|
|
3486
|
-
lookbehind: true
|
|
3487
|
-
}, Prism.languages.c.string],
|
|
3488
|
-
char: Prism.languages.c.char,
|
|
3489
|
-
comment: Prism.languages.c.comment,
|
|
3490
|
-
"macro-name": [{
|
|
3491
|
-
pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
|
|
3492
|
-
lookbehind: true
|
|
3493
|
-
}, {
|
|
3494
|
-
pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
|
|
3495
|
-
lookbehind: true,
|
|
3496
|
-
alias: "function"
|
|
3497
|
-
}],
|
|
3498
|
-
directive: {
|
|
3499
|
-
pattern: /^(#\s*)[a-z]+/,
|
|
3500
|
-
lookbehind: true,
|
|
3501
|
-
alias: "keyword"
|
|
3502
|
-
},
|
|
3503
|
-
"directive-hash": /^#/,
|
|
3504
|
-
punctuation: /##|\\(?=[\r\n])/,
|
|
3505
|
-
expression: {
|
|
3506
|
-
pattern: /\S[\s\S]*/,
|
|
3507
|
-
inside: Prism.languages.c
|
|
3508
|
-
}
|
|
3509
|
-
}
|
|
3510
|
-
} }), Prism.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete Prism.languages.c.boolean, Prism.languages.objectivec = Prism.languages.extend("c", {
|
|
3511
|
-
string: {
|
|
3512
|
-
pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
3513
|
-
greedy: true
|
|
3514
|
-
},
|
|
3515
|
-
keyword: /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,
|
|
3516
|
-
operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
|
|
3517
|
-
}), delete Prism.languages.objectivec["class-name"], Prism.languages.objc = Prism.languages.objectivec, Prism.languages.reason = Prism.languages.extend("clike", {
|
|
3518
|
-
string: {
|
|
3519
|
-
pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
|
|
3520
|
-
greedy: true
|
|
3521
|
-
},
|
|
3522
|
-
"class-name": /\b[A-Z]\w*/,
|
|
3523
|
-
keyword: /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,
|
|
3524
|
-
operator: /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/
|
|
3525
|
-
}), Prism.languages.insertBefore("reason", "class-name", {
|
|
3526
|
-
char: {
|
|
3527
|
-
pattern: /'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,
|
|
3528
|
-
greedy: true
|
|
3529
|
-
},
|
|
3530
|
-
constructor: /\b[A-Z]\w*\b(?!\s*\.)/,
|
|
3531
|
-
label: {
|
|
3532
|
-
pattern: /\b[a-z]\w*(?=::)/,
|
|
3533
|
-
alias: "symbol"
|
|
3534
|
-
}
|
|
3535
|
-
}), delete Prism.languages.reason.function, function(e) {
|
|
3536
|
-
for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, t = 0; t < 2; t++) n = n.replace(/<self>/g, function() {
|
|
3537
|
-
return n;
|
|
3538
|
-
});
|
|
3539
|
-
n = n.replace(/<self>/g, function() {
|
|
3540
|
-
return /[^\s\S]/.source;
|
|
3541
|
-
}), e.languages.rust = {
|
|
3542
|
-
comment: [{
|
|
3543
|
-
pattern: RegExp(/(^|[^\\])/.source + n),
|
|
3544
|
-
lookbehind: true,
|
|
3545
|
-
greedy: true
|
|
3546
|
-
}, {
|
|
3547
|
-
pattern: /(^|[^\\:])\/\/.*/,
|
|
3548
|
-
lookbehind: true,
|
|
3549
|
-
greedy: true
|
|
3550
|
-
}],
|
|
3551
|
-
string: {
|
|
3552
|
-
pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,
|
|
3553
|
-
greedy: true
|
|
3554
|
-
},
|
|
3555
|
-
char: {
|
|
3556
|
-
pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,
|
|
3557
|
-
greedy: true
|
|
3558
|
-
},
|
|
3559
|
-
attribute: {
|
|
3560
|
-
pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,
|
|
3561
|
-
greedy: true,
|
|
3562
|
-
alias: "attr-name",
|
|
3563
|
-
inside: { string: null }
|
|
3564
|
-
},
|
|
3565
|
-
"closure-params": {
|
|
3566
|
-
pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,
|
|
3567
|
-
lookbehind: true,
|
|
3568
|
-
greedy: true,
|
|
3569
|
-
inside: {
|
|
3570
|
-
"closure-punctuation": {
|
|
3571
|
-
pattern: /^\||\|$/,
|
|
3572
|
-
alias: "punctuation"
|
|
3573
|
-
},
|
|
3574
|
-
rest: null
|
|
3575
|
-
}
|
|
3576
|
-
},
|
|
3577
|
-
"lifetime-annotation": {
|
|
3578
|
-
pattern: /'\w+/,
|
|
3579
|
-
alias: "symbol"
|
|
3580
|
-
},
|
|
3581
|
-
"fragment-specifier": {
|
|
3582
|
-
pattern: /(\$\w+:)[a-z]+/,
|
|
3583
|
-
lookbehind: true,
|
|
3584
|
-
alias: "punctuation"
|
|
3585
|
-
},
|
|
3586
|
-
variable: /\$\w+/,
|
|
3587
|
-
"function-definition": {
|
|
3588
|
-
pattern: /(\bfn\s+)\w+/,
|
|
3589
|
-
lookbehind: true,
|
|
3590
|
-
alias: "function"
|
|
3591
|
-
},
|
|
3592
|
-
"type-definition": {
|
|
3593
|
-
pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
|
|
3594
|
-
lookbehind: true,
|
|
3595
|
-
alias: "class-name"
|
|
3596
|
-
},
|
|
3597
|
-
"module-declaration": [{
|
|
3598
|
-
pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
|
|
3599
|
-
lookbehind: true,
|
|
3600
|
-
alias: "namespace"
|
|
3601
|
-
}, {
|
|
3602
|
-
pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,
|
|
3603
|
-
lookbehind: true,
|
|
3604
|
-
alias: "namespace",
|
|
3605
|
-
inside: { punctuation: /::/ }
|
|
3606
|
-
}],
|
|
3607
|
-
keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],
|
|
3608
|
-
function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,
|
|
3609
|
-
macro: {
|
|
3610
|
-
pattern: /\b\w+!/,
|
|
3611
|
-
alias: "property"
|
|
3612
|
-
},
|
|
3613
|
-
constant: /\b[A-Z_][A-Z_\d]+\b/,
|
|
3614
|
-
"class-name": /\b[A-Z]\w*\b/,
|
|
3615
|
-
namespace: {
|
|
3616
|
-
pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,
|
|
3617
|
-
inside: { punctuation: /::/ }
|
|
3618
|
-
},
|
|
3619
|
-
number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,
|
|
3620
|
-
boolean: /\b(?:false|true)\b/,
|
|
3621
|
-
punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
|
|
3622
|
-
operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
|
|
3623
|
-
}, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
|
|
3624
|
-
}(Prism), Prism.languages.go = Prism.languages.extend("clike", {
|
|
3625
|
-
string: {
|
|
3626
|
-
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
|
|
3627
|
-
lookbehind: true,
|
|
3628
|
-
greedy: true
|
|
3629
|
-
},
|
|
3630
|
-
keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,
|
|
3631
|
-
boolean: /\b(?:_|false|iota|nil|true)\b/,
|
|
3632
|
-
number: [
|
|
3633
|
-
/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,
|
|
3634
|
-
/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,
|
|
3635
|
-
/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i
|
|
3636
|
-
],
|
|
3637
|
-
operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
|
|
3638
|
-
builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/
|
|
3639
|
-
}), Prism.languages.insertBefore("go", "string", { char: {
|
|
3640
|
-
pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/,
|
|
3641
|
-
greedy: true
|
|
3642
|
-
} }), delete Prism.languages.go["class-name"], function(e) {
|
|
3643
|
-
var n = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, t = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function() {
|
|
3644
|
-
return n.source;
|
|
3645
|
-
});
|
|
3646
|
-
e.languages.cpp = e.languages.extend("c", {
|
|
3647
|
-
"class-name": [
|
|
3648
|
-
{
|
|
3649
|
-
pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g, function() {
|
|
3650
|
-
return n.source;
|
|
3651
|
-
})),
|
|
3652
|
-
lookbehind: true
|
|
3653
|
-
},
|
|
3654
|
-
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
|
|
3655
|
-
/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
|
|
3656
|
-
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
|
|
3657
|
-
],
|
|
3658
|
-
keyword: n,
|
|
3659
|
-
number: {
|
|
3660
|
-
pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
|
|
3661
|
-
greedy: true
|
|
3662
|
-
},
|
|
3663
|
-
operator: />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
|
|
3664
|
-
boolean: /\b(?:false|true)\b/
|
|
3665
|
-
}), e.languages.insertBefore("cpp", "string", {
|
|
3666
|
-
module: {
|
|
3667
|
-
pattern: RegExp(/(\b(?:import|module)\s+)/.source + "(?:" + /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + "|" + /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function() {
|
|
3668
|
-
return t;
|
|
3669
|
-
}) + ")"),
|
|
3670
|
-
lookbehind: true,
|
|
3671
|
-
greedy: true,
|
|
3672
|
-
inside: {
|
|
3673
|
-
string: /^[<"][\s\S]+/,
|
|
3674
|
-
operator: /:/,
|
|
3675
|
-
punctuation: /\./
|
|
3676
|
-
}
|
|
3677
|
-
},
|
|
3678
|
-
"raw-string": {
|
|
3679
|
-
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
|
|
3680
|
-
alias: "string",
|
|
3681
|
-
greedy: true
|
|
3682
|
-
}
|
|
3683
|
-
}), e.languages.insertBefore("cpp", "keyword", { "generic-function": {
|
|
3684
|
-
pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
|
|
3685
|
-
inside: {
|
|
3686
|
-
function: /^\w+/,
|
|
3687
|
-
generic: {
|
|
3688
|
-
pattern: /<[\s\S]+/,
|
|
3689
|
-
alias: "class-name",
|
|
3690
|
-
inside: e.languages.cpp
|
|
3691
|
-
}
|
|
3692
|
-
}
|
|
3693
|
-
} }), e.languages.insertBefore("cpp", "operator", { "double-colon": {
|
|
3694
|
-
pattern: /::/,
|
|
3695
|
-
alias: "punctuation"
|
|
3696
|
-
} }), e.languages.insertBefore("cpp", "class-name", { "base-clause": {
|
|
3697
|
-
pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
|
|
3698
|
-
lookbehind: true,
|
|
3699
|
-
greedy: true,
|
|
3700
|
-
inside: e.languages.extend("cpp", {})
|
|
3701
|
-
} }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
|
|
3702
|
-
}(Prism), Prism.languages.python = {
|
|
3703
|
-
comment: {
|
|
3704
|
-
pattern: /(^|[^\\])#.*/,
|
|
3705
|
-
lookbehind: true,
|
|
3706
|
-
greedy: true
|
|
3707
|
-
},
|
|
3708
|
-
"string-interpolation": {
|
|
3709
|
-
pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
|
|
3710
|
-
greedy: true,
|
|
3711
|
-
inside: {
|
|
3712
|
-
interpolation: {
|
|
3713
|
-
pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
|
|
3714
|
-
lookbehind: true,
|
|
3715
|
-
inside: {
|
|
3716
|
-
"format-spec": {
|
|
3717
|
-
pattern: /(:)[^:(){}]+(?=\}$)/,
|
|
3718
|
-
lookbehind: true
|
|
3719
|
-
},
|
|
3720
|
-
"conversion-option": {
|
|
3721
|
-
pattern: //,
|
|
3722
|
-
alias: "punctuation"
|
|
3723
|
-
},
|
|
3724
|
-
rest: null
|
|
3725
|
-
}
|
|
3726
|
-
},
|
|
3727
|
-
string: /[\s\S]+/
|
|
3728
|
-
}
|
|
3729
|
-
},
|
|
3730
|
-
"triple-quoted-string": {
|
|
3731
|
-
pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
|
|
3732
|
-
greedy: true,
|
|
3733
|
-
alias: "string"
|
|
3734
|
-
},
|
|
3735
|
-
string: {
|
|
3736
|
-
pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
|
|
3737
|
-
greedy: true
|
|
3738
|
-
},
|
|
3739
|
-
function: {
|
|
3740
|
-
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
|
|
3741
|
-
lookbehind: true
|
|
3742
|
-
},
|
|
3743
|
-
"class-name": {
|
|
3744
|
-
pattern: /(\bclass\s+)\w+/i,
|
|
3745
|
-
lookbehind: true
|
|
3746
|
-
},
|
|
3747
|
-
decorator: {
|
|
3748
|
-
pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
|
|
3749
|
-
lookbehind: true,
|
|
3750
|
-
alias: ["annotation", "punctuation"],
|
|
3751
|
-
inside: { punctuation: /\./ }
|
|
3752
|
-
},
|
|
3753
|
-
keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
|
|
3754
|
-
builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
|
|
3755
|
-
boolean: /\b(?:False|None|True)\b/,
|
|
3756
|
-
number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,
|
|
3757
|
-
operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
3758
|
-
punctuation: /[{}[\];(),.:]/
|
|
3759
|
-
}, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.json = {
|
|
3760
|
-
property: {
|
|
3761
|
-
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
3762
|
-
lookbehind: true,
|
|
3763
|
-
greedy: true
|
|
3764
|
-
},
|
|
3765
|
-
string: {
|
|
3766
|
-
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
|
|
3767
|
-
lookbehind: true,
|
|
3768
|
-
greedy: true
|
|
3769
|
-
},
|
|
3770
|
-
comment: {
|
|
3771
|
-
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
3772
|
-
greedy: true
|
|
3773
|
-
},
|
|
3774
|
-
number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
|
|
3775
|
-
punctuation: /[{}[\],]/,
|
|
3776
|
-
operator: /:/,
|
|
3777
|
-
boolean: /\b(?:false|true)\b/,
|
|
3778
|
-
null: {
|
|
3779
|
-
pattern: /\bnull\b/,
|
|
3780
|
-
alias: "keyword"
|
|
3781
|
-
}
|
|
3782
|
-
}, Prism.languages.webmanifest = Prism.languages.json;
|
|
3783
|
-
var themes_exports = {};
|
|
3784
|
-
__export(themes_exports, {
|
|
3785
|
-
dracula: () => dracula_default,
|
|
3786
|
-
duotoneDark: () => duotoneDark_default,
|
|
3787
|
-
duotoneLight: () => duotoneLight_default,
|
|
3788
|
-
github: () => github_default,
|
|
3789
|
-
gruvboxMaterialDark: () => gruvboxMaterialDark_default,
|
|
3790
|
-
gruvboxMaterialLight: () => gruvboxMaterialLight_default,
|
|
3791
|
-
jettwaveDark: () => jettwaveDark_default,
|
|
3792
|
-
jettwaveLight: () => jettwaveLight_default,
|
|
3793
|
-
nightOwl: () => nightOwl_default,
|
|
3794
|
-
nightOwlLight: () => nightOwlLight_default,
|
|
3795
|
-
oceanicNext: () => oceanicNext_default,
|
|
3796
|
-
okaidia: () => okaidia_default,
|
|
3797
|
-
oneDark: () => oneDark_default,
|
|
3798
|
-
oneLight: () => oneLight_default,
|
|
3799
|
-
palenight: () => palenight_default,
|
|
3800
|
-
shadesOfPurple: () => shadesOfPurple_default,
|
|
3801
|
-
synthwave84: () => synthwave84_default,
|
|
3802
|
-
ultramin: () => ultramin_default,
|
|
3803
|
-
vsDark: () => vsDark_default,
|
|
3804
|
-
vsLight: () => vsLight_default
|
|
3805
|
-
});
|
|
3806
|
-
var dracula_default = {
|
|
3807
|
-
plain: {
|
|
3808
|
-
color: "#F8F8F2",
|
|
3809
|
-
backgroundColor: "#282A36"
|
|
3810
|
-
},
|
|
3811
|
-
styles: [
|
|
3812
|
-
{
|
|
3813
|
-
types: [
|
|
3814
|
-
"prolog",
|
|
3815
|
-
"constant",
|
|
3816
|
-
"builtin"
|
|
3817
|
-
],
|
|
3818
|
-
style: { color: "rgb(189, 147, 249)" }
|
|
3819
|
-
},
|
|
3820
|
-
{
|
|
3821
|
-
types: ["inserted", "function"],
|
|
3822
|
-
style: { color: "rgb(80, 250, 123)" }
|
|
3823
|
-
},
|
|
3824
|
-
{
|
|
3825
|
-
types: ["deleted"],
|
|
3826
|
-
style: { color: "rgb(255, 85, 85)" }
|
|
3827
|
-
},
|
|
3828
|
-
{
|
|
3829
|
-
types: ["changed"],
|
|
3830
|
-
style: { color: "rgb(255, 184, 108)" }
|
|
3831
|
-
},
|
|
3832
|
-
{
|
|
3833
|
-
types: ["punctuation", "symbol"],
|
|
3834
|
-
style: { color: "rgb(248, 248, 242)" }
|
|
3835
|
-
},
|
|
3836
|
-
{
|
|
3837
|
-
types: [
|
|
3838
|
-
"string",
|
|
3839
|
-
"char",
|
|
3840
|
-
"tag",
|
|
3841
|
-
"selector"
|
|
3842
|
-
],
|
|
3843
|
-
style: { color: "rgb(255, 121, 198)" }
|
|
3844
|
-
},
|
|
3845
|
-
{
|
|
3846
|
-
types: ["keyword", "variable"],
|
|
3847
|
-
style: {
|
|
3848
|
-
color: "rgb(189, 147, 249)",
|
|
3849
|
-
fontStyle: "italic"
|
|
3850
|
-
}
|
|
3851
|
-
},
|
|
3852
|
-
{
|
|
3853
|
-
types: ["comment"],
|
|
3854
|
-
style: { color: "rgb(98, 114, 164)" }
|
|
3855
|
-
},
|
|
3856
|
-
{
|
|
3857
|
-
types: ["attr-name"],
|
|
3858
|
-
style: { color: "rgb(241, 250, 140)" }
|
|
3859
|
-
}
|
|
3860
|
-
]
|
|
3861
|
-
};
|
|
3862
|
-
var duotoneDark_default = {
|
|
3863
|
-
plain: {
|
|
3864
|
-
backgroundColor: "#2a2734",
|
|
3865
|
-
color: "#9a86fd"
|
|
3866
|
-
},
|
|
3867
|
-
styles: [
|
|
3868
|
-
{
|
|
3869
|
-
types: [
|
|
3870
|
-
"comment",
|
|
3871
|
-
"prolog",
|
|
3872
|
-
"doctype",
|
|
3873
|
-
"cdata",
|
|
3874
|
-
"punctuation"
|
|
3875
|
-
],
|
|
3876
|
-
style: { color: "#6c6783" }
|
|
3877
|
-
},
|
|
3878
|
-
{
|
|
3879
|
-
types: ["namespace"],
|
|
3880
|
-
style: { opacity: .7 }
|
|
3881
|
-
},
|
|
3882
|
-
{
|
|
3883
|
-
types: [
|
|
3884
|
-
"tag",
|
|
3885
|
-
"operator",
|
|
3886
|
-
"number"
|
|
3887
|
-
],
|
|
3888
|
-
style: { color: "#e09142" }
|
|
3889
|
-
},
|
|
3890
|
-
{
|
|
3891
|
-
types: ["property", "function"],
|
|
3892
|
-
style: { color: "#9a86fd" }
|
|
3893
|
-
},
|
|
3894
|
-
{
|
|
3895
|
-
types: [
|
|
3896
|
-
"tag-id",
|
|
3897
|
-
"selector",
|
|
3898
|
-
"atrule-id"
|
|
3899
|
-
],
|
|
3900
|
-
style: { color: "#eeebff" }
|
|
3901
|
-
},
|
|
3902
|
-
{
|
|
3903
|
-
types: ["attr-name"],
|
|
3904
|
-
style: { color: "#c4b9fe" }
|
|
3905
|
-
},
|
|
3906
|
-
{
|
|
3907
|
-
types: [
|
|
3908
|
-
"boolean",
|
|
3909
|
-
"string",
|
|
3910
|
-
"entity",
|
|
3911
|
-
"url",
|
|
3912
|
-
"attr-value",
|
|
3913
|
-
"keyword",
|
|
3914
|
-
"control",
|
|
3915
|
-
"directive",
|
|
3916
|
-
"unit",
|
|
3917
|
-
"statement",
|
|
3918
|
-
"regex",
|
|
3919
|
-
"atrule",
|
|
3920
|
-
"placeholder",
|
|
3921
|
-
"variable"
|
|
3922
|
-
],
|
|
3923
|
-
style: { color: "#ffcc99" }
|
|
3924
|
-
},
|
|
3925
|
-
{
|
|
3926
|
-
types: ["deleted"],
|
|
3927
|
-
style: { textDecorationLine: "line-through" }
|
|
3928
|
-
},
|
|
3929
|
-
{
|
|
3930
|
-
types: ["inserted"],
|
|
3931
|
-
style: { textDecorationLine: "underline" }
|
|
3932
|
-
},
|
|
3933
|
-
{
|
|
3934
|
-
types: ["italic"],
|
|
3935
|
-
style: { fontStyle: "italic" }
|
|
3936
|
-
},
|
|
3937
|
-
{
|
|
3938
|
-
types: ["important", "bold"],
|
|
3939
|
-
style: { fontWeight: "bold" }
|
|
3940
|
-
},
|
|
3941
|
-
{
|
|
3942
|
-
types: ["important"],
|
|
3943
|
-
style: { color: "#c4b9fe" }
|
|
3944
|
-
}
|
|
3945
|
-
]
|
|
3946
|
-
};
|
|
3947
|
-
var duotoneLight_default = {
|
|
3948
|
-
plain: {
|
|
3949
|
-
backgroundColor: "#faf8f5",
|
|
3950
|
-
color: "#728fcb"
|
|
3951
|
-
},
|
|
3952
|
-
styles: [
|
|
3953
|
-
{
|
|
3954
|
-
types: [
|
|
3955
|
-
"comment",
|
|
3956
|
-
"prolog",
|
|
3957
|
-
"doctype",
|
|
3958
|
-
"cdata",
|
|
3959
|
-
"punctuation"
|
|
3960
|
-
],
|
|
3961
|
-
style: { color: "#b6ad9a" }
|
|
3962
|
-
},
|
|
3963
|
-
{
|
|
3964
|
-
types: ["namespace"],
|
|
3965
|
-
style: { opacity: .7 }
|
|
3966
|
-
},
|
|
3967
|
-
{
|
|
3968
|
-
types: [
|
|
3969
|
-
"tag",
|
|
3970
|
-
"operator",
|
|
3971
|
-
"number"
|
|
3972
|
-
],
|
|
3973
|
-
style: { color: "#063289" }
|
|
3974
|
-
},
|
|
3975
|
-
{
|
|
3976
|
-
types: ["property", "function"],
|
|
3977
|
-
style: { color: "#b29762" }
|
|
3978
|
-
},
|
|
3979
|
-
{
|
|
3980
|
-
types: [
|
|
3981
|
-
"tag-id",
|
|
3982
|
-
"selector",
|
|
3983
|
-
"atrule-id"
|
|
3984
|
-
],
|
|
3985
|
-
style: { color: "#2d2006" }
|
|
3986
|
-
},
|
|
3987
|
-
{
|
|
3988
|
-
types: ["attr-name"],
|
|
3989
|
-
style: { color: "#896724" }
|
|
3990
|
-
},
|
|
3991
|
-
{
|
|
3992
|
-
types: [
|
|
3993
|
-
"boolean",
|
|
3994
|
-
"string",
|
|
3995
|
-
"entity",
|
|
3996
|
-
"url",
|
|
3997
|
-
"attr-value",
|
|
3998
|
-
"keyword",
|
|
3999
|
-
"control",
|
|
4000
|
-
"directive",
|
|
4001
|
-
"unit",
|
|
4002
|
-
"statement",
|
|
4003
|
-
"regex",
|
|
4004
|
-
"atrule"
|
|
4005
|
-
],
|
|
4006
|
-
style: { color: "#728fcb" }
|
|
4007
|
-
},
|
|
4008
|
-
{
|
|
4009
|
-
types: ["placeholder", "variable"],
|
|
4010
|
-
style: { color: "#93abdc" }
|
|
4011
|
-
},
|
|
4012
|
-
{
|
|
4013
|
-
types: ["deleted"],
|
|
4014
|
-
style: { textDecorationLine: "line-through" }
|
|
4015
|
-
},
|
|
4016
|
-
{
|
|
4017
|
-
types: ["inserted"],
|
|
4018
|
-
style: { textDecorationLine: "underline" }
|
|
4019
|
-
},
|
|
4020
|
-
{
|
|
4021
|
-
types: ["italic"],
|
|
4022
|
-
style: { fontStyle: "italic" }
|
|
4023
|
-
},
|
|
4024
|
-
{
|
|
4025
|
-
types: ["important", "bold"],
|
|
4026
|
-
style: { fontWeight: "bold" }
|
|
4027
|
-
},
|
|
4028
|
-
{
|
|
4029
|
-
types: ["important"],
|
|
4030
|
-
style: { color: "#896724" }
|
|
4031
|
-
}
|
|
4032
|
-
]
|
|
4033
|
-
};
|
|
4034
|
-
var github_default = {
|
|
4035
|
-
plain: {
|
|
4036
|
-
color: "#393A34",
|
|
4037
|
-
backgroundColor: "#f6f8fa"
|
|
4038
|
-
},
|
|
4039
|
-
styles: [
|
|
4040
|
-
{
|
|
4041
|
-
types: [
|
|
4042
|
-
"comment",
|
|
4043
|
-
"prolog",
|
|
4044
|
-
"doctype",
|
|
4045
|
-
"cdata"
|
|
4046
|
-
],
|
|
4047
|
-
style: {
|
|
4048
|
-
color: "#999988",
|
|
4049
|
-
fontStyle: "italic"
|
|
4050
|
-
}
|
|
4051
|
-
},
|
|
4052
|
-
{
|
|
4053
|
-
types: ["namespace"],
|
|
4054
|
-
style: { opacity: .7 }
|
|
4055
|
-
},
|
|
4056
|
-
{
|
|
4057
|
-
types: ["string", "attr-value"],
|
|
4058
|
-
style: { color: "#e3116c" }
|
|
4059
|
-
},
|
|
4060
|
-
{
|
|
4061
|
-
types: ["punctuation", "operator"],
|
|
4062
|
-
style: { color: "#393A34" }
|
|
4063
|
-
},
|
|
4064
|
-
{
|
|
4065
|
-
types: [
|
|
4066
|
-
"entity",
|
|
4067
|
-
"url",
|
|
4068
|
-
"symbol",
|
|
4069
|
-
"number",
|
|
4070
|
-
"boolean",
|
|
4071
|
-
"variable",
|
|
4072
|
-
"constant",
|
|
4073
|
-
"property",
|
|
4074
|
-
"regex",
|
|
4075
|
-
"inserted"
|
|
4076
|
-
],
|
|
4077
|
-
style: { color: "#36acaa" }
|
|
4078
|
-
},
|
|
4079
|
-
{
|
|
4080
|
-
types: [
|
|
4081
|
-
"atrule",
|
|
4082
|
-
"keyword",
|
|
4083
|
-
"attr-name",
|
|
4084
|
-
"selector"
|
|
4085
|
-
],
|
|
4086
|
-
style: { color: "#00a4db" }
|
|
4087
|
-
},
|
|
4088
|
-
{
|
|
4089
|
-
types: [
|
|
4090
|
-
"function",
|
|
4091
|
-
"deleted",
|
|
4092
|
-
"tag"
|
|
4093
|
-
],
|
|
4094
|
-
style: { color: "#d73a49" }
|
|
4095
|
-
},
|
|
4096
|
-
{
|
|
4097
|
-
types: ["function-variable"],
|
|
4098
|
-
style: { color: "#6f42c1" }
|
|
4099
|
-
},
|
|
4100
|
-
{
|
|
4101
|
-
types: [
|
|
4102
|
-
"tag",
|
|
4103
|
-
"selector",
|
|
4104
|
-
"keyword"
|
|
4105
|
-
],
|
|
4106
|
-
style: { color: "#00009f" }
|
|
4107
|
-
}
|
|
4108
|
-
]
|
|
4109
|
-
};
|
|
4110
|
-
var nightOwl_default = {
|
|
4111
|
-
plain: {
|
|
4112
|
-
color: "#d6deeb",
|
|
4113
|
-
backgroundColor: "#011627"
|
|
4114
|
-
},
|
|
4115
|
-
styles: [
|
|
4116
|
-
{
|
|
4117
|
-
types: ["changed"],
|
|
4118
|
-
style: {
|
|
4119
|
-
color: "rgb(162, 191, 252)",
|
|
4120
|
-
fontStyle: "italic"
|
|
4121
|
-
}
|
|
4122
|
-
},
|
|
4123
|
-
{
|
|
4124
|
-
types: ["deleted"],
|
|
4125
|
-
style: {
|
|
4126
|
-
color: "rgba(239, 83, 80, 0.56)",
|
|
4127
|
-
fontStyle: "italic"
|
|
4128
|
-
}
|
|
4129
|
-
},
|
|
4130
|
-
{
|
|
4131
|
-
types: ["inserted", "attr-name"],
|
|
4132
|
-
style: {
|
|
4133
|
-
color: "rgb(173, 219, 103)",
|
|
4134
|
-
fontStyle: "italic"
|
|
4135
|
-
}
|
|
4136
|
-
},
|
|
4137
|
-
{
|
|
4138
|
-
types: ["comment"],
|
|
4139
|
-
style: {
|
|
4140
|
-
color: "rgb(99, 119, 119)",
|
|
4141
|
-
fontStyle: "italic"
|
|
4142
|
-
}
|
|
4143
|
-
},
|
|
4144
|
-
{
|
|
4145
|
-
types: ["string", "url"],
|
|
4146
|
-
style: { color: "rgb(173, 219, 103)" }
|
|
4147
|
-
},
|
|
4148
|
-
{
|
|
4149
|
-
types: ["variable"],
|
|
4150
|
-
style: { color: "rgb(214, 222, 235)" }
|
|
4151
|
-
},
|
|
4152
|
-
{
|
|
4153
|
-
types: ["number"],
|
|
4154
|
-
style: { color: "rgb(247, 140, 108)" }
|
|
4155
|
-
},
|
|
4156
|
-
{
|
|
4157
|
-
types: [
|
|
4158
|
-
"builtin",
|
|
4159
|
-
"char",
|
|
4160
|
-
"constant",
|
|
4161
|
-
"function"
|
|
4162
|
-
],
|
|
4163
|
-
style: { color: "rgb(130, 170, 255)" }
|
|
4164
|
-
},
|
|
4165
|
-
{
|
|
4166
|
-
types: ["punctuation"],
|
|
4167
|
-
style: { color: "rgb(199, 146, 234)" }
|
|
4168
|
-
},
|
|
4169
|
-
{
|
|
4170
|
-
types: ["selector", "doctype"],
|
|
4171
|
-
style: {
|
|
4172
|
-
color: "rgb(199, 146, 234)",
|
|
4173
|
-
fontStyle: "italic"
|
|
4174
|
-
}
|
|
4175
|
-
},
|
|
4176
|
-
{
|
|
4177
|
-
types: ["class-name"],
|
|
4178
|
-
style: { color: "rgb(255, 203, 139)" }
|
|
4179
|
-
},
|
|
4180
|
-
{
|
|
4181
|
-
types: [
|
|
4182
|
-
"tag",
|
|
4183
|
-
"operator",
|
|
4184
|
-
"keyword"
|
|
4185
|
-
],
|
|
4186
|
-
style: { color: "rgb(127, 219, 202)" }
|
|
4187
|
-
},
|
|
4188
|
-
{
|
|
4189
|
-
types: ["boolean"],
|
|
4190
|
-
style: { color: "rgb(255, 88, 116)" }
|
|
4191
|
-
},
|
|
4192
|
-
{
|
|
4193
|
-
types: ["property"],
|
|
4194
|
-
style: { color: "rgb(128, 203, 196)" }
|
|
4195
|
-
},
|
|
4196
|
-
{
|
|
4197
|
-
types: ["namespace"],
|
|
4198
|
-
style: { color: "rgb(178, 204, 214)" }
|
|
4199
|
-
}
|
|
4200
|
-
]
|
|
4201
|
-
};
|
|
4202
|
-
var nightOwlLight_default = {
|
|
4203
|
-
plain: {
|
|
4204
|
-
color: "#403f53",
|
|
4205
|
-
backgroundColor: "#FBFBFB"
|
|
4206
|
-
},
|
|
4207
|
-
styles: [
|
|
4208
|
-
{
|
|
4209
|
-
types: ["changed"],
|
|
4210
|
-
style: {
|
|
4211
|
-
color: "rgb(162, 191, 252)",
|
|
4212
|
-
fontStyle: "italic"
|
|
4213
|
-
}
|
|
4214
|
-
},
|
|
4215
|
-
{
|
|
4216
|
-
types: ["deleted"],
|
|
4217
|
-
style: {
|
|
4218
|
-
color: "rgba(239, 83, 80, 0.56)",
|
|
4219
|
-
fontStyle: "italic"
|
|
4220
|
-
}
|
|
4221
|
-
},
|
|
4222
|
-
{
|
|
4223
|
-
types: ["inserted", "attr-name"],
|
|
4224
|
-
style: {
|
|
4225
|
-
color: "rgb(72, 118, 214)",
|
|
4226
|
-
fontStyle: "italic"
|
|
4227
|
-
}
|
|
4228
|
-
},
|
|
4229
|
-
{
|
|
4230
|
-
types: ["comment"],
|
|
4231
|
-
style: {
|
|
4232
|
-
color: "rgb(152, 159, 177)",
|
|
4233
|
-
fontStyle: "italic"
|
|
4234
|
-
}
|
|
4235
|
-
},
|
|
4236
|
-
{
|
|
4237
|
-
types: [
|
|
4238
|
-
"string",
|
|
4239
|
-
"builtin",
|
|
4240
|
-
"char",
|
|
4241
|
-
"constant",
|
|
4242
|
-
"url"
|
|
4243
|
-
],
|
|
4244
|
-
style: { color: "rgb(72, 118, 214)" }
|
|
4245
|
-
},
|
|
4246
|
-
{
|
|
4247
|
-
types: ["variable"],
|
|
4248
|
-
style: { color: "rgb(201, 103, 101)" }
|
|
4249
|
-
},
|
|
4250
|
-
{
|
|
4251
|
-
types: ["number"],
|
|
4252
|
-
style: { color: "rgb(170, 9, 130)" }
|
|
4253
|
-
},
|
|
4254
|
-
{
|
|
4255
|
-
types: ["punctuation"],
|
|
4256
|
-
style: { color: "rgb(153, 76, 195)" }
|
|
4257
|
-
},
|
|
4258
|
-
{
|
|
4259
|
-
types: [
|
|
4260
|
-
"function",
|
|
4261
|
-
"selector",
|
|
4262
|
-
"doctype"
|
|
4263
|
-
],
|
|
4264
|
-
style: {
|
|
4265
|
-
color: "rgb(153, 76, 195)",
|
|
4266
|
-
fontStyle: "italic"
|
|
4267
|
-
}
|
|
4268
|
-
},
|
|
4269
|
-
{
|
|
4270
|
-
types: ["class-name"],
|
|
4271
|
-
style: { color: "rgb(17, 17, 17)" }
|
|
4272
|
-
},
|
|
4273
|
-
{
|
|
4274
|
-
types: ["tag"],
|
|
4275
|
-
style: { color: "rgb(153, 76, 195)" }
|
|
4276
|
-
},
|
|
4277
|
-
{
|
|
4278
|
-
types: [
|
|
4279
|
-
"operator",
|
|
4280
|
-
"property",
|
|
4281
|
-
"keyword",
|
|
4282
|
-
"namespace"
|
|
4283
|
-
],
|
|
4284
|
-
style: { color: "rgb(12, 150, 155)" }
|
|
4285
|
-
},
|
|
4286
|
-
{
|
|
4287
|
-
types: ["boolean"],
|
|
4288
|
-
style: { color: "rgb(188, 84, 84)" }
|
|
4289
|
-
}
|
|
4290
|
-
]
|
|
4291
|
-
};
|
|
4292
|
-
var colors = {
|
|
4293
|
-
char: "#D8DEE9",
|
|
4294
|
-
comment: "#999999",
|
|
4295
|
-
keyword: "#c5a5c5",
|
|
4296
|
-
primitive: "#5a9bcf",
|
|
4297
|
-
string: "#8dc891",
|
|
4298
|
-
variable: "#d7deea",
|
|
4299
|
-
boolean: "#ff8b50",
|
|
4300
|
-
punctuation: "#5FB3B3",
|
|
4301
|
-
tag: "#fc929e",
|
|
4302
|
-
function: "#79b6f2",
|
|
4303
|
-
className: "#FAC863",
|
|
4304
|
-
method: "#6699CC",
|
|
4305
|
-
operator: "#fc929e"
|
|
4306
|
-
};
|
|
4307
|
-
var oceanicNext_default = {
|
|
4308
|
-
plain: {
|
|
4309
|
-
backgroundColor: "#282c34",
|
|
4310
|
-
color: "#ffffff"
|
|
4311
|
-
},
|
|
4312
|
-
styles: [
|
|
4313
|
-
{
|
|
4314
|
-
types: ["attr-name"],
|
|
4315
|
-
style: { color: colors.keyword }
|
|
4316
|
-
},
|
|
4317
|
-
{
|
|
4318
|
-
types: ["attr-value"],
|
|
4319
|
-
style: { color: colors.string }
|
|
4320
|
-
},
|
|
4321
|
-
{
|
|
4322
|
-
types: [
|
|
4323
|
-
"comment",
|
|
4324
|
-
"block-comment",
|
|
4325
|
-
"prolog",
|
|
4326
|
-
"doctype",
|
|
4327
|
-
"cdata",
|
|
4328
|
-
"shebang"
|
|
4329
|
-
],
|
|
4330
|
-
style: { color: colors.comment }
|
|
4331
|
-
},
|
|
4332
|
-
{
|
|
4333
|
-
types: [
|
|
4334
|
-
"property",
|
|
4335
|
-
"number",
|
|
4336
|
-
"function-name",
|
|
4337
|
-
"constant",
|
|
4338
|
-
"symbol",
|
|
4339
|
-
"deleted"
|
|
4340
|
-
],
|
|
4341
|
-
style: { color: colors.primitive }
|
|
4342
|
-
},
|
|
4343
|
-
{
|
|
4344
|
-
types: ["boolean"],
|
|
4345
|
-
style: { color: colors.boolean }
|
|
4346
|
-
},
|
|
4347
|
-
{
|
|
4348
|
-
types: ["tag"],
|
|
4349
|
-
style: { color: colors.tag }
|
|
4350
|
-
},
|
|
4351
|
-
{
|
|
4352
|
-
types: ["string"],
|
|
4353
|
-
style: { color: colors.string }
|
|
4354
|
-
},
|
|
4355
|
-
{
|
|
4356
|
-
types: ["punctuation"],
|
|
4357
|
-
style: { color: colors.string }
|
|
4358
|
-
},
|
|
4359
|
-
{
|
|
4360
|
-
types: [
|
|
4361
|
-
"selector",
|
|
4362
|
-
"char",
|
|
4363
|
-
"builtin",
|
|
4364
|
-
"inserted"
|
|
4365
|
-
],
|
|
4366
|
-
style: { color: colors.char }
|
|
4367
|
-
},
|
|
4368
|
-
{
|
|
4369
|
-
types: ["function"],
|
|
4370
|
-
style: { color: colors.function }
|
|
4371
|
-
},
|
|
4372
|
-
{
|
|
4373
|
-
types: [
|
|
4374
|
-
"operator",
|
|
4375
|
-
"entity",
|
|
4376
|
-
"url",
|
|
4377
|
-
"variable"
|
|
4378
|
-
],
|
|
4379
|
-
style: { color: colors.variable }
|
|
4380
|
-
},
|
|
4381
|
-
{
|
|
4382
|
-
types: ["keyword"],
|
|
4383
|
-
style: { color: colors.keyword }
|
|
4384
|
-
},
|
|
4385
|
-
{
|
|
4386
|
-
types: ["atrule", "class-name"],
|
|
4387
|
-
style: { color: colors.className }
|
|
4388
|
-
},
|
|
4389
|
-
{
|
|
4390
|
-
types: ["important"],
|
|
4391
|
-
style: { fontWeight: "400" }
|
|
4392
|
-
},
|
|
4393
|
-
{
|
|
4394
|
-
types: ["bold"],
|
|
4395
|
-
style: { fontWeight: "bold" }
|
|
4396
|
-
},
|
|
4397
|
-
{
|
|
4398
|
-
types: ["italic"],
|
|
4399
|
-
style: { fontStyle: "italic" }
|
|
4400
|
-
},
|
|
4401
|
-
{
|
|
4402
|
-
types: ["namespace"],
|
|
4403
|
-
style: { opacity: .7 }
|
|
4404
|
-
}
|
|
4405
|
-
]
|
|
4406
|
-
};
|
|
4407
|
-
var okaidia_default = {
|
|
4408
|
-
plain: {
|
|
4409
|
-
color: "#f8f8f2",
|
|
4410
|
-
backgroundColor: "#272822"
|
|
4411
|
-
},
|
|
4412
|
-
styles: [
|
|
4413
|
-
{
|
|
4414
|
-
types: ["changed"],
|
|
4415
|
-
style: {
|
|
4416
|
-
color: "rgb(162, 191, 252)",
|
|
4417
|
-
fontStyle: "italic"
|
|
4418
|
-
}
|
|
4419
|
-
},
|
|
4420
|
-
{
|
|
4421
|
-
types: ["deleted"],
|
|
4422
|
-
style: {
|
|
4423
|
-
color: "#f92672",
|
|
4424
|
-
fontStyle: "italic"
|
|
4425
|
-
}
|
|
4426
|
-
},
|
|
4427
|
-
{
|
|
4428
|
-
types: ["inserted"],
|
|
4429
|
-
style: {
|
|
4430
|
-
color: "rgb(173, 219, 103)",
|
|
4431
|
-
fontStyle: "italic"
|
|
4432
|
-
}
|
|
4433
|
-
},
|
|
4434
|
-
{
|
|
4435
|
-
types: ["comment"],
|
|
4436
|
-
style: {
|
|
4437
|
-
color: "#8292a2",
|
|
4438
|
-
fontStyle: "italic"
|
|
4439
|
-
}
|
|
4440
|
-
},
|
|
4441
|
-
{
|
|
4442
|
-
types: ["string", "url"],
|
|
4443
|
-
style: { color: "#a6e22e" }
|
|
4444
|
-
},
|
|
4445
|
-
{
|
|
4446
|
-
types: ["variable"],
|
|
4447
|
-
style: { color: "#f8f8f2" }
|
|
4448
|
-
},
|
|
4449
|
-
{
|
|
4450
|
-
types: ["number"],
|
|
4451
|
-
style: { color: "#ae81ff" }
|
|
4452
|
-
},
|
|
4453
|
-
{
|
|
4454
|
-
types: [
|
|
4455
|
-
"builtin",
|
|
4456
|
-
"char",
|
|
4457
|
-
"constant",
|
|
4458
|
-
"function",
|
|
4459
|
-
"class-name"
|
|
4460
|
-
],
|
|
4461
|
-
style: { color: "#e6db74" }
|
|
4462
|
-
},
|
|
4463
|
-
{
|
|
4464
|
-
types: ["punctuation"],
|
|
4465
|
-
style: { color: "#f8f8f2" }
|
|
4466
|
-
},
|
|
4467
|
-
{
|
|
4468
|
-
types: ["selector", "doctype"],
|
|
4469
|
-
style: {
|
|
4470
|
-
color: "#a6e22e",
|
|
4471
|
-
fontStyle: "italic"
|
|
4472
|
-
}
|
|
4473
|
-
},
|
|
4474
|
-
{
|
|
4475
|
-
types: [
|
|
4476
|
-
"tag",
|
|
4477
|
-
"operator",
|
|
4478
|
-
"keyword"
|
|
4479
|
-
],
|
|
4480
|
-
style: { color: "#66d9ef" }
|
|
4481
|
-
},
|
|
4482
|
-
{
|
|
4483
|
-
types: ["boolean"],
|
|
4484
|
-
style: { color: "#ae81ff" }
|
|
4485
|
-
},
|
|
4486
|
-
{
|
|
4487
|
-
types: ["namespace"],
|
|
4488
|
-
style: {
|
|
4489
|
-
color: "rgb(178, 204, 214)",
|
|
4490
|
-
opacity: .7
|
|
4491
|
-
}
|
|
4492
|
-
},
|
|
4493
|
-
{
|
|
4494
|
-
types: ["tag", "property"],
|
|
4495
|
-
style: { color: "#f92672" }
|
|
4496
|
-
},
|
|
4497
|
-
{
|
|
4498
|
-
types: ["attr-name"],
|
|
4499
|
-
style: { color: "#a6e22e !important" }
|
|
4500
|
-
},
|
|
4501
|
-
{
|
|
4502
|
-
types: ["doctype"],
|
|
4503
|
-
style: { color: "#8292a2" }
|
|
4504
|
-
},
|
|
4505
|
-
{
|
|
4506
|
-
types: ["rule"],
|
|
4507
|
-
style: { color: "#e6db74" }
|
|
4508
|
-
}
|
|
4509
|
-
]
|
|
4510
|
-
};
|
|
4511
|
-
var palenight_default = {
|
|
4512
|
-
plain: {
|
|
4513
|
-
color: "#bfc7d5",
|
|
4514
|
-
backgroundColor: "#292d3e"
|
|
4515
|
-
},
|
|
4516
|
-
styles: [
|
|
4517
|
-
{
|
|
4518
|
-
types: ["comment"],
|
|
4519
|
-
style: {
|
|
4520
|
-
color: "rgb(105, 112, 152)",
|
|
4521
|
-
fontStyle: "italic"
|
|
4522
|
-
}
|
|
4523
|
-
},
|
|
4524
|
-
{
|
|
4525
|
-
types: ["string", "inserted"],
|
|
4526
|
-
style: { color: "rgb(195, 232, 141)" }
|
|
4527
|
-
},
|
|
4528
|
-
{
|
|
4529
|
-
types: ["number"],
|
|
4530
|
-
style: { color: "rgb(247, 140, 108)" }
|
|
4531
|
-
},
|
|
4532
|
-
{
|
|
4533
|
-
types: [
|
|
4534
|
-
"builtin",
|
|
4535
|
-
"char",
|
|
4536
|
-
"constant",
|
|
4537
|
-
"function"
|
|
4538
|
-
],
|
|
4539
|
-
style: { color: "rgb(130, 170, 255)" }
|
|
4540
|
-
},
|
|
4541
|
-
{
|
|
4542
|
-
types: ["punctuation", "selector"],
|
|
4543
|
-
style: { color: "rgb(199, 146, 234)" }
|
|
4544
|
-
},
|
|
4545
|
-
{
|
|
4546
|
-
types: ["variable"],
|
|
4547
|
-
style: { color: "rgb(191, 199, 213)" }
|
|
4548
|
-
},
|
|
4549
|
-
{
|
|
4550
|
-
types: ["class-name", "attr-name"],
|
|
4551
|
-
style: { color: "rgb(255, 203, 107)" }
|
|
4552
|
-
},
|
|
4553
|
-
{
|
|
4554
|
-
types: ["tag", "deleted"],
|
|
4555
|
-
style: { color: "rgb(255, 85, 114)" }
|
|
4556
|
-
},
|
|
4557
|
-
{
|
|
4558
|
-
types: ["operator"],
|
|
4559
|
-
style: { color: "rgb(137, 221, 255)" }
|
|
4560
|
-
},
|
|
4561
|
-
{
|
|
4562
|
-
types: ["boolean"],
|
|
4563
|
-
style: { color: "rgb(255, 88, 116)" }
|
|
4564
|
-
},
|
|
4565
|
-
{
|
|
4566
|
-
types: ["keyword"],
|
|
4567
|
-
style: { fontStyle: "italic" }
|
|
4568
|
-
},
|
|
4569
|
-
{
|
|
4570
|
-
types: ["doctype"],
|
|
4571
|
-
style: {
|
|
4572
|
-
color: "rgb(199, 146, 234)",
|
|
4573
|
-
fontStyle: "italic"
|
|
4574
|
-
}
|
|
4575
|
-
},
|
|
4576
|
-
{
|
|
4577
|
-
types: ["namespace"],
|
|
4578
|
-
style: { color: "rgb(178, 204, 214)" }
|
|
4579
|
-
},
|
|
4580
|
-
{
|
|
4581
|
-
types: ["url"],
|
|
4582
|
-
style: { color: "rgb(221, 221, 221)" }
|
|
4583
|
-
}
|
|
4584
|
-
]
|
|
4585
|
-
};
|
|
4586
|
-
var shadesOfPurple_default = {
|
|
4587
|
-
plain: {
|
|
4588
|
-
color: "#9EFEFF",
|
|
4589
|
-
backgroundColor: "#2D2A55"
|
|
4590
|
-
},
|
|
4591
|
-
styles: [
|
|
4592
|
-
{
|
|
4593
|
-
types: ["changed"],
|
|
4594
|
-
style: { color: "rgb(255, 238, 128)" }
|
|
4595
|
-
},
|
|
4596
|
-
{
|
|
4597
|
-
types: ["deleted"],
|
|
4598
|
-
style: { color: "rgba(239, 83, 80, 0.56)" }
|
|
4599
|
-
},
|
|
4600
|
-
{
|
|
4601
|
-
types: ["inserted"],
|
|
4602
|
-
style: { color: "rgb(173, 219, 103)" }
|
|
4603
|
-
},
|
|
4604
|
-
{
|
|
4605
|
-
types: ["comment"],
|
|
4606
|
-
style: {
|
|
4607
|
-
color: "rgb(179, 98, 255)",
|
|
4608
|
-
fontStyle: "italic"
|
|
4609
|
-
}
|
|
4610
|
-
},
|
|
4611
|
-
{
|
|
4612
|
-
types: ["punctuation"],
|
|
4613
|
-
style: { color: "rgb(255, 255, 255)" }
|
|
4614
|
-
},
|
|
4615
|
-
{
|
|
4616
|
-
types: ["constant"],
|
|
4617
|
-
style: { color: "rgb(255, 98, 140)" }
|
|
4618
|
-
},
|
|
4619
|
-
{
|
|
4620
|
-
types: ["string", "url"],
|
|
4621
|
-
style: { color: "rgb(165, 255, 144)" }
|
|
4622
|
-
},
|
|
4623
|
-
{
|
|
4624
|
-
types: ["variable"],
|
|
4625
|
-
style: { color: "rgb(255, 238, 128)" }
|
|
4626
|
-
},
|
|
4627
|
-
{
|
|
4628
|
-
types: ["number", "boolean"],
|
|
4629
|
-
style: { color: "rgb(255, 98, 140)" }
|
|
4630
|
-
},
|
|
4631
|
-
{
|
|
4632
|
-
types: ["attr-name"],
|
|
4633
|
-
style: { color: "rgb(255, 180, 84)" }
|
|
4634
|
-
},
|
|
4635
|
-
{
|
|
4636
|
-
types: [
|
|
4637
|
-
"keyword",
|
|
4638
|
-
"operator",
|
|
4639
|
-
"property",
|
|
4640
|
-
"namespace",
|
|
4641
|
-
"tag",
|
|
4642
|
-
"selector",
|
|
4643
|
-
"doctype"
|
|
4644
|
-
],
|
|
4645
|
-
style: { color: "rgb(255, 157, 0)" }
|
|
4646
|
-
},
|
|
4647
|
-
{
|
|
4648
|
-
types: [
|
|
4649
|
-
"builtin",
|
|
4650
|
-
"char",
|
|
4651
|
-
"constant",
|
|
4652
|
-
"function",
|
|
4653
|
-
"class-name"
|
|
4654
|
-
],
|
|
4655
|
-
style: { color: "rgb(250, 208, 0)" }
|
|
4656
|
-
}
|
|
4657
|
-
]
|
|
4658
|
-
};
|
|
4659
|
-
var synthwave84_default = {
|
|
4660
|
-
plain: {
|
|
4661
|
-
backgroundColor: "linear-gradient(to bottom, #2a2139 75%, #34294f)",
|
|
4662
|
-
backgroundImage: "#34294f",
|
|
4663
|
-
color: "#f92aad",
|
|
4664
|
-
textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
|
|
4665
|
-
},
|
|
4666
|
-
styles: [
|
|
4667
|
-
{
|
|
4668
|
-
types: [
|
|
4669
|
-
"comment",
|
|
4670
|
-
"block-comment",
|
|
4671
|
-
"prolog",
|
|
4672
|
-
"doctype",
|
|
4673
|
-
"cdata"
|
|
4674
|
-
],
|
|
4675
|
-
style: {
|
|
4676
|
-
color: "#495495",
|
|
4677
|
-
fontStyle: "italic"
|
|
4678
|
-
}
|
|
4679
|
-
},
|
|
4680
|
-
{
|
|
4681
|
-
types: ["punctuation"],
|
|
4682
|
-
style: { color: "#ccc" }
|
|
4683
|
-
},
|
|
4684
|
-
{
|
|
4685
|
-
types: [
|
|
4686
|
-
"tag",
|
|
4687
|
-
"attr-name",
|
|
4688
|
-
"namespace",
|
|
4689
|
-
"number",
|
|
4690
|
-
"unit",
|
|
4691
|
-
"hexcode",
|
|
4692
|
-
"deleted"
|
|
4693
|
-
],
|
|
4694
|
-
style: { color: "#e2777a" }
|
|
4695
|
-
},
|
|
4696
|
-
{
|
|
4697
|
-
types: ["property", "selector"],
|
|
4698
|
-
style: {
|
|
4699
|
-
color: "#72f1b8",
|
|
4700
|
-
textShadow: "0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"
|
|
4701
|
-
}
|
|
4702
|
-
},
|
|
4703
|
-
{
|
|
4704
|
-
types: ["function-name"],
|
|
4705
|
-
style: { color: "#6196cc" }
|
|
4706
|
-
},
|
|
4707
|
-
{
|
|
4708
|
-
types: [
|
|
4709
|
-
"boolean",
|
|
4710
|
-
"selector-id",
|
|
4711
|
-
"function"
|
|
4712
|
-
],
|
|
4713
|
-
style: {
|
|
4714
|
-
color: "#fdfdfd",
|
|
4715
|
-
textShadow: "0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"
|
|
4716
|
-
}
|
|
4717
|
-
},
|
|
4718
|
-
{
|
|
4719
|
-
types: [
|
|
4720
|
-
"class-name",
|
|
4721
|
-
"maybe-class-name",
|
|
4722
|
-
"builtin"
|
|
4723
|
-
],
|
|
4724
|
-
style: {
|
|
4725
|
-
color: "#fff5f6",
|
|
4726
|
-
textShadow: "0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"
|
|
4727
|
-
}
|
|
4728
|
-
},
|
|
4729
|
-
{
|
|
4730
|
-
types: ["constant", "symbol"],
|
|
4731
|
-
style: {
|
|
4732
|
-
color: "#f92aad",
|
|
4733
|
-
textShadow: "0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"
|
|
4734
|
-
}
|
|
4735
|
-
},
|
|
4736
|
-
{
|
|
4737
|
-
types: [
|
|
4738
|
-
"important",
|
|
4739
|
-
"atrule",
|
|
4740
|
-
"keyword",
|
|
4741
|
-
"selector-class"
|
|
4742
|
-
],
|
|
4743
|
-
style: {
|
|
4744
|
-
color: "#f4eee4",
|
|
4745
|
-
textShadow: "0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"
|
|
4746
|
-
}
|
|
4747
|
-
},
|
|
4748
|
-
{
|
|
4749
|
-
types: [
|
|
4750
|
-
"string",
|
|
4751
|
-
"char",
|
|
4752
|
-
"attr-value",
|
|
4753
|
-
"regex",
|
|
4754
|
-
"variable"
|
|
4755
|
-
],
|
|
4756
|
-
style: { color: "#f87c32" }
|
|
4757
|
-
},
|
|
4758
|
-
{
|
|
4759
|
-
types: ["parameter"],
|
|
4760
|
-
style: { fontStyle: "italic" }
|
|
4761
|
-
},
|
|
4762
|
-
{
|
|
4763
|
-
types: ["entity", "url"],
|
|
4764
|
-
style: { color: "#67cdcc" }
|
|
4765
|
-
},
|
|
4766
|
-
{
|
|
4767
|
-
types: ["operator"],
|
|
4768
|
-
style: { color: "ffffffee" }
|
|
4769
|
-
},
|
|
4770
|
-
{
|
|
4771
|
-
types: ["important", "bold"],
|
|
4772
|
-
style: { fontWeight: "bold" }
|
|
4773
|
-
},
|
|
4774
|
-
{
|
|
4775
|
-
types: ["italic"],
|
|
4776
|
-
style: { fontStyle: "italic" }
|
|
4777
|
-
},
|
|
4778
|
-
{
|
|
4779
|
-
types: ["entity"],
|
|
4780
|
-
style: { cursor: "help" }
|
|
4781
|
-
},
|
|
4782
|
-
{
|
|
4783
|
-
types: ["inserted"],
|
|
4784
|
-
style: { color: "green" }
|
|
4785
|
-
}
|
|
4786
|
-
]
|
|
4787
|
-
};
|
|
4788
|
-
var ultramin_default = {
|
|
4789
|
-
plain: {
|
|
4790
|
-
color: "#282a2e",
|
|
4791
|
-
backgroundColor: "#ffffff"
|
|
4792
|
-
},
|
|
4793
|
-
styles: [
|
|
4794
|
-
{
|
|
4795
|
-
types: ["comment"],
|
|
4796
|
-
style: { color: "rgb(197, 200, 198)" }
|
|
4797
|
-
},
|
|
4798
|
-
{
|
|
4799
|
-
types: [
|
|
4800
|
-
"string",
|
|
4801
|
-
"number",
|
|
4802
|
-
"builtin",
|
|
4803
|
-
"variable"
|
|
4804
|
-
],
|
|
4805
|
-
style: { color: "rgb(150, 152, 150)" }
|
|
4806
|
-
},
|
|
4807
|
-
{
|
|
4808
|
-
types: [
|
|
4809
|
-
"class-name",
|
|
4810
|
-
"function",
|
|
4811
|
-
"tag",
|
|
4812
|
-
"attr-name"
|
|
4813
|
-
],
|
|
4814
|
-
style: { color: "rgb(40, 42, 46)" }
|
|
4815
|
-
}
|
|
4816
|
-
]
|
|
4817
|
-
};
|
|
4818
|
-
var vsDark_default = {
|
|
4819
|
-
plain: {
|
|
4820
|
-
color: "#9CDCFE",
|
|
4821
|
-
backgroundColor: "#1E1E1E"
|
|
4822
|
-
},
|
|
4823
|
-
styles: [
|
|
4824
|
-
{
|
|
4825
|
-
types: ["prolog"],
|
|
4826
|
-
style: { color: "rgb(0, 0, 128)" }
|
|
4827
|
-
},
|
|
4828
|
-
{
|
|
4829
|
-
types: ["comment"],
|
|
4830
|
-
style: { color: "rgb(106, 153, 85)" }
|
|
4831
|
-
},
|
|
4832
|
-
{
|
|
4833
|
-
types: [
|
|
4834
|
-
"builtin",
|
|
4835
|
-
"changed",
|
|
4836
|
-
"keyword",
|
|
4837
|
-
"interpolation-punctuation"
|
|
4838
|
-
],
|
|
4839
|
-
style: { color: "rgb(86, 156, 214)" }
|
|
4840
|
-
},
|
|
4841
|
-
{
|
|
4842
|
-
types: ["number", "inserted"],
|
|
4843
|
-
style: { color: "rgb(181, 206, 168)" }
|
|
4844
|
-
},
|
|
4845
|
-
{
|
|
4846
|
-
types: ["constant"],
|
|
4847
|
-
style: { color: "rgb(100, 102, 149)" }
|
|
4848
|
-
},
|
|
4849
|
-
{
|
|
4850
|
-
types: ["attr-name", "variable"],
|
|
4851
|
-
style: { color: "rgb(156, 220, 254)" }
|
|
4852
|
-
},
|
|
4853
|
-
{
|
|
4854
|
-
types: [
|
|
4855
|
-
"deleted",
|
|
4856
|
-
"string",
|
|
4857
|
-
"attr-value",
|
|
4858
|
-
"template-punctuation"
|
|
4859
|
-
],
|
|
4860
|
-
style: { color: "rgb(206, 145, 120)" }
|
|
4861
|
-
},
|
|
4862
|
-
{
|
|
4863
|
-
types: ["selector"],
|
|
4864
|
-
style: { color: "rgb(215, 186, 125)" }
|
|
4865
|
-
},
|
|
4866
|
-
{
|
|
4867
|
-
types: ["tag"],
|
|
4868
|
-
style: { color: "rgb(78, 201, 176)" }
|
|
4869
|
-
},
|
|
4870
|
-
{
|
|
4871
|
-
types: ["tag"],
|
|
4872
|
-
languages: ["markup"],
|
|
4873
|
-
style: { color: "rgb(86, 156, 214)" }
|
|
4874
|
-
},
|
|
4875
|
-
{
|
|
4876
|
-
types: ["punctuation", "operator"],
|
|
4877
|
-
style: { color: "rgb(212, 212, 212)" }
|
|
4878
|
-
},
|
|
4879
|
-
{
|
|
4880
|
-
types: ["punctuation"],
|
|
4881
|
-
languages: ["markup"],
|
|
4882
|
-
style: { color: "#808080" }
|
|
4883
|
-
},
|
|
4884
|
-
{
|
|
4885
|
-
types: ["function"],
|
|
4886
|
-
style: { color: "rgb(220, 220, 170)" }
|
|
4887
|
-
},
|
|
4888
|
-
{
|
|
4889
|
-
types: ["class-name"],
|
|
4890
|
-
style: { color: "rgb(78, 201, 176)" }
|
|
4891
|
-
},
|
|
4892
|
-
{
|
|
4893
|
-
types: ["char"],
|
|
4894
|
-
style: { color: "rgb(209, 105, 105)" }
|
|
4895
|
-
}
|
|
4896
|
-
]
|
|
4897
|
-
};
|
|
4898
|
-
var vsLight_default = {
|
|
4899
|
-
plain: {
|
|
4900
|
-
color: "#000000",
|
|
4901
|
-
backgroundColor: "#ffffff"
|
|
4902
|
-
},
|
|
4903
|
-
styles: [
|
|
4904
|
-
{
|
|
4905
|
-
types: ["comment"],
|
|
4906
|
-
style: { color: "rgb(0, 128, 0)" }
|
|
4907
|
-
},
|
|
4908
|
-
{
|
|
4909
|
-
types: ["builtin"],
|
|
4910
|
-
style: { color: "rgb(0, 112, 193)" }
|
|
4911
|
-
},
|
|
4912
|
-
{
|
|
4913
|
-
types: [
|
|
4914
|
-
"number",
|
|
4915
|
-
"variable",
|
|
4916
|
-
"inserted"
|
|
4917
|
-
],
|
|
4918
|
-
style: { color: "rgb(9, 134, 88)" }
|
|
4919
|
-
},
|
|
4920
|
-
{
|
|
4921
|
-
types: ["operator"],
|
|
4922
|
-
style: { color: "rgb(0, 0, 0)" }
|
|
4923
|
-
},
|
|
4924
|
-
{
|
|
4925
|
-
types: ["constant", "char"],
|
|
4926
|
-
style: { color: "rgb(129, 31, 63)" }
|
|
4927
|
-
},
|
|
4928
|
-
{
|
|
4929
|
-
types: ["tag"],
|
|
4930
|
-
style: { color: "rgb(128, 0, 0)" }
|
|
4931
|
-
},
|
|
4932
|
-
{
|
|
4933
|
-
types: ["attr-name"],
|
|
4934
|
-
style: { color: "rgb(255, 0, 0)" }
|
|
4935
|
-
},
|
|
4936
|
-
{
|
|
4937
|
-
types: ["deleted", "string"],
|
|
4938
|
-
style: { color: "rgb(163, 21, 21)" }
|
|
4939
|
-
},
|
|
4940
|
-
{
|
|
4941
|
-
types: ["changed", "punctuation"],
|
|
4942
|
-
style: { color: "rgb(4, 81, 165)" }
|
|
4943
|
-
},
|
|
4944
|
-
{
|
|
4945
|
-
types: ["function", "keyword"],
|
|
4946
|
-
style: { color: "rgb(0, 0, 255)" }
|
|
4947
|
-
},
|
|
4948
|
-
{
|
|
4949
|
-
types: ["class-name"],
|
|
4950
|
-
style: { color: "rgb(38, 127, 153)" }
|
|
4951
|
-
}
|
|
4952
|
-
]
|
|
4953
|
-
};
|
|
4954
|
-
var jettwaveDark_default = {
|
|
4955
|
-
plain: {
|
|
4956
|
-
color: "#f8fafc",
|
|
4957
|
-
backgroundColor: "#011627"
|
|
4958
|
-
},
|
|
4959
|
-
styles: [
|
|
4960
|
-
{
|
|
4961
|
-
types: ["prolog"],
|
|
4962
|
-
style: { color: "#000080" }
|
|
4963
|
-
},
|
|
4964
|
-
{
|
|
4965
|
-
types: ["comment"],
|
|
4966
|
-
style: { color: "#6A9955" }
|
|
4967
|
-
},
|
|
4968
|
-
{
|
|
4969
|
-
types: [
|
|
4970
|
-
"builtin",
|
|
4971
|
-
"changed",
|
|
4972
|
-
"keyword",
|
|
4973
|
-
"interpolation-punctuation"
|
|
4974
|
-
],
|
|
4975
|
-
style: { color: "#569CD6" }
|
|
4976
|
-
},
|
|
4977
|
-
{
|
|
4978
|
-
types: ["number", "inserted"],
|
|
4979
|
-
style: { color: "#B5CEA8" }
|
|
4980
|
-
},
|
|
4981
|
-
{
|
|
4982
|
-
types: ["constant"],
|
|
4983
|
-
style: { color: "#f8fafc" }
|
|
4984
|
-
},
|
|
4985
|
-
{
|
|
4986
|
-
types: ["attr-name", "variable"],
|
|
4987
|
-
style: { color: "#9CDCFE" }
|
|
4988
|
-
},
|
|
4989
|
-
{
|
|
4990
|
-
types: [
|
|
4991
|
-
"deleted",
|
|
4992
|
-
"string",
|
|
4993
|
-
"attr-value",
|
|
4994
|
-
"template-punctuation"
|
|
4995
|
-
],
|
|
4996
|
-
style: { color: "#cbd5e1" }
|
|
4997
|
-
},
|
|
4998
|
-
{
|
|
4999
|
-
types: ["selector"],
|
|
5000
|
-
style: { color: "#D7BA7D" }
|
|
5001
|
-
},
|
|
5002
|
-
{
|
|
5003
|
-
types: ["tag"],
|
|
5004
|
-
style: { color: "#0ea5e9" }
|
|
5005
|
-
},
|
|
5006
|
-
{
|
|
5007
|
-
types: ["tag"],
|
|
5008
|
-
languages: ["markup"],
|
|
5009
|
-
style: { color: "#0ea5e9" }
|
|
5010
|
-
},
|
|
5011
|
-
{
|
|
5012
|
-
types: ["punctuation", "operator"],
|
|
5013
|
-
style: { color: "#D4D4D4" }
|
|
5014
|
-
},
|
|
5015
|
-
{
|
|
5016
|
-
types: ["punctuation"],
|
|
5017
|
-
languages: ["markup"],
|
|
5018
|
-
style: { color: "#808080" }
|
|
5019
|
-
},
|
|
5020
|
-
{
|
|
5021
|
-
types: ["function"],
|
|
5022
|
-
style: { color: "#7dd3fc" }
|
|
5023
|
-
},
|
|
5024
|
-
{
|
|
5025
|
-
types: ["class-name"],
|
|
5026
|
-
style: { color: "#0ea5e9" }
|
|
5027
|
-
},
|
|
5028
|
-
{
|
|
5029
|
-
types: ["char"],
|
|
5030
|
-
style: { color: "#D16969" }
|
|
5031
|
-
}
|
|
5032
|
-
]
|
|
5033
|
-
};
|
|
5034
|
-
var jettwaveLight_default = {
|
|
5035
|
-
plain: {
|
|
5036
|
-
color: "#0f172a",
|
|
5037
|
-
backgroundColor: "#f1f5f9"
|
|
5038
|
-
},
|
|
5039
|
-
styles: [
|
|
5040
|
-
{
|
|
5041
|
-
types: ["prolog"],
|
|
5042
|
-
style: { color: "#000080" }
|
|
5043
|
-
},
|
|
5044
|
-
{
|
|
5045
|
-
types: ["comment"],
|
|
5046
|
-
style: { color: "#6A9955" }
|
|
5047
|
-
},
|
|
5048
|
-
{
|
|
5049
|
-
types: [
|
|
5050
|
-
"builtin",
|
|
5051
|
-
"changed",
|
|
5052
|
-
"keyword",
|
|
5053
|
-
"interpolation-punctuation"
|
|
5054
|
-
],
|
|
5055
|
-
style: { color: "#0c4a6e" }
|
|
5056
|
-
},
|
|
5057
|
-
{
|
|
5058
|
-
types: ["number", "inserted"],
|
|
5059
|
-
style: { color: "#B5CEA8" }
|
|
5060
|
-
},
|
|
5061
|
-
{
|
|
5062
|
-
types: ["constant"],
|
|
5063
|
-
style: { color: "#0f172a" }
|
|
5064
|
-
},
|
|
5065
|
-
{
|
|
5066
|
-
types: ["attr-name", "variable"],
|
|
5067
|
-
style: { color: "#0c4a6e" }
|
|
5068
|
-
},
|
|
5069
|
-
{
|
|
5070
|
-
types: [
|
|
5071
|
-
"deleted",
|
|
5072
|
-
"string",
|
|
5073
|
-
"attr-value",
|
|
5074
|
-
"template-punctuation"
|
|
5075
|
-
],
|
|
5076
|
-
style: { color: "#64748b" }
|
|
5077
|
-
},
|
|
5078
|
-
{
|
|
5079
|
-
types: ["selector"],
|
|
5080
|
-
style: { color: "#D7BA7D" }
|
|
5081
|
-
},
|
|
5082
|
-
{
|
|
5083
|
-
types: ["tag"],
|
|
5084
|
-
style: { color: "#0ea5e9" }
|
|
5085
|
-
},
|
|
5086
|
-
{
|
|
5087
|
-
types: ["tag"],
|
|
5088
|
-
languages: ["markup"],
|
|
5089
|
-
style: { color: "#0ea5e9" }
|
|
5090
|
-
},
|
|
5091
|
-
{
|
|
5092
|
-
types: ["punctuation", "operator"],
|
|
5093
|
-
style: { color: "#475569" }
|
|
5094
|
-
},
|
|
5095
|
-
{
|
|
5096
|
-
types: ["punctuation"],
|
|
5097
|
-
languages: ["markup"],
|
|
5098
|
-
style: { color: "#808080" }
|
|
5099
|
-
},
|
|
5100
|
-
{
|
|
5101
|
-
types: ["function"],
|
|
5102
|
-
style: { color: "#0e7490" }
|
|
5103
|
-
},
|
|
5104
|
-
{
|
|
5105
|
-
types: ["class-name"],
|
|
5106
|
-
style: { color: "#0ea5e9" }
|
|
5107
|
-
},
|
|
5108
|
-
{
|
|
5109
|
-
types: ["char"],
|
|
5110
|
-
style: { color: "#D16969" }
|
|
5111
|
-
}
|
|
5112
|
-
]
|
|
5113
|
-
};
|
|
5114
|
-
var oneDark_default = {
|
|
5115
|
-
plain: {
|
|
5116
|
-
backgroundColor: "hsl(220, 13%, 18%)",
|
|
5117
|
-
color: "hsl(220, 14%, 71%)",
|
|
5118
|
-
textShadow: "0 1px rgba(0, 0, 0, 0.3)"
|
|
5119
|
-
},
|
|
5120
|
-
styles: [
|
|
5121
|
-
{
|
|
5122
|
-
types: [
|
|
5123
|
-
"comment",
|
|
5124
|
-
"prolog",
|
|
5125
|
-
"cdata"
|
|
5126
|
-
],
|
|
5127
|
-
style: { color: "hsl(220, 10%, 40%)" }
|
|
5128
|
-
},
|
|
5129
|
-
{
|
|
5130
|
-
types: [
|
|
5131
|
-
"doctype",
|
|
5132
|
-
"punctuation",
|
|
5133
|
-
"entity"
|
|
5134
|
-
],
|
|
5135
|
-
style: { color: "hsl(220, 14%, 71%)" }
|
|
5136
|
-
},
|
|
5137
|
-
{
|
|
5138
|
-
types: [
|
|
5139
|
-
"attr-name",
|
|
5140
|
-
"class-name",
|
|
5141
|
-
"maybe-class-name",
|
|
5142
|
-
"boolean",
|
|
5143
|
-
"constant",
|
|
5144
|
-
"number",
|
|
5145
|
-
"atrule"
|
|
5146
|
-
],
|
|
5147
|
-
style: { color: "hsl(29, 54%, 61%)" }
|
|
5148
|
-
},
|
|
5149
|
-
{
|
|
5150
|
-
types: ["keyword"],
|
|
5151
|
-
style: { color: "hsl(286, 60%, 67%)" }
|
|
5152
|
-
},
|
|
5153
|
-
{
|
|
5154
|
-
types: [
|
|
5155
|
-
"property",
|
|
5156
|
-
"tag",
|
|
5157
|
-
"symbol",
|
|
5158
|
-
"deleted",
|
|
5159
|
-
"important"
|
|
5160
|
-
],
|
|
5161
|
-
style: { color: "hsl(355, 65%, 65%)" }
|
|
5162
|
-
},
|
|
5163
|
-
{
|
|
5164
|
-
types: [
|
|
5165
|
-
"selector",
|
|
5166
|
-
"string",
|
|
5167
|
-
"char",
|
|
5168
|
-
"builtin",
|
|
5169
|
-
"inserted",
|
|
5170
|
-
"regex",
|
|
5171
|
-
"attr-value"
|
|
5172
|
-
],
|
|
5173
|
-
style: { color: "hsl(95, 38%, 62%)" }
|
|
5174
|
-
},
|
|
5175
|
-
{
|
|
5176
|
-
types: [
|
|
5177
|
-
"variable",
|
|
5178
|
-
"operator",
|
|
5179
|
-
"function"
|
|
5180
|
-
],
|
|
5181
|
-
style: { color: "hsl(207, 82%, 66%)" }
|
|
5182
|
-
},
|
|
5183
|
-
{
|
|
5184
|
-
types: ["url"],
|
|
5185
|
-
style: { color: "hsl(187, 47%, 55%)" }
|
|
5186
|
-
},
|
|
5187
|
-
{
|
|
5188
|
-
types: ["deleted"],
|
|
5189
|
-
style: { textDecorationLine: "line-through" }
|
|
5190
|
-
},
|
|
5191
|
-
{
|
|
5192
|
-
types: ["inserted"],
|
|
5193
|
-
style: { textDecorationLine: "underline" }
|
|
5194
|
-
},
|
|
5195
|
-
{
|
|
5196
|
-
types: ["italic"],
|
|
5197
|
-
style: { fontStyle: "italic" }
|
|
5198
|
-
},
|
|
5199
|
-
{
|
|
5200
|
-
types: ["important", "bold"],
|
|
5201
|
-
style: { fontWeight: "bold" }
|
|
5202
|
-
},
|
|
5203
|
-
{
|
|
5204
|
-
types: ["important"],
|
|
5205
|
-
style: { color: "hsl(220, 14%, 71%)" }
|
|
5206
|
-
}
|
|
5207
|
-
]
|
|
5208
|
-
};
|
|
5209
|
-
var oneLight_default = {
|
|
5210
|
-
plain: {
|
|
5211
|
-
backgroundColor: "hsl(230, 1%, 98%)",
|
|
5212
|
-
color: "hsl(230, 8%, 24%)"
|
|
5213
|
-
},
|
|
5214
|
-
styles: [
|
|
5215
|
-
{
|
|
5216
|
-
types: [
|
|
5217
|
-
"comment",
|
|
5218
|
-
"prolog",
|
|
5219
|
-
"cdata"
|
|
5220
|
-
],
|
|
5221
|
-
style: { color: "hsl(230, 4%, 64%)" }
|
|
5222
|
-
},
|
|
5223
|
-
{
|
|
5224
|
-
types: [
|
|
5225
|
-
"doctype",
|
|
5226
|
-
"punctuation",
|
|
5227
|
-
"entity"
|
|
5228
|
-
],
|
|
5229
|
-
style: { color: "hsl(230, 8%, 24%)" }
|
|
5230
|
-
},
|
|
5231
|
-
{
|
|
5232
|
-
types: [
|
|
5233
|
-
"attr-name",
|
|
5234
|
-
"class-name",
|
|
5235
|
-
"boolean",
|
|
5236
|
-
"constant",
|
|
5237
|
-
"number",
|
|
5238
|
-
"atrule"
|
|
5239
|
-
],
|
|
5240
|
-
style: { color: "hsl(35, 99%, 36%)" }
|
|
5241
|
-
},
|
|
5242
|
-
{
|
|
5243
|
-
types: ["keyword"],
|
|
5244
|
-
style: { color: "hsl(301, 63%, 40%)" }
|
|
5245
|
-
},
|
|
5246
|
-
{
|
|
5247
|
-
types: [
|
|
5248
|
-
"property",
|
|
5249
|
-
"tag",
|
|
5250
|
-
"symbol",
|
|
5251
|
-
"deleted",
|
|
5252
|
-
"important"
|
|
5253
|
-
],
|
|
5254
|
-
style: { color: "hsl(5, 74%, 59%)" }
|
|
5255
|
-
},
|
|
5256
|
-
{
|
|
5257
|
-
types: [
|
|
5258
|
-
"selector",
|
|
5259
|
-
"string",
|
|
5260
|
-
"char",
|
|
5261
|
-
"builtin",
|
|
5262
|
-
"inserted",
|
|
5263
|
-
"regex",
|
|
5264
|
-
"attr-value",
|
|
5265
|
-
"punctuation"
|
|
5266
|
-
],
|
|
5267
|
-
style: { color: "hsl(119, 34%, 47%)" }
|
|
5268
|
-
},
|
|
5269
|
-
{
|
|
5270
|
-
types: [
|
|
5271
|
-
"variable",
|
|
5272
|
-
"operator",
|
|
5273
|
-
"function"
|
|
5274
|
-
],
|
|
5275
|
-
style: { color: "hsl(221, 87%, 60%)" }
|
|
5276
|
-
},
|
|
5277
|
-
{
|
|
5278
|
-
types: ["url"],
|
|
5279
|
-
style: { color: "hsl(198, 99%, 37%)" }
|
|
5280
|
-
},
|
|
5281
|
-
{
|
|
5282
|
-
types: ["deleted"],
|
|
5283
|
-
style: { textDecorationLine: "line-through" }
|
|
5284
|
-
},
|
|
5285
|
-
{
|
|
5286
|
-
types: ["inserted"],
|
|
5287
|
-
style: { textDecorationLine: "underline" }
|
|
5288
|
-
},
|
|
5289
|
-
{
|
|
5290
|
-
types: ["italic"],
|
|
5291
|
-
style: { fontStyle: "italic" }
|
|
5292
|
-
},
|
|
5293
|
-
{
|
|
5294
|
-
types: ["important", "bold"],
|
|
5295
|
-
style: { fontWeight: "bold" }
|
|
5296
|
-
},
|
|
5297
|
-
{
|
|
5298
|
-
types: ["important"],
|
|
5299
|
-
style: { color: "hsl(230, 8%, 24%)" }
|
|
5300
|
-
}
|
|
5301
|
-
]
|
|
5302
|
-
};
|
|
5303
|
-
var gruvboxMaterialDark_default = {
|
|
5304
|
-
plain: {
|
|
5305
|
-
color: "#ebdbb2",
|
|
5306
|
-
backgroundColor: "#292828"
|
|
5307
|
-
},
|
|
5308
|
-
styles: [
|
|
5309
|
-
{
|
|
5310
|
-
types: [
|
|
5311
|
-
"imports",
|
|
5312
|
-
"class-name",
|
|
5313
|
-
"maybe-class-name",
|
|
5314
|
-
"constant",
|
|
5315
|
-
"doctype",
|
|
5316
|
-
"builtin",
|
|
5317
|
-
"function"
|
|
5318
|
-
],
|
|
5319
|
-
style: { color: "#d8a657" }
|
|
5320
|
-
},
|
|
5321
|
-
{
|
|
5322
|
-
types: ["property-access"],
|
|
5323
|
-
style: { color: "#7daea3" }
|
|
5324
|
-
},
|
|
5325
|
-
{
|
|
5326
|
-
types: ["tag"],
|
|
5327
|
-
style: { color: "#e78a4e" }
|
|
5328
|
-
},
|
|
5329
|
-
{
|
|
5330
|
-
types: [
|
|
5331
|
-
"attr-name",
|
|
5332
|
-
"char",
|
|
5333
|
-
"url",
|
|
5334
|
-
"regex"
|
|
5335
|
-
],
|
|
5336
|
-
style: { color: "#a9b665" }
|
|
5337
|
-
},
|
|
5338
|
-
{
|
|
5339
|
-
types: ["attr-value", "string"],
|
|
5340
|
-
style: { color: "#89b482" }
|
|
5341
|
-
},
|
|
5342
|
-
{
|
|
5343
|
-
types: [
|
|
5344
|
-
"comment",
|
|
5345
|
-
"prolog",
|
|
5346
|
-
"cdata",
|
|
5347
|
-
"operator",
|
|
5348
|
-
"inserted"
|
|
5349
|
-
],
|
|
5350
|
-
style: { color: "#a89984" }
|
|
5351
|
-
},
|
|
5352
|
-
{
|
|
5353
|
-
types: [
|
|
5354
|
-
"delimiter",
|
|
5355
|
-
"boolean",
|
|
5356
|
-
"keyword",
|
|
5357
|
-
"selector",
|
|
5358
|
-
"important",
|
|
5359
|
-
"atrule",
|
|
5360
|
-
"property",
|
|
5361
|
-
"variable",
|
|
5362
|
-
"deleted"
|
|
5363
|
-
],
|
|
5364
|
-
style: { color: "#ea6962" }
|
|
5365
|
-
},
|
|
5366
|
-
{
|
|
5367
|
-
types: [
|
|
5368
|
-
"entity",
|
|
5369
|
-
"number",
|
|
5370
|
-
"symbol"
|
|
5371
|
-
],
|
|
5372
|
-
style: { color: "#d3869b" }
|
|
5373
|
-
}
|
|
5374
|
-
]
|
|
5375
|
-
};
|
|
5376
|
-
var gruvboxMaterialLight_default = {
|
|
5377
|
-
plain: {
|
|
5378
|
-
color: "#654735",
|
|
5379
|
-
backgroundColor: "#f9f5d7"
|
|
5380
|
-
},
|
|
5381
|
-
styles: [
|
|
5382
|
-
{
|
|
5383
|
-
types: [
|
|
5384
|
-
"delimiter",
|
|
5385
|
-
"boolean",
|
|
5386
|
-
"keyword",
|
|
5387
|
-
"selector",
|
|
5388
|
-
"important",
|
|
5389
|
-
"atrule",
|
|
5390
|
-
"property",
|
|
5391
|
-
"variable",
|
|
5392
|
-
"deleted"
|
|
5393
|
-
],
|
|
5394
|
-
style: { color: "#af2528" }
|
|
5395
|
-
},
|
|
5396
|
-
{
|
|
5397
|
-
types: [
|
|
5398
|
-
"imports",
|
|
5399
|
-
"class-name",
|
|
5400
|
-
"maybe-class-name",
|
|
5401
|
-
"constant",
|
|
5402
|
-
"doctype",
|
|
5403
|
-
"builtin"
|
|
5404
|
-
],
|
|
5405
|
-
style: { color: "#b4730e" }
|
|
5406
|
-
},
|
|
5407
|
-
{
|
|
5408
|
-
types: ["string", "attr-value"],
|
|
5409
|
-
style: { color: "#477a5b" }
|
|
5410
|
-
},
|
|
5411
|
-
{
|
|
5412
|
-
types: ["property-access"],
|
|
5413
|
-
style: { color: "#266b79" }
|
|
5414
|
-
},
|
|
5415
|
-
{
|
|
5416
|
-
types: [
|
|
5417
|
-
"function",
|
|
5418
|
-
"attr-name",
|
|
5419
|
-
"char",
|
|
5420
|
-
"url"
|
|
5421
|
-
],
|
|
5422
|
-
style: { color: "#72761e" }
|
|
5423
|
-
},
|
|
5424
|
-
{
|
|
5425
|
-
types: ["tag"],
|
|
5426
|
-
style: { color: "#b94c07" }
|
|
5427
|
-
},
|
|
5428
|
-
{
|
|
5429
|
-
types: [
|
|
5430
|
-
"comment",
|
|
5431
|
-
"prolog",
|
|
5432
|
-
"cdata",
|
|
5433
|
-
"operator",
|
|
5434
|
-
"inserted"
|
|
5435
|
-
],
|
|
5436
|
-
style: { color: "#a89984" }
|
|
5437
|
-
},
|
|
5438
|
-
{
|
|
5439
|
-
types: [
|
|
5440
|
-
"entity",
|
|
5441
|
-
"number",
|
|
5442
|
-
"symbol"
|
|
5443
|
-
],
|
|
5444
|
-
style: { color: "#924f79" }
|
|
5445
|
-
}
|
|
5446
|
-
]
|
|
5447
|
-
};
|
|
5448
|
-
var useGetLineProps = (themeDictionary) => (0, react.useCallback)((_a) => {
|
|
5449
|
-
var _b = _a, { className, style, line } = _b;
|
|
5450
|
-
const output = __spreadProps(__spreadValues({}, __objRest(_b, [
|
|
5451
|
-
"className",
|
|
5452
|
-
"style",
|
|
5453
|
-
"line"
|
|
5454
|
-
])), { className: clsx("token-line", className) });
|
|
5455
|
-
if (typeof themeDictionary === "object" && "plain" in themeDictionary) output.style = themeDictionary.plain;
|
|
5456
|
-
if (typeof style === "object") output.style = __spreadValues(__spreadValues({}, output.style || {}), style);
|
|
5457
|
-
return output;
|
|
5458
|
-
}, [themeDictionary]);
|
|
5459
|
-
var useGetTokenProps = (themeDictionary) => {
|
|
5460
|
-
const styleForToken = (0, react.useCallback)(({ types, empty }) => {
|
|
5461
|
-
if (themeDictionary == null) return void 0;
|
|
5462
|
-
else if (types.length === 1 && types[0] === "plain") return empty != null ? { display: "inline-block" } : void 0;
|
|
5463
|
-
else if (types.length === 1 && empty != null) return themeDictionary[types[0]];
|
|
5464
|
-
return Object.assign(empty != null ? { display: "inline-block" } : {}, ...types.map((type) => themeDictionary[type]));
|
|
5465
|
-
}, [themeDictionary]);
|
|
5466
|
-
return (0, react.useCallback)((_a) => {
|
|
5467
|
-
var _b = _a, { token, className, style } = _b;
|
|
5468
|
-
const output = __spreadProps(__spreadValues({}, __objRest(_b, [
|
|
5469
|
-
"token",
|
|
5470
|
-
"className",
|
|
5471
|
-
"style"
|
|
5472
|
-
])), {
|
|
5473
|
-
className: clsx("token", ...token.types, className),
|
|
5474
|
-
children: token.content,
|
|
5475
|
-
style: styleForToken(token)
|
|
5476
|
-
});
|
|
5477
|
-
if (style != null) output.style = __spreadValues(__spreadValues({}, output.style || {}), style);
|
|
5478
|
-
return output;
|
|
5479
|
-
}, [styleForToken]);
|
|
5480
|
-
};
|
|
5481
|
-
var newlineRe = /\r\n|\r|\n/;
|
|
5482
|
-
var normalizeEmptyLines = (line) => {
|
|
5483
|
-
if (line.length === 0) line.push({
|
|
5484
|
-
types: ["plain"],
|
|
5485
|
-
content: "\n",
|
|
5486
|
-
empty: true
|
|
1184
|
+
"aria-label": "Next month",
|
|
1185
|
+
disabled: isNextMonthDisabled,
|
|
1186
|
+
onClick: () => {
|
|
1187
|
+
setDisplayMonth((current) => clampToYearRange(addMonths(current, 1)));
|
|
1188
|
+
},
|
|
1189
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
1190
|
+
name: "square-caret-right",
|
|
1191
|
+
"aria-hidden": true
|
|
1192
|
+
})
|
|
1193
|
+
})
|
|
1194
|
+
]
|
|
1195
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1196
|
+
className: "pf-calendar__grid",
|
|
1197
|
+
role: "grid",
|
|
1198
|
+
"aria-label": monthLabel,
|
|
1199
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1200
|
+
role: "row",
|
|
1201
|
+
style: { display: "contents" },
|
|
1202
|
+
"aria-hidden": true,
|
|
1203
|
+
children: WEEKDAY_LABELS.map((day) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1204
|
+
role: "columnheader",
|
|
1205
|
+
className: "pf-calendar__weekday",
|
|
1206
|
+
children: day
|
|
1207
|
+
}, day))
|
|
1208
|
+
}), Array.from({ length: 6 }, (_, week) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1209
|
+
role: "row",
|
|
1210
|
+
style: { display: "contents" },
|
|
1211
|
+
children: dayItems.slice(week * 7, (week + 1) * 7).map(({ date, inCurrentMonth }) => {
|
|
1212
|
+
const isSelected = selectedDate ? isSameDay(selectedDate, date) : false;
|
|
1213
|
+
const isToday = isSameDay(today, date);
|
|
1214
|
+
const isDisabled = Boolean(disabledDates?.(date));
|
|
1215
|
+
if (!showOutsideDays && !inCurrentMonth) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1216
|
+
className: "pf-calendar__day-empty",
|
|
1217
|
+
"aria-hidden": true
|
|
1218
|
+
}, date.toISOString());
|
|
1219
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1220
|
+
type: "button",
|
|
1221
|
+
role: "gridcell",
|
|
1222
|
+
className: cx("pf-calendar__day", !inCurrentMonth && "pf-calendar__day--outside", isToday && "pf-calendar__day--today", isSelected && "pf-calendar__day--selected"),
|
|
1223
|
+
"aria-label": new Intl.DateTimeFormat("en-US", {
|
|
1224
|
+
month: "long",
|
|
1225
|
+
day: "numeric",
|
|
1226
|
+
year: "numeric"
|
|
1227
|
+
}).format(date),
|
|
1228
|
+
"aria-selected": isSelected,
|
|
1229
|
+
"aria-current": isToday ? "date" : void 0,
|
|
1230
|
+
disabled: isDisabled,
|
|
1231
|
+
onClick: () => {
|
|
1232
|
+
selectDate(date);
|
|
1233
|
+
},
|
|
1234
|
+
children: date.getDate()
|
|
1235
|
+
}, date.toISOString());
|
|
1236
|
+
})
|
|
1237
|
+
}, week))]
|
|
1238
|
+
})]
|
|
1239
|
+
}),
|
|
1240
|
+
description ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1241
|
+
className: "pf-field__description",
|
|
1242
|
+
id: descriptionId,
|
|
1243
|
+
children: description
|
|
1244
|
+
}) : null,
|
|
1245
|
+
error ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1246
|
+
className: "pf-field__error",
|
|
1247
|
+
id: errorId,
|
|
1248
|
+
children: error
|
|
1249
|
+
}) : null
|
|
1250
|
+
]
|
|
5487
1251
|
});
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
const typesSize = types.length;
|
|
5495
|
-
if (typesSize > 0 && types[typesSize - 1] === add) return types;
|
|
5496
|
-
return types.concat(add);
|
|
1252
|
+
});
|
|
1253
|
+
Calendar.displayName = "Calendar";
|
|
1254
|
+
//#endregion
|
|
1255
|
+
//#region src/components/Carousel/Carousel.tsx
|
|
1256
|
+
var clamp$2 = (value, min, max) => {
|
|
1257
|
+
return Math.min(Math.max(value, min), max);
|
|
5497
1258
|
};
|
|
5498
|
-
var
|
|
5499
|
-
const
|
|
5500
|
-
const
|
|
5501
|
-
const
|
|
5502
|
-
const
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
} else {
|
|
5516
|
-
types = appendTypes(types, token.type);
|
|
5517
|
-
if (token.alias) types = appendTypes(types, token.alias);
|
|
5518
|
-
content = token.content;
|
|
5519
|
-
}
|
|
5520
|
-
if (typeof content !== "string") {
|
|
5521
|
-
stackIndex++;
|
|
5522
|
-
typeArrStack.push(types);
|
|
5523
|
-
tokenArrStack.push(content);
|
|
5524
|
-
tokenArrIndexStack.push(0);
|
|
5525
|
-
tokenArrSizeStack.push(content.length);
|
|
5526
|
-
continue;
|
|
5527
|
-
}
|
|
5528
|
-
const splitByNewlines = content.split(newlineRe);
|
|
5529
|
-
const newlineCount = splitByNewlines.length;
|
|
5530
|
-
currentLine.push({
|
|
5531
|
-
types,
|
|
5532
|
-
content: splitByNewlines[0]
|
|
1259
|
+
var Carousel = (0, react.forwardRef)(function Carousel({ className, slides, initialIndex = 0, loop = true, showIndicators = true, autoPlay = false, autoPlayInterval = 5e3, onIndexChange, "aria-label": ariaLabel = "Carousel", ...props }, ref) {
|
|
1260
|
+
const totalSlides = slides.length;
|
|
1261
|
+
const [activeIndex, setActiveIndex] = (0, react.useState)(clamp$2(initialIndex, 0, Math.max(totalSlides - 1, 0)));
|
|
1262
|
+
const resolvedActiveIndex = clamp$2(activeIndex, 0, Math.max(totalSlides - 1, 0));
|
|
1263
|
+
const goToIndex = (nextIndex) => {
|
|
1264
|
+
if (totalSlides === 0) return;
|
|
1265
|
+
const resolvedIndex = loop ? (nextIndex % totalSlides + totalSlides) % totalSlides : clamp$2(nextIndex, 0, totalSlides - 1);
|
|
1266
|
+
setActiveIndex(resolvedIndex);
|
|
1267
|
+
onIndexChange?.(resolvedIndex);
|
|
1268
|
+
};
|
|
1269
|
+
(0, react.useEffect)(() => {
|
|
1270
|
+
if (!autoPlay || totalSlides < 2) return;
|
|
1271
|
+
const interval = window.setInterval(() => {
|
|
1272
|
+
setActiveIndex((current) => {
|
|
1273
|
+
const next = loop ? (current + 1) % totalSlides : Math.min(current + 1, totalSlides - 1);
|
|
1274
|
+
onIndexChange?.(next);
|
|
1275
|
+
return next;
|
|
5533
1276
|
});
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
currentLine.push({
|
|
5538
|
-
types,
|
|
5539
|
-
content: splitByNewlines[i2]
|
|
5540
|
-
});
|
|
5541
|
-
}
|
|
5542
|
-
}
|
|
5543
|
-
stackIndex--;
|
|
5544
|
-
typeArrStack.pop();
|
|
5545
|
-
tokenArrStack.pop();
|
|
5546
|
-
tokenArrIndexStack.pop();
|
|
5547
|
-
tokenArrSizeStack.pop();
|
|
5548
|
-
}
|
|
5549
|
-
normalizeEmptyLines(currentLine);
|
|
5550
|
-
return acc;
|
|
5551
|
-
};
|
|
5552
|
-
var normalizeTokens_default = normalizeTokens;
|
|
5553
|
-
var useTokenize = ({ prism, code, grammar, language }) => {
|
|
5554
|
-
return (0, react.useMemo)(() => {
|
|
5555
|
-
if (grammar == null) return normalizeTokens_default([code]);
|
|
5556
|
-
const prismConfig = {
|
|
5557
|
-
code,
|
|
5558
|
-
grammar,
|
|
5559
|
-
language,
|
|
5560
|
-
tokens: []
|
|
1277
|
+
}, autoPlayInterval);
|
|
1278
|
+
return () => {
|
|
1279
|
+
window.clearInterval(interval);
|
|
5561
1280
|
};
|
|
5562
|
-
prism.hooks.run("before-tokenize", prismConfig);
|
|
5563
|
-
prismConfig.tokens = prism.tokenize(code, grammar);
|
|
5564
|
-
prism.hooks.run("after-tokenize", prismConfig);
|
|
5565
|
-
return normalizeTokens_default(prismConfig.tokens);
|
|
5566
1281
|
}, [
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
1282
|
+
autoPlay,
|
|
1283
|
+
autoPlayInterval,
|
|
1284
|
+
loop,
|
|
1285
|
+
onIndexChange,
|
|
1286
|
+
totalSlides
|
|
5571
1287
|
]);
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
const
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
1288
|
+
const isPrevDisabled = !loop && resolvedActiveIndex <= 0;
|
|
1289
|
+
const isNextDisabled = !loop && resolvedActiveIndex >= totalSlides - 1;
|
|
1290
|
+
const slideLabel = (0, react.useMemo)(() => {
|
|
1291
|
+
if (totalSlides === 0) return "No slides";
|
|
1292
|
+
return `Slide ${resolvedActiveIndex + 1} of ${totalSlides}`;
|
|
1293
|
+
}, [resolvedActiveIndex, totalSlides]);
|
|
1294
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1295
|
+
ref,
|
|
1296
|
+
className: cx("pf-carousel", className),
|
|
1297
|
+
"aria-label": ariaLabel,
|
|
1298
|
+
...props,
|
|
1299
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1300
|
+
className: "pf-carousel__viewport",
|
|
1301
|
+
role: "region",
|
|
1302
|
+
"aria-roledescription": "carousel",
|
|
1303
|
+
"aria-label": slideLabel,
|
|
1304
|
+
children: totalSlides === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1305
|
+
className: "pf-carousel__empty",
|
|
1306
|
+
role: "status",
|
|
1307
|
+
children: "Add at least one slide."
|
|
1308
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1309
|
+
className: "pf-carousel__track",
|
|
1310
|
+
style: { transform: `translateX(-${resolvedActiveIndex * 100}%)` },
|
|
1311
|
+
children: slides.map((slide, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1312
|
+
className: "pf-carousel__slide",
|
|
1313
|
+
role: "group",
|
|
1314
|
+
"aria-roledescription": "slide",
|
|
1315
|
+
"aria-label": `Slide ${index + 1} of ${totalSlides}`,
|
|
1316
|
+
"aria-hidden": index !== resolvedActiveIndex,
|
|
1317
|
+
children: slide
|
|
1318
|
+
}, `slide-${index}`))
|
|
1319
|
+
})
|
|
1320
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1321
|
+
className: "pf-carousel__controls",
|
|
1322
|
+
onKeyDown: (event) => {
|
|
1323
|
+
if (event.key === "ArrowLeft") {
|
|
1324
|
+
event.preventDefault();
|
|
1325
|
+
goToIndex(resolvedActiveIndex - 1);
|
|
1326
|
+
} else if (event.key === "ArrowRight") {
|
|
1327
|
+
event.preventDefault();
|
|
1328
|
+
goToIndex(resolvedActiveIndex + 1);
|
|
1329
|
+
}
|
|
1330
|
+
},
|
|
1331
|
+
children: [
|
|
1332
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1333
|
+
type: "button",
|
|
1334
|
+
className: "pf-carousel__nav",
|
|
1335
|
+
"aria-label": "Previous slide",
|
|
1336
|
+
disabled: isPrevDisabled || totalSlides < 2,
|
|
1337
|
+
onClick: () => {
|
|
1338
|
+
goToIndex(resolvedActiveIndex - 1);
|
|
1339
|
+
},
|
|
1340
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
1341
|
+
name: "square-caret-left",
|
|
1342
|
+
"aria-hidden": true
|
|
1343
|
+
})
|
|
1344
|
+
}),
|
|
1345
|
+
showIndicators && totalSlides > 1 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1346
|
+
className: "pf-carousel__indicators",
|
|
1347
|
+
"aria-label": "Slide indicators",
|
|
1348
|
+
children: slides.map((_, index) => {
|
|
1349
|
+
const isActive = index === resolvedActiveIndex;
|
|
1350
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1351
|
+
type: "button",
|
|
1352
|
+
className: cx("pf-carousel__indicator", isActive && "pf-carousel__indicator--active"),
|
|
1353
|
+
"aria-label": `Go to slide ${index + 1}`,
|
|
1354
|
+
"aria-current": isActive ? "true" : void 0,
|
|
1355
|
+
onClick: () => {
|
|
1356
|
+
goToIndex(index);
|
|
1357
|
+
}
|
|
1358
|
+
}, `indicator-${index}`);
|
|
1359
|
+
})
|
|
1360
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1361
|
+
className: "pf-carousel__indicator-spacer",
|
|
1362
|
+
"aria-hidden": true
|
|
1363
|
+
}),
|
|
1364
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1365
|
+
type: "button",
|
|
1366
|
+
className: "pf-carousel__nav",
|
|
1367
|
+
"aria-label": "Next slide",
|
|
1368
|
+
disabled: isNextDisabled || totalSlides < 2,
|
|
1369
|
+
onClick: () => {
|
|
1370
|
+
goToIndex(resolvedActiveIndex + 1);
|
|
1371
|
+
},
|
|
1372
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
1373
|
+
name: "square-caret-right",
|
|
1374
|
+
"aria-hidden": true
|
|
1375
|
+
})
|
|
1376
|
+
})
|
|
1377
|
+
]
|
|
1378
|
+
})]
|
|
5605
1379
|
});
|
|
5606
|
-
};
|
|
5607
|
-
|
|
5608
|
-
prism: props.prism || Prism,
|
|
5609
|
-
theme: props.theme || vsDark_default,
|
|
5610
|
-
code: props.code,
|
|
5611
|
-
language: props.language
|
|
5612
|
-
}));
|
|
5613
|
-
/*! Bundled license information:
|
|
5614
|
-
|
|
5615
|
-
prismjs/prism.js:
|
|
5616
|
-
(**
|
|
5617
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
5618
|
-
*
|
|
5619
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
5620
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
5621
|
-
* @namespace
|
|
5622
|
-
* @public
|
|
5623
|
-
*)
|
|
5624
|
-
*/
|
|
1380
|
+
});
|
|
1381
|
+
Carousel.displayName = "Carousel";
|
|
5625
1382
|
//#endregion
|
|
5626
1383
|
//#region src/components/CodeSnippet/CodeSnippet.tsx
|
|
5627
1384
|
var CodeSnippet = (0, react.forwardRef)(function CodeSnippet({ className, code, language, title, showLineNumbers = false, maxHeight, copyLabel = "Copy", copiedLabel = "Copied", onCodeCopy, ...props }, ref) {
|
|
@@ -5692,10 +1449,10 @@ var CodeSnippet = (0, react.forwardRef)(function CodeSnippet({ className, code,
|
|
|
5692
1449
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: copied ? copiedLabel : copyLabel })]
|
|
5693
1450
|
})
|
|
5694
1451
|
}) : null,
|
|
5695
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1452
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(prism_react_renderer.Highlight, {
|
|
5696
1453
|
code,
|
|
5697
1454
|
language: language || "tsx",
|
|
5698
|
-
theme:
|
|
1455
|
+
theme: prism_react_renderer.themes.vsDark,
|
|
5699
1456
|
children: ({ className: prismClass, style, tokens, getLineProps, getTokenProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
5700
1457
|
className: cx("pf-code-snippet__pre", prismClass),
|
|
5701
1458
|
style: {
|
|
@@ -6206,6 +1963,74 @@ var InlineCTA = (0, react.forwardRef)(function InlineCTA({ className, heading, d
|
|
|
6206
1963
|
});
|
|
6207
1964
|
InlineCTA.displayName = "InlineCTA";
|
|
6208
1965
|
//#endregion
|
|
1966
|
+
//#region src/components/GaugeChart/GaugeChart.tsx
|
|
1967
|
+
var GaugeChart = (0, react.forwardRef)(function GaugeChart({ className, value, max = 100, centerLabel, subLabel, size = 200, strokeWidth = 16, color, style, ...props }, ref) {
|
|
1968
|
+
const progress = max > 0 ? Math.min(Math.max(value, 0), max) / max : 0;
|
|
1969
|
+
const radius = (size - strokeWidth) / 2;
|
|
1970
|
+
const circumference = 2 * Math.PI * radius;
|
|
1971
|
+
const filled = progress * circumference;
|
|
1972
|
+
const gap = circumference - filled;
|
|
1973
|
+
const center = size / 2;
|
|
1974
|
+
const pct = Math.round(progress * 100);
|
|
1975
|
+
const defaultLabel = `${pct}%`;
|
|
1976
|
+
const colorVar = color ?? "var(--pf-gauge-color)";
|
|
1977
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1978
|
+
ref,
|
|
1979
|
+
className: cx("pf-gauge", className),
|
|
1980
|
+
style: {
|
|
1981
|
+
width: size,
|
|
1982
|
+
height: size,
|
|
1983
|
+
...style
|
|
1984
|
+
},
|
|
1985
|
+
role: "meter",
|
|
1986
|
+
"aria-valuenow": value,
|
|
1987
|
+
"aria-valuemin": 0,
|
|
1988
|
+
"aria-valuemax": max,
|
|
1989
|
+
"aria-label": `${pct}%`,
|
|
1990
|
+
...props,
|
|
1991
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
1992
|
+
width: size,
|
|
1993
|
+
height: size,
|
|
1994
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
1995
|
+
"aria-hidden": "true",
|
|
1996
|
+
className: "pf-gauge__svg",
|
|
1997
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
1998
|
+
cx: center,
|
|
1999
|
+
cy: center,
|
|
2000
|
+
r: radius,
|
|
2001
|
+
fill: "none",
|
|
2002
|
+
strokeWidth,
|
|
2003
|
+
className: "pf-gauge__track"
|
|
2004
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
2005
|
+
cx: center,
|
|
2006
|
+
cy: center,
|
|
2007
|
+
r: radius,
|
|
2008
|
+
fill: "none",
|
|
2009
|
+
stroke: colorVar,
|
|
2010
|
+
strokeWidth,
|
|
2011
|
+
strokeLinecap: "round",
|
|
2012
|
+
strokeDasharray: `${filled} ${gap}`,
|
|
2013
|
+
style: {
|
|
2014
|
+
transform: "rotate(-90deg)",
|
|
2015
|
+
transformOrigin: `${center}px ${center}px`
|
|
2016
|
+
},
|
|
2017
|
+
className: "pf-gauge__fill"
|
|
2018
|
+
})]
|
|
2019
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2020
|
+
className: "pf-gauge__center",
|
|
2021
|
+
"aria-hidden": "true",
|
|
2022
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2023
|
+
className: "pf-gauge__label",
|
|
2024
|
+
children: centerLabel ?? defaultLabel
|
|
2025
|
+
}), subLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2026
|
+
className: "pf-gauge__sub-label",
|
|
2027
|
+
children: subLabel
|
|
2028
|
+
}) : null]
|
|
2029
|
+
})]
|
|
2030
|
+
});
|
|
2031
|
+
});
|
|
2032
|
+
GaugeChart.displayName = "GaugeChart";
|
|
2033
|
+
//#endregion
|
|
6209
2034
|
//#region src/components/LineBarCharts/LineBarChart.tsx
|
|
6210
2035
|
var CHART_COLORS = [
|
|
6211
2036
|
"var(--pf-chart-color-1)",
|
|
@@ -6399,6 +2224,14 @@ var LineChart = (0, react.forwardRef)(function LineChart({ className, data, seri
|
|
|
6399
2224
|
});
|
|
6400
2225
|
});
|
|
6401
2226
|
LineChart.displayName = "LineChart";
|
|
2227
|
+
var AreaChart = (0, react.forwardRef)(function AreaChart(props, ref) {
|
|
2228
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LineChart, {
|
|
2229
|
+
...props,
|
|
2230
|
+
area: true,
|
|
2231
|
+
ref
|
|
2232
|
+
});
|
|
2233
|
+
});
|
|
2234
|
+
AreaChart.displayName = "AreaChart";
|
|
6402
2235
|
var BarChart = (0, react.forwardRef)(function BarChart({ className, data, series, yAxisLabel, showLegend = true, stacked = false, valueFormatter, ...props }, ref) {
|
|
6403
2236
|
if (!data.length || !series.length) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6404
2237
|
ref,
|
|
@@ -7819,6 +3652,100 @@ var SidebarNavigation = (0, react.forwardRef)(function SidebarNavigation({ class
|
|
|
7819
3652
|
});
|
|
7820
3653
|
SidebarNavigation.displayName = "SidebarNavigation";
|
|
7821
3654
|
//#endregion
|
|
3655
|
+
//#region src/components/Sparkline/Sparkline.tsx
|
|
3656
|
+
function buildPath(points, close = false) {
|
|
3657
|
+
if (points.length < 2) return "";
|
|
3658
|
+
const [first, ...rest] = points;
|
|
3659
|
+
const d = [`M ${first[0]} ${first[1]}`];
|
|
3660
|
+
for (const [x, y] of rest) d.push(`L ${x} ${y}`);
|
|
3661
|
+
if (close) {
|
|
3662
|
+
const lastX = points[points.length - 1][0];
|
|
3663
|
+
points[points.length - 1][1];
|
|
3664
|
+
d.push(`L ${lastX} ${close}`);
|
|
3665
|
+
d.push(`L ${first[0]} ${close}`);
|
|
3666
|
+
d.push("Z");
|
|
3667
|
+
}
|
|
3668
|
+
return d.join(" ");
|
|
3669
|
+
}
|
|
3670
|
+
function normalizePoints(data, width, height, padding) {
|
|
3671
|
+
if (data.length === 0) return [];
|
|
3672
|
+
const min = Math.min(...data);
|
|
3673
|
+
const range = Math.max(...data) - min || 1;
|
|
3674
|
+
const innerW = width - padding * 2;
|
|
3675
|
+
const innerH = height - padding * 2;
|
|
3676
|
+
return data.map((value, i) => {
|
|
3677
|
+
return [padding + i / (data.length - 1) * innerW, padding + (1 - (value - min) / range) * innerH];
|
|
3678
|
+
});
|
|
3679
|
+
}
|
|
3680
|
+
var Sparkline = (0, react.forwardRef)(function Sparkline({ className, data = [], width = 120, height = 36, variant = "line", strokeWidth = 1.5, color, endDot = false, label, style, ...props }, ref) {
|
|
3681
|
+
const padding = strokeWidth + 2;
|
|
3682
|
+
const points = (0, react.useMemo)(() => normalizePoints(data, width, height, padding), [
|
|
3683
|
+
data,
|
|
3684
|
+
width,
|
|
3685
|
+
height,
|
|
3686
|
+
padding
|
|
3687
|
+
]);
|
|
3688
|
+
const linePath = (0, react.useMemo)(() => buildPath(points), [points]);
|
|
3689
|
+
const areaPath = (0, react.useMemo)(() => {
|
|
3690
|
+
if (variant !== "area" || points.length < 2) return "";
|
|
3691
|
+
const [first, ...rest] = points;
|
|
3692
|
+
const d = [`M ${first[0]} ${first[1]}`];
|
|
3693
|
+
for (const [x, y] of rest) d.push(`L ${x} ${y}`);
|
|
3694
|
+
const lastX = points[points.length - 1][0];
|
|
3695
|
+
const bottom = height - padding + strokeWidth;
|
|
3696
|
+
d.push(`L ${lastX} ${bottom}`);
|
|
3697
|
+
d.push(`L ${first[0]} ${bottom}`);
|
|
3698
|
+
d.push("Z");
|
|
3699
|
+
return d.join(" ");
|
|
3700
|
+
}, [
|
|
3701
|
+
points,
|
|
3702
|
+
variant,
|
|
3703
|
+
height,
|
|
3704
|
+
padding,
|
|
3705
|
+
strokeWidth
|
|
3706
|
+
]);
|
|
3707
|
+
const lastPoint = points[points.length - 1];
|
|
3708
|
+
const colorVar = color ?? "var(--pf-sparkline-color)";
|
|
3709
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
3710
|
+
ref,
|
|
3711
|
+
width,
|
|
3712
|
+
height,
|
|
3713
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
3714
|
+
className: cx("pf-sparkline", `pf-sparkline--${variant}`, className),
|
|
3715
|
+
"aria-label": label,
|
|
3716
|
+
role: label ? "img" : "presentation",
|
|
3717
|
+
style: {
|
|
3718
|
+
"--pf-sparkline-color-override": color,
|
|
3719
|
+
...style
|
|
3720
|
+
},
|
|
3721
|
+
...props,
|
|
3722
|
+
children: [
|
|
3723
|
+
variant === "area" && areaPath && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
3724
|
+
d: areaPath,
|
|
3725
|
+
fill: colorVar,
|
|
3726
|
+
className: "pf-sparkline__area"
|
|
3727
|
+
}),
|
|
3728
|
+
linePath && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
3729
|
+
d: linePath,
|
|
3730
|
+
fill: "none",
|
|
3731
|
+
stroke: colorVar,
|
|
3732
|
+
strokeWidth,
|
|
3733
|
+
strokeLinecap: "round",
|
|
3734
|
+
strokeLinejoin: "round",
|
|
3735
|
+
className: "pf-sparkline__line"
|
|
3736
|
+
}),
|
|
3737
|
+
endDot && lastPoint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
3738
|
+
cx: lastPoint[0],
|
|
3739
|
+
cy: lastPoint[1],
|
|
3740
|
+
r: strokeWidth + 1.5,
|
|
3741
|
+
fill: colorVar,
|
|
3742
|
+
className: "pf-sparkline__dot"
|
|
3743
|
+
})
|
|
3744
|
+
]
|
|
3745
|
+
});
|
|
3746
|
+
});
|
|
3747
|
+
Sparkline.displayName = "Sparkline";
|
|
3748
|
+
//#endregion
|
|
7822
3749
|
//#region src/components/SlideoutMenu/SlideoutMenu.tsx
|
|
7823
3750
|
var FOCUSABLE_SELECTOR = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
7824
3751
|
function SlideoutMenu({ className, open, onOpenChange, title, description, footer, placement = "right", size = "md", closeOnOverlayClick = true, showCloseButton = true, children, ...props }) {
|
|
@@ -8929,6 +4856,7 @@ var VideoPlayer = (0, react.forwardRef)(({ id, label, description, error, aspect
|
|
|
8929
4856
|
VideoPlayer.displayName = "VideoPlayer";
|
|
8930
4857
|
//#endregion
|
|
8931
4858
|
exports.Alert = Alert;
|
|
4859
|
+
exports.AreaChart = AreaChart;
|
|
8932
4860
|
exports.Avatar = Avatar;
|
|
8933
4861
|
exports.Badge = Badge;
|
|
8934
4862
|
exports.BadgeGroup = BadgeGroup;
|
|
@@ -8950,6 +4878,7 @@ exports.DatePicker = DatePicker;
|
|
|
8950
4878
|
exports.Dropdown = Dropdown;
|
|
8951
4879
|
exports.EmptyState = EmptyState;
|
|
8952
4880
|
exports.FileUploader = FileUploader;
|
|
4881
|
+
exports.GaugeChart = GaugeChart;
|
|
8953
4882
|
exports.HeaderNavigation = HeaderNavigation;
|
|
8954
4883
|
exports.Icon = Icon;
|
|
8955
4884
|
exports.InlineCTA = InlineCTA;
|
|
@@ -8987,6 +4916,7 @@ exports.Select = Select;
|
|
|
8987
4916
|
exports.SidebarNavigation = SidebarNavigation;
|
|
8988
4917
|
exports.SlideoutMenu = SlideoutMenu;
|
|
8989
4918
|
exports.Slider = Slider;
|
|
4919
|
+
exports.Sparkline = Sparkline;
|
|
8990
4920
|
exports.Switch = Switch;
|
|
8991
4921
|
exports.Table = Table;
|
|
8992
4922
|
exports.Tabs = Tabs;
|