@gitlab/ui
Version:
GitLab UI Components
936 lines (932 loc) • 11.7 MB
JavaScript
#!/usr/bin/env node
import { createRequire as __gl__createRequire } from 'node:module'; const require = __gl__createRequire(import.meta.url);
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __require = /* @__PURE__ */ ((x7) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x7, {
get: (a5, b7) => (typeof require !== "undefined" ? require : a5)[b7]
}) : x7)(function(x7) {
if (typeof require !== "undefined") return require.apply(this, arguments);
throw Error('Dynamic require of "' + x7 + '" is not supported');
});
var __esm = (fn9, res) => function __init() {
return fn9 && (res = (0, fn9[__getOwnPropNames(fn9)[0]])(fn9 = 0)), res;
};
var __commonJS = (cb2, mod) => function __require3() {
return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to4, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key2 of __getOwnPropNames(from))
if (!__hasOwnProp.call(to4, key2) && key2 !== except)
__defProp(to4, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
}
return to4;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// ../../node_modules/emoji-regex/index.js
var require_emoji_regex = __commonJS({
"../../node_modules/emoji-regex/index.js"(exports, module) {
module.exports = () => {
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\u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DC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
};
}
});
// ../../node_modules/get-caller-file/index.js
var require_get_caller_file = __commonJS({
"../../node_modules/get-caller-file/index.js"(exports, module) {
"use strict";
module.exports = function getCallerFile2(position) {
if (position === void 0) {
position = 2;
}
if (position >= Error.stackTraceLimit) {
throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `" + position + "` and Error.stackTraceLimit was: `" + Error.stackTraceLimit + "`");
}
var oldPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = function(_7, stack3) {
return stack3;
};
var stack2 = new Error().stack;
Error.prepareStackTrace = oldPrepareStackTrace;
if (stack2 !== null && typeof stack2 === "object") {
return stack2[position] ? stack2[position].getFileName() : void 0;
}
};
}
});
// ../../node_modules/prettier/plugins/yaml.mjs
var yaml_exports = {};
__export(yaml_exports, {
__parsePrettierYamlConfig: () => sc,
default: () => Ih,
languages: () => Xr,
options: () => zr,
parsers: () => hr,
printers: () => rc
});
function Wi(t7) {
if (typeof t7 == "string") return Me;
if (Array.isArray(t7)) return ze;
if (!t7) return;
let { type: e7 } = t7;
if (Lt.has(e7)) return e7;
}
function Gi(t7) {
let e7 = t7 === null ? "null" : typeof t7;
if (e7 !== "string" && e7 !== "object") return `Unexpected doc '${e7}',
Expected it to be 'string' or 'object'.`;
if (_e(t7)) throw new Error("doc is valid.");
let n27 = Object.prototype.toString.call(t7);
if (n27 !== "[object Object]") return `Unexpected doc '${n27}'.`;
let r4 = Qi([...Lt].map((s) => `'${s}'`));
return `Unexpected doc.type '${t7.type}'.
Expected it to be ${r4}.`;
}
function Ji(t7, e7) {
if (typeof t7 == "string") return e7(t7);
let n27 = /* @__PURE__ */ new Map();
return r4(t7);
function r4(i) {
if (n27.has(i)) return n27.get(i);
let o5 = s(i);
return n27.set(i, o5), o5;
}
function s(i) {
switch (_e(i)) {
case ze:
return e7(i.map(r4));
case Pe:
return e7({ ...i, parts: i.parts.map(r4) });
case ge:
return e7({ ...i, breakContents: r4(i.breakContents), flatContents: r4(i.flatContents) });
case ke: {
let { expandedStates: o5, contents: a5 } = i;
return o5 ? (o5 = o5.map(r4), a5 = o5[0]) : a5 = r4(a5), e7({ ...i, contents: a5, expandedStates: o5 });
}
case Ce:
case et:
case nt:
case st:
case Ie:
return e7({ ...i, contents: r4(i.contents) });
case Me:
case Ze:
case tt:
case rt:
case Z:
case ve:
return e7(i);
default:
throw new mn(i);
}
}
}
function Er(t7, e7 = it) {
return Ji(t7, (n27) => typeof n27 == "string" ? P(e7, n27.split(`
`)) : n27);
}
function ot(t7, e7) {
return de(e7), { type: Ce, contents: e7, n: t7 };
}
function Re(t7, e7 = {}) {
return de(t7), gn(e7.expandedStates, true), { type: ke, id: e7.id, contents: t7, break: !!e7.shouldBreak, expandedStates: e7.expandedStates };
}
function dn(t7) {
return ot(Number.NEGATIVE_INFINITY, t7);
}
function wr(t7) {
return ot({ type: "root" }, t7);
}
function br(t7) {
return ot(-1, t7);
}
function yn(t7, e7) {
return Re(t7[0], { ...e7, expandedStates: t7 });
}
function Tt(t7) {
return Sr(t7), { type: Pe, parts: t7 };
}
function at2(t7, e7 = "", n27 = {}) {
return de(t7), e7 !== "" && de(e7), { type: ge, breakContents: t7, flatContents: e7, groupId: n27.groupId };
}
function Nr(t7) {
return de(t7), { type: Ie, contents: t7 };
}
function P(t7, e7) {
de(t7), gn(e7);
let n27 = [];
for (let r4 = 0; r4 < e7.length; r4++) r4 !== 0 && n27.push(t7), n27.push(e7[r4]);
return n27;
}
function kt(t7) {
return (e7, n27, r4) => {
let s = !!(r4 != null && r4.backwards);
if (n27 === false) return false;
let { length: i } = e7, o5 = n27;
for (; o5 >= 0 && o5 < i; ) {
let a5 = e7.charAt(o5);
if (t7 instanceof RegExp) {
if (!t7.test(a5)) return o5;
} else if (!t7.includes(a5)) return o5;
s ? o5-- : o5++;
}
return o5 === -1 || o5 === i ? o5 : false;
};
}
function Zi(t7, e7, n27) {
let r4 = !!(n27 != null && n27.backwards);
if (e7 === false) return false;
let s = t7.charAt(e7);
if (r4) {
if (t7.charAt(e7 - 1) === "\r" && s === `
`) return e7 - 2;
if (s === `
` || s === "\r" || s === "\u2028" || s === "\u2029") return e7 - 1;
} else {
if (s === "\r" && t7.charAt(e7 + 1) === `
`) return e7 + 2;
if (s === `
` || s === "\r" || s === "\u2028" || s === "\u2029") return e7 + 1;
}
return e7;
}
function eo(t7, e7) {
let n27 = e7 - 1;
n27 = En(t7, n27, { backwards: true }), n27 = Sn(t7, n27, { backwards: true }), n27 = En(t7, n27, { backwards: true });
let r4 = Sn(t7, n27, { backwards: true });
return n27 !== r4;
}
function Lr(t7, e7) {
let { node: n27 } = t7;
if (n27.type === "root" && e7.filepath && /(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/u.test(e7.filepath)) return async (r4) => {
let s = await r4(e7.originalText, { parser: "json" });
return s ? [s, N] : void 0;
};
}
function lt(t7) {
if (ct !== null && typeof ct.property) {
let e7 = ct;
return ct = lt.prototype = null, e7;
}
return ct = lt.prototype = t7 ?? /* @__PURE__ */ Object.create(null), new lt();
}
function bn(t7) {
return lt(t7);
}
function no(t7, e7 = "type") {
bn(t7);
function n27(r4) {
let s = r4[e7], i = t7[s];
if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${s}'.`), { node: r4 });
return i;
}
return n27;
}
function xe(t7) {
return t7.position.start.offset;
}
function Pr(t7) {
return t7.position.end.offset;
}
function xr(t7) {
return Rr.test(t7);
}
function Dr(t7) {
return _r.test(t7);
}
function Yr(t7) {
return vr.test(t7);
}
function $r(t7) {
return `# @${Ir}
${t7}`;
}
function io(t7) {
return Array.isArray(t7) && t7.length > 0;
}
function K(t7, e7) {
return typeof (t7 == null ? void 0 : t7.type) == "string" && (!e7 || e7.includes(t7.type));
}
function Nn(t7, e7, n27) {
return e7("children" in t7 ? { ...t7, children: t7.children.map((r4) => Nn(r4, e7, t7)) } : t7, n27);
}
function Ye(t7, e7, n27) {
Object.defineProperty(t7, e7, { get: n27, enumerable: false });
}
function Fr(t7, e7) {
let n27 = 0, r4 = e7.length;
for (let s = t7.position.end.offset - 1; s < r4; s++) {
let i = e7[s];
if (i === `
` && n27++, n27 === 1 && /\S/u.test(i)) return false;
if (n27 === 2) return true;
}
return false;
}
function Pt(t7) {
let { node: e7 } = t7;
switch (e7.type) {
case "tag":
case "anchor":
case "comment":
return false;
}
let n27 = t7.stack.length;
for (let r4 = 1; r4 < n27; r4++) {
let s = t7.stack[r4], i = t7.stack[r4 - 1];
if (Array.isArray(i) && typeof s == "number" && s !== i.length - 1) return false;
}
return true;
}
function It(t7) {
return De(t7.children) ? It(x(false, t7.children, -1)) : t7;
}
function Br(t7) {
return t7.value.trim() === "prettier-ignore";
}
function qr(t7) {
let { node: e7 } = t7;
if (e7.type === "documentBody") {
let n27 = t7.parent.head;
return I(n27) && Br(x(false, n27.endComments, -1));
}
return ee(e7) && Br(x(false, e7.leadingComments, -1));
}
function $e(t7) {
return !De(t7.children) && !oo(t7);
}
function oo(t7) {
return ee(t7) || ie(t7) || On(t7) || V(t7) || I(t7);
}
function ee(t7) {
return De(t7 == null ? void 0 : t7.leadingComments);
}
function ie(t7) {
return De(t7 == null ? void 0 : t7.middleComments);
}
function On(t7) {
return t7 == null ? void 0 : t7.indicatorComment;
}
function V(t7) {
return t7 == null ? void 0 : t7.trailingComment;
}
function I(t7) {
return De(t7 == null ? void 0 : t7.endComments);
}
function Ur(t7) {
let e7 = [], n27;
for (let r4 of t7.split(/( +)/u)) r4 !== " " ? n27 === " " ? e7.push(r4) : e7.push((e7.pop() || "") + r4) : n27 === void 0 && e7.unshift(""), n27 = r4;
return n27 === " " && e7.push((e7.pop() || "") + " "), e7[0] === "" && (e7.shift(), e7.unshift(" " + (e7.shift() || ""))), e7;
}
function Kr(t7, e7, n27) {
let r4 = e7.split(`
`).map((s, i, o5) => i === 0 && i === o5.length - 1 ? s : i !== 0 && i !== o5.length - 1 ? s.trim() : i === 0 ? s.trimEnd() : s.trimStart());
return n27.proseWrap === "preserve" ? r4.map((s) => s.length === 0 ? [] : [s]) : r4.map((s) => s.length === 0 ? [] : Ur(s)).reduce((s, i, o5) => o5 !== 0 && r4[o5 - 1].length > 0 && i.length > 0 && !(t7 === "quoteDouble" && x(false, x(false, s, -1), -1).endsWith("\\")) ? [...s.slice(0, -1), [...x(false, s, -1), ...i]] : [...s, i], []).map((s) => n27.proseWrap === "never" ? [s.join(" ")] : s);
}
function Vr(t7, { parentIndent: e7, isLastDescendant: n27, options: r4 }) {
let s = t7.position.start.line === t7.position.end.line ? "" : r4.originalText.slice(t7.position.start.offset, t7.position.end.offset).match(/^[^\n]*\n(.*)$/su)[1], i;
if (t7.indent === null) {
let c5 = s.match(/^(?<leadingSpace> *)[^\n\r ]/mu);
i = c5 ? c5.groups.leadingSpace.length : Number.POSITIVE_INFINITY;
} else i = t7.indent - 1 + e7;
let o5 = s.split(`
`).map((c5) => c5.slice(i));
if (r4.proseWrap === "preserve" || t7.type === "blockLiteral") return a5(o5.map((c5) => c5.length === 0 ? [] : [c5]));
return a5(o5.map((c5) => c5.length === 0 ? [] : Ur(c5)).reduce((c5, l5, f5) => f5 !== 0 && o5[f5 - 1].length > 0 && l5.length > 0 && !/^\s/u.test(l5[0]) && !/^\s|\s$/u.test(x(false, c5, -1)) ? [...c5.slice(0, -1), [...x(false, c5, -1), ...l5]] : [...c5, l5], []).map((c5) => c5.reduce((l5, f5) => l5.length > 0 && /\s$/u.test(x(false, l5, -1)) ? [...l5.slice(0, -1), x(false, l5, -1) + " " + f5] : [...l5, f5], [])).map((c5) => r4.proseWrap === "never" ? [c5.join(" ")] : c5));
function a5(c5) {
if (t7.chomping === "keep") return x(false, c5, -1).length === 0 ? c5.slice(0, -1) : c5;
let l5 = 0;
for (let f5 = c5.length - 1; f5 >= 0 && c5[f5].length === 0; f5--) l5++;
return l5 === 0 ? c5 : l5 >= 2 && !n27 ? c5.slice(0, -(l5 - 1)) : c5.slice(0, -l5);
}
}
function ft(t7) {
if (!t7) return true;
switch (t7.type) {
case "plain":
case "quoteDouble":
case "quoteSingle":
case "alias":
case "flowMapping":
case "flowSequence":
return true;
default:
return false;
}
}
function vt(t7, e7) {
let { node: n27, root: r4 } = t7, s;
return An.has(r4) ? s = An.get(r4) : (s = /* @__PURE__ */ new Set(), An.set(r4, s)), !s.has(n27.position.end.line) && (s.add(n27.position.end.line), Fr(n27, e7) && !Ln(t7.parent)) ? Ct : "";
}
function Ln(t7) {
return I(t7) && !K(t7, ["documentHead", "documentBody", "flowMapping", "flowSequence"]);
}
function v(t7, e7) {
return ot(" ".repeat(t7), e7);
}
function ao(t7, e7, n27) {
let { node: r4 } = t7, s = t7.ancestors.filter((l5) => l5.type === "sequence" || l5.type === "mapping").length, i = Pt(t7), o5 = [r4.type === "blockFolded" ? ">" : "|"];
r4.indent !== null && o5.push(r4.indent.toString()), r4.chomping !== "clip" && o5.push(r4.chomping === "keep" ? "+" : "-"), On(r4) && o5.push(" ", n27("indicatorComment"));
let a5 = Vr(r4, { parentIndent: s, isLastDescendant: i, options: e7 }), c5 = [];
for (let [l5, f5] of a5.entries()) l5 === 0 && c5.push(N), c5.push(Tt(P(ne, f5))), l5 !== a5.length - 1 ? c5.push(f5.length === 0 ? N : wr(it)) : r4.chomping === "keep" && i && c5.push(dn(f5.length === 0 ? N : it));
return r4.indent === null ? o5.push(br(v(e7.tabWidth, c5))) : o5.push(dn(v(r4.indent - 1 + s, c5))), o5;
}
function _t(t7, e7, n27) {
let { node: r4 } = t7, s = r4.type === "flowMapping", i = s ? "{" : "[", o5 = s ? "}" : "]", a5 = Ct;
s && r4.children.length > 0 && e7.bracketSpacing && (a5 = ne);
let c5 = x(false, r4.children, -1), l5 = (c5 == null ? void 0 : c5.type) === "flowMappingItem" && $e(c5.key) && $e(c5.value);
return [i, v(e7.tabWidth, [a5, co(t7, e7, n27), e7.trailingComma === "none" ? "" : at2(","), I(r4) ? [N, P(N, t7.map(n27, "endComments"))] : ""]), l5 ? "" : a5, o5];
}
function co(t7, e7, n27) {
return t7.map(({ isLast: r4, node: s, next: i }) => [n27(), r4 ? "" : [",", ne, s.position.start.line !== i.position.start.line ? vt(t7, e7.originalText) : ""]], "children");
}
function lo(t7, e7, n27) {
var M7;
let { node: r4, parent: s } = t7, { key: i, value: o5 } = r4, a5 = $e(i), c5 = $e(o5);
if (a5 && c5) return ": ";
let l5 = n27("key"), f5 = fo(r4) ? " " : "";
if (c5) return r4.type === "flowMappingItem" && s.type === "flowMapping" ? l5 : r4.type === "mappingItem" && Tn(i.content, e7) && !V(i.content) && ((M7 = s.tag) == null ? void 0 : M7.value) !== "tag:yaml.org,2002:set" ? [l5, f5, ":"] : ["? ", v(2, l5)];
let m5 = n27("value");
if (a5) return [": ", v(2, m5)];
if (ee(o5) || !ft(i.content)) return ["? ", v(2, l5), N, ...t7.map(() => [n27(), N], "value", "leadingComments"), ": ", v(2, m5)];
if (uo(i.content) && !ee(i.content) && !ie(i.content) && !V(i.content) && !I(i) && !ee(o5.content) && !ie(o5.content) && !I(o5) && Tn(o5.content, e7)) return [l5, f5, ": ", m5];
let d7 = Symbol("mappingKey"), y5 = Re([at2("? "), Re(v(2, l5), { id: d7 })]), h5 = [N, ": ", v(2, m5)], g4 = [f5, ":"];
I(o5) && o5.content && K(o5.content, ["flowMapping", "flowSequence"]) && o5.content.children.length === 0 ? g4.push(" ") : ee(o5.content) || I(o5) && o5.content && !K(o5.content, ["mapping", "sequence"]) || s.type === "mapping" && V(i.content) && ft(o5.content) || K(o5.content, ["mapping", "sequence"]) && o5.content.tag === null && o5.content.anchor === null ? g4.push(N) : o5.content ? g4.push(ne) : V(o5) && g4.push(" "), g4.push(m5);
let w7 = v(e7.tabWidth, g4);
return Tn(i.content, e7) && !ee(i.content) && !ie(i.content) && !I(i) ? yn([[l5, w7]]) : yn([[y5, at2(h5, w7, { groupId: d7 })]]);
}
function Tn(t7, e7) {
if (!t7) return true;
switch (t7.type) {
case "plain":
case "quoteSingle":
case "quoteDouble":
break;
case "alias":
return true;
default:
return false;
}
if (e7.proseWrap === "preserve") return t7.position.start.line === t7.position.end.line;
if (/\\$/mu.test(e7.originalText.slice(t7.position.start.offset, t7.position.end.offset))) return false;
switch (e7.proseWrap) {
case "never":
return !t7.value.includes(`
`);
case "always":
return !/[\n ]/u.test(t7.value);
default:
return false;
}
}
function fo(t7) {
var e7;
return ((e7 = t7.key.content) == null ? void 0 : e7.type) === "alias";
}
function uo(t7) {
if (!t7) return true;
switch (t7.type) {
case "plain":
case "quoteDouble":
case "quoteSingle":
return t7.position.start.line === t7.position.end.line;
case "alias":
return true;
default:
return false;
}
}
function po(t7) {
return Nn(t7, mo);
}
function mo(t7) {
switch (t7.type) {
case "document":
Ye(t7, "head", () => t7.children[0]), Ye(t7, "body", () => t7.children[1]);
break;
case "documentBody":
case "sequenceItem":
case "flowSequenceItem":
case "mappingKey":
case "mappingValue":
Ye(t7, "content", () => t7.children[0]);
break;
case "mappingItem":
case "flowMappingItem":
Ye(t7, "key", () => t7.children[0]), Ye(t7, "value", () => t7.children[1]);
break;
}
return t7;
}
function ho(t7, e7, n27) {
let { node: r4 } = t7, s = [];
r4.type !== "mappingValue" && ee(r4) && s.push([P(N, t7.map(n27, "leadingComments")), N]);
let { tag: i, anchor: o5 } = r4;
i && s.push(n27("tag")), i && o5 && s.push(" "), o5 && s.push(n27("anchor"));
let a5 = "";
return K(r4, ["mapping", "sequence", "comment", "directive", "mappingItem", "sequenceItem"]) && !Pt(t7) && (a5 = vt(t7, e7.originalText)), (i || o5) && (K(r4, ["sequence", "mapping"]) && !ie(r4) ? s.push(N) : s.push(" ")), ie(r4) && s.push([r4.middleComments.length === 1 ? "" : N, P(N, t7.map(n27, "middleComments")), N]), qr(t7) ? s.push(Er(e7.originalText.slice(r4.position.start.offset, r4.position.end.offset).trimEnd())) : s.push(Re(go(t7, e7, n27))), V(r4) && !K(r4, ["document", "documentHead"]) && s.push(Nr([r4.type === "mappingValue" && !r4.content ? "" : " ", t7.parent.type === "mappingKey" && t7.getParentNode(2).type === "mapping" && ft(r4) ? "" : Mt, n27("trailingComment")])), Ln(r4) && s.push(v(r4.type === "sequenceItem" ? 2 : 0, [N, P(N, t7.map(({ node: c5 }) => [Or(e7.originalText, xe(c5)) ? N : "", n27()], "endComments"))])), s.push(a5), s;
}
function go(t7, e7, n27) {
let { node: r4 } = t7;
switch (r4.type) {
case "root": {
let s = [];
t7.each(({ node: o5, next: a5, isFirst: c5 }) => {
c5 || s.push(N), s.push(n27()), Gr(o5, a5) ? (s.push(N, "..."), V(o5) && s.push(" ", n27("trailingComment"))) : a5 && !V(a5.head) && s.push(N, "---");
}, "children");
let i = It(r4);
return (!K(i, ["blockLiteral", "blockFolded"]) || i.chomping !== "keep") && s.push(N), s;
}
case "document": {
let s = [];
return Eo(t7, e7) === "head" && ((r4.head.children.length > 0 || r4.head.endComments.length > 0) && s.push(n27("head")), V(r4.head) ? s.push(["---", " ", n27(["head", "trailingComment"])]) : s.push("---")), yo(r4) && s.push(n27("body")), P(N, s);
}
case "documentHead":
return P(N, [...t7.map(n27, "children"), ...t7.map(n27, "endComments")]);
case "documentBody": {
let { children: s, endComments: i } = r4, o5 = "";
if (s.length > 0 && i.length > 0) {
let a5 = It(r4);
K(a5, ["blockFolded", "blockLiteral"]) ? a5.chomping !== "keep" && (o5 = [N, N]) : o5 = N;
}
return [P(N, t7.map(n27, "children")), o5, P(N, t7.map(n27, "endComments"))];
}
case "directive":
return ["%", P(" ", [r4.name, ...r4.parameters])];
case "comment":
return ["#", r4.value];
case "alias":
return ["*", r4.value];
case "tag":
return e7.originalText.slice(r4.position.start.offset, r4.position.end.offset);
case "anchor":
return ["&", r4.value];
case "plain":
return ut(r4.type, e7.originalText.slice(r4.position.start.offset, r4.position.end.offset), e7);
case "quoteDouble":
case "quoteSingle": {
let s = "'", i = '"', o5 = e7.originalText.slice(r4.position.start.offset + 1, r4.position.end.offset - 1);
if (r4.type === "quoteSingle" && o5.includes("\\") || r4.type === "quoteDouble" && /\\[^"]/u.test(o5)) {
let c5 = r4.type === "quoteDouble" ? i : s;
return [c5, ut(r4.type, o5, e7), c5];
}
if (o5.includes(i)) return [s, ut(r4.type, r4.type === "quoteDouble" ? At(false, At(false, o5, String.raw`\"`, i), "'", s.repeat(2)) : o5, e7), s];
if (o5.includes(s)) return [i, ut(r4.type, r4.type === "quoteSingle" ? At(false, o5, "''", s) : o5, e7), i];
let a5 = e7.singleQuote ? s : i;
return [a5, ut(r4.type, o5, e7), a5];
}
case "blockFolded":
case "blockLiteral":
return jr(t7, e7, n27);
case "mapping":
case "sequence":
return P(N, t7.map(n27, "children"));
case "sequenceItem":
return ["- ", v(2, r4.content ? n27("content") : "")];
case "mappingKey":
case "mappingValue":
return r4.content ? n27("content") : "";
case "mappingItem":
case "flowMappingItem":
return Wr(t7, e7, n27);
case "flowMapping":
return _t(t7, e7, n27);
case "flowSequence":
return _t(t7, e7, n27);
case "flowSequenceItem":
return n27("content");
default:
throw new Ar(r4, "YAML");
}
}
function yo(t7) {
return t7.body.children.length > 0 || I(t7.body);
}
function Gr(t7, e7) {
return V(t7) || e7 && (e7.head.children.length > 0 || I(e7.head));
}
function Eo(t7, e7) {
let n27 = t7.node;
if (t7.isFirst && /---(?:\s|$)/u.test(e7.originalText.slice(xe(n27), xe(n27) + 4)) || n27.head.children.length > 0 || I(n27.head) || V(n27.head)) return "head";
let r4 = t7.next;
return Gr(n27, r4) ? false : r4 ? "root" : false;
}
function ut(t7, e7, n27) {
let r4 = Kr(t7, e7, n27);
return P(N, r4.map((s) => Tt(P(ne, s))));
}
function Hr(t7, e7) {
if (K(t7)) switch (t7.type) {
case "comment":
if (xr(t7.value)) return null;
break;
case "quoteDouble":
case "quoteSingle":
e7.type = "quote";
break;
}
}
function B(t7, e7 = null) {
"children" in t7 && t7.children.forEach((n27) => B(n27, t7)), "anchor" in t7 && t7.anchor && B(t7.anchor, t7), "tag" in t7 && t7.tag && B(t7.tag, t7), "leadingComments" in t7 && t7.leadingComments.forEach((n27) => B(n27, t7)), "middleComments" in t7 && t7.middleComments.forEach((n27) => B(n27, t7)), "indicatorComment" in t7 && t7.indicatorComment && B(t7.indicatorComment, t7), "trailingComment" in t7 && t7.trailingComment && B(t7.trailingComment, t7), "endComments" in t7 && t7.endComments.forEach((n27) => B(n27, t7)), Object.defineProperty(t7, "_parent", { value: e7, enumerable: false });
}
function Ae(t7) {
return `${t7.line}:${t7.column}`;
}
function qs(t7) {
B(t7);
let e7 = Fa(t7), n27 = t7.children.slice();
t7.comments.sort((r4, s) => r4.position.start.offset - s.position.end.offset).filter((r4) => !r4._parent).forEach((r4) => {
for (; n27.length > 1 && r4.position.start.line > n27[0].position.end.line; ) n27.shift();
qa(r4, e7, n27[0]);
});
}
function Fa(t7) {
let e7 = Array.from(new Array(t7.position.end.line), () => ({}));
for (let n27 of t7.comments) e7[n27.position.start.line - 1].comment = n27;
return Us(e7, t7), e7;
}
function Us(t7, e7) {
if (e7.position.start.offset !== e7.position.end.offset) {
if ("leadingComments" in e7) {
let { start: n27 } = e7.position, { leadingAttachableNode: r4 } = t7[n27.line - 1];
(!r4 || n27.column < r4.position.start.column) && (t7[n27.line - 1].leadingAttachableNode = e7);
}
if ("trailingComment" in e7 && e7.position.end.column > 1 && e7.type !== "document" && e7.type !== "documentHead") {
let { end: n27 } = e7.position, { trailingAttachableNode: r4 } = t7[n27.line - 1];
(!r4 || n27.column >= r4.position.end.column) && (t7[n27.line - 1].trailingAttachableNode = e7);
}
if (e7.type !== "root" && e7.type !== "document" && e7.type !== "documentHead" && e7.type !== "documentBody") {
let { start: n27, end: r4 } = e7.position, s = [r4.line].concat(n27.line === r4.line ? [] : n27.line);
for (let i of s) {
let o5 = t7[i - 1].trailingNode;
(!o5 || r4.column >= o5.position.end.column) && (t7[i - 1].trailingNode = e7);
}
}
"children" in e7 && e7.children.forEach((n27) => {
Us(t7, n27);
});
}
}
function qa(t7, e7, n27) {
let r4 = t7.position.start.line, { trailingAttachableNode: s } = e7[r4 - 1];
if (s) {
if (s.trailingComment) throw new Error(`Unexpected multiple trailing comment at ${Ae(t7.position.start)}`);
B(t7, s), s.trailingComment = t7;
return;
}
for (let o5 = r4; o5 >= n27.position.start.line; o5--) {
let { trailingNode: a5 } = e7[o5 - 1], c5;
if (a5) c5 = a5;
else if (o5 !== r4 && e7[o5 - 1].comment) c5 = e7[o5 - 1].comment._parent;
else continue;
if ((c5.type === "sequence" || c5.type === "mapping") && (c5 = c5.children[0]), c5.type === "mappingItem") {
let [l5, f5] = c5.children;
c5 = Ks(l5) ? l5 : f5;
}
for (; ; ) {
if (Ua(c5, t7)) {
B(t7, c5), c5.endComments.push(t7);
return;
}
if (!c5._parent) break;
c5 = c5._parent;
}
break;
}
for (let o5 = r4 + 1; o5 <= n27.position.end.line; o5++) {
let { leadingAttachableNode: a5 } = e7[o5 - 1];
if (a5) {
B(t7, a5), a5.leadingComments.push(t7);
return;
}
}
let i = n27.children[1];
B(t7, i), i.endComments.push(t7);
}
function Ua(t7, e7) {
if (t7.position.start.offset < e7.position.start.offset && t7.position.end.offset > e7.position.end.offset) switch (t7.type) {
case "flowMapping":
case "flowSequence":
return t7.children.length === 0 || e7.position.start.line > t7.children[t7.children.length - 1].position.end.line;
}
if (e7.position.end.offset < t7.position.end.offset) return false;
switch (t7.type) {
case "sequenceItem":
return e7.position.start.column > t7.position.start.column;
case "mappingKey":
case "mappingValue":
return e7.position.start.column > t7._parent.position.start.column && (t7.children.length === 0 || t7.children.length === 1 && t7.children[0].type !== "blockFolded" && t7.children[0].type !== "blockLiteral") && (t7.type === "mappingValue" || Ks(t7));
default:
return false;
}
}
function Ks(t7) {
return t7.position.start !== t7.position.end && (t7.children.length === 0 || t7.position.start.offset !== t7.children[0].position.start.offset);
}
function b(t7, e7) {
return { type: t7, position: e7 };
}
function Vs(t7, e7, n27) {
return { ...b("root", t7), children: e7, comments: n27 };
}
function wt(t7) {
switch (t7.type) {
case "DOCUMENT":
for (let e7 = t7.contents.length - 1; e7 >= 0; e7--) t7.contents[e7].type === "BLANK_LINE" ? t7.contents.splice(e7, 1) : wt(t7.contents[e7]);
for (let e7 = t7.directives.length - 1; e7 >= 0; e7--) t7.directives[e7].type === "BLANK_LINE" && t7.directives.splice(e7, 1);
break;
case "FLOW_MAP":
case "FLOW_SEQ":
case "MAP":
case "SEQ":
for (let e7 = t7.items.length - 1; e7 >= 0; e7--) {
let n27 = t7.items[e7];
"char" in n27 || (n27.type === "BLANK_LINE" ? t7.items.splice(e7, 1) : wt(n27));
}
break;
case "MAP_KEY":
case "MAP_VALUE":
case "SEQ_ITEM":
t7.node && wt(t7.node);
break;
case "ALIAS":
case "BLANK_LINE":
case "BLOCK_FOLDED":
case "BLOCK_LITERAL":
case "COMMENT":
case "DIRECTIVE":
case "PLAIN":
case "QUOTE_DOUBLE":
case "QUOTE_SINGLE":
break;
default:
throw new Error(`Unexpected node type ${JSON.stringify(t7.type)}`);
}
}
function J(t7, e7) {
return { start: t7, end: e7 };
}
function nr(t7) {
return { start: t7, end: t7 };
}
function js(t7, e7) {
return { ...b("anchor", t7), value: e7 };
}
function Ge(t7, e7) {
return { ...b("comment", t7), value: e7 };
}
function Ws(t7, e7, n27) {
return { anchor: e7, tag: t7, middleComments: n27 };
}
function Qs(t7, e7) {
return { ...b("tag", t7), value: e7 };
}
function zt(t7, e7, n27 = () => false) {
let r4 = t7.cstNode, s = [], i = null, o5 = null, a5 = null;
for (let c5 of r4.props) {
let l5 = e7.text[c5.origStart];
switch (l5) {
case ue.Tag:
i = i || c5, o5 = Qs(e7.transformRange(c5), t7.tag);
break;
case ue.Anchor:
i = i || c5, a5 = js(e7.transformRange(c5), r4.anchor);
break;
case ue.Comment: {
let f5 = Ge(e7.transformRange(c5), e7.text.slice(c5.origStart + 1, c5.origEnd));
e7.comments.push(f5), !n27(f5) && i && i.origEnd <= c5.origStart && c5.origEnd <= r4.valueRange.origStart && s.push(f5);
break;
}
default:
throw new Error(`Unexpected leading character ${JSON.stringify(l5)}`);
}
}
return Ws(o5, a5, s);
}
function X() {
return { leadingComments: [] };
}
function pe(t7 = null) {
return { trailingComment: t7 };
}
function F() {
return { ...X(), ...pe() };
}
function Gs(t7, e7, n27) {
return { ...b("alias", t7), ...F(), ...e7, value: n27 };
}
function Hs(t7, e7) {
let n27 = t7.cstNode;
return Gs(e7.transformRange({ origStart: n27.valueRange.origStart - 1, origEnd: n27.valueRange.origEnd }), e7.transformContent(t7), n27.rawValue);
}
function Js(t7) {
return { ...t7, type: "blockFolded" };
}
function Xs(t7, e7, n27, r4, s, i) {
return { ...b("blockValue", t7), ...X(), ...e7, chomping: n27, indent: r4, value: s, indicatorComment: i };
}
function Zt(t7, e7) {
let n27 = t7.cstNode, r4 = 1, s = n27.chomping === "CLIP" ? 0 : 1, o5 = n27.header.origEnd - n27.header.origStart - r4 - s !== 0, a5 = e7.transformRange({ origStart: n27.header.origStart, origEnd: n27.valueRange.origEnd }), c5 = null, l5 = zt(t7, e7, (f5) => {
if (!(a5.start.offset < f5.position.start.offset && f5.position.end.offset < a5.end.offset)) return false;
if (c5) throw new Error(`Unexpected multiple indicator comments at ${Ae(f5.position.start)}`);
return c5 = f5, true;
});
return Xs(a5, l5, rr[n27.chomping], o5 ? n27.blockIndent : null, n27.strValue, c5);
}
function zs(t7, e7) {
return Js(Zt(t7, e7));
}
function Zs(t7) {
return { ...t7, type: "blockLiteral" };
}
function ei(t7, e7) {
return Zs(Zt(t7, e7));
}
function ti(t7, e7) {
return Ge(e7.transformRange(t7.range), t7.comment);
}
function ni(t7, e7, n27) {
return { ...b("directive", t7), ...F(), name: e7, parameters: n27 };
}
function He(t7, e7) {
for (let n27 of t7.props) {
let r4 = e7.text[n27.origStart];
switch (r4) {
case ue.Comment:
e7.comments.push(Ge(e7.transformRange(n27), e7.text.slice(n27.origStart + 1, n27.origEnd)));
break;
default:
throw new Error(`Unexpected leading character ${JSON.stringify(r4)}`);
}
}
}
function ri(t7, e7) {
return He(t7, e7), ni(e7.transformRange(t7.range), t7.name, t7.parameters);
}
function si(t7, e7, n27, r4) {
return { ...b("document", t7), ...pe(r4), children: [e7, n27] };
}
function q(t7 = []) {
return { endComments: t7 };
}
function ii(t7, e7, n27) {
return { ...b("documentBody", t7), ...q(n27), children: e7 ? [e7] : [] };
}
function U(t7) {
return t7[t7.length - 1];
}
function en(t7, e7) {
let n27 = t7.match(e7);
return n27 ? n27.index : -1;
}
function oi(t7, e7, n27) {
let r4 = t7.cstNode, { comments: s, endComments: i, documentTrailingComment: o5, documentHeadTrailingComment: a5 } = Ka(r4, e7, n27), c5 = e7.transformNode(t7.contents), { position: l5, documentEndPoint: f5 } = Va(r4, c5, e7);
return e7.comments.push(...s, ...i), { documentBody: ii(l5, c5, i), documentEndPoint: f5, documentTrailingComment: o5, documentHeadTrailingComment: a5 };
}
function Ka(t7, e7, n27) {
let r4 = [], s = [], i = [], o5 = [], a5 = false;
for (let c5 = t7.contents.length - 1; c5 >= 0; c5--) {
let l5 = t7.contents[c5];
if (l5.type === "COMMENT") {
let f5 = e7.transformNode(l5);
n27 && n27.line === f5.position.start.line ? o5.unshift(f5) : a5 ? r4.unshift(f5) : f5.position.start.offset >= t7.valueRange.origEnd ? i.unshift(f5) : r4.unshift(f5);
} else a5 = true;
}
if (i.length > 1) throw new Error(`Unexpected multiple document trailing comments at ${Ae(i[1].position.start)}`);
if (o5.length > 1) throw new Error(`Unexpected multiple documentHead trailing comments at ${Ae(o5[1].position.start)}`);
return { comments: r4, endComments: s, documentTrailingComment: U(i) || null, documentHeadTrailingComment: U(o5) || null };
}
function Va(t7, e7, n27) {
let r4 = en(n27.text.slice(t7.valueRange.origEnd), /^\.\.\./), s = r4 === -1 ? t7.valueRange.origEnd : Math.max(0, t7.valueRange.origEnd - 1);
n27.text[s - 1] === "\r" && s--;
let i = n27.transformRange({ origStart: e7 !== null ? e7.position.start.offset : s, origEnd: s }), o5 = r4 === -1 ? i.end : n27.transformOffset(t7.valueRange.origEnd + 3);
return { position: i, documentEndPoint: o5 };
}
function ai(t7, e7, n27, r4) {
return { ...b("documentHead", t7), ...q(n27), ...pe(r4), children: e7 };
}
function ci(t7, e7) {
let n27 = t7.cstNode, { directives: r4, comments: s, endComments: i } = ja(n27, e7), { position: o5, endMarkerPoint: a5 } = Wa(n27, r4, e7);
return e7.comments.push(...s, ...i), { createDocumentHeadWithTrailingComment: (l5) => (l5 && e7.comments.push(l5), ai(o5, r4, i, l5)), documentHeadEndMarkerPoint: a5 };
}
function ja(t7, e7) {
let n27 = [], r4 = [], s = [], i = false;
for (let o5 = t7.directives.length - 1; o5 >= 0; o5--) {
let a5 = e7.transformNode(t7.directives[o5]);
a5.type === "comment" ? i ? r4.unshift(a5) : s.unshift(a5) : (i = true, n27.unshift(a5));
}
return { directives: n27, comments: r4, endComments: s };
}
function Wa(t7, e7, n27) {
let r4 = en(n27.text.slice(0, t7.valueRange.origStart), /---\s*$/);
r4 > 0 && !/[\r\n]/.test(n27.text[r4 - 1]) && (r4 = -1);
let s = r4 === -1 ? { origStart: t7.valueRange.origStart, origEnd: t7.valueRange.origStart } : { origStart: r4, origEnd: r4 + 3 };
return e7.length !== 0 && (s.origStart = e7[0].position.start.offset), { position: n27.transformRange(s), endMarkerPoint: r4 === -1 ? null : n27.transformOffset(r4) };
}
function li(t7, e7) {
let { createDocumentHeadWithTrailingComment: n27, documentHeadEndMarkerPoint: r4 } = ci(t7, e7), { documentBody: s, documentEndPoint: i, documentTrailingComment: o5, documentHeadTrailingComment: a5 } = oi(t7, e7, r4), c5 = n27(a5);
return o5 && e7.comments.push(o5), si(J(c5.position.start, i), c5, s, o5);
}
function tn(t7, e7, n27) {
return { ...b("flowCollection", t7), ...F(), ...q(), ...e7, children: n27 };
}
function fi(t7, e7, n27) {
return { ...tn(t7, e7, n27), type: "flowMapping" };
}
function nn(t7, e7, n27) {
return { ...b("flowMappingItem", t7), ...X(), children: [e7, n27] };
}
function me(t7, e7) {
let n27 = [];
for (let r4 of t7) r4 && "type" in r4 && r4.type === "COMMENT" ? e7.comments.push(e7.transformNode(r4)) : n27.push(r4);
return n27;
}
function rn(t7) {
let [e7, n27] = ["?", ":"].map((r4) => {
let s = t7.find((i) => "char" in i && i.char === r4);
return s ? { origStart: s.origOffset, origEnd: s.origOffset + 1 } : null;
});
return { additionalKeyRange: e7, additionalValueRange: n27 };
}
function sn(t7, e7) {
let n27 = e7;
return (r4) => t7.slice(n27, n27 = r4);
}
function on(t7) {
let e7 = [], n27 = sn(t7, 1), r4 = false;
for (let s = 1; s < t7.length - 1; s++) {
let i = t7[s];
if ("char" in i && i.char === ",") {
e7.push(n27(s)), n27(s + 1), r4 = false;
continue;
}
r4 = true;
}
return r4 && e7.push(n27(t7.length - 1)), e7;
}
function sr(t7, e7) {
return { ...b("mappingKey", t7), ...pe(), ...q(), children: e7 ? [e7] : [] };
}
function ir(t7, e7) {
return { ...b("mappingValue", t7), ...F(), ...q(), children: e7 ? [e7] : [] };
}
function Je(t7, e7, n27, r4, s) {
let i = e7.transformNode(t7.key), o5 = e7.transformNode(t7.value), a5 = i || r4 ? sr(e7.transformRange({ origStart: r4 ? r4.origStart : i.position.start.offset, origEnd: i ? i.position.end.offset : r4.origStart + 1 }), i) : null, c5 = o5 || s ? ir(e7.transformRange({ origStart: s ? s.origStart : o5.position.start.offset, origEnd: o5 ? o5.position.end.offset : s.origStart + 1 }), o5) : null;
return n27(J(a5 ? a5.position.start : c5.position.start, c5 ? c5.position.end : a5.position.end), a5 || sr(nr(c5.position.start), null), c5 || ir(nr(a5.position.end), null));
}
func