/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ 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 __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[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 = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; 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 )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; var __accessCheck = (obj, member, msg) => { if (!member.has(obj)) throw TypeError("Cannot " + msg); }; var __privateGet = (obj, member, getter) => { __accessCheck(obj, member, "read from private field"); return getter ? getter.call(obj) : member.get(obj); }; var __privateAdd = (obj, member, value) => { if (member.has(obj)) throw TypeError("Cannot add the same private member more than once"); member instanceof WeakSet ? member.add(obj) : member.set(obj, value); }; var __privateSet = (obj, member, value, setter) => { __accessCheck(obj, member, "write to private field"); setter ? setter.call(obj, value) : member.set(obj, value); return value; }; var __privateWrapper = (obj, member, setter, getter) => ({ set _(value) { __privateSet(obj, member, value, setter); }, get _() { return __privateGet(obj, member, getter); } }); // node_modules/@marp-team/marpit/lib/element.js var require_element = __commonJS({ "node_modules/@marp-team/marpit/lib/element.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.marpitContainer = exports2.default = void 0; var Element = class { /** * Create a Element instance. * * Element instance has compatibility with a plain object that is consists by * `tag` key and pairs of attribute names and values. A difference is whether * object has been frozen. * * ```js * import assert from 'assert' * import { Element } from 'marpit' * * const obj = { tag: 'div', class: 'marpit' } * const elm = new Element('div', { class: 'marpit' }) * * // This assertion would pass. * assert.deepStrictEqual(obj, { ...elm }) * ``` * * @param {string} tag Tag name * @param {Object} [attributes={}] Tag attributes */ constructor(tag, attributes = {}) { Object.defineProperties(this, { attributes: { value: attributes }, tag: { enumerable: true, value: tag } }); for (const attr of Object.keys(attributes)) { Object.defineProperty(this, attr, { enumerable: true, value: attributes[attr] }); } Object.freeze(this); } }; var marpitContainer = new Element("div", { class: "marpit" }); exports2.marpitContainer = marpitContainer; var _default = Element; exports2.default = _default; } }); // node_modules/entities/lib/maps/entities.json var require_entities = __commonJS({ "node_modules/entities/lib/maps/entities.json"(exports2, module2) { module2.exports = { Aacute: "\xC1", aacute: "\xE1", Abreve: "\u0102", abreve: "\u0103", ac: "\u223E", acd: "\u223F", acE: "\u223E\u0333", Acirc: "\xC2", acirc: "\xE2", acute: "\xB4", Acy: "\u0410", acy: "\u0430", AElig: "\xC6", aelig: "\xE6", af: "\u2061", Afr: "\u{1D504}", afr: "\u{1D51E}", Agrave: "\xC0", agrave: "\xE0", alefsym: "\u2135", aleph: "\u2135", Alpha: "\u0391", alpha: "\u03B1", Amacr: "\u0100", amacr: "\u0101", amalg: "\u2A3F", amp: "&", AMP: "&", andand: "\u2A55", And: "\u2A53", and: "\u2227", andd: "\u2A5C", andslope: "\u2A58", andv: "\u2A5A", ang: "\u2220", ange: "\u29A4", angle: "\u2220", angmsdaa: "\u29A8", angmsdab: "\u29A9", angmsdac: "\u29AA", angmsdad: "\u29AB", angmsdae: "\u29AC", angmsdaf: "\u29AD", angmsdag: "\u29AE", angmsdah: "\u29AF", angmsd: "\u2221", angrt: "\u221F", angrtvb: "\u22BE", angrtvbd: "\u299D", angsph: "\u2222", angst: "\xC5", angzarr: "\u237C", Aogon: "\u0104", aogon: "\u0105", Aopf: "\u{1D538}", aopf: "\u{1D552}", apacir: "\u2A6F", ap: "\u2248", apE: "\u2A70", ape: "\u224A", apid: "\u224B", apos: "'", ApplyFunction: "\u2061", approx: "\u2248", approxeq: "\u224A", Aring: "\xC5", aring: "\xE5", Ascr: "\u{1D49C}", ascr: "\u{1D4B6}", Assign: "\u2254", ast: "*", asymp: "\u2248", asympeq: "\u224D", Atilde: "\xC3", atilde: "\xE3", Auml: "\xC4", auml: "\xE4", awconint: "\u2233", awint: "\u2A11", backcong: "\u224C", backepsilon: "\u03F6", backprime: "\u2035", backsim: "\u223D", backsimeq: "\u22CD", Backslash: "\u2216", Barv: "\u2AE7", barvee: "\u22BD", barwed: "\u2305", Barwed: "\u2306", barwedge: "\u2305", bbrk: "\u23B5", bbrktbrk: "\u23B6", bcong: "\u224C", Bcy: "\u0411", bcy: "\u0431", bdquo: "\u201E", becaus: "\u2235", because: "\u2235", Because: "\u2235", bemptyv: "\u29B0", bepsi: "\u03F6", bernou: "\u212C", Bernoullis: "\u212C", Beta: "\u0392", beta: "\u03B2", beth: "\u2136", between: "\u226C", Bfr: "\u{1D505}", bfr: "\u{1D51F}", bigcap: "\u22C2", bigcirc: "\u25EF", bigcup: "\u22C3", bigodot: "\u2A00", bigoplus: "\u2A01", bigotimes: "\u2A02", bigsqcup: "\u2A06", bigstar: "\u2605", bigtriangledown: "\u25BD", bigtriangleup: "\u25B3", biguplus: "\u2A04", bigvee: "\u22C1", bigwedge: "\u22C0", bkarow: "\u290D", blacklozenge: "\u29EB", blacksquare: "\u25AA", blacktriangle: "\u25B4", blacktriangledown: "\u25BE", blacktriangleleft: "\u25C2", blacktriangleright: "\u25B8", blank: "\u2423", blk12: "\u2592", blk14: "\u2591", blk34: "\u2593", block: "\u2588", bne: "=\u20E5", bnequiv: "\u2261\u20E5", bNot: "\u2AED", bnot: "\u2310", Bopf: "\u{1D539}", bopf: "\u{1D553}", bot: "\u22A5", bottom: "\u22A5", bowtie: "\u22C8", boxbox: "\u29C9", boxdl: "\u2510", boxdL: "\u2555", boxDl: "\u2556", boxDL: "\u2557", boxdr: "\u250C", boxdR: "\u2552", boxDr: "\u2553", boxDR: "\u2554", boxh: "\u2500", boxH: "\u2550", boxhd: "\u252C", boxHd: "\u2564", boxhD: "\u2565", boxHD: "\u2566", boxhu: "\u2534", boxHu: "\u2567", boxhU: "\u2568", boxHU: "\u2569", boxminus: "\u229F", boxplus: "\u229E", boxtimes: "\u22A0", boxul: "\u2518", boxuL: "\u255B", boxUl: "\u255C", boxUL: "\u255D", boxur: "\u2514", boxuR: "\u2558", boxUr: "\u2559", boxUR: "\u255A", boxv: "\u2502", boxV: "\u2551", boxvh: "\u253C", boxvH: "\u256A", boxVh: "\u256B", boxVH: "\u256C", boxvl: "\u2524", boxvL: "\u2561", boxVl: "\u2562", boxVL: "\u2563", boxvr: "\u251C", boxvR: "\u255E", boxVr: "\u255F", boxVR: "\u2560", bprime: "\u2035", breve: "\u02D8", Breve: "\u02D8", brvbar: "\xA6", bscr: "\u{1D4B7}", Bscr: "\u212C", bsemi: "\u204F", bsim: "\u223D", bsime: "\u22CD", bsolb: "\u29C5", bsol: "\\", bsolhsub: "\u27C8", bull: "\u2022", bullet: "\u2022", bump: "\u224E", bumpE: "\u2AAE", bumpe: "\u224F", Bumpeq: "\u224E", bumpeq: "\u224F", Cacute: "\u0106", cacute: "\u0107", capand: "\u2A44", capbrcup: "\u2A49", capcap: "\u2A4B", cap: "\u2229", Cap: "\u22D2", capcup: "\u2A47", capdot: "\u2A40", CapitalDifferentialD: "\u2145", caps: "\u2229\uFE00", caret: "\u2041", caron: "\u02C7", Cayleys: "\u212D", ccaps: "\u2A4D", Ccaron: "\u010C", ccaron: "\u010D", Ccedil: "\xC7", ccedil: "\xE7", Ccirc: "\u0108", ccirc: "\u0109", Cconint: "\u2230", ccups: "\u2A4C", ccupssm: "\u2A50", Cdot: "\u010A", cdot: "\u010B", cedil: "\xB8", Cedilla: "\xB8", cemptyv: "\u29B2", cent: "\xA2", centerdot: "\xB7", CenterDot: "\xB7", cfr: "\u{1D520}", Cfr: "\u212D", CHcy: "\u0427", chcy: "\u0447", check: "\u2713", checkmark: "\u2713", Chi: "\u03A7", chi: "\u03C7", circ: "\u02C6", circeq: "\u2257", circlearrowleft: "\u21BA", circlearrowright: "\u21BB", circledast: "\u229B", circledcirc: "\u229A", circleddash: "\u229D", CircleDot: "\u2299", circledR: "\xAE", circledS: "\u24C8", CircleMinus: "\u2296", CirclePlus: "\u2295", CircleTimes: "\u2297", cir: "\u25CB", cirE: "\u29C3", cire: "\u2257", cirfnint: "\u2A10", cirmid: "\u2AEF", cirscir: "\u29C2", ClockwiseContourIntegral: "\u2232", CloseCurlyDoubleQuote: "\u201D", CloseCurlyQuote: "\u2019", clubs: "\u2663", clubsuit: "\u2663", colon: ":", Colon: "\u2237", Colone: "\u2A74", colone: "\u2254", coloneq: "\u2254", comma: ",", commat: "@", comp: "\u2201", compfn: "\u2218", complement: "\u2201", complexes: "\u2102", cong: "\u2245", congdot: "\u2A6D", Congruent: "\u2261", conint: "\u222E", Conint: "\u222F", ContourIntegral: "\u222E", copf: "\u{1D554}", Copf: "\u2102", coprod: "\u2210", Coproduct: "\u2210", copy: "\xA9", COPY: "\xA9", copysr: "\u2117", CounterClockwiseContourIntegral: "\u2233", crarr: "\u21B5", cross: "\u2717", Cross: "\u2A2F", Cscr: "\u{1D49E}", cscr: "\u{1D4B8}", csub: "\u2ACF", csube: "\u2AD1", csup: "\u2AD0", csupe: "\u2AD2", ctdot: "\u22EF", cudarrl: "\u2938", cudarrr: "\u2935", cuepr: "\u22DE", cuesc: "\u22DF", cularr: "\u21B6", cularrp: "\u293D", cupbrcap: "\u2A48", cupcap: "\u2A46", CupCap: "\u224D", cup: "\u222A", Cup: "\u22D3", cupcup: "\u2A4A", cupdot: "\u228D", cupor: "\u2A45", cups: "\u222A\uFE00", curarr: "\u21B7", curarrm: "\u293C", curlyeqprec: "\u22DE", curlyeqsucc: "\u22DF", curlyvee: "\u22CE", curlywedge: "\u22CF", curren: "\xA4", curvearrowleft: "\u21B6", curvearrowright: "\u21B7", cuvee: "\u22CE", cuwed: "\u22CF", cwconint: "\u2232", cwint: "\u2231", cylcty: "\u232D", dagger: "\u2020", Dagger: "\u2021", daleth: "\u2138", darr: "\u2193", Darr: "\u21A1", dArr: "\u21D3", dash: "\u2010", Dashv: "\u2AE4", dashv: "\u22A3", dbkarow: "\u290F", dblac: "\u02DD", Dcaron: "\u010E", dcaron: "\u010F", Dcy: "\u0414", dcy: "\u0434", ddagger: "\u2021", ddarr: "\u21CA", DD: "\u2145", dd: "\u2146", DDotrahd: "\u2911", ddotseq: "\u2A77", deg: "\xB0", Del: "\u2207", Delta: "\u0394", delta: "\u03B4", demptyv: "\u29B1", dfisht: "\u297F", Dfr: "\u{1D507}", dfr: "\u{1D521}", dHar: "\u2965", dharl: "\u21C3", dharr: "\u21C2", DiacriticalAcute: "\xB4", DiacriticalDot: "\u02D9", DiacriticalDoubleAcute: "\u02DD", DiacriticalGrave: "`", DiacriticalTilde: "\u02DC", diam: "\u22C4", diamond: "\u22C4", Diamond: "\u22C4", diamondsuit: "\u2666", diams: "\u2666", die: "\xA8", DifferentialD: "\u2146", digamma: "\u03DD", disin: "\u22F2", div: "\xF7", divide: "\xF7", divideontimes: "\u22C7", divonx: "\u22C7", DJcy: "\u0402", djcy: "\u0452", dlcorn: "\u231E", dlcrop: "\u230D", dollar: "$", Dopf: "\u{1D53B}", dopf: "\u{1D555}", Dot: "\xA8", dot: "\u02D9", DotDot: "\u20DC", doteq: "\u2250", doteqdot: "\u2251", DotEqual: "\u2250", dotminus: "\u2238", dotplus: "\u2214", dotsquare: "\u22A1", doublebarwedge: "\u2306", DoubleContourIntegral: "\u222F", DoubleDot: "\xA8", DoubleDownArrow: "\u21D3", DoubleLeftArrow: "\u21D0", DoubleLeftRightArrow: "\u21D4", DoubleLeftTee: "\u2AE4", DoubleLongLeftArrow: "\u27F8", DoubleLongLeftRightArrow: "\u27FA", DoubleLongRightArrow: "\u27F9", DoubleRightArrow: "\u21D2", DoubleRightTee: "\u22A8", DoubleUpArrow: "\u21D1", DoubleUpDownArrow: "\u21D5", DoubleVerticalBar: "\u2225", DownArrowBar: "\u2913", downarrow: "\u2193", DownArrow: "\u2193", Downarrow: "\u21D3", DownArrowUpArrow: "\u21F5", DownBreve: "\u0311", downdownarrows: "\u21CA", downharpoonleft: "\u21C3", downharpoonright: "\u21C2", DownLeftRightVector: "\u2950", DownLeftTeeVector: "\u295E", DownLeftVectorBar: "\u2956", DownLeftVector: "\u21BD", DownRightTeeVector: "\u295F", DownRightVectorBar: "\u2957", DownRightVector: "\u21C1", DownTeeArrow: "\u21A7", DownTee: "\u22A4", drbkarow: "\u2910", drcorn: "\u231F", drcrop: "\u230C", Dscr: "\u{1D49F}", dscr: "\u{1D4B9}", DScy: "\u0405", dscy: "\u0455", dsol: "\u29F6", Dstrok: "\u0110", dstrok: "\u0111", dtdot: "\u22F1", dtri: "\u25BF", dtrif: "\u25BE", duarr: "\u21F5", duhar: "\u296F", dwangle: "\u29A6", DZcy: "\u040F", dzcy: "\u045F", dzigrarr: "\u27FF", Eacute: "\xC9", eacute: "\xE9", easter: "\u2A6E", Ecaron: "\u011A", ecaron: "\u011B", Ecirc: "\xCA", ecirc: "\xEA", ecir: "\u2256", ecolon: "\u2255", Ecy: "\u042D", ecy: "\u044D", eDDot: "\u2A77", Edot: "\u0116", edot: "\u0117", eDot: "\u2251", ee: "\u2147", efDot: "\u2252", Efr: "\u{1D508}", efr: "\u{1D522}", eg: "\u2A9A", Egrave: "\xC8", egrave: "\xE8", egs: "\u2A96", egsdot: "\u2A98", el: "\u2A99", Element: "\u2208", elinters: "\u23E7", ell: "\u2113", els: "\u2A95", elsdot: "\u2A97", Emacr: "\u0112", emacr: "\u0113", empty: "\u2205", emptyset: "\u2205", EmptySmallSquare: "\u25FB", emptyv: "\u2205", EmptyVerySmallSquare: "\u25AB", emsp13: "\u2004", emsp14: "\u2005", emsp: "\u2003", ENG: "\u014A", eng: "\u014B", ensp: "\u2002", Eogon: "\u0118", eogon: "\u0119", Eopf: "\u{1D53C}", eopf: "\u{1D556}", epar: "\u22D5", eparsl: "\u29E3", eplus: "\u2A71", epsi: "\u03B5", Epsilon: "\u0395", epsilon: "\u03B5", epsiv: "\u03F5", eqcirc: "\u2256", eqcolon: "\u2255", eqsim: "\u2242", eqslantgtr: "\u2A96", eqslantless: "\u2A95", Equal: "\u2A75", equals: "=", EqualTilde: "\u2242", equest: "\u225F", Equilibrium: "\u21CC", equiv: "\u2261", equivDD: "\u2A78", eqvparsl: "\u29E5", erarr: "\u2971", erDot: "\u2253", escr: "\u212F", Escr: "\u2130", esdot: "\u2250", Esim: "\u2A73", esim: "\u2242", Eta: "\u0397", eta: "\u03B7", ETH: "\xD0", eth: "\xF0", Euml: "\xCB", euml: "\xEB", euro: "\u20AC", excl: "!", exist: "\u2203", Exists: "\u2203", expectation: "\u2130", exponentiale: "\u2147", ExponentialE: "\u2147", fallingdotseq: "\u2252", Fcy: "\u0424", fcy: "\u0444", female: "\u2640", ffilig: "\uFB03", fflig: "\uFB00", ffllig: "\uFB04", Ffr: "\u{1D509}", ffr: "\u{1D523}", filig: "\uFB01", FilledSmallSquare: "\u25FC", FilledVerySmallSquare: "\u25AA", fjlig: "fj", flat: "\u266D", fllig: "\uFB02", fltns: "\u25B1", fnof: "\u0192", Fopf: "\u{1D53D}", fopf: "\u{1D557}", forall: "\u2200", ForAll: "\u2200", fork: "\u22D4", forkv: "\u2AD9", Fouriertrf: "\u2131", fpartint: "\u2A0D", frac12: "\xBD", frac13: "\u2153", frac14: "\xBC", frac15: "\u2155", frac16: "\u2159", frac18: "\u215B", frac23: "\u2154", frac25: "\u2156", frac34: "\xBE", frac35: "\u2157", frac38: "\u215C", frac45: "\u2158", frac56: "\u215A", frac58: "\u215D", frac78: "\u215E", frasl: "\u2044", frown: "\u2322", fscr: "\u{1D4BB}", Fscr: "\u2131", gacute: "\u01F5", Gamma: "\u0393", gamma: "\u03B3", Gammad: "\u03DC", gammad: "\u03DD", gap: "\u2A86", Gbreve: "\u011E", gbreve: "\u011F", Gcedil: "\u0122", Gcirc: "\u011C", gcirc: "\u011D", Gcy: "\u0413", gcy: "\u0433", Gdot: "\u0120", gdot: "\u0121", ge: "\u2265", gE: "\u2267", gEl: "\u2A8C", gel: "\u22DB", geq: "\u2265", geqq: "\u2267", geqslant: "\u2A7E", gescc: "\u2AA9", ges: "\u2A7E", gesdot: "\u2A80", gesdoto: "\u2A82", gesdotol: "\u2A84", gesl: "\u22DB\uFE00", gesles: "\u2A94", Gfr: "\u{1D50A}", gfr: "\u{1D524}", gg: "\u226B", Gg: "\u22D9", ggg: "\u22D9", gimel: "\u2137", GJcy: "\u0403", gjcy: "\u0453", gla: "\u2AA5", gl: "\u2277", glE: "\u2A92", glj: "\u2AA4", gnap: "\u2A8A", gnapprox: "\u2A8A", gne: "\u2A88", gnE: "\u2269", gneq: "\u2A88", gneqq: "\u2269", gnsim: "\u22E7", Gopf: "\u{1D53E}", gopf: "\u{1D558}", grave: "`", GreaterEqual: "\u2265", GreaterEqualLess: "\u22DB", GreaterFullEqual: "\u2267", GreaterGreater: "\u2AA2", GreaterLess: "\u2277", GreaterSlantEqual: "\u2A7E", GreaterTilde: "\u2273", Gscr: "\u{1D4A2}", gscr: "\u210A", gsim: "\u2273", gsime: "\u2A8E", gsiml: "\u2A90", gtcc: "\u2AA7", gtcir: "\u2A7A", gt: ">", GT: ">", Gt: "\u226B", gtdot: "\u22D7", gtlPar: "\u2995", gtquest: "\u2A7C", gtrapprox: "\u2A86", gtrarr: "\u2978", gtrdot: "\u22D7", gtreqless: "\u22DB", gtreqqless: "\u2A8C", gtrless: "\u2277", gtrsim: "\u2273", gvertneqq: "\u2269\uFE00", gvnE: "\u2269\uFE00", Hacek: "\u02C7", hairsp: "\u200A", half: "\xBD", hamilt: "\u210B", HARDcy: "\u042A", hardcy: "\u044A", harrcir: "\u2948", harr: "\u2194", hArr: "\u21D4", harrw: "\u21AD", Hat: "^", hbar: "\u210F", Hcirc: "\u0124", hcirc: "\u0125", hearts: "\u2665", heartsuit: "\u2665", hellip: "\u2026", hercon: "\u22B9", hfr: "\u{1D525}", Hfr: "\u210C", HilbertSpace: "\u210B", hksearow: "\u2925", hkswarow: "\u2926", hoarr: "\u21FF", homtht: "\u223B", hookleftarrow: "\u21A9", hookrightarrow: "\u21AA", hopf: "\u{1D559}", Hopf: "\u210D", horbar: "\u2015", HorizontalLine: "\u2500", hscr: "\u{1D4BD}", Hscr: "\u210B", hslash: "\u210F", Hstrok: "\u0126", hstrok: "\u0127", HumpDownHump: "\u224E", HumpEqual: "\u224F", hybull: "\u2043", hyphen: "\u2010", Iacute: "\xCD", iacute: "\xED", ic: "\u2063", Icirc: "\xCE", icirc: "\xEE", Icy: "\u0418", icy: "\u0438", Idot: "\u0130", IEcy: "\u0415", iecy: "\u0435", iexcl: "\xA1", iff: "\u21D4", ifr: "\u{1D526}", Ifr: "\u2111", Igrave: "\xCC", igrave: "\xEC", ii: "\u2148", iiiint: "\u2A0C", iiint: "\u222D", iinfin: "\u29DC", iiota: "\u2129", IJlig: "\u0132", ijlig: "\u0133", Imacr: "\u012A", imacr: "\u012B", image: "\u2111", ImaginaryI: "\u2148", imagline: "\u2110", imagpart: "\u2111", imath: "\u0131", Im: "\u2111", imof: "\u22B7", imped: "\u01B5", Implies: "\u21D2", incare: "\u2105", in: "\u2208", infin: "\u221E", infintie: "\u29DD", inodot: "\u0131", intcal: "\u22BA", int: "\u222B", Int: "\u222C", integers: "\u2124", Integral: "\u222B", intercal: "\u22BA", Intersection: "\u22C2", intlarhk: "\u2A17", intprod: "\u2A3C", InvisibleComma: "\u2063", InvisibleTimes: "\u2062", IOcy: "\u0401", iocy: "\u0451", Iogon: "\u012E", iogon: "\u012F", Iopf: "\u{1D540}", iopf: "\u{1D55A}", Iota: "\u0399", iota: "\u03B9", iprod: "\u2A3C", iquest: "\xBF", iscr: "\u{1D4BE}", Iscr: "\u2110", isin: "\u2208", isindot: "\u22F5", isinE: "\u22F9", isins: "\u22F4", isinsv: "\u22F3", isinv: "\u2208", it: "\u2062", Itilde: "\u0128", itilde: "\u0129", Iukcy: "\u0406", iukcy: "\u0456", Iuml: "\xCF", iuml: "\xEF", Jcirc: "\u0134", jcirc: "\u0135", Jcy: "\u0419", jcy: "\u0439", Jfr: "\u{1D50D}", jfr: "\u{1D527}", jmath: "\u0237", Jopf: "\u{1D541}", jopf: "\u{1D55B}", Jscr: "\u{1D4A5}", jscr: "\u{1D4BF}", Jsercy: "\u0408", jsercy: "\u0458", Jukcy: "\u0404", jukcy: "\u0454", Kappa: "\u039A", kappa: "\u03BA", kappav: "\u03F0", Kcedil: "\u0136", kcedil: "\u0137", Kcy: "\u041A", kcy: "\u043A", Kfr: "\u{1D50E}", kfr: "\u{1D528}", kgreen: "\u0138", KHcy: "\u0425", khcy: "\u0445", KJcy: "\u040C", kjcy: "\u045C", Kopf: "\u{1D542}", kopf: "\u{1D55C}", Kscr: "\u{1D4A6}", kscr: "\u{1D4C0}", lAarr: "\u21DA", Lacute: "\u0139", lacute: "\u013A", laemptyv: "\u29B4", lagran: "\u2112", Lambda: "\u039B", lambda: "\u03BB", lang: "\u27E8", Lang: "\u27EA", langd: "\u2991", langle: "\u27E8", lap: "\u2A85", Laplacetrf: "\u2112", laquo: "\xAB", larrb: "\u21E4", larrbfs: "\u291F", larr: "\u2190", Larr: "\u219E", lArr: "\u21D0", larrfs: "\u291D", larrhk: "\u21A9", larrlp: "\u21AB", larrpl: "\u2939", larrsim: "\u2973", larrtl: "\u21A2", latail: "\u2919", lAtail: "\u291B", lat: "\u2AAB", late: "\u2AAD", lates: "\u2AAD\uFE00", lbarr: "\u290C", lBarr: "\u290E", lbbrk: "\u2772", lbrace: "{", lbrack: "[", lbrke: "\u298B", lbrksld: "\u298F", lbrkslu: "\u298D", Lcaron: "\u013D", lcaron: "\u013E", Lcedil: "\u013B", lcedil: "\u013C", lceil: "\u2308", lcub: "{", Lcy: "\u041B", lcy: "\u043B", ldca: "\u2936", ldquo: "\u201C", ldquor: "\u201E", ldrdhar: "\u2967", ldrushar: "\u294B", ldsh: "\u21B2", le: "\u2264", lE: "\u2266", LeftAngleBracket: "\u27E8", LeftArrowBar: "\u21E4", leftarrow: "\u2190", LeftArrow: "\u2190", Leftarrow: "\u21D0", LeftArrowRightArrow: "\u21C6", leftarrowtail: "\u21A2", LeftCeiling: "\u2308", LeftDoubleBracket: "\u27E6", LeftDownTeeVector: "\u2961", LeftDownVectorBar: "\u2959", LeftDownVector: "\u21C3", LeftFloor: "\u230A", leftharpoondown: "\u21BD", leftharpoonup: "\u21BC", leftleftarrows: "\u21C7", leftrightarrow: "\u2194", LeftRightArrow: "\u2194", Leftrightarrow: "\u21D4", leftrightarrows: "\u21C6", leftrightharpoons: "\u21CB", leftrightsquigarrow: "\u21AD", LeftRightVector: "\u294E", LeftTeeArrow: "\u21A4", LeftTee: "\u22A3", LeftTeeVector: "\u295A", leftthreetimes: "\u22CB", LeftTriangleBar: "\u29CF", LeftTriangle: "\u22B2", LeftTriangleEqual: "\u22B4", LeftUpDownVector: "\u2951", LeftUpTeeVector: "\u2960", LeftUpVectorBar: "\u2958", LeftUpVector: "\u21BF", LeftVectorBar: "\u2952", LeftVector: "\u21BC", lEg: "\u2A8B", leg: "\u22DA", leq: "\u2264", leqq: "\u2266", leqslant: "\u2A7D", lescc: "\u2AA8", les: "\u2A7D", lesdot: "\u2A7F", lesdoto: "\u2A81", lesdotor: "\u2A83", lesg: "\u22DA\uFE00", lesges: "\u2A93", lessapprox: "\u2A85", lessdot: "\u22D6", lesseqgtr: "\u22DA", lesseqqgtr: "\u2A8B", LessEqualGreater: "\u22DA", LessFullEqual: "\u2266", LessGreater: "\u2276", lessgtr: "\u2276", LessLess: "\u2AA1", lesssim: "\u2272", LessSlantEqual: "\u2A7D", LessTilde: "\u2272", lfisht: "\u297C", lfloor: "\u230A", Lfr: "\u{1D50F}", lfr: "\u{1D529}", lg: "\u2276", lgE: "\u2A91", lHar: "\u2962", lhard: "\u21BD", lharu: "\u21BC", lharul: "\u296A", lhblk: "\u2584", LJcy: "\u0409", ljcy: "\u0459", llarr: "\u21C7", ll: "\u226A", Ll: "\u22D8", llcorner: "\u231E", Lleftarrow: "\u21DA", llhard: "\u296B", lltri: "\u25FA", Lmidot: "\u013F", lmidot: "\u0140", lmoustache: "\u23B0", lmoust: "\u23B0", lnap: "\u2A89", lnapprox: "\u2A89", lne: "\u2A87", lnE: "\u2268", lneq: "\u2A87", lneqq: "\u2268", lnsim: "\u22E6", loang: "\u27EC", loarr: "\u21FD", lobrk: "\u27E6", longleftarrow: "\u27F5", LongLeftArrow: "\u27F5", Longleftarrow: "\u27F8", longleftrightarrow: "\u27F7", LongLeftRightArrow: "\u27F7", Longleftrightarrow: "\u27FA", longmapsto: "\u27FC", longrightarrow: "\u27F6", LongRightArrow: "\u27F6", Longrightarrow: "\u27F9", looparrowleft: "\u21AB", looparrowright: "\u21AC", lopar: "\u2985", Lopf: "\u{1D543}", lopf: "\u{1D55D}", loplus: "\u2A2D", lotimes: "\u2A34", lowast: "\u2217", lowbar: "_", LowerLeftArrow: "\u2199", LowerRightArrow: "\u2198", loz: "\u25CA", lozenge: "\u25CA", lozf: "\u29EB", lpar: "(", lparlt: "\u2993", lrarr: "\u21C6", lrcorner: "\u231F", lrhar: "\u21CB", lrhard: "\u296D", lrm: "\u200E", lrtri: "\u22BF", lsaquo: "\u2039", lscr: "\u{1D4C1}", Lscr: "\u2112", lsh: "\u21B0", Lsh: "\u21B0", lsim: "\u2272", lsime: "\u2A8D", lsimg: "\u2A8F", lsqb: "[", lsquo: "\u2018", lsquor: "\u201A", Lstrok: "\u0141", lstrok: "\u0142", ltcc: "\u2AA6", ltcir: "\u2A79", lt: "<", LT: "<", Lt: "\u226A", ltdot: "\u22D6", lthree: "\u22CB", ltimes: "\u22C9", ltlarr: "\u2976", ltquest: "\u2A7B", ltri: "\u25C3", ltrie: "\u22B4", ltrif: "\u25C2", ltrPar: "\u2996", lurdshar: "\u294A", luruhar: "\u2966", lvertneqq: "\u2268\uFE00", lvnE: "\u2268\uFE00", macr: "\xAF", male: "\u2642", malt: "\u2720", maltese: "\u2720", Map: "\u2905", map: "\u21A6", mapsto: "\u21A6", mapstodown: "\u21A7", mapstoleft: "\u21A4", mapstoup: "\u21A5", marker: "\u25AE", mcomma: "\u2A29", Mcy: "\u041C", mcy: "\u043C", mdash: "\u2014", mDDot: "\u223A", measuredangle: "\u2221", MediumSpace: "\u205F", Mellintrf: "\u2133", Mfr: "\u{1D510}", mfr: "\u{1D52A}", mho: "\u2127", micro: "\xB5", midast: "*", midcir: "\u2AF0", mid: "\u2223", middot: "\xB7", minusb: "\u229F", minus: "\u2212", minusd: "\u2238", minusdu: "\u2A2A", MinusPlus: "\u2213", mlcp: "\u2ADB", mldr: "\u2026", mnplus: "\u2213", models: "\u22A7", Mopf: "\u{1D544}", mopf: "\u{1D55E}", mp: "\u2213", mscr: "\u{1D4C2}", Mscr: "\u2133", mstpos: "\u223E", Mu: "\u039C", mu: "\u03BC", multimap: "\u22B8", mumap: "\u22B8", nabla: "\u2207", Nacute: "\u0143", nacute: "\u0144", nang: "\u2220\u20D2", nap: "\u2249", napE: "\u2A70\u0338", napid: "\u224B\u0338", napos: "\u0149", napprox: "\u2249", natural: "\u266E", naturals: "\u2115", natur: "\u266E", nbsp: "\xA0", nbump: "\u224E\u0338", nbumpe: "\u224F\u0338", ncap: "\u2A43", Ncaron: "\u0147", ncaron: "\u0148", Ncedil: "\u0145", ncedil: "\u0146", ncong: "\u2247", ncongdot: "\u2A6D\u0338", ncup: "\u2A42", Ncy: "\u041D", ncy: "\u043D", ndash: "\u2013", nearhk: "\u2924", nearr: "\u2197", neArr: "\u21D7", nearrow: "\u2197", ne: "\u2260", nedot: "\u2250\u0338", NegativeMediumSpace: "\u200B", NegativeThickSpace: "\u200B", NegativeThinSpace: "\u200B", NegativeVeryThinSpace: "\u200B", nequiv: "\u2262", nesear: "\u2928", nesim: "\u2242\u0338", NestedGreaterGreater: "\u226B", NestedLessLess: "\u226A", NewLine: "\n", nexist: "\u2204", nexists: "\u2204", Nfr: "\u{1D511}", nfr: "\u{1D52B}", ngE: "\u2267\u0338", nge: "\u2271", ngeq: "\u2271", ngeqq: "\u2267\u0338", ngeqslant: "\u2A7E\u0338", nges: "\u2A7E\u0338", nGg: "\u22D9\u0338", ngsim: "\u2275", nGt: "\u226B\u20D2", ngt: "\u226F", ngtr: "\u226F", nGtv: "\u226B\u0338", nharr: "\u21AE", nhArr: "\u21CE", nhpar: "\u2AF2", ni: "\u220B", nis: "\u22FC", nisd: "\u22FA", niv: "\u220B", NJcy: "\u040A", njcy: "\u045A", nlarr: "\u219A", nlArr: "\u21CD", nldr: "\u2025", nlE: "\u2266\u0338", nle: "\u2270", nleftarrow: "\u219A", nLeftarrow: "\u21CD", nleftrightarrow: "\u21AE", nLeftrightarrow: "\u21CE", nleq: "\u2270", nleqq: "\u2266\u0338", nleqslant: "\u2A7D\u0338", nles: "\u2A7D\u0338", nless: "\u226E", nLl: "\u22D8\u0338", nlsim: "\u2274", nLt: "\u226A\u20D2", nlt: "\u226E", nltri: "\u22EA", nltrie: "\u22EC", nLtv: "\u226A\u0338", nmid: "\u2224", NoBreak: "\u2060", NonBreakingSpace: "\xA0", nopf: "\u{1D55F}", Nopf: "\u2115", Not: "\u2AEC", not: "\xAC", NotCongruent: "\u2262", NotCupCap: "\u226D", NotDoubleVerticalBar: "\u2226", NotElement: "\u2209", NotEqual: "\u2260", NotEqualTilde: "\u2242\u0338", NotExists: "\u2204", NotGreater: "\u226F", NotGreaterEqual: "\u2271", NotGreaterFullEqual: "\u2267\u0338", NotGreaterGreater: "\u226B\u0338", NotGreaterLess: "\u2279", NotGreaterSlantEqual: "\u2A7E\u0338", NotGreaterTilde: "\u2275", NotHumpDownHump: "\u224E\u0338", NotHumpEqual: "\u224F\u0338", notin: "\u2209", notindot: "\u22F5\u0338", notinE: "\u22F9\u0338", notinva: "\u2209", notinvb: "\u22F7", notinvc: "\u22F6", NotLeftTriangleBar: "\u29CF\u0338", NotLeftTriangle: "\u22EA", NotLeftTriangleEqual: "\u22EC", NotLess: "\u226E", NotLessEqual: "\u2270", NotLessGreater: "\u2278", NotLessLess: "\u226A\u0338", NotLessSlantEqual: "\u2A7D\u0338", NotLessTilde: "\u2274", NotNestedGreaterGreater: "\u2AA2\u0338", NotNestedLessLess: "\u2AA1\u0338", notni: "\u220C", notniva: "\u220C", notnivb: "\u22FE", notnivc: "\u22FD", NotPrecedes: "\u2280", NotPrecedesEqual: "\u2AAF\u0338", NotPrecedesSlantEqual: "\u22E0", NotReverseElement: "\u220C", NotRightTriangleBar: "\u29D0\u0338", NotRightTriangle: "\u22EB", NotRightTriangleEqual: "\u22ED", NotSquareSubset: "\u228F\u0338", NotSquareSubsetEqual: "\u22E2", NotSquareSuperset: "\u2290\u0338", NotSquareSupersetEqual: "\u22E3", NotSubset: "\u2282\u20D2", NotSubsetEqual: "\u2288", NotSucceeds: "\u2281", NotSucceedsEqual: "\u2AB0\u0338", NotSucceedsSlantEqual: "\u22E1", NotSucceedsTilde: "\u227F\u0338", NotSuperset: "\u2283\u20D2", NotSupersetEqual: "\u2289", NotTilde: "\u2241", NotTildeEqual: "\u2244", NotTildeFullEqual: "\u2247", NotTildeTilde: "\u2249", NotVerticalBar: "\u2224", nparallel: "\u2226", npar: "\u2226", nparsl: "\u2AFD\u20E5", npart: "\u2202\u0338", npolint: "\u2A14", npr: "\u2280", nprcue: "\u22E0", nprec: "\u2280", npreceq: "\u2AAF\u0338", npre: "\u2AAF\u0338", nrarrc: "\u2933\u0338", nrarr: "\u219B", nrArr: "\u21CF", nrarrw: "\u219D\u0338", nrightarrow: "\u219B", nRightarrow: "\u21CF", nrtri: "\u22EB", nrtrie: "\u22ED", nsc: "\u2281", nsccue: "\u22E1", nsce: "\u2AB0\u0338", Nscr: "\u{1D4A9}", nscr: "\u{1D4C3}", nshortmid: "\u2224", nshortparallel: "\u2226", nsim: "\u2241", nsime: "\u2244", nsimeq: "\u2244", nsmid: "\u2224", nspar: "\u2226", nsqsube: "\u22E2", nsqsupe: "\u22E3", nsub: "\u2284", nsubE: "\u2AC5\u0338", nsube: "\u2288", nsubset: "\u2282\u20D2", nsubseteq: "\u2288", nsubseteqq: "\u2AC5\u0338", nsucc: "\u2281", nsucceq: "\u2AB0\u0338", nsup: "\u2285", nsupE: "\u2AC6\u0338", nsupe: "\u2289", nsupset: "\u2283\u20D2", nsupseteq: "\u2289", nsupseteqq: "\u2AC6\u0338", ntgl: "\u2279", Ntilde: "\xD1", ntilde: "\xF1", ntlg: "\u2278", ntriangleleft: "\u22EA", ntrianglelefteq: "\u22EC", ntriangleright: "\u22EB", ntrianglerighteq: "\u22ED", Nu: "\u039D", nu: "\u03BD", num: "#", numero: "\u2116", numsp: "\u2007", nvap: "\u224D\u20D2", nvdash: "\u22AC", nvDash: "\u22AD", nVdash: "\u22AE", nVDash: "\u22AF", nvge: "\u2265\u20D2", nvgt: ">\u20D2", nvHarr: "\u2904", nvinfin: "\u29DE", nvlArr: "\u2902", nvle: "\u2264\u20D2", nvlt: "<\u20D2", nvltrie: "\u22B4\u20D2", nvrArr: "\u2903", nvrtrie: "\u22B5\u20D2", nvsim: "\u223C\u20D2", nwarhk: "\u2923", nwarr: "\u2196", nwArr: "\u21D6", nwarrow: "\u2196", nwnear: "\u2927", Oacute: "\xD3", oacute: "\xF3", oast: "\u229B", Ocirc: "\xD4", ocirc: "\xF4", ocir: "\u229A", Ocy: "\u041E", ocy: "\u043E", odash: "\u229D", Odblac: "\u0150", odblac: "\u0151", odiv: "\u2A38", odot: "\u2299", odsold: "\u29BC", OElig: "\u0152", oelig: "\u0153", ofcir: "\u29BF", Ofr: "\u{1D512}", ofr: "\u{1D52C}", ogon: "\u02DB", Ograve: "\xD2", ograve: "\xF2", ogt: "\u29C1", ohbar: "\u29B5", ohm: "\u03A9", oint: "\u222E", olarr: "\u21BA", olcir: "\u29BE", olcross: "\u29BB", oline: "\u203E", olt: "\u29C0", Omacr: "\u014C", omacr: "\u014D", Omega: "\u03A9", omega: "\u03C9", Omicron: "\u039F", omicron: "\u03BF", omid: "\u29B6", ominus: "\u2296", Oopf: "\u{1D546}", oopf: "\u{1D560}", opar: "\u29B7", OpenCurlyDoubleQuote: "\u201C", OpenCurlyQuote: "\u2018", operp: "\u29B9", oplus: "\u2295", orarr: "\u21BB", Or: "\u2A54", or: "\u2228", ord: "\u2A5D", order: "\u2134", orderof: "\u2134", ordf: "\xAA", ordm: "\xBA", origof: "\u22B6", oror: "\u2A56", orslope: "\u2A57", orv: "\u2A5B", oS: "\u24C8", Oscr: "\u{1D4AA}", oscr: "\u2134", Oslash: "\xD8", oslash: "\xF8", osol: "\u2298", Otilde: "\xD5", otilde: "\xF5", otimesas: "\u2A36", Otimes: "\u2A37", otimes: "\u2297", Ouml: "\xD6", ouml: "\xF6", ovbar: "\u233D", OverBar: "\u203E", OverBrace: "\u23DE", OverBracket: "\u23B4", OverParenthesis: "\u23DC", para: "\xB6", parallel: "\u2225", par: "\u2225", parsim: "\u2AF3", parsl: "\u2AFD", part: "\u2202", PartialD: "\u2202", Pcy: "\u041F", pcy: "\u043F", percnt: "%", period: ".", permil: "\u2030", perp: "\u22A5", pertenk: "\u2031", Pfr: "\u{1D513}", pfr: "\u{1D52D}", Phi: "\u03A6", phi: "\u03C6", phiv: "\u03D5", phmmat: "\u2133", phone: "\u260E", Pi: "\u03A0", pi: "\u03C0", pitchfork: "\u22D4", piv: "\u03D6", planck: "\u210F", planckh: "\u210E", plankv: "\u210F", plusacir: "\u2A23", plusb: "\u229E", pluscir: "\u2A22", plus: "+", plusdo: "\u2214", plusdu: "\u2A25", pluse: "\u2A72", PlusMinus: "\xB1", plusmn: "\xB1", plussim: "\u2A26", plustwo: "\u2A27", pm: "\xB1", Poincareplane: "\u210C", pointint: "\u2A15", popf: "\u{1D561}", Popf: "\u2119", pound: "\xA3", prap: "\u2AB7", Pr: "\u2ABB", pr: "\u227A", prcue: "\u227C", precapprox: "\u2AB7", prec: "\u227A", preccurlyeq: "\u227C", Precedes: "\u227A", PrecedesEqual: "\u2AAF", PrecedesSlantEqual: "\u227C", PrecedesTilde: "\u227E", preceq: "\u2AAF", precnapprox: "\u2AB9", precneqq: "\u2AB5", precnsim: "\u22E8", pre: "\u2AAF", prE: "\u2AB3", precsim: "\u227E", prime: "\u2032", Prime: "\u2033", primes: "\u2119", prnap: "\u2AB9", prnE: "\u2AB5", prnsim: "\u22E8", prod: "\u220F", Product: "\u220F", profalar: "\u232E", profline: "\u2312", profsurf: "\u2313", prop: "\u221D", Proportional: "\u221D", Proportion: "\u2237", propto: "\u221D", prsim: "\u227E", prurel: "\u22B0", Pscr: "\u{1D4AB}", pscr: "\u{1D4C5}", Psi: "\u03A8", psi: "\u03C8", puncsp: "\u2008", Qfr: "\u{1D514}", qfr: "\u{1D52E}", qint: "\u2A0C", qopf: "\u{1D562}", Qopf: "\u211A", qprime: "\u2057", Qscr: "\u{1D4AC}", qscr: "\u{1D4C6}", quaternions: "\u210D", quatint: "\u2A16", quest: "?", questeq: "\u225F", quot: '"', QUOT: '"', rAarr: "\u21DB", race: "\u223D\u0331", Racute: "\u0154", racute: "\u0155", radic: "\u221A", raemptyv: "\u29B3", rang: "\u27E9", Rang: "\u27EB", rangd: "\u2992", range: "\u29A5", rangle: "\u27E9", raquo: "\xBB", rarrap: "\u2975", rarrb: "\u21E5", rarrbfs: "\u2920", rarrc: "\u2933", rarr: "\u2192", Rarr: "\u21A0", rArr: "\u21D2", rarrfs: "\u291E", rarrhk: "\u21AA", rarrlp: "\u21AC", rarrpl: "\u2945", rarrsim: "\u2974", Rarrtl: "\u2916", rarrtl: "\u21A3", rarrw: "\u219D", ratail: "\u291A", rAtail: "\u291C", ratio: "\u2236", rationals: "\u211A", rbarr: "\u290D", rBarr: "\u290F", RBarr: "\u2910", rbbrk: "\u2773", rbrace: "}", rbrack: "]", rbrke: "\u298C", rbrksld: "\u298E", rbrkslu: "\u2990", Rcaron: "\u0158", rcaron: "\u0159", Rcedil: "\u0156", rcedil: "\u0157", rceil: "\u2309", rcub: "}", Rcy: "\u0420", rcy: "\u0440", rdca: "\u2937", rdldhar: "\u2969", rdquo: "\u201D", rdquor: "\u201D", rdsh: "\u21B3", real: "\u211C", realine: "\u211B", realpart: "\u211C", reals: "\u211D", Re: "\u211C", rect: "\u25AD", reg: "\xAE", REG: "\xAE", ReverseElement: "\u220B", ReverseEquilibrium: "\u21CB", ReverseUpEquilibrium: "\u296F", rfisht: "\u297D", rfloor: "\u230B", rfr: "\u{1D52F}", Rfr: "\u211C", rHar: "\u2964", rhard: "\u21C1", rharu: "\u21C0", rharul: "\u296C", Rho: "\u03A1", rho: "\u03C1", rhov: "\u03F1", RightAngleBracket: "\u27E9", RightArrowBar: "\u21E5", rightarrow: "\u2192", RightArrow: "\u2192", Rightarrow: "\u21D2", RightArrowLeftArrow: "\u21C4", rightarrowtail: "\u21A3", RightCeiling: "\u2309", RightDoubleBracket: "\u27E7", RightDownTeeVector: "\u295D", RightDownVectorBar: "\u2955", RightDownVector: "\u21C2", RightFloor: "\u230B", rightharpoondown: "\u21C1", rightharpoonup: "\u21C0", rightleftarrows: "\u21C4", rightleftharpoons: "\u21CC", rightrightarrows: "\u21C9", rightsquigarrow: "\u219D", RightTeeArrow: "\u21A6", RightTee: "\u22A2", RightTeeVector: "\u295B", rightthreetimes: "\u22CC", RightTriangleBar: "\u29D0", RightTriangle: "\u22B3", RightTriangleEqual: "\u22B5", RightUpDownVector: "\u294F", RightUpTeeVector: "\u295C", RightUpVectorBar: "\u2954", RightUpVector: "\u21BE", RightVectorBar: "\u2953", RightVector: "\u21C0", ring: "\u02DA", risingdotseq: "\u2253", rlarr: "\u21C4", rlhar: "\u21CC", rlm: "\u200F", rmoustache: "\u23B1", rmoust: "\u23B1", rnmid: "\u2AEE", roang: "\u27ED", roarr: "\u21FE", robrk: "\u27E7", ropar: "\u2986", ropf: "\u{1D563}", Ropf: "\u211D", roplus: "\u2A2E", rotimes: "\u2A35", RoundImplies: "\u2970", rpar: ")", rpargt: "\u2994", rppolint: "\u2A12", rrarr: "\u21C9", Rrightarrow: "\u21DB", rsaquo: "\u203A", rscr: "\u{1D4C7}", Rscr: "\u211B", rsh: "\u21B1", Rsh: "\u21B1", rsqb: "]", rsquo: "\u2019", rsquor: "\u2019", rthree: "\u22CC", rtimes: "\u22CA", rtri: "\u25B9", rtrie: "\u22B5", rtrif: "\u25B8", rtriltri: "\u29CE", RuleDelayed: "\u29F4", ruluhar: "\u2968", rx: "\u211E", Sacute: "\u015A", sacute: "\u015B", sbquo: "\u201A", scap: "\u2AB8", Scaron: "\u0160", scaron: "\u0161", Sc: "\u2ABC", sc: "\u227B", sccue: "\u227D", sce: "\u2AB0", scE: "\u2AB4", Scedil: "\u015E", scedil: "\u015F", Scirc: "\u015C", scirc: "\u015D", scnap: "\u2ABA", scnE: "\u2AB6", scnsim: "\u22E9", scpolint: "\u2A13", scsim: "\u227F", Scy: "\u0421", scy: "\u0441", sdotb: "\u22A1", sdot: "\u22C5", sdote: "\u2A66", searhk: "\u2925", searr: "\u2198", seArr: "\u21D8", searrow: "\u2198", sect: "\xA7", semi: ";", seswar: "\u2929", setminus: "\u2216", setmn: "\u2216", sext: "\u2736", Sfr: "\u{1D516}", sfr: "\u{1D530}", sfrown: "\u2322", sharp: "\u266F", SHCHcy: "\u0429", shchcy: "\u0449", SHcy: "\u0428", shcy: "\u0448", ShortDownArrow: "\u2193", ShortLeftArrow: "\u2190", shortmid: "\u2223", shortparallel: "\u2225", ShortRightArrow: "\u2192", ShortUpArrow: "\u2191", shy: "\xAD", Sigma: "\u03A3", sigma: "\u03C3", sigmaf: "\u03C2", sigmav: "\u03C2", sim: "\u223C", simdot: "\u2A6A", sime: "\u2243", simeq: "\u2243", simg: "\u2A9E", simgE: "\u2AA0", siml: "\u2A9D", simlE: "\u2A9F", simne: "\u2246", simplus: "\u2A24", simrarr: "\u2972", slarr: "\u2190", SmallCircle: "\u2218", smallsetminus: "\u2216", smashp: "\u2A33", smeparsl: "\u29E4", smid: "\u2223", smile: "\u2323", smt: "\u2AAA", smte: "\u2AAC", smtes: "\u2AAC\uFE00", SOFTcy: "\u042C", softcy: "\u044C", solbar: "\u233F", solb: "\u29C4", sol: "/", Sopf: "\u{1D54A}", sopf: "\u{1D564}", spades: "\u2660", spadesuit: "\u2660", spar: "\u2225", sqcap: "\u2293", sqcaps: "\u2293\uFE00", sqcup: "\u2294", sqcups: "\u2294\uFE00", Sqrt: "\u221A", sqsub: "\u228F", sqsube: "\u2291", sqsubset: "\u228F", sqsubseteq: "\u2291", sqsup: "\u2290", sqsupe: "\u2292", sqsupset: "\u2290", sqsupseteq: "\u2292", square: "\u25A1", Square: "\u25A1", SquareIntersection: "\u2293", SquareSubset: "\u228F", SquareSubsetEqual: "\u2291", SquareSuperset: "\u2290", SquareSupersetEqual: "\u2292", SquareUnion: "\u2294", squarf: "\u25AA", squ: "\u25A1", squf: "\u25AA", srarr: "\u2192", Sscr: "\u{1D4AE}", sscr: "\u{1D4C8}", ssetmn: "\u2216", ssmile: "\u2323", sstarf: "\u22C6", Star: "\u22C6", star: "\u2606", starf: "\u2605", straightepsilon: "\u03F5", straightphi: "\u03D5", strns: "\xAF", sub: "\u2282", Sub: "\u22D0", subdot: "\u2ABD", subE: "\u2AC5", sube: "\u2286", subedot: "\u2AC3", submult: "\u2AC1", subnE: "\u2ACB", subne: "\u228A", subplus: "\u2ABF", subrarr: "\u2979", subset: "\u2282", Subset: "\u22D0", subseteq: "\u2286", subseteqq: "\u2AC5", SubsetEqual: "\u2286", subsetneq: "\u228A", subsetneqq: "\u2ACB", subsim: "\u2AC7", subsub: "\u2AD5", subsup: "\u2AD3", succapprox: "\u2AB8", succ: "\u227B", succcurlyeq: "\u227D", Succeeds: "\u227B", SucceedsEqual: "\u2AB0", SucceedsSlantEqual: "\u227D", SucceedsTilde: "\u227F", succeq: "\u2AB0", succnapprox: "\u2ABA", succneqq: "\u2AB6", succnsim: "\u22E9", succsim: "\u227F", SuchThat: "\u220B", sum: "\u2211", Sum: "\u2211", sung: "\u266A", sup1: "\xB9", sup2: "\xB2", sup3: "\xB3", sup: "\u2283", Sup: "\u22D1", supdot: "\u2ABE", supdsub: "\u2AD8", supE: "\u2AC6", supe: "\u2287", supedot: "\u2AC4", Superset: "\u2283", SupersetEqual: "\u2287", suphsol: "\u27C9", suphsub: "\u2AD7", suplarr: "\u297B", supmult: "\u2AC2", supnE: "\u2ACC", supne: "\u228B", supplus: "\u2AC0", supset: "\u2283", Supset: "\u22D1", supseteq: "\u2287", supseteqq: "\u2AC6", supsetneq: "\u228B", supsetneqq: "\u2ACC", supsim: "\u2AC8", supsub: "\u2AD4", supsup: "\u2AD6", swarhk: "\u2926", swarr: "\u2199", swArr: "\u21D9", swarrow: "\u2199", swnwar: "\u292A", szlig: "\xDF", Tab: " ", target: "\u2316", Tau: "\u03A4", tau: "\u03C4", tbrk: "\u23B4", Tcaron: "\u0164", tcaron: "\u0165", Tcedil: "\u0162", tcedil: "\u0163", Tcy: "\u0422", tcy: "\u0442", tdot: "\u20DB", telrec: "\u2315", Tfr: "\u{1D517}", tfr: "\u{1D531}", there4: "\u2234", therefore: "\u2234", Therefore: "\u2234", Theta: "\u0398", theta: "\u03B8", thetasym: "\u03D1", thetav: "\u03D1", thickapprox: "\u2248", thicksim: "\u223C", ThickSpace: "\u205F\u200A", ThinSpace: "\u2009", thinsp: "\u2009", thkap: "\u2248", thksim: "\u223C", THORN: "\xDE", thorn: "\xFE", tilde: "\u02DC", Tilde: "\u223C", TildeEqual: "\u2243", TildeFullEqual: "\u2245", TildeTilde: "\u2248", timesbar: "\u2A31", timesb: "\u22A0", times: "\xD7", timesd: "\u2A30", tint: "\u222D", toea: "\u2928", topbot: "\u2336", topcir: "\u2AF1", top: "\u22A4", Topf: "\u{1D54B}", topf: "\u{1D565}", topfork: "\u2ADA", tosa: "\u2929", tprime: "\u2034", trade: "\u2122", TRADE: "\u2122", triangle: "\u25B5", triangledown: "\u25BF", triangleleft: "\u25C3", trianglelefteq: "\u22B4", triangleq: "\u225C", triangleright: "\u25B9", trianglerighteq: "\u22B5", tridot: "\u25EC", trie: "\u225C", triminus: "\u2A3A", TripleDot: "\u20DB", triplus: "\u2A39", trisb: "\u29CD", tritime: "\u2A3B", trpezium: "\u23E2", Tscr: "\u{1D4AF}", tscr: "\u{1D4C9}", TScy: "\u0426", tscy: "\u0446", TSHcy: "\u040B", tshcy: "\u045B", Tstrok: "\u0166", tstrok: "\u0167", twixt: "\u226C", twoheadleftarrow: "\u219E", twoheadrightarrow: "\u21A0", Uacute: "\xDA", uacute: "\xFA", uarr: "\u2191", Uarr: "\u219F", uArr: "\u21D1", Uarrocir: "\u2949", Ubrcy: "\u040E", ubrcy: "\u045E", Ubreve: "\u016C", ubreve: "\u016D", Ucirc: "\xDB", ucirc: "\xFB", Ucy: "\u0423", ucy: "\u0443", udarr: "\u21C5", Udblac: "\u0170", udblac: "\u0171", udhar: "\u296E", ufisht: "\u297E", Ufr: "\u{1D518}", ufr: "\u{1D532}", Ugrave: "\xD9", ugrave: "\xF9", uHar: "\u2963", uharl: "\u21BF", uharr: "\u21BE", uhblk: "\u2580", ulcorn: "\u231C", ulcorner: "\u231C", ulcrop: "\u230F", ultri: "\u25F8", Umacr: "\u016A", umacr: "\u016B", uml: "\xA8", UnderBar: "_", UnderBrace: "\u23DF", UnderBracket: "\u23B5", UnderParenthesis: "\u23DD", Union: "\u22C3", UnionPlus: "\u228E", Uogon: "\u0172", uogon: "\u0173", Uopf: "\u{1D54C}", uopf: "\u{1D566}", UpArrowBar: "\u2912", uparrow: "\u2191", UpArrow: "\u2191", Uparrow: "\u21D1", UpArrowDownArrow: "\u21C5", updownarrow: "\u2195", UpDownArrow: "\u2195", Updownarrow: "\u21D5", UpEquilibrium: "\u296E", upharpoonleft: "\u21BF", upharpoonright: "\u21BE", uplus: "\u228E", UpperLeftArrow: "\u2196", UpperRightArrow: "\u2197", upsi: "\u03C5", Upsi: "\u03D2", upsih: "\u03D2", Upsilon: "\u03A5", upsilon: "\u03C5", UpTeeArrow: "\u21A5", UpTee: "\u22A5", upuparrows: "\u21C8", urcorn: "\u231D", urcorner: "\u231D", urcrop: "\u230E", Uring: "\u016E", uring: "\u016F", urtri: "\u25F9", Uscr: "\u{1D4B0}", uscr: "\u{1D4CA}", utdot: "\u22F0", Utilde: "\u0168", utilde: "\u0169", utri: "\u25B5", utrif: "\u25B4", uuarr: "\u21C8", Uuml: "\xDC", uuml: "\xFC", uwangle: "\u29A7", vangrt: "\u299C", varepsilon: "\u03F5", varkappa: "\u03F0", varnothing: "\u2205", varphi: "\u03D5", varpi: "\u03D6", varpropto: "\u221D", varr: "\u2195", vArr: "\u21D5", varrho: "\u03F1", varsigma: "\u03C2", varsubsetneq: "\u228A\uFE00", varsubsetneqq: "\u2ACB\uFE00", varsupsetneq: "\u228B\uFE00", varsupsetneqq: "\u2ACC\uFE00", vartheta: "\u03D1", vartriangleleft: "\u22B2", vartriangleright: "\u22B3", vBar: "\u2AE8", Vbar: "\u2AEB", vBarv: "\u2AE9", Vcy: "\u0412", vcy: "\u0432", vdash: "\u22A2", vDash: "\u22A8", Vdash: "\u22A9", VDash: "\u22AB", Vdashl: "\u2AE6", veebar: "\u22BB", vee: "\u2228", Vee: "\u22C1", veeeq: "\u225A", vellip: "\u22EE", verbar: "|", Verbar: "\u2016", vert: "|", Vert: "\u2016", VerticalBar: "\u2223", VerticalLine: "|", VerticalSeparator: "\u2758", VerticalTilde: "\u2240", VeryThinSpace: "\u200A", Vfr: "\u{1D519}", vfr: "\u{1D533}", vltri: "\u22B2", vnsub: "\u2282\u20D2", vnsup: "\u2283\u20D2", Vopf: "\u{1D54D}", vopf: "\u{1D567}", vprop: "\u221D", vrtri: "\u22B3", Vscr: "\u{1D4B1}", vscr: "\u{1D4CB}", vsubnE: "\u2ACB\uFE00", vsubne: "\u228A\uFE00", vsupnE: "\u2ACC\uFE00", vsupne: "\u228B\uFE00", Vvdash: "\u22AA", vzigzag: "\u299A", Wcirc: "\u0174", wcirc: "\u0175", wedbar: "\u2A5F", wedge: "\u2227", Wedge: "\u22C0", wedgeq: "\u2259", weierp: "\u2118", Wfr: "\u{1D51A}", wfr: "\u{1D534}", Wopf: "\u{1D54E}", wopf: "\u{1D568}", wp: "\u2118", wr: "\u2240", wreath: "\u2240", Wscr: "\u{1D4B2}", wscr: "\u{1D4CC}", xcap: "\u22C2", xcirc: "\u25EF", xcup: "\u22C3", xdtri: "\u25BD", Xfr: "\u{1D51B}", xfr: "\u{1D535}", xharr: "\u27F7", xhArr: "\u27FA", Xi: "\u039E", xi: "\u03BE", xlarr: "\u27F5", xlArr: "\u27F8", xmap: "\u27FC", xnis: "\u22FB", xodot: "\u2A00", Xopf: "\u{1D54F}", xopf: "\u{1D569}", xoplus: "\u2A01", xotime: "\u2A02", xrarr: "\u27F6", xrArr: "\u27F9", Xscr: "\u{1D4B3}", xscr: "\u{1D4CD}", xsqcup: "\u2A06", xuplus: "\u2A04", xutri: "\u25B3", xvee: "\u22C1", xwedge: "\u22C0", Yacute: "\xDD", yacute: "\xFD", YAcy: "\u042F", yacy: "\u044F", Ycirc: "\u0176", ycirc: "\u0177", Ycy: "\u042B", ycy: "\u044B", yen: "\xA5", Yfr: "\u{1D51C}", yfr: "\u{1D536}", YIcy: "\u0407", yicy: "\u0457", Yopf: "\u{1D550}", yopf: "\u{1D56A}", Yscr: "\u{1D4B4}", yscr: "\u{1D4CE}", YUcy: "\u042E", yucy: "\u044E", yuml: "\xFF", Yuml: "\u0178", Zacute: "\u0179", zacute: "\u017A", Zcaron: "\u017D", zcaron: "\u017E", Zcy: "\u0417", zcy: "\u0437", Zdot: "\u017B", zdot: "\u017C", zeetrf: "\u2128", ZeroWidthSpace: "\u200B", Zeta: "\u0396", zeta: "\u03B6", zfr: "\u{1D537}", Zfr: "\u2128", ZHcy: "\u0416", zhcy: "\u0436", zigrarr: "\u21DD", zopf: "\u{1D56B}", Zopf: "\u2124", Zscr: "\u{1D4B5}", zscr: "\u{1D4CF}", zwj: "\u200D", zwnj: "\u200C" }; } }); // node_modules/markdown-it/lib/common/entities.js var require_entities2 = __commonJS({ "node_modules/markdown-it/lib/common/entities.js"(exports2, module2) { "use strict"; module2.exports = require_entities(); } }); // node_modules/uc.micro/categories/P/regex.js var require_regex = __commonJS({ "node_modules/uc.micro/categories/P/regex.js"(exports2, module2) { module2.exports = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/; } }); // node_modules/mdurl/encode.js var require_encode = __commonJS({ "node_modules/mdurl/encode.js"(exports2, module2) { "use strict"; var encodeCache = {}; function getEncodeCache(exclude) { var i, ch, cache = encodeCache[exclude]; if (cache) { return cache; } cache = encodeCache[exclude] = []; for (i = 0; i < 128; i++) { ch = String.fromCharCode(i); if (/^[0-9a-z]$/i.test(ch)) { cache.push(ch); } else { cache.push("%" + ("0" + i.toString(16).toUpperCase()).slice(-2)); } } for (i = 0; i < exclude.length; i++) { cache[exclude.charCodeAt(i)] = exclude[i]; } return cache; } function encode(string, exclude, keepEscaped) { var i, l, code, nextCode, cache, result = ""; if (typeof exclude !== "string") { keepEscaped = exclude; exclude = encode.defaultChars; } if (typeof keepEscaped === "undefined") { keepEscaped = true; } cache = getEncodeCache(exclude); for (i = 0, l = string.length; i < l; i++) { code = string.charCodeAt(i); if (keepEscaped && code === 37 && i + 2 < l) { if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) { result += string.slice(i, i + 3); i += 2; continue; } } if (code < 128) { result += cache[code]; continue; } if (code >= 55296 && code <= 57343) { if (code >= 55296 && code <= 56319 && i + 1 < l) { nextCode = string.charCodeAt(i + 1); if (nextCode >= 56320 && nextCode <= 57343) { result += encodeURIComponent(string[i] + string[i + 1]); i++; continue; } } result += "%EF%BF%BD"; continue; } result += encodeURIComponent(string[i]); } return result; } encode.defaultChars = ";/?:@&=+$,-_.!~*'()#"; encode.componentChars = "-_.!~*'()"; module2.exports = encode; } }); // node_modules/mdurl/decode.js var require_decode = __commonJS({ "node_modules/mdurl/decode.js"(exports2, module2) { "use strict"; var decodeCache = {}; function getDecodeCache(exclude) { var i, ch, cache = decodeCache[exclude]; if (cache) { return cache; } cache = decodeCache[exclude] = []; for (i = 0; i < 128; i++) { ch = String.fromCharCode(i); cache.push(ch); } for (i = 0; i < exclude.length; i++) { ch = exclude.charCodeAt(i); cache[ch] = "%" + ("0" + ch.toString(16).toUpperCase()).slice(-2); } return cache; } function decode(string, exclude) { var cache; if (typeof exclude !== "string") { exclude = decode.defaultChars; } cache = getDecodeCache(exclude); return string.replace(/(%[a-f0-9]{2})+/gi, function(seq) { var i, l, b1, b2, b3, b4, chr, result = ""; for (i = 0, l = seq.length; i < l; i += 3) { b1 = parseInt(seq.slice(i + 1, i + 3), 16); if (b1 < 128) { result += cache[b1]; continue; } if ((b1 & 224) === 192 && i + 3 < l) { b2 = parseInt(seq.slice(i + 4, i + 6), 16); if ((b2 & 192) === 128) { chr = b1 << 6 & 1984 | b2 & 63; if (chr < 128) { result += "\uFFFD\uFFFD"; } else { result += String.fromCharCode(chr); } i += 3; continue; } } if ((b1 & 240) === 224 && i + 6 < l) { b2 = parseInt(seq.slice(i + 4, i + 6), 16); b3 = parseInt(seq.slice(i + 7, i + 9), 16); if ((b2 & 192) === 128 && (b3 & 192) === 128) { chr = b1 << 12 & 61440 | b2 << 6 & 4032 | b3 & 63; if (chr < 2048 || chr >= 55296 && chr <= 57343) { result += "\uFFFD\uFFFD\uFFFD"; } else { result += String.fromCharCode(chr); } i += 6; continue; } } if ((b1 & 248) === 240 && i + 9 < l) { b2 = parseInt(seq.slice(i + 4, i + 6), 16); b3 = parseInt(seq.slice(i + 7, i + 9), 16); b4 = parseInt(seq.slice(i + 10, i + 12), 16); if ((b2 & 192) === 128 && (b3 & 192) === 128 && (b4 & 192) === 128) { chr = b1 << 18 & 1835008 | b2 << 12 & 258048 | b3 << 6 & 4032 | b4 & 63; if (chr < 65536 || chr > 1114111) { result += "\uFFFD\uFFFD\uFFFD\uFFFD"; } else { chr -= 65536; result += String.fromCharCode(55296 + (chr >> 10), 56320 + (chr & 1023)); } i += 9; continue; } } result += "\uFFFD"; } return result; }); } decode.defaultChars = ";/?:@&=+$,#"; decode.componentChars = ""; module2.exports = decode; } }); // node_modules/mdurl/format.js var require_format = __commonJS({ "node_modules/mdurl/format.js"(exports2, module2) { "use strict"; module2.exports = function format(url2) { var result = ""; result += url2.protocol || ""; result += url2.slashes ? "//" : ""; result += url2.auth ? url2.auth + "@" : ""; if (url2.hostname && url2.hostname.indexOf(":") !== -1) { result += "[" + url2.hostname + "]"; } else { result += url2.hostname || ""; } result += url2.port ? ":" + url2.port : ""; result += url2.pathname || ""; result += url2.search || ""; result += url2.hash || ""; return result; }; } }); // node_modules/mdurl/parse.js var require_parse = __commonJS({ "node_modules/mdurl/parse.js"(exports2, module2) { "use strict"; function Url() { this.protocol = null; this.slashes = null; this.auth = null; this.port = null; this.hostname = null; this.hash = null; this.search = null; this.pathname = null; } var protocolPattern = /^([a-z0-9.+-]+:)/i; var portPattern = /:[0-9]*$/; var simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/; var delims = ["<", ">", '"', "`", " ", "\r", "\n", " "]; var unwise = ["{", "}", "|", "\\", "^", "`"].concat(delims); var autoEscape = ["'"].concat(unwise); var nonHostChars = ["%", "/", "?", ";", "#"].concat(autoEscape); var hostEndingChars = ["/", "?", "#"]; var hostnameMaxLen = 255; var hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/; var hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/; var hostlessProtocol = { "javascript": true, "javascript:": true }; var slashedProtocol = { "http": true, "https": true, "ftp": true, "gopher": true, "file": true, "http:": true, "https:": true, "ftp:": true, "gopher:": true, "file:": true }; function urlParse(url2, slashesDenoteHost) { if (url2 && url2 instanceof Url) { return url2; } var u = new Url(); u.parse(url2, slashesDenoteHost); return u; } Url.prototype.parse = function(url2, slashesDenoteHost) { var i, l, lowerProto, hec, slashes, rest = url2; rest = rest.trim(); if (!slashesDenoteHost && url2.split("#").length === 1) { var simplePath = simplePathPattern.exec(rest); if (simplePath) { this.pathname = simplePath[1]; if (simplePath[2]) { this.search = simplePath[2]; } return this; } } var proto = protocolPattern.exec(rest); if (proto) { proto = proto[0]; lowerProto = proto.toLowerCase(); this.protocol = proto; rest = rest.substr(proto.length); } if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { slashes = rest.substr(0, 2) === "//"; if (slashes && !(proto && hostlessProtocol[proto])) { rest = rest.substr(2); this.slashes = true; } } if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) { var hostEnd = -1; for (i = 0; i < hostEndingChars.length; i++) { hec = rest.indexOf(hostEndingChars[i]); if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; } } var auth, atSign; if (hostEnd === -1) { atSign = rest.lastIndexOf("@"); } else { atSign = rest.lastIndexOf("@", hostEnd); } if (atSign !== -1) { auth = rest.slice(0, atSign); rest = rest.slice(atSign + 1); this.auth = auth; } hostEnd = -1; for (i = 0; i < nonHostChars.length; i++) { hec = rest.indexOf(nonHostChars[i]); if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) { hostEnd = hec; } } if (hostEnd === -1) { hostEnd = rest.length; } if (rest[hostEnd - 1] === ":") { hostEnd--; } var host = rest.slice(0, hostEnd); rest = rest.slice(hostEnd); this.parseHost(host); this.hostname = this.hostname || ""; var ipv6Hostname = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]"; if (!ipv6Hostname) { var hostparts = this.hostname.split(/\./); for (i = 0, l = hostparts.length; i < l; i++) { var part = hostparts[i]; if (!part) { continue; } if (!part.match(hostnamePartPattern)) { var newpart = ""; for (var j = 0, k = part.length; j < k; j++) { if (part.charCodeAt(j) > 127) { newpart += "x"; } else { newpart += part[j]; } } if (!newpart.match(hostnamePartPattern)) { var validParts = hostparts.slice(0, i); var notHost = hostparts.slice(i + 1); var bit = part.match(hostnamePartStart); if (bit) { validParts.push(bit[1]); notHost.unshift(bit[2]); } if (notHost.length) { rest = notHost.join(".") + rest; } this.hostname = validParts.join("."); break; } } } } if (this.hostname.length > hostnameMaxLen) { this.hostname = ""; } if (ipv6Hostname) { this.hostname = this.hostname.substr(1, this.hostname.length - 2); } } var hash = rest.indexOf("#"); if (hash !== -1) { this.hash = rest.substr(hash); rest = rest.slice(0, hash); } var qm = rest.indexOf("?"); if (qm !== -1) { this.search = rest.substr(qm); rest = rest.slice(0, qm); } if (rest) { this.pathname = rest; } if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { this.pathname = ""; } return this; }; Url.prototype.parseHost = function(host) { var port = portPattern.exec(host); if (port) { port = port[0]; if (port !== ":") { this.port = port.substr(1); } host = host.substr(0, host.length - port.length); } if (host) { this.hostname = host; } }; module2.exports = urlParse; } }); // node_modules/mdurl/index.js var require_mdurl = __commonJS({ "node_modules/mdurl/index.js"(exports2, module2) { "use strict"; module2.exports.encode = require_encode(); module2.exports.decode = require_decode(); module2.exports.format = require_format(); module2.exports.parse = require_parse(); } }); // node_modules/uc.micro/properties/Any/regex.js var require_regex2 = __commonJS({ "node_modules/uc.micro/properties/Any/regex.js"(exports2, module2) { module2.exports = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; } }); // node_modules/uc.micro/categories/Cc/regex.js var require_regex3 = __commonJS({ "node_modules/uc.micro/categories/Cc/regex.js"(exports2, module2) { module2.exports = /[\0-\x1F\x7F-\x9F]/; } }); // node_modules/uc.micro/categories/Cf/regex.js var require_regex4 = __commonJS({ "node_modules/uc.micro/categories/Cf/regex.js"(exports2, module2) { module2.exports = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/; } }); // node_modules/uc.micro/categories/Z/regex.js var require_regex5 = __commonJS({ "node_modules/uc.micro/categories/Z/regex.js"(exports2, module2) { module2.exports = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/; } }); // node_modules/uc.micro/index.js var require_uc = __commonJS({ "node_modules/uc.micro/index.js"(exports2) { "use strict"; exports2.Any = require_regex2(); exports2.Cc = require_regex3(); exports2.Cf = require_regex4(); exports2.P = require_regex(); exports2.Z = require_regex5(); } }); // node_modules/markdown-it/lib/common/utils.js var require_utils = __commonJS({ "node_modules/markdown-it/lib/common/utils.js"(exports2) { "use strict"; function _class(obj) { return Object.prototype.toString.call(obj); } function isString(obj) { return _class(obj) === "[object String]"; } var _hasOwnProperty = Object.prototype.hasOwnProperty; function has(object, key) { return _hasOwnProperty.call(object, key); } function assign(obj) { var sources = Array.prototype.slice.call(arguments, 1); sources.forEach(function(source) { if (!source) { return; } if (typeof source !== "object") { throw new TypeError(source + "must be object"); } Object.keys(source).forEach(function(key) { obj[key] = source[key]; }); }); return obj; } function arrayReplaceAt(src, pos, newElements) { return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1)); } function isValidEntityCode(c) { if (c >= 55296 && c <= 57343) { return false; } if (c >= 64976 && c <= 65007) { return false; } if ((c & 65535) === 65535 || (c & 65535) === 65534) { return false; } if (c >= 0 && c <= 8) { return false; } if (c === 11) { return false; } if (c >= 14 && c <= 31) { return false; } if (c >= 127 && c <= 159) { return false; } if (c > 1114111) { return false; } return true; } function fromCodePoint(c) { if (c > 65535) { c -= 65536; var surrogate1 = 55296 + (c >> 10), surrogate2 = 56320 + (c & 1023); return String.fromCharCode(surrogate1, surrogate2); } return String.fromCharCode(c); } var UNESCAPE_MD_RE = /\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g; var ENTITY_RE = /&([a-z#][a-z0-9]{1,31});/gi; var UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + "|" + ENTITY_RE.source, "gi"); var DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i; var entities = require_entities2(); function replaceEntityPattern(match, name) { var code = 0; if (has(entities, name)) { return entities[name]; } if (name.charCodeAt(0) === 35 && DIGITAL_ENTITY_TEST_RE.test(name)) { code = name[1].toLowerCase() === "x" ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10); if (isValidEntityCode(code)) { return fromCodePoint(code); } } return match; } function unescapeMd(str2) { if (str2.indexOf("\\") < 0) { return str2; } return str2.replace(UNESCAPE_MD_RE, "$1"); } function unescapeAll(str2) { if (str2.indexOf("\\") < 0 && str2.indexOf("&") < 0) { return str2; } return str2.replace(UNESCAPE_ALL_RE, function(match, escaped, entity) { if (escaped) { return escaped; } return replaceEntityPattern(match, entity); }); } var HTML_ESCAPE_TEST_RE = /[&<>"]/; var HTML_ESCAPE_REPLACE_RE = /[&<>"]/g; var HTML_REPLACEMENTS = { "&": "&", "<": "<", ">": ">", '"': """ }; function replaceUnsafeChar(ch) { return HTML_REPLACEMENTS[ch]; } function escapeHtml(str2) { if (HTML_ESCAPE_TEST_RE.test(str2)) { return str2.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar); } return str2; } var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g; function escapeRE(str2) { return str2.replace(REGEXP_ESCAPE_RE, "\\$&"); } function isSpace(code) { switch (code) { case 9: case 32: return true; } return false; } function isWhiteSpace(code) { if (code >= 8192 && code <= 8202) { return true; } switch (code) { case 9: case 10: case 11: case 12: case 13: case 32: case 160: case 5760: case 8239: case 8287: case 12288: return true; } return false; } var UNICODE_PUNCT_RE = require_regex(); function isPunctChar(ch) { return UNICODE_PUNCT_RE.test(ch); } function isMdAsciiPunct(ch) { switch (ch) { case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 58: case 59: case 60: case 61: case 62: case 63: case 64: case 91: case 92: case 93: case 94: case 95: case 96: case 123: case 124: case 125: case 126: return true; default: return false; } } function normalizeReference(str2) { str2 = str2.trim().replace(/\s+/g, " "); if ("\u1E9E".toLowerCase() === "\u1E7E") { str2 = str2.replace(/ẞ/g, "\xDF"); } return str2.toLowerCase().toUpperCase(); } exports2.lib = {}; exports2.lib.mdurl = require_mdurl(); exports2.lib.ucmicro = require_uc(); exports2.assign = assign; exports2.isString = isString; exports2.has = has; exports2.unescapeMd = unescapeMd; exports2.unescapeAll = unescapeAll; exports2.isValidEntityCode = isValidEntityCode; exports2.fromCodePoint = fromCodePoint; exports2.escapeHtml = escapeHtml; exports2.arrayReplaceAt = arrayReplaceAt; exports2.isSpace = isSpace; exports2.isWhiteSpace = isWhiteSpace; exports2.isMdAsciiPunct = isMdAsciiPunct; exports2.isPunctChar = isPunctChar; exports2.escapeRE = escapeRE; exports2.normalizeReference = normalizeReference; } }); // node_modules/markdown-it/lib/helpers/parse_link_label.js var require_parse_link_label = __commonJS({ "node_modules/markdown-it/lib/helpers/parse_link_label.js"(exports2, module2) { "use strict"; module2.exports = function parseLinkLabel(state, start, disableNested) { var level, found, marker, prevPos, labelEnd = -1, max = state.posMax, oldPos = state.pos; state.pos = start + 1; level = 1; while (state.pos < max) { marker = state.src.charCodeAt(state.pos); if (marker === 93) { level--; if (level === 0) { found = true; break; } } prevPos = state.pos; state.md.inline.skipToken(state); if (marker === 91) { if (prevPos === state.pos - 1) { level++; } else if (disableNested) { state.pos = oldPos; return -1; } } } if (found) { labelEnd = state.pos; } state.pos = oldPos; return labelEnd; }; } }); // node_modules/markdown-it/lib/helpers/parse_link_destination.js var require_parse_link_destination = __commonJS({ "node_modules/markdown-it/lib/helpers/parse_link_destination.js"(exports2, module2) { "use strict"; var unescapeAll = require_utils().unescapeAll; module2.exports = function parseLinkDestination(str2, pos, max) { var code, level, lines = 0, start = pos, result = { ok: false, pos: 0, lines: 0, str: "" }; if (str2.charCodeAt(pos) === 60) { pos++; while (pos < max) { code = str2.charCodeAt(pos); if (code === 10) { return result; } if (code === 60) { return result; } if (code === 62) { result.pos = pos + 1; result.str = unescapeAll(str2.slice(start + 1, pos)); result.ok = true; return result; } if (code === 92 && pos + 1 < max) { pos += 2; continue; } pos++; } return result; } level = 0; while (pos < max) { code = str2.charCodeAt(pos); if (code === 32) { break; } if (code < 32 || code === 127) { break; } if (code === 92 && pos + 1 < max) { if (str2.charCodeAt(pos + 1) === 32) { break; } pos += 2; continue; } if (code === 40) { level++; if (level > 32) { return result; } } if (code === 41) { if (level === 0) { break; } level--; } pos++; } if (start === pos) { return result; } if (level !== 0) { return result; } result.str = unescapeAll(str2.slice(start, pos)); result.lines = lines; result.pos = pos; result.ok = true; return result; }; } }); // node_modules/markdown-it/lib/helpers/parse_link_title.js var require_parse_link_title = __commonJS({ "node_modules/markdown-it/lib/helpers/parse_link_title.js"(exports2, module2) { "use strict"; var unescapeAll = require_utils().unescapeAll; module2.exports = function parseLinkTitle(str2, pos, max) { var code, marker, lines = 0, start = pos, result = { ok: false, pos: 0, lines: 0, str: "" }; if (pos >= max) { return result; } marker = str2.charCodeAt(pos); if (marker !== 34 && marker !== 39 && marker !== 40) { return result; } pos++; if (marker === 40) { marker = 41; } while (pos < max) { code = str2.charCodeAt(pos); if (code === marker) { result.pos = pos + 1; result.lines = lines; result.str = unescapeAll(str2.slice(start + 1, pos)); result.ok = true; return result; } else if (code === 40 && marker === 41) { return result; } else if (code === 10) { lines++; } else if (code === 92 && pos + 1 < max) { pos++; if (str2.charCodeAt(pos) === 10) { lines++; } } pos++; } return result; }; } }); // node_modules/markdown-it/lib/helpers/index.js var require_helpers = __commonJS({ "node_modules/markdown-it/lib/helpers/index.js"(exports2) { "use strict"; exports2.parseLinkLabel = require_parse_link_label(); exports2.parseLinkDestination = require_parse_link_destination(); exports2.parseLinkTitle = require_parse_link_title(); } }); // node_modules/markdown-it/lib/renderer.js var require_renderer = __commonJS({ "node_modules/markdown-it/lib/renderer.js"(exports2, module2) { "use strict"; var assign = require_utils().assign; var unescapeAll = require_utils().unescapeAll; var escapeHtml = require_utils().escapeHtml; var default_rules = {}; default_rules.code_inline = function(tokens, idx, options2, env, slf) { var token = tokens[idx]; return "" + escapeHtml(tokens[idx].content) + ""; }; default_rules.code_block = function(tokens, idx, options2, env, slf) { var token = tokens[idx]; return "" + escapeHtml(tokens[idx].content) + "\n"; }; default_rules.fence = function(tokens, idx, options2, env, slf) { var token = tokens[idx], info = token.info ? unescapeAll(token.info).trim() : "", langName = "", langAttrs = "", highlighted, i, arr, tmpAttrs, tmpToken; if (info) { arr = info.split(/(\s+)/g); langName = arr[0]; langAttrs = arr.slice(2).join(""); } if (options2.highlight) { highlighted = options2.highlight(token.content, langName, langAttrs) || escapeHtml(token.content); } else { highlighted = escapeHtml(token.content); } if (highlighted.indexOf("" + highlighted + "\n"; } return "
" + highlighted + "
\n"; }; default_rules.image = function(tokens, idx, options2, env, slf) { var token = tokens[idx]; token.attrs[token.attrIndex("alt")][1] = slf.renderInlineAsText(token.children, options2, env); return slf.renderToken(tokens, idx, options2); }; default_rules.hardbreak = function(tokens, idx, options2) { return options2.xhtmlOut ? "
\n" : "
\n"; }; default_rules.softbreak = function(tokens, idx, options2) { return options2.breaks ? options2.xhtmlOut ? "
\n" : "
\n" : "\n"; }; default_rules.text = function(tokens, idx) { return escapeHtml(tokens[idx].content); }; default_rules.html_block = function(tokens, idx) { return tokens[idx].content; }; default_rules.html_inline = function(tokens, idx) { return tokens[idx].content; }; function Renderer() { this.rules = assign({}, default_rules); } Renderer.prototype.renderAttrs = function renderAttrs(token) { var i, l, result; if (!token.attrs) { return ""; } result = ""; for (i = 0, l = token.attrs.length; i < l; i++) { result += " " + escapeHtml(token.attrs[i][0]) + '="' + escapeHtml(token.attrs[i][1]) + '"'; } return result; }; Renderer.prototype.renderToken = function renderToken(tokens, idx, options2) { var nextToken, result = "", needLf = false, token = tokens[idx]; if (token.hidden) { return ""; } if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) { result += "\n"; } result += (token.nesting === -1 ? "\n" : ">"; return result; }; Renderer.prototype.renderInline = function(tokens, options2, env) { var type, result = "", rules = this.rules; for (var i = 0, len = tokens.length; i < len; i++) { type = tokens[i].type; if (typeof rules[type] !== "undefined") { result += rules[type](tokens, i, options2, env, this); } else { result += this.renderToken(tokens, i, options2); } } return result; }; Renderer.prototype.renderInlineAsText = function(tokens, options2, env) { var result = ""; for (var i = 0, len = tokens.length; i < len; i++) { if (tokens[i].type === "text") { result += tokens[i].content; } else if (tokens[i].type === "image") { result += this.renderInlineAsText(tokens[i].children, options2, env); } else if (tokens[i].type === "softbreak") { result += "\n"; } } return result; }; Renderer.prototype.render = function(tokens, options2, env) { var i, len, type, result = "", rules = this.rules; for (i = 0, len = tokens.length; i < len; i++) { type = tokens[i].type; if (type === "inline") { result += this.renderInline(tokens[i].children, options2, env); } else if (typeof rules[type] !== "undefined") { result += rules[tokens[i].type](tokens, i, options2, env, this); } else { result += this.renderToken(tokens, i, options2, env); } } return result; }; module2.exports = Renderer; } }); // node_modules/markdown-it/lib/ruler.js var require_ruler = __commonJS({ "node_modules/markdown-it/lib/ruler.js"(exports2, module2) { "use strict"; function Ruler() { this.__rules__ = []; this.__cache__ = null; } Ruler.prototype.__find__ = function(name) { for (var i = 0; i < this.__rules__.length; i++) { if (this.__rules__[i].name === name) { return i; } } return -1; }; Ruler.prototype.__compile__ = function() { var self2 = this; var chains = [""]; self2.__rules__.forEach(function(rule) { if (!rule.enabled) { return; } rule.alt.forEach(function(altName) { if (chains.indexOf(altName) < 0) { chains.push(altName); } }); }); self2.__cache__ = {}; chains.forEach(function(chain) { self2.__cache__[chain] = []; self2.__rules__.forEach(function(rule) { if (!rule.enabled) { return; } if (chain && rule.alt.indexOf(chain) < 0) { return; } self2.__cache__[chain].push(rule.fn); }); }); }; Ruler.prototype.at = function(name, fn, options2) { var index = this.__find__(name); var opt = options2 || {}; if (index === -1) { throw new Error("Parser rule not found: " + name); } this.__rules__[index].fn = fn; this.__rules__[index].alt = opt.alt || []; this.__cache__ = null; }; Ruler.prototype.before = function(beforeName, ruleName, fn, options2) { var index = this.__find__(beforeName); var opt = options2 || {}; if (index === -1) { throw new Error("Parser rule not found: " + beforeName); } this.__rules__.splice(index, 0, { name: ruleName, enabled: true, fn, alt: opt.alt || [] }); this.__cache__ = null; }; Ruler.prototype.after = function(afterName, ruleName, fn, options2) { var index = this.__find__(afterName); var opt = options2 || {}; if (index === -1) { throw new Error("Parser rule not found: " + afterName); } this.__rules__.splice(index + 1, 0, { name: ruleName, enabled: true, fn, alt: opt.alt || [] }); this.__cache__ = null; }; Ruler.prototype.push = function(ruleName, fn, options2) { var opt = options2 || {}; this.__rules__.push({ name: ruleName, enabled: true, fn, alt: opt.alt || [] }); this.__cache__ = null; }; Ruler.prototype.enable = function(list, ignoreInvalid) { if (!Array.isArray(list)) { list = [list]; } var result = []; list.forEach(function(name) { var idx = this.__find__(name); if (idx < 0) { if (ignoreInvalid) { return; } throw new Error("Rules manager: invalid rule name " + name); } this.__rules__[idx].enabled = true; result.push(name); }, this); this.__cache__ = null; return result; }; Ruler.prototype.enableOnly = function(list, ignoreInvalid) { if (!Array.isArray(list)) { list = [list]; } this.__rules__.forEach(function(rule) { rule.enabled = false; }); this.enable(list, ignoreInvalid); }; Ruler.prototype.disable = function(list, ignoreInvalid) { if (!Array.isArray(list)) { list = [list]; } var result = []; list.forEach(function(name) { var idx = this.__find__(name); if (idx < 0) { if (ignoreInvalid) { return; } throw new Error("Rules manager: invalid rule name " + name); } this.__rules__[idx].enabled = false; result.push(name); }, this); this.__cache__ = null; return result; }; Ruler.prototype.getRules = function(chainName) { if (this.__cache__ === null) { this.__compile__(); } return this.__cache__[chainName] || []; }; module2.exports = Ruler; } }); // node_modules/markdown-it/lib/rules_core/normalize.js var require_normalize = __commonJS({ "node_modules/markdown-it/lib/rules_core/normalize.js"(exports2, module2) { "use strict"; var NEWLINES_RE = /\r\n?|\n/g; var NULL_RE = /\0/g; module2.exports = function normalize(state) { var str2; str2 = state.src.replace(NEWLINES_RE, "\n"); str2 = str2.replace(NULL_RE, "\uFFFD"); state.src = str2; }; } }); // node_modules/markdown-it/lib/rules_core/block.js var require_block = __commonJS({ "node_modules/markdown-it/lib/rules_core/block.js"(exports2, module2) { "use strict"; module2.exports = function block(state) { var token; if (state.inlineMode) { token = new state.Token("inline", "", 0); token.content = state.src; token.map = [0, 1]; token.children = []; state.tokens.push(token); } else { state.md.block.parse(state.src, state.md, state.env, state.tokens); } }; } }); // node_modules/markdown-it/lib/rules_core/inline.js var require_inline = __commonJS({ "node_modules/markdown-it/lib/rules_core/inline.js"(exports2, module2) { "use strict"; module2.exports = function inline(state) { var tokens = state.tokens, tok, i, l; for (i = 0, l = tokens.length; i < l; i++) { tok = tokens[i]; if (tok.type === "inline") { state.md.inline.parse(tok.content, state.md, state.env, tok.children); } } }; } }); // node_modules/markdown-it/lib/rules_core/linkify.js var require_linkify = __commonJS({ "node_modules/markdown-it/lib/rules_core/linkify.js"(exports2, module2) { "use strict"; var arrayReplaceAt = require_utils().arrayReplaceAt; function isLinkOpen(str2) { return /^\s]/i.test(str2); } function isLinkClose(str2) { return /^<\/a\s*>/i.test(str2); } module2.exports = function linkify(state) { var i, j, l, tokens, token, currentToken, nodes, ln, text, pos, lastPos, level, htmlLinkLevel, url2, fullUrl, urlText, blockTokens = state.tokens, links; if (!state.md.options.linkify) { return; } for (j = 0, l = blockTokens.length; j < l; j++) { if (blockTokens[j].type !== "inline" || !state.md.linkify.pretest(blockTokens[j].content)) { continue; } tokens = blockTokens[j].children; htmlLinkLevel = 0; for (i = tokens.length - 1; i >= 0; i--) { currentToken = tokens[i]; if (currentToken.type === "link_close") { i--; while (tokens[i].level !== currentToken.level && tokens[i].type !== "link_open") { i--; } continue; } if (currentToken.type === "html_inline") { if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) { htmlLinkLevel--; } if (isLinkClose(currentToken.content)) { htmlLinkLevel++; } } if (htmlLinkLevel > 0) { continue; } if (currentToken.type === "text" && state.md.linkify.test(currentToken.content)) { text = currentToken.content; links = state.md.linkify.match(text); nodes = []; level = currentToken.level; lastPos = 0; if (links.length > 0 && links[0].index === 0 && i > 0 && tokens[i - 1].type === "text_special") { links = links.slice(1); } for (ln = 0; ln < links.length; ln++) { url2 = links[ln].url; fullUrl = state.md.normalizeLink(url2); if (!state.md.validateLink(fullUrl)) { continue; } urlText = links[ln].text; if (!links[ln].schema) { urlText = state.md.normalizeLinkText("http://" + urlText).replace(/^http:\/\//, ""); } else if (links[ln].schema === "mailto:" && !/^mailto:/i.test(urlText)) { urlText = state.md.normalizeLinkText("mailto:" + urlText).replace(/^mailto:/, ""); } else { urlText = state.md.normalizeLinkText(urlText); } pos = links[ln].index; if (pos > lastPos) { token = new state.Token("text", "", 0); token.content = text.slice(lastPos, pos); token.level = level; nodes.push(token); } token = new state.Token("link_open", "a", 1); token.attrs = [["href", fullUrl]]; token.level = level++; token.markup = "linkify"; token.info = "auto"; nodes.push(token); token = new state.Token("text", "", 0); token.content = urlText; token.level = level; nodes.push(token); token = new state.Token("link_close", "a", -1); token.level = --level; token.markup = "linkify"; token.info = "auto"; nodes.push(token); lastPos = links[ln].lastIndex; } if (lastPos < text.length) { token = new state.Token("text", "", 0); token.content = text.slice(lastPos); token.level = level; nodes.push(token); } blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes); } } } }; } }); // node_modules/markdown-it/lib/rules_core/replacements.js var require_replacements = __commonJS({ "node_modules/markdown-it/lib/rules_core/replacements.js"(exports2, module2) { "use strict"; var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/; var SCOPED_ABBR_TEST_RE = /\((c|tm|r)\)/i; var SCOPED_ABBR_RE = /\((c|tm|r)\)/ig; var SCOPED_ABBR = { c: "\xA9", r: "\xAE", tm: "\u2122" }; function replaceFn(match, name) { return SCOPED_ABBR[name.toLowerCase()]; } function replace_scoped(inlineTokens) { var i, token, inside_autolink = 0; for (i = inlineTokens.length - 1; i >= 0; i--) { token = inlineTokens[i]; if (token.type === "text" && !inside_autolink) { token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn); } if (token.type === "link_open" && token.info === "auto") { inside_autolink--; } if (token.type === "link_close" && token.info === "auto") { inside_autolink++; } } } function replace_rare(inlineTokens) { var i, token, inside_autolink = 0; for (i = inlineTokens.length - 1; i >= 0; i--) { token = inlineTokens[i]; if (token.type === "text" && !inside_autolink) { if (RARE_RE.test(token.content)) { token.content = token.content.replace(/\+-/g, "\xB1").replace(/\.{2,}/g, "\u2026").replace(/([?!])…/g, "$1..").replace(/([?!]){4,}/g, "$1$1$1").replace(/,{2,}/g, ",").replace(/(^|[^-])---(?=[^-]|$)/mg, "$1\u2014").replace(/(^|\s)--(?=\s|$)/mg, "$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg, "$1\u2013"); } } if (token.type === "link_open" && token.info === "auto") { inside_autolink--; } if (token.type === "link_close" && token.info === "auto") { inside_autolink++; } } } module2.exports = function replace(state) { var blkIdx; if (!state.md.options.typographer) { return; } for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) { if (state.tokens[blkIdx].type !== "inline") { continue; } if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) { replace_scoped(state.tokens[blkIdx].children); } if (RARE_RE.test(state.tokens[blkIdx].content)) { replace_rare(state.tokens[blkIdx].children); } } }; } }); // node_modules/markdown-it/lib/rules_core/smartquotes.js var require_smartquotes = __commonJS({ "node_modules/markdown-it/lib/rules_core/smartquotes.js"(exports2, module2) { "use strict"; var isWhiteSpace = require_utils().isWhiteSpace; var isPunctChar = require_utils().isPunctChar; var isMdAsciiPunct = require_utils().isMdAsciiPunct; var QUOTE_TEST_RE = /['"]/; var QUOTE_RE = /['"]/g; var APOSTROPHE = "\u2019"; function replaceAt(str2, index, ch) { return str2.slice(0, index) + ch + str2.slice(index + 1); } function process_inlines(tokens, state) { var i, token, text, t, pos, max, thisLevel, item, lastChar, nextChar, isLastPunctChar, isNextPunctChar, isLastWhiteSpace, isNextWhiteSpace, canOpen, canClose, j, isSingle, stack, openQuote, closeQuote; stack = []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; thisLevel = tokens[i].level; for (j = stack.length - 1; j >= 0; j--) { if (stack[j].level <= thisLevel) { break; } } stack.length = j + 1; if (token.type !== "text") { continue; } text = token.content; pos = 0; max = text.length; OUTER: while (pos < max) { QUOTE_RE.lastIndex = pos; t = QUOTE_RE.exec(text); if (!t) { break; } canOpen = canClose = true; pos = t.index + 1; isSingle = t[0] === "'"; lastChar = 32; if (t.index - 1 >= 0) { lastChar = text.charCodeAt(t.index - 1); } else { for (j = i - 1; j >= 0; j--) { if (tokens[j].type === "softbreak" || tokens[j].type === "hardbreak") break; if (!tokens[j].content) continue; lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1); break; } } nextChar = 32; if (pos < max) { nextChar = text.charCodeAt(pos); } else { for (j = i + 1; j < tokens.length; j++) { if (tokens[j].type === "softbreak" || tokens[j].type === "hardbreak") break; if (!tokens[j].content) continue; nextChar = tokens[j].content.charCodeAt(0); break; } } isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar)); isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar)); isLastWhiteSpace = isWhiteSpace(lastChar); isNextWhiteSpace = isWhiteSpace(nextChar); if (isNextWhiteSpace) { canOpen = false; } else if (isNextPunctChar) { if (!(isLastWhiteSpace || isLastPunctChar)) { canOpen = false; } } if (isLastWhiteSpace) { canClose = false; } else if (isLastPunctChar) { if (!(isNextWhiteSpace || isNextPunctChar)) { canClose = false; } } if (nextChar === 34 && t[0] === '"') { if (lastChar >= 48 && lastChar <= 57) { canClose = canOpen = false; } } if (canOpen && canClose) { canOpen = isLastPunctChar; canClose = isNextPunctChar; } if (!canOpen && !canClose) { if (isSingle) { token.content = replaceAt(token.content, t.index, APOSTROPHE); } continue; } if (canClose) { for (j = stack.length - 1; j >= 0; j--) { item = stack[j]; if (stack[j].level < thisLevel) { break; } if (item.single === isSingle && stack[j].level === thisLevel) { item = stack[j]; if (isSingle) { openQuote = state.md.options.quotes[2]; closeQuote = state.md.options.quotes[3]; } else { openQuote = state.md.options.quotes[0]; closeQuote = state.md.options.quotes[1]; } token.content = replaceAt(token.content, t.index, closeQuote); tokens[item.token].content = replaceAt( tokens[item.token].content, item.pos, openQuote ); pos += closeQuote.length - 1; if (item.token === i) { pos += openQuote.length - 1; } text = token.content; max = text.length; stack.length = j; continue OUTER; } } } if (canOpen) { stack.push({ token: i, pos: t.index, single: isSingle, level: thisLevel }); } else if (canClose && isSingle) { token.content = replaceAt(token.content, t.index, APOSTROPHE); } } } } module2.exports = function smartquotes(state) { var blkIdx; if (!state.md.options.typographer) { return; } for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) { if (state.tokens[blkIdx].type !== "inline" || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) { continue; } process_inlines(state.tokens[blkIdx].children, state); } }; } }); // node_modules/markdown-it/lib/rules_core/text_join.js var require_text_join = __commonJS({ "node_modules/markdown-it/lib/rules_core/text_join.js"(exports2, module2) { "use strict"; module2.exports = function text_join(state) { var j, l, tokens, curr, max, last, blockTokens = state.tokens; for (j = 0, l = blockTokens.length; j < l; j++) { if (blockTokens[j].type !== "inline") continue; tokens = blockTokens[j].children; max = tokens.length; for (curr = 0; curr < max; curr++) { if (tokens[curr].type === "text_special") { tokens[curr].type = "text"; } } for (curr = last = 0; curr < max; curr++) { if (tokens[curr].type === "text" && curr + 1 < max && tokens[curr + 1].type === "text") { tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content; } else { if (curr !== last) { tokens[last] = tokens[curr]; } last++; } } if (curr !== last) { tokens.length = last; } } }; } }); // node_modules/markdown-it/lib/token.js var require_token = __commonJS({ "node_modules/markdown-it/lib/token.js"(exports2, module2) { "use strict"; function Token(type, tag, nesting) { this.type = type; this.tag = tag; this.attrs = null; this.map = null; this.nesting = nesting; this.level = 0; this.children = null; this.content = ""; this.markup = ""; this.info = ""; this.meta = null; this.block = false; this.hidden = false; } Token.prototype.attrIndex = function attrIndex(name) { var attrs, i, len; if (!this.attrs) { return -1; } attrs = this.attrs; for (i = 0, len = attrs.length; i < len; i++) { if (attrs[i][0] === name) { return i; } } return -1; }; Token.prototype.attrPush = function attrPush(attrData) { if (this.attrs) { this.attrs.push(attrData); } else { this.attrs = [attrData]; } }; Token.prototype.attrSet = function attrSet(name, value) { var idx = this.attrIndex(name), attrData = [name, value]; if (idx < 0) { this.attrPush(attrData); } else { this.attrs[idx] = attrData; } }; Token.prototype.attrGet = function attrGet(name) { var idx = this.attrIndex(name), value = null; if (idx >= 0) { value = this.attrs[idx][1]; } return value; }; Token.prototype.attrJoin = function attrJoin(name, value) { var idx = this.attrIndex(name); if (idx < 0) { this.attrPush([name, value]); } else { this.attrs[idx][1] = this.attrs[idx][1] + " " + value; } }; module2.exports = Token; } }); // node_modules/markdown-it/lib/rules_core/state_core.js var require_state_core = __commonJS({ "node_modules/markdown-it/lib/rules_core/state_core.js"(exports2, module2) { "use strict"; var Token = require_token(); function StateCore(src, md, env) { this.src = src; this.env = env; this.tokens = []; this.inlineMode = false; this.md = md; } StateCore.prototype.Token = Token; module2.exports = StateCore; } }); // node_modules/markdown-it/lib/parser_core.js var require_parser_core = __commonJS({ "node_modules/markdown-it/lib/parser_core.js"(exports2, module2) { "use strict"; var Ruler = require_ruler(); var _rules = [ ["normalize", require_normalize()], ["block", require_block()], ["inline", require_inline()], ["linkify", require_linkify()], ["replacements", require_replacements()], ["smartquotes", require_smartquotes()], // `text_join` finds `text_special` tokens (for escape sequences) // and joins them with the rest of the text ["text_join", require_text_join()] ]; function Core() { this.ruler = new Ruler(); for (var i = 0; i < _rules.length; i++) { this.ruler.push(_rules[i][0], _rules[i][1]); } } Core.prototype.process = function(state) { var i, l, rules; rules = this.ruler.getRules(""); for (i = 0, l = rules.length; i < l; i++) { rules[i](state); } }; Core.prototype.State = require_state_core(); module2.exports = Core; } }); // node_modules/markdown-it/lib/rules_block/table.js var require_table = __commonJS({ "node_modules/markdown-it/lib/rules_block/table.js"(exports2, module2) { "use strict"; var isSpace = require_utils().isSpace; function getLine(state, line) { var pos = state.bMarks[line] + state.tShift[line], max = state.eMarks[line]; return state.src.slice(pos, max); } function escapedSplit(str2) { var result = [], pos = 0, max = str2.length, ch, isEscaped = false, lastPos = 0, current = ""; ch = str2.charCodeAt(pos); while (pos < max) { if (ch === 124) { if (!isEscaped) { result.push(current + str2.substring(lastPos, pos)); current = ""; lastPos = pos + 1; } else { current += str2.substring(lastPos, pos - 1); lastPos = pos; } } isEscaped = ch === 92; pos++; ch = str2.charCodeAt(pos); } result.push(current + str2.substring(lastPos)); return result; } module2.exports = function table(state, startLine, endLine, silent) { var ch, lineText, pos, i, l, nextLine, columns, columnCount, token, aligns, t, tableLines, tbodyLines, oldParentType, terminate, terminatorRules, firstCh, secondCh; if (startLine + 2 > endLine) { return false; } nextLine = startLine + 1; if (state.sCount[nextLine] < state.blkIndent) { return false; } if (state.sCount[nextLine] - state.blkIndent >= 4) { return false; } pos = state.bMarks[nextLine] + state.tShift[nextLine]; if (pos >= state.eMarks[nextLine]) { return false; } firstCh = state.src.charCodeAt(pos++); if (firstCh !== 124 && firstCh !== 45 && firstCh !== 58) { return false; } if (pos >= state.eMarks[nextLine]) { return false; } secondCh = state.src.charCodeAt(pos++); if (secondCh !== 124 && secondCh !== 45 && secondCh !== 58 && !isSpace(secondCh)) { return false; } if (firstCh === 45 && isSpace(secondCh)) { return false; } while (pos < state.eMarks[nextLine]) { ch = state.src.charCodeAt(pos); if (ch !== 124 && ch !== 45 && ch !== 58 && !isSpace(ch)) { return false; } pos++; } lineText = getLine(state, startLine + 1); columns = lineText.split("|"); aligns = []; for (i = 0; i < columns.length; i++) { t = columns[i].trim(); if (!t) { if (i === 0 || i === columns.length - 1) { continue; } else { return false; } } if (!/^:?-+:?$/.test(t)) { return false; } if (t.charCodeAt(t.length - 1) === 58) { aligns.push(t.charCodeAt(0) === 58 ? "center" : "right"); } else if (t.charCodeAt(0) === 58) { aligns.push("left"); } else { aligns.push(""); } } lineText = getLine(state, startLine).trim(); if (lineText.indexOf("|") === -1) { return false; } if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } columns = escapedSplit(lineText); if (columns.length && columns[0] === "") columns.shift(); if (columns.length && columns[columns.length - 1] === "") columns.pop(); columnCount = columns.length; if (columnCount === 0 || columnCount !== aligns.length) { return false; } if (silent) { return true; } oldParentType = state.parentType; state.parentType = "table"; terminatorRules = state.md.block.ruler.getRules("blockquote"); token = state.push("table_open", "table", 1); token.map = tableLines = [startLine, 0]; token = state.push("thead_open", "thead", 1); token.map = [startLine, startLine + 1]; token = state.push("tr_open", "tr", 1); token.map = [startLine, startLine + 1]; for (i = 0; i < columns.length; i++) { token = state.push("th_open", "th", 1); if (aligns[i]) { token.attrs = [["style", "text-align:" + aligns[i]]]; } token = state.push("inline", "", 0); token.content = columns[i].trim(); token.children = []; token = state.push("th_close", "th", -1); } token = state.push("tr_close", "tr", -1); token = state.push("thead_close", "thead", -1); for (nextLine = startLine + 2; nextLine < endLine; nextLine++) { if (state.sCount[nextLine] < state.blkIndent) { break; } terminate = false; for (i = 0, l = terminatorRules.length; i < l; i++) { if (terminatorRules[i](state, nextLine, endLine, true)) { terminate = true; break; } } if (terminate) { break; } lineText = getLine(state, nextLine).trim(); if (!lineText) { break; } if (state.sCount[nextLine] - state.blkIndent >= 4) { break; } columns = escapedSplit(lineText); if (columns.length && columns[0] === "") columns.shift(); if (columns.length && columns[columns.length - 1] === "") columns.pop(); if (nextLine === startLine + 2) { token = state.push("tbody_open", "tbody", 1); token.map = tbodyLines = [startLine + 2, 0]; } token = state.push("tr_open", "tr", 1); token.map = [nextLine, nextLine + 1]; for (i = 0; i < columnCount; i++) { token = state.push("td_open", "td", 1); if (aligns[i]) { token.attrs = [["style", "text-align:" + aligns[i]]]; } token = state.push("inline", "", 0); token.content = columns[i] ? columns[i].trim() : ""; token.children = []; token = state.push("td_close", "td", -1); } token = state.push("tr_close", "tr", -1); } if (tbodyLines) { token = state.push("tbody_close", "tbody", -1); tbodyLines[1] = nextLine; } token = state.push("table_close", "table", -1); tableLines[1] = nextLine; state.parentType = oldParentType; state.line = nextLine; return true; }; } }); // node_modules/markdown-it/lib/rules_block/code.js var require_code = __commonJS({ "node_modules/markdown-it/lib/rules_block/code.js"(exports2, module2) { "use strict"; module2.exports = function code(state, startLine, endLine) { var nextLine, last, token; if (state.sCount[startLine] - state.blkIndent < 4) { return false; } last = nextLine = startLine + 1; while (nextLine < endLine) { if (state.isEmpty(nextLine)) { nextLine++; continue; } if (state.sCount[nextLine] - state.blkIndent >= 4) { nextLine++; last = nextLine; continue; } break; } state.line = last; token = state.push("code_block", "code", 0); token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + "\n"; token.map = [startLine, state.line]; return true; }; } }); // node_modules/markdown-it/lib/rules_block/fence.js var require_fence = __commonJS({ "node_modules/markdown-it/lib/rules_block/fence.js"(exports2, module2) { "use strict"; module2.exports = function fence(state, startLine, endLine, silent) { var marker, len, params, nextLine, mem, token, markup, haveEndMarker = false, pos = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } if (pos + 3 > max) { return false; } marker = state.src.charCodeAt(pos); if (marker !== 126 && marker !== 96) { return false; } mem = pos; pos = state.skipChars(pos, marker); len = pos - mem; if (len < 3) { return false; } markup = state.src.slice(mem, pos); params = state.src.slice(pos, max); if (marker === 96) { if (params.indexOf(String.fromCharCode(marker)) >= 0) { return false; } } if (silent) { return true; } nextLine = startLine; for (; ; ) { nextLine++; if (nextLine >= endLine) { break; } pos = mem = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; if (pos < max && state.sCount[nextLine] < state.blkIndent) { break; } if (state.src.charCodeAt(pos) !== marker) { continue; } if (state.sCount[nextLine] - state.blkIndent >= 4) { continue; } pos = state.skipChars(pos, marker); if (pos - mem < len) { continue; } pos = state.skipSpaces(pos); if (pos < max) { continue; } haveEndMarker = true; break; } len = state.sCount[startLine]; state.line = nextLine + (haveEndMarker ? 1 : 0); token = state.push("fence", "code", 0); token.info = params; token.content = state.getLines(startLine + 1, nextLine, len, true); token.markup = markup; token.map = [startLine, state.line]; return true; }; } }); // node_modules/markdown-it/lib/rules_block/blockquote.js var require_blockquote = __commonJS({ "node_modules/markdown-it/lib/rules_block/blockquote.js"(exports2, module2) { "use strict"; var isSpace = require_utils().isSpace; module2.exports = function blockquote(state, startLine, endLine, silent) { var adjustTab, ch, i, initial, l, lastLineEmpty, lines, nextLine, offset, oldBMarks, oldBSCount, oldIndent, oldParentType, oldSCount, oldTShift, spaceAfterMarker, terminate, terminatorRules, token, isOutdented, oldLineMax = state.lineMax, pos = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } if (state.src.charCodeAt(pos++) !== 62) { return false; } if (silent) { return true; } initial = offset = state.sCount[startLine] + 1; if (state.src.charCodeAt(pos) === 32) { pos++; initial++; offset++; adjustTab = false; spaceAfterMarker = true; } else if (state.src.charCodeAt(pos) === 9) { spaceAfterMarker = true; if ((state.bsCount[startLine] + offset) % 4 === 3) { pos++; initial++; offset++; adjustTab = false; } else { adjustTab = true; } } else { spaceAfterMarker = false; } oldBMarks = [state.bMarks[startLine]]; state.bMarks[startLine] = pos; while (pos < max) { ch = state.src.charCodeAt(pos); if (isSpace(ch)) { if (ch === 9) { offset += 4 - (offset + state.bsCount[startLine] + (adjustTab ? 1 : 0)) % 4; } else { offset++; } } else { break; } pos++; } oldBSCount = [state.bsCount[startLine]]; state.bsCount[startLine] = state.sCount[startLine] + 1 + (spaceAfterMarker ? 1 : 0); lastLineEmpty = pos >= max; oldSCount = [state.sCount[startLine]]; state.sCount[startLine] = offset - initial; oldTShift = [state.tShift[startLine]]; state.tShift[startLine] = pos - state.bMarks[startLine]; terminatorRules = state.md.block.ruler.getRules("blockquote"); oldParentType = state.parentType; state.parentType = "blockquote"; for (nextLine = startLine + 1; nextLine < endLine; nextLine++) { isOutdented = state.sCount[nextLine] < state.blkIndent; pos = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; if (pos >= max) { break; } if (state.src.charCodeAt(pos++) === 62 && !isOutdented) { initial = offset = state.sCount[nextLine] + 1; if (state.src.charCodeAt(pos) === 32) { pos++; initial++; offset++; adjustTab = false; spaceAfterMarker = true; } else if (state.src.charCodeAt(pos) === 9) { spaceAfterMarker = true; if ((state.bsCount[nextLine] + offset) % 4 === 3) { pos++; initial++; offset++; adjustTab = false; } else { adjustTab = true; } } else { spaceAfterMarker = false; } oldBMarks.push(state.bMarks[nextLine]); state.bMarks[nextLine] = pos; while (pos < max) { ch = state.src.charCodeAt(pos); if (isSpace(ch)) { if (ch === 9) { offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4; } else { offset++; } } else { break; } pos++; } lastLineEmpty = pos >= max; oldBSCount.push(state.bsCount[nextLine]); state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0); oldSCount.push(state.sCount[nextLine]); state.sCount[nextLine] = offset - initial; oldTShift.push(state.tShift[nextLine]); state.tShift[nextLine] = pos - state.bMarks[nextLine]; continue; } if (lastLineEmpty) { break; } terminate = false; for (i = 0, l = terminatorRules.length; i < l; i++) { if (terminatorRules[i](state, nextLine, endLine, true)) { terminate = true; break; } } if (terminate) { state.lineMax = nextLine; if (state.blkIndent !== 0) { oldBMarks.push(state.bMarks[nextLine]); oldBSCount.push(state.bsCount[nextLine]); oldTShift.push(state.tShift[nextLine]); oldSCount.push(state.sCount[nextLine]); state.sCount[nextLine] -= state.blkIndent; } break; } oldBMarks.push(state.bMarks[nextLine]); oldBSCount.push(state.bsCount[nextLine]); oldTShift.push(state.tShift[nextLine]); oldSCount.push(state.sCount[nextLine]); state.sCount[nextLine] = -1; } oldIndent = state.blkIndent; state.blkIndent = 0; token = state.push("blockquote_open", "blockquote", 1); token.markup = ">"; token.map = lines = [startLine, 0]; state.md.block.tokenize(state, startLine, nextLine); token = state.push("blockquote_close", "blockquote", -1); token.markup = ">"; state.lineMax = oldLineMax; state.parentType = oldParentType; lines[1] = state.line; for (i = 0; i < oldTShift.length; i++) { state.bMarks[i + startLine] = oldBMarks[i]; state.tShift[i + startLine] = oldTShift[i]; state.sCount[i + startLine] = oldSCount[i]; state.bsCount[i + startLine] = oldBSCount[i]; } state.blkIndent = oldIndent; return true; }; } }); // node_modules/markdown-it/lib/rules_block/hr.js var require_hr = __commonJS({ "node_modules/markdown-it/lib/rules_block/hr.js"(exports2, module2) { "use strict"; var isSpace = require_utils().isSpace; module2.exports = function hr(state, startLine, endLine, silent) { var marker, cnt, ch, token, pos = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } marker = state.src.charCodeAt(pos++); if (marker !== 42 && marker !== 45 && marker !== 95) { return false; } cnt = 1; while (pos < max) { ch = state.src.charCodeAt(pos++); if (ch !== marker && !isSpace(ch)) { return false; } if (ch === marker) { cnt++; } } if (cnt < 3) { return false; } if (silent) { return true; } state.line = startLine + 1; token = state.push("hr", "hr", 0); token.map = [startLine, state.line]; token.markup = Array(cnt + 1).join(String.fromCharCode(marker)); return true; }; } }); // node_modules/markdown-it/lib/rules_block/list.js var require_list = __commonJS({ "node_modules/markdown-it/lib/rules_block/list.js"(exports2, module2) { "use strict"; var isSpace = require_utils().isSpace; function skipBulletListMarker(state, startLine) { var marker, pos, max, ch; pos = state.bMarks[startLine] + state.tShift[startLine]; max = state.eMarks[startLine]; marker = state.src.charCodeAt(pos++); if (marker !== 42 && marker !== 45 && marker !== 43) { return -1; } if (pos < max) { ch = state.src.charCodeAt(pos); if (!isSpace(ch)) { return -1; } } return pos; } function skipOrderedListMarker(state, startLine) { var ch, start = state.bMarks[startLine] + state.tShift[startLine], pos = start, max = state.eMarks[startLine]; if (pos + 1 >= max) { return -1; } ch = state.src.charCodeAt(pos++); if (ch < 48 || ch > 57) { return -1; } for (; ; ) { if (pos >= max) { return -1; } ch = state.src.charCodeAt(pos++); if (ch >= 48 && ch <= 57) { if (pos - start >= 10) { return -1; } continue; } if (ch === 41 || ch === 46) { break; } return -1; } if (pos < max) { ch = state.src.charCodeAt(pos); if (!isSpace(ch)) { return -1; } } return pos; } function markTightParagraphs(state, idx) { var i, l, level = state.level + 2; for (i = idx + 2, l = state.tokens.length - 2; i < l; i++) { if (state.tokens[i].level === level && state.tokens[i].type === "paragraph_open") { state.tokens[i + 2].hidden = true; state.tokens[i].hidden = true; i += 2; } } } module2.exports = function list(state, startLine, endLine, silent) { var ch, contentStart, i, indent, indentAfterMarker, initial, isOrdered, itemLines, l, listLines, listTokIdx, markerCharCode, markerValue, max, nextLine, offset, oldListIndent, oldParentType, oldSCount, oldTShift, oldTight, pos, posAfterMarker, prevEmptyEnd, start, terminate, terminatorRules, token, isTerminatingParagraph = false, tight = true; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } if (state.listIndent >= 0 && state.sCount[startLine] - state.listIndent >= 4 && state.sCount[startLine] < state.blkIndent) { return false; } if (silent && state.parentType === "paragraph") { if (state.sCount[startLine] >= state.blkIndent) { isTerminatingParagraph = true; } } if ((posAfterMarker = skipOrderedListMarker(state, startLine)) >= 0) { isOrdered = true; start = state.bMarks[startLine] + state.tShift[startLine]; markerValue = Number(state.src.slice(start, posAfterMarker - 1)); if (isTerminatingParagraph && markerValue !== 1) return false; } else if ((posAfterMarker = skipBulletListMarker(state, startLine)) >= 0) { isOrdered = false; } else { return false; } if (isTerminatingParagraph) { if (state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]) return false; } markerCharCode = state.src.charCodeAt(posAfterMarker - 1); if (silent) { return true; } listTokIdx = state.tokens.length; if (isOrdered) { token = state.push("ordered_list_open", "ol", 1); if (markerValue !== 1) { token.attrs = [["start", markerValue]]; } } else { token = state.push("bullet_list_open", "ul", 1); } token.map = listLines = [startLine, 0]; token.markup = String.fromCharCode(markerCharCode); nextLine = startLine; prevEmptyEnd = false; terminatorRules = state.md.block.ruler.getRules("list"); oldParentType = state.parentType; state.parentType = "list"; while (nextLine < endLine) { pos = posAfterMarker; max = state.eMarks[nextLine]; initial = offset = state.sCount[nextLine] + posAfterMarker - (state.bMarks[startLine] + state.tShift[startLine]); while (pos < max) { ch = state.src.charCodeAt(pos); if (ch === 9) { offset += 4 - (offset + state.bsCount[nextLine]) % 4; } else if (ch === 32) { offset++; } else { break; } pos++; } contentStart = pos; if (contentStart >= max) { indentAfterMarker = 1; } else { indentAfterMarker = offset - initial; } if (indentAfterMarker > 4) { indentAfterMarker = 1; } indent = initial + indentAfterMarker; token = state.push("list_item_open", "li", 1); token.markup = String.fromCharCode(markerCharCode); token.map = itemLines = [startLine, 0]; if (isOrdered) { token.info = state.src.slice(start, posAfterMarker - 1); } oldTight = state.tight; oldTShift = state.tShift[startLine]; oldSCount = state.sCount[startLine]; oldListIndent = state.listIndent; state.listIndent = state.blkIndent; state.blkIndent = indent; state.tight = true; state.tShift[startLine] = contentStart - state.bMarks[startLine]; state.sCount[startLine] = offset; if (contentStart >= max && state.isEmpty(startLine + 1)) { state.line = Math.min(state.line + 2, endLine); } else { state.md.block.tokenize(state, startLine, endLine, true); } if (!state.tight || prevEmptyEnd) { tight = false; } prevEmptyEnd = state.line - startLine > 1 && state.isEmpty(state.line - 1); state.blkIndent = state.listIndent; state.listIndent = oldListIndent; state.tShift[startLine] = oldTShift; state.sCount[startLine] = oldSCount; state.tight = oldTight; token = state.push("list_item_close", "li", -1); token.markup = String.fromCharCode(markerCharCode); nextLine = startLine = state.line; itemLines[1] = nextLine; contentStart = state.bMarks[startLine]; if (nextLine >= endLine) { break; } if (state.sCount[nextLine] < state.blkIndent) { break; } if (state.sCount[startLine] - state.blkIndent >= 4) { break; } terminate = false; for (i = 0, l = terminatorRules.length; i < l; i++) { if (terminatorRules[i](state, nextLine, endLine, true)) { terminate = true; break; } } if (terminate) { break; } if (isOrdered) { posAfterMarker = skipOrderedListMarker(state, nextLine); if (posAfterMarker < 0) { break; } start = state.bMarks[nextLine] + state.tShift[nextLine]; } else { posAfterMarker = skipBulletListMarker(state, nextLine); if (posAfterMarker < 0) { break; } } if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; } } if (isOrdered) { token = state.push("ordered_list_close", "ol", -1); } else { token = state.push("bullet_list_close", "ul", -1); } token.markup = String.fromCharCode(markerCharCode); listLines[1] = nextLine; state.line = nextLine; state.parentType = oldParentType; if (tight) { markTightParagraphs(state, listTokIdx); } return true; }; } }); // node_modules/markdown-it/lib/rules_block/reference.js var require_reference = __commonJS({ "node_modules/markdown-it/lib/rules_block/reference.js"(exports2, module2) { "use strict"; var normalizeReference = require_utils().normalizeReference; var isSpace = require_utils().isSpace; module2.exports = function reference(state, startLine, _endLine, silent) { var ch, destEndPos, destEndLineNo, endLine, href, i, l, label, labelEnd, oldParentType, res, start, str2, terminate, terminatorRules, title2, lines = 0, pos = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine], nextLine = startLine + 1; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } if (state.src.charCodeAt(pos) !== 91) { return false; } while (++pos < max) { if (state.src.charCodeAt(pos) === 93 && state.src.charCodeAt(pos - 1) !== 92) { if (pos + 1 === max) { return false; } if (state.src.charCodeAt(pos + 1) !== 58) { return false; } break; } } endLine = state.lineMax; terminatorRules = state.md.block.ruler.getRules("reference"); oldParentType = state.parentType; state.parentType = "reference"; for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { if (state.sCount[nextLine] - state.blkIndent > 3) { continue; } if (state.sCount[nextLine] < 0) { continue; } terminate = false; for (i = 0, l = terminatorRules.length; i < l; i++) { if (terminatorRules[i](state, nextLine, endLine, true)) { terminate = true; break; } } if (terminate) { break; } } str2 = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); max = str2.length; for (pos = 1; pos < max; pos++) { ch = str2.charCodeAt(pos); if (ch === 91) { return false; } else if (ch === 93) { labelEnd = pos; break; } else if (ch === 10) { lines++; } else if (ch === 92) { pos++; if (pos < max && str2.charCodeAt(pos) === 10) { lines++; } } } if (labelEnd < 0 || str2.charCodeAt(labelEnd + 1) !== 58) { return false; } for (pos = labelEnd + 2; pos < max; pos++) { ch = str2.charCodeAt(pos); if (ch === 10) { lines++; } else if (isSpace(ch)) { } else { break; } } res = state.md.helpers.parseLinkDestination(str2, pos, max); if (!res.ok) { return false; } href = state.md.normalizeLink(res.str); if (!state.md.validateLink(href)) { return false; } pos = res.pos; lines += res.lines; destEndPos = pos; destEndLineNo = lines; start = pos; for (; pos < max; pos++) { ch = str2.charCodeAt(pos); if (ch === 10) { lines++; } else if (isSpace(ch)) { } else { break; } } res = state.md.helpers.parseLinkTitle(str2, pos, max); if (pos < max && start !== pos && res.ok) { title2 = res.str; pos = res.pos; lines += res.lines; } else { title2 = ""; pos = destEndPos; lines = destEndLineNo; } while (pos < max) { ch = str2.charCodeAt(pos); if (!isSpace(ch)) { break; } pos++; } if (pos < max && str2.charCodeAt(pos) !== 10) { if (title2) { title2 = ""; pos = destEndPos; lines = destEndLineNo; while (pos < max) { ch = str2.charCodeAt(pos); if (!isSpace(ch)) { break; } pos++; } } } if (pos < max && str2.charCodeAt(pos) !== 10) { return false; } label = normalizeReference(str2.slice(1, labelEnd)); if (!label) { return false; } if (silent) { return true; } if (typeof state.env.references === "undefined") { state.env.references = {}; } if (typeof state.env.references[label] === "undefined") { state.env.references[label] = { title: title2, href }; } state.parentType = oldParentType; state.line = startLine + lines + 1; return true; }; } }); // node_modules/markdown-it/lib/common/html_blocks.js var require_html_blocks = __commonJS({ "node_modules/markdown-it/lib/common/html_blocks.js"(exports2, module2) { "use strict"; module2.exports = [ "address", "article", "aside", "base", "basefont", "blockquote", "body", "caption", "center", "col", "colgroup", "dd", "details", "dialog", "dir", "div", "dl", "dt", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hr", "html", "iframe", "legend", "li", "link", "main", "menu", "menuitem", "nav", "noframes", "ol", "optgroup", "option", "p", "param", "section", "source", "summary", "table", "tbody", "td", "tfoot", "th", "thead", "title", "tr", "track", "ul" ]; } }); // node_modules/markdown-it/lib/common/html_re.js var require_html_re = __commonJS({ "node_modules/markdown-it/lib/common/html_re.js"(exports2, module2) { "use strict"; var attr_name = "[a-zA-Z_:][a-zA-Z0-9:._-]*"; var unquoted = "[^\"'=<>`\\x00-\\x20]+"; var single_quoted = "'[^']*'"; var double_quoted = '"[^"]*"'; var attr_value = "(?:" + unquoted + "|" + single_quoted + "|" + double_quoted + ")"; var attribute = "(?:\\s+" + attr_name + "(?:\\s*=\\s*" + attr_value + ")?)"; var open_tag = "<[A-Za-z][A-Za-z0-9\\-]*" + attribute + "*\\s*\\/?>"; var close_tag = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>"; var comment = "|"; var processing = "<[?][\\s\\S]*?[?]>"; var declaration = "]*>"; var cdata = ""; var HTML_TAG_RE = new RegExp("^(?:" + open_tag + "|" + close_tag + "|" + comment + "|" + processing + "|" + declaration + "|" + cdata + ")"); var HTML_OPEN_CLOSE_TAG_RE = new RegExp("^(?:" + open_tag + "|" + close_tag + ")"); module2.exports.HTML_TAG_RE = HTML_TAG_RE; module2.exports.HTML_OPEN_CLOSE_TAG_RE = HTML_OPEN_CLOSE_TAG_RE; } }); // node_modules/markdown-it/lib/rules_block/html_block.js var require_html_block = __commonJS({ "node_modules/markdown-it/lib/rules_block/html_block.js"(exports2, module2) { "use strict"; var block_names = require_html_blocks(); var HTML_OPEN_CLOSE_TAG_RE = require_html_re().HTML_OPEN_CLOSE_TAG_RE; var HTML_SEQUENCES = [ [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, true], [/^/, true], [/^<\?/, /\?>/, true], [/^/, true], [/^/, true], [new RegExp("^|$))", "i"), /^$/, true], [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + "\\s*$"), /^$/, false] ]; module2.exports = function html_block(state, startLine, endLine, silent) { var i, nextLine, token, lineText, pos = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } if (!state.md.options.html) { return false; } if (state.src.charCodeAt(pos) !== 60) { return false; } lineText = state.src.slice(pos, max); for (i = 0; i < HTML_SEQUENCES.length; i++) { if (HTML_SEQUENCES[i][0].test(lineText)) { break; } } if (i === HTML_SEQUENCES.length) { return false; } if (silent) { return HTML_SEQUENCES[i][2]; } nextLine = startLine + 1; if (!HTML_SEQUENCES[i][1].test(lineText)) { for (; nextLine < endLine; nextLine++) { if (state.sCount[nextLine] < state.blkIndent) { break; } pos = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; lineText = state.src.slice(pos, max); if (HTML_SEQUENCES[i][1].test(lineText)) { if (lineText.length !== 0) { nextLine++; } break; } } } state.line = nextLine; token = state.push("html_block", "", 0); token.map = [startLine, nextLine]; token.content = state.getLines(startLine, nextLine, state.blkIndent, true); return true; }; } }); // node_modules/markdown-it/lib/rules_block/heading.js var require_heading = __commonJS({ "node_modules/markdown-it/lib/rules_block/heading.js"(exports2, module2) { "use strict"; var isSpace = require_utils().isSpace; module2.exports = function heading(state, startLine, endLine, silent) { var ch, level, tmp, token, pos = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine]; if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } ch = state.src.charCodeAt(pos); if (ch !== 35 || pos >= max) { return false; } level = 1; ch = state.src.charCodeAt(++pos); while (ch === 35 && pos < max && level <= 6) { level++; ch = state.src.charCodeAt(++pos); } if (level > 6 || pos < max && !isSpace(ch)) { return false; } if (silent) { return true; } max = state.skipSpacesBack(max, pos); tmp = state.skipCharsBack(max, 35, pos); if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) { max = tmp; } state.line = startLine + 1; token = state.push("heading_open", "h" + String(level), 1); token.markup = "########".slice(0, level); token.map = [startLine, state.line]; token = state.push("inline", "", 0); token.content = state.src.slice(pos, max).trim(); token.map = [startLine, state.line]; token.children = []; token = state.push("heading_close", "h" + String(level), -1); token.markup = "########".slice(0, level); return true; }; } }); // node_modules/markdown-it/lib/rules_block/lheading.js var require_lheading = __commonJS({ "node_modules/markdown-it/lib/rules_block/lheading.js"(exports2, module2) { "use strict"; module2.exports = function lheading(state, startLine, endLine) { var content, terminate, i, l, token, pos, max, level, marker, nextLine = startLine + 1, oldParentType, terminatorRules = state.md.block.ruler.getRules("paragraph"); if (state.sCount[startLine] - state.blkIndent >= 4) { return false; } oldParentType = state.parentType; state.parentType = "paragraph"; for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { if (state.sCount[nextLine] - state.blkIndent > 3) { continue; } if (state.sCount[nextLine] >= state.blkIndent) { pos = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; if (pos < max) { marker = state.src.charCodeAt(pos); if (marker === 45 || marker === 61) { pos = state.skipChars(pos, marker); pos = state.skipSpaces(pos); if (pos >= max) { level = marker === 61 ? 1 : 2; break; } } } } if (state.sCount[nextLine] < 0) { continue; } terminate = false; for (i = 0, l = terminatorRules.length; i < l; i++) { if (terminatorRules[i](state, nextLine, endLine, true)) { terminate = true; break; } } if (terminate) { break; } } if (!level) { return false; } content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); state.line = nextLine + 1; token = state.push("heading_open", "h" + String(level), 1); token.markup = String.fromCharCode(marker); token.map = [startLine, state.line]; token = state.push("inline", "", 0); token.content = content; token.map = [startLine, state.line - 1]; token.children = []; token = state.push("heading_close", "h" + String(level), -1); token.markup = String.fromCharCode(marker); state.parentType = oldParentType; return true; }; } }); // node_modules/markdown-it/lib/rules_block/paragraph.js var require_paragraph = __commonJS({ "node_modules/markdown-it/lib/rules_block/paragraph.js"(exports2, module2) { "use strict"; module2.exports = function paragraph(state, startLine) { var content, terminate, i, l, token, oldParentType, nextLine = startLine + 1, terminatorRules = state.md.block.ruler.getRules("paragraph"), endLine = state.lineMax; oldParentType = state.parentType; state.parentType = "paragraph"; for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { if (state.sCount[nextLine] - state.blkIndent > 3) { continue; } if (state.sCount[nextLine] < 0) { continue; } terminate = false; for (i = 0, l = terminatorRules.length; i < l; i++) { if (terminatorRules[i](state, nextLine, endLine, true)) { terminate = true; break; } } if (terminate) { break; } } content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); state.line = nextLine; token = state.push("paragraph_open", "p", 1); token.map = [startLine, state.line]; token = state.push("inline", "", 0); token.content = content; token.map = [startLine, state.line]; token.children = []; token = state.push("paragraph_close", "p", -1); state.parentType = oldParentType; return true; }; } }); // node_modules/markdown-it/lib/rules_block/state_block.js var require_state_block = __commonJS({ "node_modules/markdown-it/lib/rules_block/state_block.js"(exports2, module2) { "use strict"; var Token = require_token(); var isSpace = require_utils().isSpace; function StateBlock(src, md, env, tokens) { var ch, s, start, pos, len, indent, offset, indent_found; this.src = src; this.md = md; this.env = env; this.tokens = tokens; this.bMarks = []; this.eMarks = []; this.tShift = []; this.sCount = []; this.bsCount = []; this.blkIndent = 0; this.line = 0; this.lineMax = 0; this.tight = false; this.ddIndent = -1; this.listIndent = -1; this.parentType = "root"; this.level = 0; this.result = ""; s = this.src; indent_found = false; for (start = pos = indent = offset = 0, len = s.length; pos < len; pos++) { ch = s.charCodeAt(pos); if (!indent_found) { if (isSpace(ch)) { indent++; if (ch === 9) { offset += 4 - offset % 4; } else { offset++; } continue; } else { indent_found = true; } } if (ch === 10 || pos === len - 1) { if (ch !== 10) { pos++; } this.bMarks.push(start); this.eMarks.push(pos); this.tShift.push(indent); this.sCount.push(offset); this.bsCount.push(0); indent_found = false; indent = 0; offset = 0; start = pos + 1; } } this.bMarks.push(s.length); this.eMarks.push(s.length); this.tShift.push(0); this.sCount.push(0); this.bsCount.push(0); this.lineMax = this.bMarks.length - 1; } StateBlock.prototype.push = function(type, tag, nesting) { var token = new Token(type, tag, nesting); token.block = true; if (nesting < 0) this.level--; token.level = this.level; if (nesting > 0) this.level++; this.tokens.push(token); return token; }; StateBlock.prototype.isEmpty = function isEmpty(line) { return this.bMarks[line] + this.tShift[line] >= this.eMarks[line]; }; StateBlock.prototype.skipEmptyLines = function skipEmptyLines(from) { for (var max = this.lineMax; from < max; from++) { if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) { break; } } return from; }; StateBlock.prototype.skipSpaces = function skipSpaces(pos) { var ch; for (var max = this.src.length; pos < max; pos++) { ch = this.src.charCodeAt(pos); if (!isSpace(ch)) { break; } } return pos; }; StateBlock.prototype.skipSpacesBack = function skipSpacesBack(pos, min) { if (pos <= min) { return pos; } while (pos > min) { if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1; } } return pos; }; StateBlock.prototype.skipChars = function skipChars(pos, code) { for (var max = this.src.length; pos < max; pos++) { if (this.src.charCodeAt(pos) !== code) { break; } } return pos; }; StateBlock.prototype.skipCharsBack = function skipCharsBack(pos, code, min) { if (pos <= min) { return pos; } while (pos > min) { if (code !== this.src.charCodeAt(--pos)) { return pos + 1; } } return pos; }; StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF) { var i, lineIndent, ch, first, last, queue, lineStart, line = begin; if (begin >= end) { return ""; } queue = new Array(end - begin); for (i = 0; line < end; line++, i++) { lineIndent = 0; lineStart = first = this.bMarks[line]; if (line + 1 < end || keepLastLF) { last = this.eMarks[line] + 1; } else { last = this.eMarks[line]; } while (first < last && lineIndent < indent) { ch = this.src.charCodeAt(first); if (isSpace(ch)) { if (ch === 9) { lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4; } else { lineIndent++; } } else if (first - lineStart < this.tShift[line]) { lineIndent++; } else { break; } first++; } if (lineIndent > indent) { queue[i] = new Array(lineIndent - indent + 1).join(" ") + this.src.slice(first, last); } else { queue[i] = this.src.slice(first, last); } } return queue.join(""); }; StateBlock.prototype.Token = Token; module2.exports = StateBlock; } }); // node_modules/markdown-it/lib/parser_block.js var require_parser_block = __commonJS({ "node_modules/markdown-it/lib/parser_block.js"(exports2, module2) { "use strict"; var Ruler = require_ruler(); var _rules = [ // First 2 params - rule name & source. Secondary array - list of rules, // which can be terminated by this one. ["table", require_table(), ["paragraph", "reference"]], ["code", require_code()], ["fence", require_fence(), ["paragraph", "reference", "blockquote", "list"]], ["blockquote", require_blockquote(), ["paragraph", "reference", "blockquote", "list"]], ["hr", require_hr(), ["paragraph", "reference", "blockquote", "list"]], ["list", require_list(), ["paragraph", "reference", "blockquote"]], ["reference", require_reference()], ["html_block", require_html_block(), ["paragraph", "reference", "blockquote"]], ["heading", require_heading(), ["paragraph", "reference", "blockquote"]], ["lheading", require_lheading()], ["paragraph", require_paragraph()] ]; function ParserBlock() { this.ruler = new Ruler(); for (var i = 0; i < _rules.length; i++) { this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() }); } } ParserBlock.prototype.tokenize = function(state, startLine, endLine) { var ok, i, rules = this.ruler.getRules(""), len = rules.length, line = startLine, hasEmptyLines = false, maxNesting = state.md.options.maxNesting; while (line < endLine) { state.line = line = state.skipEmptyLines(line); if (line >= endLine) { break; } if (state.sCount[line] < state.blkIndent) { break; } if (state.level >= maxNesting) { state.line = endLine; break; } for (i = 0; i < len; i++) { ok = rules[i](state, line, endLine, false); if (ok) { break; } } state.tight = !hasEmptyLines; if (state.isEmpty(state.line - 1)) { hasEmptyLines = true; } line = state.line; if (line < endLine && state.isEmpty(line)) { hasEmptyLines = true; line++; state.line = line; } } }; ParserBlock.prototype.parse = function(src, md, env, outTokens) { var state; if (!src) { return; } state = new this.State(src, md, env, outTokens); this.tokenize(state, state.line, state.lineMax); }; ParserBlock.prototype.State = require_state_block(); module2.exports = ParserBlock; } }); // node_modules/markdown-it/lib/rules_inline/text.js var require_text = __commonJS({ "node_modules/markdown-it/lib/rules_inline/text.js"(exports2, module2) { "use strict"; function isTerminatorChar(ch) { switch (ch) { case 10: case 33: case 35: case 36: case 37: case 38: case 42: case 43: case 45: case 58: case 60: case 61: case 62: case 64: case 91: case 92: case 93: case 94: case 95: case 96: case 123: case 125: case 126: return true; default: return false; } } module2.exports = function text(state, silent) { var pos = state.pos; while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) { pos++; } if (pos === state.pos) { return false; } if (!silent) { state.pending += state.src.slice(state.pos, pos); } state.pos = pos; return true; }; } }); // node_modules/markdown-it/lib/rules_inline/linkify.js var require_linkify2 = __commonJS({ "node_modules/markdown-it/lib/rules_inline/linkify.js"(exports2, module2) { "use strict"; var SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i; module2.exports = function linkify(state, silent) { var pos, max, match, proto, link, url2, fullUrl, token; if (!state.md.options.linkify) return false; if (state.linkLevel > 0) return false; pos = state.pos; max = state.posMax; if (pos + 3 > max) return false; if (state.src.charCodeAt(pos) !== 58) return false; if (state.src.charCodeAt(pos + 1) !== 47) return false; if (state.src.charCodeAt(pos + 2) !== 47) return false; match = state.pending.match(SCHEME_RE); if (!match) return false; proto = match[1]; link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length)); if (!link) return false; url2 = link.url; url2 = url2.replace(/\*+$/, ""); fullUrl = state.md.normalizeLink(url2); if (!state.md.validateLink(fullUrl)) return false; if (!silent) { state.pending = state.pending.slice(0, -proto.length); token = state.push("link_open", "a", 1); token.attrs = [["href", fullUrl]]; token.markup = "linkify"; token.info = "auto"; token = state.push("text", "", 0); token.content = state.md.normalizeLinkText(url2); token = state.push("link_close", "a", -1); token.markup = "linkify"; token.info = "auto"; } state.pos += url2.length - proto.length; return true; }; } }); // node_modules/markdown-it/lib/rules_inline/newline.js var require_newline = __commonJS({ "node_modules/markdown-it/lib/rules_inline/newline.js"(exports2, module2) { "use strict"; var isSpace = require_utils().isSpace; module2.exports = function newline(state, silent) { var pmax, max, ws, pos = state.pos; if (state.src.charCodeAt(pos) !== 10) { return false; } pmax = state.pending.length - 1; max = state.posMax; if (!silent) { if (pmax >= 0 && state.pending.charCodeAt(pmax) === 32) { if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 32) { ws = pmax - 1; while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 32) ws--; state.pending = state.pending.slice(0, ws); state.push("hardbreak", "br", 0); } else { state.pending = state.pending.slice(0, -1); state.push("softbreak", "br", 0); } } else { state.push("softbreak", "br", 0); } } pos++; while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; } state.pos = pos; return true; }; } }); // node_modules/markdown-it/lib/rules_inline/escape.js var require_escape = __commonJS({ "node_modules/markdown-it/lib/rules_inline/escape.js"(exports2, module2) { "use strict"; var isSpace = require_utils().isSpace; var ESCAPED = []; for (i = 0; i < 256; i++) { ESCAPED.push(0); } var i; "\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(ch) { ESCAPED[ch.charCodeAt(0)] = 1; }); module2.exports = function escape2(state, silent) { var ch1, ch2, origStr, escapedStr, token, pos = state.pos, max = state.posMax; if (state.src.charCodeAt(pos) !== 92) return false; pos++; if (pos >= max) return false; ch1 = state.src.charCodeAt(pos); if (ch1 === 10) { if (!silent) { state.push("hardbreak", "br", 0); } pos++; while (pos < max) { ch1 = state.src.charCodeAt(pos); if (!isSpace(ch1)) break; pos++; } state.pos = pos; return true; } escapedStr = state.src[pos]; if (ch1 >= 55296 && ch1 <= 56319 && pos + 1 < max) { ch2 = state.src.charCodeAt(pos + 1); if (ch2 >= 56320 && ch2 <= 57343) { escapedStr += state.src[pos + 1]; pos++; } } origStr = "\\" + escapedStr; if (!silent) { token = state.push("text_special", "", 0); if (ch1 < 256 && ESCAPED[ch1] !== 0) { token.content = escapedStr; } else { token.content = origStr; } token.markup = origStr; token.info = "escape"; } state.pos = pos + 1; return true; }; } }); // node_modules/markdown-it/lib/rules_inline/backticks.js var require_backticks = __commonJS({ "node_modules/markdown-it/lib/rules_inline/backticks.js"(exports2, module2) { "use strict"; module2.exports = function backtick(state, silent) { var start, max, marker, token, matchStart, matchEnd, openerLength, closerLength, pos = state.pos, ch = state.src.charCodeAt(pos); if (ch !== 96) { return false; } start = pos; pos++; max = state.posMax; while (pos < max && state.src.charCodeAt(pos) === 96) { pos++; } marker = state.src.slice(start, pos); openerLength = marker.length; if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) { if (!silent) state.pending += marker; state.pos += openerLength; return true; } matchStart = matchEnd = pos; while ((matchStart = state.src.indexOf("`", matchEnd)) !== -1) { matchEnd = matchStart + 1; while (matchEnd < max && state.src.charCodeAt(matchEnd) === 96) { matchEnd++; } closerLength = matchEnd - matchStart; if (closerLength === openerLength) { if (!silent) { token = state.push("code_inline", "code", 0); token.markup = marker; token.content = state.src.slice(pos, matchStart).replace(/\n/g, " ").replace(/^ (.+) $/, "$1"); } state.pos = matchEnd; return true; } state.backticks[closerLength] = matchStart; } state.backticksScanned = true; if (!silent) state.pending += marker; state.pos += openerLength; return true; }; } }); // node_modules/markdown-it/lib/rules_inline/strikethrough.js var require_strikethrough = __commonJS({ "node_modules/markdown-it/lib/rules_inline/strikethrough.js"(exports2, module2) { "use strict"; module2.exports.tokenize = function strikethrough(state, silent) { var i, scanned, token, len, ch, start = state.pos, marker = state.src.charCodeAt(start); if (silent) { return false; } if (marker !== 126) { return false; } scanned = state.scanDelims(state.pos, true); len = scanned.length; ch = String.fromCharCode(marker); if (len < 2) { return false; } if (len % 2) { token = state.push("text", "", 0); token.content = ch; len--; } for (i = 0; i < len; i += 2) { token = state.push("text", "", 0); token.content = ch + ch; state.delimiters.push({ marker, length: 0, // disable "rule of 3" length checks meant for emphasis token: state.tokens.length - 1, end: -1, open: scanned.can_open, close: scanned.can_close }); } state.pos += scanned.length; return true; }; function postProcess(state, delimiters) { var i, j, startDelim, endDelim, token, loneMarkers = [], max = delimiters.length; for (i = 0; i < max; i++) { startDelim = delimiters[i]; if (startDelim.marker !== 126) { continue; } if (startDelim.end === -1) { continue; } endDelim = delimiters[startDelim.end]; token = state.tokens[startDelim.token]; token.type = "s_open"; token.tag = "s"; token.nesting = 1; token.markup = "~~"; token.content = ""; token = state.tokens[endDelim.token]; token.type = "s_close"; token.tag = "s"; token.nesting = -1; token.markup = "~~"; token.content = ""; if (state.tokens[endDelim.token - 1].type === "text" && state.tokens[endDelim.token - 1].content === "~") { loneMarkers.push(endDelim.token - 1); } } while (loneMarkers.length) { i = loneMarkers.pop(); j = i + 1; while (j < state.tokens.length && state.tokens[j].type === "s_close") { j++; } j--; if (i !== j) { token = state.tokens[j]; state.tokens[j] = state.tokens[i]; state.tokens[i] = token; } } } module2.exports.postProcess = function strikethrough(state) { var curr, tokens_meta = state.tokens_meta, max = state.tokens_meta.length; postProcess(state, state.delimiters); for (curr = 0; curr < max; curr++) { if (tokens_meta[curr] && tokens_meta[curr].delimiters) { postProcess(state, tokens_meta[curr].delimiters); } } }; } }); // node_modules/markdown-it/lib/rules_inline/emphasis.js var require_emphasis = __commonJS({ "node_modules/markdown-it/lib/rules_inline/emphasis.js"(exports2, module2) { "use strict"; module2.exports.tokenize = function emphasis(state, silent) { var i, scanned, token, start = state.pos, marker = state.src.charCodeAt(start); if (silent) { return false; } if (marker !== 95 && marker !== 42) { return false; } scanned = state.scanDelims(state.pos, marker === 42); for (i = 0; i < scanned.length; i++) { token = state.push("text", "", 0); token.content = String.fromCharCode(marker); state.delimiters.push({ // Char code of the starting marker (number). // marker, // Total length of these series of delimiters. // length: scanned.length, // A position of the token this delimiter corresponds to. // token: state.tokens.length - 1, // If this delimiter is matched as a valid opener, `end` will be // equal to its position, otherwise it's `-1`. // end: -1, // Boolean flags that determine if this delimiter could open or close // an emphasis. // open: scanned.can_open, close: scanned.can_close }); } state.pos += scanned.length; return true; }; function postProcess(state, delimiters) { var i, startDelim, endDelim, token, ch, isStrong, max = delimiters.length; for (i = max - 1; i >= 0; i--) { startDelim = delimiters[i]; if (startDelim.marker !== 95 && startDelim.marker !== 42) { continue; } if (startDelim.end === -1) { continue; } endDelim = delimiters[startDelim.end]; isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 && // check that first two markers match and adjacent delimiters[i - 1].marker === startDelim.marker && delimiters[i - 1].token === startDelim.token - 1 && // check that last two markers are adjacent (we can safely assume they match) delimiters[startDelim.end + 1].token === endDelim.token + 1; ch = String.fromCharCode(startDelim.marker); token = state.tokens[startDelim.token]; token.type = isStrong ? "strong_open" : "em_open"; token.tag = isStrong ? "strong" : "em"; token.nesting = 1; token.markup = isStrong ? ch + ch : ch; token.content = ""; token = state.tokens[endDelim.token]; token.type = isStrong ? "strong_close" : "em_close"; token.tag = isStrong ? "strong" : "em"; token.nesting = -1; token.markup = isStrong ? ch + ch : ch; token.content = ""; if (isStrong) { state.tokens[delimiters[i - 1].token].content = ""; state.tokens[delimiters[startDelim.end + 1].token].content = ""; i--; } } } module2.exports.postProcess = function emphasis(state) { var curr, tokens_meta = state.tokens_meta, max = state.tokens_meta.length; postProcess(state, state.delimiters); for (curr = 0; curr < max; curr++) { if (tokens_meta[curr] && tokens_meta[curr].delimiters) { postProcess(state, tokens_meta[curr].delimiters); } } }; } }); // node_modules/markdown-it/lib/rules_inline/link.js var require_link = __commonJS({ "node_modules/markdown-it/lib/rules_inline/link.js"(exports2, module2) { "use strict"; var normalizeReference = require_utils().normalizeReference; var isSpace = require_utils().isSpace; module2.exports = function link(state, silent) { var attrs, code, label, labelEnd, labelStart, pos, res, ref, token, href = "", title2 = "", oldPos = state.pos, max = state.posMax, start = state.pos, parseReference = true; if (state.src.charCodeAt(state.pos) !== 91) { return false; } labelStart = state.pos + 1; labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true); if (labelEnd < 0) { return false; } pos = labelEnd + 1; if (pos < max && state.src.charCodeAt(pos) === 40) { parseReference = false; pos++; for (; pos < max; pos++) { code = state.src.charCodeAt(pos); if (!isSpace(code) && code !== 10) { break; } } if (pos >= max) { return false; } start = pos; res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax); if (res.ok) { href = state.md.normalizeLink(res.str); if (state.md.validateLink(href)) { pos = res.pos; } else { href = ""; } start = pos; for (; pos < max; pos++) { code = state.src.charCodeAt(pos); if (!isSpace(code) && code !== 10) { break; } } res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax); if (pos < max && start !== pos && res.ok) { title2 = res.str; pos = res.pos; for (; pos < max; pos++) { code = state.src.charCodeAt(pos); if (!isSpace(code) && code !== 10) { break; } } } } if (pos >= max || state.src.charCodeAt(pos) !== 41) { parseReference = true; } pos++; } if (parseReference) { if (typeof state.env.references === "undefined") { return false; } if (pos < max && state.src.charCodeAt(pos) === 91) { start = pos + 1; pos = state.md.helpers.parseLinkLabel(state, pos); if (pos >= 0) { label = state.src.slice(start, pos++); } else { pos = labelEnd + 1; } } else { pos = labelEnd + 1; } if (!label) { label = state.src.slice(labelStart, labelEnd); } ref = state.env.references[normalizeReference(label)]; if (!ref) { state.pos = oldPos; return false; } href = ref.href; title2 = ref.title; } if (!silent) { state.pos = labelStart; state.posMax = labelEnd; token = state.push("link_open", "a", 1); token.attrs = attrs = [["href", href]]; if (title2) { attrs.push(["title", title2]); } state.linkLevel++; state.md.inline.tokenize(state); state.linkLevel--; token = state.push("link_close", "a", -1); } state.pos = pos; state.posMax = max; return true; }; } }); // node_modules/markdown-it/lib/rules_inline/image.js var require_image = __commonJS({ "node_modules/markdown-it/lib/rules_inline/image.js"(exports2, module2) { "use strict"; var normalizeReference = require_utils().normalizeReference; var isSpace = require_utils().isSpace; module2.exports = function image2(state, silent) { var attrs, code, content, label, labelEnd, labelStart, pos, ref, res, title2, token, tokens, start, href = "", oldPos = state.pos, max = state.posMax; if (state.src.charCodeAt(state.pos) !== 33) { return false; } if (state.src.charCodeAt(state.pos + 1) !== 91) { return false; } labelStart = state.pos + 2; labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false); if (labelEnd < 0) { return false; } pos = labelEnd + 1; if (pos < max && state.src.charCodeAt(pos) === 40) { pos++; for (; pos < max; pos++) { code = state.src.charCodeAt(pos); if (!isSpace(code) && code !== 10) { break; } } if (pos >= max) { return false; } start = pos; res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax); if (res.ok) { href = state.md.normalizeLink(res.str); if (state.md.validateLink(href)) { pos = res.pos; } else { href = ""; } } start = pos; for (; pos < max; pos++) { code = state.src.charCodeAt(pos); if (!isSpace(code) && code !== 10) { break; } } res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax); if (pos < max && start !== pos && res.ok) { title2 = res.str; pos = res.pos; for (; pos < max; pos++) { code = state.src.charCodeAt(pos); if (!isSpace(code) && code !== 10) { break; } } } else { title2 = ""; } if (pos >= max || state.src.charCodeAt(pos) !== 41) { state.pos = oldPos; return false; } pos++; } else { if (typeof state.env.references === "undefined") { return false; } if (pos < max && state.src.charCodeAt(pos) === 91) { start = pos + 1; pos = state.md.helpers.parseLinkLabel(state, pos); if (pos >= 0) { label = state.src.slice(start, pos++); } else { pos = labelEnd + 1; } } else { pos = labelEnd + 1; } if (!label) { label = state.src.slice(labelStart, labelEnd); } ref = state.env.references[normalizeReference(label)]; if (!ref) { state.pos = oldPos; return false; } href = ref.href; title2 = ref.title; } if (!silent) { content = state.src.slice(labelStart, labelEnd); state.md.inline.parse( content, state.md, state.env, tokens = [] ); token = state.push("image", "img", 0); token.attrs = attrs = [["src", href], ["alt", ""]]; token.children = tokens; token.content = content; if (title2) { attrs.push(["title", title2]); } } state.pos = pos; state.posMax = max; return true; }; } }); // node_modules/markdown-it/lib/rules_inline/autolink.js var require_autolink = __commonJS({ "node_modules/markdown-it/lib/rules_inline/autolink.js"(exports2, module2) { "use strict"; var EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/; var AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/; module2.exports = function autolink(state, silent) { var url2, fullUrl, token, ch, start, max, pos = state.pos; if (state.src.charCodeAt(pos) !== 60) { return false; } start = state.pos; max = state.posMax; for (; ; ) { if (++pos >= max) return false; ch = state.src.charCodeAt(pos); if (ch === 60) return false; if (ch === 62) break; } url2 = state.src.slice(start + 1, pos); if (AUTOLINK_RE.test(url2)) { fullUrl = state.md.normalizeLink(url2); if (!state.md.validateLink(fullUrl)) { return false; } if (!silent) { token = state.push("link_open", "a", 1); token.attrs = [["href", fullUrl]]; token.markup = "autolink"; token.info = "auto"; token = state.push("text", "", 0); token.content = state.md.normalizeLinkText(url2); token = state.push("link_close", "a", -1); token.markup = "autolink"; token.info = "auto"; } state.pos += url2.length + 2; return true; } if (EMAIL_RE.test(url2)) { fullUrl = state.md.normalizeLink("mailto:" + url2); if (!state.md.validateLink(fullUrl)) { return false; } if (!silent) { token = state.push("link_open", "a", 1); token.attrs = [["href", fullUrl]]; token.markup = "autolink"; token.info = "auto"; token = state.push("text", "", 0); token.content = state.md.normalizeLinkText(url2); token = state.push("link_close", "a", -1); token.markup = "autolink"; token.info = "auto"; } state.pos += url2.length + 2; return true; } return false; }; } }); // node_modules/markdown-it/lib/rules_inline/html_inline.js var require_html_inline = __commonJS({ "node_modules/markdown-it/lib/rules_inline/html_inline.js"(exports2, module2) { "use strict"; var HTML_TAG_RE = require_html_re().HTML_TAG_RE; function isLinkOpen(str2) { return /^\s]/i.test(str2); } function isLinkClose(str2) { return /^<\/a\s*>/i.test(str2); } function isLetter(ch) { var lc = ch | 32; return lc >= 97 && lc <= 122; } module2.exports = function html_inline(state, silent) { var ch, match, max, token, pos = state.pos; if (!state.md.options.html) { return false; } max = state.posMax; if (state.src.charCodeAt(pos) !== 60 || pos + 2 >= max) { return false; } ch = state.src.charCodeAt(pos + 1); if (ch !== 33 && ch !== 63 && ch !== 47 && !isLetter(ch)) { return false; } match = state.src.slice(pos).match(HTML_TAG_RE); if (!match) { return false; } if (!silent) { token = state.push("html_inline", "", 0); token.content = state.src.slice(pos, pos + match[0].length); if (isLinkOpen(token.content)) state.linkLevel++; if (isLinkClose(token.content)) state.linkLevel--; } state.pos += match[0].length; return true; }; } }); // node_modules/markdown-it/lib/rules_inline/entity.js var require_entity = __commonJS({ "node_modules/markdown-it/lib/rules_inline/entity.js"(exports2, module2) { "use strict"; var entities = require_entities2(); var has = require_utils().has; var isValidEntityCode = require_utils().isValidEntityCode; var fromCodePoint = require_utils().fromCodePoint; var DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i; var NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i; module2.exports = function entity(state, silent) { var ch, code, match, token, pos = state.pos, max = state.posMax; if (state.src.charCodeAt(pos) !== 38) return false; if (pos + 1 >= max) return false; ch = state.src.charCodeAt(pos + 1); if (ch === 35) { match = state.src.slice(pos).match(DIGITAL_RE); if (match) { if (!silent) { code = match[1][0].toLowerCase() === "x" ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10); token = state.push("text_special", "", 0); token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(65533); token.markup = match[0]; token.info = "entity"; } state.pos += match[0].length; return true; } } else { match = state.src.slice(pos).match(NAMED_RE); if (match) { if (has(entities, match[1])) { if (!silent) { token = state.push("text_special", "", 0); token.content = entities[match[1]]; token.markup = match[0]; token.info = "entity"; } state.pos += match[0].length; return true; } } } return false; }; } }); // node_modules/markdown-it/lib/rules_inline/balance_pairs.js var require_balance_pairs = __commonJS({ "node_modules/markdown-it/lib/rules_inline/balance_pairs.js"(exports2, module2) { "use strict"; function processDelimiters(state, delimiters) { var closerIdx, openerIdx, closer, opener, minOpenerIdx, newMinOpenerIdx, isOddMatch, lastJump, openersBottom = {}, max = delimiters.length; if (!max) return; var headerIdx = 0; var lastTokenIdx = -2; var jumps = []; for (closerIdx = 0; closerIdx < max; closerIdx++) { closer = delimiters[closerIdx]; jumps.push(0); if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) { headerIdx = closerIdx; } lastTokenIdx = closer.token; closer.length = closer.length || 0; if (!closer.close) continue; if (!openersBottom.hasOwnProperty(closer.marker)) { openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1]; } minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + closer.length % 3]; openerIdx = headerIdx - jumps[headerIdx] - 1; newMinOpenerIdx = openerIdx; for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) { opener = delimiters[openerIdx]; if (opener.marker !== closer.marker) continue; if (opener.open && opener.end < 0) { isOddMatch = false; if (opener.close || closer.open) { if ((opener.length + closer.length) % 3 === 0) { if (opener.length % 3 !== 0 || closer.length % 3 !== 0) { isOddMatch = true; } } } if (!isOddMatch) { lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? jumps[openerIdx - 1] + 1 : 0; jumps[closerIdx] = closerIdx - openerIdx + lastJump; jumps[openerIdx] = lastJump; closer.open = false; opener.end = closerIdx; opener.close = false; newMinOpenerIdx = -1; lastTokenIdx = -2; break; } } } if (newMinOpenerIdx !== -1) { openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length || 0) % 3] = newMinOpenerIdx; } } } module2.exports = function link_pairs(state) { var curr, tokens_meta = state.tokens_meta, max = state.tokens_meta.length; processDelimiters(state, state.delimiters); for (curr = 0; curr < max; curr++) { if (tokens_meta[curr] && tokens_meta[curr].delimiters) { processDelimiters(state, tokens_meta[curr].delimiters); } } }; } }); // node_modules/markdown-it/lib/rules_inline/fragments_join.js var require_fragments_join = __commonJS({ "node_modules/markdown-it/lib/rules_inline/fragments_join.js"(exports2, module2) { "use strict"; module2.exports = function fragments_join(state) { var curr, last, level = 0, tokens = state.tokens, max = state.tokens.length; for (curr = last = 0; curr < max; curr++) { if (tokens[curr].nesting < 0) level--; tokens[curr].level = level; if (tokens[curr].nesting > 0) level++; if (tokens[curr].type === "text" && curr + 1 < max && tokens[curr + 1].type === "text") { tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content; } else { if (curr !== last) { tokens[last] = tokens[curr]; } last++; } } if (curr !== last) { tokens.length = last; } }; } }); // node_modules/markdown-it/lib/rules_inline/state_inline.js var require_state_inline = __commonJS({ "node_modules/markdown-it/lib/rules_inline/state_inline.js"(exports2, module2) { "use strict"; var Token = require_token(); var isWhiteSpace = require_utils().isWhiteSpace; var isPunctChar = require_utils().isPunctChar; var isMdAsciiPunct = require_utils().isMdAsciiPunct; function StateInline(src, md, env, outTokens) { this.src = src; this.env = env; this.md = md; this.tokens = outTokens; this.tokens_meta = Array(outTokens.length); this.pos = 0; this.posMax = this.src.length; this.level = 0; this.pending = ""; this.pendingLevel = 0; this.cache = {}; this.delimiters = []; this._prev_delimiters = []; this.backticks = {}; this.backticksScanned = false; this.linkLevel = 0; } StateInline.prototype.pushPending = function() { var token = new Token("text", "", 0); token.content = this.pending; token.level = this.pendingLevel; this.tokens.push(token); this.pending = ""; return token; }; StateInline.prototype.push = function(type, tag, nesting) { if (this.pending) { this.pushPending(); } var token = new Token(type, tag, nesting); var token_meta = null; if (nesting < 0) { this.level--; this.delimiters = this._prev_delimiters.pop(); } token.level = this.level; if (nesting > 0) { this.level++; this._prev_delimiters.push(this.delimiters); this.delimiters = []; token_meta = { delimiters: this.delimiters }; } this.pendingLevel = this.level; this.tokens.push(token); this.tokens_meta.push(token_meta); return token; }; StateInline.prototype.scanDelims = function(start, canSplitWord) { var pos = start, lastChar, nextChar, count, can_open, can_close, isLastWhiteSpace, isLastPunctChar, isNextWhiteSpace, isNextPunctChar, left_flanking = true, right_flanking = true, max = this.posMax, marker = this.src.charCodeAt(start); lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 32; while (pos < max && this.src.charCodeAt(pos) === marker) { pos++; } count = pos - start; nextChar = pos < max ? this.src.charCodeAt(pos) : 32; isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar)); isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar)); isLastWhiteSpace = isWhiteSpace(lastChar); isNextWhiteSpace = isWhiteSpace(nextChar); if (isNextWhiteSpace) { left_flanking = false; } else if (isNextPunctChar) { if (!(isLastWhiteSpace || isLastPunctChar)) { left_flanking = false; } } if (isLastWhiteSpace) { right_flanking = false; } else if (isLastPunctChar) { if (!(isNextWhiteSpace || isNextPunctChar)) { right_flanking = false; } } if (!canSplitWord) { can_open = left_flanking && (!right_flanking || isLastPunctChar); can_close = right_flanking && (!left_flanking || isNextPunctChar); } else { can_open = left_flanking; can_close = right_flanking; } return { can_open, can_close, length: count }; }; StateInline.prototype.Token = Token; module2.exports = StateInline; } }); // node_modules/markdown-it/lib/parser_inline.js var require_parser_inline = __commonJS({ "node_modules/markdown-it/lib/parser_inline.js"(exports2, module2) { "use strict"; var Ruler = require_ruler(); var _rules = [ ["text", require_text()], ["linkify", require_linkify2()], ["newline", require_newline()], ["escape", require_escape()], ["backticks", require_backticks()], ["strikethrough", require_strikethrough().tokenize], ["emphasis", require_emphasis().tokenize], ["link", require_link()], ["image", require_image()], ["autolink", require_autolink()], ["html_inline", require_html_inline()], ["entity", require_entity()] ]; var _rules2 = [ ["balance_pairs", require_balance_pairs()], ["strikethrough", require_strikethrough().postProcess], ["emphasis", require_emphasis().postProcess], // rules for pairs separate '**' into its own text tokens, which may be left unused, // rule below merges unused segments back with the rest of the text ["fragments_join", require_fragments_join()] ]; function ParserInline() { var i; this.ruler = new Ruler(); for (i = 0; i < _rules.length; i++) { this.ruler.push(_rules[i][0], _rules[i][1]); } this.ruler2 = new Ruler(); for (i = 0; i < _rules2.length; i++) { this.ruler2.push(_rules2[i][0], _rules2[i][1]); } } ParserInline.prototype.skipToken = function(state) { var ok, i, pos = state.pos, rules = this.ruler.getRules(""), len = rules.length, maxNesting = state.md.options.maxNesting, cache = state.cache; if (typeof cache[pos] !== "undefined") { state.pos = cache[pos]; return; } if (state.level < maxNesting) { for (i = 0; i < len; i++) { state.level++; ok = rules[i](state, true); state.level--; if (ok) { break; } } } else { state.pos = state.posMax; } if (!ok) { state.pos++; } cache[pos] = state.pos; }; ParserInline.prototype.tokenize = function(state) { var ok, i, rules = this.ruler.getRules(""), len = rules.length, end = state.posMax, maxNesting = state.md.options.maxNesting; while (state.pos < end) { if (state.level < maxNesting) { for (i = 0; i < len; i++) { ok = rules[i](state, false); if (ok) { break; } } } if (ok) { if (state.pos >= end) { break; } continue; } state.pending += state.src[state.pos++]; } if (state.pending) { state.pushPending(); } }; ParserInline.prototype.parse = function(str2, md, env, outTokens) { var i, rules, len; var state = new this.State(str2, md, env, outTokens); this.tokenize(state); rules = this.ruler2.getRules(""); len = rules.length; for (i = 0; i < len; i++) { rules[i](state); } }; ParserInline.prototype.State = require_state_inline(); module2.exports = ParserInline; } }); // node_modules/linkify-it/lib/re.js var require_re = __commonJS({ "node_modules/linkify-it/lib/re.js"(exports2, module2) { "use strict"; module2.exports = function(opts) { var re = {}; opts = opts || {}; re.src_Any = require_regex2().source; re.src_Cc = require_regex3().source; re.src_Z = require_regex5().source; re.src_P = require_regex().source; re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join("|"); re.src_ZCc = [re.src_Z, re.src_Cc].join("|"); var text_separators = "[><\uFF5C]"; re.src_pseudo_letter = "(?:(?!" + text_separators + "|" + re.src_ZPCc + ")" + re.src_Any + ")"; re.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"; re.src_auth = "(?:(?:(?!" + re.src_ZCc + "|[@/\\[\\]()]).)+@)?"; re.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?"; re.src_host_terminator = "(?=$|" + text_separators + "|" + re.src_ZPCc + ")(?!" + (opts["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + re.src_ZPCc + "))"; re.src_path = "(?:[/?#](?:(?!" + re.src_ZCc + "|" + text_separators + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + re.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + re.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + re.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + re.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + re.src_ZCc + "|[']).)+\\'|\\'(?=" + re.src_pseudo_letter + "|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + re.src_ZCc + "|[.]|$)|" + (opts["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + ",(?!" + re.src_ZCc + "|$)|;(?!" + re.src_ZCc + "|$)|\\!+(?!" + re.src_ZCc + "|[!]|$)|\\?(?!" + re.src_ZCc + "|[?]|$))+|\\/)?"; re.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*'; re.src_xn = "xn--[a-z0-9\\-]{1,59}"; re.src_domain_root = // Allow letters & digits (http://test1) "(?:" + re.src_xn + "|" + re.src_pseudo_letter + "{1,63})"; re.src_domain = "(?:" + re.src_xn + "|(?:" + re.src_pseudo_letter + ")|(?:" + re.src_pseudo_letter + "(?:-|" + re.src_pseudo_letter + "){0,61}" + re.src_pseudo_letter + "))"; re.src_host = "(?:(?:(?:(?:" + re.src_domain + ")\\.)*" + re.src_domain + "))"; re.tpl_host_fuzzy = "(?:" + re.src_ip4 + "|(?:(?:(?:" + re.src_domain + ")\\.)+(?:%TLDS%)))"; re.tpl_host_no_ip_fuzzy = "(?:(?:(?:" + re.src_domain + ")\\.)+(?:%TLDS%))"; re.src_host_strict = re.src_host + re.src_host_terminator; re.tpl_host_fuzzy_strict = re.tpl_host_fuzzy + re.src_host_terminator; re.src_host_port_strict = re.src_host + re.src_port + re.src_host_terminator; re.tpl_host_port_fuzzy_strict = re.tpl_host_fuzzy + re.src_port + re.src_host_terminator; re.tpl_host_port_no_ip_fuzzy_strict = re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator; re.tpl_host_fuzzy_test = "localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:" + re.src_ZPCc + "|>|$))"; re.tpl_email_fuzzy = "(^|" + text_separators + '|"|\\(|' + re.src_ZCc + ")(" + re.src_email_name + "@" + re.tpl_host_fuzzy_strict + ")"; re.tpl_link_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation. // but can start with > (markdown blockquote) "(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|" + re.src_ZPCc + "))((?![$+<=>^`|\uFF5C])" + re.tpl_host_port_fuzzy_strict + re.src_path + ")"; re.tpl_link_no_ip_fuzzy = // Fuzzy link can't be prepended with .:/\- and non punctuation. // but can start with > (markdown blockquote) "(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|" + re.src_ZPCc + "))((?![$+<=>^`|\uFF5C])" + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ")"; return re; }; } }); // node_modules/linkify-it/index.js var require_linkify_it = __commonJS({ "node_modules/linkify-it/index.js"(exports2, module2) { "use strict"; function assign(obj) { var sources = Array.prototype.slice.call(arguments, 1); sources.forEach(function(source) { if (!source) { return; } Object.keys(source).forEach(function(key) { obj[key] = source[key]; }); }); return obj; } function _class(obj) { return Object.prototype.toString.call(obj); } function isString(obj) { return _class(obj) === "[object String]"; } function isObject(obj) { return _class(obj) === "[object Object]"; } function isRegExp(obj) { return _class(obj) === "[object RegExp]"; } function isFunction(obj) { return _class(obj) === "[object Function]"; } function escapeRE(str2) { return str2.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&"); } var defaultOptions = { fuzzyLink: true, fuzzyEmail: true, fuzzyIP: false }; function isOptionsObj(obj) { return Object.keys(obj || {}).reduce(function(acc, k) { return acc || defaultOptions.hasOwnProperty(k); }, false); } var defaultSchemas = { "http:": { validate: function(text, pos, self2) { var tail = text.slice(pos); if (!self2.re.http) { self2.re.http = new RegExp( "^\\/\\/" + self2.re.src_auth + self2.re.src_host_port_strict + self2.re.src_path, "i" ); } if (self2.re.http.test(tail)) { return tail.match(self2.re.http)[0].length; } return 0; } }, "https:": "http:", "ftp:": "http:", "//": { validate: function(text, pos, self2) { var tail = text.slice(pos); if (!self2.re.no_http) { self2.re.no_http = new RegExp( "^" + self2.re.src_auth + // Don't allow single-level domains, because of false positives like '//test' // with code comments "(?:localhost|(?:(?:" + self2.re.src_domain + ")\\.)+" + self2.re.src_domain_root + ")" + self2.re.src_port + self2.re.src_host_terminator + self2.re.src_path, "i" ); } if (self2.re.no_http.test(tail)) { if (pos >= 3 && text[pos - 3] === ":") { return 0; } if (pos >= 3 && text[pos - 3] === "/") { return 0; } return tail.match(self2.re.no_http)[0].length; } return 0; } }, "mailto:": { validate: function(text, pos, self2) { var tail = text.slice(pos); if (!self2.re.mailto) { self2.re.mailto = new RegExp( "^" + self2.re.src_email_name + "@" + self2.re.src_host_strict, "i" ); } if (self2.re.mailto.test(tail)) { return tail.match(self2.re.mailto)[0].length; } return 0; } } }; var tlds_2ch_src_re = "a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"; var tlds_default = "biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|"); function resetScanCache(self2) { self2.__index__ = -1; self2.__text_cache__ = ""; } function createValidator(re) { return function(text, pos) { var tail = text.slice(pos); if (re.test(tail)) { return tail.match(re)[0].length; } return 0; }; } function createNormalizer() { return function(match, self2) { self2.normalize(match); }; } function compile(self2) { var re = self2.re = require_re()(self2.__opts__); var tlds = self2.__tlds__.slice(); self2.onCompile(); if (!self2.__tlds_replaced__) { tlds.push(tlds_2ch_src_re); } tlds.push(re.src_xn); re.src_tlds = tlds.join("|"); function untpl(tpl) { return tpl.replace("%TLDS%", re.src_tlds); } re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), "i"); re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), "i"); re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), "i"); re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), "i"); var aliases = []; self2.__compiled__ = {}; function schemaError(name, val) { throw new Error('(LinkifyIt) Invalid schema "' + name + '": ' + val); } Object.keys(self2.__schemas__).forEach(function(name) { var val = self2.__schemas__[name]; if (val === null) { return; } var compiled = { validate: null, link: null }; self2.__compiled__[name] = compiled; if (isObject(val)) { if (isRegExp(val.validate)) { compiled.validate = createValidator(val.validate); } else if (isFunction(val.validate)) { compiled.validate = val.validate; } else { schemaError(name, val); } if (isFunction(val.normalize)) { compiled.normalize = val.normalize; } else if (!val.normalize) { compiled.normalize = createNormalizer(); } else { schemaError(name, val); } return; } if (isString(val)) { aliases.push(name); return; } schemaError(name, val); }); aliases.forEach(function(alias) { if (!self2.__compiled__[self2.__schemas__[alias]]) { return; } self2.__compiled__[alias].validate = self2.__compiled__[self2.__schemas__[alias]].validate; self2.__compiled__[alias].normalize = self2.__compiled__[self2.__schemas__[alias]].normalize; }); self2.__compiled__[""] = { validate: null, normalize: createNormalizer() }; var slist = Object.keys(self2.__compiled__).filter(function(name) { return name.length > 0 && self2.__compiled__[name]; }).map(escapeRE).join("|"); self2.re.schema_test = RegExp("(^|(?!_)(?:[><\uFF5C]|" + re.src_ZPCc + "))(" + slist + ")", "i"); self2.re.schema_search = RegExp("(^|(?!_)(?:[><\uFF5C]|" + re.src_ZPCc + "))(" + slist + ")", "ig"); self2.re.schema_at_start = RegExp("^" + self2.re.schema_search.source, "i"); self2.re.pretest = RegExp( "(" + self2.re.schema_test.source + ")|(" + self2.re.host_fuzzy_test.source + ")|@", "i" ); resetScanCache(self2); } function Match(self2, shift) { var start = self2.__index__, end = self2.__last_index__, text = self2.__text_cache__.slice(start, end); this.schema = self2.__schema__.toLowerCase(); this.index = start + shift; this.lastIndex = end + shift; this.raw = text; this.text = text; this.url = text; } function createMatch(self2, shift) { var match = new Match(self2, shift); self2.__compiled__[match.schema].normalize(match, self2); return match; } function LinkifyIt(schemas, options2) { if (!(this instanceof LinkifyIt)) { return new LinkifyIt(schemas, options2); } if (!options2) { if (isOptionsObj(schemas)) { options2 = schemas; schemas = {}; } } this.__opts__ = assign({}, defaultOptions, options2); this.__index__ = -1; this.__last_index__ = -1; this.__schema__ = ""; this.__text_cache__ = ""; this.__schemas__ = assign({}, defaultSchemas, schemas); this.__compiled__ = {}; this.__tlds__ = tlds_default; this.__tlds_replaced__ = false; this.re = {}; compile(this); } LinkifyIt.prototype.add = function add(schema, definition) { this.__schemas__[schema] = definition; compile(this); return this; }; LinkifyIt.prototype.set = function set(options2) { this.__opts__ = assign(this.__opts__, options2); return this; }; LinkifyIt.prototype.test = function test(text) { this.__text_cache__ = text; this.__index__ = -1; if (!text.length) { return false; } var m, ml, me, len, shift, next, re, tld_pos, at_pos; if (this.re.schema_test.test(text)) { re = this.re.schema_search; re.lastIndex = 0; while ((m = re.exec(text)) !== null) { len = this.testSchemaAt(text, m[2], re.lastIndex); if (len) { this.__schema__ = m[2]; this.__index__ = m.index + m[1].length; this.__last_index__ = m.index + m[0].length + len; break; } } } if (this.__opts__.fuzzyLink && this.__compiled__["http:"]) { tld_pos = text.search(this.re.host_fuzzy_test); if (tld_pos >= 0) { if (this.__index__ < 0 || tld_pos < this.__index__) { if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) { shift = ml.index + ml[1].length; if (this.__index__ < 0 || shift < this.__index__) { this.__schema__ = ""; this.__index__ = shift; this.__last_index__ = ml.index + ml[0].length; } } } } } if (this.__opts__.fuzzyEmail && this.__compiled__["mailto:"]) { at_pos = text.indexOf("@"); if (at_pos >= 0) { if ((me = text.match(this.re.email_fuzzy)) !== null) { shift = me.index + me[1].length; next = me.index + me[0].length; if (this.__index__ < 0 || shift < this.__index__ || shift === this.__index__ && next > this.__last_index__) { this.__schema__ = "mailto:"; this.__index__ = shift; this.__last_index__ = next; } } } } return this.__index__ >= 0; }; LinkifyIt.prototype.pretest = function pretest(text) { return this.re.pretest.test(text); }; LinkifyIt.prototype.testSchemaAt = function testSchemaAt(text, schema, pos) { if (!this.__compiled__[schema.toLowerCase()]) { return 0; } return this.__compiled__[schema.toLowerCase()].validate(text, pos, this); }; LinkifyIt.prototype.match = function match(text) { var shift = 0, result = []; if (this.__index__ >= 0 && this.__text_cache__ === text) { result.push(createMatch(this, shift)); shift = this.__last_index__; } var tail = shift ? text.slice(shift) : text; while (this.test(tail)) { result.push(createMatch(this, shift)); tail = tail.slice(this.__last_index__); shift += this.__last_index__; } if (result.length) { return result; } return null; }; LinkifyIt.prototype.matchAtStart = function matchAtStart(text) { this.__text_cache__ = text; this.__index__ = -1; if (!text.length) return null; var m = this.re.schema_at_start.exec(text); if (!m) return null; var len = this.testSchemaAt(text, m[2], m[0].length); if (!len) return null; this.__schema__ = m[2]; this.__index__ = m.index + m[1].length; this.__last_index__ = m.index + m[0].length + len; return createMatch(this, 0); }; LinkifyIt.prototype.tlds = function tlds(list, keepOld) { list = Array.isArray(list) ? list : [list]; if (!keepOld) { this.__tlds__ = list.slice(); this.__tlds_replaced__ = true; compile(this); return this; } this.__tlds__ = this.__tlds__.concat(list).sort().filter(function(el, idx, arr) { return el !== arr[idx - 1]; }).reverse(); compile(this); return this; }; LinkifyIt.prototype.normalize = function normalize(match) { if (!match.schema) { match.url = "http://" + match.url; } if (match.schema === "mailto:" && !/^mailto:/i.test(match.url)) { match.url = "mailto:" + match.url; } }; LinkifyIt.prototype.onCompile = function onCompile() { }; module2.exports = LinkifyIt; } }); // node_modules/markdown-it/lib/presets/default.js var require_default = __commonJS({ "node_modules/markdown-it/lib/presets/default.js"(exports2, module2) { "use strict"; module2.exports = { options: { html: false, // Enable HTML tags in source xhtmlOut: false, // Use '/' to close single tags (
) breaks: false, // Convert '\n' in paragraphs into
langPrefix: "language-", // CSS language prefix for fenced blocks linkify: false, // autoconvert URL-like texts to links // Enable some language-neutral replacements + quotes beautification typographer: false, // Double + single quotes replacement pairs, when typographer enabled, // and smartquotes on. Could be either a String or an Array. // // For example, you can use '«»„“' for Russian, '„“‚‘' for German, // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). quotes: "\u201C\u201D\u2018\u2019", /* “”‘’ */ // Highlighter function. Should return escaped HTML, // or '' if the source string is not changed and should be escaped externaly. // If result starts with ) breaks: false, // Convert '\n' in paragraphs into
langPrefix: "language-", // CSS language prefix for fenced blocks linkify: false, // autoconvert URL-like texts to links // Enable some language-neutral replacements + quotes beautification typographer: false, // Double + single quotes replacement pairs, when typographer enabled, // and smartquotes on. Could be either a String or an Array. // // For example, you can use '«»„“' for Russian, '„“‚‘' for German, // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). quotes: "\u201C\u201D\u2018\u2019", /* “”‘’ */ // Highlighter function. Should return escaped HTML, // or '' if the source string is not changed and should be escaped externaly. // If result starts with ) breaks: false, // Convert '\n' in paragraphs into
langPrefix: "language-", // CSS language prefix for fenced blocks linkify: false, // autoconvert URL-like texts to links // Enable some language-neutral replacements + quotes beautification typographer: false, // Double + single quotes replacement pairs, when typographer enabled, // and smartquotes on. Could be either a String or an Array. // // For example, you can use '«»„“' for Russian, '„“‚‘' for German, // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp). quotes: "\u201C\u201D\u2018\u2019", /* “”‘’ */ // Highlighter function. Should return escaped HTML, // or '' if the source string is not changed and should be escaped externaly. // If result starts with = 0) { try { parsed.hostname = punycode.toASCII(parsed.hostname); } catch (er) { } } } return mdurl.encode(mdurl.format(parsed)); } function normalizeLinkText(url2) { var parsed = mdurl.parse(url2, true); if (parsed.hostname) { if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) { try { parsed.hostname = punycode.toUnicode(parsed.hostname); } catch (er) { } } } return mdurl.decode(mdurl.format(parsed), mdurl.decode.defaultChars + "%"); } function MarkdownIt(presetName, options2) { if (!(this instanceof MarkdownIt)) { return new MarkdownIt(presetName, options2); } if (!options2) { if (!utils.isString(presetName)) { options2 = presetName || {}; presetName = "default"; } } this.inline = new ParserInline(); this.block = new ParserBlock(); this.core = new ParserCore(); this.renderer = new Renderer(); this.linkify = new LinkifyIt(); this.validateLink = validateLink; this.normalizeLink = normalizeLink; this.normalizeLinkText = normalizeLinkText; this.utils = utils; this.helpers = utils.assign({}, helpers); this.options = {}; this.configure(presetName); if (options2) { this.set(options2); } } MarkdownIt.prototype.set = function(options2) { utils.assign(this.options, options2); return this; }; MarkdownIt.prototype.configure = function(presets) { var self2 = this, presetName; if (utils.isString(presets)) { presetName = presets; presets = config[presetName]; if (!presets) { throw new Error('Wrong `markdown-it` preset "' + presetName + '", check name'); } } if (!presets) { throw new Error("Wrong `markdown-it` preset, can't be empty"); } if (presets.options) { self2.set(presets.options); } if (presets.components) { Object.keys(presets.components).forEach(function(name) { if (presets.components[name].rules) { self2[name].ruler.enableOnly(presets.components[name].rules); } if (presets.components[name].rules2) { self2[name].ruler2.enableOnly(presets.components[name].rules2); } }); } return this; }; MarkdownIt.prototype.enable = function(list, ignoreInvalid) { var result = []; if (!Array.isArray(list)) { list = [list]; } ["core", "block", "inline"].forEach(function(chain) { result = result.concat(this[chain].ruler.enable(list, true)); }, this); result = result.concat(this.inline.ruler2.enable(list, true)); var missed = list.filter(function(name) { return result.indexOf(name) < 0; }); if (missed.length && !ignoreInvalid) { throw new Error("MarkdownIt. Failed to enable unknown rule(s): " + missed); } return this; }; MarkdownIt.prototype.disable = function(list, ignoreInvalid) { var result = []; if (!Array.isArray(list)) { list = [list]; } ["core", "block", "inline"].forEach(function(chain) { result = result.concat(this[chain].ruler.disable(list, true)); }, this); result = result.concat(this.inline.ruler2.disable(list, true)); var missed = list.filter(function(name) { return result.indexOf(name) < 0; }); if (missed.length && !ignoreInvalid) { throw new Error("MarkdownIt. Failed to disable unknown rule(s): " + missed); } return this; }; MarkdownIt.prototype.use = function(plugin) { var args = [this].concat(Array.prototype.slice.call(arguments, 1)); plugin.apply(plugin, args); return this; }; MarkdownIt.prototype.parse = function(src, env) { if (typeof src !== "string") { throw new Error("Input data should be a String"); } var state = new this.core.State(src, this, env); this.core.process(state); return state.tokens; }; MarkdownIt.prototype.render = function(src, env) { env = env || {}; return this.renderer.render(this.parse(src, env), this.options, env); }; MarkdownIt.prototype.parseInline = function(src, env) { var state = new this.core.State(src, this, env); state.inlineMode = true; this.core.process(state); return state.tokens; }; MarkdownIt.prototype.renderInline = function(src, env) { env = env || {}; return this.renderer.render(this.parseInline(src, env), this.options, env); }; module2.exports = MarkdownIt; } }); // node_modules/markdown-it/index.js var require_markdown_it = __commonJS({ "node_modules/markdown-it/index.js"(exports2, module2) { "use strict"; module2.exports = require_lib(); } }); // node_modules/@marp-team/marpit/lib/helpers/wrap_array.js var require_wrap_array = __commonJS({ "node_modules/@marp-team/marpit/lib/helpers/wrap_array.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.wrapArray = exports2.default = void 0; var wrapArray = (valOrArr) => { if (valOrArr == null || valOrArr === false) return []; if (valOrArr instanceof Array) return valOrArr; return [valOrArr]; }; exports2.wrapArray = wrapArray; var _default = wrapArray; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/plugin.js var require_plugin = __commonJS({ "node_modules/@marp-team/marpit/lib/plugin.js"(exports2, module2) { "use strict"; function marpitPlugin(plugin) { return function(md, ...args) { if (md.marpit) return plugin.call(this, md, ...args); throw new Error("Marpit plugin has detected incompatible markdown-it instance."); }; } Object.defineProperty(marpitPlugin, "__esModule", { value: true }); Object.defineProperty(marpitPlugin, "default", { value: marpitPlugin }); Object.defineProperty(marpitPlugin, "marpitPlugin", { value: marpitPlugin }); module2.exports = marpitPlugin; } }); // node_modules/picocolors/picocolors.browser.js var require_picocolors_browser = __commonJS({ "node_modules/picocolors/picocolors.browser.js"(exports2, module2) { var x = String; var create = function() { return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x }; }; module2.exports = create(); module2.exports.createColors = create; } }); // (disabled):node_modules/postcss/lib/terminal-highlight var require_terminal_highlight = __commonJS({ "(disabled):node_modules/postcss/lib/terminal-highlight"() { } }); // node_modules/postcss/lib/css-syntax-error.js var require_css_syntax_error = __commonJS({ "node_modules/postcss/lib/css-syntax-error.js"(exports2, module2) { "use strict"; var pico = require_picocolors_browser(); var terminalHighlight = require_terminal_highlight(); var CssSyntaxError = class extends Error { constructor(message, line, column, source, file, plugin) { super(message); this.name = "CssSyntaxError"; this.reason = message; if (file) { this.file = file; } if (source) { this.source = source; } if (plugin) { this.plugin = plugin; } if (typeof line !== "undefined" && typeof column !== "undefined") { if (typeof line === "number") { this.line = line; this.column = column; } else { this.line = line.line; this.column = line.column; this.endLine = column.line; this.endColumn = column.column; } } this.setMessage(); if (Error.captureStackTrace) { Error.captureStackTrace(this, CssSyntaxError); } } setMessage() { this.message = this.plugin ? this.plugin + ": " : ""; this.message += this.file ? this.file : ""; if (typeof this.line !== "undefined") { this.message += ":" + this.line + ":" + this.column; } this.message += ": " + this.reason; } showSourceCode(color) { if (!this.source) return ""; let css2 = this.source; if (color == null) color = pico.isColorSupported; if (terminalHighlight) { if (color) css2 = terminalHighlight(css2); } let lines = css2.split(/\r?\n/); let start = Math.max(this.line - 3, 0); let end = Math.min(this.line + 2, lines.length); let maxWidth = String(end).length; let mark, aside; if (color) { let { bold, red, gray } = pico.createColors(true); mark = (text) => bold(red(text)); aside = (text) => gray(text); } else { mark = aside = (str2) => str2; } return lines.slice(start, end).map((line, index) => { let number = start + 1 + index; let gutter = " " + (" " + number).slice(-maxWidth) + " | "; if (number === this.line) { let spacing = aside(gutter.replace(/\d/g, " ")) + line.slice(0, this.column - 1).replace(/[^\t]/g, " "); return mark(">") + aside(gutter) + line + "\n " + spacing + mark("^"); } return " " + aside(gutter) + line; }).join("\n"); } toString() { let code = this.showSourceCode(); if (code) { code = "\n\n" + code + "\n"; } return this.name + ": " + this.message + code; } }; module2.exports = CssSyntaxError; CssSyntaxError.default = CssSyntaxError; } }); // node_modules/postcss/lib/symbols.js var require_symbols = __commonJS({ "node_modules/postcss/lib/symbols.js"(exports2, module2) { "use strict"; module2.exports.isClean = Symbol("isClean"); module2.exports.my = Symbol("my"); } }); // node_modules/postcss/lib/stringifier.js var require_stringifier = __commonJS({ "node_modules/postcss/lib/stringifier.js"(exports2, module2) { "use strict"; var DEFAULT_RAW = { colon: ": ", indent: " ", beforeDecl: "\n", beforeRule: "\n", beforeOpen: " ", beforeClose: "\n", beforeComment: "\n", after: "\n", emptyBody: "", commentLeft: " ", commentRight: " ", semicolon: false }; function capitalize(str2) { return str2[0].toUpperCase() + str2.slice(1); } var Stringifier = class { constructor(builder) { this.builder = builder; } stringify(node, semicolon) { if (!this[node.type]) { throw new Error( "Unknown AST node type " + node.type + ". Maybe you need to change PostCSS stringifier." ); } this[node.type](node, semicolon); } document(node) { this.body(node); } root(node) { this.body(node); if (node.raws.after) this.builder(node.raws.after); } comment(node) { let left = this.raw(node, "left", "commentLeft"); let right = this.raw(node, "right", "commentRight"); this.builder("/*" + left + node.text + right + "*/", node); } decl(node, semicolon) { let between = this.raw(node, "between", "colon"); let string = node.prop + between + this.rawValue(node, "value"); if (node.important) { string += node.raws.important || " !important"; } if (semicolon) string += ";"; this.builder(string, node); } rule(node) { this.block(node, this.rawValue(node, "selector")); if (node.raws.ownSemicolon) { this.builder(node.raws.ownSemicolon, node, "end"); } } atrule(node, semicolon) { let name = "@" + node.name; let params = node.params ? this.rawValue(node, "params") : ""; if (typeof node.raws.afterName !== "undefined") { name += node.raws.afterName; } else if (params) { name += " "; } if (node.nodes) { this.block(node, name + params); } else { let end = (node.raws.between || "") + (semicolon ? ";" : ""); this.builder(name + params + end, node); } } body(node) { let last = node.nodes.length - 1; while (last > 0) { if (node.nodes[last].type !== "comment") break; last -= 1; } let semicolon = this.raw(node, "semicolon"); for (let i = 0; i < node.nodes.length; i++) { let child = node.nodes[i]; let before = this.raw(child, "before"); if (before) this.builder(before); this.stringify(child, last !== i || semicolon); } } block(node, start) { let between = this.raw(node, "between", "beforeOpen"); this.builder(start + between + "{", node, "start"); let after; if (node.nodes && node.nodes.length) { this.body(node); after = this.raw(node, "after"); } else { after = this.raw(node, "after", "emptyBody"); } if (after) this.builder(after); this.builder("}", node, "end"); } raw(node, own, detect) { let value; if (!detect) detect = own; if (own) { value = node.raws[own]; if (typeof value !== "undefined") return value; } let parent = node.parent; if (detect === "before") { if (!parent || parent.type === "root" && parent.first === node) { return ""; } if (parent && parent.type === "document") { return ""; } } if (!parent) return DEFAULT_RAW[detect]; let root = node.root(); if (!root.rawCache) root.rawCache = {}; if (typeof root.rawCache[detect] !== "undefined") { return root.rawCache[detect]; } if (detect === "before" || detect === "after") { return this.beforeAfter(node, detect); } else { let method = "raw" + capitalize(detect); if (this[method]) { value = this[method](root, node); } else { root.walk((i) => { value = i.raws[own]; if (typeof value !== "undefined") return false; }); } } if (typeof value === "undefined") value = DEFAULT_RAW[detect]; root.rawCache[detect] = value; return value; } rawSemicolon(root) { let value; root.walk((i) => { if (i.nodes && i.nodes.length && i.last.type === "decl") { value = i.raws.semicolon; if (typeof value !== "undefined") return false; } }); return value; } rawEmptyBody(root) { let value; root.walk((i) => { if (i.nodes && i.nodes.length === 0) { value = i.raws.after; if (typeof value !== "undefined") return false; } }); return value; } rawIndent(root) { if (root.raws.indent) return root.raws.indent; let value; root.walk((i) => { let p = i.parent; if (p && p !== root && p.parent && p.parent === root) { if (typeof i.raws.before !== "undefined") { let parts = i.raws.before.split("\n"); value = parts[parts.length - 1]; value = value.replace(/\S/g, ""); return false; } } }); return value; } rawBeforeComment(root, node) { let value; root.walkComments((i) => { if (typeof i.raws.before !== "undefined") { value = i.raws.before; if (value.includes("\n")) { value = value.replace(/[^\n]+$/, ""); } return false; } }); if (typeof value === "undefined") { value = this.raw(node, null, "beforeDecl"); } else if (value) { value = value.replace(/\S/g, ""); } return value; } rawBeforeDecl(root, node) { let value; root.walkDecls((i) => { if (typeof i.raws.before !== "undefined") { value = i.raws.before; if (value.includes("\n")) { value = value.replace(/[^\n]+$/, ""); } return false; } }); if (typeof value === "undefined") { value = this.raw(node, null, "beforeRule"); } else if (value) { value = value.replace(/\S/g, ""); } return value; } rawBeforeRule(root) { let value; root.walk((i) => { if (i.nodes && (i.parent !== root || root.first !== i)) { if (typeof i.raws.before !== "undefined") { value = i.raws.before; if (value.includes("\n")) { value = value.replace(/[^\n]+$/, ""); } return false; } } }); if (value) value = value.replace(/\S/g, ""); return value; } rawBeforeClose(root) { let value; root.walk((i) => { if (i.nodes && i.nodes.length > 0) { if (typeof i.raws.after !== "undefined") { value = i.raws.after; if (value.includes("\n")) { value = value.replace(/[^\n]+$/, ""); } return false; } } }); if (value) value = value.replace(/\S/g, ""); return value; } rawBeforeOpen(root) { let value; root.walk((i) => { if (i.type !== "decl") { value = i.raws.between; if (typeof value !== "undefined") return false; } }); return value; } rawColon(root) { let value; root.walkDecls((i) => { if (typeof i.raws.between !== "undefined") { value = i.raws.between.replace(/[^\s:]/g, ""); return false; } }); return value; } beforeAfter(node, detect) { let value; if (node.type === "decl") { value = this.raw(node, null, "beforeDecl"); } else if (node.type === "comment") { value = this.raw(node, null, "beforeComment"); } else if (detect === "before") { value = this.raw(node, null, "beforeRule"); } else { value = this.raw(node, null, "beforeClose"); } let buf = node.parent; let depth = 0; while (buf && buf.type !== "root") { depth += 1; buf = buf.parent; } if (value.includes("\n")) { let indent = this.raw(node, null, "indent"); if (indent.length) { for (let step = 0; step < depth; step++) value += indent; } } return value; } rawValue(node, prop) { let value = node[prop]; let raw = node.raws[prop]; if (raw && raw.value === value) { return raw.raw; } return value; } }; module2.exports = Stringifier; Stringifier.default = Stringifier; } }); // node_modules/postcss/lib/stringify.js var require_stringify = __commonJS({ "node_modules/postcss/lib/stringify.js"(exports2, module2) { "use strict"; var Stringifier = require_stringifier(); function stringify(node, builder) { let str2 = new Stringifier(builder); str2.stringify(node); } module2.exports = stringify; stringify.default = stringify; } }); // node_modules/postcss/lib/node.js var require_node = __commonJS({ "node_modules/postcss/lib/node.js"(exports2, module2) { "use strict"; var { isClean, my } = require_symbols(); var CssSyntaxError = require_css_syntax_error(); var Stringifier = require_stringifier(); var stringify = require_stringify(); function cloneNode(obj, parent) { let cloned = new obj.constructor(); for (let i in obj) { if (!Object.prototype.hasOwnProperty.call(obj, i)) { continue; } if (i === "proxyCache") continue; let value = obj[i]; let type = typeof value; if (i === "parent" && type === "object") { if (parent) cloned[i] = parent; } else if (i === "source") { cloned[i] = value; } else if (Array.isArray(value)) { cloned[i] = value.map((j) => cloneNode(j, cloned)); } else { if (type === "object" && value !== null) value = cloneNode(value); cloned[i] = value; } } return cloned; } var Node2 = class { constructor(defaults = {}) { this.raws = {}; this[isClean] = false; this[my] = true; for (let name in defaults) { if (name === "nodes") { this.nodes = []; for (let node of defaults[name]) { if (typeof node.clone === "function") { this.append(node.clone()); } else { this.append(node); } } } else { this[name] = defaults[name]; } } } error(message, opts = {}) { if (this.source) { let { start, end } = this.rangeBy(opts); return this.source.input.error( message, { line: start.line, column: start.column }, { line: end.line, column: end.column }, opts ); } return new CssSyntaxError(message); } warn(result, text, opts) { let data = { node: this }; for (let i in opts) data[i] = opts[i]; return result.warn(text, data); } remove() { if (this.parent) { this.parent.removeChild(this); } this.parent = void 0; return this; } toString(stringifier = stringify) { if (stringifier.stringify) stringifier = stringifier.stringify; let result = ""; stringifier(this, (i) => { result += i; }); return result; } assign(overrides = {}) { for (let name in overrides) { this[name] = overrides[name]; } return this; } clone(overrides = {}) { let cloned = cloneNode(this); for (let name in overrides) { cloned[name] = overrides[name]; } return cloned; } cloneBefore(overrides = {}) { let cloned = this.clone(overrides); this.parent.insertBefore(this, cloned); return cloned; } cloneAfter(overrides = {}) { let cloned = this.clone(overrides); this.parent.insertAfter(this, cloned); return cloned; } replaceWith(...nodes) { if (this.parent) { let bookmark = this; let foundSelf = false; for (let node of nodes) { if (node === this) { foundSelf = true; } else if (foundSelf) { this.parent.insertAfter(bookmark, node); bookmark = node; } else { this.parent.insertBefore(bookmark, node); } } if (!foundSelf) { this.remove(); } } return this; } next() { if (!this.parent) return void 0; let index = this.parent.index(this); return this.parent.nodes[index + 1]; } prev() { if (!this.parent) return void 0; let index = this.parent.index(this); return this.parent.nodes[index - 1]; } before(add) { this.parent.insertBefore(this, add); return this; } after(add) { this.parent.insertAfter(this, add); return this; } root() { let result = this; while (result.parent && result.parent.type !== "document") { result = result.parent; } return result; } raw(prop, defaultType) { let str2 = new Stringifier(); return str2.raw(this, prop, defaultType); } cleanRaws(keepBetween) { delete this.raws.before; delete this.raws.after; if (!keepBetween) delete this.raws.between; } toJSON(_, inputs) { let fixed = {}; let emitInputs = inputs == null; inputs = inputs || /* @__PURE__ */ new Map(); let inputsNextIndex = 0; for (let name in this) { if (!Object.prototype.hasOwnProperty.call(this, name)) { continue; } if (name === "parent" || name === "proxyCache") continue; let value = this[name]; if (Array.isArray(value)) { fixed[name] = value.map((i) => { if (typeof i === "object" && i.toJSON) { return i.toJSON(null, inputs); } else { return i; } }); } else if (typeof value === "object" && value.toJSON) { fixed[name] = value.toJSON(null, inputs); } else if (name === "source") { let inputId = inputs.get(value.input); if (inputId == null) { inputId = inputsNextIndex; inputs.set(value.input, inputsNextIndex); inputsNextIndex++; } fixed[name] = { inputId, start: value.start, end: value.end }; } else { fixed[name] = value; } } if (emitInputs) { fixed.inputs = [...inputs.keys()].map((input) => input.toJSON()); } return fixed; } positionInside(index) { let string = this.toString(); let column = this.source.start.column; let line = this.source.start.line; for (let i = 0; i < index; i++) { if (string[i] === "\n") { column = 1; line += 1; } else { column += 1; } } return { line, column }; } positionBy(opts) { let pos = this.source.start; if (opts.index) { pos = this.positionInside(opts.index); } else if (opts.word) { let index = this.toString().indexOf(opts.word); if (index !== -1) pos = this.positionInside(index); } return pos; } rangeBy(opts) { let start = { line: this.source.start.line, column: this.source.start.column }; let end = this.source.end ? { line: this.source.end.line, column: this.source.end.column + 1 } : { line: start.line, column: start.column + 1 }; if (opts.word) { let index = this.toString().indexOf(opts.word); if (index !== -1) { start = this.positionInside(index); end = this.positionInside(index + opts.word.length); } } else { if (opts.start) { start = { line: opts.start.line, column: opts.start.column }; } else if (opts.index) { start = this.positionInside(opts.index); } if (opts.end) { end = { line: opts.end.line, column: opts.end.column }; } else if (opts.endIndex) { end = this.positionInside(opts.endIndex); } else if (opts.index) { end = this.positionInside(opts.index + 1); } } if (end.line < start.line || end.line === start.line && end.column <= start.column) { end = { line: start.line, column: start.column + 1 }; } return { start, end }; } getProxyProcessor() { return { set(node, prop, value) { if (node[prop] === value) return true; node[prop] = value; if (prop === "prop" || prop === "value" || prop === "name" || prop === "params" || prop === "important" || /* c8 ignore next */ prop === "text") { node.markDirty(); } return true; }, get(node, prop) { if (prop === "proxyOf") { return node; } else if (prop === "root") { return () => node.root().toProxy(); } else { return node[prop]; } } }; } toProxy() { if (!this.proxyCache) { this.proxyCache = new Proxy(this, this.getProxyProcessor()); } return this.proxyCache; } addToError(error) { error.postcssNode = this; if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) { let s = this.source; error.stack = error.stack.replace( /\n\s{4}at /, `$&${s.input.from}:${s.start.line}:${s.start.column}$&` ); } return error; } markDirty() { if (this[isClean]) { this[isClean] = false; let next = this; while (next = next.parent) { next[isClean] = false; } } } get proxyOf() { return this; } }; module2.exports = Node2; Node2.default = Node2; } }); // node_modules/postcss/lib/declaration.js var require_declaration = __commonJS({ "node_modules/postcss/lib/declaration.js"(exports2, module2) { "use strict"; var Node2 = require_node(); var Declaration = class extends Node2 { constructor(defaults) { if (defaults && typeof defaults.value !== "undefined" && typeof defaults.value !== "string") { defaults = { ...defaults, value: String(defaults.value) }; } super(defaults); this.type = "decl"; } get variable() { return this.prop.startsWith("--") || this.prop[0] === "$"; } }; module2.exports = Declaration; Declaration.default = Declaration; } }); // (disabled):node_modules/source-map-js/source-map.js var require_source_map = __commonJS({ "(disabled):node_modules/source-map-js/source-map.js"() { } }); // node_modules/nanoid/non-secure/index.cjs var require_non_secure = __commonJS({ "node_modules/nanoid/non-secure/index.cjs"(exports2, module2) { var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; var customAlphabet = (alphabet, defaultSize = 21) => { return (size = defaultSize) => { let id = ""; let i = size; while (i--) { id += alphabet[Math.random() * alphabet.length | 0]; } return id; }; }; var nanoid = (size = 21) => { let id = ""; let i = size; while (i--) { id += urlAlphabet[Math.random() * 64 | 0]; } return id; }; module2.exports = { nanoid, customAlphabet }; } }); // node_modules/postcss/lib/previous-map.js var require_previous_map = __commonJS({ "node_modules/postcss/lib/previous-map.js"(exports2, module2) { "use strict"; var { SourceMapConsumer, SourceMapGenerator } = require_source_map(); var { existsSync: existsSync2, readFileSync } = require("fs"); var { dirname, join } = require("path"); function fromBase64(str2) { if (Buffer) { return Buffer.from(str2, "base64").toString(); } else { return window.atob(str2); } } var PreviousMap = class { constructor(css2, opts) { if (opts.map === false) return; this.loadAnnotation(css2); this.inline = this.startWith(this.annotation, "data:"); let prev = opts.map ? opts.map.prev : void 0; let text = this.loadMap(opts.from, prev); if (!this.mapFile && opts.from) { this.mapFile = opts.from; } if (this.mapFile) this.root = dirname(this.mapFile); if (text) this.text = text; } consumer() { if (!this.consumerCache) { this.consumerCache = new SourceMapConsumer(this.text); } return this.consumerCache; } withContent() { return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0); } startWith(string, start) { if (!string) return false; return string.substr(0, start.length) === start; } getAnnotationURL(sourceMapString) { return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, "").trim(); } loadAnnotation(css2) { let comments2 = css2.match(/\/\*\s*# sourceMappingURL=/gm); if (!comments2) return; let start = css2.lastIndexOf(comments2.pop()); let end = css2.indexOf("*/", start); if (start > -1 && end > -1) { this.annotation = this.getAnnotationURL(css2.substring(start, end)); } } decodeInline(text) { let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/; let baseUri = /^data:application\/json;base64,/; let charsetUri = /^data:application\/json;charset=utf-?8,/; let uri = /^data:application\/json,/; if (charsetUri.test(text) || uri.test(text)) { return decodeURIComponent(text.substr(RegExp.lastMatch.length)); } if (baseCharsetUri.test(text) || baseUri.test(text)) { return fromBase64(text.substr(RegExp.lastMatch.length)); } let encoding = text.match(/data:application\/json;([^,]+),/)[1]; throw new Error("Unsupported source map encoding " + encoding); } loadFile(path) { this.root = dirname(path); if (existsSync2(path)) { this.mapFile = path; return readFileSync(path, "utf-8").toString().trim(); } } loadMap(file, prev) { if (prev === false) return false; if (prev) { if (typeof prev === "string") { return prev; } else if (typeof prev === "function") { let prevPath = prev(file); if (prevPath) { let map = this.loadFile(prevPath); if (!map) { throw new Error( "Unable to load previous source map: " + prevPath.toString() ); } return map; } } else if (prev instanceof SourceMapConsumer) { return SourceMapGenerator.fromSourceMap(prev).toString(); } else if (prev instanceof SourceMapGenerator) { return prev.toString(); } else if (this.isMap(prev)) { return JSON.stringify(prev); } else { throw new Error( "Unsupported previous source map format: " + prev.toString() ); } } else if (this.inline) { return this.decodeInline(this.annotation); } else if (this.annotation) { let map = this.annotation; if (file) map = join(dirname(file), map); return this.loadFile(map); } } isMap(map) { if (typeof map !== "object") return false; return typeof map.mappings === "string" || typeof map._mappings === "string" || Array.isArray(map.sections); } }; module2.exports = PreviousMap; PreviousMap.default = PreviousMap; } }); // node_modules/postcss/lib/input.js var require_input = __commonJS({ "node_modules/postcss/lib/input.js"(exports2, module2) { "use strict"; var { SourceMapConsumer, SourceMapGenerator } = require_source_map(); var { fileURLToPath, pathToFileURL } = require("url"); var { resolve, isAbsolute } = require("path"); var { nanoid } = require_non_secure(); var terminalHighlight = require_terminal_highlight(); var CssSyntaxError = require_css_syntax_error(); var PreviousMap = require_previous_map(); var fromOffsetCache = Symbol("fromOffsetCache"); var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator); var pathAvailable = Boolean(resolve && isAbsolute); var Input = class { constructor(css2, opts = {}) { if (css2 === null || typeof css2 === "undefined" || typeof css2 === "object" && !css2.toString) { throw new Error(`PostCSS received ${css2} instead of CSS string`); } this.css = css2.toString(); if (this.css[0] === "\uFEFF" || this.css[0] === "\uFFFE") { this.hasBOM = true; this.css = this.css.slice(1); } else { this.hasBOM = false; } if (opts.from) { if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute(opts.from)) { this.file = opts.from; } else { this.file = resolve(opts.from); } } if (pathAvailable && sourceMapAvailable) { let map = new PreviousMap(this.css, opts); if (map.text) { this.map = map; let file = map.consumer().file; if (!this.file && file) this.file = this.mapResolve(file); } } if (!this.file) { this.id = ""; } if (this.map) this.map.file = this.from; } fromOffset(offset) { let lastLine, lineToIndex; if (!this[fromOffsetCache]) { let lines = this.css.split("\n"); lineToIndex = new Array(lines.length); let prevIndex = 0; for (let i = 0, l = lines.length; i < l; i++) { lineToIndex[i] = prevIndex; prevIndex += lines[i].length + 1; } this[fromOffsetCache] = lineToIndex; } else { lineToIndex = this[fromOffsetCache]; } lastLine = lineToIndex[lineToIndex.length - 1]; let min = 0; if (offset >= lastLine) { min = lineToIndex.length - 1; } else { let max = lineToIndex.length - 2; let mid; while (min < max) { mid = min + (max - min >> 1); if (offset < lineToIndex[mid]) { max = mid - 1; } else if (offset >= lineToIndex[mid + 1]) { min = mid + 1; } else { min = mid; break; } } } return { line: min + 1, col: offset - lineToIndex[min] + 1 }; } error(message, line, column, opts = {}) { let result, endLine, endColumn; if (line && typeof line === "object") { let start = line; let end = column; if (typeof start.offset === "number") { let pos = this.fromOffset(start.offset); line = pos.line; column = pos.col; } else { line = start.line; column = start.column; } if (typeof end.offset === "number") { let pos = this.fromOffset(end.offset); endLine = pos.line; endColumn = pos.col; } else { endLine = end.line; endColumn = end.column; } } else if (!column) { let pos = this.fromOffset(line); line = pos.line; column = pos.col; } let origin = this.origin(line, column, endLine, endColumn); if (origin) { result = new CssSyntaxError( message, origin.endLine === void 0 ? origin.line : { line: origin.line, column: origin.column }, origin.endLine === void 0 ? origin.column : { line: origin.endLine, column: origin.endColumn }, origin.source, origin.file, opts.plugin ); } else { result = new CssSyntaxError( message, endLine === void 0 ? line : { line, column }, endLine === void 0 ? column : { line: endLine, column: endColumn }, this.css, this.file, opts.plugin ); } result.input = { line, column, endLine, endColumn, source: this.css }; if (this.file) { if (pathToFileURL) { result.input.url = pathToFileURL(this.file).toString(); } result.input.file = this.file; } return result; } origin(line, column, endLine, endColumn) { if (!this.map) return false; let consumer = this.map.consumer(); let from = consumer.originalPositionFor({ line, column }); if (!from.source) return false; let to; if (typeof endLine === "number") { to = consumer.originalPositionFor({ line: endLine, column: endColumn }); } let fromUrl; if (isAbsolute(from.source)) { fromUrl = pathToFileURL(from.source); } else { fromUrl = new URL( from.source, this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile) ); } let result = { url: fromUrl.toString(), line: from.line, column: from.column, endLine: to && to.line, endColumn: to && to.column }; if (fromUrl.protocol === "file:") { if (fileURLToPath) { result.file = fileURLToPath(fromUrl); } else { throw new Error(`file: protocol is not available in this PostCSS build`); } } let source = consumer.sourceContentFor(from.source); if (source) result.source = source; return result; } mapResolve(file) { if (/^\w+:\/\//.test(file)) { return file; } return resolve(this.map.consumer().sourceRoot || this.map.root || ".", file); } get from() { return this.file || this.id; } toJSON() { let json = {}; for (let name of ["hasBOM", "css", "file", "id"]) { if (this[name] != null) { json[name] = this[name]; } } if (this.map) { json.map = { ...this.map }; if (json.map.consumerCache) { json.map.consumerCache = void 0; } } return json; } }; module2.exports = Input; Input.default = Input; if (terminalHighlight && terminalHighlight.registerInput) { terminalHighlight.registerInput(Input); } } }); // node_modules/postcss/lib/map-generator.js var require_map_generator = __commonJS({ "node_modules/postcss/lib/map-generator.js"(exports2, module2) { "use strict"; var { SourceMapConsumer, SourceMapGenerator } = require_source_map(); var { dirname, resolve, relative, sep } = require("path"); var { pathToFileURL } = require("url"); var Input = require_input(); var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator); var pathAvailable = Boolean(dirname && resolve && relative && sep); var MapGenerator = class { constructor(stringify, root, opts, cssString) { this.stringify = stringify; this.mapOpts = opts.map || {}; this.root = root; this.opts = opts; this.css = cssString; this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute; } isMap() { if (typeof this.opts.map !== "undefined") { return !!this.opts.map; } return this.previous().length > 0; } previous() { if (!this.previousMaps) { this.previousMaps = []; if (this.root) { this.root.walk((node) => { if (node.source && node.source.input.map) { let map = node.source.input.map; if (!this.previousMaps.includes(map)) { this.previousMaps.push(map); } } }); } else { let input = new Input(this.css, this.opts); if (input.map) this.previousMaps.push(input.map); } } return this.previousMaps; } isInline() { if (typeof this.mapOpts.inline !== "undefined") { return this.mapOpts.inline; } let annotation = this.mapOpts.annotation; if (typeof annotation !== "undefined" && annotation !== true) { return false; } if (this.previous().length) { return this.previous().some((i) => i.inline); } return true; } isSourcesContent() { if (typeof this.mapOpts.sourcesContent !== "undefined") { return this.mapOpts.sourcesContent; } if (this.previous().length) { return this.previous().some((i) => i.withContent()); } return true; } clearAnnotation() { if (this.mapOpts.annotation === false) return; if (this.root) { let node; for (let i = this.root.nodes.length - 1; i >= 0; i--) { node = this.root.nodes[i]; if (node.type !== "comment") continue; if (node.text.indexOf("# sourceMappingURL=") === 0) { this.root.removeChild(i); } } } else if (this.css) { this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, ""); } } setSourcesContent() { let already = {}; if (this.root) { this.root.walk((node) => { if (node.source) { let from = node.source.input.from; if (from && !already[from]) { already[from] = true; let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from)); this.map.setSourceContent(fromUrl, node.source.input.css); } } }); } else if (this.css) { let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : ""; this.map.setSourceContent(from, this.css); } } applyPrevMaps() { for (let prev of this.previous()) { let from = this.toUrl(this.path(prev.file)); let root = prev.root || dirname(prev.file); let map; if (this.mapOpts.sourcesContent === false) { map = new SourceMapConsumer(prev.text); if (map.sourcesContent) { map.sourcesContent = map.sourcesContent.map(() => null); } } else { map = prev.consumer(); } this.map.applySourceMap(map, from, this.toUrl(this.path(root))); } } isAnnotation() { if (this.isInline()) { return true; } if (typeof this.mapOpts.annotation !== "undefined") { return this.mapOpts.annotation; } if (this.previous().length) { return this.previous().some((i) => i.annotation); } return true; } toBase64(str2) { if (Buffer) { return Buffer.from(str2).toString("base64"); } else { return window.btoa(unescape(encodeURIComponent(str2))); } } addAnnotation() { let content; if (this.isInline()) { content = "data:application/json;base64," + this.toBase64(this.map.toString()); } else if (typeof this.mapOpts.annotation === "string") { content = this.mapOpts.annotation; } else if (typeof this.mapOpts.annotation === "function") { content = this.mapOpts.annotation(this.opts.to, this.root); } else { content = this.outputFile() + ".map"; } let eol = "\n"; if (this.css.includes("\r\n")) eol = "\r\n"; this.css += eol + "/*# sourceMappingURL=" + content + " */"; } outputFile() { if (this.opts.to) { return this.path(this.opts.to); } else if (this.opts.from) { return this.path(this.opts.from); } else { return "to.css"; } } generateMap() { if (this.root) { this.generateString(); } else if (this.previous().length === 1) { let prev = this.previous()[0].consumer(); prev.file = this.outputFile(); this.map = SourceMapGenerator.fromSourceMap(prev); } else { this.map = new SourceMapGenerator({ file: this.outputFile() }); this.map.addMapping({ source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "", generated: { line: 1, column: 0 }, original: { line: 1, column: 0 } }); } if (this.isSourcesContent()) this.setSourcesContent(); if (this.root && this.previous().length > 0) this.applyPrevMaps(); if (this.isAnnotation()) this.addAnnotation(); if (this.isInline()) { return [this.css]; } else { return [this.css, this.map]; } } path(file) { if (file.indexOf("<") === 0) return file; if (/^\w+:\/\//.test(file)) return file; if (this.mapOpts.absolute) return file; let from = this.opts.to ? dirname(this.opts.to) : "."; if (typeof this.mapOpts.annotation === "string") { from = dirname(resolve(from, this.mapOpts.annotation)); } file = relative(from, file); return file; } toUrl(path) { if (sep === "\\") { path = path.replace(/\\/g, "/"); } return encodeURI(path).replace(/[#?]/g, encodeURIComponent); } toFileUrl(path) { if (pathToFileURL) { return pathToFileURL(path).toString(); } else { throw new Error( "`map.absolute` option is not available in this PostCSS build" ); } } sourcePath(node) { if (this.mapOpts.from) { return this.toUrl(this.mapOpts.from); } else if (this.usesFileUrls) { return this.toFileUrl(node.source.input.from); } else { return this.toUrl(this.path(node.source.input.from)); } } generateString() { this.css = ""; this.map = new SourceMapGenerator({ file: this.outputFile() }); let line = 1; let column = 1; let noSource = ""; let mapping = { source: "", generated: { line: 0, column: 0 }, original: { line: 0, column: 0 } }; let lines, last; this.stringify(this.root, (str2, node, type) => { this.css += str2; if (node && type !== "end") { mapping.generated.line = line; mapping.generated.column = column - 1; if (node.source && node.source.start) { mapping.source = this.sourcePath(node); mapping.original.line = node.source.start.line; mapping.original.column = node.source.start.column - 1; this.map.addMapping(mapping); } else { mapping.source = noSource; mapping.original.line = 1; mapping.original.column = 0; this.map.addMapping(mapping); } } lines = str2.match(/\n/g); if (lines) { line += lines.length; last = str2.lastIndexOf("\n"); column = str2.length - last; } else { column += str2.length; } if (node && type !== "start") { let p = node.parent || { raws: {} }; let childless = node.type === "decl" || node.type === "atrule" && !node.nodes; if (!childless || node !== p.last || p.raws.semicolon) { if (node.source && node.source.end) { mapping.source = this.sourcePath(node); mapping.original.line = node.source.end.line; mapping.original.column = node.source.end.column - 1; mapping.generated.line = line; mapping.generated.column = column - 2; this.map.addMapping(mapping); } else { mapping.source = noSource; mapping.original.line = 1; mapping.original.column = 0; mapping.generated.line = line; mapping.generated.column = column - 1; this.map.addMapping(mapping); } } } }); } generate() { this.clearAnnotation(); if (pathAvailable && sourceMapAvailable && this.isMap()) { return this.generateMap(); } else { let result = ""; this.stringify(this.root, (i) => { result += i; }); return [result]; } } }; module2.exports = MapGenerator; } }); // node_modules/postcss/lib/comment.js var require_comment = __commonJS({ "node_modules/postcss/lib/comment.js"(exports2, module2) { "use strict"; var Node2 = require_node(); var Comment = class extends Node2 { constructor(defaults) { super(defaults); this.type = "comment"; } }; module2.exports = Comment; Comment.default = Comment; } }); // node_modules/postcss/lib/container.js var require_container = __commonJS({ "node_modules/postcss/lib/container.js"(exports2, module2) { "use strict"; var { isClean, my } = require_symbols(); var Declaration = require_declaration(); var Comment = require_comment(); var Node2 = require_node(); var parse2; var Rule; var AtRule; var Root; function cleanSource(nodes) { return nodes.map((i) => { if (i.nodes) i.nodes = cleanSource(i.nodes); delete i.source; return i; }); } function markDirtyUp(node) { node[isClean] = false; if (node.proxyOf.nodes) { for (let i of node.proxyOf.nodes) { markDirtyUp(i); } } } var Container = class extends Node2 { push(child) { child.parent = this; this.proxyOf.nodes.push(child); return this; } each(callback) { if (!this.proxyOf.nodes) return void 0; let iterator = this.getIterator(); let index, result; while (this.indexes[iterator] < this.proxyOf.nodes.length) { index = this.indexes[iterator]; result = callback(this.proxyOf.nodes[index], index); if (result === false) break; this.indexes[iterator] += 1; } delete this.indexes[iterator]; return result; } walk(callback) { return this.each((child, i) => { let result; try { result = callback(child, i); } catch (e) { throw child.addToError(e); } if (result !== false && child.walk) { result = child.walk(callback); } return result; }); } walkDecls(prop, callback) { if (!callback) { callback = prop; return this.walk((child, i) => { if (child.type === "decl") { return callback(child, i); } }); } if (prop instanceof RegExp) { return this.walk((child, i) => { if (child.type === "decl" && prop.test(child.prop)) { return callback(child, i); } }); } return this.walk((child, i) => { if (child.type === "decl" && child.prop === prop) { return callback(child, i); } }); } walkRules(selector, callback) { if (!callback) { callback = selector; return this.walk((child, i) => { if (child.type === "rule") { return callback(child, i); } }); } if (selector instanceof RegExp) { return this.walk((child, i) => { if (child.type === "rule" && selector.test(child.selector)) { return callback(child, i); } }); } return this.walk((child, i) => { if (child.type === "rule" && child.selector === selector) { return callback(child, i); } }); } walkAtRules(name, callback) { if (!callback) { callback = name; return this.walk((child, i) => { if (child.type === "atrule") { return callback(child, i); } }); } if (name instanceof RegExp) { return this.walk((child, i) => { if (child.type === "atrule" && name.test(child.name)) { return callback(child, i); } }); } return this.walk((child, i) => { if (child.type === "atrule" && child.name === name) { return callback(child, i); } }); } walkComments(callback) { return this.walk((child, i) => { if (child.type === "comment") { return callback(child, i); } }); } append(...children) { for (let child of children) { let nodes = this.normalize(child, this.last); for (let node of nodes) this.proxyOf.nodes.push(node); } this.markDirty(); return this; } prepend(...children) { children = children.reverse(); for (let child of children) { let nodes = this.normalize(child, this.first, "prepend").reverse(); for (let node of nodes) this.proxyOf.nodes.unshift(node); for (let id in this.indexes) { this.indexes[id] = this.indexes[id] + nodes.length; } } this.markDirty(); return this; } cleanRaws(keepBetween) { super.cleanRaws(keepBetween); if (this.nodes) { for (let node of this.nodes) node.cleanRaws(keepBetween); } } insertBefore(exist, add) { let existIndex = this.index(exist); let type = existIndex === 0 ? "prepend" : false; let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse(); existIndex = this.index(exist); for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node); let index; for (let id in this.indexes) { index = this.indexes[id]; if (existIndex <= index) { this.indexes[id] = index + nodes.length; } } this.markDirty(); return this; } insertAfter(exist, add) { let existIndex = this.index(exist); let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse(); existIndex = this.index(exist); for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node); let index; for (let id in this.indexes) { index = this.indexes[id]; if (existIndex < index) { this.indexes[id] = index + nodes.length; } } this.markDirty(); return this; } removeChild(child) { child = this.index(child); this.proxyOf.nodes[child].parent = void 0; this.proxyOf.nodes.splice(child, 1); let index; for (let id in this.indexes) { index = this.indexes[id]; if (index >= child) { this.indexes[id] = index - 1; } } this.markDirty(); return this; } removeAll() { for (let node of this.proxyOf.nodes) node.parent = void 0; this.proxyOf.nodes = []; this.markDirty(); return this; } replaceValues(pattern, opts, callback) { if (!callback) { callback = opts; opts = {}; } this.walkDecls((decl) => { if (opts.props && !opts.props.includes(decl.prop)) return; if (opts.fast && !decl.value.includes(opts.fast)) return; decl.value = decl.value.replace(pattern, callback); }); this.markDirty(); return this; } every(condition) { return this.nodes.every(condition); } some(condition) { return this.nodes.some(condition); } index(child) { if (typeof child === "number") return child; if (child.proxyOf) child = child.proxyOf; return this.proxyOf.nodes.indexOf(child); } get first() { if (!this.proxyOf.nodes) return void 0; return this.proxyOf.nodes[0]; } get last() { if (!this.proxyOf.nodes) return void 0; return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]; } normalize(nodes, sample) { if (typeof nodes === "string") { nodes = cleanSource(parse2(nodes).nodes); } else if (Array.isArray(nodes)) { nodes = nodes.slice(0); for (let i of nodes) { if (i.parent) i.parent.removeChild(i, "ignore"); } } else if (nodes.type === "root" && this.type !== "document") { nodes = nodes.nodes.slice(0); for (let i of nodes) { if (i.parent) i.parent.removeChild(i, "ignore"); } } else if (nodes.type) { nodes = [nodes]; } else if (nodes.prop) { if (typeof nodes.value === "undefined") { throw new Error("Value field is missed in node creation"); } else if (typeof nodes.value !== "string") { nodes.value = String(nodes.value); } nodes = [new Declaration(nodes)]; } else if (nodes.selector) { nodes = [new Rule(nodes)]; } else if (nodes.name) { nodes = [new AtRule(nodes)]; } else if (nodes.text) { nodes = [new Comment(nodes)]; } else { throw new Error("Unknown node type in node creation"); } let processed = nodes.map((i) => { if (!i[my]) Container.rebuild(i); i = i.proxyOf; if (i.parent) i.parent.removeChild(i); if (i[isClean]) markDirtyUp(i); if (typeof i.raws.before === "undefined") { if (sample && typeof sample.raws.before !== "undefined") { i.raws.before = sample.raws.before.replace(/\S/g, ""); } } i.parent = this.proxyOf; return i; }); return processed; } getProxyProcessor() { return { set(node, prop, value) { if (node[prop] === value) return true; node[prop] = value; if (prop === "name" || prop === "params" || prop === "selector") { node.markDirty(); } return true; }, get(node, prop) { if (prop === "proxyOf") { return node; } else if (!node[prop]) { return node[prop]; } else if (prop === "each" || typeof prop === "string" && prop.startsWith("walk")) { return (...args) => { return node[prop]( ...args.map((i) => { if (typeof i === "function") { return (child, index) => i(child.toProxy(), index); } else { return i; } }) ); }; } else if (prop === "every" || prop === "some") { return (cb) => { return node[prop]( (child, ...other) => cb(child.toProxy(), ...other) ); }; } else if (prop === "root") { return () => node.root().toProxy(); } else if (prop === "nodes") { return node.nodes.map((i) => i.toProxy()); } else if (prop === "first" || prop === "last") { return node[prop].toProxy(); } else { return node[prop]; } } }; } getIterator() { if (!this.lastEach) this.lastEach = 0; if (!this.indexes) this.indexes = {}; this.lastEach += 1; let iterator = this.lastEach; this.indexes[iterator] = 0; return iterator; } }; Container.registerParse = (dependant) => { parse2 = dependant; }; Container.registerRule = (dependant) => { Rule = dependant; }; Container.registerAtRule = (dependant) => { AtRule = dependant; }; Container.registerRoot = (dependant) => { Root = dependant; }; module2.exports = Container; Container.default = Container; Container.rebuild = (node) => { if (node.type === "atrule") { Object.setPrototypeOf(node, AtRule.prototype); } else if (node.type === "rule") { Object.setPrototypeOf(node, Rule.prototype); } else if (node.type === "decl") { Object.setPrototypeOf(node, Declaration.prototype); } else if (node.type === "comment") { Object.setPrototypeOf(node, Comment.prototype); } else if (node.type === "root") { Object.setPrototypeOf(node, Root.prototype); } node[my] = true; if (node.nodes) { node.nodes.forEach((child) => { Container.rebuild(child); }); } }; } }); // node_modules/postcss/lib/document.js var require_document = __commonJS({ "node_modules/postcss/lib/document.js"(exports2, module2) { "use strict"; var Container = require_container(); var LazyResult; var Processor; var Document = class extends Container { constructor(defaults) { super({ type: "document", ...defaults }); if (!this.nodes) { this.nodes = []; } } toResult(opts = {}) { let lazy = new LazyResult(new Processor(), this, opts); return lazy.stringify(); } }; Document.registerLazyResult = (dependant) => { LazyResult = dependant; }; Document.registerProcessor = (dependant) => { Processor = dependant; }; module2.exports = Document; Document.default = Document; } }); // node_modules/postcss/lib/warn-once.js var require_warn_once = __commonJS({ "node_modules/postcss/lib/warn-once.js"(exports2, module2) { "use strict"; var printed = {}; module2.exports = function warnOnce(message) { if (printed[message]) return; printed[message] = true; if (typeof console !== "undefined" && console.warn) { console.warn(message); } }; } }); // node_modules/postcss/lib/warning.js var require_warning = __commonJS({ "node_modules/postcss/lib/warning.js"(exports2, module2) { "use strict"; var Warning = class { constructor(text, opts = {}) { this.type = "warning"; this.text = text; if (opts.node && opts.node.source) { let range = opts.node.rangeBy(opts); this.line = range.start.line; this.column = range.start.column; this.endLine = range.end.line; this.endColumn = range.end.column; } for (let opt in opts) this[opt] = opts[opt]; } toString() { if (this.node) { return this.node.error(this.text, { plugin: this.plugin, index: this.index, word: this.word }).message; } if (this.plugin) { return this.plugin + ": " + this.text; } return this.text; } }; module2.exports = Warning; Warning.default = Warning; } }); // node_modules/postcss/lib/result.js var require_result = __commonJS({ "node_modules/postcss/lib/result.js"(exports2, module2) { "use strict"; var Warning = require_warning(); var Result = class { constructor(processor, root, opts) { this.processor = processor; this.messages = []; this.root = root; this.opts = opts; this.css = void 0; this.map = void 0; } toString() { return this.css; } warn(text, opts = {}) { if (!opts.plugin) { if (this.lastPlugin && this.lastPlugin.postcssPlugin) { opts.plugin = this.lastPlugin.postcssPlugin; } } let warning = new Warning(text, opts); this.messages.push(warning); return warning; } warnings() { return this.messages.filter((i) => i.type === "warning"); } get content() { return this.css; } }; module2.exports = Result; Result.default = Result; } }); // node_modules/postcss/lib/tokenize.js var require_tokenize = __commonJS({ "node_modules/postcss/lib/tokenize.js"(exports2, module2) { "use strict"; var SINGLE_QUOTE = "'".charCodeAt(0); var DOUBLE_QUOTE = '"'.charCodeAt(0); var BACKSLASH = "\\".charCodeAt(0); var SLASH = "/".charCodeAt(0); var NEWLINE = "\n".charCodeAt(0); var SPACE = " ".charCodeAt(0); var FEED = "\f".charCodeAt(0); var TAB = " ".charCodeAt(0); var CR = "\r".charCodeAt(0); var OPEN_SQUARE = "[".charCodeAt(0); var CLOSE_SQUARE = "]".charCodeAt(0); var OPEN_PARENTHESES = "(".charCodeAt(0); var CLOSE_PARENTHESES = ")".charCodeAt(0); var OPEN_CURLY = "{".charCodeAt(0); var CLOSE_CURLY = "}".charCodeAt(0); var SEMICOLON = ";".charCodeAt(0); var ASTERISK = "*".charCodeAt(0); var COLON = ":".charCodeAt(0); var AT = "@".charCodeAt(0); var RE_AT_END = /[\t\n\f\r "#'()/;[\\\]{}]/g; var RE_WORD_END = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g; var RE_BAD_BRACKET = /.[\n"'(/\\]/; var RE_HEX_ESCAPE = /[\da-f]/i; module2.exports = function tokenizer(input, options2 = {}) { let css2 = input.css.valueOf(); let ignore = options2.ignoreErrors; let code, next, quote, content, escape2; let escaped, escapePos, prev, n, currentToken; let length = css2.length; let pos = 0; let buffer = []; let returned = []; function position() { return pos; } function unclosed(what) { throw input.error("Unclosed " + what, pos); } function endOfFile() { return returned.length === 0 && pos >= length; } function nextToken(opts) { if (returned.length) return returned.pop(); if (pos >= length) return; let ignoreUnclosed = opts ? opts.ignoreUnclosed : false; code = css2.charCodeAt(pos); switch (code) { case NEWLINE: case SPACE: case TAB: case CR: case FEED: { next = pos; do { next += 1; code = css2.charCodeAt(next); } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED); currentToken = ["space", css2.slice(pos, next)]; pos = next - 1; break; } case OPEN_SQUARE: case CLOSE_SQUARE: case OPEN_CURLY: case CLOSE_CURLY: case COLON: case SEMICOLON: case CLOSE_PARENTHESES: { let controlChar = String.fromCharCode(code); currentToken = [controlChar, controlChar, pos]; break; } case OPEN_PARENTHESES: { prev = buffer.length ? buffer.pop()[1] : ""; n = css2.charCodeAt(pos + 1); if (prev === "url" && n !== SINGLE_QUOTE && n !== DOUBLE_QUOTE && n !== SPACE && n !== NEWLINE && n !== TAB && n !== FEED && n !== CR) { next = pos; do { escaped = false; next = css2.indexOf(")", next + 1); if (next === -1) { if (ignore || ignoreUnclosed) { next = pos; break; } else { unclosed("bracket"); } } escapePos = next; while (css2.charCodeAt(escapePos - 1) === BACKSLASH) { escapePos -= 1; escaped = !escaped; } } while (escaped); currentToken = ["brackets", css2.slice(pos, next + 1), pos, next]; pos = next; } else { next = css2.indexOf(")", pos + 1); content = css2.slice(pos, next + 1); if (next === -1 || RE_BAD_BRACKET.test(content)) { currentToken = ["(", "(", pos]; } else { currentToken = ["brackets", content, pos, next]; pos = next; } } break; } case SINGLE_QUOTE: case DOUBLE_QUOTE: { quote = code === SINGLE_QUOTE ? "'" : '"'; next = pos; do { escaped = false; next = css2.indexOf(quote, next + 1); if (next === -1) { if (ignore || ignoreUnclosed) { next = pos + 1; break; } else { unclosed("string"); } } escapePos = next; while (css2.charCodeAt(escapePos - 1) === BACKSLASH) { escapePos -= 1; escaped = !escaped; } } while (escaped); currentToken = ["string", css2.slice(pos, next + 1), pos, next]; pos = next; break; } case AT: { RE_AT_END.lastIndex = pos + 1; RE_AT_END.test(css2); if (RE_AT_END.lastIndex === 0) { next = css2.length - 1; } else { next = RE_AT_END.lastIndex - 2; } currentToken = ["at-word", css2.slice(pos, next + 1), pos, next]; pos = next; break; } case BACKSLASH: { next = pos; escape2 = true; while (css2.charCodeAt(next + 1) === BACKSLASH) { next += 1; escape2 = !escape2; } code = css2.charCodeAt(next + 1); if (escape2 && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) { next += 1; if (RE_HEX_ESCAPE.test(css2.charAt(next))) { while (RE_HEX_ESCAPE.test(css2.charAt(next + 1))) { next += 1; } if (css2.charCodeAt(next + 1) === SPACE) { next += 1; } } } currentToken = ["word", css2.slice(pos, next + 1), pos, next]; pos = next; break; } default: { if (code === SLASH && css2.charCodeAt(pos + 1) === ASTERISK) { next = css2.indexOf("*/", pos + 2) + 1; if (next === 0) { if (ignore || ignoreUnclosed) { next = css2.length; } else { unclosed("comment"); } } currentToken = ["comment", css2.slice(pos, next + 1), pos, next]; pos = next; } else { RE_WORD_END.lastIndex = pos + 1; RE_WORD_END.test(css2); if (RE_WORD_END.lastIndex === 0) { next = css2.length - 1; } else { next = RE_WORD_END.lastIndex - 2; } currentToken = ["word", css2.slice(pos, next + 1), pos, next]; buffer.push(currentToken); pos = next; } break; } } pos++; return currentToken; } function back(token) { returned.push(token); } return { back, nextToken, endOfFile, position }; }; } }); // node_modules/postcss/lib/at-rule.js var require_at_rule = __commonJS({ "node_modules/postcss/lib/at-rule.js"(exports2, module2) { "use strict"; var Container = require_container(); var AtRule = class extends Container { constructor(defaults) { super(defaults); this.type = "atrule"; } append(...children) { if (!this.proxyOf.nodes) this.nodes = []; return super.append(...children); } prepend(...children) { if (!this.proxyOf.nodes) this.nodes = []; return super.prepend(...children); } }; module2.exports = AtRule; AtRule.default = AtRule; Container.registerAtRule(AtRule); } }); // node_modules/postcss/lib/root.js var require_root = __commonJS({ "node_modules/postcss/lib/root.js"(exports2, module2) { "use strict"; var Container = require_container(); var LazyResult; var Processor; var Root = class extends Container { constructor(defaults) { super(defaults); this.type = "root"; if (!this.nodes) this.nodes = []; } removeChild(child, ignore) { let index = this.index(child); if (!ignore && index === 0 && this.nodes.length > 1) { this.nodes[1].raws.before = this.nodes[index].raws.before; } return super.removeChild(child); } normalize(child, sample, type) { let nodes = super.normalize(child); if (sample) { if (type === "prepend") { if (this.nodes.length > 1) { sample.raws.before = this.nodes[1].raws.before; } else { delete sample.raws.before; } } else if (this.first !== sample) { for (let node of nodes) { node.raws.before = sample.raws.before; } } } return nodes; } toResult(opts = {}) { let lazy = new LazyResult(new Processor(), this, opts); return lazy.stringify(); } }; Root.registerLazyResult = (dependant) => { LazyResult = dependant; }; Root.registerProcessor = (dependant) => { Processor = dependant; }; module2.exports = Root; Root.default = Root; Container.registerRoot(Root); } }); // node_modules/postcss/lib/list.js var require_list2 = __commonJS({ "node_modules/postcss/lib/list.js"(exports2, module2) { "use strict"; var list = { split(string, separators, last) { let array = []; let current = ""; let split = false; let func = 0; let inQuote = false; let prevQuote = ""; let escape2 = false; for (let letter of string) { if (escape2) { escape2 = false; } else if (letter === "\\") { escape2 = true; } else if (inQuote) { if (letter === prevQuote) { inQuote = false; } } else if (letter === '"' || letter === "'") { inQuote = true; prevQuote = letter; } else if (letter === "(") { func += 1; } else if (letter === ")") { if (func > 0) func -= 1; } else if (func === 0) { if (separators.includes(letter)) split = true; } if (split) { if (current !== "") array.push(current.trim()); current = ""; split = false; } else { current += letter; } } if (last || current !== "") array.push(current.trim()); return array; }, space(string) { let spaces = [" ", "\n", " "]; return list.split(string, spaces); }, comma(string) { return list.split(string, [","], true); } }; module2.exports = list; list.default = list; } }); // node_modules/postcss/lib/rule.js var require_rule = __commonJS({ "node_modules/postcss/lib/rule.js"(exports2, module2) { "use strict"; var Container = require_container(); var list = require_list2(); var Rule = class extends Container { constructor(defaults) { super(defaults); this.type = "rule"; if (!this.nodes) this.nodes = []; } get selectors() { return list.comma(this.selector); } set selectors(values) { let match = this.selector ? this.selector.match(/,\s*/) : null; let sep = match ? match[0] : "," + this.raw("between", "beforeOpen"); this.selector = values.join(sep); } }; module2.exports = Rule; Rule.default = Rule; Container.registerRule(Rule); } }); // node_modules/postcss/lib/parser.js var require_parser = __commonJS({ "node_modules/postcss/lib/parser.js"(exports2, module2) { "use strict"; var Declaration = require_declaration(); var tokenizer = require_tokenize(); var Comment = require_comment(); var AtRule = require_at_rule(); var Root = require_root(); var Rule = require_rule(); var SAFE_COMMENT_NEIGHBOR = { empty: true, space: true }; function findLastWithPosition(tokens) { for (let i = tokens.length - 1; i >= 0; i--) { let token = tokens[i]; let pos = token[3] || token[2]; if (pos) return pos; } } var Parser = class { constructor(input) { this.input = input; this.root = new Root(); this.current = this.root; this.spaces = ""; this.semicolon = false; this.customProperty = false; this.createTokenizer(); this.root.source = { input, start: { offset: 0, line: 1, column: 1 } }; } createTokenizer() { this.tokenizer = tokenizer(this.input); } parse() { let token; while (!this.tokenizer.endOfFile()) { token = this.tokenizer.nextToken(); switch (token[0]) { case "space": this.spaces += token[1]; break; case ";": this.freeSemicolon(token); break; case "}": this.end(token); break; case "comment": this.comment(token); break; case "at-word": this.atrule(token); break; case "{": this.emptyRule(token); break; default: this.other(token); break; } } this.endFile(); } comment(token) { let node = new Comment(); this.init(node, token[2]); node.source.end = this.getPosition(token[3] || token[2]); let text = token[1].slice(2, -2); if (/^\s*$/.test(text)) { node.text = ""; node.raws.left = text; node.raws.right = ""; } else { let match = text.match(/^(\s*)([^]*\S)(\s*)$/); node.text = match[2]; node.raws.left = match[1]; node.raws.right = match[3]; } } emptyRule(token) { let node = new Rule(); this.init(node, token[2]); node.selector = ""; node.raws.between = ""; this.current = node; } other(start) { let end = false; let type = null; let colon = false; let bracket = null; let brackets = []; let customProperty = start[1].startsWith("--"); let tokens = []; let token = start; while (token) { type = token[0]; tokens.push(token); if (type === "(" || type === "[") { if (!bracket) bracket = token; brackets.push(type === "(" ? ")" : "]"); } else if (customProperty && colon && type === "{") { if (!bracket) bracket = token; brackets.push("}"); } else if (brackets.length === 0) { if (type === ";") { if (colon) { this.decl(tokens, customProperty); return; } else { break; } } else if (type === "{") { this.rule(tokens); return; } else if (type === "}") { this.tokenizer.back(tokens.pop()); end = true; break; } else if (type === ":") { colon = true; } } else if (type === brackets[brackets.length - 1]) { brackets.pop(); if (brackets.length === 0) bracket = null; } token = this.tokenizer.nextToken(); } if (this.tokenizer.endOfFile()) end = true; if (brackets.length > 0) this.unclosedBracket(bracket); if (end && colon) { if (!customProperty) { while (tokens.length) { token = tokens[tokens.length - 1][0]; if (token !== "space" && token !== "comment") break; this.tokenizer.back(tokens.pop()); } } this.decl(tokens, customProperty); } else { this.unknownWord(tokens); } } rule(tokens) { tokens.pop(); let node = new Rule(); this.init(node, tokens[0][2]); node.raws.between = this.spacesAndCommentsFromEnd(tokens); this.raw(node, "selector", tokens); this.current = node; } decl(tokens, customProperty) { let node = new Declaration(); this.init(node, tokens[0][2]); let last = tokens[tokens.length - 1]; if (last[0] === ";") { this.semicolon = true; tokens.pop(); } node.source.end = this.getPosition( last[3] || last[2] || findLastWithPosition(tokens) ); while (tokens[0][0] !== "word") { if (tokens.length === 1) this.unknownWord(tokens); node.raws.before += tokens.shift()[1]; } node.source.start = this.getPosition(tokens[0][2]); node.prop = ""; while (tokens.length) { let type = tokens[0][0]; if (type === ":" || type === "space" || type === "comment") { break; } node.prop += tokens.shift()[1]; } node.raws.between = ""; let token; while (tokens.length) { token = tokens.shift(); if (token[0] === ":") { node.raws.between += token[1]; break; } else { if (token[0] === "word" && /\w/.test(token[1])) { this.unknownWord([token]); } node.raws.between += token[1]; } } if (node.prop[0] === "_" || node.prop[0] === "*") { node.raws.before += node.prop[0]; node.prop = node.prop.slice(1); } let firstSpaces = []; let next; while (tokens.length) { next = tokens[0][0]; if (next !== "space" && next !== "comment") break; firstSpaces.push(tokens.shift()); } this.precheckMissedSemicolon(tokens); for (let i = tokens.length - 1; i >= 0; i--) { token = tokens[i]; if (token[1].toLowerCase() === "!important") { node.important = true; let string = this.stringFrom(tokens, i); string = this.spacesFromEnd(tokens) + string; if (string !== " !important") node.raws.important = string; break; } else if (token[1].toLowerCase() === "important") { let cache = tokens.slice(0); let str2 = ""; for (let j = i; j > 0; j--) { let type = cache[j][0]; if (str2.trim().indexOf("!") === 0 && type !== "space") { break; } str2 = cache.pop()[1] + str2; } if (str2.trim().indexOf("!") === 0) { node.important = true; node.raws.important = str2; tokens = cache; } } if (token[0] !== "space" && token[0] !== "comment") { break; } } let hasWord = tokens.some((i) => i[0] !== "space" && i[0] !== "comment"); if (hasWord) { node.raws.between += firstSpaces.map((i) => i[1]).join(""); firstSpaces = []; } this.raw(node, "value", firstSpaces.concat(tokens), customProperty); if (node.value.includes(":") && !customProperty) { this.checkMissedSemicolon(tokens); } } atrule(token) { let node = new AtRule(); node.name = token[1].slice(1); if (node.name === "") { this.unnamedAtrule(node, token); } this.init(node, token[2]); let type; let prev; let shift; let last = false; let open = false; let params = []; let brackets = []; while (!this.tokenizer.endOfFile()) { token = this.tokenizer.nextToken(); type = token[0]; if (type === "(" || type === "[") { brackets.push(type === "(" ? ")" : "]"); } else if (type === "{" && brackets.length > 0) { brackets.push("}"); } else if (type === brackets[brackets.length - 1]) { brackets.pop(); } if (brackets.length === 0) { if (type === ";") { node.source.end = this.getPosition(token[2]); this.semicolon = true; break; } else if (type === "{") { open = true; break; } else if (type === "}") { if (params.length > 0) { shift = params.length - 1; prev = params[shift]; while (prev && prev[0] === "space") { prev = params[--shift]; } if (prev) { node.source.end = this.getPosition(prev[3] || prev[2]); } } this.end(token); break; } else { params.push(token); } } else { params.push(token); } if (this.tokenizer.endOfFile()) { last = true; break; } } node.raws.between = this.spacesAndCommentsFromEnd(params); if (params.length) { node.raws.afterName = this.spacesAndCommentsFromStart(params); this.raw(node, "params", params); if (last) { token = params[params.length - 1]; node.source.end = this.getPosition(token[3] || token[2]); this.spaces = node.raws.between; node.raws.between = ""; } } else { node.raws.afterName = ""; node.params = ""; } if (open) { node.nodes = []; this.current = node; } } end(token) { if (this.current.nodes && this.current.nodes.length) { this.current.raws.semicolon = this.semicolon; } this.semicolon = false; this.current.raws.after = (this.current.raws.after || "") + this.spaces; this.spaces = ""; if (this.current.parent) { this.current.source.end = this.getPosition(token[2]); this.current = this.current.parent; } else { this.unexpectedClose(token); } } endFile() { if (this.current.parent) this.unclosedBlock(); if (this.current.nodes && this.current.nodes.length) { this.current.raws.semicolon = this.semicolon; } this.current.raws.after = (this.current.raws.after || "") + this.spaces; } freeSemicolon(token) { this.spaces += token[1]; if (this.current.nodes) { let prev = this.current.nodes[this.current.nodes.length - 1]; if (prev && prev.type === "rule" && !prev.raws.ownSemicolon) { prev.raws.ownSemicolon = this.spaces; this.spaces = ""; } } } // Helpers getPosition(offset) { let pos = this.input.fromOffset(offset); return { offset, line: pos.line, column: pos.col }; } init(node, offset) { this.current.push(node); node.source = { start: this.getPosition(offset), input: this.input }; node.raws.before = this.spaces; this.spaces = ""; if (node.type !== "comment") this.semicolon = false; } raw(node, prop, tokens, customProperty) { let token, type; let length = tokens.length; let value = ""; let clean = true; let next, prev; for (let i = 0; i < length; i += 1) { token = tokens[i]; type = token[0]; if (type === "space" && i === length - 1 && !customProperty) { clean = false; } else if (type === "comment") { prev = tokens[i - 1] ? tokens[i - 1][0] : "empty"; next = tokens[i + 1] ? tokens[i + 1][0] : "empty"; if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) { if (value.slice(-1) === ",") { clean = false; } else { value += token[1]; } } else { clean = false; } } else { value += token[1]; } } if (!clean) { let raw = tokens.reduce((all, i) => all + i[1], ""); node.raws[prop] = { value, raw }; } node[prop] = value; } spacesAndCommentsFromEnd(tokens) { let lastTokenType; let spaces = ""; while (tokens.length) { lastTokenType = tokens[tokens.length - 1][0]; if (lastTokenType !== "space" && lastTokenType !== "comment") break; spaces = tokens.pop()[1] + spaces; } return spaces; } spacesAndCommentsFromStart(tokens) { let next; let spaces = ""; while (tokens.length) { next = tokens[0][0]; if (next !== "space" && next !== "comment") break; spaces += tokens.shift()[1]; } return spaces; } spacesFromEnd(tokens) { let lastTokenType; let spaces = ""; while (tokens.length) { lastTokenType = tokens[tokens.length - 1][0]; if (lastTokenType !== "space") break; spaces = tokens.pop()[1] + spaces; } return spaces; } stringFrom(tokens, from) { let result = ""; for (let i = from; i < tokens.length; i++) { result += tokens[i][1]; } tokens.splice(from, tokens.length - from); return result; } colon(tokens) { let brackets = 0; let token, type, prev; for (let [i, element] of tokens.entries()) { token = element; type = token[0]; if (type === "(") { brackets += 1; } if (type === ")") { brackets -= 1; } if (brackets === 0 && type === ":") { if (!prev) { this.doubleColon(token); } else if (prev[0] === "word" && prev[1] === "progid") { continue; } else { return i; } } prev = token; } return false; } // Errors unclosedBracket(bracket) { throw this.input.error( "Unclosed bracket", { offset: bracket[2] }, { offset: bracket[2] + 1 } ); } unknownWord(tokens) { throw this.input.error( "Unknown word", { offset: tokens[0][2] }, { offset: tokens[0][2] + tokens[0][1].length } ); } unexpectedClose(token) { throw this.input.error( "Unexpected }", { offset: token[2] }, { offset: token[2] + 1 } ); } unclosedBlock() { let pos = this.current.source.start; throw this.input.error("Unclosed block", pos.line, pos.column); } doubleColon(token) { throw this.input.error( "Double colon", { offset: token[2] }, { offset: token[2] + token[1].length } ); } unnamedAtrule(node, token) { throw this.input.error( "At-rule without name", { offset: token[2] }, { offset: token[2] + token[1].length } ); } precheckMissedSemicolon() { } checkMissedSemicolon(tokens) { let colon = this.colon(tokens); if (colon === false) return; let founded = 0; let token; for (let j = colon - 1; j >= 0; j--) { token = tokens[j]; if (token[0] !== "space") { founded += 1; if (founded === 2) break; } } throw this.input.error( "Missed semicolon", token[0] === "word" ? token[3] + 1 : token[2] ); } }; module2.exports = Parser; } }); // node_modules/postcss/lib/parse.js var require_parse2 = __commonJS({ "node_modules/postcss/lib/parse.js"(exports2, module2) { "use strict"; var Container = require_container(); var Parser = require_parser(); var Input = require_input(); function parse2(css2, opts) { let input = new Input(css2, opts); let parser = new Parser(input); try { parser.parse(); } catch (e) { if (true) { if (e.name === "CssSyntaxError" && opts && opts.from) { if (/\.scss$/i.test(opts.from)) { e.message += "\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser"; } else if (/\.sass/i.test(opts.from)) { e.message += "\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser"; } else if (/\.less$/i.test(opts.from)) { e.message += "\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser"; } } } throw e; } return parser.root; } module2.exports = parse2; parse2.default = parse2; Container.registerParse(parse2); } }); // node_modules/postcss/lib/lazy-result.js var require_lazy_result = __commonJS({ "node_modules/postcss/lib/lazy-result.js"(exports2, module2) { "use strict"; var { isClean, my } = require_symbols(); var MapGenerator = require_map_generator(); var stringify = require_stringify(); var Container = require_container(); var Document = require_document(); var warnOnce = require_warn_once(); var Result = require_result(); var parse2 = require_parse2(); var Root = require_root(); var TYPE_TO_CLASS_NAME = { document: "Document", root: "Root", atrule: "AtRule", rule: "Rule", decl: "Declaration", comment: "Comment" }; var PLUGIN_PROPS = { postcssPlugin: true, prepare: true, Once: true, Document: true, Root: true, Declaration: true, Rule: true, AtRule: true, Comment: true, DeclarationExit: true, RuleExit: true, AtRuleExit: true, CommentExit: true, RootExit: true, DocumentExit: true, OnceExit: true }; var NOT_VISITORS = { postcssPlugin: true, prepare: true, Once: true }; var CHILDREN = 0; function isPromise(obj) { return typeof obj === "object" && typeof obj.then === "function"; } function getEvents(node) { let key = false; let type = TYPE_TO_CLASS_NAME[node.type]; if (node.type === "decl") { key = node.prop.toLowerCase(); } else if (node.type === "atrule") { key = node.name.toLowerCase(); } if (key && node.append) { return [ type, type + "-" + key, CHILDREN, type + "Exit", type + "Exit-" + key ]; } else if (key) { return [type, type + "-" + key, type + "Exit", type + "Exit-" + key]; } else if (node.append) { return [type, CHILDREN, type + "Exit"]; } else { return [type, type + "Exit"]; } } function toStack(node) { let events; if (node.type === "document") { events = ["Document", CHILDREN, "DocumentExit"]; } else if (node.type === "root") { events = ["Root", CHILDREN, "RootExit"]; } else { events = getEvents(node); } return { node, events, eventIndex: 0, visitors: [], visitorIndex: 0, iterator: 0 }; } function cleanMarks(node) { node[isClean] = false; if (node.nodes) node.nodes.forEach((i) => cleanMarks(i)); return node; } var postcss = {}; var LazyResult = class { constructor(processor, css2, opts) { this.stringified = false; this.processed = false; let root; if (typeof css2 === "object" && css2 !== null && (css2.type === "root" || css2.type === "document")) { root = cleanMarks(css2); } else if (css2 instanceof LazyResult || css2 instanceof Result) { root = cleanMarks(css2.root); if (css2.map) { if (typeof opts.map === "undefined") opts.map = {}; if (!opts.map.inline) opts.map.inline = false; opts.map.prev = css2.map; } } else { let parser = parse2; if (opts.syntax) parser = opts.syntax.parse; if (opts.parser) parser = opts.parser; if (parser.parse) parser = parser.parse; try { root = parser(css2, opts); } catch (error) { this.processed = true; this.error = error; } if (root && !root[my]) { Container.rebuild(root); } } this.result = new Result(processor, root, opts); this.helpers = { ...postcss, result: this.result, postcss }; this.plugins = this.processor.plugins.map((plugin) => { if (typeof plugin === "object" && plugin.prepare) { return { ...plugin, ...plugin.prepare(this.result) }; } else { return plugin; } }); } get [Symbol.toStringTag]() { return "LazyResult"; } get processor() { return this.result.processor; } get opts() { return this.result.opts; } get css() { return this.stringify().css; } get content() { return this.stringify().content; } get map() { return this.stringify().map; } get root() { return this.sync().root; } get messages() { return this.sync().messages; } warnings() { return this.sync().warnings(); } toString() { return this.css; } then(onFulfilled, onRejected) { if (true) { if (!("from" in this.opts)) { warnOnce( "Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning." ); } } return this.async().then(onFulfilled, onRejected); } catch(onRejected) { return this.async().catch(onRejected); } finally(onFinally) { return this.async().then(onFinally, onFinally); } async() { if (this.error) return Promise.reject(this.error); if (this.processed) return Promise.resolve(this.result); if (!this.processing) { this.processing = this.runAsync(); } return this.processing; } sync() { if (this.error) throw this.error; if (this.processed) return this.result; this.processed = true; if (this.processing) { throw this.getAsyncError(); } for (let plugin of this.plugins) { let promise = this.runOnRoot(plugin); if (isPromise(promise)) { throw this.getAsyncError(); } } this.prepareVisitors(); if (this.hasListener) { let root = this.result.root; while (!root[isClean]) { root[isClean] = true; this.walkSync(root); } if (this.listeners.OnceExit) { if (root.type === "document") { for (let subRoot of root.nodes) { this.visitSync(this.listeners.OnceExit, subRoot); } } else { this.visitSync(this.listeners.OnceExit, root); } } } return this.result; } stringify() { if (this.error) throw this.error; if (this.stringified) return this.result; this.stringified = true; this.sync(); let opts = this.result.opts; let str2 = stringify; if (opts.syntax) str2 = opts.syntax.stringify; if (opts.stringifier) str2 = opts.stringifier; if (str2.stringify) str2 = str2.stringify; let map = new MapGenerator(str2, this.result.root, this.result.opts); let data = map.generate(); this.result.css = data[0]; this.result.map = data[1]; return this.result; } walkSync(node) { node[isClean] = true; let events = getEvents(node); for (let event of events) { if (event === CHILDREN) { if (node.nodes) { node.each((child) => { if (!child[isClean]) this.walkSync(child); }); } } else { let visitors = this.listeners[event]; if (visitors) { if (this.visitSync(visitors, node.toProxy())) return; } } } } visitSync(visitors, node) { for (let [plugin, visitor] of visitors) { this.result.lastPlugin = plugin; let promise; try { promise = visitor(node, this.helpers); } catch (e) { throw this.handleError(e, node.proxyOf); } if (node.type !== "root" && node.type !== "document" && !node.parent) { return true; } if (isPromise(promise)) { throw this.getAsyncError(); } } } runOnRoot(plugin) { this.result.lastPlugin = plugin; try { if (typeof plugin === "object" && plugin.Once) { if (this.result.root.type === "document") { let roots = this.result.root.nodes.map( (root) => plugin.Once(root, this.helpers) ); if (isPromise(roots[0])) { return Promise.all(roots); } return roots; } return plugin.Once(this.result.root, this.helpers); } else if (typeof plugin === "function") { return plugin(this.result.root, this.result); } } catch (error) { throw this.handleError(error); } } getAsyncError() { throw new Error("Use process(css).then(cb) to work with async plugins"); } handleError(error, node) { let plugin = this.result.lastPlugin; try { if (node) node.addToError(error); this.error = error; if (error.name === "CssSyntaxError" && !error.plugin) { error.plugin = plugin.postcssPlugin; error.setMessage(); } else if (plugin.postcssVersion) { if (true) { let pluginName = plugin.postcssPlugin; let pluginVer = plugin.postcssVersion; let runtimeVer = this.result.processor.version; let a = pluginVer.split("."); let b = runtimeVer.split("."); if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) { console.error( "Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below." ); } } } } catch (err) { if (console && console.error) console.error(err); } return error; } async runAsync() { this.plugin = 0; for (let i = 0; i < this.plugins.length; i++) { let plugin = this.plugins[i]; let promise = this.runOnRoot(plugin); if (isPromise(promise)) { try { await promise; } catch (error) { throw this.handleError(error); } } } this.prepareVisitors(); if (this.hasListener) { let root = this.result.root; while (!root[isClean]) { root[isClean] = true; let stack = [toStack(root)]; while (stack.length > 0) { let promise = this.visitTick(stack); if (isPromise(promise)) { try { await promise; } catch (e) { let node = stack[stack.length - 1].node; throw this.handleError(e, node); } } } } if (this.listeners.OnceExit) { for (let [plugin, visitor] of this.listeners.OnceExit) { this.result.lastPlugin = plugin; try { if (root.type === "document") { let roots = root.nodes.map( (subRoot) => visitor(subRoot, this.helpers) ); await Promise.all(roots); } else { await visitor(root, this.helpers); } } catch (e) { throw this.handleError(e); } } } } this.processed = true; return this.stringify(); } prepareVisitors() { this.listeners = {}; let add = (plugin, type, cb) => { if (!this.listeners[type]) this.listeners[type] = []; this.listeners[type].push([plugin, cb]); }; for (let plugin of this.plugins) { if (typeof plugin === "object") { for (let event in plugin) { if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) { throw new Error( `Unknown event ${event} in ${plugin.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).` ); } if (!NOT_VISITORS[event]) { if (typeof plugin[event] === "object") { for (let filter in plugin[event]) { if (filter === "*") { add(plugin, event, plugin[event][filter]); } else { add( plugin, event + "-" + filter.toLowerCase(), plugin[event][filter] ); } } } else if (typeof plugin[event] === "function") { add(plugin, event, plugin[event]); } } } } } this.hasListener = Object.keys(this.listeners).length > 0; } visitTick(stack) { let visit = stack[stack.length - 1]; let { node, visitors } = visit; if (node.type !== "root" && node.type !== "document" && !node.parent) { stack.pop(); return; } if (visitors.length > 0 && visit.visitorIndex < visitors.length) { let [plugin, visitor] = visitors[visit.visitorIndex]; visit.visitorIndex += 1; if (visit.visitorIndex === visitors.length) { visit.visitors = []; visit.visitorIndex = 0; } this.result.lastPlugin = plugin; try { return visitor(node.toProxy(), this.helpers); } catch (e) { throw this.handleError(e, node); } } if (visit.iterator !== 0) { let iterator = visit.iterator; let child; while (child = node.nodes[node.indexes[iterator]]) { node.indexes[iterator] += 1; if (!child[isClean]) { child[isClean] = true; stack.push(toStack(child)); return; } } visit.iterator = 0; delete node.indexes[iterator]; } let events = visit.events; while (visit.eventIndex < events.length) { let event = events[visit.eventIndex]; visit.eventIndex += 1; if (event === CHILDREN) { if (node.nodes && node.nodes.length) { node[isClean] = true; visit.iterator = node.getIterator(); } return; } else if (this.listeners[event]) { visit.visitors = this.listeners[event]; return; } } stack.pop(); } }; LazyResult.registerPostcss = (dependant) => { postcss = dependant; }; module2.exports = LazyResult; LazyResult.default = LazyResult; Root.registerLazyResult(LazyResult); Document.registerLazyResult(LazyResult); } }); // node_modules/postcss/lib/no-work-result.js var require_no_work_result = __commonJS({ "node_modules/postcss/lib/no-work-result.js"(exports2, module2) { "use strict"; var MapGenerator = require_map_generator(); var stringify = require_stringify(); var warnOnce = require_warn_once(); var parse2 = require_parse2(); var Result = require_result(); var NoWorkResult = class { constructor(processor, css2, opts) { css2 = css2.toString(); this.stringified = false; this._processor = processor; this._css = css2; this._opts = opts; this._map = void 0; let root; let str2 = stringify; this.result = new Result(this._processor, root, this._opts); this.result.css = css2; let self2 = this; Object.defineProperty(this.result, "root", { get() { return self2.root; } }); let map = new MapGenerator(str2, root, this._opts, css2); if (map.isMap()) { let [generatedCSS, generatedMap] = map.generate(); if (generatedCSS) { this.result.css = generatedCSS; } if (generatedMap) { this.result.map = generatedMap; } } } get [Symbol.toStringTag]() { return "NoWorkResult"; } get processor() { return this.result.processor; } get opts() { return this.result.opts; } get css() { return this.result.css; } get content() { return this.result.css; } get map() { return this.result.map; } get root() { if (this._root) { return this._root; } let root; let parser = parse2; try { root = parser(this._css, this._opts); } catch (error) { this.error = error; } if (this.error) { throw this.error; } else { this._root = root; return root; } } get messages() { return []; } warnings() { return []; } toString() { return this._css; } then(onFulfilled, onRejected) { if (true) { if (!("from" in this._opts)) { warnOnce( "Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning." ); } } return this.async().then(onFulfilled, onRejected); } catch(onRejected) { return this.async().catch(onRejected); } finally(onFinally) { return this.async().then(onFinally, onFinally); } async() { if (this.error) return Promise.reject(this.error); return Promise.resolve(this.result); } sync() { if (this.error) throw this.error; return this.result; } }; module2.exports = NoWorkResult; NoWorkResult.default = NoWorkResult; } }); // node_modules/postcss/lib/processor.js var require_processor = __commonJS({ "node_modules/postcss/lib/processor.js"(exports2, module2) { "use strict"; var NoWorkResult = require_no_work_result(); var LazyResult = require_lazy_result(); var Document = require_document(); var Root = require_root(); var Processor = class { constructor(plugins = []) { this.version = "8.4.21"; this.plugins = this.normalize(plugins); } use(plugin) { this.plugins = this.plugins.concat(this.normalize([plugin])); return this; } process(css2, opts = {}) { if (this.plugins.length === 0 && typeof opts.parser === "undefined" && typeof opts.stringifier === "undefined" && typeof opts.syntax === "undefined") { return new NoWorkResult(this, css2, opts); } else { return new LazyResult(this, css2, opts); } } normalize(plugins) { let normalized = []; for (let i of plugins) { if (i.postcss === true) { i = i(); } else if (i.postcss) { i = i.postcss; } if (typeof i === "object" && Array.isArray(i.plugins)) { normalized = normalized.concat(i.plugins); } else if (typeof i === "object" && i.postcssPlugin) { normalized.push(i); } else if (typeof i === "function") { normalized.push(i); } else if (typeof i === "object" && (i.parse || i.stringify)) { if (true) { throw new Error( "PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation." ); } } else { throw new Error(i + " is not a PostCSS plugin"); } } return normalized; } }; module2.exports = Processor; Processor.default = Processor; Root.registerProcessor(Processor); Document.registerProcessor(Processor); } }); // node_modules/postcss/lib/fromJSON.js var require_fromJSON = __commonJS({ "node_modules/postcss/lib/fromJSON.js"(exports2, module2) { "use strict"; var Declaration = require_declaration(); var PreviousMap = require_previous_map(); var Comment = require_comment(); var AtRule = require_at_rule(); var Input = require_input(); var Root = require_root(); var Rule = require_rule(); function fromJSON(json, inputs) { if (Array.isArray(json)) return json.map((n) => fromJSON(n)); let { inputs: ownInputs, ...defaults } = json; if (ownInputs) { inputs = []; for (let input of ownInputs) { let inputHydrated = { ...input, __proto__: Input.prototype }; if (inputHydrated.map) { inputHydrated.map = { ...inputHydrated.map, __proto__: PreviousMap.prototype }; } inputs.push(inputHydrated); } } if (defaults.nodes) { defaults.nodes = json.nodes.map((n) => fromJSON(n, inputs)); } if (defaults.source) { let { inputId, ...source } = defaults.source; defaults.source = source; if (inputId != null) { defaults.source.input = inputs[inputId]; } } if (defaults.type === "root") { return new Root(defaults); } else if (defaults.type === "decl") { return new Declaration(defaults); } else if (defaults.type === "rule") { return new Rule(defaults); } else if (defaults.type === "comment") { return new Comment(defaults); } else if (defaults.type === "atrule") { return new AtRule(defaults); } else { throw new Error("Unknown node type: " + json.type); } } module2.exports = fromJSON; fromJSON.default = fromJSON; } }); // node_modules/postcss/lib/postcss.js var require_postcss = __commonJS({ "node_modules/postcss/lib/postcss.js"(exports2, module2) { "use strict"; var CssSyntaxError = require_css_syntax_error(); var Declaration = require_declaration(); var LazyResult = require_lazy_result(); var Container = require_container(); var Processor = require_processor(); var stringify = require_stringify(); var fromJSON = require_fromJSON(); var Document = require_document(); var Warning = require_warning(); var Comment = require_comment(); var AtRule = require_at_rule(); var Result = require_result(); var Input = require_input(); var parse2 = require_parse2(); var list = require_list2(); var Rule = require_rule(); var Root = require_root(); var Node2 = require_node(); function postcss(...plugins) { if (plugins.length === 1 && Array.isArray(plugins[0])) { plugins = plugins[0]; } return new Processor(plugins); } postcss.plugin = function plugin(name, initializer) { let warningPrinted = false; function creator(...args) { if (console && console.warn && !warningPrinted) { warningPrinted = true; console.warn( name + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration" ); if (process.env.LANG && process.env.LANG.startsWith("cn")) { console.warn( name + ": \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:\nhttps://www.w3ctech.com/topic/2226" ); } } let transformer = initializer(...args); transformer.postcssPlugin = name; transformer.postcssVersion = new Processor().version; return transformer; } let cache; Object.defineProperty(creator, "postcss", { get() { if (!cache) cache = creator(); return cache; } }); creator.process = function(css2, processOpts, pluginOpts) { return postcss([creator(pluginOpts)]).process(css2, processOpts); }; return creator; }; postcss.stringify = stringify; postcss.parse = parse2; postcss.fromJSON = fromJSON; postcss.list = list; postcss.comment = (defaults) => new Comment(defaults); postcss.atRule = (defaults) => new AtRule(defaults); postcss.decl = (defaults) => new Declaration(defaults); postcss.rule = (defaults) => new Rule(defaults); postcss.root = (defaults) => new Root(defaults); postcss.document = (defaults) => new Document(defaults); postcss.CssSyntaxError = CssSyntaxError; postcss.Declaration = Declaration; postcss.Container = Container; postcss.Processor = Processor; postcss.Document = Document; postcss.Comment = Comment; postcss.Warning = Warning; postcss.AtRule = AtRule; postcss.Result = Result; postcss.Input = Input; postcss.Rule = Rule; postcss.Root = Root; postcss.Node = Node2; LazyResult.registerPostcss(postcss); module2.exports = postcss; postcss.default = postcss; } }); // node_modules/@marp-team/marpit/lib/helpers/inline_style.js var require_inline_style = __commonJS({ "node_modules/@marp-team/marpit/lib/helpers/inline_style.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; var _postcss = _interopRequireDefault(require_postcss()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var InlineStyle = class { /** * Create an InlineStyle instance. * * @function constructor * @param {Object|String|InlineStyle} [initialDecls] The initial declarations. */ constructor(initialDecls) { this.decls = {}; if (initialDecls) { if (initialDecls instanceof InlineStyle || typeof initialDecls === "string") { const root = _postcss.default.parse(initialDecls.toString(), { from: void 0 }); root.each((node) => { if (node.type === "decl") this.decls[node.prop] = node.value; }); } else { this.decls = { ...initialDecls }; } } } /** * Delete declaration. * * @param {string} prop A property name of declaration. * @returns {InlineStyle} Returns myself for chaining methods. */ delete(prop) { delete this.decls[prop]; return this; } /** * Set declaration. * * @param {string} prop A property name of declaration. * @param {string} value A value of declaration. * @returns {InlineStyle} Returns myself for chaining methods. */ set(prop, value) { this.decls[prop] = value; return this; } /** * Build a string of declarations for the inline style. * * The unexpected declarations will strip to prevent a style injection. */ toString() { let built = ""; for (const prop of Object.keys(this.decls)) { let parsed; try { parsed = _postcss.default.parse(`${prop}:${this.decls[prop]}`, { from: void 0 }); } catch (e) { } if (parsed) { parsed.each((node) => { if (node.type !== "decl" || node.prop !== prop) node.remove(); }); built += `${parsed.toString()};`; } } return built; } }; exports2.default = InlineStyle; } }); // node_modules/@marp-team/marpit/lib/helpers/wrap_tokens.js var require_wrap_tokens = __commonJS({ "node_modules/@marp-team/marpit/lib/helpers/wrap_tokens.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; exports2.wrapTokens = wrapTokens; function wrapTokens(Token, type, container, tokens = []) { const { tag } = container; for (const t of tokens) t.level += 1; const open = new Token(`${type}_open`, tag, 1); const close = new Token(`${type}_close`, tag, -1); Object.assign(open, { ...container.open || {} }); Object.assign(close, { ...container.close || {} }); for (const attr of Object.keys(container)) { if (!["open", "close", "tag"].includes(attr) && container[attr] != null) open.attrSet(attr, container[attr]); } return [open, ...tokens, close]; } var _default = wrapTokens; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/background_image/advanced.js var require_advanced = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/background_image/advanced.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.advancedBackground = void 0; var _inline_style = _interopRequireDefault(require_inline_style()); var _wrap_tokens = require_wrap_tokens(); var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _advancedBackground(md) { md.core.ruler.after("marpit_directives_apply", "marpit_advanced_background", (state) => { let current; const newTokens = []; for (const t of state.tokens) { if (t.type === "marpit_inline_svg_content_open" && t.meta && t.meta.marpitBackground) { current = t; const { height, images, open, width } = t.meta.marpitBackground; open.attrSet("data-marpit-advanced-background", "content"); const direction = t.meta.marpitBackground.direction || "horizontal"; const splitSide = t.meta.marpitBackground.split; if (splitSide) { open.attrSet("data-marpit-advanced-background-split", splitSide); const splitBgSize = t.meta.marpitBackground.splitSize || "50%"; t.attrSet("width", `${100 - Number.parseFloat(splitBgSize.slice(0, -1))}%`); if (splitSide === "left") t.attrSet("x", splitBgSize); const style2 = new _inline_style.default(open.attrGet("style")); style2.set("--marpit-advanced-background-split", splitBgSize); open.attrSet("style", style2.toString()); } newTokens.push(...(0, _wrap_tokens.wrapTokens)(state.Token, "marpit_advanced_background_foreign_object", { tag: "foreignObject", width, height }, (0, _wrap_tokens.wrapTokens)(state.Token, "marpit_advanced_background_section", { ...open.attrs.reduce((o, [k, v]) => ({ ...o, [k]: v }), {}), tag: "section", id: void 0, "data-marpit-advanced-background": "background" }, (0, _wrap_tokens.wrapTokens)(state.Token, "marpit_advanced_background_image_container", { tag: "div", "data-marpit-advanced-background-container": true, "data-marpit-advanced-background-direction": direction }, (() => { const imageTokens = []; for (const img of images) { const style2 = new _inline_style.default({ "background-image": `url("${img.url}")` }); if (img.size) style2.set("background-size", img.size); if (img.filter) style2.set("filter", img.filter); imageTokens.push(...(0, _wrap_tokens.wrapTokens)(state.Token, "marpit_advanced_background_image", { tag: "figure", style: style2.toString() })); } return imageTokens; })()))), t); } else if (current && t.type === "marpit_inline_svg_content_close") { const { open, height, width } = current.meta.marpitBackground; const style2 = new _inline_style.default(); if (open.meta && open.meta.marpitDirectives && open.meta.marpitDirectives.color) style2.set("color", open.meta.marpitDirectives.color); newTokens.push(t, ...(0, _wrap_tokens.wrapTokens)(state.Token, "marpit_advanced_background_foreign_object", { tag: "foreignObject", width, height, "data-marpit-advanced-background": "pseudo" }, (0, _wrap_tokens.wrapTokens)(state.Token, "marpit_advanced_pseudo_section", { ...open.attrs.reduce((o, [k, v]) => ({ ...o, [k]: v }), {}), tag: "section", id: void 0, style: style2.toString(), "data-marpit-advanced-background": "pseudo" }))); current = void 0; } else { newTokens.push(t); } } state.tokens = newTokens; }); } var advancedBackground = (0, _plugin.default)(_advancedBackground); exports2.advancedBackground = advancedBackground; var _default = advancedBackground; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/background_image/apply.js var require_apply = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/background_image/apply.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.backgroundImageApply = void 0; var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _backgroundImageApply(md) { md.core.ruler.after("marpit_inline_svg", "marpit_apply_background_image", ({ inlineMode, tokens }) => { if (inlineMode) return; let current = {}; for (const tb of tokens) { if (tb.type === "marpit_slide_open") current.open = tb; if (tb.type === "marpit_inline_svg_content_open") current.svgContent = tb; if (tb.type === "marpit_slide_close") { if (current.images && current.images.length > 0) { if (current.svgContent) { current.svgContent.meta = { ...current.svgContent.meta || {}, marpitBackground: { direction: current.direction, height: current.svgContent.attrGet("height"), images: current.images, open: current.open, split: current.split, splitSize: current.splitSize, width: current.svgContent.attrGet("width") } }; } else { const img = current.images[current.images.length - 1]; current.open.meta.marpitDirectives = { ...current.open.meta.marpitDirectives || {}, backgroundImage: `url("${img.url}")` }; if (img.size) current.open.meta.marpitDirectives.backgroundSize = img.size; } } current = {}; } if (current.open && tb.type === "inline") for (const t of tb.children) { if (t.type === "image") { const { background, backgroundDirection, backgroundSize, backgroundSplit, backgroundSplitSize, color, filter, height, size, url: url2, width } = t.meta.marpitImage; if (background && !url2.match(/^\s*$/)) { if (color) { current.open.meta.marpitDirectives = { ...current.open.meta.marpitDirectives || {}, backgroundColor: color }; } else { current.images = [...current.images || [], { filter, height, size: (() => { const s = size || backgroundSize || void 0; return !["contain", "cover"].includes(s) && (width || height) ? `${width || s || "auto"} ${height || s || "auto"}` : s; })(), url: url2, width }]; } } if (backgroundDirection) current.direction = backgroundDirection; if (backgroundSplit) current.split = backgroundSplit; if (backgroundSplitSize) current.splitSize = backgroundSplitSize; } } } }); } var backgroundImageApply = (0, _plugin.default)(_backgroundImageApply); exports2.backgroundImageApply = backgroundImageApply; var _default = backgroundImageApply; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/background_image/parse.js var require_parse3 = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/background_image/parse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.backgroundImageParse = void 0; var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var bgSizeKeywords = { auto: "auto", contain: "contain", cover: "cover", fit: "contain" }; var splitSizeMatcher = /^(left|right)(?::((?:\d*\.)?\d+%))?$/; function _backgroundImageParse(md) { md.inline.ruler2.after("marpit_parse_image", "marpit_background_image", ({ tokens }) => { for (const t of tokens) { if (t.type === "image") { const { marpitImage } = t.meta; if (marpitImage.options.some((v) => !v.consumed && v.content === "bg")) { marpitImage.background = true; t.hidden = true; for (const opt of marpitImage.options) { if (opt.consumed) continue; let consumed = false; if (opt.content === "bg") consumed = true; if (bgSizeKeywords[opt.content]) { marpitImage.backgroundSize = bgSizeKeywords[opt.content]; consumed = true; } const matched = opt.content.match(splitSizeMatcher); if (matched) { const [, splitSide, splitSize] = matched; marpitImage.backgroundSplit = splitSide; marpitImage.backgroundSplitSize = splitSize; consumed = true; } if (opt.content === "vertical" || opt.content === "horizontal") { marpitImage.backgroundDirection = opt.content; consumed = true; } if (consumed) opt.consumed = true; } } } } }); } var backgroundImageParse = (0, _plugin.default)(_backgroundImageParse); exports2.backgroundImageParse = backgroundImageParse; var _default = backgroundImageParse; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/background_image.js var require_background_image = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/background_image.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.backgroundImage = void 0; var _plugin = _interopRequireDefault(require_plugin()); var _advanced = _interopRequireDefault(require_advanced()); var _apply = _interopRequireDefault(require_apply()); var _parse = _interopRequireDefault(require_parse3()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _backgroundImage(md) { (0, _parse.default)(md); (0, _apply.default)(md); (0, _advanced.default)(md); } var backgroundImage = (0, _plugin.default)(_backgroundImage); exports2.backgroundImage = backgroundImage; var _default = backgroundImage; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/collect.js var require_collect = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/collect.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.collect = void 0; var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _collect(md) { const { marpit } = md; md.core.ruler.push("marpit_collect", (state) => { if (state.inlineMode) return; marpit.lastComments = []; marpit.lastSlideTokens = []; let currentPage; let pageIdx = -1; const collectComment = (token) => { if (currentPage >= 0 && !(token.meta && token.meta.marpitCommentParsed !== void 0)) marpit.lastComments[currentPage].push(token.content); }; const collectable = () => currentPage >= 0 && marpit.lastSlideTokens[currentPage] !== void 0; for (const token of state.tokens) { if (token.meta && token.meta.marpitSlideElement === 1) { pageIdx += 1; currentPage = pageIdx; if (marpit.lastSlideTokens[currentPage] === void 0) { marpit.lastSlideTokens[currentPage] = [token]; marpit.lastComments[currentPage] = []; } } else if (token.meta && token.meta.marpitSlideElement === -1) { if (collectable()) marpit.lastSlideTokens[currentPage].push(token); currentPage = void 0; } else { if (collectable()) marpit.lastSlideTokens[currentPage].push(token); if (token.type === "marpit_comment") { collectComment(token); } else if (token.type === "inline") { for (const t of token.children) if (t.type === "marpit_comment") collectComment(t); } } } }); } var collect = (0, _plugin.default)(_collect); exports2.collect = collect; var _default = collect; exports2.default = _default; } }); // node_modules/js-yaml/lib/common.js var require_common = __commonJS({ "node_modules/js-yaml/lib/common.js"(exports2, module2) { "use strict"; function isNothing(subject) { return typeof subject === "undefined" || subject === null; } function isObject(subject) { return typeof subject === "object" && subject !== null; } function toArray(sequence) { if (Array.isArray(sequence)) return sequence; else if (isNothing(sequence)) return []; return [sequence]; } function extend(target, source) { var index, length, key, sourceKeys; if (source) { sourceKeys = Object.keys(source); for (index = 0, length = sourceKeys.length; index < length; index += 1) { key = sourceKeys[index]; target[key] = source[key]; } } return target; } function repeat(string, count) { var result = "", cycle; for (cycle = 0; cycle < count; cycle += 1) { result += string; } return result; } function isNegativeZero(number) { return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; } module2.exports.isNothing = isNothing; module2.exports.isObject = isObject; module2.exports.toArray = toArray; module2.exports.repeat = repeat; module2.exports.isNegativeZero = isNegativeZero; module2.exports.extend = extend; } }); // node_modules/js-yaml/lib/exception.js var require_exception = __commonJS({ "node_modules/js-yaml/lib/exception.js"(exports2, module2) { "use strict"; function formatError(exception, compact) { var where = "", message = exception.reason || "(unknown reason)"; if (!exception.mark) return message; if (exception.mark.name) { where += 'in "' + exception.mark.name + '" '; } where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")"; if (!compact && exception.mark.snippet) { where += "\n\n" + exception.mark.snippet; } return message + " " + where; } function YAMLException(reason, mark) { Error.call(this); this.name = "YAMLException"; this.reason = reason; this.mark = mark; this.message = formatError(this, false); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } else { this.stack = new Error().stack || ""; } } YAMLException.prototype = Object.create(Error.prototype); YAMLException.prototype.constructor = YAMLException; YAMLException.prototype.toString = function toString(compact) { return this.name + ": " + formatError(this, compact); }; module2.exports = YAMLException; } }); // node_modules/js-yaml/lib/snippet.js var require_snippet = __commonJS({ "node_modules/js-yaml/lib/snippet.js"(exports2, module2) { "use strict"; var common = require_common(); function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { var head = ""; var tail = ""; var maxHalfLength = Math.floor(maxLineLength / 2) - 1; if (position - lineStart > maxHalfLength) { head = " ... "; lineStart = position - maxHalfLength + head.length; } if (lineEnd - position > maxHalfLength) { tail = " ..."; lineEnd = position + maxHalfLength - tail.length; } return { str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, pos: position - lineStart + head.length // relative position }; } function padStart(string, max) { return common.repeat(" ", max - string.length) + string; } function makeSnippet(mark, options2) { options2 = Object.create(options2 || null); if (!mark.buffer) return null; if (!options2.maxLength) options2.maxLength = 79; if (typeof options2.indent !== "number") options2.indent = 1; if (typeof options2.linesBefore !== "number") options2.linesBefore = 3; if (typeof options2.linesAfter !== "number") options2.linesAfter = 2; var re = /\r?\n|\r|\0/g; var lineStarts = [0]; var lineEnds = []; var match; var foundLineNo = -1; while (match = re.exec(mark.buffer)) { lineEnds.push(match.index); lineStarts.push(match.index + match[0].length); if (mark.position <= match.index && foundLineNo < 0) { foundLineNo = lineStarts.length - 2; } } if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; var result = "", i, line; var lineNoLength = Math.min(mark.line + options2.linesAfter, lineEnds.length).toString().length; var maxLineLength = options2.maxLength - (options2.indent + lineNoLength + 3); for (i = 1; i <= options2.linesBefore; i++) { if (foundLineNo - i < 0) break; line = getLine( mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength ); result = common.repeat(" ", options2.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; } line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); result += common.repeat(" ", options2.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; result += common.repeat("-", options2.indent + lineNoLength + 3 + line.pos) + "^\n"; for (i = 1; i <= options2.linesAfter; i++) { if (foundLineNo + i >= lineEnds.length) break; line = getLine( mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength ); result += common.repeat(" ", options2.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; } return result.replace(/\n$/, ""); } module2.exports = makeSnippet; } }); // node_modules/js-yaml/lib/type.js var require_type = __commonJS({ "node_modules/js-yaml/lib/type.js"(exports2, module2) { "use strict"; var YAMLException = require_exception(); var TYPE_CONSTRUCTOR_OPTIONS = [ "kind", "multi", "resolve", "construct", "instanceOf", "predicate", "represent", "representName", "defaultStyle", "styleAliases" ]; var YAML_NODE_KINDS = [ "scalar", "sequence", "mapping" ]; function compileStyleAliases(map) { var result = {}; if (map !== null) { Object.keys(map).forEach(function(style2) { map[style2].forEach(function(alias) { result[String(alias)] = style2; }); }); } return result; } function Type(tag, options2) { options2 = options2 || {}; Object.keys(options2).forEach(function(name) { if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); } }); this.options = options2; this.tag = tag; this.kind = options2["kind"] || null; this.resolve = options2["resolve"] || function() { return true; }; this.construct = options2["construct"] || function(data) { return data; }; this.instanceOf = options2["instanceOf"] || null; this.predicate = options2["predicate"] || null; this.represent = options2["represent"] || null; this.representName = options2["representName"] || null; this.defaultStyle = options2["defaultStyle"] || null; this.multi = options2["multi"] || false; this.styleAliases = compileStyleAliases(options2["styleAliases"] || null); if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); } } module2.exports = Type; } }); // node_modules/js-yaml/lib/schema.js var require_schema = __commonJS({ "node_modules/js-yaml/lib/schema.js"(exports2, module2) { "use strict"; var YAMLException = require_exception(); var Type = require_type(); function compileList(schema, name) { var result = []; schema[name].forEach(function(currentType) { var newIndex = result.length; result.forEach(function(previousType, previousIndex) { if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { newIndex = previousIndex; } }); result[newIndex] = currentType; }); return result; } function compileMap() { var result = { scalar: {}, sequence: {}, mapping: {}, fallback: {}, multi: { scalar: [], sequence: [], mapping: [], fallback: [] } }, index, length; function collectType(type) { if (type.multi) { result.multi[type.kind].push(type); result.multi["fallback"].push(type); } else { result[type.kind][type.tag] = result["fallback"][type.tag] = type; } } for (index = 0, length = arguments.length; index < length; index += 1) { arguments[index].forEach(collectType); } return result; } function Schema(definition) { return this.extend(definition); } Schema.prototype.extend = function extend(definition) { var implicit = []; var explicit = []; if (definition instanceof Type) { explicit.push(definition); } else if (Array.isArray(definition)) { explicit = explicit.concat(definition); } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { if (definition.implicit) implicit = implicit.concat(definition.implicit); if (definition.explicit) explicit = explicit.concat(definition.explicit); } else { throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); } implicit.forEach(function(type) { if (!(type instanceof Type)) { throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); } if (type.loadKind && type.loadKind !== "scalar") { throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); } if (type.multi) { throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); } }); explicit.forEach(function(type) { if (!(type instanceof Type)) { throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); } }); var result = Object.create(Schema.prototype); result.implicit = (this.implicit || []).concat(implicit); result.explicit = (this.explicit || []).concat(explicit); result.compiledImplicit = compileList(result, "implicit"); result.compiledExplicit = compileList(result, "explicit"); result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); return result; }; module2.exports = Schema; } }); // node_modules/js-yaml/lib/type/str.js var require_str = __commonJS({ "node_modules/js-yaml/lib/type/str.js"(exports2, module2) { "use strict"; var Type = require_type(); module2.exports = new Type("tag:yaml.org,2002:str", { kind: "scalar", construct: function(data) { return data !== null ? data : ""; } }); } }); // node_modules/js-yaml/lib/type/seq.js var require_seq = __commonJS({ "node_modules/js-yaml/lib/type/seq.js"(exports2, module2) { "use strict"; var Type = require_type(); module2.exports = new Type("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(data) { return data !== null ? data : []; } }); } }); // node_modules/js-yaml/lib/type/map.js var require_map = __commonJS({ "node_modules/js-yaml/lib/type/map.js"(exports2, module2) { "use strict"; var Type = require_type(); module2.exports = new Type("tag:yaml.org,2002:map", { kind: "mapping", construct: function(data) { return data !== null ? data : {}; } }); } }); // node_modules/js-yaml/lib/schema/failsafe.js var require_failsafe = __commonJS({ "node_modules/js-yaml/lib/schema/failsafe.js"(exports2, module2) { "use strict"; var Schema = require_schema(); module2.exports = new Schema({ explicit: [ require_str(), require_seq(), require_map() ] }); } }); // node_modules/js-yaml/lib/type/null.js var require_null = __commonJS({ "node_modules/js-yaml/lib/type/null.js"(exports2, module2) { "use strict"; var Type = require_type(); function resolveYamlNull(data) { if (data === null) return true; var max = data.length; return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); } function constructYamlNull() { return null; } function isNull(object) { return object === null; } module2.exports = new Type("tag:yaml.org,2002:null", { kind: "scalar", resolve: resolveYamlNull, construct: constructYamlNull, predicate: isNull, represent: { canonical: function() { return "~"; }, lowercase: function() { return "null"; }, uppercase: function() { return "NULL"; }, camelcase: function() { return "Null"; }, empty: function() { return ""; } }, defaultStyle: "lowercase" }); } }); // node_modules/js-yaml/lib/type/bool.js var require_bool = __commonJS({ "node_modules/js-yaml/lib/type/bool.js"(exports2, module2) { "use strict"; var Type = require_type(); function resolveYamlBoolean(data) { if (data === null) return false; var max = data.length; return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); } function constructYamlBoolean(data) { return data === "true" || data === "True" || data === "TRUE"; } function isBoolean(object) { return Object.prototype.toString.call(object) === "[object Boolean]"; } module2.exports = new Type("tag:yaml.org,2002:bool", { kind: "scalar", resolve: resolveYamlBoolean, construct: constructYamlBoolean, predicate: isBoolean, represent: { lowercase: function(object) { return object ? "true" : "false"; }, uppercase: function(object) { return object ? "TRUE" : "FALSE"; }, camelcase: function(object) { return object ? "True" : "False"; } }, defaultStyle: "lowercase" }); } }); // node_modules/js-yaml/lib/type/int.js var require_int = __commonJS({ "node_modules/js-yaml/lib/type/int.js"(exports2, module2) { "use strict"; var common = require_common(); var Type = require_type(); function isHexCode(c) { return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; } function isOctCode(c) { return 48 <= c && c <= 55; } function isDecCode(c) { return 48 <= c && c <= 57; } function resolveYamlInteger(data) { if (data === null) return false; var max = data.length, index = 0, hasDigits = false, ch; if (!max) return false; ch = data[index]; if (ch === "-" || ch === "+") { ch = data[++index]; } if (ch === "0") { if (index + 1 === max) return true; ch = data[++index]; if (ch === "b") { index++; for (; index < max; index++) { ch = data[index]; if (ch === "_") continue; if (ch !== "0" && ch !== "1") return false; hasDigits = true; } return hasDigits && ch !== "_"; } if (ch === "x") { index++; for (; index < max; index++) { ch = data[index]; if (ch === "_") continue; if (!isHexCode(data.charCodeAt(index))) return false; hasDigits = true; } return hasDigits && ch !== "_"; } if (ch === "o") { index++; for (; index < max; index++) { ch = data[index]; if (ch === "_") continue; if (!isOctCode(data.charCodeAt(index))) return false; hasDigits = true; } return hasDigits && ch !== "_"; } } if (ch === "_") return false; for (; index < max; index++) { ch = data[index]; if (ch === "_") continue; if (!isDecCode(data.charCodeAt(index))) { return false; } hasDigits = true; } if (!hasDigits || ch === "_") return false; return true; } function constructYamlInteger(data) { var value = data, sign = 1, ch; if (value.indexOf("_") !== -1) { value = value.replace(/_/g, ""); } ch = value[0]; if (ch === "-" || ch === "+") { if (ch === "-") sign = -1; value = value.slice(1); ch = value[0]; } if (value === "0") return 0; if (ch === "0") { if (value[1] === "b") return sign * parseInt(value.slice(2), 2); if (value[1] === "x") return sign * parseInt(value.slice(2), 16); if (value[1] === "o") return sign * parseInt(value.slice(2), 8); } return sign * parseInt(value, 10); } function isInteger(object) { return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object)); } module2.exports = new Type("tag:yaml.org,2002:int", { kind: "scalar", resolve: resolveYamlInteger, construct: constructYamlInteger, predicate: isInteger, represent: { binary: function(obj) { return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); }, octal: function(obj) { return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); }, decimal: function(obj) { return obj.toString(10); }, /* eslint-disable max-len */ hexadecimal: function(obj) { return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); } }, defaultStyle: "decimal", styleAliases: { binary: [2, "bin"], octal: [8, "oct"], decimal: [10, "dec"], hexadecimal: [16, "hex"] } }); } }); // node_modules/js-yaml/lib/type/float.js var require_float = __commonJS({ "node_modules/js-yaml/lib/type/float.js"(exports2, module2) { "use strict"; var common = require_common(); var Type = require_type(); var YAML_FLOAT_PATTERN = new RegExp( // 2.5e4, 2.5 and integers "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" ); function resolveYamlFloat(data) { if (data === null) return false; if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` // Probably should update regexp & check speed data[data.length - 1] === "_") { return false; } return true; } function constructYamlFloat(data) { var value, sign; value = data.replace(/_/g, "").toLowerCase(); sign = value[0] === "-" ? -1 : 1; if ("+-".indexOf(value[0]) >= 0) { value = value.slice(1); } if (value === ".inf") { return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; } else if (value === ".nan") { return NaN; } return sign * parseFloat(value, 10); } var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; function representYamlFloat(object, style2) { var res; if (isNaN(object)) { switch (style2) { case "lowercase": return ".nan"; case "uppercase": return ".NAN"; case "camelcase": return ".NaN"; } } else if (Number.POSITIVE_INFINITY === object) { switch (style2) { case "lowercase": return ".inf"; case "uppercase": return ".INF"; case "camelcase": return ".Inf"; } } else if (Number.NEGATIVE_INFINITY === object) { switch (style2) { case "lowercase": return "-.inf"; case "uppercase": return "-.INF"; case "camelcase": return "-.Inf"; } } else if (common.isNegativeZero(object)) { return "-0.0"; } res = object.toString(10); return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; } function isFloat(object) { return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object)); } module2.exports = new Type("tag:yaml.org,2002:float", { kind: "scalar", resolve: resolveYamlFloat, construct: constructYamlFloat, predicate: isFloat, represent: representYamlFloat, defaultStyle: "lowercase" }); } }); // node_modules/js-yaml/lib/schema/json.js var require_json = __commonJS({ "node_modules/js-yaml/lib/schema/json.js"(exports2, module2) { "use strict"; module2.exports = require_failsafe().extend({ implicit: [ require_null(), require_bool(), require_int(), require_float() ] }); } }); // node_modules/js-yaml/lib/schema/core.js var require_core = __commonJS({ "node_modules/js-yaml/lib/schema/core.js"(exports2, module2) { "use strict"; module2.exports = require_json(); } }); // node_modules/js-yaml/lib/type/timestamp.js var require_timestamp = __commonJS({ "node_modules/js-yaml/lib/type/timestamp.js"(exports2, module2) { "use strict"; var Type = require_type(); var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); var YAML_TIMESTAMP_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" ); function resolveYamlTimestamp(data) { if (data === null) return false; if (YAML_DATE_REGEXP.exec(data) !== null) return true; if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; return false; } function constructYamlTimestamp(data) { var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; match = YAML_DATE_REGEXP.exec(data); if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); if (match === null) throw new Error("Date resolve error"); year = +match[1]; month = +match[2] - 1; day = +match[3]; if (!match[4]) { return new Date(Date.UTC(year, month, day)); } hour = +match[4]; minute = +match[5]; second = +match[6]; if (match[7]) { fraction = match[7].slice(0, 3); while (fraction.length < 3) { fraction += "0"; } fraction = +fraction; } if (match[9]) { tz_hour = +match[10]; tz_minute = +(match[11] || 0); delta = (tz_hour * 60 + tz_minute) * 6e4; if (match[9] === "-") delta = -delta; } date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); if (delta) date.setTime(date.getTime() - delta); return date; } function representYamlTimestamp(object) { return object.toISOString(); } module2.exports = new Type("tag:yaml.org,2002:timestamp", { kind: "scalar", resolve: resolveYamlTimestamp, construct: constructYamlTimestamp, instanceOf: Date, represent: representYamlTimestamp }); } }); // node_modules/js-yaml/lib/type/merge.js var require_merge = __commonJS({ "node_modules/js-yaml/lib/type/merge.js"(exports2, module2) { "use strict"; var Type = require_type(); function resolveYamlMerge(data) { return data === "<<" || data === null; } module2.exports = new Type("tag:yaml.org,2002:merge", { kind: "scalar", resolve: resolveYamlMerge }); } }); // node_modules/js-yaml/lib/type/binary.js var require_binary = __commonJS({ "node_modules/js-yaml/lib/type/binary.js"(exports2, module2) { "use strict"; var Type = require_type(); var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; function resolveYamlBinary(data) { if (data === null) return false; var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; for (idx = 0; idx < max; idx++) { code = map.indexOf(data.charAt(idx)); if (code > 64) continue; if (code < 0) return false; bitlen += 6; } return bitlen % 8 === 0; } function constructYamlBinary(data) { var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = []; for (idx = 0; idx < max; idx++) { if (idx % 4 === 0 && idx) { result.push(bits >> 16 & 255); result.push(bits >> 8 & 255); result.push(bits & 255); } bits = bits << 6 | map.indexOf(input.charAt(idx)); } tailbits = max % 4 * 6; if (tailbits === 0) { result.push(bits >> 16 & 255); result.push(bits >> 8 & 255); result.push(bits & 255); } else if (tailbits === 18) { result.push(bits >> 10 & 255); result.push(bits >> 2 & 255); } else if (tailbits === 12) { result.push(bits >> 4 & 255); } return new Uint8Array(result); } function representYamlBinary(object) { var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP; for (idx = 0; idx < max; idx++) { if (idx % 3 === 0 && idx) { result += map[bits >> 18 & 63]; result += map[bits >> 12 & 63]; result += map[bits >> 6 & 63]; result += map[bits & 63]; } bits = (bits << 8) + object[idx]; } tail = max % 3; if (tail === 0) { result += map[bits >> 18 & 63]; result += map[bits >> 12 & 63]; result += map[bits >> 6 & 63]; result += map[bits & 63]; } else if (tail === 2) { result += map[bits >> 10 & 63]; result += map[bits >> 4 & 63]; result += map[bits << 2 & 63]; result += map[64]; } else if (tail === 1) { result += map[bits >> 2 & 63]; result += map[bits << 4 & 63]; result += map[64]; result += map[64]; } return result; } function isBinary(obj) { return Object.prototype.toString.call(obj) === "[object Uint8Array]"; } module2.exports = new Type("tag:yaml.org,2002:binary", { kind: "scalar", resolve: resolveYamlBinary, construct: constructYamlBinary, predicate: isBinary, represent: representYamlBinary }); } }); // node_modules/js-yaml/lib/type/omap.js var require_omap = __commonJS({ "node_modules/js-yaml/lib/type/omap.js"(exports2, module2) { "use strict"; var Type = require_type(); var _hasOwnProperty = Object.prototype.hasOwnProperty; var _toString = Object.prototype.toString; function resolveYamlOmap(data) { if (data === null) return true; var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; for (index = 0, length = object.length; index < length; index += 1) { pair = object[index]; pairHasKey = false; if (_toString.call(pair) !== "[object Object]") return false; for (pairKey in pair) { if (_hasOwnProperty.call(pair, pairKey)) { if (!pairHasKey) pairHasKey = true; else return false; } } if (!pairHasKey) return false; if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); else return false; } return true; } function constructYamlOmap(data) { return data !== null ? data : []; } module2.exports = new Type("tag:yaml.org,2002:omap", { kind: "sequence", resolve: resolveYamlOmap, construct: constructYamlOmap }); } }); // node_modules/js-yaml/lib/type/pairs.js var require_pairs = __commonJS({ "node_modules/js-yaml/lib/type/pairs.js"(exports2, module2) { "use strict"; var Type = require_type(); var _toString = Object.prototype.toString; function resolveYamlPairs(data) { if (data === null) return true; var index, length, pair, keys, result, object = data; result = new Array(object.length); for (index = 0, length = object.length; index < length; index += 1) { pair = object[index]; if (_toString.call(pair) !== "[object Object]") return false; keys = Object.keys(pair); if (keys.length !== 1) return false; result[index] = [keys[0], pair[keys[0]]]; } return true; } function constructYamlPairs(data) { if (data === null) return []; var index, length, pair, keys, result, object = data; result = new Array(object.length); for (index = 0, length = object.length; index < length; index += 1) { pair = object[index]; keys = Object.keys(pair); result[index] = [keys[0], pair[keys[0]]]; } return result; } module2.exports = new Type("tag:yaml.org,2002:pairs", { kind: "sequence", resolve: resolveYamlPairs, construct: constructYamlPairs }); } }); // node_modules/js-yaml/lib/type/set.js var require_set = __commonJS({ "node_modules/js-yaml/lib/type/set.js"(exports2, module2) { "use strict"; var Type = require_type(); var _hasOwnProperty = Object.prototype.hasOwnProperty; function resolveYamlSet(data) { if (data === null) return true; var key, object = data; for (key in object) { if (_hasOwnProperty.call(object, key)) { if (object[key] !== null) return false; } } return true; } function constructYamlSet(data) { return data !== null ? data : {}; } module2.exports = new Type("tag:yaml.org,2002:set", { kind: "mapping", resolve: resolveYamlSet, construct: constructYamlSet }); } }); // node_modules/js-yaml/lib/schema/default.js var require_default2 = __commonJS({ "node_modules/js-yaml/lib/schema/default.js"(exports2, module2) { "use strict"; module2.exports = require_core().extend({ implicit: [ require_timestamp(), require_merge() ], explicit: [ require_binary(), require_omap(), require_pairs(), require_set() ] }); } }); // node_modules/js-yaml/lib/loader.js var require_loader = __commonJS({ "node_modules/js-yaml/lib/loader.js"(exports2, module2) { "use strict"; var common = require_common(); var YAMLException = require_exception(); var makeSnippet = require_snippet(); var DEFAULT_SCHEMA = require_default2(); var _hasOwnProperty = Object.prototype.hasOwnProperty; var CONTEXT_FLOW_IN = 1; var CONTEXT_FLOW_OUT = 2; var CONTEXT_BLOCK_IN = 3; var CONTEXT_BLOCK_OUT = 4; var CHOMPING_CLIP = 1; var CHOMPING_STRIP = 2; var CHOMPING_KEEP = 3; var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; function _class(obj) { return Object.prototype.toString.call(obj); } function is_EOL(c) { return c === 10 || c === 13; } function is_WHITE_SPACE(c) { return c === 9 || c === 32; } function is_WS_OR_EOL(c) { return c === 9 || c === 32 || c === 10 || c === 13; } function is_FLOW_INDICATOR(c) { return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; } function fromHexCode(c) { var lc; if (48 <= c && c <= 57) { return c - 48; } lc = c | 32; if (97 <= lc && lc <= 102) { return lc - 97 + 10; } return -1; } function escapedHexLen(c) { if (c === 120) { return 2; } if (c === 117) { return 4; } if (c === 85) { return 8; } return 0; } function fromDecimalCode(c) { if (48 <= c && c <= 57) { return c - 48; } return -1; } function simpleEscapeSequence(c) { return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; } function charFromCodepoint(c) { if (c <= 65535) { return String.fromCharCode(c); } return String.fromCharCode( (c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320 ); } var simpleEscapeCheck = new Array(256); var simpleEscapeMap = new Array(256); for (i = 0; i < 256; i++) { simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; simpleEscapeMap[i] = simpleEscapeSequence(i); } var i; function State(input, options2) { this.input = input; this.filename = options2["filename"] || null; this.schema = options2["schema"] || DEFAULT_SCHEMA; this.onWarning = options2["onWarning"] || null; this.legacy = options2["legacy"] || false; this.json = options2["json"] || false; this.listener = options2["listener"] || null; this.implicitTypes = this.schema.compiledImplicit; this.typeMap = this.schema.compiledTypeMap; this.length = input.length; this.position = 0; this.line = 0; this.lineStart = 0; this.lineIndent = 0; this.firstTabInLine = -1; this.documents = []; } function generateError(state, message) { var mark = { name: state.filename, buffer: state.input.slice(0, -1), // omit trailing \0 position: state.position, line: state.line, column: state.position - state.lineStart }; mark.snippet = makeSnippet(mark); return new YAMLException(message, mark); } function throwError(state, message) { throw generateError(state, message); } function throwWarning(state, message) { if (state.onWarning) { state.onWarning.call(null, generateError(state, message)); } } var directiveHandlers = { YAML: function handleYamlDirective(state, name, args) { var match, major, minor; if (state.version !== null) { throwError(state, "duplication of %YAML directive"); } if (args.length !== 1) { throwError(state, "YAML directive accepts exactly one argument"); } match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); if (match === null) { throwError(state, "ill-formed argument of the YAML directive"); } major = parseInt(match[1], 10); minor = parseInt(match[2], 10); if (major !== 1) { throwError(state, "unacceptable YAML version of the document"); } state.version = args[0]; state.checkLineBreaks = minor < 2; if (minor !== 1 && minor !== 2) { throwWarning(state, "unsupported YAML version of the document"); } }, TAG: function handleTagDirective(state, name, args) { var handle, prefix; if (args.length !== 2) { throwError(state, "TAG directive accepts exactly two arguments"); } handle = args[0]; prefix = args[1]; if (!PATTERN_TAG_HANDLE.test(handle)) { throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); } if (_hasOwnProperty.call(state.tagMap, handle)) { throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); } if (!PATTERN_TAG_URI.test(prefix)) { throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); } try { prefix = decodeURIComponent(prefix); } catch (err) { throwError(state, "tag prefix is malformed: " + prefix); } state.tagMap[handle] = prefix; } }; function captureSegment(state, start, end, checkJson) { var _position, _length, _character, _result; if (start < end) { _result = state.input.slice(start, end); if (checkJson) { for (_position = 0, _length = _result.length; _position < _length; _position += 1) { _character = _result.charCodeAt(_position); if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { throwError(state, "expected valid JSON character"); } } } else if (PATTERN_NON_PRINTABLE.test(_result)) { throwError(state, "the stream contains non-printable characters"); } state.result += _result; } } function mergeMappings(state, destination, source, overridableKeys) { var sourceKeys, key, index, quantity; if (!common.isObject(source)) { throwError(state, "cannot merge mappings; the provided source object is unacceptable"); } sourceKeys = Object.keys(source); for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { key = sourceKeys[index]; if (!_hasOwnProperty.call(destination, key)) { destination[key] = source[key]; overridableKeys[key] = true; } } } function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { var index, quantity; if (Array.isArray(keyNode)) { keyNode = Array.prototype.slice.call(keyNode); for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { if (Array.isArray(keyNode[index])) { throwError(state, "nested arrays are not supported inside keys"); } if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") { keyNode[index] = "[object Object]"; } } } if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") { keyNode = "[object Object]"; } keyNode = String(keyNode); if (_result === null) { _result = {}; } if (keyTag === "tag:yaml.org,2002:merge") { if (Array.isArray(valueNode)) { for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { mergeMappings(state, _result, valueNode[index], overridableKeys); } } else { mergeMappings(state, _result, valueNode, overridableKeys); } } else { if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) { state.line = startLine || state.line; state.lineStart = startLineStart || state.lineStart; state.position = startPos || state.position; throwError(state, "duplicated mapping key"); } if (keyNode === "__proto__") { Object.defineProperty(_result, keyNode, { configurable: true, enumerable: true, writable: true, value: valueNode }); } else { _result[keyNode] = valueNode; } delete overridableKeys[keyNode]; } return _result; } function readLineBreak(state) { var ch; ch = state.input.charCodeAt(state.position); if (ch === 10) { state.position++; } else if (ch === 13) { state.position++; if (state.input.charCodeAt(state.position) === 10) { state.position++; } } else { throwError(state, "a line break is expected"); } state.line += 1; state.lineStart = state.position; state.firstTabInLine = -1; } function skipSeparationSpace(state, allowComments, checkIndent) { var lineBreaks = 0, ch = state.input.charCodeAt(state.position); while (ch !== 0) { while (is_WHITE_SPACE(ch)) { if (ch === 9 && state.firstTabInLine === -1) { state.firstTabInLine = state.position; } ch = state.input.charCodeAt(++state.position); } if (allowComments && ch === 35) { do { ch = state.input.charCodeAt(++state.position); } while (ch !== 10 && ch !== 13 && ch !== 0); } if (is_EOL(ch)) { readLineBreak(state); ch = state.input.charCodeAt(state.position); lineBreaks++; state.lineIndent = 0; while (ch === 32) { state.lineIndent++; ch = state.input.charCodeAt(++state.position); } } else { break; } } if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { throwWarning(state, "deficient indentation"); } return lineBreaks; } function testDocumentSeparator(state) { var _position = state.position, ch; ch = state.input.charCodeAt(_position); if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { _position += 3; ch = state.input.charCodeAt(_position); if (ch === 0 || is_WS_OR_EOL(ch)) { return true; } } return false; } function writeFoldedLines(state, count) { if (count === 1) { state.result += " "; } else if (count > 1) { state.result += common.repeat("\n", count - 1); } } function readPlainScalar(state, nodeIndent, withinFlowCollection) { var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; ch = state.input.charCodeAt(state.position); if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { return false; } if (ch === 63 || ch === 45) { following = state.input.charCodeAt(state.position + 1); if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { return false; } } state.kind = "scalar"; state.result = ""; captureStart = captureEnd = state.position; hasPendingContent = false; while (ch !== 0) { if (ch === 58) { following = state.input.charCodeAt(state.position + 1); if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { break; } } else if (ch === 35) { preceding = state.input.charCodeAt(state.position - 1); if (is_WS_OR_EOL(preceding)) { break; } } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { break; } else if (is_EOL(ch)) { _line = state.line; _lineStart = state.lineStart; _lineIndent = state.lineIndent; skipSeparationSpace(state, false, -1); if (state.lineIndent >= nodeIndent) { hasPendingContent = true; ch = state.input.charCodeAt(state.position); continue; } else { state.position = captureEnd; state.line = _line; state.lineStart = _lineStart; state.lineIndent = _lineIndent; break; } } if (hasPendingContent) { captureSegment(state, captureStart, captureEnd, false); writeFoldedLines(state, state.line - _line); captureStart = captureEnd = state.position; hasPendingContent = false; } if (!is_WHITE_SPACE(ch)) { captureEnd = state.position + 1; } ch = state.input.charCodeAt(++state.position); } captureSegment(state, captureStart, captureEnd, false); if (state.result) { return true; } state.kind = _kind; state.result = _result; return false; } function readSingleQuotedScalar(state, nodeIndent) { var ch, captureStart, captureEnd; ch = state.input.charCodeAt(state.position); if (ch !== 39) { return false; } state.kind = "scalar"; state.result = ""; state.position++; captureStart = captureEnd = state.position; while ((ch = state.input.charCodeAt(state.position)) !== 0) { if (ch === 39) { captureSegment(state, captureStart, state.position, true); ch = state.input.charCodeAt(++state.position); if (ch === 39) { captureStart = state.position; state.position++; captureEnd = state.position; } else { return true; } } else if (is_EOL(ch)) { captureSegment(state, captureStart, captureEnd, true); writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); captureStart = captureEnd = state.position; } else if (state.position === state.lineStart && testDocumentSeparator(state)) { throwError(state, "unexpected end of the document within a single quoted scalar"); } else { state.position++; captureEnd = state.position; } } throwError(state, "unexpected end of the stream within a single quoted scalar"); } function readDoubleQuotedScalar(state, nodeIndent) { var captureStart, captureEnd, hexLength, hexResult, tmp, ch; ch = state.input.charCodeAt(state.position); if (ch !== 34) { return false; } state.kind = "scalar"; state.result = ""; state.position++; captureStart = captureEnd = state.position; while ((ch = state.input.charCodeAt(state.position)) !== 0) { if (ch === 34) { captureSegment(state, captureStart, state.position, true); state.position++; return true; } else if (ch === 92) { captureSegment(state, captureStart, state.position, true); ch = state.input.charCodeAt(++state.position); if (is_EOL(ch)) { skipSeparationSpace(state, false, nodeIndent); } else if (ch < 256 && simpleEscapeCheck[ch]) { state.result += simpleEscapeMap[ch]; state.position++; } else if ((tmp = escapedHexLen(ch)) > 0) { hexLength = tmp; hexResult = 0; for (; hexLength > 0; hexLength--) { ch = state.input.charCodeAt(++state.position); if ((tmp = fromHexCode(ch)) >= 0) { hexResult = (hexResult << 4) + tmp; } else { throwError(state, "expected hexadecimal character"); } } state.result += charFromCodepoint(hexResult); state.position++; } else { throwError(state, "unknown escape sequence"); } captureStart = captureEnd = state.position; } else if (is_EOL(ch)) { captureSegment(state, captureStart, captureEnd, true); writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); captureStart = captureEnd = state.position; } else if (state.position === state.lineStart && testDocumentSeparator(state)) { throwError(state, "unexpected end of the document within a double quoted scalar"); } else { state.position++; captureEnd = state.position; } } throwError(state, "unexpected end of the stream within a double quoted scalar"); } function readFlowCollection(state, nodeIndent) { var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; ch = state.input.charCodeAt(state.position); if (ch === 91) { terminator = 93; isMapping = false; _result = []; } else if (ch === 123) { terminator = 125; isMapping = true; _result = {}; } else { return false; } if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(++state.position); while (ch !== 0) { skipSeparationSpace(state, true, nodeIndent); ch = state.input.charCodeAt(state.position); if (ch === terminator) { state.position++; state.tag = _tag; state.anchor = _anchor; state.kind = isMapping ? "mapping" : "sequence"; state.result = _result; return true; } else if (!readNext) { throwError(state, "missed comma between flow collection entries"); } else if (ch === 44) { throwError(state, "expected the node content, but found ','"); } keyTag = keyNode = valueNode = null; isPair = isExplicitPair = false; if (ch === 63) { following = state.input.charCodeAt(state.position + 1); if (is_WS_OR_EOL(following)) { isPair = isExplicitPair = true; state.position++; skipSeparationSpace(state, true, nodeIndent); } } _line = state.line; _lineStart = state.lineStart; _pos = state.position; composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); keyTag = state.tag; keyNode = state.result; skipSeparationSpace(state, true, nodeIndent); ch = state.input.charCodeAt(state.position); if ((isExplicitPair || state.line === _line) && ch === 58) { isPair = true; ch = state.input.charCodeAt(++state.position); skipSeparationSpace(state, true, nodeIndent); composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); valueNode = state.result; } if (isMapping) { storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); } else if (isPair) { _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); } else { _result.push(keyNode); } skipSeparationSpace(state, true, nodeIndent); ch = state.input.charCodeAt(state.position); if (ch === 44) { readNext = true; ch = state.input.charCodeAt(++state.position); } else { readNext = false; } } throwError(state, "unexpected end of the stream within a flow collection"); } function readBlockScalar(state, nodeIndent) { var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; ch = state.input.charCodeAt(state.position); if (ch === 124) { folding = false; } else if (ch === 62) { folding = true; } else { return false; } state.kind = "scalar"; state.result = ""; while (ch !== 0) { ch = state.input.charCodeAt(++state.position); if (ch === 43 || ch === 45) { if (CHOMPING_CLIP === chomping) { chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP; } else { throwError(state, "repeat of a chomping mode identifier"); } } else if ((tmp = fromDecimalCode(ch)) >= 0) { if (tmp === 0) { throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); } else if (!detectedIndent) { textIndent = nodeIndent + tmp - 1; detectedIndent = true; } else { throwError(state, "repeat of an indentation width identifier"); } } else { break; } } if (is_WHITE_SPACE(ch)) { do { ch = state.input.charCodeAt(++state.position); } while (is_WHITE_SPACE(ch)); if (ch === 35) { do { ch = state.input.charCodeAt(++state.position); } while (!is_EOL(ch) && ch !== 0); } } while (ch !== 0) { readLineBreak(state); state.lineIndent = 0; ch = state.input.charCodeAt(state.position); while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { state.lineIndent++; ch = state.input.charCodeAt(++state.position); } if (!detectedIndent && state.lineIndent > textIndent) { textIndent = state.lineIndent; } if (is_EOL(ch)) { emptyLines++; continue; } if (state.lineIndent < textIndent) { if (chomping === CHOMPING_KEEP) { state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } else if (chomping === CHOMPING_CLIP) { if (didReadContent) { state.result += "\n"; } } break; } if (folding) { if (is_WHITE_SPACE(ch)) { atMoreIndented = true; state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } else if (atMoreIndented) { atMoreIndented = false; state.result += common.repeat("\n", emptyLines + 1); } else if (emptyLines === 0) { if (didReadContent) { state.result += " "; } } else { state.result += common.repeat("\n", emptyLines); } } else { state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); } didReadContent = true; detectedIndent = true; emptyLines = 0; captureStart = state.position; while (!is_EOL(ch) && ch !== 0) { ch = state.input.charCodeAt(++state.position); } captureSegment(state, captureStart, state.position, false); } return true; } function readBlockSequence(state, nodeIndent) { var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; if (state.firstTabInLine !== -1) return false; if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(state.position); while (ch !== 0) { if (state.firstTabInLine !== -1) { state.position = state.firstTabInLine; throwError(state, "tab characters must not be used in indentation"); } if (ch !== 45) { break; } following = state.input.charCodeAt(state.position + 1); if (!is_WS_OR_EOL(following)) { break; } detected = true; state.position++; if (skipSeparationSpace(state, true, -1)) { if (state.lineIndent <= nodeIndent) { _result.push(null); ch = state.input.charCodeAt(state.position); continue; } } _line = state.line; composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); _result.push(state.result); skipSeparationSpace(state, true, -1); ch = state.input.charCodeAt(state.position); if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { throwError(state, "bad indentation of a sequence entry"); } else if (state.lineIndent < nodeIndent) { break; } } if (detected) { state.tag = _tag; state.anchor = _anchor; state.kind = "sequence"; state.result = _result; return true; } return false; } function readBlockMapping(state, nodeIndent, flowIndent) { var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; if (state.firstTabInLine !== -1) return false; if (state.anchor !== null) { state.anchorMap[state.anchor] = _result; } ch = state.input.charCodeAt(state.position); while (ch !== 0) { if (!atExplicitKey && state.firstTabInLine !== -1) { state.position = state.firstTabInLine; throwError(state, "tab characters must not be used in indentation"); } following = state.input.charCodeAt(state.position + 1); _line = state.line; if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) { if (ch === 63) { if (atExplicitKey) { storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } detected = true; atExplicitKey = true; allowCompact = true; } else if (atExplicitKey) { atExplicitKey = false; allowCompact = true; } else { throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); } state.position += 1; ch = following; } else { _keyLine = state.line; _keyLineStart = state.lineStart; _keyPos = state.position; if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { break; } if (state.line === _line) { ch = state.input.charCodeAt(state.position); while (is_WHITE_SPACE(ch)) { ch = state.input.charCodeAt(++state.position); } if (ch === 58) { ch = state.input.charCodeAt(++state.position); if (!is_WS_OR_EOL(ch)) { throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); } if (atExplicitKey) { storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } detected = true; atExplicitKey = false; allowCompact = false; keyTag = state.tag; keyNode = state.result; } else if (detected) { throwError(state, "can not read an implicit mapping pair; a colon is missed"); } else { state.tag = _tag; state.anchor = _anchor; return true; } } else if (detected) { throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); } else { state.tag = _tag; state.anchor = _anchor; return true; } } if (state.line === _line || state.lineIndent > nodeIndent) { if (atExplicitKey) { _keyLine = state.line; _keyLineStart = state.lineStart; _keyPos = state.position; } if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { if (atExplicitKey) { keyNode = state.result; } else { valueNode = state.result; } } if (!atExplicitKey) { storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); keyTag = keyNode = valueNode = null; } skipSeparationSpace(state, true, -1); ch = state.input.charCodeAt(state.position); } if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { throwError(state, "bad indentation of a mapping entry"); } else if (state.lineIndent < nodeIndent) { break; } } if (atExplicitKey) { storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); } if (detected) { state.tag = _tag; state.anchor = _anchor; state.kind = "mapping"; state.result = _result; } return detected; } function readTagProperty(state) { var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; ch = state.input.charCodeAt(state.position); if (ch !== 33) return false; if (state.tag !== null) { throwError(state, "duplication of a tag property"); } ch = state.input.charCodeAt(++state.position); if (ch === 60) { isVerbatim = true; ch = state.input.charCodeAt(++state.position); } else if (ch === 33) { isNamed = true; tagHandle = "!!"; ch = state.input.charCodeAt(++state.position); } else { tagHandle = "!"; } _position = state.position; if (isVerbatim) { do { ch = state.input.charCodeAt(++state.position); } while (ch !== 0 && ch !== 62); if (state.position < state.length) { tagName = state.input.slice(_position, state.position); ch = state.input.charCodeAt(++state.position); } else { throwError(state, "unexpected end of the stream within a verbatim tag"); } } else { while (ch !== 0 && !is_WS_OR_EOL(ch)) { if (ch === 33) { if (!isNamed) { tagHandle = state.input.slice(_position - 1, state.position + 1); if (!PATTERN_TAG_HANDLE.test(tagHandle)) { throwError(state, "named tag handle cannot contain such characters"); } isNamed = true; _position = state.position + 1; } else { throwError(state, "tag suffix cannot contain exclamation marks"); } } ch = state.input.charCodeAt(++state.position); } tagName = state.input.slice(_position, state.position); if (PATTERN_FLOW_INDICATORS.test(tagName)) { throwError(state, "tag suffix cannot contain flow indicator characters"); } } if (tagName && !PATTERN_TAG_URI.test(tagName)) { throwError(state, "tag name cannot contain such characters: " + tagName); } try { tagName = decodeURIComponent(tagName); } catch (err) { throwError(state, "tag name is malformed: " + tagName); } if (isVerbatim) { state.tag = tagName; } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { state.tag = state.tagMap[tagHandle] + tagName; } else if (tagHandle === "!") { state.tag = "!" + tagName; } else if (tagHandle === "!!") { state.tag = "tag:yaml.org,2002:" + tagName; } else { throwError(state, 'undeclared tag handle "' + tagHandle + '"'); } return true; } function readAnchorProperty(state) { var _position, ch; ch = state.input.charCodeAt(state.position); if (ch !== 38) return false; if (state.anchor !== null) { throwError(state, "duplication of an anchor property"); } ch = state.input.charCodeAt(++state.position); _position = state.position; while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { ch = state.input.charCodeAt(++state.position); } if (state.position === _position) { throwError(state, "name of an anchor node must contain at least one character"); } state.anchor = state.input.slice(_position, state.position); return true; } function readAlias(state) { var _position, alias, ch; ch = state.input.charCodeAt(state.position); if (ch !== 42) return false; ch = state.input.charCodeAt(++state.position); _position = state.position; while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { ch = state.input.charCodeAt(++state.position); } if (state.position === _position) { throwError(state, "name of an alias node must contain at least one character"); } alias = state.input.slice(_position, state.position); if (!_hasOwnProperty.call(state.anchorMap, alias)) { throwError(state, 'unidentified alias "' + alias + '"'); } state.result = state.anchorMap[alias]; skipSeparationSpace(state, true, -1); return true; } function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent; if (state.listener !== null) { state.listener("open", state); } state.tag = null; state.anchor = null; state.kind = null; state.result = null; allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; if (allowToSeek) { if (skipSeparationSpace(state, true, -1)) { atNewLine = true; if (state.lineIndent > parentIndent) { indentStatus = 1; } else if (state.lineIndent === parentIndent) { indentStatus = 0; } else if (state.lineIndent < parentIndent) { indentStatus = -1; } } } if (indentStatus === 1) { while (readTagProperty(state) || readAnchorProperty(state)) { if (skipSeparationSpace(state, true, -1)) { atNewLine = true; allowBlockCollections = allowBlockStyles; if (state.lineIndent > parentIndent) { indentStatus = 1; } else if (state.lineIndent === parentIndent) { indentStatus = 0; } else if (state.lineIndent < parentIndent) { indentStatus = -1; } } else { allowBlockCollections = false; } } } if (allowBlockCollections) { allowBlockCollections = atNewLine || allowCompact; } if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { flowIndent = parentIndent; } else { flowIndent = parentIndent + 1; } blockIndent = state.position - state.lineStart; if (indentStatus === 1) { if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { hasContent = true; } else { if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { hasContent = true; } else if (readAlias(state)) { hasContent = true; if (state.tag !== null || state.anchor !== null) { throwError(state, "alias node should not have any properties"); } } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { hasContent = true; if (state.tag === null) { state.tag = "?"; } } if (state.anchor !== null) { state.anchorMap[state.anchor] = state.result; } } } else if (indentStatus === 0) { hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); } } if (state.tag === null) { if (state.anchor !== null) { state.anchorMap[state.anchor] = state.result; } } else if (state.tag === "?") { if (state.result !== null && state.kind !== "scalar") { throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); } for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { type = state.implicitTypes[typeIndex]; if (type.resolve(state.result)) { state.result = type.construct(state.result); state.tag = type.tag; if (state.anchor !== null) { state.anchorMap[state.anchor] = state.result; } break; } } } else if (state.tag !== "!") { if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) { type = state.typeMap[state.kind || "fallback"][state.tag]; } else { type = null; typeList = state.typeMap.multi[state.kind || "fallback"]; for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { type = typeList[typeIndex]; break; } } } if (!type) { throwError(state, "unknown tag !<" + state.tag + ">"); } if (state.result !== null && type.kind !== state.kind) { throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); } if (!type.resolve(state.result, state.tag)) { throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); } else { state.result = type.construct(state.result, state.tag); if (state.anchor !== null) { state.anchorMap[state.anchor] = state.result; } } } if (state.listener !== null) { state.listener("close", state); } return state.tag !== null || state.anchor !== null || hasContent; } function readDocument(state) { var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; state.version = null; state.checkLineBreaks = state.legacy; state.tagMap = /* @__PURE__ */ Object.create(null); state.anchorMap = /* @__PURE__ */ Object.create(null); while ((ch = state.input.charCodeAt(state.position)) !== 0) { skipSeparationSpace(state, true, -1); ch = state.input.charCodeAt(state.position); if (state.lineIndent > 0 || ch !== 37) { break; } hasDirectives = true; ch = state.input.charCodeAt(++state.position); _position = state.position; while (ch !== 0 && !is_WS_OR_EOL(ch)) { ch = state.input.charCodeAt(++state.position); } directiveName = state.input.slice(_position, state.position); directiveArgs = []; if (directiveName.length < 1) { throwError(state, "directive name must not be less than one character in length"); } while (ch !== 0) { while (is_WHITE_SPACE(ch)) { ch = state.input.charCodeAt(++state.position); } if (ch === 35) { do { ch = state.input.charCodeAt(++state.position); } while (ch !== 0 && !is_EOL(ch)); break; } if (is_EOL(ch)) break; _position = state.position; while (ch !== 0 && !is_WS_OR_EOL(ch)) { ch = state.input.charCodeAt(++state.position); } directiveArgs.push(state.input.slice(_position, state.position)); } if (ch !== 0) readLineBreak(state); if (_hasOwnProperty.call(directiveHandlers, directiveName)) { directiveHandlers[directiveName](state, directiveName, directiveArgs); } else { throwWarning(state, 'unknown document directive "' + directiveName + '"'); } } skipSeparationSpace(state, true, -1); if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { state.position += 3; skipSeparationSpace(state, true, -1); } else if (hasDirectives) { throwError(state, "directives end mark is expected"); } composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); skipSeparationSpace(state, true, -1); if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { throwWarning(state, "non-ASCII line breaks are interpreted as content"); } state.documents.push(state.result); if (state.position === state.lineStart && testDocumentSeparator(state)) { if (state.input.charCodeAt(state.position) === 46) { state.position += 3; skipSeparationSpace(state, true, -1); } return; } if (state.position < state.length - 1) { throwError(state, "end of the stream or a document separator is expected"); } else { return; } } function loadDocuments(input, options2) { input = String(input); options2 = options2 || {}; if (input.length !== 0) { if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { input += "\n"; } if (input.charCodeAt(0) === 65279) { input = input.slice(1); } } var state = new State(input, options2); var nullpos = input.indexOf("\0"); if (nullpos !== -1) { state.position = nullpos; throwError(state, "null byte is not allowed in input"); } state.input += "\0"; while (state.input.charCodeAt(state.position) === 32) { state.lineIndent += 1; state.position += 1; } while (state.position < state.length - 1) { readDocument(state); } return state.documents; } function loadAll(input, iterator, options2) { if (iterator !== null && typeof iterator === "object" && typeof options2 === "undefined") { options2 = iterator; iterator = null; } var documents = loadDocuments(input, options2); if (typeof iterator !== "function") { return documents; } for (var index = 0, length = documents.length; index < length; index += 1) { iterator(documents[index]); } } function load(input, options2) { var documents = loadDocuments(input, options2); if (documents.length === 0) { return void 0; } else if (documents.length === 1) { return documents[0]; } throw new YAMLException("expected a single document in the stream, but found more"); } module2.exports.loadAll = loadAll; module2.exports.load = load; } }); // node_modules/js-yaml/lib/dumper.js var require_dumper = __commonJS({ "node_modules/js-yaml/lib/dumper.js"(exports2, module2) { "use strict"; var common = require_common(); var YAMLException = require_exception(); var DEFAULT_SCHEMA = require_default2(); var _toString = Object.prototype.toString; var _hasOwnProperty = Object.prototype.hasOwnProperty; var CHAR_BOM = 65279; var CHAR_TAB = 9; var CHAR_LINE_FEED = 10; var CHAR_CARRIAGE_RETURN = 13; var CHAR_SPACE = 32; var CHAR_EXCLAMATION = 33; var CHAR_DOUBLE_QUOTE = 34; var CHAR_SHARP = 35; var CHAR_PERCENT = 37; var CHAR_AMPERSAND = 38; var CHAR_SINGLE_QUOTE = 39; var CHAR_ASTERISK = 42; var CHAR_COMMA = 44; var CHAR_MINUS = 45; var CHAR_COLON = 58; var CHAR_EQUALS = 61; var CHAR_GREATER_THAN = 62; var CHAR_QUESTION = 63; var CHAR_COMMERCIAL_AT = 64; var CHAR_LEFT_SQUARE_BRACKET = 91; var CHAR_RIGHT_SQUARE_BRACKET = 93; var CHAR_GRAVE_ACCENT = 96; var CHAR_LEFT_CURLY_BRACKET = 123; var CHAR_VERTICAL_LINE = 124; var CHAR_RIGHT_CURLY_BRACKET = 125; var ESCAPE_SEQUENCES = {}; ESCAPE_SEQUENCES[0] = "\\0"; ESCAPE_SEQUENCES[7] = "\\a"; ESCAPE_SEQUENCES[8] = "\\b"; ESCAPE_SEQUENCES[9] = "\\t"; ESCAPE_SEQUENCES[10] = "\\n"; ESCAPE_SEQUENCES[11] = "\\v"; ESCAPE_SEQUENCES[12] = "\\f"; ESCAPE_SEQUENCES[13] = "\\r"; ESCAPE_SEQUENCES[27] = "\\e"; ESCAPE_SEQUENCES[34] = '\\"'; ESCAPE_SEQUENCES[92] = "\\\\"; ESCAPE_SEQUENCES[133] = "\\N"; ESCAPE_SEQUENCES[160] = "\\_"; ESCAPE_SEQUENCES[8232] = "\\L"; ESCAPE_SEQUENCES[8233] = "\\P"; var DEPRECATED_BOOLEANS_SYNTAX = [ "y", "Y", "yes", "Yes", "YES", "on", "On", "ON", "n", "N", "no", "No", "NO", "off", "Off", "OFF" ]; var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; function compileStyleMap(schema, map) { var result, keys, index, length, tag, style2, type; if (map === null) return {}; result = {}; keys = Object.keys(map); for (index = 0, length = keys.length; index < length; index += 1) { tag = keys[index]; style2 = String(map[tag]); if (tag.slice(0, 2) === "!!") { tag = "tag:yaml.org,2002:" + tag.slice(2); } type = schema.compiledTypeMap["fallback"][tag]; if (type && _hasOwnProperty.call(type.styleAliases, style2)) { style2 = type.styleAliases[style2]; } result[tag] = style2; } return result; } function encodeHex(character) { var string, handle, length; string = character.toString(16).toUpperCase(); if (character <= 255) { handle = "x"; length = 2; } else if (character <= 65535) { handle = "u"; length = 4; } else if (character <= 4294967295) { handle = "U"; length = 8; } else { throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); } return "\\" + handle + common.repeat("0", length - string.length) + string; } var QUOTING_TYPE_SINGLE = 1; var QUOTING_TYPE_DOUBLE = 2; function State(options2) { this.schema = options2["schema"] || DEFAULT_SCHEMA; this.indent = Math.max(1, options2["indent"] || 2); this.noArrayIndent = options2["noArrayIndent"] || false; this.skipInvalid = options2["skipInvalid"] || false; this.flowLevel = common.isNothing(options2["flowLevel"]) ? -1 : options2["flowLevel"]; this.styleMap = compileStyleMap(this.schema, options2["styles"] || null); this.sortKeys = options2["sortKeys"] || false; this.lineWidth = options2["lineWidth"] || 80; this.noRefs = options2["noRefs"] || false; this.noCompatMode = options2["noCompatMode"] || false; this.condenseFlow = options2["condenseFlow"] || false; this.quotingType = options2["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; this.forceQuotes = options2["forceQuotes"] || false; this.replacer = typeof options2["replacer"] === "function" ? options2["replacer"] : null; this.implicitTypes = this.schema.compiledImplicit; this.explicitTypes = this.schema.compiledExplicit; this.tag = null; this.result = ""; this.duplicates = []; this.usedDuplicates = null; } function indentString(string, spaces) { var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; while (position < length) { next = string.indexOf("\n", position); if (next === -1) { line = string.slice(position); position = length; } else { line = string.slice(position, next + 1); position = next + 1; } if (line.length && line !== "\n") result += ind; result += line; } return result; } function generateNextLine(state, level) { return "\n" + common.repeat(" ", state.indent * level); } function testImplicitResolving(state, str2) { var index, length, type; for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { type = state.implicitTypes[index]; if (type.resolve(str2)) { return true; } } return false; } function isWhitespace(c) { return c === CHAR_SPACE || c === CHAR_TAB; } function isPrintable(c) { return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM || 65536 <= c && c <= 1114111; } function isNsCharOrWhitespace(c) { return isPrintable(c) && c !== CHAR_BOM && c !== CHAR_CARRIAGE_RETURN && c !== CHAR_LINE_FEED; } function isPlainSafe(c, prev, inblock) { var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); return ( // ns-plain-safe (inblock ? ( // c = flow-in cIsNsCharOrWhitespace ) : cIsNsCharOrWhitespace && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET) && c !== CHAR_SHARP && !(prev === CHAR_COLON && !cIsNsChar) || isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP || prev === CHAR_COLON && cIsNsChar ); } function isPlainSafeFirst(c) { return isPrintable(c) && c !== CHAR_BOM && !isWhitespace(c) && c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET && c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_EQUALS && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE && c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT; } function isPlainSafeLast(c) { return !isWhitespace(c) && c !== CHAR_COLON; } function codePointAt(string, pos) { var first = string.charCodeAt(pos), second; if (first >= 55296 && first <= 56319 && pos + 1 < string.length) { second = string.charCodeAt(pos + 1); if (second >= 56320 && second <= 57343) { return (first - 55296) * 1024 + second - 56320 + 65536; } } return first; } function needIndentIndicator(string) { var leadingSpaceRe = /^\n* /; return leadingSpaceRe.test(string); } var STYLE_PLAIN = 1; var STYLE_SINGLE = 2; var STYLE_LITERAL = 3; var STYLE_FOLDED = 4; var STYLE_DOUBLE = 5; function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { var i; var char = 0; var prevChar = null; var hasLineBreak = false; var hasFoldableLine = false; var shouldTrackWidth = lineWidth !== -1; var previousLineBreak = -1; var plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1)); if (singleLineOnly || forceQuotes) { for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { char = codePointAt(string, i); if (!isPrintable(char)) { return STYLE_DOUBLE; } plain = plain && isPlainSafe(char, prevChar, inblock); prevChar = char; } } else { for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { char = codePointAt(string, i); if (char === CHAR_LINE_FEED) { hasLineBreak = true; if (shouldTrackWidth) { hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; previousLineBreak = i; } } else if (!isPrintable(char)) { return STYLE_DOUBLE; } plain = plain && isPlainSafe(char, prevChar, inblock); prevChar = char; } hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); } if (!hasLineBreak && !hasFoldableLine) { if (plain && !forceQuotes && !testAmbiguousType(string)) { return STYLE_PLAIN; } return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; } if (indentPerLevel > 9 && needIndentIndicator(string)) { return STYLE_DOUBLE; } if (!forceQuotes) { return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; } return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; } function writeScalar(state, string, level, iskey, inblock) { state.dump = function() { if (string.length === 0) { return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; } if (!state.noCompatMode) { if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'"; } } var indent = state.indent * Math.max(1, level); var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; function testAmbiguity(string2) { return testImplicitResolving(state, string2); } switch (chooseScalarStyle( string, singleLineOnly, state.indent, lineWidth, testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock )) { case STYLE_PLAIN: return string; case STYLE_SINGLE: return "'" + string.replace(/'/g, "''") + "'"; case STYLE_LITERAL: return "|" + blockHeader(string, state.indent) + dropEndingNewline(indentString(string, indent)); case STYLE_FOLDED: return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); case STYLE_DOUBLE: return '"' + escapeString(string, lineWidth) + '"'; default: throw new YAMLException("impossible error: invalid scalar style"); } }(); } function blockHeader(string, indentPerLevel) { var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ""; var clip = string[string.length - 1] === "\n"; var keep = clip && (string[string.length - 2] === "\n" || string === "\n"); var chomp = keep ? "+" : clip ? "" : "-"; return indentIndicator + chomp + "\n"; } function dropEndingNewline(string) { return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; } function foldString(string, width) { var lineRe = /(\n+)([^\n]*)/g; var result = function() { var nextLF = string.indexOf("\n"); nextLF = nextLF !== -1 ? nextLF : string.length; lineRe.lastIndex = nextLF; return foldLine(string.slice(0, nextLF), width); }(); var prevMoreIndented = string[0] === "\n" || string[0] === " "; var moreIndented; var match; while (match = lineRe.exec(string)) { var prefix = match[1], line = match[2]; moreIndented = line[0] === " "; result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine(line, width); prevMoreIndented = moreIndented; } return result; } function foldLine(line, width) { if (line === "" || line[0] === " ") return line; var breakRe = / [^ ]/g; var match; var start = 0, end, curr = 0, next = 0; var result = ""; while (match = breakRe.exec(line)) { next = match.index; if (next - start > width) { end = curr > start ? curr : next; result += "\n" + line.slice(start, end); start = end + 1; } curr = next; } result += "\n"; if (line.length - start > width && curr > start) { result += line.slice(start, curr) + "\n" + line.slice(curr + 1); } else { result += line.slice(start); } return result.slice(1); } function escapeString(string) { var result = ""; var char = 0; var escapeSeq; for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { char = codePointAt(string, i); escapeSeq = ESCAPE_SEQUENCES[char]; if (!escapeSeq && isPrintable(char)) { result += string[i]; if (char >= 65536) result += string[i + 1]; } else { result += escapeSeq || encodeHex(char); } } return result; } function writeFlowSequence(state, level, object) { var _result = "", _tag = state.tag, index, length, value; for (index = 0, length = object.length; index < length; index += 1) { value = object[index]; if (state.replacer) { value = state.replacer.call(object, String(index), value); } if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) { if (_result !== "") _result += "," + (!state.condenseFlow ? " " : ""); _result += state.dump; } } state.tag = _tag; state.dump = "[" + _result + "]"; } function writeBlockSequence(state, level, object, compact) { var _result = "", _tag = state.tag, index, length, value; for (index = 0, length = object.length; index < length; index += 1) { value = object[index]; if (state.replacer) { value = state.replacer.call(object, String(index), value); } if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) { if (!compact || _result !== "") { _result += generateNextLine(state, level); } if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { _result += "-"; } else { _result += "- "; } _result += state.dump; } } state.tag = _tag; state.dump = _result || "[]"; } function writeFlowMapping(state, level, object) { var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; for (index = 0, length = objectKeyList.length; index < length; index += 1) { pairBuffer = ""; if (_result !== "") pairBuffer += ", "; if (state.condenseFlow) pairBuffer += '"'; objectKey = objectKeyList[index]; objectValue = object[objectKey]; if (state.replacer) { objectValue = state.replacer.call(object, objectKey, objectValue); } if (!writeNode(state, level, objectKey, false, false)) { continue; } if (state.dump.length > 1024) pairBuffer += "? "; pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); if (!writeNode(state, level, objectValue, false, false)) { continue; } pairBuffer += state.dump; _result += pairBuffer; } state.tag = _tag; state.dump = "{" + _result + "}"; } function writeBlockMapping(state, level, object, compact) { var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; if (state.sortKeys === true) { objectKeyList.sort(); } else if (typeof state.sortKeys === "function") { objectKeyList.sort(state.sortKeys); } else if (state.sortKeys) { throw new YAMLException("sortKeys must be a boolean or a function"); } for (index = 0, length = objectKeyList.length; index < length; index += 1) { pairBuffer = ""; if (!compact || _result !== "") { pairBuffer += generateNextLine(state, level); } objectKey = objectKeyList[index]; objectValue = object[objectKey]; if (state.replacer) { objectValue = state.replacer.call(object, objectKey, objectValue); } if (!writeNode(state, level + 1, objectKey, true, true, true)) { continue; } explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; if (explicitPair) { if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { pairBuffer += "?"; } else { pairBuffer += "? "; } } pairBuffer += state.dump; if (explicitPair) { pairBuffer += generateNextLine(state, level); } if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { continue; } if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { pairBuffer += ":"; } else { pairBuffer += ": "; } pairBuffer += state.dump; _result += pairBuffer; } state.tag = _tag; state.dump = _result || "{}"; } function detectType(state, object, explicit) { var _result, typeList, index, length, type, style2; typeList = explicit ? state.explicitTypes : state.implicitTypes; for (index = 0, length = typeList.length; index < length; index += 1) { type = typeList[index]; if ((type.instanceOf || type.predicate) && (!type.instanceOf || typeof object === "object" && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { if (explicit) { if (type.multi && type.representName) { state.tag = type.representName(object); } else { state.tag = type.tag; } } else { state.tag = "?"; } if (type.represent) { style2 = state.styleMap[type.tag] || type.defaultStyle; if (_toString.call(type.represent) === "[object Function]") { _result = type.represent(object, style2); } else if (_hasOwnProperty.call(type.represent, style2)) { _result = type.represent[style2](object, style2); } else { throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style2 + '" style'); } state.dump = _result; } return true; } } return false; } function writeNode(state, level, object, block, compact, iskey, isblockseq) { state.tag = null; state.dump = object; if (!detectType(state, object, false)) { detectType(state, object, true); } var type = _toString.call(state.dump); var inblock = block; var tagStr; if (block) { block = state.flowLevel < 0 || state.flowLevel > level; } var objectOrArray = type === "[object Object]" || type === "[object Array]", duplicateIndex, duplicate; if (objectOrArray) { duplicateIndex = state.duplicates.indexOf(object); duplicate = duplicateIndex !== -1; } if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { compact = false; } if (duplicate && state.usedDuplicates[duplicateIndex]) { state.dump = "*ref_" + duplicateIndex; } else { if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { state.usedDuplicates[duplicateIndex] = true; } if (type === "[object Object]") { if (block && Object.keys(state.dump).length !== 0) { writeBlockMapping(state, level, state.dump, compact); if (duplicate) { state.dump = "&ref_" + duplicateIndex + state.dump; } } else { writeFlowMapping(state, level, state.dump); if (duplicate) { state.dump = "&ref_" + duplicateIndex + " " + state.dump; } } } else if (type === "[object Array]") { if (block && state.dump.length !== 0) { if (state.noArrayIndent && !isblockseq && level > 0) { writeBlockSequence(state, level - 1, state.dump, compact); } else { writeBlockSequence(state, level, state.dump, compact); } if (duplicate) { state.dump = "&ref_" + duplicateIndex + state.dump; } } else { writeFlowSequence(state, level, state.dump); if (duplicate) { state.dump = "&ref_" + duplicateIndex + " " + state.dump; } } } else if (type === "[object String]") { if (state.tag !== "?") { writeScalar(state, state.dump, level, iskey, inblock); } } else if (type === "[object Undefined]") { return false; } else { if (state.skipInvalid) return false; throw new YAMLException("unacceptable kind of an object to dump " + type); } if (state.tag !== null && state.tag !== "?") { tagStr = encodeURI( state.tag[0] === "!" ? state.tag.slice(1) : state.tag ).replace(/!/g, "%21"); if (state.tag[0] === "!") { tagStr = "!" + tagStr; } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { tagStr = "!!" + tagStr.slice(18); } else { tagStr = "!<" + tagStr + ">"; } state.dump = tagStr + " " + state.dump; } } return true; } function getDuplicateReferences(object, state) { var objects = [], duplicatesIndexes = [], index, length; inspectNode(object, objects, duplicatesIndexes); for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { state.duplicates.push(objects[duplicatesIndexes[index]]); } state.usedDuplicates = new Array(length); } function inspectNode(object, objects, duplicatesIndexes) { var objectKeyList, index, length; if (object !== null && typeof object === "object") { index = objects.indexOf(object); if (index !== -1) { if (duplicatesIndexes.indexOf(index) === -1) { duplicatesIndexes.push(index); } } else { objects.push(object); if (Array.isArray(object)) { for (index = 0, length = object.length; index < length; index += 1) { inspectNode(object[index], objects, duplicatesIndexes); } } else { objectKeyList = Object.keys(object); for (index = 0, length = objectKeyList.length; index < length; index += 1) { inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); } } } } } function dump(input, options2) { options2 = options2 || {}; var state = new State(options2); if (!state.noRefs) getDuplicateReferences(input, state); var value = input; if (state.replacer) { value = state.replacer.call({ "": value }, "", value); } if (writeNode(state, 0, value, true, true)) return state.dump + "\n"; return ""; } module2.exports.dump = dump; } }); // node_modules/js-yaml/index.js var require_js_yaml = __commonJS({ "node_modules/js-yaml/index.js"(exports2, module2) { "use strict"; var loader = require_loader(); var dumper = require_dumper(); function renamed(from, to) { return function() { throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); }; } module2.exports.Type = require_type(); module2.exports.Schema = require_schema(); module2.exports.FAILSAFE_SCHEMA = require_failsafe(); module2.exports.JSON_SCHEMA = require_json(); module2.exports.CORE_SCHEMA = require_core(); module2.exports.DEFAULT_SCHEMA = require_default2(); module2.exports.load = loader.load; module2.exports.loadAll = loader.loadAll; module2.exports.dump = dumper.dump; module2.exports.YAMLException = require_exception(); module2.exports.types = { binary: require_binary(), float: require_float(), map: require_map(), null: require_null(), pairs: require_pairs(), set: require_set(), timestamp: require_timestamp(), bool: require_bool(), int: require_int(), merge: require_merge(), omap: require_omap(), seq: require_seq(), str: require_str() }; module2.exports.safeLoad = renamed("safeLoad", "load"); module2.exports.safeLoadAll = renamed("safeLoadAll", "loadAll"); module2.exports.safeDump = renamed("safeDump", "dump"); } }); // node_modules/@marp-team/marpit/lib/markdown/directives/directives.js var require_directives = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/directives/directives.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.locals = exports2.globals = exports2.default = void 0; var globals = Object.assign(/* @__PURE__ */ Object.create(null), { headingDivider: (value) => { const headings = [1, 2, 3, 4, 5, 6]; const toInt = (v) => Array.isArray(v) || Number.isNaN(v) ? v : Number.parseInt(v, 10); const converted = toInt(value); if (Array.isArray(converted)) { const convertedArr = converted.map(toInt); return { headingDivider: headings.filter((v) => convertedArr.includes(v)) }; } if (value === "false") return { headingDivider: false }; if (headings.includes(converted)) return { headingDivider: converted }; return {}; }, style: (v) => ({ style: v }), theme: (v, marpit) => marpit.themeSet.has(v) ? { theme: v } : {} }); exports2.globals = globals; var locals = Object.assign(/* @__PURE__ */ Object.create(null), { backgroundColor: (v) => ({ backgroundColor: v }), backgroundImage: (v) => ({ backgroundImage: v }), backgroundPosition: (v) => ({ backgroundPosition: v }), backgroundRepeat: (v) => ({ backgroundRepeat: v }), backgroundSize: (v) => ({ backgroundSize: v }), class: (v) => ({ class: Array.isArray(v) ? v.join(" ") : v }), color: (v) => ({ color: v }), footer: (v) => typeof v === "string" ? { footer: v } : {}, header: (v) => typeof v === "string" ? { header: v } : {}, paginate: (v) => ({ paginate: (v || "").toLowerCase() === "true" }) }); exports2.locals = locals; var _default = [...Object.keys(globals), ...Object.keys(locals)]; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/directives/yaml.js var require_yaml = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/directives/yaml.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.yaml = exports2.default = void 0; var _jsYaml = _interopRequireWildcard(require_js_yaml()); var _directives = _interopRequireDefault(require_directives()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); return (_getRequireWildcardCache = function(nodeInterop2) { return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var createPatterns = (keys) => { const set = /* @__PURE__ */ new Set(); for (const k of keys) { const normalized = "_?" + k.replace(/[.*+?^=!:${}()|[\]\\/]/g, "\\$&"); set.add(normalized); set.add(`"${normalized}"`); set.add(`'${normalized}'`); } return [...set.values()]; }; var yamlSpecialChars = `["'{|>~&*`; function parse2(text) { try { const obj = _jsYaml.default.load(text, { schema: _jsYaml.FAILSAFE_SCHEMA }); if (obj === null || typeof obj !== "object") return false; return obj; } catch (e) { return false; } } function convertLoose(text, looseDirectives) { const keyPattern = `(?:${createPatterns(looseDirectives).join("|")})`; const looseMatcher = new RegExp(`^(${keyPattern}\\s*:)(.+)$`); let normalized = ""; for (const line of text.split(/\r?\n/)) normalized += `${line.replace(looseMatcher, (original, prop, value) => { const trimmed = value.trim(); if (trimmed.length === 0 || yamlSpecialChars.includes(trimmed[0])) return original; const spaceLength = value.length - value.trimLeft().length; const spaces = value.substring(0, spaceLength); return `${prop}${spaces}"${trimmed.split('"').join('\\"')}"`; })} `; return normalized.trim(); } var yaml2 = (text, looseDirectives = false) => parse2(looseDirectives ? convertLoose(text, [..._directives.default, ...Array.isArray(looseDirectives) ? looseDirectives : []]) : text); exports2.yaml = yaml2; var _default = yaml2; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/comment.js var require_comment2 = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/comment.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.comment = void 0; exports2.markAsParsed = markAsParsed; var _plugin = _interopRequireDefault(require_plugin()); var _yaml = require_yaml(); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var commentMatcher = //; var magicCommentMatchers = [ // Prettier /^prettier-ignore(-(start|end))?$/, // markdownlint /^markdownlint-((disable|enable).*|capture|restore)$/, // remark-lint (remark-message-control) /^lint (disable|enable|ignore).*$/ ]; function markAsParsed(token, kind) { token.meta = token.meta || {}; token.meta.marpitCommentParsed = kind; } function _comment(md) { const parse2 = (token, content) => { const parsed = (0, _yaml.yaml)(content, !!md.marpit.options.looseYAML); token.meta = token.meta || {}; token.meta.marpitParsedDirectives = parsed === false ? {} : parsed; for (const magicCommentMatcher of magicCommentMatchers) { if (magicCommentMatcher.test(content.trim())) { markAsParsed(token, "well-known-magic-comment"); break; } } }; md.block.ruler.before("html_block", "marpit_comment", (state, startLine, endLine, silent) => { let pos = state.bMarks[startLine] + state.tShift[startLine]; if (state.src.charCodeAt(pos) !== 60) return false; let max = state.eMarks[startLine]; let line = state.src.slice(pos, max); if (!commentMatcherOpening.test(line)) return false; if (silent) return true; let nextLine = startLine + 1; if (!commentMatcherClosing.test(line)) { while (nextLine < endLine) { if (state.sCount[nextLine] < state.blkIndent) break; pos = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; line = state.src.slice(pos, max); nextLine += 1; if (commentMatcherClosing.test(line)) break; } } state.line = nextLine; const token = state.push("marpit_comment", "", 0); token.map = [startLine, nextLine]; token.markup = state.getLines(startLine, nextLine, state.blkIndent, true); token.hidden = true; const matchedContent = commentMatcher.exec(token.markup); token.content = matchedContent ? matchedContent[1].trim() : ""; parse2(token, token.content); return true; }); md.inline.ruler.before("html_inline", "marpit_inline_comment", (state, silent) => { const { posMax, src } = state; if (state.pos + 2 >= posMax || src.charCodeAt(state.pos) !== 60 || src.charCodeAt(state.pos + 1) !== 33) return false; const match = src.slice(state.pos).match(commentMatcher); if (!match) return false; if (!silent) { const token = state.push("marpit_comment", "", 0); token.hidden = true; token.markup = src.slice(state.pos, state.pos + match[0].length); token.content = match[1].trim(); parse2(token, token.content); } state.pos += match[0].length; return true; }); } var comment = (0, _plugin.default)(_comment); exports2.comment = comment; var _default = comment; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/container.js var require_container2 = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/container.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.container = void 0; var _wrap_array = require_wrap_array(); var _wrap_tokens = require_wrap_tokens(); var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _container(md) { const containers = (0, _wrap_array.wrapArray)(md.marpit.options.container); if (!containers) return; const target = [...containers].reverse(); md.core.ruler.push("marpit_containers", (state) => { if (state.inlineMode) return; for (const cont of target) state.tokens = (0, _wrap_tokens.wrapTokens)(state.Token, "marpit_containers", cont, state.tokens); }); } var container = (0, _plugin.default)(_container); exports2.container = container; var _default = container; exports2.default = _default; } }); // node_modules/lodash.kebabcase/index.js var require_lodash = __commonJS({ "node_modules/lodash.kebabcase/index.js"(exports2, module2) { var INFINITY = 1 / 0; var symbolTag = "[object Symbol]"; var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; var rsAstralRange = "\\ud800-\\udfff"; var rsComboMarksRange = "\\u0300-\\u036f\\ufe20-\\ufe23"; var rsComboSymbolsRange = "\\u20d0-\\u20f0"; var rsDingbatRange = "\\u2700-\\u27bf"; var rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff"; var rsMathOpRange = "\\xac\\xb1\\xd7\\xf7"; var rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf"; var rsPunctuationRange = "\\u2000-\\u206f"; var rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000"; var rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde"; var rsVarRange = "\\ufe0e\\ufe0f"; var rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; var rsApos = "['\u2019]"; var rsBreak = "[" + rsBreakRange + "]"; var rsCombo = "[" + rsComboMarksRange + rsComboSymbolsRange + "]"; var rsDigits = "\\d+"; var rsDingbat = "[" + rsDingbatRange + "]"; var rsLower = "[" + rsLowerRange + "]"; var rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]"; var rsFitz = "\\ud83c[\\udffb-\\udfff]"; var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")"; var rsNonAstral = "[^" + rsAstralRange + "]"; var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}"; var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]"; var rsUpper = "[" + rsUpperRange + "]"; var rsZWJ = "\\u200d"; var rsLowerMisc = "(?:" + rsLower + "|" + rsMisc + ")"; var rsUpperMisc = "(?:" + rsUpper + "|" + rsMisc + ")"; var rsOptLowerContr = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?"; var rsOptUpperContr = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?"; var reOptMod = rsModifier + "?"; var rsOptVar = "[" + rsVarRange + "]?"; var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*"; var rsSeq = rsOptVar + reOptMod + rsOptJoin; var rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq; var reApos = RegExp(rsApos, "g"); var reComboMark = RegExp(rsCombo, "g"); var reUnicodeWord = RegExp([ rsUpper + "?" + rsLower + "+" + rsOptLowerContr + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")", rsUpperMisc + "+" + rsOptUpperContr + "(?=" + [rsBreak, rsUpper + rsLowerMisc, "$"].join("|") + ")", rsUpper + "?" + rsLowerMisc + "+" + rsOptLowerContr, rsUpper + "+" + rsOptUpperContr, rsDigits, rsEmoji ].join("|"), "g"); var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; var deburredLetters = { // Latin-1 Supplement block. "\xC0": "A", "\xC1": "A", "\xC2": "A", "\xC3": "A", "\xC4": "A", "\xC5": "A", "\xE0": "a", "\xE1": "a", "\xE2": "a", "\xE3": "a", "\xE4": "a", "\xE5": "a", "\xC7": "C", "\xE7": "c", "\xD0": "D", "\xF0": "d", "\xC8": "E", "\xC9": "E", "\xCA": "E", "\xCB": "E", "\xE8": "e", "\xE9": "e", "\xEA": "e", "\xEB": "e", "\xCC": "I", "\xCD": "I", "\xCE": "I", "\xCF": "I", "\xEC": "i", "\xED": "i", "\xEE": "i", "\xEF": "i", "\xD1": "N", "\xF1": "n", "\xD2": "O", "\xD3": "O", "\xD4": "O", "\xD5": "O", "\xD6": "O", "\xD8": "O", "\xF2": "o", "\xF3": "o", "\xF4": "o", "\xF5": "o", "\xF6": "o", "\xF8": "o", "\xD9": "U", "\xDA": "U", "\xDB": "U", "\xDC": "U", "\xF9": "u", "\xFA": "u", "\xFB": "u", "\xFC": "u", "\xDD": "Y", "\xFD": "y", "\xFF": "y", "\xC6": "Ae", "\xE6": "ae", "\xDE": "Th", "\xFE": "th", "\xDF": "ss", // Latin Extended-A block. "\u0100": "A", "\u0102": "A", "\u0104": "A", "\u0101": "a", "\u0103": "a", "\u0105": "a", "\u0106": "C", "\u0108": "C", "\u010A": "C", "\u010C": "C", "\u0107": "c", "\u0109": "c", "\u010B": "c", "\u010D": "c", "\u010E": "D", "\u0110": "D", "\u010F": "d", "\u0111": "d", "\u0112": "E", "\u0114": "E", "\u0116": "E", "\u0118": "E", "\u011A": "E", "\u0113": "e", "\u0115": "e", "\u0117": "e", "\u0119": "e", "\u011B": "e", "\u011C": "G", "\u011E": "G", "\u0120": "G", "\u0122": "G", "\u011D": "g", "\u011F": "g", "\u0121": "g", "\u0123": "g", "\u0124": "H", "\u0126": "H", "\u0125": "h", "\u0127": "h", "\u0128": "I", "\u012A": "I", "\u012C": "I", "\u012E": "I", "\u0130": "I", "\u0129": "i", "\u012B": "i", "\u012D": "i", "\u012F": "i", "\u0131": "i", "\u0134": "J", "\u0135": "j", "\u0136": "K", "\u0137": "k", "\u0138": "k", "\u0139": "L", "\u013B": "L", "\u013D": "L", "\u013F": "L", "\u0141": "L", "\u013A": "l", "\u013C": "l", "\u013E": "l", "\u0140": "l", "\u0142": "l", "\u0143": "N", "\u0145": "N", "\u0147": "N", "\u014A": "N", "\u0144": "n", "\u0146": "n", "\u0148": "n", "\u014B": "n", "\u014C": "O", "\u014E": "O", "\u0150": "O", "\u014D": "o", "\u014F": "o", "\u0151": "o", "\u0154": "R", "\u0156": "R", "\u0158": "R", "\u0155": "r", "\u0157": "r", "\u0159": "r", "\u015A": "S", "\u015C": "S", "\u015E": "S", "\u0160": "S", "\u015B": "s", "\u015D": "s", "\u015F": "s", "\u0161": "s", "\u0162": "T", "\u0164": "T", "\u0166": "T", "\u0163": "t", "\u0165": "t", "\u0167": "t", "\u0168": "U", "\u016A": "U", "\u016C": "U", "\u016E": "U", "\u0170": "U", "\u0172": "U", "\u0169": "u", "\u016B": "u", "\u016D": "u", "\u016F": "u", "\u0171": "u", "\u0173": "u", "\u0174": "W", "\u0175": "w", "\u0176": "Y", "\u0177": "y", "\u0178": "Y", "\u0179": "Z", "\u017B": "Z", "\u017D": "Z", "\u017A": "z", "\u017C": "z", "\u017E": "z", "\u0132": "IJ", "\u0133": "ij", "\u0152": "Oe", "\u0153": "oe", "\u0149": "'n", "\u017F": "ss" }; var freeGlobal = typeof global == "object" && global && global.Object === Object && global; var freeSelf = typeof self == "object" && self && self.Object === Object && self; var root = freeGlobal || freeSelf || Function("return this")(); function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array ? array.length : 0; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } function asciiWords(string) { return string.match(reAsciiWord) || []; } function basePropertyOf(object) { return function(key) { return object == null ? void 0 : object[key]; }; } var deburrLetter = basePropertyOf(deburredLetters); function hasUnicodeWord(string) { return reHasUnicodeWord.test(string); } function unicodeWords(string) { return string.match(reUnicodeWord) || []; } var objectProto = Object.prototype; var objectToString = objectProto.toString; var Symbol2 = root.Symbol; var symbolProto = Symbol2 ? Symbol2.prototype : void 0; var symbolToString = symbolProto ? symbolProto.toString : void 0; function baseToString(value) { if (typeof value == "string") { return value; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ""; } var result = value + ""; return result == "0" && 1 / value == -INFINITY ? "-0" : result; } function createCompounder(callback) { return function(string) { return arrayReduce(words(deburr(string).replace(reApos, "")), callback, ""); }; } function isObjectLike(value) { return !!value && typeof value == "object"; } function isSymbol(value) { return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; } function toString(value) { return value == null ? "" : baseToString(value); } function deburr(string) { string = toString(string); return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ""); } var kebabCase = createCompounder(function(result, word, index) { return result + (index ? "-" : "") + word.toLowerCase(); }); function words(string, pattern, guard) { string = toString(string); pattern = guard ? void 0 : pattern; if (pattern === void 0) { return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); } return string.match(pattern) || []; } module2.exports = kebabCase; } }); // node_modules/@marp-team/marpit/lib/markdown/directives/apply.js var require_apply2 = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/directives/apply.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.apply = void 0; var _lodash = _interopRequireDefault(require_lodash()); var _inline_style = _interopRequireDefault(require_inline_style()); var _plugin = _interopRequireDefault(require_plugin()); var _directives = _interopRequireDefault(require_directives()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _apply(md, opts = {}) { const { marpit } = md; const dataset = opts.dataset === void 0 ? true : !!opts.dataset; const css2 = opts.css === void 0 ? true : !!opts.css; const { global: global2, local } = marpit.customDirectives; const directives = [...Object.keys(global2), ...Object.keys(local), ..._directives.default]; md.core.ruler.after("marpit_directives_parse", "marpit_directives_apply", (state) => { if (state.inlineMode) return; for (const token of state.tokens) { const { marpitDirectives, marpitSlide, marpitSlideTotal } = token.meta || {}; if (marpitDirectives) { const style2 = new _inline_style.default(token.attrGet("style")); for (const dir of Object.keys(marpitDirectives)) { if (directives.includes(dir)) { const value = marpitDirectives[dir]; if (value) { const kebabCaseDir = (0, _lodash.default)(dir); if (dataset) token.attrSet(`data-${kebabCaseDir}`, value); if (css2) style2.set(`--${kebabCaseDir}`, value); } } } if (marpitDirectives.class) token.attrJoin("class", marpitDirectives.class); if (marpitDirectives.color) style2.set("color", marpitDirectives.color); if (marpitDirectives.backgroundColor) style2.set("background-color", marpitDirectives.backgroundColor).set("background-image", "none"); if (marpitDirectives.backgroundImage) { style2.set("background-image", marpitDirectives.backgroundImage).set("background-position", "center").set("background-repeat", "no-repeat").set("background-size", "cover"); if (marpitDirectives.backgroundPosition) style2.set("background-position", marpitDirectives.backgroundPosition); if (marpitDirectives.backgroundRepeat) style2.set("background-repeat", marpitDirectives.backgroundRepeat); if (marpitDirectives.backgroundSize) style2.set("background-size", marpitDirectives.backgroundSize); } if (marpitDirectives.paginate) { token.attrSet("data-marpit-pagination", marpitSlide + 1); token.attrSet("data-marpit-pagination-total", marpitSlideTotal); } if (marpitDirectives.header) token.meta.marpitHeader = marpitDirectives.header; if (marpitDirectives.footer) token.meta.marpitFooter = marpitDirectives.footer; const styleStr = style2.toString(); if (styleStr !== "") token.attrSet("style", styleStr); } } }); } var apply = (0, _plugin.default)(_apply); exports2.apply = apply; var _default = apply; exports2.default = _default; } }); // node_modules/markdown-it-front-matter/index.js var require_markdown_it_front_matter = __commonJS({ "node_modules/markdown-it-front-matter/index.js"(exports2, module2) { "use strict"; module2.exports = function front_matter_plugin(md, cb) { var min_markers = 3, marker_str = "-", marker_char = marker_str.charCodeAt(0), marker_len = marker_str.length; function frontMatter(state, startLine, endLine, silent) { var pos, nextLine, marker_count, token, old_parent, old_line_max, start_content, auto_closed = false, start = state.bMarks[startLine] + state.tShift[startLine], max = state.eMarks[startLine]; if (startLine !== 0 || marker_char !== state.src.charCodeAt(0)) { return false; } for (pos = start + 1; pos <= max; pos++) { if (marker_str[(pos - start) % marker_len] !== state.src[pos]) { start_content = pos + 1; break; } } marker_count = Math.floor((pos - start) / marker_len); if (marker_count < min_markers) { return false; } pos -= (pos - start) % marker_len; if (silent) { return true; } nextLine = startLine; for (; ; ) { nextLine++; if (nextLine >= endLine) { break; } if (state.src.slice(start, max) === "...") { break; } start = state.bMarks[nextLine] + state.tShift[nextLine]; max = state.eMarks[nextLine]; if (start < max && state.sCount[nextLine] < state.blkIndent) { break; } if (marker_char !== state.src.charCodeAt(start)) { continue; } if (state.sCount[nextLine] - state.blkIndent >= 4) { continue; } for (pos = start + 1; pos <= max; pos++) { if (marker_str[(pos - start) % marker_len] !== state.src[pos]) { break; } } if (Math.floor((pos - start) / marker_len) < marker_count) { continue; } pos -= (pos - start) % marker_len; pos = state.skipSpaces(pos); if (pos < max) { continue; } auto_closed = true; break; } old_parent = state.parentType; old_line_max = state.lineMax; state.parentType = "container"; state.lineMax = nextLine; token = state.push("front_matter", null, 0); token.hidden = true; token.markup = state.src.slice(startLine, pos); token.block = true; token.map = [startLine, pos]; token.meta = state.src.slice(start_content, start - 1); state.parentType = old_parent; state.lineMax = old_line_max; state.line = nextLine + (auto_closed ? 1 : 0); cb(token.meta); return true; } md.block.ruler.before( "table", "front_matter", frontMatter, { alt: [ "paragraph", "reference", "blockquote", "list" ] } ); }; } }); // node_modules/@marp-team/marpit/lib/markdown/directives/parse.js var require_parse4 = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/directives/parse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parse = exports2.default = void 0; var _markdownItFrontMatter = _interopRequireDefault(require_markdown_it_front_matter()); var _plugin = _interopRequireDefault(require_plugin()); var _comment = require_comment2(); var directives = _interopRequireWildcard(require_directives()); var _yaml = require_yaml(); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = /* @__PURE__ */ new WeakMap(); var cacheNodeInterop = /* @__PURE__ */ new WeakMap(); return (_getRequireWildcardCache = function(nodeInterop2) { return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var isDirectiveComment = (token) => token.type === "marpit_comment" && token.meta.marpitParsedDirectives; function _parse(md, opts = {}) { const { marpit } = md; const applyBuiltinDirectives = (newProps, builtinDirectives) => { let ret = {}; for (const prop of Object.keys(newProps)) { if (builtinDirectives[prop]) { ret = { ...ret, ...builtinDirectives[prop](newProps[prop], marpit) }; } else { ret[prop] = newProps[prop]; } } return ret; }; const frontMatter = opts.frontMatter === void 0 ? true : !!opts.frontMatter; let frontMatterObject = {}; if (frontMatter) { md.core.ruler.before("block", "marpit_directives_front_matter", (state) => { frontMatterObject = {}; if (!state.inlineMode) marpit.lastGlobalDirectives = {}; }); md.use(_markdownItFrontMatter.default, (fm) => { frontMatterObject.text = fm; const parsed = (0, _yaml.yaml)(fm, marpit.options.looseYAML ? [...Object.keys(marpit.customDirectives.global), ...Object.keys(marpit.customDirectives.local)] : false); if (parsed !== false) frontMatterObject.yaml = parsed; }); } md.core.ruler.after("inline", "marpit_directives_global_parse", (state) => { if (state.inlineMode) return; let globalDirectives = {}; const applyDirectives = (obj) => { let recognized = false; for (const key of Object.keys(obj)) { if (directives.globals[key]) { recognized = true; globalDirectives = { ...globalDirectives, ...directives.globals[key](obj[key], marpit) }; } else if (marpit.customDirectives.global[key]) { recognized = true; globalDirectives = { ...globalDirectives, ...applyBuiltinDirectives(marpit.customDirectives.global[key](obj[key], marpit), directives.globals) }; } } return recognized; }; if (frontMatterObject.yaml) applyDirectives(frontMatterObject.yaml); for (const token of state.tokens) { if (isDirectiveComment(token) && applyDirectives(token.meta.marpitParsedDirectives)) { (0, _comment.markAsParsed)(token, "directive"); } else if (token.type === "inline") { for (const t of token.children) { if (isDirectiveComment(t) && applyDirectives(t.meta.marpitParsedDirectives)) (0, _comment.markAsParsed)(t, "directive"); } } } marpit.lastGlobalDirectives = { ...globalDirectives }; }); md.core.ruler.after("marpit_slide", "marpit_directives_parse", (state) => { if (state.inlineMode) return; const slides = []; const cursor = { slide: void 0, local: {}, spot: {} }; const applyDirectives = (obj) => { let recognized = false; for (const key of Object.keys(obj)) { if (directives.locals[key]) { recognized = true; cursor.local = { ...cursor.local, ...directives.locals[key](obj[key], marpit) }; } else if (marpit.customDirectives.local[key]) { recognized = true; cursor.local = { ...cursor.local, ...applyBuiltinDirectives(marpit.customDirectives.local[key](obj[key], marpit), directives.locals) }; } if (key.startsWith("_")) { const spotKey = key.slice(1); if (directives.locals[spotKey]) { recognized = true; cursor.spot = { ...cursor.spot, ...directives.locals[spotKey](obj[key], marpit) }; } else if (marpit.customDirectives.local[spotKey]) { recognized = true; cursor.spot = { ...cursor.spot, ...applyBuiltinDirectives(marpit.customDirectives.local[spotKey](obj[key], marpit), directives.locals) }; } } } return recognized; }; if (frontMatterObject.yaml) applyDirectives(frontMatterObject.yaml); for (const token of state.tokens) { if (token.meta && token.meta.marpitSlideElement === 1) { token.meta.marpitDirectives = {}; slides.push(token); cursor.slide = token; } else if (token.meta && token.meta.marpitSlideElement === -1) { cursor.slide.meta.marpitDirectives = { ...cursor.slide.meta.marpitDirectives, ...cursor.local, ...cursor.spot }; cursor.spot = {}; } else if (isDirectiveComment(token) && applyDirectives(token.meta.marpitParsedDirectives)) { (0, _comment.markAsParsed)(token, "directive"); } else if (token.type === "inline") { for (const t of token.children) { if (isDirectiveComment(t) && applyDirectives(t.meta.marpitParsedDirectives)) (0, _comment.markAsParsed)(t, "directive"); } } } for (const token of slides) token.meta.marpitDirectives = { ...token.meta.marpitDirectives, ...marpit.lastGlobalDirectives }; }); } var parse2 = (0, _plugin.default)(_parse); exports2.parse = parse2; var _default = parse2; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/fragment.js var require_fragment = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/fragment.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fragment = exports2.default = void 0; var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var fragmentedListMarkups = ["*", ")"]; function _fragment(md) { md.core.ruler.after("marpit_directives_parse", "marpit_fragment", (state) => { if (state.inlineMode) return; for (const token of state.tokens) { if (token.type === "list_item_open" && fragmentedListMarkups.includes(token.markup)) { token.meta = token.meta || {}; token.meta.marpitFragment = true; } } }); md.core.ruler.after("marpit_fragment", "marpit_apply_fragment", (state) => { if (state.inlineMode) return; const fragments = { slide: void 0, count: 0 }; for (const token of state.tokens) { if (token.meta && token.meta.marpitSlideElement === 1) { fragments.slide = token; fragments.count = 0; } else if (token.meta && token.meta.marpitSlideElement === -1) { if (fragments.slide && fragments.count > 0) { fragments.slide.attrSet("data-marpit-fragments", fragments.count); } } else if (token.meta && token.meta.marpitFragment) { fragments.count += 1; token.meta.marpitFragment = fragments.count; token.attrSet("data-marpit-fragment", fragments.count); } } }); } var fragment = (0, _plugin.default)(_fragment); exports2.fragment = fragment; var _default = fragment; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/header_and_footer.js var require_header_and_footer = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/header_and_footer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.headerAndFooter = exports2.default = void 0; var _wrap_tokens = require_wrap_tokens(); var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _headerAndFooter(md) { md.core.ruler.after("marpit_directives_apply", "marpit_header_and_footer", (state) => { if (state.inlineMode) return; const parsedInlines = /* @__PURE__ */ new Map(); const getParsed = (markdown) => { let parsed = parsedInlines.get(markdown); if (!parsed) { parsed = md.parseInline(markdown, state.env); delete parsed.map; parsedInlines.set(markdown, parsed); } return parsed; }; const createMarginalTokens = (tag, markdown) => (0, _wrap_tokens.wrapTokens)(state.Token, `marpit_${tag}`, { tag, close: { block: true } }, getParsed(markdown)); let current; const newTokens = []; for (const token of state.tokens) { if (token.type === "marpit_slide_open") { current = token; newTokens.push(token); if (current.meta && current.meta.marpitHeader) newTokens.push(...createMarginalTokens("header", current.meta.marpitHeader)); } else if (token.type === "marpit_slide_close") { if (current.meta && current.meta.marpitFooter) newTokens.push(...createMarginalTokens("footer", current.meta.marpitFooter)); newTokens.push(token); } else { newTokens.push(token); } } state.tokens = newTokens; }); } var headerAndFooter = (0, _plugin.default)(_headerAndFooter); exports2.headerAndFooter = headerAndFooter; var _default = headerAndFooter; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/helpers/split.js var require_split = __commonJS({ "node_modules/@marp-team/marpit/lib/helpers/split.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = void 0; exports2.split = split; function split(arr, func, keepSplitedValue = false) { const ret = [[]]; for (const value of arr) { if (func(value)) { ret.push(keepSplitedValue ? [value] : []); } else { ret[ret.length - 1].push(value); } } return ret; } var _default = split; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/heading_divider.js var require_heading_divider = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/heading_divider.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.headingDivider = exports2.default = void 0; var _split = require_split(); var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _headingDivider(md) { const { marpit } = md; md.core.ruler.before("marpit_slide", "marpit_heading_divider", (state) => { let target = marpit.options.headingDivider; if (marpit.lastGlobalDirectives && Object.prototype.hasOwnProperty.call(marpit.lastGlobalDirectives, "headingDivider")) target = marpit.lastGlobalDirectives.headingDivider; if (state.inlineMode || target === false) return; if (Number.isInteger(target) && target >= 1 && target <= 6) target = [...Array(target).keys()].map((i) => i + 1); if (!Array.isArray(target)) return; const splitTag = target.map((i) => `h${i}`); const splitFunc = (t) => t.type === "heading_open" && splitTag.includes(t.tag); const newTokens = []; for (const slideTokens of (0, _split.split)(state.tokens, splitFunc, true)) { const [token] = slideTokens; if (token && splitFunc(token) && newTokens.some((t) => !t.hidden)) { const hr = new state.Token("hr", "", 0); hr.hidden = true; hr.map = token.map; newTokens.push(hr); } newTokens.push(...slideTokens); } state.tokens = newTokens; }); } var headingDivider = (0, _plugin.default)(_headingDivider); exports2.headingDivider = headingDivider; var _default = headingDivider; exports2.default = _default; } }); // node_modules/@marp-team/marpit/lib/markdown/image/apply.js var require_apply3 = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/image/apply.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = exports2.applyImage = void 0; var _inline_style = _interopRequireDefault(require_inline_style()); var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _applyImage(md) { md.inline.ruler2.push("marpit_apply_image", ({ tokens }) => { for (const token of tokens) { if (token.type === "image") { const { filters, height, width } = token.meta.marpitImage; const style2 = new _inline_style.default(token.attrGet("style")); if (width && !width.endsWith("%")) style2.set("width", width); if (height && !height.endsWith("%")) style2.set("height", height); if (filters) { const filterStyle = []; for (const fltrs of filters) filterStyle.push(`${fltrs[0]}(${fltrs[1]})`); token.meta.marpitImage.filter = filterStyle.join(" "); style2.set("filter", token.meta.marpitImage.filter); } const stringified = style2.toString(); if (stringified) token.attrSet("style", stringified); } } }); md.core.ruler.after("marpit_inline_svg", "marpit_apply_color", ({ inlineMode, tokens }) => { if (inlineMode) return; let current; for (const t of tokens) { if (t.type === "marpit_slide_open") current = t; if (t.type === "marpit_slide_close") current = void 0; if (current && t.type === "inline") { for (const tc of t.children) { if (tc.type === "image") { const { background, color } = tc.meta.marpitImage; if (!background && color) { current.meta.marpitDirectives = { ...current.meta.marpitDirectives || {}, color }; } } } } } }); } var applyImage = (0, _plugin.default)(_applyImage); exports2.applyImage = applyImage; var _default = applyImage; exports2.default = _default; } }); // node_modules/color-name/index.js var require_color_name = __commonJS({ "node_modules/color-name/index.js"(exports2, module2) { "use strict"; module2.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; } }); // node_modules/simple-swizzle/node_modules/is-arrayish/index.js var require_is_arrayish = __commonJS({ "node_modules/simple-swizzle/node_modules/is-arrayish/index.js"(exports2, module2) { module2.exports = function isArrayish(obj) { if (!obj || typeof obj === "string") { return false; } return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String"); }; } }); // node_modules/simple-swizzle/index.js var require_simple_swizzle = __commonJS({ "node_modules/simple-swizzle/index.js"(exports2, module2) { "use strict"; var isArrayish = require_is_arrayish(); var concat = Array.prototype.concat; var slice = Array.prototype.slice; var swizzle = module2.exports = function swizzle2(args) { var results = []; for (var i = 0, len = args.length; i < len; i++) { var arg = args[i]; if (isArrayish(arg)) { results = concat.call(results, slice.call(arg)); } else { results.push(arg); } } return results; }; swizzle.wrap = function(fn) { return function() { return fn(swizzle(arguments)); }; }; } }); // node_modules/color-string/index.js var require_color_string = __commonJS({ "node_modules/color-string/index.js"(exports2, module2) { var colorNames = require_color_name(); var swizzle = require_simple_swizzle(); var hasOwnProperty = Object.hasOwnProperty; var reverseNames = /* @__PURE__ */ Object.create(null); for (name in colorNames) { if (hasOwnProperty.call(colorNames, name)) { reverseNames[colorNames[name]] = name; } } var name; var cs = module2.exports = { to: {}, get: {} }; cs.get = function(string) { var prefix = string.substring(0, 3).toLowerCase(); var val; var model; switch (prefix) { case "hsl": val = cs.get.hsl(string); model = "hsl"; break; case "hwb": val = cs.get.hwb(string); model = "hwb"; break; default: val = cs.get.rgb(string); model = "rgb"; break; } if (!val) { return null; } return { model, value: val }; }; cs.get.rgb = function(string) { if (!string) { return null; } var abbr = /^#([a-f0-9]{3,4})$/i; var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; var keyword = /^(\w+)$/; var rgb = [0, 0, 0, 1]; var match; var i; var hexAlpha; if (match = string.match(hex)) { hexAlpha = match[2]; match = match[1]; for (i = 0; i < 3; i++) { var i2 = i * 2; rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); } if (hexAlpha) { rgb[3] = parseInt(hexAlpha, 16) / 255; } } else if (match = string.match(abbr)) { match = match[1]; hexAlpha = match[3]; for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i] + match[i], 16); } if (hexAlpha) { rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255; } } else if (match = string.match(rgba)) { for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i + 1], 0); } if (match[4]) { if (match[5]) { rgb[3] = parseFloat(match[4]) * 0.01; } else { rgb[3] = parseFloat(match[4]); } } } else if (match = string.match(per)) { for (i = 0; i < 3; i++) { rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); } if (match[4]) { if (match[5]) { rgb[3] = parseFloat(match[4]) * 0.01; } else { rgb[3] = parseFloat(match[4]); } } } else if (match = string.match(keyword)) { if (match[1] === "transparent") { return [0, 0, 0, 0]; } if (!hasOwnProperty.call(colorNames, match[1])) { return null; } rgb = colorNames[match[1]]; rgb[3] = 1; return rgb; } else { return null; } for (i = 0; i < 3; i++) { rgb[i] = clamp(rgb[i], 0, 255); } rgb[3] = clamp(rgb[3], 0, 1); return rgb; }; cs.get.hsl = function(string) { if (!string) { return null; } var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; var match = string.match(hsl); if (match) { var alpha = parseFloat(match[4]); var h = (parseFloat(match[1]) % 360 + 360) % 360; var s = clamp(parseFloat(match[2]), 0, 100); var l = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, s, l, a]; } return null; }; cs.get.hwb = function(string) { if (!string) { return null; } var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; var match = string.match(hwb); if (match) { var alpha = parseFloat(match[4]); var h = (parseFloat(match[1]) % 360 + 360) % 360; var w = clamp(parseFloat(match[2]), 0, 100); var b = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, w, b, a]; } return null; }; cs.to.hex = function() { var rgba = swizzle(arguments); return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : ""); }; cs.to.rgb = function() { var rgba = swizzle(arguments); return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")"; }; cs.to.rgb.percent = function() { var rgba = swizzle(arguments); var r = Math.round(rgba[0] / 255 * 100); var g = Math.round(rgba[1] / 255 * 100); var b = Math.round(rgba[2] / 255 * 100); return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r + "%, " + g + "%, " + b + "%)" : "rgba(" + r + "%, " + g + "%, " + b + "%, " + rgba[3] + ")"; }; cs.to.hsl = function() { var hsla = swizzle(arguments); return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")"; }; cs.to.hwb = function() { var hwba = swizzle(arguments); var a = ""; if (hwba.length >= 4 && hwba[3] !== 1) { a = ", " + hwba[3]; } return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a + ")"; }; cs.to.keyword = function(rgb) { return reverseNames[rgb.slice(0, 3)]; }; function clamp(num, min, max) { return Math.min(Math.max(min, num), max); } function hexDouble(num) { var str2 = Math.round(num).toString(16).toUpperCase(); return str2.length < 2 ? "0" + str2 : str2; } } }); // node_modules/@marp-team/marpit/lib/markdown/image/parse.js var require_parse5 = __commonJS({ "node_modules/@marp-team/marpit/lib/markdown/image/parse.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseImage = exports2.default = void 0; var _colorString = _interopRequireDefault(require_color_string()); var _plugin = _interopRequireDefault(require_plugin()); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var escape2 = (target) => target.replace(/[\\;:()]/g, (matched) => `\\${matched[0].codePointAt(0).toString(16)} `); var optionMatchers = /* @__PURE__ */ new Map(); optionMatchers.set(/^(\d*\.)?\d+%$/, (matches) => ({ size: matches[0] })); var normalizeLength = (v) => `${v}${/^(\d*\.)?\d+$/.test(v) ? "px" : ""}`; optionMatchers.set(/^w(?:idth)?:((?:\d*\.)?\d+(?:%|ch|cm|em|ex|in|mm|pc|pt|px)?|auto)$/, (matches) => ({ width: normalizeLength(matches[1]) })); optionMatchers.set(/^h(?:eight)?:((?:\d*\.)?\d+(?:%|ch|cm|em|ex|in|mm|pc|pt|px)?|auto)$/, (matches) => ({ height: normalizeLength(matches[1]) })); optionMatchers.set(/^blur(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["blur", escape2(matches[1] || "10px")]] })); optionMatchers.set(/^brightness(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["brightness", escape2(matches[1] || "1.5")]] })); optionMatchers.set(/^contrast(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["contrast", escape2(matches[1] || "2")]] })); optionMatchers.set(/^drop-shadow(?::(.+?),(.+?)(?:,(.+?))?(?:,(.+?))?)?$/, (matches, meta) => { const args = []; for (const arg of matches.slice(1)) { if (arg) { const colorFunc = arg.match(/^(rgba?|hsla?|hwb|(?:ok)?(?:lab|lch)|color)\((.*)\)$/); args.push(colorFunc ? `${colorFunc[1]}(${escape2(colorFunc[2])})` : escape2(arg)); } } return { filters: [...meta.filters, ["drop-shadow", args.join(" ") || "0 5px 10px rgba(0,0,0,.4)"]] }; }); optionMatchers.set(/^grayscale(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["grayscale", escape2(matches[1] || "1")]] })); optionMatchers.set(/^hue-rotate(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["hue-rotate", escape2(matches[1] || "180deg")]] })); optionMatchers.set(/^invert(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["invert", escape2(matches[1] || "1")]] })); optionMatchers.set(/^opacity(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["opacity", escape2(matches[1] || ".5")]] })); optionMatchers.set(/^saturate(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["saturate", escape2(matches[1] || "2")]] })); optionMatchers.set(/^sepia(?::(.+))?$/, (matches, meta) => ({ filters: [...meta.filters, ["sepia", escape2(matches[1] || "1")]] })); function _parseImage(md) { const { process: process2 } = md.core; let originalURLMap; let refCount = 0; const finalizeTokenAttr = (token, state) => { if (token.attrs && Array.isArray(token.attrs)) { token.attrs = token.attrs.map(([name, value]) => [name, value.toString()]); } if (token.type === "inline") { for (const t of token.children) finalizeTokenAttr(t, state); } if (token.type === "image" && token.meta && token.meta.marpitImage) { let updatedAlt = ""; let hasConsumed = false; for (const opt of token.meta.marpitImage.options) { if (opt.consumed) { hasConsumed = true; } else { updatedAlt += opt.leading + opt.content; } } if (hasConsumed) { let newTokens = []; md.inline.parse(updatedAlt.trimLeft(), state.md, state.env, newTokens); token.children = newTokens; } } }; md.core.process = (state) => { const { normalizeLink } = md; if (refCount === 0) originalURLMap = /* @__PURE__ */ new WeakMap(); try { md.normalizeLink = (url2) => { const imprimitiveUrl = new String(normalizeLink.call(md, url2)); originalURLMap.set(imprimitiveUrl, url2); return imprimitiveUrl; }; refCount += 1; return process2.call(md.core, state); } finally { refCount -= 1; md.normalizeLink = normalizeLink; if (refCount === 0) { for (const token of state.tokens) finalizeTokenAttr(token, state); } } }; md.inline.ruler2.push("marpit_parse_image", ({ tokens }) => { for (const token of tokens) { if (token.type === "image") { const optsBase = token.content.split(/(\s+)/); let currentIdx = 0; let leading = ""; const options2 = optsBase.reduce((acc, opt, i) => { if (i % 2 === 0 && opt.length > 0) { currentIdx += leading.length; acc.push({ content: opt, index: currentIdx, leading, consumed: false }); leading = ""; currentIdx += opt.length; } else { leading += opt; } return acc; }, []); const url2 = token.attrGet("src"); const originalUrl = originalURLMap.has(url2) ? originalURLMap.get(url2) : url2; token.meta = token.meta || {}; token.meta.marpitImage = { ...token.meta.marpitImage || {}, url: url2.toString(), options: options2 }; if (!!_colorString.default.get(originalUrl) || originalUrl.toLowerCase() === "currentcolor") { const replacedDirective = options2.some((opt) => opt.content === "bg") ? "backgroundColor" : "color"; console.warn(`Deprecation warning: Shorthand for setting colors via Markdown image syntax is deprecated now, and will remove in next major release. Please replace to a scoped local direcitve , or use the scoped style \\n
\\n \\n \\n \\n
\\n `.split(/\\n\\s*/).join(""),this.wrapper=null!==(t=this.shadowRoot.querySelector(`div[${e}]`))&&void 0!==t?t:void 0;const l=this.svg;this.svg=null!==(o=null===(s=this.wrapper)||void 0===s?void 0:s.querySelector(`svg[${i}]`))&&void 0!==o?o:void 0,this.svg!==l&&(this.svgComputedStyle=this.svg?window.getComputedStyle(this.svg):void 0),this.container=null!==(a=null===(r=this.svg)||void 0===r?void 0:r.querySelector(`span[${n}]`))&&void 0!==a?a:void 0,this.observe()}disconnectedCallback(){this.svg=void 0,this.svgComputedStyle=void 0,this.wrapper=void 0,this.container=void 0,this.observe()}attributeChangedCallback(){this.observe()}flushSvgDisplay(){const{svg:t}=this;t&&(t.style.display="inline",requestAnimationFrame((()=>{t.style.display=""})))}observe(){this.containerObserver.disconnect(),this.wrapperObserver.disconnect(),this.wrapper&&this.wrapperObserver.observe(this.wrapper),this.container&&this.containerObserver.observe(this.container),this.svgComputedStyle&&this.observeSVGStyle(this.svgComputedStyle)}observeSVGStyle(t){const e=()=>{const i=(()=>{const e=t.getPropertyValue("--preserve-aspect-ratio");if(e)return e.trim();return`x${(({textAlign:t,direction:e})=>{if(t.endsWith("left"))return"Min";if(t.endsWith("right"))return"Max";if("start"===t||"end"===t){let i="rtl"===e;return"end"===t&&(i=!i),i?"Max":"Min"}return"Mid"})(t)}YMid meet`})();i!==this.svgPreserveAspectRatio&&(this.svgPreserveAspectRatio=i,this.updateSVGRect()),t===this.svgComputedStyle&&requestAnimationFrame(e)};e()}updateSVGRect(){var t,e,i,n,s,o,r;let a=Math.ceil(null!==(e=null===(t=this.containerSize)||void 0===t?void 0:t.width)&&void 0!==e?e:0);const l=Math.ceil(null!==(n=null===(i=this.containerSize)||void 0===i?void 0:i.height)&&void 0!==n?n:0);void 0!==this.dataset.downscaleOnly&&(a=Math.max(a,null!==(o=null===(s=this.wrapperSize)||void 0===s?void 0:s.width)&&void 0!==o?o:0));const c=null===(r=this.svg)||void 0===r?void 0:r.querySelector(":scope > foreignObject");if(null==c||c.setAttribute("width",`${a}`),null==c||c.setAttribute("height",`${l}`),this.svg&&(this.svg.setAttribute("viewBox",`0 0 ${a} ${l}`),this.svg.setAttribute("preserveAspectRatio",this.svgPreserveAspectRatio),this.svg.style.height=a<=0||l<=0?"0":""),this.container){const t=this.svgPreserveAspectRatio.toLowerCase();this.container.style.marginLeft=t.startsWith("xmid")||t.startsWith("xmax")?"auto":"0",this.container.style.marginRight=t.startsWith("xmi")?"auto":"0"}}}const o=(t,{attrs:e={},style:i})=>class extends t{constructor(...t){super(...t);for(const[t,i]of Object.entries(e))this.hasAttribute(t)||this.setAttribute(t,i);this.attachShadow({mode:"open"})}static get observedAttributes(){return["data-auto-scaling"]}connectedCallback(){this._update()}attributeChangedCallback(){this._update()}_update(){const t=i?``:"";let e="";const{autoScaling:n}=this.dataset;if(void 0!==n){e=`${e}`}this.shadowRoot.innerHTML=t+e}};let r;const a=Symbol();let l;const c="marpitSVGPolyfill:setZoomFactor,",d=Symbol(),g=Symbol();const h=()=>{const t="Apple Computer, Inc."===navigator.vendor,e=t?[u]:[],i={then:e=>(t?(async()=>{if(void 0===l){const t=document.createElement("canvas");t.width=10,t.height=10;const e=t.getContext("2d"),i=new Image(10,10),n=new Promise((t=>{i.addEventListener("load",(()=>t()))}));i.crossOrigin="anonymous",i.src="data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%201%201%22%3E%3CforeignObject%20width%3D%221%22%20height%3D%221%22%20requiredExtensions%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cdiv%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%20style%3D%22width%3A%201px%3B%20height%3A%201px%3B%20background%3A%20red%3B%20position%3A%20relative%22%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fsvg%3E",await n,e.drawImage(i,0,0),l=e.getImageData(5,5,1,1).data[3]<128}return l})().then((t=>{null==e||e(t?[u]:[])})):null==e||e([]),i)};return Object.assign(e,i)};let p,m;function u(t){const e="object"==typeof t&&t.target||document,i="object"==typeof t?t.zoom:t;window[g]||(Object.defineProperty(window,g,{configurable:!0,value:!0}),document.body.style.zoom=1.0001,document.body.offsetHeight,document.body.style.zoom=1,window.addEventListener("message",(({data:t,origin:e})=>{if(e===window.origin)try{if(t&&"string"==typeof t&&t.startsWith(c)){const[,e]=t.split(","),i=Number.parseFloat(e);Number.isNaN(i)||(m=i)}}catch(t){console.error(t)}})));let n=!1;Array.from(e.querySelectorAll("svg[data-marpit-svg]"),(t=>{var e,s,o,r;t.style.transform||(t.style.transform="translateZ(0)");const a=i||m||t.currentScale||1;p!==a&&(p=a,n=a);const l=t.getBoundingClientRect(),{length:c}=t.children;for(let i=0;i{null==t||t.postMessage(`${c}${n}`,"null"===window.origin?"*":window.origin)}))}function v({once:t=!1,target:e=document}={}){const i=function(t=document){if(t[d])return t[d];let e=!0;const i=()=>{e=!1,delete t[d]};Object.defineProperty(t,d,{configurable:!0,value:i});let n=[],s=!1;(async()=>{try{n=await h()}finally{s=!0}})();const o=()=>{for(const e of n)e({target:t});s&&0===n.length||e&&window.requestAnimationFrame(o)};return o(),i}(e);return t?(i(),()=>{}):i}p=1,m=void 0;const b=Symbol(),w=(e=document)=>{if("undefined"==typeof window)throw new Error("Marp Core\'s browser script is valid only in browser context.");if(((e=document)=>{const i=window[a];i||customElements.define("marp-auto-scaling",s);for(const n of Object.keys(t)){const s=`marp-${n}`,a=t[n].proto();null!=r||(r=!!document.createElement("div",{is:"marp-auto-scaling"}).outerHTML.startsWith("
{t.outerHTML=t.outerHTML.replace(new RegExp(`^<${n}`,"i"),`<${s}`).replace(new RegExp(`$`,"i"),``)})))}window[a]=!0})(e),e[b])return e[b];const i=v({target:e}),n=()=>{i(),delete e[b]},l=Object.assign(n,{cleanup:n,update:()=>w(e)});return Object.defineProperty(e,b,{configurable:!0,value:l}),l},y=document.currentScript;w(y?y.getRootNode():document)}();\n'; var At = { source: "inline" }; function Bt(e2) { const n2 = e2.marpit, t2 = false !== n2.options.script && (true === n2.options.script ? At : { ...At, ...n2.options.script }); e2.core.ruler.before("marpit_collect", "marp_core_script", (e3) => { if (false === t2) return; const n3 = [...e3.tokens].reverse().findIndex((e4) => "marpit_slide_close" === e4.type); if (n3 < 0) return; const r3 = e3.tokens[e3.tokens.length - n3 - 1], { Token: o2 } = e3, i2 = new o2("marp_core_script", "script", 0); i2.block = true, i2.nesting = 0, "inline" === t2.source ? i2.content = jt : "cdn" === t2.source && (i2.attrSet("src", `https://cdn.jsdelivr.net/npm/${St}@${Tt}/lib/browser.js`), i2.attrSet("defer", "")), t2.nonce && i2.attrSet("nonce", t2.nonce), r3.meta = r3.meta || {}, r3.meta.marpCoreScriptTokens = r3.meta.marpCoreScriptTokens || [], r3.meta.marpCoreScriptTokens.push(i2); }); const { marpit_slide_close: r2 } = e2.renderer.rules; e2.renderer.rules.marpit_slide_close = (e3, n3, t3, o2, i2) => { var a2; const s2 = (r2 || i2.renderToken).call(i2, e3, n3, t3, o2, i2), u2 = e3[n3]; return (null === (a2 = null == u2 ? void 0 : u2.meta) || void 0 === a2 ? void 0 : a2.marpCoreScriptTokens) ? `${s2}${u2.meta.marpCoreScriptTokens.filter((e4) => "marp_core_script" === e4.type).map((e4) => `${e4.content || ""}<\/script>`).join("")}` : s2; }; } var Ot = Symbol("marp-size-plugin"); var Mt = r((n2) => { const t2 = n2.marpit, { render: r2 } = t2, o2 = { themes: /* @__PURE__ */ new Set(), default: void 0 }; Object.defineProperty(t2.customDirectives.global, "size", { value: (e2) => "string" == typeof e2 ? { size: e2 } : {} }), t2.render = (...e2) => { try { return r2.apply(t2, e2); } finally { o2.themes.forEach((e3) => t2.themeSet.addTheme(e3)), o2.default && (t2.themeSet.default = o2.default); } }, n2.core.ruler.after("marpit_directives_global_parse", "marp_size", (n3) => { if (n3.inlineMode) return; o2.themes.clear(), o2.default = void 0; const { theme: r3, size: i2 } = t2.lastGlobalDirectives; if (!i2) return; const a2 = t2.themeSet.get(r3, true), s2 = ((e2) => { const n4 = t2.themeSet.getThemeMeta(e2, "size") || [], r4 = /* @__PURE__ */ new Map(); for (const e3 of n4) { const n5 = e3.split(/\s+/); 3 === n5.length ? r4.set(n5[0], { width: n5[1], height: n5[2] }) : 2 === n5.length && "false" === n5[1] && r4.delete(n5[0]); } return r4; })(a2).get(i2); if (s2) { n3[Ot] = i2; const { width: r4, height: u2 } = s2, d2 = `${a2.css} section{width:${r4};height:${u2};}`, c2 = Object.assign(new e.Theme(), { ...a2, ...s2, css: d2 }); o2.themes.add(a2), a2 === t2.themeSet.default && (o2.default = a2, t2.themeSet.default = c2), t2.themeSet.has(c2.name) && t2.themeSet.addTheme(c2); } }), n2.core.ruler.after("marpit_directives_apply", "marp_size_apply", (e2) => { if (!e2.inlineMode && e2[Ot]) for (const n3 of e2.tokens) { const { marpitDirectives: t3 } = n3.meta || {}; t3 && n3.attrSet("data-size", e2[Ot]); } }), n2.core.ruler.after("marpit_advanced_background", "marp_size_apply_advanced_background", (e2) => { if (!e2.inlineMode && e2[Ot]) for (const n3 of e2.tokens) "marpit_advanced_pseudo_section_open" === n3.type && n3.attrSet("data-size", e2[Ot]); }); }); var It = class extends e.Marpit { constructor(e2 = {}) { var n2; const t2 = { breaks: true, linkify: true, highlight: (e3, n3, t3) => this.highlighter(e3, n3, t3), html: null !== (n2 = e2.html) && void 0 !== n2 ? n2 : It.html, ..."object" == typeof e2.markdown ? e2.markdown : {} }; super({ inlineSVG: true, looseYAML: true, math: true, minifyCSS: true, script: true, ...e2, emoji: { shortcode: "twemoji", unicode: "twemoji", ...e2.emoji || {} }, markdown: ["commonmark", t2] }), this.markdown.enable(["table", "linkify", "strikethrough"]), this.markdown.linkify.set({ fuzzyLink: false }), t2.typographer && this.markdown.enable(["replacements", "smartquotes"]), this.themeSet.metaType = Object.freeze({ "auto-scaling": String, size: Array }), this.themeSet.default = this.themeSet.add(`/*! * Marp default theme. * * @theme default * @author Yuki Hattori * * @auto-scaling true * @size 16:9 1280px 720px * @size 4:3 960px 720px */ section{ --color-prettylights-syntax-comment:#6e7781; --color-prettylights-syntax-constant:#0550ae; --color-prettylights-syntax-entity:#8250df; --color-prettylights-syntax-storage-modifier-import:#24292f; --color-prettylights-syntax-entity-tag:#116329; --color-prettylights-syntax-keyword:#cf222e; --color-prettylights-syntax-string:#0a3069; --color-prettylights-syntax-variable:#953800; --color-prettylights-syntax-brackethighlighter-unmatched:#82071e; --color-prettylights-syntax-invalid-illegal-text:#f6f8fa; --color-prettylights-syntax-invalid-illegal-bg:#82071e; --color-prettylights-syntax-carriage-return-text:#f6f8fa; --color-prettylights-syntax-carriage-return-bg:#cf222e; --color-prettylights-syntax-string-regexp:#116329; --color-prettylights-syntax-markup-list:#3b2300; --color-prettylights-syntax-markup-heading:#0550ae; --color-prettylights-syntax-markup-italic:#24292f; --color-prettylights-syntax-markup-bold:#24292f; --color-prettylights-syntax-markup-deleted-text:#82071e; --color-prettylights-syntax-markup-deleted-bg:#ffebe9; --color-prettylights-syntax-markup-inserted-text:#116329; --color-prettylights-syntax-markup-inserted-bg:#dafbe1; --color-prettylights-syntax-markup-changed-text:#953800; --color-prettylights-syntax-markup-changed-bg:#ffd8b5; --color-prettylights-syntax-markup-ignored-text:#eaeef2; --color-prettylights-syntax-markup-ignored-bg:#0550ae; --color-prettylights-syntax-meta-diff-range:#8250df; --color-prettylights-syntax-brackethighlighter-angle:#57606a; --color-prettylights-syntax-sublimelinter-gutter-mark:#8c959f; --color-prettylights-syntax-constant-other-reference-link:#0a3069; --color-fg-default:#24292f; --color-fg-muted:#57606a; --color-fg-subtle:#6e7781; --color-canvas-default:#fff; --color-canvas-subtle:#f6f8fa; --color-border-default:#d0d7de; --color-border-muted:#d8dee4; --color-neutral-muted:rgba(175,184,193,.2); --color-accent-fg:#0969da; --color-accent-emphasis:#0969da; --color-attention-subtle:#fff8c5; --color-danger-fg:#cf222e; color-scheme:light; } section:where(.invert){ --color-prettylights-syntax-comment:#8b949e; --color-prettylights-syntax-constant:#79c0ff; --color-prettylights-syntax-entity:#d2a8ff; --color-prettylights-syntax-storage-modifier-import:#c9d1d9; --color-prettylights-syntax-entity-tag:#7ee787; --color-prettylights-syntax-keyword:#ff7b72; --color-prettylights-syntax-string:#a5d6ff; --color-prettylights-syntax-variable:#ffa657; --color-prettylights-syntax-brackethighlighter-unmatched:#f85149; --color-prettylights-syntax-invalid-illegal-text:#f0f6fc; --color-prettylights-syntax-invalid-illegal-bg:#8e1519; --color-prettylights-syntax-carriage-return-text:#f0f6fc; --color-prettylights-syntax-carriage-return-bg:#b62324; --color-prettylights-syntax-string-regexp:#7ee787; --color-prettylights-syntax-markup-list:#f2cc60; --color-prettylights-syntax-markup-heading:#1f6feb; --color-prettylights-syntax-markup-italic:#c9d1d9; --color-prettylights-syntax-markup-bold:#c9d1d9; --color-prettylights-syntax-markup-deleted-text:#ffdcd7; --color-prettylights-syntax-markup-deleted-bg:#67060c; --color-prettylights-syntax-markup-inserted-text:#aff5b4; --color-prettylights-syntax-markup-inserted-bg:#033a16; --color-prettylights-syntax-markup-changed-text:#ffdfb6; --color-prettylights-syntax-markup-changed-bg:#5a1e02; --color-prettylights-syntax-markup-ignored-text:#c9d1d9; --color-prettylights-syntax-markup-ignored-bg:#1158c7; --color-prettylights-syntax-meta-diff-range:#d2a8ff; --color-prettylights-syntax-brackethighlighter-angle:#8b949e; --color-prettylights-syntax-sublimelinter-gutter-mark:#484f58; --color-prettylights-syntax-constant-other-reference-link:#a5d6ff; --color-fg-default:#c9d1d9; --color-fg-muted:#8b949e; --color-fg-subtle:#6e7681; --color-canvas-default:#0d1117; --color-canvas-subtle:#161b22; --color-border-default:#30363d; --color-border-muted:#21262d; --color-neutral-muted:hsla(215,8%,47%,.4); --color-accent-fg:#58a6ff; --color-accent-emphasis:#1f6feb; --color-attention-subtle:rgba(187,128,9,.15); --color-danger-fg:#f85149; color-scheme:dark; } section{ -ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; word-wrap:break-word; background-color:var(--color-canvas-default); color:var(--color-fg-default); font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji; font-size:16px; line-height:1.5; margin:0; } section h1:hover .anchor .octicon-link:before,section h2:hover .anchor .octicon-link:before,section h3:hover .anchor .octicon-link:before,section h4:hover .anchor .octicon-link:before,section h5:hover .anchor .octicon-link:before,section h6:hover .anchor .octicon-link:before{ background-color:currentColor; content:" "; display:inline-block; height:16px; -webkit-mask-image:url('data:image/svg+xml;charset=utf-8,'); mask-image:url('data:image/svg+xml;charset=utf-8,'); width:16px; } section details,section figcaption,section figure{ display:block; } section summary{ display:list-item; } section [hidden]{ display:none !important; } section a{ background-color:transparent; color:var(--color-accent-fg); text-decoration:none; } section abbr[title]{ border-bottom:none; -webkit-text-decoration:underline dotted; text-decoration:underline dotted; } section b,section strong{ font-weight:var(--base-text-weight-semibold, 600); } section dfn{ font-style:italic; } section h1{ border-bottom:1px solid var(--color-border-muted); font-size:2em; font-weight:var(--base-text-weight-semibold, 600); margin:.67em 0; padding-bottom:.3em; } section mark{ background-color:var(--color-attention-subtle); color:var(--color-fg-default); } section small{ font-size:90%; } section sub,section sup{ font-size:75%; line-height:0; position:relative; vertical-align:baseline; } section sub{ bottom:-.25em; } section sup{ top:-.5em; } section img{ background-color:var(--color-canvas-default); border-style:none; box-sizing:content-box; max-width:100%; } section code,section kbd,section pre,section samp{ font-family:monospace; font-size:1em; } section figure{ margin:1em 40px; } section hr{ background:transparent; background-color:var(--color-border-default); border:0; box-sizing:content-box; height:.25em; margin:24px 0; overflow:hidden; padding:0; } section input{ font:inherit; font-family:inherit; font-size:inherit; line-height:inherit; margin:0; overflow:visible; } section [type=button],section [type=reset],section [type=submit]{ -webkit-appearance:button; } section [type=checkbox],section [type=radio]{ box-sizing:border-box; padding:0; } section [type=number]::-webkit-inner-spin-button,section [type=number]::-webkit-outer-spin-button{ height:auto; } section [type=search]::-webkit-search-cancel-button,section [type=search]::-webkit-search-decoration{ -webkit-appearance:none; } section ::-webkit-input-placeholder{ color:inherit; opacity:.54; } section ::-webkit-file-upload-button{ -webkit-appearance:button; font:inherit; } section a:hover{ text-decoration:underline; } section ::-moz-placeholder{ color:var(--color-fg-subtle); opacity:1; } section ::placeholder{ color:var(--color-fg-subtle); opacity:1; } section hr::after,section hr::before{ content:""; display:table; } section hr::after{ clear:both; } section table{ border-collapse:collapse; border-spacing:0; display:block; max-width:100%; overflow:auto; width:-moz-max-content; width:max-content; } section td,section th{ padding:0; } section details summary{ cursor:pointer; } section details:not([open]) > *:not(summary){ display:none !important; } section [role=button]:focus,section a:focus,section input[type=checkbox]:focus,section input[type=radio]:focus{ box-shadow:none; outline:2px solid var(--color-accent-fg); outline-offset:-2px; } section [role=button]:focus:not(:focus-visible),section a:focus:not(:focus-visible),section input[type=checkbox]:focus:not(:focus-visible),section input[type=radio]:focus:not(:focus-visible){ outline:1px solid transparent; } section [role=button]:focus-visible,section a:focus-visible,section input[type=checkbox]:focus-visible,section input[type=radio]:focus-visible{ box-shadow:none; outline:2px solid var(--color-accent-fg); outline-offset:-2px; } section a:not([class]):focus,section a:not([class]):focus-visible,section input[type=checkbox]:focus,section input[type=checkbox]:focus-visible,section input[type=radio]:focus,section input[type=radio]:focus-visible{ outline-offset:0; } section kbd{ background-color:var(--color-canvas-subtle); border-bottom-color:var(--color-neutral-muted); border:1px solid var(--color-neutral-muted); border-radius:6px; box-shadow:inset 0 -1px 0 var(--color-neutral-muted); color:var(--color-fg-default); display:inline-block; font:11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; line-height:10px; padding:3px 5px; vertical-align:middle; } section h1,section h2,section h3,section h4,section h5,section h6{ font-weight:var(--base-text-weight-semibold, 600); line-height:1.25; margin-bottom:16px; margin-top:24px; } section h2{ border-bottom:1px solid var(--color-border-muted); font-size:1.5em; padding-bottom:.3em; } section h2,section h3{ font-weight:var(--base-text-weight-semibold, 600); } section h3{ font-size:1.25em; } section h4{ font-size:1em; } section h4,section h5{ font-weight:var(--base-text-weight-semibold, 600); } section h5{ font-size:.875em; } section h6{ color:var(--color-fg-muted); font-size:.85em; font-weight:var(--base-text-weight-semibold, 600); } section p{ margin-bottom:10px; margin-top:0; } section blockquote{ border-left:.25em solid var(--color-border-default); color:var(--color-fg-muted); margin:0; padding:0 1em; } section ol,section ul{ margin-bottom:0; margin-top:0; padding-left:2em; } section ol ol,section ul ol{ list-style-type:lower-roman; } section ol ol ol,section ol ul ol,section ul ol ol,section ul ul ol{ list-style-type:lower-alpha; } section dd{ margin-left:0; } section code,section pre,section samp,section tt{ font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size:12px; } section pre{ word-wrap:normal; margin-bottom:0; margin-top:0; } section .octicon{ fill:currentColor; display:inline-block; overflow:visible !important; vertical-align:text-bottom; } section input::-webkit-inner-spin-button,section input::-webkit-outer-spin-button{ -webkit-appearance:none; appearance:none; margin:0; } section::after,section::before{ content:""; display:table; } section::after{ clear:both; } section > *:first-child{ margin-top:0 !important; } section > *:last-child{ margin-bottom:0 !important; } section a:not([href]){ color:inherit; text-decoration:none; } section .absent{ color:var(--color-danger-fg); } section .anchor{ float:left; line-height:1; margin-left:-20px; padding-right:4px; } section .anchor:focus{ outline:none; } section blockquote,section details,section dl,section ol,section p,section pre,section table,section ul{ margin-bottom:16px; margin-top:0; } section blockquote > :first-child{ margin-top:0; } section blockquote > :last-child{ margin-bottom:0; } section h1 .octicon-link,section h2 .octicon-link,section h3 .octicon-link,section h4 .octicon-link,section h5 .octicon-link,section h6 .octicon-link{ color:var(--color-fg-default); vertical-align:middle; visibility:hidden; } section h1:hover .anchor,section h2:hover .anchor,section h3:hover .anchor,section h4:hover .anchor,section h5:hover .anchor,section h6:hover .anchor{ text-decoration:none; } section h1:hover .anchor .octicon-link,section h2:hover .anchor .octicon-link,section h3:hover .anchor .octicon-link,section h4:hover .anchor .octicon-link,section h5:hover .anchor .octicon-link,section h6:hover .anchor .octicon-link{ visibility:visible; } section h1 code,section h1 tt,section h2 code,section h2 tt,section h3 code,section h3 tt,section h4 code,section h4 tt,section h5 code,section h5 tt,section h6 code,section h6 tt{ font-size:inherit; padding:0 .2em; } section summary h1,section summary h2,section summary h3,section summary h4,section summary h5,section summary h6{ display:inline-block; } section summary h1 .anchor,section summary h2 .anchor,section summary h3 .anchor,section summary h4 .anchor,section summary h5 .anchor,section summary h6 .anchor{ margin-left:-40px; } section summary h1,section summary h2{ border-bottom:0; padding-bottom:0; } section ol.no-list,section ul.no-list{ list-style-type:none; padding:0; } section ol[type=a]{ list-style-type:lower-alpha; } section ol[type=A]{ list-style-type:upper-alpha; } section ol[type=i]{ list-style-type:lower-roman; } section ol[type=I]{ list-style-type:upper-roman; } section div > ol:not([type]),section ol[type="1"]{ list-style-type:decimal; } section ol ol,section ol ul,section ul ol,section ul ul{ margin-bottom:0; margin-top:0; } section li > p{ margin-top:16px; } section li + li{ margin-top:.25em; } section dl{ padding:0; } section dl dt{ font-size:1em; font-style:italic; font-weight:var(--base-text-weight-semibold, 600); margin-top:16px; padding:0; } section dl dd{ margin-bottom:16px; padding:0 16px; } section table th{ font-weight:var(--base-text-weight-semibold, 600); } section table td,section table th{ border:1px solid var(--color-border-default); padding:6px 13px; } section table tr{ background-color:var(--color-canvas-default); border-top:1px solid var(--color-border-muted); } section table tr:nth-child(2n){ background-color:var(--color-canvas-subtle); } section table img{ background-color:transparent; } section img[align=right]{ padding-left:20px; } section img[align=left]{ padding-right:20px; } section .emoji{ background-color:transparent; max-width:none; vertical-align:text-top; } section span.frame,section span.frame > span{ display:block; overflow:hidden; } section span.frame > span{ border:1px solid var(--color-border-default); float:left; margin:13px 0 0; padding:7px; width:auto; } section span.frame span img{ display:block; float:left; } section span.frame span span{ clear:both; color:var(--color-fg-default); display:block; padding:5px 0 0; } section span.align-center{ clear:both; display:block; overflow:hidden; } section span.align-center > span{ display:block; margin:13px auto 0; overflow:hidden; text-align:center; } section span.align-center span img{ margin:0 auto; text-align:center; } section span.align-right{ clear:both; display:block; overflow:hidden; } section span.align-right > span{ display:block; margin:13px 0 0; overflow:hidden; text-align:right; } section span.align-right span img{ margin:0; text-align:right; } section span.float-left{ display:block; float:left; margin-right:13px; overflow:hidden; } section span.float-left span{ margin:13px 0 0; } section span.float-right{ display:block; float:right; margin-left:13px; overflow:hidden; } section span.float-right > span{ display:block; margin:13px auto 0; overflow:hidden; text-align:right; } section code,section tt{ background-color:var(--color-neutral-muted); border-radius:6px; font-size:85%; margin:0; padding:.2em .4em; white-space:break-spaces; } section code br,section tt br{ display:none; } section del code{ text-decoration:inherit; } section samp{ font-size:85%; } section pre code{ font-size:100%; } section pre > code{ background:transparent; border:0; margin:0; padding:0; white-space:pre; word-break:normal; } section .highlight{ margin-bottom:16px; } section .highlight pre{ margin-bottom:0; word-break:normal; } section pre{ background-color:var(--color-canvas-subtle); border-radius:6px; font-size:85%; line-height:1.45; overflow:auto; padding:16px; } section pre code,section pre tt{ word-wrap:normal; background-color:transparent; border:0; display:inline; line-height:inherit; margin:0; max-width:auto; overflow:visible; padding:0; } section .csv-data td,section .csv-data th{ font-size:12px; line-height:1; overflow:hidden; padding:5px; text-align:left; white-space:nowrap; } section .csv-data .blob-num{ background:var(--color-canvas-default); border:0; padding:10px 8px 9px; text-align:right; } section .csv-data tr{ border-top:0; } section .csv-data th{ background:var(--color-canvas-subtle); border-top:0; font-weight:var(--base-text-weight-semibold, 600); } section [data-footnote-ref]::before{ content:"["; } section [data-footnote-ref]::after{ content:"]"; } section .footnotes{ border-top:1px solid var(--color-border-default); color:var(--color-fg-muted); font-size:12px; } section .footnotes ol{ padding-left:16px; } section .footnotes ol ul{ display:inline-block; margin-top:16px; padding-left:16px; } section .footnotes li{ position:relative; } section .footnotes li:target::before{ border:2px solid var(--color-accent-emphasis); border-radius:6px; bottom:-8px; content:""; left:-24px; pointer-events:none; position:absolute; right:-8px; top:-8px; } section .footnotes li:target{ color:var(--color-fg-default); } section .footnotes .data-footnote-backref g-emoji{ font-family:monospace; } section .pl-c{ color:var(--color-prettylights-syntax-comment); } section .pl-c1,section .pl-s .pl-v{ color:var(--color-prettylights-syntax-constant); } section .pl-e,section .pl-en{ color:var(--color-prettylights-syntax-entity); } section .pl-s .pl-s1,section .pl-smi{ color:var(--color-prettylights-syntax-storage-modifier-import); } section .pl-ent{ color:var(--color-prettylights-syntax-entity-tag); } section .pl-k{ color:var(--color-prettylights-syntax-keyword); } section .pl-pds,section .pl-s,section .pl-s .pl-pse .pl-s1,section .pl-sr,section .pl-sr .pl-cce,section .pl-sr .pl-sra,section .pl-sr .pl-sre{ color:var(--color-prettylights-syntax-string); } section .pl-smw,section .pl-v{ color:var(--color-prettylights-syntax-variable); } section .pl-bu{ color:var(--color-prettylights-syntax-brackethighlighter-unmatched); } section .pl-ii{ background-color:var(--color-prettylights-syntax-invalid-illegal-bg); color:var(--color-prettylights-syntax-invalid-illegal-text); } section .pl-c2{ background-color:var(--color-prettylights-syntax-carriage-return-bg); color:var(--color-prettylights-syntax-carriage-return-text); } section .pl-sr .pl-cce{ color:var(--color-prettylights-syntax-string-regexp); font-weight:700; } section .pl-ml{ color:var(--color-prettylights-syntax-markup-list); } section .pl-mh,section .pl-mh .pl-en,section .pl-ms{ color:var(--color-prettylights-syntax-markup-heading); font-weight:700; } section .pl-mi{ color:var(--color-prettylights-syntax-markup-italic); font-style:italic; } section .pl-mb{ color:var(--color-prettylights-syntax-markup-bold); font-weight:700; } section .pl-md{ background-color:var(--color-prettylights-syntax-markup-deleted-bg); color:var(--color-prettylights-syntax-markup-deleted-text); } section .pl-mi1{ background-color:var(--color-prettylights-syntax-markup-inserted-bg); color:var(--color-prettylights-syntax-markup-inserted-text); } section .pl-mc{ background-color:var(--color-prettylights-syntax-markup-changed-bg); color:var(--color-prettylights-syntax-markup-changed-text); } section .pl-mi2{ background-color:var(--color-prettylights-syntax-markup-ignored-bg); color:var(--color-prettylights-syntax-markup-ignored-text); } section .pl-mdr{ color:var(--color-prettylights-syntax-meta-diff-range); font-weight:700; } section .pl-ba{ color:var(--color-prettylights-syntax-brackethighlighter-angle); } section .pl-sg{ color:var(--color-prettylights-syntax-sublimelinter-gutter-mark); } section .pl-corl{ color:var(--color-prettylights-syntax-constant-other-reference-link); text-decoration:underline; } section g-emoji{ display:inline-block; font-family:Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size:1em; font-style:normal !important; font-weight:var(--base-text-weight-normal, 400); line-height:1; min-width:1ch; vertical-align:-.075em; } section g-emoji img{ height:1em; width:1em; } section .task-list-item{ list-style-type:none; } section .task-list-item label{ font-weight:var(--base-text-weight-normal, 400); } section .task-list-item.enabled label{ cursor:pointer; } section .task-list-item + .task-list-item{ margin-top:4px; } section .task-list-item .handle{ display:none; } section .task-list-item-checkbox{ margin:0 .2em .25em -1.4em; vertical-align:middle; } section .contains-task-list:dir(rtl) .task-list-item-checkbox{ margin:0 -1.6em .25em .2em; } section .contains-task-list{ position:relative; } section .contains-task-list:focus-within .task-list-item-convert-container,section .contains-task-list:hover .task-list-item-convert-container{ clip:auto; display:block; height:24px; overflow:visible; width:auto; } section ::-webkit-calendar-picker-indicator{ filter:invert(50%); } h1{ color:var(--h1-color); font-size:1.6em; } h1,h2{ border-bottom:none; } h2{ font-size:1.3em; } h3{ font-size:1.1em; } h4{ font-size:1.05em; } h5{ font-size:1em; } h6{ font-size:.9em; } h1 strong,h2 strong,h3 strong,h4 strong,h5 strong,h6 strong{ color:var(--heading-strong-color); font-weight:inherit; } h1::part(auto-scaling),h2::part(auto-scaling),h3::part(auto-scaling),h4::part(auto-scaling),h5::part(auto-scaling),h6::part(auto-scaling){ max-height:563px; } hr{ height:0; padding-top:.25em; } pre{ border:1px solid var(--color-border-default); line-height:1.15; overflow:visible; } pre::part(auto-scaling){ max-height:529px; } pre :where(.hljs){ color:var(--color-prettylights-syntax-storage-modifier-import); } pre :where(.hljs-doctag),pre :where(.hljs-keyword),pre :where(.hljs-meta .hljs-keyword),pre :where(.hljs-template-tag),pre :where(.hljs-template-variable),pre :where(.hljs-type),pre :where(.hljs-variable.language_){ color:var(--color-prettylights-syntax-keyword); } pre :where(.hljs-title),pre :where(.hljs-title.class_),pre :where(.hljs-title.class_.inherited__),pre :where(.hljs-title.function_){ color:var(--color-prettylights-syntax-entity); } pre :where(.hljs-attr),pre :where(.hljs-attribute),pre :where(.hljs-literal),pre :where(.hljs-meta),pre :where(.hljs-number),pre :where(.hljs-operator),pre :where(.hljs-selector-attr),pre :where(.hljs-selector-class),pre :where(.hljs-selector-id),pre :where(.hljs-variable){ color:var(--color-prettylights-syntax-constant); } pre :where(.hljs-meta .hljs-string),pre :where(.hljs-regexp),pre :where(.hljs-string){ color:var(--color-prettylights-syntax-string); } pre :where(.hljs-built_in),pre :where(.hljs-symbol){ color:var(--color-prettylights-syntax-variable); } pre :where(.hljs-code),pre :where(.hljs-comment),pre :where(.hljs-formula){ color:var(--color-prettylights-syntax-comment); } pre :where(.hljs-name),pre :where(.hljs-quote),pre :where(.hljs-selector-pseudo),pre :where(.hljs-selector-tag){ color:var(--color-prettylights-syntax-entity-tag); } pre :where(.hljs-subst){ color:var(--color-prettylights-syntax-storage-modifier-import); } pre :where(.hljs-section){ color:var(--color-prettylights-syntax-markup-heading); font-weight:700; } pre :where(.hljs-bullet){ color:var(--color-prettylights-syntax-markup-list); } pre :where(.hljs-emphasis){ color:var(--color-prettylights-syntax-markup-italic); font-style:italic; } pre :where(.hljs-strong){ color:var(--color-prettylights-syntax-markup-bold); font-weight:700; } pre :where(.hljs-addition){ background-color:var(--color-prettylights-syntax-markup-inserted-bg); color:var(--color-prettylights-syntax-markup-inserted-text); } pre :where(.hljs-deletion){ background-color:var(--color-prettylights-syntax-markup-deleted-bg); color:var(--color-prettylights-syntax-markup-deleted-text); } footer,header{ color:var(--header-footer-color); font-size:18px; left:30px; margin:0; position:absolute; } header{ top:21px; } footer{ bottom:21px; } section{ --h1-color:#246; --header-footer-color:hsla(0,0%,40%,.75); --heading-strong-color:#48c; --paginate-color:#777; align-items:stretch; display:flex; flex-flow:column nowrap; font-size:29px; height:720px; justify-content:center; padding:78.5px; width:1280px; } section:where(.invert){ --h1-color:#cee7ff; --header-footer-color:hsla(0,0%,60%,.75); --heading-strong-color:#7bf; --paginate-color:#999; } section > *:last-child,section[data-footer] > :nth-last-child(2){ margin-bottom:0; } section > *:first-child,section > header:first-child + *{ margin-top:0; } section::after{ bottom:21px; color:var(--paginate-color); font-size:24px; padding:0; position:absolute; right:30px; } section[data-color] h1,section[data-color] h2,section[data-color] h3,section[data-color] h4,section[data-color] h5,section[data-color] h6{ color:currentcolor; }`), this.themeSet.add('@charset "UTF-8";\n/*!\n * Marp / Marpit Gaia theme.\n *\n * @theme gaia\n * @author Yuki Hattori\n *\n * @auto-scaling true\n * @size 16:9 1280px 720px\n * @size 4:3 960px 720px\n */\n@import "https://fonts.bunny.net/css?family=Lato:400,900|Roboto+Mono:400,700&display=swap";\npre code.hljs{\n display:block;\n overflow-x:auto;\n padding:1em;\n}\n\ncode.hljs{\n padding:3px 5px;\n}\n\n.hljs{\n background:#000;\n color:#f8f8f8;\n}\n\n.hljs-comment,.hljs-quote{\n color:#aeaeae;\n font-style:italic;\n}\n\n.hljs-keyword,.hljs-selector-tag,.hljs-type{\n color:#e28964;\n}\n\n.hljs-string{\n color:#65b042;\n}\n\n.hljs-subst{\n color:#daefa3;\n}\n\n.hljs-link,.hljs-regexp{\n color:#e9c062;\n}\n\n.hljs-name,.hljs-section,.hljs-tag,.hljs-title{\n color:#89bdff;\n}\n\n.hljs-class .hljs-title,.hljs-doctag,.hljs-title.class_{\n text-decoration:underline;\n}\n\n.hljs-bullet,.hljs-number,.hljs-symbol{\n color:#3387cc;\n}\n\n.hljs-params,.hljs-template-variable,.hljs-variable{\n color:#3e87e3;\n}\n\n.hljs-attribute{\n color:#cda869;\n}\n\n.hljs-meta{\n color:#8996a8;\n}\n\n.hljs-formula{\n background-color:#0e2231;\n color:#f8f8f8;\n font-style:italic;\n}\n\n.hljs-addition{\n background-color:#253b22;\n color:#f8f8f8;\n}\n\n.hljs-deletion{\n background-color:#420e09;\n color:#f8f8f8;\n}\n\n.hljs-selector-class{\n color:#9b703f;\n}\n\n.hljs-selector-id{\n color:#8b98ab;\n}\n\n.hljs-emphasis{\n font-style:italic;\n}\n\n.hljs-strong{\n font-weight:700;\n}\n\nh1,h2,h3,h4,h5,h6{\n margin:.5em 0 0;\n}\nh1 strong,h2 strong,h3 strong,h4 strong,h5 strong,h6 strong{\n font-weight:inherit;\n}\nh1::part(auto-scaling),h2::part(auto-scaling),h3::part(auto-scaling),h4::part(auto-scaling),h5::part(auto-scaling),h6::part(auto-scaling){\n max-height:580px;\n}\n\nh1{\n font-size:1.8em;\n}\n\nh2{\n font-size:1.5em;\n}\n\nh3{\n font-size:1.3em;\n}\n\nh4{\n font-size:1.1em;\n}\n\nh5{\n font-size:1em;\n}\n\nh6{\n font-size:.9em;\n}\n\nblockquote,p{\n margin:1em 0 0;\n}\n\nol > li,ul > li{\n margin:.3em 0 0;\n}\nol > li > p,ul > li > p{\n margin:.6em 0 0;\n}\n\ncode{\n display:inline-block;\n font-family:Roboto Mono,monospace;\n font-size:.8em;\n letter-spacing:0;\n margin:-.1em .15em;\n padding:.1em .2em;\n vertical-align:baseline;\n}\n\npre{\n display:block;\n margin:1em 0 0;\n overflow:visible;\n}\npre code{\n box-sizing:border-box;\n font-size:.7em;\n margin:0;\n min-width:100%;\n padding:.5em;\n}\npre::part(auto-scaling){\n max-height:calc(580px - 1em);\n}\n\nblockquote{\n margin:1em 0 0;\n padding:0 1em;\n position:relative;\n}\nblockquote::after,blockquote::before{\n content:"\u201C";\n display:block;\n font-family:Times New Roman,serif;\n font-weight:700;\n position:absolute;\n}\nblockquote::before{\n left:0;\n top:0;\n}\nblockquote::after{\n bottom:0;\n right:0;\n transform:rotate(180deg);\n}\nblockquote > *:first-child{\n margin-top:0;\n}\n\nmark{\n background:transparent;\n}\n\ntable{\n border-collapse:collapse;\n border-spacing:0;\n margin:1em 0 0;\n}\ntable td,table th{\n border-style:solid;\n border-width:1px;\n padding:.2em .4em;\n}\n\nfooter,header,section::after{\n box-sizing:border-box;\n font-size:66%;\n height:70px;\n line-height:50px;\n overflow:hidden;\n padding:10px 25px;\n position:absolute;\n}\n\nheader{\n top:0;\n}\n\nfooter,header{\n left:0;\n right:0;\n}\n\nfooter{\n bottom:0;\n}\n\nsection{\n word-wrap:break-word;\n --color-background:#fff8e1;\n --color-background-stripe:rgba(69,90,100,.1);\n --color-foreground:#455a64;\n --color-dimmed:#6a7a7d;\n --color-highlight:#0288d1;\n background-color:var(--color-background);\n background-image:linear-gradient(135deg, hsla(0,0%,53%,0), hsla(0,0%,53%,.02) 50%, hsla(0,0%,100%,0) 0, hsla(0,0%,100%,.05));\n color:var(--color-foreground);\n font-family:Lato,Avenir Next,Avenir,Trebuchet MS,Segoe UI,sans-serif;\n font-size:35px;\n height:720px;\n letter-spacing:1.25px;\n line-height:1.35;\n padding:70px;\n width:1280px;\n}\nsection::after{\n bottom:0;\n font-size:80%;\n right:0;\n}\nsection a,section mark{\n color:var(--color-highlight);\n}\nsection code{\n background:var(--color-dimmed);\n color:var(--color-background);\n}\nsection h1 strong,section h2 strong,section h3 strong,section h4 strong,section h5 strong,section h6 strong{\n color:var(--color-highlight);\n}\nsection pre{\n background:var(--color-foreground);\n}\nsection pre > code{\n background:transparent;\n}\nsection blockquote::after,section blockquote::before,section footer,section header,section section::after{\n color:var(--color-dimmed);\n}\nsection table td,section table th{\n border-color:var(--color-foreground);\n}\nsection table thead th{\n background:var(--color-foreground);\n color:var(--color-background);\n}\nsection table tbody > tr:nth-child(odd) td,section table tbody > tr:nth-child(odd) th{\n background:var(--color-background-stripe, transparent);\n}\nsection > *:first-child,section > header:first-child + *{\n margin-top:0;\n}\nsection:where(.invert){\n --color-background:#455a64;\n --color-background-stripe:rgba(255,248,225,.1);\n --color-foreground:#fff8e1;\n --color-dimmed:#dad8c8;\n --color-highlight:#81d4fa;\n}\nsection:where(.gaia){\n --color-background:#0288d1;\n --color-background-stripe:rgba(255,248,225,.1);\n --color-foreground:#fff8e1;\n --color-dimmed:#cce2de;\n --color-highlight:#81d4fa;\n}\nsection:where(.lead){\n display:flex;\n flex-flow:column nowrap;\n justify-content:center;\n}\nsection:where(.lead) h1,section:where(.lead) h2,section:where(.lead) h3,section:where(.lead) h4,section:where(.lead) h5,section:where(.lead) h6{\n text-align:center;\n}\nsection:where(.lead) p{\n text-align:center;\n}\nsection:where(.lead) blockquote > h1,section:where(.lead) blockquote > h2,section:where(.lead) blockquote > h3,section:where(.lead) blockquote > h4,section:where(.lead) blockquote > h5,section:where(.lead) blockquote > h6,section:where(.lead) blockquote > p{\n text-align:left;\n}\nsection:where(.lead) ol > li > p,section:where(.lead) ul > li > p{\n text-align:left;\n}\nsection:where(.lead) table{\n margin-left:auto;\n margin-right:auto;\n}'), this.themeSet.add('/*!\n * Marp / Marpit Uncover theme\n *\n * @theme uncover\n * @author Yuki Hattori\n *\n * @auto-scaling true\n * @size 16:9 1280px 720px\n * @size 4:3 960px 720px\n */\nsection{\n word-wrap:break-word;\n --color-background:#fdfcff;\n --color-background-code:#f2f1f4;\n --color-background-paginate:rgba(32,34,40,.05);\n --color-foreground:#202228;\n --color-highlight:#009dd5;\n --color-highlight-hover:#087eaa;\n --color-highlight-heading:#33b1dd;\n --color-header:rgba(32,34,40,.4);\n --color-header-shadow:rgba(253,252,255,.8);\n background:var(--color-background);\n flex-flow:column nowrap;\n font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;\n font-size:40px;\n height:720px;\n justify-content:center;\n letter-spacing:3px;\n line-height:1.4;\n padding:30px 70px;\n position:relative;\n text-align:center;\n width:1280px;\n z-index:0;\n}\nsection,section::after{\n color:var(--color-foreground);\n display:flex;\n}\nsection::after{\n align-items:flex-end;\n background:linear-gradient(-45deg, var(--color-background-paginate) 50%, transparent 50%);\n background-size:cover;\n font-size:.6em;\n height:80px;\n justify-content:flex-end;\n padding:30px;\n text-align:right;\n text-shadow:0 0 5px var(--color-background);\n width:80px;\n}\nsection:where(:not(.invert)) pre code.hljs{\n display:block;\n overflow-x:auto;\n padding:1em;\n}\nsection:where(:not(.invert)) code.hljs{\n padding:3px 5px;\n}\nsection:where(:not(.invert)) .hljs{\n background:#fff;\n color:#000;\n}\nsection:where(:not(.invert)) .hljs-addition,section:where(:not(.invert)) .hljs-meta,section:where(:not(.invert)) .hljs-string,section:where(:not(.invert)) .hljs-symbol,section:where(:not(.invert)) .hljs-template-tag,section:where(:not(.invert)) .hljs-template-variable{\n color:#756bb1;\n}\nsection:where(:not(.invert)) .hljs-comment,section:where(:not(.invert)) .hljs-quote{\n color:#636363;\n}\nsection:where(:not(.invert)) .hljs-bullet,section:where(:not(.invert)) .hljs-link,section:where(:not(.invert)) .hljs-literal,section:where(:not(.invert)) .hljs-number,section:where(:not(.invert)) .hljs-regexp{\n color:#31a354;\n}\nsection:where(:not(.invert)) .hljs-deletion,section:where(:not(.invert)) .hljs-variable{\n color:#88f;\n}\nsection:where(:not(.invert)) .hljs-built_in,section:where(:not(.invert)) .hljs-doctag,section:where(:not(.invert)) .hljs-keyword,section:where(:not(.invert)) .hljs-name,section:where(:not(.invert)) .hljs-section,section:where(:not(.invert)) .hljs-selector-class,section:where(:not(.invert)) .hljs-selector-id,section:where(:not(.invert)) .hljs-selector-tag,section:where(:not(.invert)) .hljs-strong,section:where(:not(.invert)) .hljs-tag,section:where(:not(.invert)) .hljs-title,section:where(:not(.invert)) .hljs-type{\n color:#3182bd;\n}\nsection:where(:not(.invert)) .hljs-emphasis{\n font-style:italic;\n}\nsection:where(:not(.invert)) .hljs-attribute{\n color:#e6550d;\n}\nsection:where(.invert){\n --color-background:#202228;\n --color-background-code:#2b2d33;\n --color-background-paginate:hsla(0,0%,100%,.05);\n --color-foreground:#fff;\n --color-highlight:#60d0f0;\n --color-highlight-hover:#88dcf4;\n --color-highlight-heading:#80d9f3;\n --color-header:hsla(0,0%,100%,.4);\n --color-header-shadow:rgba(32,34,40,.8);\n}\nsection:where(.invert) pre code.hljs{\n display:block;\n overflow-x:auto;\n padding:1em;\n}\nsection:where(.invert) code.hljs{\n padding:3px 5px;\n}\nsection:where(.invert) .hljs{\n background:#222;\n color:#fff;\n}\nsection:where(.invert) .hljs-comment,section:where(.invert) .hljs-quote{\n color:#777;\n}\nsection:where(.invert) .hljs-built_in,section:where(.invert) .hljs-bullet,section:where(.invert) .hljs-deletion,section:where(.invert) .hljs-link,section:where(.invert) .hljs-literal,section:where(.invert) .hljs-meta,section:where(.invert) .hljs-number,section:where(.invert) .hljs-params,section:where(.invert) .hljs-regexp,section:where(.invert) .hljs-symbol,section:where(.invert) .hljs-tag,section:where(.invert) .hljs-template-variable,section:where(.invert) .hljs-variable{\n color:#ab875d;\n}\nsection:where(.invert) .hljs-attribute,section:where(.invert) .hljs-name,section:where(.invert) .hljs-section,section:where(.invert) .hljs-selector-class,section:where(.invert) .hljs-selector-id,section:where(.invert) .hljs-title,section:where(.invert) .hljs-type{\n color:#9b869b;\n}\nsection:where(.invert) .hljs-addition,section:where(.invert) .hljs-keyword,section:where(.invert) .hljs-selector-tag,section:where(.invert) .hljs-string{\n color:#8f9c6c;\n}\nsection:where(.invert) .hljs-emphasis{\n font-style:italic;\n}\nsection:where(.invert) .hljs-strong{\n font-weight:700;\n}\nsection > *:first-child,section[data-header] > :nth-child(2){\n margin-top:0;\n}\nsection > *:last-child,section[data-footer] > :nth-last-child(2){\n margin-bottom:0;\n}\nsection blockquote,section p{\n margin:0 0 15px;\n}\nsection h1,section h2,section h3,section h4,section h5,section h6{\n margin:15px 0 30px;\n}\nsection h1 strong,section h2 strong,section h3 strong,section h4 strong,section h5 strong,section h6 strong{\n color:var(--color-highlight-heading);\n font-weight:inherit;\n}\nsection h1::part(auto-scaling),section h2::part(auto-scaling),section h3::part(auto-scaling),section h4::part(auto-scaling),section h5::part(auto-scaling),section h6::part(auto-scaling){\n max-height:660px;\n}\nsection h1{\n font-size:2em;\n}\nsection h2{\n font-size:1.7em;\n}\nsection h3{\n font-size:1.4em;\n letter-spacing:2px;\n}\nsection h4{\n font-size:1.2em;\n letter-spacing:2px;\n}\nsection h5{\n font-size:1em;\n letter-spacing:1px;\n}\nsection h6{\n font-size:.8em;\n letter-spacing:1px;\n}\nsection footer,section header{\n color:var(--color-header);\n font-size:.45em;\n left:70px;\n letter-spacing:1px;\n position:absolute;\n right:70px;\n text-shadow:0 1px 0 var(--color-header-shadow);\n z-index:1;\n}\nsection header{\n top:30px;\n}\nsection footer{\n bottom:30px;\n}\nsection a{\n color:var(--color-highlight);\n text-decoration:none;\n}\nsection a:hover{\n color:var(--color-highlight-hover);\n text-decoration:underline;\n}\nsection ol,section ul{\n margin:0 auto;\n text-align:left;\n}\nsection > ol,section > ul{\n margin-bottom:15px;\n}\nsection code{\n font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;\n letter-spacing:0;\n}\nsection *:not(pre) > code,section > code{\n background:var(--color-background-code);\n color:var(--color-foreground);\n margin:-.2em .2em .2em;\n padding:.2em;\n}\nsection pre{\n --preserve-aspect-ratio:xMidYMid meet;\n filter:drop-shadow(0 4px 4px rgba(0, 0, 0, .2));\n font-size:70%;\n line-height:1.15;\n margin:15px 0 30px;\n text-align:left;\n}\nsection pre::part(auto-scaling){\n max-height:570px;\n}\nsection pre > code{\n background:var(--color-background-code);\n box-sizing:content-box;\n color:var(--color-foreground);\n display:block;\n margin:0 auto;\n min-width:456px;\n padding:.4em .6em;\n}\nsection[data-size="4:3"] pre > code{\n min-width:328px;\n}\nsection table{\n border-collapse:collapse;\n margin:0 auto 15px;\n}\nsection table > tbody > tr > td,section table > tbody > tr > th,section table > thead > tr > td,section table > thead > tr > th{\n padding:.15em .5em;\n}\nsection table > thead > tr > td,section table > thead > tr > th{\n border-bottom:3px solid;\n}\nsection table > tbody > tr:not(:last-child) > td,section table > tbody > tr:not(:last-child) > th{\n border-bottom:1px solid;\n}\nsection blockquote{\n font-size:90%;\n line-height:1.3;\n padding:0 2em;\n position:relative;\n z-index:0;\n}\nsection blockquote::after,section blockquote::before{\n content:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBkPSJNNDQgMTkuMyAzOC45NCAwQzguMTQgOS41OSAwIDQwLjA1IDAgNTQuODNWMTAwaDQxLjQ3VjU0LjgzaC0yM2MtLjA0LS4yOC4yNS0yNy42NiAyNS41My0zNS41M3ptNTYgMEw5NC45NCAwQzY0LjE0IDkuNTkgNTYgNDAuMDUgNTYgNTQuODNWMTAwaDQxLjQ3VjU0LjgzaC0yM2MtLjA0LS4yOC4yNS0yNy42NiAyNS41My0zNS41M3oiIHN0eWxlPSJmaWxsOiM4ODg7b3BhY2l0eTouMzMiLz48L3N2Zz4=");\n height:auto;\n pointer-events:none;\n position:absolute;\n width:1em;\n z-index:-1;\n}\nsection blockquote::before{\n left:0;\n top:0;\n}\nsection blockquote::after{\n bottom:0;\n right:0;\n transform:rotate(180deg);\n}\nsection blockquote > *:last-child{\n margin-bottom:0;\n}\nsection mark{\n background:transparent;\n color:var(--color-highlight);\n}'); } applyMarkdownItPlugins(e2) { super.applyMarkdownItPlugins(e2), e2.use(L).use(j).use(Z).use(k).use(Mt).use(Bt); } highlighter(e2, t2, r2) { return t2 && n.getLanguage(t2) ? n.highlight(e2, { language: t2, ignoreIllegals: true }).value : ""; } renderStyle(e2) { const n2 = super.renderStyle(e2), r2 = [v, ...this.options.minifyCSS ? Ct : []]; return t(r2).process(n2).css; } themeSetPackOptions() { const e2 = { ...super.themeSetPackOptions() }, n2 = (n3) => n3 && (e2.before = `${n3} ${e2.before || ""}`), { emoji: t2 } = this.options; var r2; n2("twemoji" === (r2 = t2).shortcode || "twemoji" === r2.unicode ? "img[data-marp-twemoji]{\n background:transparent;\n height:1em;\n margin:0 .05em 0 .1em;\n vertical-align:-.1em;\n width:1em;\n}" : void 0); const o2 = ((e3) => { const { enabled: n3, options: t3 } = R(e3); if (!n3) return null; switch (V(t3)) { case "mathjax": return G(e3); case "katex": return U(t3.katexFontPath); } })(this); return o2 && n2(o2), e2; } }; It.html = { br: [] }, exports2.Marp = It, exports2.default = It; } }); // node_modules/@marp-team/marp-core/lib/browser.cjs.js var require_browser_cjs = __commonJS({ "node_modules/@marp-team/marp-core/lib/browser.cjs.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); var t = { h1: { proto: () => HTMLHeadingElement, attrs: { role: "heading", "aria-level": "1" }, style: "display: block; font-size: 2em; margin-block-start: 0.67em; margin-block-end: 0.67em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;" }, h2: { proto: () => HTMLHeadingElement, attrs: { role: "heading", "aria-level": "2" }, style: "display: block; font-size: 1.5em; margin-block-start: 0.83em; margin-block-end: 0.83em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;" }, h3: { proto: () => HTMLHeadingElement, attrs: { role: "heading", "aria-level": "3" }, style: "display: block; font-size: 1.17em; margin-block-start: 1em; margin-block-end: 1em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;" }, h4: { proto: () => HTMLHeadingElement, attrs: { role: "heading", "aria-level": "4" }, style: "display: block; margin-block-start: 1.33em; margin-block-end: 1.33em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;" }, h5: { proto: () => HTMLHeadingElement, attrs: { role: "heading", "aria-level": "5" }, style: "display: block; font-size: 0.83em; margin-block-start: 1.67em; margin-block-end: 1.67em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;" }, h6: { proto: () => HTMLHeadingElement, attrs: { role: "heading", "aria-level": "6" }, style: "display: block; font-size: 0.67em; margin-block-start: 2.33em; margin-block-end: 2.33em; margin-inline-start: 0px; margin-inline-end: 0px; font-weight: bold;" }, span: { proto: () => HTMLSpanElement }, pre: { proto: () => HTMLElement, style: "display: block; font-family: monospace; white-space: pre; margin: 1em 0; --marp-auto-scaling-white-space: pre;" } }; var e = "data-marp-auto-scaling-wrapper"; var i = "data-marp-auto-scaling-svg"; var n = "data-marp-auto-scaling-container"; var s = class extends HTMLElement { constructor() { super(), this.svgPreserveAspectRatio = "xMinYMid meet"; const t2 = (t3) => ([e2]) => { const { width: i2, height: n2 } = e2.contentRect; this[t3] = { width: i2, height: n2 }, this.updateSVGRect(); }; this.attachShadow({ mode: "open" }), this.containerObserver = new ResizeObserver(t2("containerSize")), this.wrapperObserver = new ResizeObserver((...e2) => { t2("wrapperSize")(...e2), this.flushSvgDisplay(); }); } static get observedAttributes() { return ["data-downscale-only"]; } connectedCallback() { var t2, s2, o2, r2, a2; this.shadowRoot.innerHTML = `
`.split(/\n\s*/).join(""), this.wrapper = null !== (t2 = this.shadowRoot.querySelector(`div[${e}]`)) && void 0 !== t2 ? t2 : void 0; const l2 = this.svg; this.svg = null !== (o2 = null === (s2 = this.wrapper) || void 0 === s2 ? void 0 : s2.querySelector(`svg[${i}]`)) && void 0 !== o2 ? o2 : void 0, this.svg !== l2 && (this.svgComputedStyle = this.svg ? window.getComputedStyle(this.svg) : void 0), this.container = null !== (a2 = null === (r2 = this.svg) || void 0 === r2 ? void 0 : r2.querySelector(`span[${n}]`)) && void 0 !== a2 ? a2 : void 0, this.observe(); } disconnectedCallback() { this.svg = void 0, this.svgComputedStyle = void 0, this.wrapper = void 0, this.container = void 0, this.observe(); } attributeChangedCallback() { this.observe(); } flushSvgDisplay() { const { svg: t2 } = this; t2 && (t2.style.display = "inline", requestAnimationFrame(() => { t2.style.display = ""; })); } observe() { this.containerObserver.disconnect(), this.wrapperObserver.disconnect(), this.wrapper && this.wrapperObserver.observe(this.wrapper), this.container && this.containerObserver.observe(this.container), this.svgComputedStyle && this.observeSVGStyle(this.svgComputedStyle); } observeSVGStyle(t2) { const e2 = () => { const i2 = (() => { const e3 = t2.getPropertyValue("--preserve-aspect-ratio"); if (e3) return e3.trim(); return `x${(({ textAlign: t3, direction: e4 }) => { if (t3.endsWith("left")) return "Min"; if (t3.endsWith("right")) return "Max"; if ("start" === t3 || "end" === t3) { let i3 = "rtl" === e4; return "end" === t3 && (i3 = !i3), i3 ? "Max" : "Min"; } return "Mid"; })(t2)}YMid meet`; })(); i2 !== this.svgPreserveAspectRatio && (this.svgPreserveAspectRatio = i2, this.updateSVGRect()), t2 === this.svgComputedStyle && requestAnimationFrame(e2); }; e2(); } updateSVGRect() { var t2, e2, i2, n2, s2, o2, r2; let a2 = Math.ceil(null !== (e2 = null === (t2 = this.containerSize) || void 0 === t2 ? void 0 : t2.width) && void 0 !== e2 ? e2 : 0); const l2 = Math.ceil(null !== (n2 = null === (i2 = this.containerSize) || void 0 === i2 ? void 0 : i2.height) && void 0 !== n2 ? n2 : 0); void 0 !== this.dataset.downscaleOnly && (a2 = Math.max(a2, null !== (o2 = null === (s2 = this.wrapperSize) || void 0 === s2 ? void 0 : s2.width) && void 0 !== o2 ? o2 : 0)); const c2 = null === (r2 = this.svg) || void 0 === r2 ? void 0 : r2.querySelector(":scope > foreignObject"); if (null == c2 || c2.setAttribute("width", `${a2}`), null == c2 || c2.setAttribute("height", `${l2}`), this.svg && (this.svg.setAttribute("viewBox", `0 0 ${a2} ${l2}`), this.svg.setAttribute("preserveAspectRatio", this.svgPreserveAspectRatio), this.svg.style.height = a2 <= 0 || l2 <= 0 ? "0" : ""), this.container) { const t3 = this.svgPreserveAspectRatio.toLowerCase(); this.container.style.marginLeft = t3.startsWith("xmid") || t3.startsWith("xmax") ? "auto" : "0", this.container.style.marginRight = t3.startsWith("xmi") ? "auto" : "0"; } } }; var o = (t2, { attrs: e2 = {}, style: i2 }) => class extends t2 { constructor(...t3) { super(...t3); for (const [t4, i3] of Object.entries(e2)) this.hasAttribute(t4) || this.setAttribute(t4, i3); this.attachShadow({ mode: "open" }); } static get observedAttributes() { return ["data-auto-scaling"]; } connectedCallback() { this._update(); } attributeChangedCallback() { this._update(); } _update() { const t3 = i2 ? `` : ""; let e3 = ""; const { autoScaling: n2 } = this.dataset; if (void 0 !== n2) { e3 = `${e3}`; } this.shadowRoot.innerHTML = t3 + e3; } }; var r; var a = Symbol(); var l; var c = "marpitSVGPolyfill:setZoomFactor,"; var d = Symbol(); var g = Symbol(); var h = () => { const t2 = "Apple Computer, Inc." === navigator.vendor, e2 = t2 ? [u] : [], i2 = { then: (e3) => (t2 ? (async () => { if (void 0 === l) { const t3 = document.createElement("canvas"); t3.width = 10, t3.height = 10; const e4 = t3.getContext("2d"), i3 = new Image(10, 10), n2 = new Promise((t4) => { i3.addEventListener("load", () => t4()); }); i3.crossOrigin = "anonymous", i3.src = "data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%201%201%22%3E%3CforeignObject%20width%3D%221%22%20height%3D%221%22%20requiredExtensions%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%3E%3Cdiv%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml%22%20style%3D%22width%3A%201px%3B%20height%3A%201px%3B%20background%3A%20red%3B%20position%3A%20relative%22%3E%3C%2Fdiv%3E%3C%2FforeignObject%3E%3C%2Fsvg%3E", await n2, e4.drawImage(i3, 0, 0), l = e4.getImageData(5, 5, 1, 1).data[3] < 128; } return l; })().then((t3) => { null == e3 || e3(t3 ? [u] : []); }) : null == e3 || e3([]), i2) }; return Object.assign(e2, i2); }; var p; var m; function u(t2) { const e2 = "object" == typeof t2 && t2.target || document, i2 = "object" == typeof t2 ? t2.zoom : t2; window[g] || (Object.defineProperty(window, g, { configurable: true, value: true }), document.body.style.zoom = 1.0001, document.body.offsetHeight, document.body.style.zoom = 1, window.addEventListener("message", ({ data: t3, origin: e3 }) => { if (e3 === window.origin) try { if (t3 && "string" == typeof t3 && t3.startsWith(c)) { const [, e4] = t3.split(","), i3 = Number.parseFloat(e4); Number.isNaN(i3) || (m = i3); } } catch (t4) { console.error(t4); } })); let n2 = false; Array.from(e2.querySelectorAll("svg[data-marpit-svg]"), (t3) => { var e3, s2, o2, r2; t3.style.transform || (t3.style.transform = "translateZ(0)"); const a2 = i2 || m || t3.currentScale || 1; p !== a2 && (p = a2, n2 = a2); const l2 = t3.getBoundingClientRect(), { length: c2 } = t3.children; for (let i3 = 0; i3 < c2; i3 += 1) { const n3 = t3.children[i3]; if (n3.getScreenCTM) { const t4 = n3.getScreenCTM(); if (t4) { const i4 = null !== (s2 = null === (e3 = n3.x) || void 0 === e3 ? void 0 : e3.baseVal.value) && void 0 !== s2 ? s2 : 0, c3 = null !== (r2 = null === (o2 = n3.y) || void 0 === o2 ? void 0 : o2.baseVal.value) && void 0 !== r2 ? r2 : 0, d2 = n3.children.length; for (let e4 = 0; e4 < d2; e4 += 1) { const s3 = n3.children[e4]; if ("SECTION" === s3.tagName) { const { style: e5 } = s3; e5.transformOrigin || (e5.transformOrigin = `${-i4}px ${-c3}px`), e5.transform = `scale(${a2}) matrix(${t4.a}, ${t4.b}, ${t4.c}, ${t4.d}, ${t4.e - l2.left}, ${t4.f - l2.top}) translateZ(0.0001px)`; break; } } } } } }), false !== n2 && Array.from(e2.querySelectorAll("iframe"), ({ contentWindow: t3 }) => { null == t3 || t3.postMessage(`${c}${n2}`, "null" === window.origin ? "*" : window.origin); }); } function v({ once: t2 = false, target: e2 = document } = {}) { const i2 = function(t3 = document) { if (t3[d]) return t3[d]; let e3 = true; const i3 = () => { e3 = false, delete t3[d]; }; Object.defineProperty(t3, d, { configurable: true, value: i3 }); let n2 = [], s2 = false; (async () => { try { n2 = await h(); } finally { s2 = true; } })(); const o2 = () => { for (const e4 of n2) e4({ target: t3 }); s2 && 0 === n2.length || e3 && window.requestAnimationFrame(o2); }; return o2(), i3; }(e2); return t2 ? (i2(), () => { }) : i2; } p = 1, m = void 0; var b = v; var w = Symbol(); var y = (e2 = document) => { if ("undefined" == typeof window) throw new Error("Marp Core's browser script is valid only in browser context."); if (((e3 = document) => { const i3 = window[a]; i3 || customElements.define("marp-auto-scaling", s); for (const n3 of Object.keys(t)) { const s2 = `marp-${n3}`, a2 = t[n3].proto(); null != r || (r = !!document.createElement("div", { is: "marp-auto-scaling" }).outerHTML.startsWith("
{ t2.outerHTML = t2.outerHTML.replace(new RegExp(`^<${n3}`, "i"), `<${s2}`).replace(new RegExp(`$`, "i"), ``); })); } window[a] = true; })(e2), e2[w]) return e2[w]; const i2 = v({ target: e2 }), n2 = () => { i2(), delete e2[w]; }, l2 = Object.assign(n2, { cleanup: n2, update: () => y(e2) }); return Object.defineProperty(e2, w, { configurable: true, value: l2 }), l2; }; exports2.browser = y, exports2.default = y, exports2.observer = b; } }); // node_modules/@marp-team/marp-core/browser.js var require_browser2 = __commonJS({ "node_modules/@marp-team/marp-core/browser.js"(exports2, module2) { module2.exports = require_browser_cjs(); } }); // node_modules/y18n/build/index.cjs var require_build = __commonJS({ "node_modules/y18n/build/index.cjs"(exports2, module2) { "use strict"; var fs = require("fs"); var util = require("util"); var path = require("path"); var shim; var Y18N = class { constructor(opts) { opts = opts || {}; this.directory = opts.directory || "./locales"; this.updateFiles = typeof opts.updateFiles === "boolean" ? opts.updateFiles : true; this.locale = opts.locale || "en"; this.fallbackToLanguage = typeof opts.fallbackToLanguage === "boolean" ? opts.fallbackToLanguage : true; this.cache = /* @__PURE__ */ Object.create(null); this.writeQueue = []; } __(...args) { if (typeof arguments[0] !== "string") { return this._taggedLiteral(arguments[0], ...arguments); } const str2 = args.shift(); let cb = function() { }; if (typeof args[args.length - 1] === "function") cb = args.pop(); cb = cb || function() { }; if (!this.cache[this.locale]) this._readLocaleFile(); if (!this.cache[this.locale][str2] && this.updateFiles) { this.cache[this.locale][str2] = str2; this._enqueueWrite({ directory: this.directory, locale: this.locale, cb }); } else { cb(); } return shim.format.apply(shim.format, [this.cache[this.locale][str2] || str2].concat(args)); } __n() { const args = Array.prototype.slice.call(arguments); const singular = args.shift(); const plural = args.shift(); const quantity = args.shift(); let cb = function() { }; if (typeof args[args.length - 1] === "function") cb = args.pop(); if (!this.cache[this.locale]) this._readLocaleFile(); let str2 = quantity === 1 ? singular : plural; if (this.cache[this.locale][singular]) { const entry = this.cache[this.locale][singular]; str2 = entry[quantity === 1 ? "one" : "other"]; } if (!this.cache[this.locale][singular] && this.updateFiles) { this.cache[this.locale][singular] = { one: singular, other: plural }; this._enqueueWrite({ directory: this.directory, locale: this.locale, cb }); } else { cb(); } const values = [str2]; if (~str2.indexOf("%d")) values.push(quantity); return shim.format.apply(shim.format, values.concat(args)); } setLocale(locale) { this.locale = locale; } getLocale() { return this.locale; } updateLocale(obj) { if (!this.cache[this.locale]) this._readLocaleFile(); for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { this.cache[this.locale][key] = obj[key]; } } } _taggedLiteral(parts, ...args) { let str2 = ""; parts.forEach(function(part, i) { const arg = args[i + 1]; str2 += part; if (typeof arg !== "undefined") { str2 += "%s"; } }); return this.__.apply(this, [str2].concat([].slice.call(args, 1))); } _enqueueWrite(work) { this.writeQueue.push(work); if (this.writeQueue.length === 1) this._processWriteQueue(); } _processWriteQueue() { const _this = this; const work = this.writeQueue[0]; const directory2 = work.directory; const locale = work.locale; const cb = work.cb; const languageFile = this._resolveLocaleFile(directory2, locale); const serializedLocale = JSON.stringify(this.cache[locale], null, 2); shim.fs.writeFile(languageFile, serializedLocale, "utf-8", function(err) { _this.writeQueue.shift(); if (_this.writeQueue.length > 0) _this._processWriteQueue(); cb(err); }); } _readLocaleFile() { let localeLookup = {}; const languageFile = this._resolveLocaleFile(this.directory, this.locale); try { if (shim.fs.readFileSync) { localeLookup = JSON.parse(shim.fs.readFileSync(languageFile, "utf-8")); } } catch (err) { if (err instanceof SyntaxError) { err.message = "syntax error in " + languageFile; } if (err.code === "ENOENT") localeLookup = {}; else throw err; } this.cache[this.locale] = localeLookup; } _resolveLocaleFile(directory2, locale) { let file = shim.resolve(directory2, "./", locale + ".json"); if (this.fallbackToLanguage && !this._fileExistsSync(file) && ~locale.lastIndexOf("_")) { const languageFile = shim.resolve(directory2, "./", locale.split("_")[0] + ".json"); if (this._fileExistsSync(languageFile)) file = languageFile; } return file; } _fileExistsSync(file) { return shim.exists(file); } }; function y18n$1(opts, _shim) { shim = _shim; const y18n2 = new Y18N(opts); return { __: y18n2.__.bind(y18n2), __n: y18n2.__n.bind(y18n2), setLocale: y18n2.setLocale.bind(y18n2), getLocale: y18n2.getLocale.bind(y18n2), updateLocale: y18n2.updateLocale.bind(y18n2), locale: y18n2.locale }; } var nodePlatformShim = { fs: { readFileSync: fs.readFileSync, writeFile: fs.writeFile }, format: util.format, resolve: path.resolve, exists: (file) => { try { return fs.statSync(file).isFile(); } catch (err) { return false; } } }; var y18n = (opts) => { return y18n$1(opts, nodePlatformShim); }; module2.exports = y18n; } }); // node_modules/yargs-parser/build/index.cjs var require_build2 = __commonJS({ "node_modules/yargs-parser/build/index.cjs"(exports2, module2) { "use strict"; var util = require("util"); var path = require("path"); var fs = require("fs"); function camelCase(str2) { const isCamelCase = str2 !== str2.toLowerCase() && str2 !== str2.toUpperCase(); if (!isCamelCase) { str2 = str2.toLowerCase(); } if (str2.indexOf("-") === -1 && str2.indexOf("_") === -1) { return str2; } else { let camelcase = ""; let nextChrUpper = false; const leadingHyphens = str2.match(/^-+/); for (let i = leadingHyphens ? leadingHyphens[0].length : 0; i < str2.length; i++) { let chr = str2.charAt(i); if (nextChrUpper) { nextChrUpper = false; chr = chr.toUpperCase(); } if (i !== 0 && (chr === "-" || chr === "_")) { nextChrUpper = true; } else if (chr !== "-" && chr !== "_") { camelcase += chr; } } return camelcase; } } function decamelize(str2, joinString) { const lowercase = str2.toLowerCase(); joinString = joinString || "-"; let notCamelcase = ""; for (let i = 0; i < str2.length; i++) { const chrLower = lowercase.charAt(i); const chrString = str2.charAt(i); if (chrLower !== chrString && i > 0) { notCamelcase += `${joinString}${lowercase.charAt(i)}`; } else { notCamelcase += chrString; } } return notCamelcase; } function looksLikeNumber(x) { if (x === null || x === void 0) return false; if (typeof x === "number") return true; if (/^0x[0-9a-f]+$/i.test(x)) return true; if (/^0[^.]/.test(x)) return false; return /^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); } function tokenizeArgString(argString) { if (Array.isArray(argString)) { return argString.map((e) => typeof e !== "string" ? e + "" : e); } argString = argString.trim(); let i = 0; let prevC = null; let c = null; let opening = null; const args = []; for (let ii = 0; ii < argString.length; ii++) { prevC = c; c = argString.charAt(ii); if (c === " " && !opening) { if (!(prevC === " ")) { i++; } continue; } if (c === opening) { opening = null; } else if ((c === "'" || c === '"') && !opening) { opening = c; } if (!args[i]) args[i] = ""; args[i] += c; } return args; } var DefaultValuesForTypeKey; (function(DefaultValuesForTypeKey2) { DefaultValuesForTypeKey2["BOOLEAN"] = "boolean"; DefaultValuesForTypeKey2["STRING"] = "string"; DefaultValuesForTypeKey2["NUMBER"] = "number"; DefaultValuesForTypeKey2["ARRAY"] = "array"; })(DefaultValuesForTypeKey || (DefaultValuesForTypeKey = {})); var mixin; var YargsParser = class { constructor(_mixin) { mixin = _mixin; } parse(argsInput, options2) { const opts = Object.assign({ alias: void 0, array: void 0, boolean: void 0, config: void 0, configObjects: void 0, configuration: void 0, coerce: void 0, count: void 0, default: void 0, envPrefix: void 0, narg: void 0, normalize: void 0, string: void 0, number: void 0, __: void 0, key: void 0 }, options2); const args = tokenizeArgString(argsInput); const inputIsString = typeof argsInput === "string"; const aliases = combineAliases(Object.assign(/* @__PURE__ */ Object.create(null), opts.alias)); const configuration = Object.assign({ "boolean-negation": true, "camel-case-expansion": true, "combine-arrays": false, "dot-notation": true, "duplicate-arguments-array": true, "flatten-duplicate-arrays": true, "greedy-arrays": true, "halt-at-non-option": false, "nargs-eats-options": false, "negation-prefix": "no-", "parse-numbers": true, "parse-positional-numbers": true, "populate--": false, "set-placeholder-key": false, "short-option-groups": true, "strip-aliased": false, "strip-dashed": false, "unknown-options-as-args": false }, opts.configuration); const defaults = Object.assign(/* @__PURE__ */ Object.create(null), opts.default); const configObjects = opts.configObjects || []; const envPrefix = opts.envPrefix; const notFlagsOption = configuration["populate--"]; const notFlagsArgv = notFlagsOption ? "--" : "_"; const newAliases = /* @__PURE__ */ Object.create(null); const defaulted = /* @__PURE__ */ Object.create(null); const __ = opts.__ || mixin.format; const flags = { aliases: /* @__PURE__ */ Object.create(null), arrays: /* @__PURE__ */ Object.create(null), bools: /* @__PURE__ */ Object.create(null), strings: /* @__PURE__ */ Object.create(null), numbers: /* @__PURE__ */ Object.create(null), counts: /* @__PURE__ */ Object.create(null), normalize: /* @__PURE__ */ Object.create(null), configs: /* @__PURE__ */ Object.create(null), nargs: /* @__PURE__ */ Object.create(null), coercions: /* @__PURE__ */ Object.create(null), keys: [] }; const negative = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/; const negatedBoolean = new RegExp("^--" + configuration["negation-prefix"] + "(.+)"); [].concat(opts.array || []).filter(Boolean).forEach(function(opt) { const key = typeof opt === "object" ? opt.key : opt; const assignment = Object.keys(opt).map(function(key2) { const arrayFlagKeys = { boolean: "bools", string: "strings", number: "numbers" }; return arrayFlagKeys[key2]; }).filter(Boolean).pop(); if (assignment) { flags[assignment][key] = true; } flags.arrays[key] = true; flags.keys.push(key); }); [].concat(opts.boolean || []).filter(Boolean).forEach(function(key) { flags.bools[key] = true; flags.keys.push(key); }); [].concat(opts.string || []).filter(Boolean).forEach(function(key) { flags.strings[key] = true; flags.keys.push(key); }); [].concat(opts.number || []).filter(Boolean).forEach(function(key) { flags.numbers[key] = true; flags.keys.push(key); }); [].concat(opts.count || []).filter(Boolean).forEach(function(key) { flags.counts[key] = true; flags.keys.push(key); }); [].concat(opts.normalize || []).filter(Boolean).forEach(function(key) { flags.normalize[key] = true; flags.keys.push(key); }); if (typeof opts.narg === "object") { Object.entries(opts.narg).forEach(([key, value]) => { if (typeof value === "number") { flags.nargs[key] = value; flags.keys.push(key); } }); } if (typeof opts.coerce === "object") { Object.entries(opts.coerce).forEach(([key, value]) => { if (typeof value === "function") { flags.coercions[key] = value; flags.keys.push(key); } }); } if (typeof opts.config !== "undefined") { if (Array.isArray(opts.config) || typeof opts.config === "string") { [].concat(opts.config).filter(Boolean).forEach(function(key) { flags.configs[key] = true; }); } else if (typeof opts.config === "object") { Object.entries(opts.config).forEach(([key, value]) => { if (typeof value === "boolean" || typeof value === "function") { flags.configs[key] = value; } }); } } extendAliases(opts.key, aliases, opts.default, flags.arrays); Object.keys(defaults).forEach(function(key) { (flags.aliases[key] || []).forEach(function(alias) { defaults[alias] = defaults[key]; }); }); let error = null; checkConfiguration(); let notFlags = []; const argv = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }); const argvReturn = {}; for (let i = 0; i < args.length; i++) { const arg = args[i]; const truncatedArg = arg.replace(/^-{3,}/, "---"); let broken; let key; let letters; let m; let next; let value; if (arg !== "--" && /^-/.test(arg) && isUnknownOptionAsArg(arg)) { pushPositional(arg); } else if (truncatedArg.match(/^---+(=|$)/)) { pushPositional(arg); continue; } else if (arg.match(/^--.+=/) || !configuration["short-option-groups"] && arg.match(/^-.+=/)) { m = arg.match(/^--?([^=]+)=([\s\S]*)$/); if (m !== null && Array.isArray(m) && m.length >= 3) { if (checkAllAliases(m[1], flags.arrays)) { i = eatArray(i, m[1], args, m[2]); } else if (checkAllAliases(m[1], flags.nargs) !== false) { i = eatNargs(i, m[1], args, m[2]); } else { setArg(m[1], m[2], true); } } } else if (arg.match(negatedBoolean) && configuration["boolean-negation"]) { m = arg.match(negatedBoolean); if (m !== null && Array.isArray(m) && m.length >= 2) { key = m[1]; setArg(key, checkAllAliases(key, flags.arrays) ? [false] : false); } } else if (arg.match(/^--.+/) || !configuration["short-option-groups"] && arg.match(/^-[^-]+/)) { m = arg.match(/^--?(.+)/); if (m !== null && Array.isArray(m) && m.length >= 2) { key = m[1]; if (checkAllAliases(key, flags.arrays)) { i = eatArray(i, key, args); } else if (checkAllAliases(key, flags.nargs) !== false) { i = eatNargs(i, key, args); } else { next = args[i + 1]; if (next !== void 0 && (!next.match(/^-/) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) { setArg(key, next); i++; } else if (/^(true|false)$/.test(next)) { setArg(key, next); i++; } else { setArg(key, defaultValue(key)); } } } } else if (arg.match(/^-.\..+=/)) { m = arg.match(/^-([^=]+)=([\s\S]*)$/); if (m !== null && Array.isArray(m) && m.length >= 3) { setArg(m[1], m[2]); } } else if (arg.match(/^-.\..+/) && !arg.match(negative)) { next = args[i + 1]; m = arg.match(/^-(.\..+)/); if (m !== null && Array.isArray(m) && m.length >= 2) { key = m[1]; if (next !== void 0 && !next.match(/^-/) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) { setArg(key, next); i++; } else { setArg(key, defaultValue(key)); } } } else if (arg.match(/^-[^-]+/) && !arg.match(negative)) { letters = arg.slice(1, -1).split(""); broken = false; for (let j = 0; j < letters.length; j++) { next = arg.slice(j + 2); if (letters[j + 1] && letters[j + 1] === "=") { value = arg.slice(j + 3); key = letters[j]; if (checkAllAliases(key, flags.arrays)) { i = eatArray(i, key, args, value); } else if (checkAllAliases(key, flags.nargs) !== false) { i = eatNargs(i, key, args, value); } else { setArg(key, value); } broken = true; break; } if (next === "-") { setArg(letters[j], next); continue; } if (/[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) && checkAllAliases(next, flags.bools) === false) { setArg(letters[j], next); broken = true; break; } if (letters[j + 1] && letters[j + 1].match(/\W/)) { setArg(letters[j], next); broken = true; break; } else { setArg(letters[j], defaultValue(letters[j])); } } key = arg.slice(-1)[0]; if (!broken && key !== "-") { if (checkAllAliases(key, flags.arrays)) { i = eatArray(i, key, args); } else if (checkAllAliases(key, flags.nargs) !== false) { i = eatNargs(i, key, args); } else { next = args[i + 1]; if (next !== void 0 && (!/^(-|--)[^-]/.test(next) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) { setArg(key, next); i++; } else if (/^(true|false)$/.test(next)) { setArg(key, next); i++; } else { setArg(key, defaultValue(key)); } } } } else if (arg.match(/^-[0-9]$/) && arg.match(negative) && checkAllAliases(arg.slice(1), flags.bools)) { key = arg.slice(1); setArg(key, defaultValue(key)); } else if (arg === "--") { notFlags = args.slice(i + 1); break; } else if (configuration["halt-at-non-option"]) { notFlags = args.slice(i); break; } else { pushPositional(arg); } } applyEnvVars(argv, true); applyEnvVars(argv, false); setConfig(argv); setConfigObjects(); applyDefaultsAndAliases(argv, flags.aliases, defaults, true); applyCoercions(argv); if (configuration["set-placeholder-key"]) setPlaceholderKeys(argv); Object.keys(flags.counts).forEach(function(key) { if (!hasKey(argv, key.split("."))) setArg(key, 0); }); if (notFlagsOption && notFlags.length) argv[notFlagsArgv] = []; notFlags.forEach(function(key) { argv[notFlagsArgv].push(key); }); if (configuration["camel-case-expansion"] && configuration["strip-dashed"]) { Object.keys(argv).filter((key) => key !== "--" && key.includes("-")).forEach((key) => { delete argv[key]; }); } if (configuration["strip-aliased"]) { [].concat(...Object.keys(aliases).map((k) => aliases[k])).forEach((alias) => { if (configuration["camel-case-expansion"] && alias.includes("-")) { delete argv[alias.split(".").map((prop) => camelCase(prop)).join(".")]; } delete argv[alias]; }); } function pushPositional(arg) { const maybeCoercedNumber = maybeCoerceNumber("_", arg); if (typeof maybeCoercedNumber === "string" || typeof maybeCoercedNumber === "number") { argv._.push(maybeCoercedNumber); } } function eatNargs(i, key, args2, argAfterEqualSign) { let ii; let toEat = checkAllAliases(key, flags.nargs); toEat = typeof toEat !== "number" || isNaN(toEat) ? 1 : toEat; if (toEat === 0) { if (!isUndefined(argAfterEqualSign)) { error = Error(__("Argument unexpected for: %s", key)); } setArg(key, defaultValue(key)); return i; } let available = isUndefined(argAfterEqualSign) ? 0 : 1; if (configuration["nargs-eats-options"]) { if (args2.length - (i + 1) + available < toEat) { error = Error(__("Not enough arguments following: %s", key)); } available = toEat; } else { for (ii = i + 1; ii < args2.length; ii++) { if (!args2[ii].match(/^-[^0-9]/) || args2[ii].match(negative) || isUnknownOptionAsArg(args2[ii])) available++; else break; } if (available < toEat) error = Error(__("Not enough arguments following: %s", key)); } let consumed = Math.min(available, toEat); if (!isUndefined(argAfterEqualSign) && consumed > 0) { setArg(key, argAfterEqualSign); consumed--; } for (ii = i + 1; ii < consumed + i + 1; ii++) { setArg(key, args2[ii]); } return i + consumed; } function eatArray(i, key, args2, argAfterEqualSign) { let argsToSet = []; let next = argAfterEqualSign || args2[i + 1]; const nargsCount = checkAllAliases(key, flags.nargs); if (checkAllAliases(key, flags.bools) && !/^(true|false)$/.test(next)) { argsToSet.push(true); } else if (isUndefined(next) || isUndefined(argAfterEqualSign) && /^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) { if (defaults[key] !== void 0) { const defVal = defaults[key]; argsToSet = Array.isArray(defVal) ? defVal : [defVal]; } } else { if (!isUndefined(argAfterEqualSign)) { argsToSet.push(processValue(key, argAfterEqualSign, true)); } for (let ii = i + 1; ii < args2.length; ii++) { if (!configuration["greedy-arrays"] && argsToSet.length > 0 || nargsCount && typeof nargsCount === "number" && argsToSet.length >= nargsCount) break; next = args2[ii]; if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next)) break; i = ii; argsToSet.push(processValue(key, next, inputIsString)); } } if (typeof nargsCount === "number" && (nargsCount && argsToSet.length < nargsCount || isNaN(nargsCount) && argsToSet.length === 0)) { error = Error(__("Not enough arguments following: %s", key)); } setArg(key, argsToSet); return i; } function setArg(key, val, shouldStripQuotes = inputIsString) { if (/-/.test(key) && configuration["camel-case-expansion"]) { const alias = key.split(".").map(function(prop) { return camelCase(prop); }).join("."); addNewAlias(key, alias); } const value = processValue(key, val, shouldStripQuotes); const splitKey = key.split("."); setKey(argv, splitKey, value); if (flags.aliases[key]) { flags.aliases[key].forEach(function(x) { const keyProperties = x.split("."); setKey(argv, keyProperties, value); }); } if (splitKey.length > 1 && configuration["dot-notation"]) { (flags.aliases[splitKey[0]] || []).forEach(function(x) { let keyProperties = x.split("."); const a = [].concat(splitKey); a.shift(); keyProperties = keyProperties.concat(a); if (!(flags.aliases[key] || []).includes(keyProperties.join("."))) { setKey(argv, keyProperties, value); } }); } if (checkAllAliases(key, flags.normalize) && !checkAllAliases(key, flags.arrays)) { const keys = [key].concat(flags.aliases[key] || []); keys.forEach(function(key2) { Object.defineProperty(argvReturn, key2, { enumerable: true, get() { return val; }, set(value2) { val = typeof value2 === "string" ? mixin.normalize(value2) : value2; } }); }); } } function addNewAlias(key, alias) { if (!(flags.aliases[key] && flags.aliases[key].length)) { flags.aliases[key] = [alias]; newAliases[alias] = true; } if (!(flags.aliases[alias] && flags.aliases[alias].length)) { addNewAlias(alias, key); } } function processValue(key, val, shouldStripQuotes) { if (shouldStripQuotes) { val = stripQuotes(val); } if (checkAllAliases(key, flags.bools) || checkAllAliases(key, flags.counts)) { if (typeof val === "string") val = val === "true"; } let value = Array.isArray(val) ? val.map(function(v) { return maybeCoerceNumber(key, v); }) : maybeCoerceNumber(key, val); if (checkAllAliases(key, flags.counts) && (isUndefined(value) || typeof value === "boolean")) { value = increment(); } if (checkAllAliases(key, flags.normalize) && checkAllAliases(key, flags.arrays)) { if (Array.isArray(val)) value = val.map((val2) => { return mixin.normalize(val2); }); else value = mixin.normalize(val); } return value; } function maybeCoerceNumber(key, value) { if (!configuration["parse-positional-numbers"] && key === "_") return value; if (!checkAllAliases(key, flags.strings) && !checkAllAliases(key, flags.bools) && !Array.isArray(value)) { const shouldCoerceNumber = looksLikeNumber(value) && configuration["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${value}`))); if (shouldCoerceNumber || !isUndefined(value) && checkAllAliases(key, flags.numbers)) { value = Number(value); } } return value; } function setConfig(argv2) { const configLookup = /* @__PURE__ */ Object.create(null); applyDefaultsAndAliases(configLookup, flags.aliases, defaults); Object.keys(flags.configs).forEach(function(configKey) { const configPath = argv2[configKey] || configLookup[configKey]; if (configPath) { try { let config = null; const resolvedConfigPath = mixin.resolve(mixin.cwd(), configPath); const resolveConfig = flags.configs[configKey]; if (typeof resolveConfig === "function") { try { config = resolveConfig(resolvedConfigPath); } catch (e) { config = e; } if (config instanceof Error) { error = config; return; } } else { config = mixin.require(resolvedConfigPath); } setConfigObject(config); } catch (ex) { if (ex.name === "PermissionDenied") error = ex; else if (argv2[configKey]) error = Error(__("Invalid JSON config file: %s", configPath)); } } }); } function setConfigObject(config, prev) { Object.keys(config).forEach(function(key) { const value = config[key]; const fullKey = prev ? prev + "." + key : key; if (typeof value === "object" && value !== null && !Array.isArray(value) && configuration["dot-notation"]) { setConfigObject(value, fullKey); } else { if (!hasKey(argv, fullKey.split(".")) || checkAllAliases(fullKey, flags.arrays) && configuration["combine-arrays"]) { setArg(fullKey, value); } } }); } function setConfigObjects() { if (typeof configObjects !== "undefined") { configObjects.forEach(function(configObject) { setConfigObject(configObject); }); } } function applyEnvVars(argv2, configOnly) { if (typeof envPrefix === "undefined") return; const prefix = typeof envPrefix === "string" ? envPrefix : ""; const env2 = mixin.env(); Object.keys(env2).forEach(function(envVar) { if (prefix === "" || envVar.lastIndexOf(prefix, 0) === 0) { const keys = envVar.split("__").map(function(key, i) { if (i === 0) { key = key.substring(prefix.length); } return camelCase(key); }); if ((configOnly && flags.configs[keys.join(".")] || !configOnly) && !hasKey(argv2, keys)) { setArg(keys.join("."), env2[envVar]); } } }); } function applyCoercions(argv2) { let coerce; const applied = /* @__PURE__ */ new Set(); Object.keys(argv2).forEach(function(key) { if (!applied.has(key)) { coerce = checkAllAliases(key, flags.coercions); if (typeof coerce === "function") { try { const value = maybeCoerceNumber(key, coerce(argv2[key])); [].concat(flags.aliases[key] || [], key).forEach((ali) => { applied.add(ali); argv2[ali] = value; }); } catch (err) { error = err; } } } }); } function setPlaceholderKeys(argv2) { flags.keys.forEach((key) => { if (~key.indexOf(".")) return; if (typeof argv2[key] === "undefined") argv2[key] = void 0; }); return argv2; } function applyDefaultsAndAliases(obj, aliases2, defaults2, canLog = false) { Object.keys(defaults2).forEach(function(key) { if (!hasKey(obj, key.split("."))) { setKey(obj, key.split("."), defaults2[key]); if (canLog) defaulted[key] = true; (aliases2[key] || []).forEach(function(x) { if (hasKey(obj, x.split("."))) return; setKey(obj, x.split("."), defaults2[key]); }); } }); } function hasKey(obj, keys) { let o = obj; if (!configuration["dot-notation"]) keys = [keys.join(".")]; keys.slice(0, -1).forEach(function(key2) { o = o[key2] || {}; }); const key = keys[keys.length - 1]; if (typeof o !== "object") return false; else return key in o; } function setKey(obj, keys, value) { let o = obj; if (!configuration["dot-notation"]) keys = [keys.join(".")]; keys.slice(0, -1).forEach(function(key2) { key2 = sanitizeKey(key2); if (typeof o === "object" && o[key2] === void 0) { o[key2] = {}; } if (typeof o[key2] !== "object" || Array.isArray(o[key2])) { if (Array.isArray(o[key2])) { o[key2].push({}); } else { o[key2] = [o[key2], {}]; } o = o[key2][o[key2].length - 1]; } else { o = o[key2]; } }); const key = sanitizeKey(keys[keys.length - 1]); const isTypeArray = checkAllAliases(keys.join("."), flags.arrays); const isValueArray = Array.isArray(value); let duplicate = configuration["duplicate-arguments-array"]; if (!duplicate && checkAllAliases(key, flags.nargs)) { duplicate = true; if (!isUndefined(o[key]) && flags.nargs[key] === 1 || Array.isArray(o[key]) && o[key].length === flags.nargs[key]) { o[key] = void 0; } } if (value === increment()) { o[key] = increment(o[key]); } else if (Array.isArray(o[key])) { if (duplicate && isTypeArray && isValueArray) { o[key] = configuration["flatten-duplicate-arrays"] ? o[key].concat(value) : (Array.isArray(o[key][0]) ? o[key] : [o[key]]).concat([value]); } else if (!duplicate && Boolean(isTypeArray) === Boolean(isValueArray)) { o[key] = value; } else { o[key] = o[key].concat([value]); } } else if (o[key] === void 0 && isTypeArray) { o[key] = isValueArray ? value : [value]; } else if (duplicate && !(o[key] === void 0 || checkAllAliases(key, flags.counts) || checkAllAliases(key, flags.bools))) { o[key] = [o[key], value]; } else { o[key] = value; } } function extendAliases(...args2) { args2.forEach(function(obj) { Object.keys(obj || {}).forEach(function(key) { if (flags.aliases[key]) return; flags.aliases[key] = [].concat(aliases[key] || []); flags.aliases[key].concat(key).forEach(function(x) { if (/-/.test(x) && configuration["camel-case-expansion"]) { const c = camelCase(x); if (c !== key && flags.aliases[key].indexOf(c) === -1) { flags.aliases[key].push(c); newAliases[c] = true; } } }); flags.aliases[key].concat(key).forEach(function(x) { if (x.length > 1 && /[A-Z]/.test(x) && configuration["camel-case-expansion"]) { const c = decamelize(x, "-"); if (c !== key && flags.aliases[key].indexOf(c) === -1) { flags.aliases[key].push(c); newAliases[c] = true; } } }); flags.aliases[key].forEach(function(x) { flags.aliases[x] = [key].concat(flags.aliases[key].filter(function(y) { return x !== y; })); }); }); }); } function checkAllAliases(key, flag) { const toCheck = [].concat(flags.aliases[key] || [], key); const keys = Object.keys(flag); const setAlias = toCheck.find((key2) => keys.includes(key2)); return setAlias ? flag[setAlias] : false; } function hasAnyFlag(key) { const flagsKeys = Object.keys(flags); const toCheck = [].concat(flagsKeys.map((k) => flags[k])); return toCheck.some(function(flag) { return Array.isArray(flag) ? flag.includes(key) : flag[key]; }); } function hasFlagsMatching(arg, ...patterns) { const toCheck = [].concat(...patterns); return toCheck.some(function(pattern) { const match = arg.match(pattern); return match && hasAnyFlag(match[1]); }); } function hasAllShortFlags(arg) { if (arg.match(negative) || !arg.match(/^-[^-]+/)) { return false; } let hasAllFlags = true; let next; const letters = arg.slice(1).split(""); for (let j = 0; j < letters.length; j++) { next = arg.slice(j + 2); if (!hasAnyFlag(letters[j])) { hasAllFlags = false; break; } if (letters[j + 1] && letters[j + 1] === "=" || next === "-" || /[A-Za-z]/.test(letters[j]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(next) || letters[j + 1] && letters[j + 1].match(/\W/)) { break; } } return hasAllFlags; } function isUnknownOptionAsArg(arg) { return configuration["unknown-options-as-args"] && isUnknownOption(arg); } function isUnknownOption(arg) { arg = arg.replace(/^-{3,}/, "--"); if (arg.match(negative)) { return false; } if (hasAllShortFlags(arg)) { return false; } const flagWithEquals = /^-+([^=]+?)=[\s\S]*$/; const normalFlag = /^-+([^=]+?)$/; const flagEndingInHyphen = /^-+([^=]+?)-$/; const flagEndingInDigits = /^-+([^=]+?\d+)$/; const flagEndingInNonWordCharacters = /^-+([^=]+?)\W+.*$/; return !hasFlagsMatching(arg, flagWithEquals, negatedBoolean, normalFlag, flagEndingInHyphen, flagEndingInDigits, flagEndingInNonWordCharacters); } function defaultValue(key) { if (!checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts) && `${key}` in defaults) { return defaults[key]; } else { return defaultForType(guessType(key)); } } function defaultForType(type) { const def = { [DefaultValuesForTypeKey.BOOLEAN]: true, [DefaultValuesForTypeKey.STRING]: "", [DefaultValuesForTypeKey.NUMBER]: void 0, [DefaultValuesForTypeKey.ARRAY]: [] }; return def[type]; } function guessType(key) { let type = DefaultValuesForTypeKey.BOOLEAN; if (checkAllAliases(key, flags.strings)) type = DefaultValuesForTypeKey.STRING; else if (checkAllAliases(key, flags.numbers)) type = DefaultValuesForTypeKey.NUMBER; else if (checkAllAliases(key, flags.bools)) type = DefaultValuesForTypeKey.BOOLEAN; else if (checkAllAliases(key, flags.arrays)) type = DefaultValuesForTypeKey.ARRAY; return type; } function isUndefined(num) { return num === void 0; } function checkConfiguration() { Object.keys(flags.counts).find((key) => { if (checkAllAliases(key, flags.arrays)) { error = Error(__("Invalid configuration: %s, opts.count excludes opts.array.", key)); return true; } else if (checkAllAliases(key, flags.nargs)) { error = Error(__("Invalid configuration: %s, opts.count excludes opts.narg.", key)); return true; } return false; }); } return { aliases: Object.assign({}, flags.aliases), argv: Object.assign(argvReturn, argv), configuration, defaulted: Object.assign({}, defaulted), error, newAliases: Object.assign({}, newAliases) }; } }; function combineAliases(aliases) { const aliasArrays = []; const combined = /* @__PURE__ */ Object.create(null); let change = true; Object.keys(aliases).forEach(function(key) { aliasArrays.push([].concat(aliases[key], key)); }); while (change) { change = false; for (let i = 0; i < aliasArrays.length; i++) { for (let ii = i + 1; ii < aliasArrays.length; ii++) { const intersect = aliasArrays[i].filter(function(v) { return aliasArrays[ii].indexOf(v) !== -1; }); if (intersect.length) { aliasArrays[i] = aliasArrays[i].concat(aliasArrays[ii]); aliasArrays.splice(ii, 1); change = true; break; } } } } aliasArrays.forEach(function(aliasArray) { aliasArray = aliasArray.filter(function(v, i, self2) { return self2.indexOf(v) === i; }); const lastAlias = aliasArray.pop(); if (lastAlias !== void 0 && typeof lastAlias === "string") { combined[lastAlias] = aliasArray; } }); return combined; } function increment(orig) { return orig !== void 0 ? orig + 1 : 1; } function sanitizeKey(key) { if (key === "__proto__") return "___proto___"; return key; } function stripQuotes(val) { return typeof val === "string" && (val[0] === "'" || val[0] === '"') && val[val.length - 1] === val[0] ? val.substring(1, val.length - 1) : val; } var _a; var _b; var _c; var minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12; var nodeVersion = (_b = (_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : (_c = process === null || process === void 0 ? void 0 : process.version) === null || _c === void 0 ? void 0 : _c.slice(1); if (nodeVersion) { const major = Number(nodeVersion.match(/^([^.]+)/)[1]); if (major < minNodeVersion) { throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`); } } var env = process ? process.env : {}; var parser = new YargsParser({ cwd: process.cwd, env: () => { return env; }, format: util.format, normalize: path.normalize, resolve: path.resolve, require: (path2) => { if (typeof require !== "undefined") { return require(path2); } else if (path2.match(/\.json$/)) { return JSON.parse(fs.readFileSync(path2, "utf8")); } else { throw Error("only .json config files are supported in ESM"); } } }); var yargsParser = function Parser(args, opts) { const result = parser.parse(args.slice(), opts); return result.argv; }; yargsParser.detailed = function(args, opts) { return parser.parse(args.slice(), opts); }; yargsParser.camelCase = camelCase; yargsParser.decamelize = decamelize; yargsParser.looksLikeNumber = looksLikeNumber; module2.exports = yargsParser; } }); // node_modules/ansi-regex/index.js var require_ansi_regex = __commonJS({ "node_modules/ansi-regex/index.js"(exports2, module2) { "use strict"; module2.exports = ({ onlyFirst = false } = {}) => { const pattern = [ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))" ].join("|"); return new RegExp(pattern, onlyFirst ? void 0 : "g"); }; } }); // node_modules/strip-ansi/index.js var require_strip_ansi = __commonJS({ "node_modules/strip-ansi/index.js"(exports2, module2) { "use strict"; var ansiRegex = require_ansi_regex(); module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string; } }); // node_modules/is-fullwidth-code-point/index.js var require_is_fullwidth_code_point = __commonJS({ "node_modules/is-fullwidth-code-point/index.js"(exports2, module2) { "use strict"; var isFullwidthCodePoint = (codePoint) => { if (Number.isNaN(codePoint)) { return false; } if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET // CJK Radicals Supplement .. Enclosed CJK Letters and Months 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane 131072 <= codePoint && codePoint <= 262141)) { return true; } return false; }; module2.exports = isFullwidthCodePoint; module2.exports.default = isFullwidthCodePoint; } }); // node_modules/emoji-regex/index.js var require_emoji_regex = __commonJS({ "node_modules/emoji-regex/index.js"(exports2, module2) { "use strict"; module2.exports = function() { return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; }; } }); // node_modules/string-width/index.js var require_string_width = __commonJS({ "node_modules/string-width/index.js"(exports2, module2) { "use strict"; var stripAnsi = require_strip_ansi(); var isFullwidthCodePoint = require_is_fullwidth_code_point(); var emojiRegex = require_emoji_regex(); var stringWidth = (string) => { if (typeof string !== "string" || string.length === 0) { return 0; } string = stripAnsi(string); if (string.length === 0) { return 0; } string = string.replace(emojiRegex(), " "); let width = 0; for (let i = 0; i < string.length; i++) { const code = string.codePointAt(i); if (code <= 31 || code >= 127 && code <= 159) { continue; } if (code >= 768 && code <= 879) { continue; } if (code > 65535) { i++; } width += isFullwidthCodePoint(code) ? 2 : 1; } return width; }; module2.exports = stringWidth; module2.exports.default = stringWidth; } }); // node_modules/color-convert/conversions.js var require_conversions = __commonJS({ "node_modules/color-convert/conversions.js"(exports2, module2) { var cssKeywords = require_color_name(); var reverseKeywords = {}; for (const key of Object.keys(cssKeywords)) { reverseKeywords[cssKeywords[key]] = key; } var convert = { rgb: { channels: 3, labels: "rgb" }, hsl: { channels: 3, labels: "hsl" }, hsv: { channels: 3, labels: "hsv" }, hwb: { channels: 3, labels: "hwb" }, cmyk: { channels: 4, labels: "cmyk" }, xyz: { channels: 3, labels: "xyz" }, lab: { channels: 3, labels: "lab" }, lch: { channels: 3, labels: "lch" }, hex: { channels: 1, labels: ["hex"] }, keyword: { channels: 1, labels: ["keyword"] }, ansi16: { channels: 1, labels: ["ansi16"] }, ansi256: { channels: 1, labels: ["ansi256"] }, hcg: { channels: 3, labels: ["h", "c", "g"] }, apple: { channels: 3, labels: ["r16", "g16", "b16"] }, gray: { channels: 1, labels: ["gray"] } }; module2.exports = convert; for (const model of Object.keys(convert)) { if (!("channels" in convert[model])) { throw new Error("missing channels property: " + model); } if (!("labels" in convert[model])) { throw new Error("missing channel labels property: " + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error("channel and label counts mismatch: " + model); } const { channels, labels } = convert[model]; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], "channels", { value: channels }); Object.defineProperty(convert[model], "labels", { value: labels }); } convert.rgb.hsl = function(rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const min = Math.min(r, g, b); const max = Math.max(r, g, b); const delta = max - min; let h; let s; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } const l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function(rgb) { let rdif; let gdif; let bdif; let h; let s; const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const v = Math.max(r, g, b); const diff = v - Math.min(r, g, b); const diffc = function(c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = 0; s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = 1 / 3 + rdif - bdif; } else if (b === v) { h = 2 / 3 + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function(rgb) { const r = rgb[0]; const g = rgb[1]; let b = rgb[2]; const h = convert.rgb.hsl(rgb)[0]; const w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function(rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const k = Math.min(1 - r, 1 - g, 1 - b); const c = (1 - r - k) / (1 - k) || 0; const m = (1 - g - k) / (1 - k) || 0; const y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; function comparativeDistance(x, y) { return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2; } convert.rgb.keyword = function(rgb) { const reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } let currentClosestDistance = Infinity; let currentClosestKeyword; for (const keyword of Object.keys(cssKeywords)) { const value = cssKeywords[keyword]; const distance = comparativeDistance(rgb, value); if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } return currentClosestKeyword; }; convert.keyword.rgb = function(keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function(rgb) { let r = rgb[0] / 255; let g = rgb[1] / 255; let b = rgb[2] / 255; r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92; g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92; b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92; const x = r * 0.4124 + g * 0.3576 + b * 0.1805; const y = r * 0.2126 + g * 0.7152 + b * 0.0722; const z = r * 0.0193 + g * 0.1192 + b * 0.9505; return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function(rgb) { const xyz = convert.rgb.xyz(rgb); let x = xyz[0]; let y = xyz[1]; let z = xyz[2]; x /= 95.047; y /= 100; z /= 108.883; x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; const l = 116 * y - 16; const a = 500 * (x - y); const b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function(hsl) { const h = hsl[0] / 360; const s = hsl[1] / 100; const l = hsl[2] / 100; let t2; let t3; let val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } const t1 = 2 * l - t2; const rgb = [0, 0, 0]; for (let i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function(hsl) { const h = hsl[0]; let s = hsl[1] / 100; let l = hsl[2] / 100; let smin = s; const lmin = Math.max(l, 0.01); l *= 2; s *= l <= 1 ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; const v = (l + s) / 2; const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function(hsv) { const h = hsv[0] / 60; const s = hsv[1] / 100; let v = hsv[2] / 100; const hi = Math.floor(h) % 6; const f = h - Math.floor(h); const p = 255 * v * (1 - s); const q2 = 255 * v * (1 - s * f); const t = 255 * v * (1 - s * (1 - f)); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q2, v, p]; case 2: return [p, v, t]; case 3: return [p, q2, v]; case 4: return [t, p, v]; case 5: return [v, p, q2]; } }; convert.hsv.hsl = function(hsv) { const h = hsv[0]; const s = hsv[1] / 100; const v = hsv[2] / 100; const vmin = Math.max(v, 0.01); let sl; let l; l = (2 - s) * v; const lmin = (2 - s) * vmin; sl = s * vmin; sl /= lmin <= 1 ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; convert.hwb.rgb = function(hwb) { const h = hwb[0] / 360; let wh = hwb[1] / 100; let bl = hwb[2] / 100; const ratio = wh + bl; let f; if (ratio > 1) { wh /= ratio; bl /= ratio; } const i = Math.floor(6 * h); const v = 1 - bl; f = 6 * h - i; if ((i & 1) !== 0) { f = 1 - f; } const n = wh + f * (v - wh); let r; let g; let b; switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function(cmyk) { const c = cmyk[0] / 100; const m = cmyk[1] / 100; const y = cmyk[2] / 100; const k = cmyk[3] / 100; const r = 1 - Math.min(1, c * (1 - k) + k); const g = 1 - Math.min(1, m * (1 - k) + k); const b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function(xyz) { const x = xyz[0] / 100; const y = xyz[1] / 100; const z = xyz[2] / 100; let r; let g; let b; r = x * 3.2406 + y * -1.5372 + z * -0.4986; g = x * -0.9689 + y * 1.8758 + z * 0.0415; b = x * 0.0557 + y * -0.204 + z * 1.057; r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92; g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92; b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function(xyz) { let x = xyz[0]; let y = xyz[1]; let z = xyz[2]; x /= 95.047; y /= 100; z /= 108.883; x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116; z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116; const l = 116 * y - 16; const a = 500 * (x - y); const b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function(lab) { const l = lab[0]; const a = lab[1]; const b = lab[2]; let x; let y; let z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; const y2 = y ** 3; const x2 = x ** 3; const z2 = z ** 3; y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function(lab) { const l = lab[0]; const a = lab[1]; const b = lab[2]; let h; const hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } const c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function(lch) { const l = lch[0]; const c = lch[1]; const h = lch[2]; const hr = h / 360 * 2 * Math.PI; const a = c * Math.cos(hr); const b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function(args, saturation = null) { const [r, g, b] = args; let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; value = Math.round(value / 50); if (value === 0) { return 30; } let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function(args) { return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function(args) { const r = args[0]; const g = args[1]; const b = args[2]; if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round((r - 8) / 247 * 24) + 232; } const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function(args) { let color = args % 10; if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } const mult = (~~(args > 50) + 1) * 0.5; const r = (color & 1) * mult * 255; const g = (color >> 1 & 1) * mult * 255; const b = (color >> 2 & 1) * mult * 255; return [r, g, b]; }; convert.ansi256.rgb = function(args) { if (args >= 232) { const c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; let rem; const r = Math.floor(args / 36) / 5 * 255; const g = Math.floor((rem = args % 36) / 6) / 5 * 255; const b = rem % 6 / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function(args) { const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); const string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.hex.rgb = function(args) { const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } let colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split("").map((char) => { return char + char; }).join(""); } const integer = parseInt(colorString, 16); const r = integer >> 16 & 255; const g = integer >> 8 & 255; const b = integer & 255; return [r, g, b]; }; convert.rgb.hcg = function(rgb) { const r = rgb[0] / 255; const g = rgb[1] / 255; const b = rgb[2] / 255; const max = Math.max(Math.max(r, g), b); const min = Math.min(Math.min(r, g), b); const chroma = max - min; let grayscale; let hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = (g - b) / chroma % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function(hsl) { const s = hsl[1] / 100; const l = hsl[2] / 100; const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l); let f = 0; if (c < 1) { f = (l - 0.5 * c) / (1 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function(hsv) { const s = hsv[1] / 100; const v = hsv[2] / 100; const c = s * v; let f = 0; if (c < 1) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function(hcg) { const h = hcg[0] / 360; const c = hcg[1] / 100; const g = hcg[2] / 100; if (c === 0) { return [g * 255, g * 255, g * 255]; } const pure = [0, 0, 0]; const hi = h % 1 * 6; const v = hi % 1; const w = 1 - v; let mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } mg = (1 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function(hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const v = c + g * (1 - c); let f = 0; if (v > 0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function(hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const l = g * (1 - c) + 0.5 * c; let s = 0; if (l > 0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function(hcg) { const c = hcg[1] / 100; const g = hcg[2] / 100; const v = c + g * (1 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function(hwb) { const w = hwb[1] / 100; const b = hwb[2] / 100; const v = 1 - b; const c = v - w; let g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function(apple) { return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; }; convert.rgb.apple = function(rgb) { return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; }; convert.gray.rgb = function(args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = function(args) { return [0, 0, args[0]]; }; convert.gray.hsv = convert.gray.hsl; convert.gray.hwb = function(gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function(gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function(gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function(gray) { const val = Math.round(gray[0] / 100 * 255) & 255; const integer = (val << 16) + (val << 8) + val; const string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.rgb.gray = function(rgb) { const val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; } }); // node_modules/color-convert/route.js var require_route = __commonJS({ "node_modules/color-convert/route.js"(exports2, module2) { var conversions = require_conversions(); function buildGraph() { const graph = {}; const models = Object.keys(conversions); for (let len = models.length, i = 0; i < len; i++) { graph[models[i]] = { // http://jsperf.com/1-vs-infinity // micro-opt, but this is simple. distance: -1, parent: null }; } return graph; } function deriveBFS(fromModel) { const graph = buildGraph(); const queue = [fromModel]; graph[fromModel].distance = 0; while (queue.length) { const current = queue.pop(); const adjacents = Object.keys(conversions[current]); for (let len = adjacents.length, i = 0; i < len; i++) { const adjacent = adjacents[i]; const node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function(args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { const path = [graph[toModel].parent, toModel]; let fn = conversions[graph[toModel].parent][toModel]; let cur = graph[toModel].parent; while (graph[cur].parent) { path.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path; return fn; } module2.exports = function(fromModel) { const graph = deriveBFS(fromModel); const conversion = {}; const models = Object.keys(graph); for (let len = models.length, i = 0; i < len; i++) { const toModel = models[i]; const node = graph[toModel]; if (node.parent === null) { continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; } }); // node_modules/color-convert/index.js var require_color_convert = __commonJS({ "node_modules/color-convert/index.js"(exports2, module2) { var conversions = require_conversions(); var route = require_route(); var convert = {}; var models = Object.keys(conversions); function wrapRaw(fn) { const wrappedFn = function(...args) { const arg0 = args[0]; if (arg0 === void 0 || arg0 === null) { return arg0; } if (arg0.length > 1) { args = arg0; } return fn(args); }; if ("conversion" in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { const wrappedFn = function(...args) { const arg0 = args[0]; if (arg0 === void 0 || arg0 === null) { return arg0; } if (arg0.length > 1) { args = arg0; } const result = fn(args); if (typeof result === "object") { for (let len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; if ("conversion" in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach((fromModel) => { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); const routes = route(fromModel); const routeModels = Object.keys(routes); routeModels.forEach((toModel) => { const fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module2.exports = convert; } }); // node_modules/ansi-styles/index.js var require_ansi_styles = __commonJS({ "node_modules/ansi-styles/index.js"(exports2, module2) { "use strict"; var wrapAnsi16 = (fn, offset) => (...args) => { const code = fn(...args); return `\x1B[${code + offset}m`; }; var wrapAnsi256 = (fn, offset) => (...args) => { const code = fn(...args); return `\x1B[${38 + offset};5;${code}m`; }; var wrapAnsi16m = (fn, offset) => (...args) => { const rgb = fn(...args); return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; }; var ansi2ansi = (n) => n; var rgb2rgb = (r, g, b) => [r, g, b]; var setLazyProperty = (object, property, get) => { Object.defineProperty(object, property, { get: () => { const value = get(); Object.defineProperty(object, property, { value, enumerable: true, configurable: true }); return value; }, enumerable: true, configurable: true }); }; var colorConvert; var makeDynamicStyles = (wrap2, targetSpace, identity, isBackground) => { if (colorConvert === void 0) { colorConvert = require_color_convert(); } const offset = isBackground ? 10 : 0; const styles = {}; for (const [sourceSpace, suite] of Object.entries(colorConvert)) { const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace; if (sourceSpace === targetSpace) { styles[name] = wrap2(identity, offset); } else if (typeof suite === "object") { styles[name] = wrap2(suite[targetSpace], offset); } } return styles; }; function assembleStyles() { const codes = /* @__PURE__ */ new Map(); const styles = { modifier: { reset: [0, 0], // 21 isn't widely supported and 22 does the same thing bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], // Bright color blackBright: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], // Bright color bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; styles.color.gray = styles.color.blackBright; styles.bgColor.bgGray = styles.bgColor.bgBlackBright; styles.color.grey = styles.color.blackBright; styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; for (const [groupName, group] of Object.entries(styles)) { for (const [styleName, style2] of Object.entries(group)) { styles[styleName] = { open: `\x1B[${style2[0]}m`, close: `\x1B[${style2[1]}m` }; group[styleName] = styles[styleName]; codes.set(style2[0], style2[1]); } Object.defineProperty(styles, groupName, { value: group, enumerable: false }); } Object.defineProperty(styles, "codes", { value: codes, enumerable: false }); styles.color.close = "\x1B[39m"; styles.bgColor.close = "\x1B[49m"; setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false)); setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false)); setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false)); setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true)); setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true)); setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true)); return styles; } Object.defineProperty(module2, "exports", { enumerable: true, get: assembleStyles }); } }); // node_modules/wrap-ansi/index.js var require_wrap_ansi = __commonJS({ "node_modules/wrap-ansi/index.js"(exports2, module2) { "use strict"; var stringWidth = require_string_width(); var stripAnsi = require_strip_ansi(); var ansiStyles = require_ansi_styles(); var ESCAPES = /* @__PURE__ */ new Set([ "\x1B", "\x9B" ]); var END_CODE = 39; var ANSI_ESCAPE_BELL = "\x07"; var ANSI_CSI = "["; var ANSI_OSC = "]"; var ANSI_SGR_TERMINATOR = "m"; var ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`; var wrapAnsi = (code) => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`; var wrapAnsiHyperlink = (uri) => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`; var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character)); var wrapWord = (rows, word, columns) => { const characters = [...word]; let isInsideEscape = false; let isInsideLinkEscape = false; let visible = stringWidth(stripAnsi(rows[rows.length - 1])); for (const [index, character] of characters.entries()) { const characterLength = stringWidth(character); if (visible + characterLength <= columns) { rows[rows.length - 1] += character; } else { rows.push(character); visible = 0; } if (ESCAPES.has(character)) { isInsideEscape = true; isInsideLinkEscape = characters.slice(index + 1).join("").startsWith(ANSI_ESCAPE_LINK); } if (isInsideEscape) { if (isInsideLinkEscape) { if (character === ANSI_ESCAPE_BELL) { isInsideEscape = false; isInsideLinkEscape = false; } } else if (character === ANSI_SGR_TERMINATOR) { isInsideEscape = false; } continue; } visible += characterLength; if (visible === columns && index < characters.length - 1) { rows.push(""); visible = 0; } } if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) { rows[rows.length - 2] += rows.pop(); } }; var stringVisibleTrimSpacesRight = (string) => { const words = string.split(" "); let last = words.length; while (last > 0) { if (stringWidth(words[last - 1]) > 0) { break; } last--; } if (last === words.length) { return string; } return words.slice(0, last).join(" ") + words.slice(last).join(""); }; var exec = (string, columns, options2 = {}) => { if (options2.trim !== false && string.trim() === "") { return ""; } let returnValue = ""; let escapeCode; let escapeUrl; const lengths = wordLengths(string); let rows = [""]; for (const [index, word] of string.split(" ").entries()) { if (options2.trim !== false) { rows[rows.length - 1] = rows[rows.length - 1].trimStart(); } let rowLength = stringWidth(rows[rows.length - 1]); if (index !== 0) { if (rowLength >= columns && (options2.wordWrap === false || options2.trim === false)) { rows.push(""); rowLength = 0; } if (rowLength > 0 || options2.trim === false) { rows[rows.length - 1] += " "; rowLength++; } } if (options2.hard && lengths[index] > columns) { const remainingColumns = columns - rowLength; const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns); const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns); if (breaksStartingNextLine < breaksStartingThisLine) { rows.push(""); } wrapWord(rows, word, columns); continue; } if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) { if (options2.wordWrap === false && rowLength < columns) { wrapWord(rows, word, columns); continue; } rows.push(""); } if (rowLength + lengths[index] > columns && options2.wordWrap === false) { wrapWord(rows, word, columns); continue; } rows[rows.length - 1] += word; } if (options2.trim !== false) { rows = rows.map(stringVisibleTrimSpacesRight); } const pre = [...rows.join("\n")]; for (const [index, character] of pre.entries()) { returnValue += character; if (ESCAPES.has(character)) { const { groups } = new RegExp(`(?:\\${ANSI_CSI}(?\\d+)m|\\${ANSI_ESCAPE_LINK}(?.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join("")) || { groups: {} }; if (groups.code !== void 0) { const code2 = Number.parseFloat(groups.code); escapeCode = code2 === END_CODE ? void 0 : code2; } else if (groups.uri !== void 0) { escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri; } } const code = ansiStyles.codes.get(Number(escapeCode)); if (pre[index + 1] === "\n") { if (escapeUrl) { returnValue += wrapAnsiHyperlink(""); } if (escapeCode && code) { returnValue += wrapAnsi(code); } } else if (character === "\n") { if (escapeCode && code) { returnValue += wrapAnsi(escapeCode); } if (escapeUrl) { returnValue += wrapAnsiHyperlink(escapeUrl); } } } return returnValue; }; module2.exports = (string, columns, options2) => { return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options2)).join("\n"); }; } }); // node_modules/cliui/build/index.cjs var require_build3 = __commonJS({ "node_modules/cliui/build/index.cjs"(exports2, module2) { "use strict"; var align = { right: alignRight, center: alignCenter }; var top = 0; var right = 1; var bottom = 2; var left = 3; var UI = class { constructor(opts) { var _a; this.width = opts.width; this.wrap = (_a = opts.wrap) !== null && _a !== void 0 ? _a : true; this.rows = []; } span(...args) { const cols = this.div(...args); cols.span = true; } resetOutput() { this.rows = []; } div(...args) { if (args.length === 0) { this.div(""); } if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === "string") { return this.applyLayoutDSL(args[0]); } const cols = args.map((arg) => { if (typeof arg === "string") { return this.colFromString(arg); } return arg; }); this.rows.push(cols); return cols; } shouldApplyLayoutDSL(...args) { return args.length === 1 && typeof args[0] === "string" && /[\t\n]/.test(args[0]); } applyLayoutDSL(str2) { const rows = str2.split("\n").map((row) => row.split(" ")); let leftColumnWidth = 0; rows.forEach((columns) => { if (columns.length > 1 && mixin.stringWidth(columns[0]) > leftColumnWidth) { leftColumnWidth = Math.min(Math.floor(this.width * 0.5), mixin.stringWidth(columns[0])); } }); rows.forEach((columns) => { this.div(...columns.map((r, i) => { return { text: r.trim(), padding: this.measurePadding(r), width: i === 0 && columns.length > 1 ? leftColumnWidth : void 0 }; })); }); return this.rows[this.rows.length - 1]; } colFromString(text) { return { text, padding: this.measurePadding(text) }; } measurePadding(str2) { const noAnsi = mixin.stripAnsi(str2); return [0, noAnsi.match(/\s*$/)[0].length, 0, noAnsi.match(/^\s*/)[0].length]; } toString() { const lines = []; this.rows.forEach((row) => { this.rowToString(row, lines); }); return lines.filter((line) => !line.hidden).map((line) => line.text).join("\n"); } rowToString(row, lines) { this.rasterize(row).forEach((rrow, r) => { let str2 = ""; rrow.forEach((col, c) => { const { width } = row[c]; const wrapWidth = this.negatePadding(row[c]); let ts = col; if (wrapWidth > mixin.stringWidth(col)) { ts += " ".repeat(wrapWidth - mixin.stringWidth(col)); } if (row[c].align && row[c].align !== "left" && this.wrap) { const fn = align[row[c].align]; ts = fn(ts, wrapWidth); if (mixin.stringWidth(ts) < wrapWidth) { ts += " ".repeat((width || 0) - mixin.stringWidth(ts) - 1); } } const padding = row[c].padding || [0, 0, 0, 0]; if (padding[left]) { str2 += " ".repeat(padding[left]); } str2 += addBorder(row[c], ts, "| "); str2 += ts; str2 += addBorder(row[c], ts, " |"); if (padding[right]) { str2 += " ".repeat(padding[right]); } if (r === 0 && lines.length > 0) { str2 = this.renderInline(str2, lines[lines.length - 1]); } }); lines.push({ text: str2.replace(/ +$/, ""), span: row.span }); }); return lines; } // if the full 'source' can render in // the target line, do so. renderInline(source, previousLine) { const match = source.match(/^ */); const leadingWhitespace = match ? match[0].length : 0; const target = previousLine.text; const targetTextWidth = mixin.stringWidth(target.trimRight()); if (!previousLine.span) { return source; } if (!this.wrap) { previousLine.hidden = true; return target + source; } if (leadingWhitespace < targetTextWidth) { return source; } previousLine.hidden = true; return target.trimRight() + " ".repeat(leadingWhitespace - targetTextWidth) + source.trimLeft(); } rasterize(row) { const rrows = []; const widths = this.columnWidths(row); let wrapped; row.forEach((col, c) => { col.width = widths[c]; if (this.wrap) { wrapped = mixin.wrap(col.text, this.negatePadding(col), { hard: true }).split("\n"); } else { wrapped = col.text.split("\n"); } if (col.border) { wrapped.unshift("." + "-".repeat(this.negatePadding(col) + 2) + "."); wrapped.push("'" + "-".repeat(this.negatePadding(col) + 2) + "'"); } if (col.padding) { wrapped.unshift(...new Array(col.padding[top] || 0).fill("")); wrapped.push(...new Array(col.padding[bottom] || 0).fill("")); } wrapped.forEach((str2, r) => { if (!rrows[r]) { rrows.push([]); } const rrow = rrows[r]; for (let i = 0; i < c; i++) { if (rrow[i] === void 0) { rrow.push(""); } } rrow.push(str2); }); }); return rrows; } negatePadding(col) { let wrapWidth = col.width || 0; if (col.padding) { wrapWidth -= (col.padding[left] || 0) + (col.padding[right] || 0); } if (col.border) { wrapWidth -= 4; } return wrapWidth; } columnWidths(row) { if (!this.wrap) { return row.map((col) => { return col.width || mixin.stringWidth(col.text); }); } let unset = row.length; let remainingWidth = this.width; const widths = row.map((col) => { if (col.width) { unset--; remainingWidth -= col.width; return col.width; } return void 0; }); const unsetWidth = unset ? Math.floor(remainingWidth / unset) : 0; return widths.map((w, i) => { if (w === void 0) { return Math.max(unsetWidth, _minWidth(row[i])); } return w; }); } }; function addBorder(col, ts, style2) { if (col.border) { if (/[.']-+[.']/.test(ts)) { return ""; } if (ts.trim().length !== 0) { return style2; } return " "; } return ""; } function _minWidth(col) { const padding = col.padding || []; const minWidth = 1 + (padding[left] || 0) + (padding[right] || 0); if (col.border) { return minWidth + 4; } return minWidth; } function getWindowWidth() { if (typeof process === "object" && process.stdout && process.stdout.columns) { return process.stdout.columns; } return 80; } function alignRight(str2, width) { str2 = str2.trim(); const strWidth = mixin.stringWidth(str2); if (strWidth < width) { return " ".repeat(width - strWidth) + str2; } return str2; } function alignCenter(str2, width) { str2 = str2.trim(); const strWidth = mixin.stringWidth(str2); if (strWidth >= width) { return str2; } return " ".repeat(width - strWidth >> 1) + str2; } var mixin; function cliui(opts, _mixin) { mixin = _mixin; return new UI({ width: (opts === null || opts === void 0 ? void 0 : opts.width) || getWindowWidth(), wrap: opts === null || opts === void 0 ? void 0 : opts.wrap }); } var stringWidth = require_string_width(); var stripAnsi = require_strip_ansi(); var wrap2 = require_wrap_ansi(); function ui(opts) { return cliui(opts, { stringWidth, stripAnsi, wrap: wrap2 }); } module2.exports = ui; } }); // node_modules/escalade/sync/index.js var require_sync = __commonJS({ "node_modules/escalade/sync/index.js"(exports2, module2) { var { dirname, resolve } = require("path"); var { readdirSync, statSync } = require("fs"); module2.exports = function(start, callback) { let dir = resolve(".", start); let tmp, stats = statSync(dir); if (!stats.isDirectory()) { dir = dirname(dir); } while (true) { tmp = callback(dir, readdirSync(dir)); if (tmp) return resolve(dir, tmp); dir = dirname(tmp = dir); if (tmp === dir) break; } }; } }); // node_modules/get-caller-file/index.js var require_get_caller_file = __commonJS({ "node_modules/get-caller-file/index.js"(exports2, module2) { "use strict"; module2.exports = function getCallerFile(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(_, stack2) { return stack2; }; var stack = new Error().stack; Error.prepareStackTrace = oldPrepareStackTrace; if (stack !== null && typeof stack === "object") { return stack[position] ? stack[position].getFileName() : void 0; } }; } }); // node_modules/require-directory/index.js var require_require_directory = __commonJS({ "node_modules/require-directory/index.js"(exports2, module2) { "use strict"; var fs = require("fs"); var join = require("path").join; var resolve = require("path").resolve; var dirname = require("path").dirname; var defaultOptions = { extensions: ["js", "json", "coffee"], recurse: true, rename: function(name) { return name; }, visit: function(obj) { return obj; } }; function checkFileInclusion(path, filename, options2) { return ( // verify file has valid extension new RegExp("\\.(" + options2.extensions.join("|") + ")$", "i").test(filename) && // if options.include is a RegExp, evaluate it and make sure the path passes !(options2.include && options2.include instanceof RegExp && !options2.include.test(path)) && // if options.include is a function, evaluate it and make sure the path passes !(options2.include && typeof options2.include === "function" && !options2.include(path, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass !(options2.exclude && options2.exclude instanceof RegExp && options2.exclude.test(path)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass !(options2.exclude && typeof options2.exclude === "function" && options2.exclude(path, filename)) ); } function requireDirectory(m, path, options2) { var retval = {}; if (path && !options2 && typeof path !== "string") { options2 = path; path = null; } options2 = options2 || {}; for (var prop in defaultOptions) { if (typeof options2[prop] === "undefined") { options2[prop] = defaultOptions[prop]; } } path = !path ? dirname(m.filename) : resolve(dirname(m.filename), path); fs.readdirSync(path).forEach(function(filename) { var joined = join(path, filename), files2, key, obj; if (fs.statSync(joined).isDirectory() && options2.recurse) { files2 = requireDirectory(m, joined, options2); if (Object.keys(files2).length) { retval[options2.rename(filename, joined, filename)] = files2; } } else { if (joined !== m.filename && checkFileInclusion(joined, filename, options2)) { key = filename.substring(0, filename.lastIndexOf(".")); obj = m.require(joined); retval[options2.rename(key, joined, filename)] = options2.visit(obj, joined, filename) || obj; } } }); return retval; } module2.exports = requireDirectory; module2.exports.defaults = defaultOptions; } }); // node_modules/yargs/build/index.cjs var require_build4 = __commonJS({ "node_modules/yargs/build/index.cjs"(exports2, module2) { "use strict"; var t = require("assert"); var e = class extends Error { constructor(t2) { super(t2 || "yargs error"), this.name = "YError", Error.captureStackTrace && Error.captureStackTrace(this, e); } }; var s; var i = []; function n(t2, o2, a2, h2) { s = h2; let l2 = {}; if (Object.prototype.hasOwnProperty.call(t2, "extends")) { if ("string" != typeof t2.extends) return l2; const r2 = /\.json|\..*rc$/.test(t2.extends); let h3 = null; if (r2) h3 = function(t3, e2) { return s.path.resolve(t3, e2); }(o2, t2.extends); else try { h3 = require.resolve(t2.extends); } catch (e2) { return t2; } !function(t3) { if (i.indexOf(t3) > -1) throw new e(`Circular extended configurations: '${t3}'.`); }(h3), i.push(h3), l2 = r2 ? JSON.parse(s.readFileSync(h3, "utf8")) : require(t2.extends), delete t2.extends, l2 = n(l2, s.path.dirname(h3), a2, s); } return i = [], a2 ? r(l2, t2) : Object.assign({}, l2, t2); } function r(t2, e2) { const s2 = {}; function i2(t3) { return t3 && "object" == typeof t3 && !Array.isArray(t3); } Object.assign(s2, t2); for (const n2 of Object.keys(e2)) i2(e2[n2]) && i2(s2[n2]) ? s2[n2] = r(t2[n2], e2[n2]) : s2[n2] = e2[n2]; return s2; } function o(t2) { const e2 = t2.replace(/\s{2,}/g, " ").split(/\s+(?![^[]*]|[^<]*>)/), s2 = /\.*[\][<>]/g, i2 = e2.shift(); if (!i2) throw new Error(`No command found in: ${t2}`); const n2 = { cmd: i2.replace(s2, ""), demanded: [], optional: [] }; return e2.forEach((t3, i3) => { let r2 = false; t3 = t3.replace(/\s/g, ""), /\.+[\]>]/.test(t3) && i3 === e2.length - 1 && (r2 = true), /^\[/.test(t3) ? n2.optional.push({ cmd: t3.replace(s2, "").split("|"), variadic: r2 }) : n2.demanded.push({ cmd: t3.replace(s2, "").split("|"), variadic: r2 }); }), n2; } var a = ["first", "second", "third", "fourth", "fifth", "sixth"]; function h(t2, s2, i2) { try { let n2 = 0; const [r2, a2, h2] = "object" == typeof t2 ? [{ demanded: [], optional: [] }, t2, s2] : [o(`cmd ${t2}`), s2, i2], f2 = [].slice.call(a2); for (; f2.length && void 0 === f2[f2.length - 1]; ) f2.pop(); const d2 = h2 || f2.length; if (d2 < r2.demanded.length) throw new e(`Not enough arguments provided. Expected ${r2.demanded.length} but received ${f2.length}.`); const u2 = r2.demanded.length + r2.optional.length; if (d2 > u2) throw new e(`Too many arguments provided. Expected max ${u2} but received ${d2}.`); r2.demanded.forEach((t3) => { const e2 = l(f2.shift()); 0 === t3.cmd.filter((t4) => t4 === e2 || "*" === t4).length && c(e2, t3.cmd, n2), n2 += 1; }), r2.optional.forEach((t3) => { if (0 === f2.length) return; const e2 = l(f2.shift()); 0 === t3.cmd.filter((t4) => t4 === e2 || "*" === t4).length && c(e2, t3.cmd, n2), n2 += 1; }); } catch (t3) { console.warn(t3.stack); } } function l(t2) { return Array.isArray(t2) ? "array" : null === t2 ? "null" : typeof t2; } function c(t2, s2, i2) { throw new e(`Invalid ${a[i2] || "manyith"} argument. Expected ${s2.join(" or ")} but received ${t2}.`); } function f(t2) { return !!t2 && !!t2.then && "function" == typeof t2.then; } function d(t2, e2, s2, i2) { s2.assert.notStrictEqual(t2, e2, i2); } function u(t2, e2) { e2.assert.strictEqual(typeof t2, "string"); } function p(t2) { return Object.keys(t2); } function g(t2 = {}, e2 = () => true) { const s2 = {}; return p(t2).forEach((i2) => { e2(i2, t2[i2]) && (s2[i2] = t2[i2]); }), s2; } function m() { return process.versions.electron && !process.defaultApp ? 0 : 1; } function y() { return process.argv[m()]; } var b = Object.freeze({ __proto__: null, hideBin: function(t2) { return t2.slice(m() + 1); }, getProcessArgvBin: y }); function v(t2, e2, s2, i2) { if ("a" === s2 && !i2) throw new TypeError("Private accessor was defined without a getter"); if ("function" == typeof e2 ? t2 !== e2 || !i2 : !e2.has(t2)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return "m" === s2 ? i2 : "a" === s2 ? i2.call(t2) : i2 ? i2.value : e2.get(t2); } function O(t2, e2, s2, i2, n2) { if ("m" === i2) throw new TypeError("Private method is not writable"); if ("a" === i2 && !n2) throw new TypeError("Private accessor was defined without a setter"); if ("function" == typeof e2 ? t2 !== e2 || !n2 : !e2.has(t2)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return "a" === i2 ? n2.call(t2, s2) : n2 ? n2.value = s2 : e2.set(t2, s2), s2; } var w = class { constructor(t2) { this.globalMiddleware = [], this.frozens = [], this.yargs = t2; } addMiddleware(t2, e2, s2 = true, i2 = false) { if (h(" [boolean] [boolean] [boolean]", [t2, e2, s2], arguments.length), Array.isArray(t2)) { for (let i3 = 0; i3 < t2.length; i3++) { if ("function" != typeof t2[i3]) throw Error("middleware must be a function"); const n2 = t2[i3]; n2.applyBeforeValidation = e2, n2.global = s2; } Array.prototype.push.apply(this.globalMiddleware, t2); } else if ("function" == typeof t2) { const n2 = t2; n2.applyBeforeValidation = e2, n2.global = s2, n2.mutates = i2, this.globalMiddleware.push(t2); } return this.yargs; } addCoerceMiddleware(t2, e2) { const s2 = this.yargs.getAliases(); return this.globalMiddleware = this.globalMiddleware.filter((t3) => { const i2 = [...s2[e2] || [], e2]; return !t3.option || !i2.includes(t3.option); }), t2.option = e2, this.addMiddleware(t2, true, true, true); } getMiddleware() { return this.globalMiddleware; } freeze() { this.frozens.push([...this.globalMiddleware]); } unfreeze() { const t2 = this.frozens.pop(); void 0 !== t2 && (this.globalMiddleware = t2); } reset() { this.globalMiddleware = this.globalMiddleware.filter((t2) => t2.global); } }; function C(t2, e2, s2, i2) { return s2.reduce((t3, s3) => { if (s3.applyBeforeValidation !== i2) return t3; if (s3.mutates) { if (s3.applied) return t3; s3.applied = true; } if (f(t3)) return t3.then((t4) => Promise.all([t4, s3(t4, e2)])).then(([t4, e3]) => Object.assign(t4, e3)); { const i3 = s3(t3, e2); return f(i3) ? i3.then((e3) => Object.assign(t3, e3)) : Object.assign(t3, i3); } }, t2); } function j(t2, e2, s2 = (t3) => { throw t3; }) { try { const s3 = "function" == typeof t2 ? t2() : t2; return f(s3) ? s3.then((t3) => e2(t3)) : e2(s3); } catch (t3) { return s2(t3); } } var _ = /(^\*)|(^\$0)/; var M = class { constructor(t2, e2, s2, i2) { this.requireCache = /* @__PURE__ */ new Set(), this.handlers = {}, this.aliasMap = {}, this.frozens = [], this.shim = i2, this.usage = t2, this.globalMiddleware = s2, this.validation = e2; } addDirectory(t2, e2, s2, i2) { "boolean" != typeof (i2 = i2 || {}).recurse && (i2.recurse = false), Array.isArray(i2.extensions) || (i2.extensions = ["js"]); const n2 = "function" == typeof i2.visit ? i2.visit : (t3) => t3; i2.visit = (t3, e3, s3) => { const i3 = n2(t3, e3, s3); if (i3) { if (this.requireCache.has(e3)) return i3; this.requireCache.add(e3), this.addHandler(i3); } return i3; }, this.shim.requireDirectory({ require: e2, filename: s2 }, t2, i2); } addHandler(t2, e2, s2, i2, n2, r2) { let a2 = []; const h2 = function(t3) { return t3 ? t3.map((t4) => (t4.applyBeforeValidation = false, t4)) : []; }(n2); if (i2 = i2 || (() => { }), Array.isArray(t2)) if (function(t3) { return t3.every((t4) => "string" == typeof t4); }(t2)) [t2, ...a2] = t2; else for (const e3 of t2) this.addHandler(e3); else { if (function(t3) { return "object" == typeof t3 && !Array.isArray(t3); }(t2)) { let e3 = Array.isArray(t2.command) || "string" == typeof t2.command ? t2.command : this.moduleName(t2); return t2.aliases && (e3 = [].concat(e3).concat(t2.aliases)), void this.addHandler(e3, this.extractDesc(t2), t2.builder, t2.handler, t2.middlewares, t2.deprecated); } if (k(s2)) return void this.addHandler([t2].concat(a2), e2, s2.builder, s2.handler, s2.middlewares, s2.deprecated); } if ("string" == typeof t2) { const n3 = o(t2); a2 = a2.map((t3) => o(t3).cmd); let l2 = false; const c2 = [n3.cmd].concat(a2).filter((t3) => !_.test(t3) || (l2 = true, false)); 0 === c2.length && l2 && c2.push("$0"), l2 && (n3.cmd = c2[0], a2 = c2.slice(1), t2 = t2.replace(_, n3.cmd)), a2.forEach((t3) => { this.aliasMap[t3] = n3.cmd; }), false !== e2 && this.usage.command(t2, e2, l2, a2, r2), this.handlers[n3.cmd] = { original: t2, description: e2, handler: i2, builder: s2 || {}, middlewares: h2, deprecated: r2, demanded: n3.demanded, optional: n3.optional }, l2 && (this.defaultCommand = this.handlers[n3.cmd]); } } getCommandHandlers() { return this.handlers; } getCommands() { return Object.keys(this.handlers).concat(Object.keys(this.aliasMap)); } hasDefaultCommand() { return !!this.defaultCommand; } runCommand(t2, e2, s2, i2, n2, r2) { const o2 = this.handlers[t2] || this.handlers[this.aliasMap[t2]] || this.defaultCommand, a2 = e2.getInternalMethods().getContext(), h2 = a2.commands.slice(), l2 = !t2; t2 && (a2.commands.push(t2), a2.fullCommands.push(o2.original)); const c2 = this.applyBuilderUpdateUsageAndParse(l2, o2, e2, s2.aliases, h2, i2, n2, r2); return f(c2) ? c2.then((t3) => this.applyMiddlewareAndGetResult(l2, o2, t3.innerArgv, a2, n2, t3.aliases, e2)) : this.applyMiddlewareAndGetResult(l2, o2, c2.innerArgv, a2, n2, c2.aliases, e2); } applyBuilderUpdateUsageAndParse(t2, e2, s2, i2, n2, r2, o2, a2) { const h2 = e2.builder; let l2 = s2; if (x(h2)) { const c2 = h2(s2.getInternalMethods().reset(i2), a2); if (f(c2)) return c2.then((i3) => { var a3; return l2 = (a3 = i3) && "function" == typeof a3.getInternalMethods ? i3 : s2, this.parseAndUpdateUsage(t2, e2, l2, n2, r2, o2); }); } else (function(t3) { return "object" == typeof t3; })(h2) && (l2 = s2.getInternalMethods().reset(i2), Object.keys(e2.builder).forEach((t3) => { l2.option(t3, h2[t3]); })); return this.parseAndUpdateUsage(t2, e2, l2, n2, r2, o2); } parseAndUpdateUsage(t2, e2, s2, i2, n2, r2) { t2 && s2.getInternalMethods().getUsageInstance().unfreeze(true), this.shouldUpdateUsage(s2) && s2.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(i2, e2), e2.description); const o2 = s2.getInternalMethods().runYargsParserAndExecuteCommands(null, void 0, true, n2, r2); return f(o2) ? o2.then((t3) => ({ aliases: s2.parsed.aliases, innerArgv: t3 })) : { aliases: s2.parsed.aliases, innerArgv: o2 }; } shouldUpdateUsage(t2) { return !t2.getInternalMethods().getUsageInstance().getUsageDisabled() && 0 === t2.getInternalMethods().getUsageInstance().getUsage().length; } usageFromParentCommandsCommandHandler(t2, e2) { const s2 = _.test(e2.original) ? e2.original.replace(_, "").trim() : e2.original, i2 = t2.filter((t3) => !_.test(t3)); return i2.push(s2), `$0 ${i2.join(" ")}`; } handleValidationAndGetResult(t2, e2, s2, i2, n2, r2, o2, a2) { if (!r2.getInternalMethods().getHasOutput()) { const e3 = r2.getInternalMethods().runValidation(n2, a2, r2.parsed.error, t2); s2 = j(s2, (t3) => (e3(t3), t3)); } if (e2.handler && !r2.getInternalMethods().getHasOutput()) { r2.getInternalMethods().setHasOutput(); const i3 = !!r2.getOptions().configuration["populate--"]; r2.getInternalMethods().postProcess(s2, i3, false, false), s2 = j(s2 = C(s2, r2, o2, false), (t3) => { const s3 = e2.handler(t3); return f(s3) ? s3.then(() => t3) : t3; }), t2 || r2.getInternalMethods().getUsageInstance().cacheHelpMessage(), f(s2) && !r2.getInternalMethods().hasParseCallback() && s2.catch((t3) => { try { r2.getInternalMethods().getUsageInstance().fail(null, t3); } catch (t4) { } }); } return t2 || (i2.commands.pop(), i2.fullCommands.pop()), s2; } applyMiddlewareAndGetResult(t2, e2, s2, i2, n2, r2, o2) { let a2 = {}; if (n2) return s2; o2.getInternalMethods().getHasOutput() || (a2 = this.populatePositionals(e2, s2, i2, o2)); const h2 = this.globalMiddleware.getMiddleware().slice(0).concat(e2.middlewares), l2 = C(s2, o2, h2, true); return f(l2) ? l2.then((s3) => this.handleValidationAndGetResult(t2, e2, s3, i2, r2, o2, h2, a2)) : this.handleValidationAndGetResult(t2, e2, l2, i2, r2, o2, h2, a2); } populatePositionals(t2, e2, s2, i2) { e2._ = e2._.slice(s2.commands.length); const n2 = t2.demanded.slice(0), r2 = t2.optional.slice(0), o2 = {}; for (this.validation.positionalCount(n2.length, e2._.length); n2.length; ) { const t3 = n2.shift(); this.populatePositional(t3, e2, o2); } for (; r2.length; ) { const t3 = r2.shift(); this.populatePositional(t3, e2, o2); } return e2._ = s2.commands.concat(e2._.map((t3) => "" + t3)), this.postProcessPositionals(e2, o2, this.cmdToParseOptions(t2.original), i2), o2; } populatePositional(t2, e2, s2) { const i2 = t2.cmd[0]; t2.variadic ? s2[i2] = e2._.splice(0).map(String) : e2._.length && (s2[i2] = [String(e2._.shift())]); } cmdToParseOptions(t2) { const e2 = { array: [], default: {}, alias: {}, demand: {} }, s2 = o(t2); return s2.demanded.forEach((t3) => { const [s3, ...i2] = t3.cmd; t3.variadic && (e2.array.push(s3), e2.default[s3] = []), e2.alias[s3] = i2, e2.demand[s3] = true; }), s2.optional.forEach((t3) => { const [s3, ...i2] = t3.cmd; t3.variadic && (e2.array.push(s3), e2.default[s3] = []), e2.alias[s3] = i2; }), e2; } postProcessPositionals(t2, e2, s2, i2) { const n2 = Object.assign({}, i2.getOptions()); n2.default = Object.assign(s2.default, n2.default); for (const t3 of Object.keys(s2.alias)) n2.alias[t3] = (n2.alias[t3] || []).concat(s2.alias[t3]); n2.array = n2.array.concat(s2.array), n2.config = {}; const r2 = []; if (Object.keys(e2).forEach((t3) => { e2[t3].map((e3) => { n2.configuration["unknown-options-as-args"] && (n2.key[t3] = true), r2.push(`--${t3}`), r2.push(e3); }); }), !r2.length) return; const o2 = Object.assign({}, n2.configuration, { "populate--": false }), a2 = this.shim.Parser.detailed(r2, Object.assign({}, n2, { configuration: o2 })); if (a2.error) i2.getInternalMethods().getUsageInstance().fail(a2.error.message, a2.error); else { const s3 = Object.keys(e2); Object.keys(e2).forEach((t3) => { s3.push(...a2.aliases[t3]); }), Object.keys(a2.argv).forEach((n3) => { s3.includes(n3) && (e2[n3] || (e2[n3] = a2.argv[n3]), !this.isInConfigs(i2, n3) && !this.isDefaulted(i2, n3) && Object.prototype.hasOwnProperty.call(t2, n3) && Object.prototype.hasOwnProperty.call(a2.argv, n3) && (Array.isArray(t2[n3]) || Array.isArray(a2.argv[n3])) ? t2[n3] = [].concat(t2[n3], a2.argv[n3]) : t2[n3] = a2.argv[n3]); }); } } isDefaulted(t2, e2) { const { default: s2 } = t2.getOptions(); return Object.prototype.hasOwnProperty.call(s2, e2) || Object.prototype.hasOwnProperty.call(s2, this.shim.Parser.camelCase(e2)); } isInConfigs(t2, e2) { const { configObjects: s2 } = t2.getOptions(); return s2.some((t3) => Object.prototype.hasOwnProperty.call(t3, e2)) || s2.some((t3) => Object.prototype.hasOwnProperty.call(t3, this.shim.Parser.camelCase(e2))); } runDefaultBuilderOn(t2) { if (!this.defaultCommand) return; if (this.shouldUpdateUsage(t2)) { const e3 = _.test(this.defaultCommand.original) ? this.defaultCommand.original : this.defaultCommand.original.replace(/^[^[\]<>]*/, "$0 "); t2.getInternalMethods().getUsageInstance().usage(e3, this.defaultCommand.description); } const e2 = this.defaultCommand.builder; if (x(e2)) return e2(t2, true); k(e2) || Object.keys(e2).forEach((s2) => { t2.option(s2, e2[s2]); }); } moduleName(t2) { const e2 = function(t3) { if ("undefined" == typeof require) return null; for (let e3, s2 = 0, i2 = Object.keys(require.cache); s2 < i2.length; s2++) if (e3 = require.cache[i2[s2]], e3.exports === t3) return e3; return null; }(t2); if (!e2) throw new Error(`No command name given for module: ${this.shim.inspect(t2)}`); return this.commandFromFilename(e2.filename); } commandFromFilename(t2) { return this.shim.path.basename(t2, this.shim.path.extname(t2)); } extractDesc({ describe: t2, description: e2, desc: s2 }) { for (const i2 of [t2, e2, s2]) { if ("string" == typeof i2 || false === i2) return i2; d(i2, true, this.shim); } return false; } freeze() { this.frozens.push({ handlers: this.handlers, aliasMap: this.aliasMap, defaultCommand: this.defaultCommand }); } unfreeze() { const t2 = this.frozens.pop(); d(t2, void 0, this.shim), { handlers: this.handlers, aliasMap: this.aliasMap, defaultCommand: this.defaultCommand } = t2; } reset() { return this.handlers = {}, this.aliasMap = {}, this.defaultCommand = void 0, this.requireCache = /* @__PURE__ */ new Set(), this; } }; function k(t2) { return "object" == typeof t2 && !!t2.builder && "function" == typeof t2.handler; } function x(t2) { return "function" == typeof t2; } function E(t2) { "undefined" != typeof process && [process.stdout, process.stderr].forEach((e2) => { const s2 = e2; s2._handle && s2.isTTY && "function" == typeof s2._handle.setBlocking && s2._handle.setBlocking(t2); }); } function A(t2) { return "boolean" == typeof t2; } function P(t2, s2) { const i2 = s2.y18n.__, n2 = {}, r2 = []; n2.failFn = function(t3) { r2.push(t3); }; let o2 = null, a2 = null, h2 = true; n2.showHelpOnFail = function(e2 = true, s3) { const [i3, r3] = "string" == typeof e2 ? [true, e2] : [e2, s3]; return t2.getInternalMethods().isGlobalContext() && (a2 = r3), o2 = r3, h2 = i3, n2; }; let l2 = false; n2.fail = function(s3, i3) { const c3 = t2.getInternalMethods().getLoggerInstance(); if (!r2.length) { if (t2.getExitProcess() && E(true), !l2) { l2 = true, h2 && (t2.showHelp("error"), c3.error()), (s3 || i3) && c3.error(s3 || i3); const e2 = o2 || a2; e2 && ((s3 || i3) && c3.error(""), c3.error(e2)); } if (i3 = i3 || new e(s3), t2.getExitProcess()) return t2.exit(1); if (t2.getInternalMethods().hasParseCallback()) return t2.exit(1, i3); throw i3; } for (let t3 = r2.length - 1; t3 >= 0; --t3) { const e2 = r2[t3]; if (A(e2)) { if (i3) throw i3; if (s3) throw Error(s3); } else e2(s3, i3, n2); } }; let c2 = [], f2 = false; n2.usage = (t3, e2) => null === t3 ? (f2 = true, c2 = [], n2) : (f2 = false, c2.push([t3, e2 || ""]), n2), n2.getUsage = () => c2, n2.getUsageDisabled = () => f2, n2.getPositionalGroupName = () => i2("Positionals:"); let d2 = []; n2.example = (t3, e2) => { d2.push([t3, e2 || ""]); }; let u2 = []; n2.command = function(t3, e2, s3, i3, n3 = false) { s3 && (u2 = u2.map((t4) => (t4[2] = false, t4))), u2.push([t3, e2 || "", s3, i3, n3]); }, n2.getCommands = () => u2; let p2 = {}; n2.describe = function(t3, e2) { Array.isArray(t3) ? t3.forEach((t4) => { n2.describe(t4, e2); }) : "object" == typeof t3 ? Object.keys(t3).forEach((e3) => { n2.describe(e3, t3[e3]); }) : p2[t3] = e2; }, n2.getDescriptions = () => p2; let m2 = []; n2.epilog = (t3) => { m2.push(t3); }; let y2, b2 = false; n2.wrap = (t3) => { b2 = true, y2 = t3; }, n2.getWrap = () => s2.getEnv("YARGS_DISABLE_WRAP") ? null : (b2 || (y2 = function() { const t3 = 80; return s2.process.stdColumns ? Math.min(t3, s2.process.stdColumns) : t3; }(), b2 = true), y2); const v2 = "__yargsString__:"; function O2(t3, e2, i3) { let n3 = 0; return Array.isArray(t3) || (t3 = Object.values(t3).map((t4) => [t4])), t3.forEach((t4) => { n3 = Math.max(s2.stringWidth(i3 ? `${i3} ${I(t4[0])}` : I(t4[0])) + $(t4[0]), n3); }), e2 && (n3 = Math.min(n3, parseInt((0.5 * e2).toString(), 10))), n3; } let w2; function C2(e2) { return t2.getOptions().hiddenOptions.indexOf(e2) < 0 || t2.parsed.argv[t2.getOptions().showHiddenOpt]; } function j2(t3, e2) { let s3 = `[${i2("default:")} `; if (void 0 === t3 && !e2) return null; if (e2) s3 += e2; else switch (typeof t3) { case "string": s3 += `"${t3}"`; break; case "object": s3 += JSON.stringify(t3); break; default: s3 += t3; } return `${s3}]`; } n2.deferY18nLookup = (t3) => v2 + t3, n2.help = function() { if (w2) return w2; !function() { const e3 = t2.getDemandedOptions(), s3 = t2.getOptions(); (Object.keys(s3.alias) || []).forEach((i3) => { s3.alias[i3].forEach((r4) => { p2[r4] && n2.describe(i3, p2[r4]), r4 in e3 && t2.demandOption(i3, e3[r4]), s3.boolean.includes(r4) && t2.boolean(i3), s3.count.includes(r4) && t2.count(i3), s3.string.includes(r4) && t2.string(i3), s3.normalize.includes(r4) && t2.normalize(i3), s3.array.includes(r4) && t2.array(i3), s3.number.includes(r4) && t2.number(i3); }); }); }(); const e2 = t2.customScriptName ? t2.$0 : s2.path.basename(t2.$0), r3 = t2.getDemandedOptions(), o3 = t2.getDemandedCommands(), a3 = t2.getDeprecatedOptions(), h3 = t2.getGroups(), l3 = t2.getOptions(); let g2 = []; g2 = g2.concat(Object.keys(p2)), g2 = g2.concat(Object.keys(r3)), g2 = g2.concat(Object.keys(o3)), g2 = g2.concat(Object.keys(l3.default)), g2 = g2.filter(C2), g2 = Object.keys(g2.reduce((t3, e3) => ("_" !== e3 && (t3[e3] = true), t3), {})); const y3 = n2.getWrap(), b3 = s2.cliui({ width: y3, wrap: !!y3 }); if (!f2) { if (c2.length) c2.forEach((t3) => { b3.div({ text: `${t3[0].replace(/\$0/g, e2)}` }), t3[1] && b3.div({ text: `${t3[1]}`, padding: [1, 0, 0, 0] }); }), b3.div(); else if (u2.length) { let t3 = null; t3 = o3._ ? `${e2} <${i2("command")}> ` : `${e2} [${i2("command")}] `, b3.div(`${t3}`); } } if (u2.length > 1 || 1 === u2.length && !u2[0][2]) { b3.div(i2("Commands:")); const s3 = t2.getInternalMethods().getContext(), n3 = s3.commands.length ? `${s3.commands.join(" ")} ` : ""; true === t2.getInternalMethods().getParserConfiguration()["sort-commands"] && (u2 = u2.sort((t3, e3) => t3[0].localeCompare(e3[0]))); const r4 = e2 ? `${e2} ` : ""; u2.forEach((t3) => { const s4 = `${r4}${n3}${t3[0].replace(/^\$0 ?/, "")}`; b3.span({ text: s4, padding: [0, 2, 0, 2], width: O2(u2, y3, `${e2}${n3}`) + 4 }, { text: t3[1] }); const o4 = []; t3[2] && o4.push(`[${i2("default")}]`), t3[3] && t3[3].length && o4.push(`[${i2("aliases:")} ${t3[3].join(", ")}]`), t3[4] && ("string" == typeof t3[4] ? o4.push(`[${i2("deprecated: %s", t3[4])}]`) : o4.push(`[${i2("deprecated")}]`)), o4.length ? b3.div({ text: o4.join(" "), padding: [0, 0, 0, 2], align: "right" }) : b3.div(); }), b3.div(); } const _3 = (Object.keys(l3.alias) || []).concat(Object.keys(t2.parsed.newAliases) || []); g2 = g2.filter((e3) => !t2.parsed.newAliases[e3] && _3.every((t3) => -1 === (l3.alias[t3] || []).indexOf(e3))); const M3 = i2("Options:"); h3[M3] || (h3[M3] = []), function(t3, e3, s3, i3) { let n3 = [], r4 = null; Object.keys(s3).forEach((t4) => { n3 = n3.concat(s3[t4]); }), t3.forEach((t4) => { r4 = [t4].concat(e3[t4]), r4.some((t5) => -1 !== n3.indexOf(t5)) || s3[i3].push(t4); }); }(g2, l3.alias, h3, M3); const k2 = (t3) => /^--/.test(I(t3)), x2 = Object.keys(h3).filter((t3) => h3[t3].length > 0).map((t3) => ({ groupName: t3, normalizedKeys: h3[t3].filter(C2).map((t4) => { if (_3.includes(t4)) return t4; for (let e3, s3 = 0; void 0 !== (e3 = _3[s3]); s3++) if ((l3.alias[e3] || []).includes(t4)) return e3; return t4; }) })).filter(({ normalizedKeys: t3 }) => t3.length > 0).map(({ groupName: t3, normalizedKeys: e3 }) => { const s3 = e3.reduce((e4, s4) => (e4[s4] = [s4].concat(l3.alias[s4] || []).map((e5) => t3 === n2.getPositionalGroupName() ? e5 : (/^[0-9]$/.test(e5) ? l3.boolean.includes(s4) ? "-" : "--" : e5.length > 1 ? "--" : "-") + e5).sort((t4, e5) => k2(t4) === k2(e5) ? 0 : k2(t4) ? 1 : -1).join(", "), e4), {}); return { groupName: t3, normalizedKeys: e3, switches: s3 }; }); if (x2.filter(({ groupName: t3 }) => t3 !== n2.getPositionalGroupName()).some(({ normalizedKeys: t3, switches: e3 }) => !t3.every((t4) => k2(e3[t4]))) && x2.filter(({ groupName: t3 }) => t3 !== n2.getPositionalGroupName()).forEach(({ normalizedKeys: t3, switches: e3 }) => { t3.forEach((t4) => { var s3, i3; k2(e3[t4]) && (e3[t4] = (s3 = e3[t4], i3 = "-x, ".length, S(s3) ? { text: s3.text, indentation: s3.indentation + i3 } : { text: s3, indentation: i3 })); }); }), x2.forEach(({ groupName: e3, normalizedKeys: s3, switches: o4 }) => { b3.div(e3), s3.forEach((e4) => { const s4 = o4[e4]; let h4 = p2[e4] || "", c3 = null; h4.includes(v2) && (h4 = i2(h4.substring(v2.length))), l3.boolean.includes(e4) && (c3 = `[${i2("boolean")}]`), l3.count.includes(e4) && (c3 = `[${i2("count")}]`), l3.string.includes(e4) && (c3 = `[${i2("string")}]`), l3.normalize.includes(e4) && (c3 = `[${i2("string")}]`), l3.array.includes(e4) && (c3 = `[${i2("array")}]`), l3.number.includes(e4) && (c3 = `[${i2("number")}]`); const f3 = [e4 in a3 ? (d3 = a3[e4], "string" == typeof d3 ? `[${i2("deprecated: %s", d3)}]` : `[${i2("deprecated")}]`) : null, c3, e4 in r3 ? `[${i2("required")}]` : null, l3.choices && l3.choices[e4] ? `[${i2("choices:")} ${n2.stringifiedValues(l3.choices[e4])}]` : null, j2(l3.default[e4], l3.defaultDescription[e4])].filter(Boolean).join(" "); var d3; b3.span({ text: I(s4), padding: [0, 2, 0, 2 + $(s4)], width: O2(o4, y3) + 4 }, h4); const u3 = true === t2.getInternalMethods().getUsageConfiguration()["hide-types"]; f3 && !u3 ? b3.div({ text: f3, padding: [0, 0, 0, 2], align: "right" }) : b3.div(); }), b3.div(); }), d2.length && (b3.div(i2("Examples:")), d2.forEach((t3) => { t3[0] = t3[0].replace(/\$0/g, e2); }), d2.forEach((t3) => { "" === t3[1] ? b3.div({ text: t3[0], padding: [0, 2, 0, 2] }) : b3.div({ text: t3[0], padding: [0, 2, 0, 2], width: O2(d2, y3) + 4 }, { text: t3[1] }); }), b3.div()), m2.length > 0) { const t3 = m2.map((t4) => t4.replace(/\$0/g, e2)).join("\n"); b3.div(`${t3} `); } return b3.toString().replace(/\s*$/, ""); }, n2.cacheHelpMessage = function() { w2 = this.help(); }, n2.clearCachedHelpMessage = function() { w2 = void 0; }, n2.hasCachedHelpMessage = function() { return !!w2; }, n2.showHelp = (e2) => { const s3 = t2.getInternalMethods().getLoggerInstance(); e2 || (e2 = "error"); ("function" == typeof e2 ? e2 : s3[e2])(n2.help()); }, n2.functionDescription = (t3) => ["(", t3.name ? s2.Parser.decamelize(t3.name, "-") : i2("generated-value"), ")"].join(""), n2.stringifiedValues = function(t3, e2) { let s3 = ""; const i3 = e2 || ", ", n3 = [].concat(t3); return t3 && n3.length ? (n3.forEach((t4) => { s3.length && (s3 += i3), s3 += JSON.stringify(t4); }), s3) : s3; }; let _2 = null; n2.version = (t3) => { _2 = t3; }, n2.showVersion = (e2) => { const s3 = t2.getInternalMethods().getLoggerInstance(); e2 || (e2 = "error"); ("function" == typeof e2 ? e2 : s3[e2])(_2); }, n2.reset = function(t3) { return o2 = null, l2 = false, c2 = [], f2 = false, m2 = [], d2 = [], u2 = [], p2 = g(p2, (e2) => !t3[e2]), n2; }; const M2 = []; return n2.freeze = function() { M2.push({ failMessage: o2, failureOutput: l2, usages: c2, usageDisabled: f2, epilogs: m2, examples: d2, commands: u2, descriptions: p2 }); }, n2.unfreeze = function(t3 = false) { const e2 = M2.pop(); e2 && (t3 ? (p2 = { ...e2.descriptions, ...p2 }, u2 = [...e2.commands, ...u2], c2 = [...e2.usages, ...c2], d2 = [...e2.examples, ...d2], m2 = [...e2.epilogs, ...m2]) : { failMessage: o2, failureOutput: l2, usages: c2, usageDisabled: f2, epilogs: m2, examples: d2, commands: u2, descriptions: p2 } = e2); }, n2; } function S(t2) { return "object" == typeof t2; } function $(t2) { return S(t2) ? t2.indentation : 0; } function I(t2) { return S(t2) ? t2.text : t2; } var D = class { constructor(t2, e2, s2, i2) { var n2, r2, o2; this.yargs = t2, this.usage = e2, this.command = s2, this.shim = i2, this.completionKey = "get-yargs-completions", this.aliases = null, this.customCompletionFunction = null, this.indexAfterLastReset = 0, this.zshShell = null !== (o2 = (null === (n2 = this.shim.getEnv("SHELL")) || void 0 === n2 ? void 0 : n2.includes("zsh")) || (null === (r2 = this.shim.getEnv("ZSH_NAME")) || void 0 === r2 ? void 0 : r2.includes("zsh"))) && void 0 !== o2 && o2; } defaultCompletion(t2, e2, s2, i2) { const n2 = this.command.getCommandHandlers(); for (let e3 = 0, s3 = t2.length; e3 < s3; ++e3) if (n2[t2[e3]] && n2[t2[e3]].builder) { const s4 = n2[t2[e3]].builder; if (x(s4)) { this.indexAfterLastReset = e3 + 1; const t3 = this.yargs.getInternalMethods().reset(); return s4(t3, true), t3.argv; } } const r2 = []; this.commandCompletions(r2, t2, s2), this.optionCompletions(r2, t2, e2, s2), this.choicesFromOptionsCompletions(r2, t2, e2, s2), this.choicesFromPositionalsCompletions(r2, t2, e2, s2), i2(null, r2); } commandCompletions(t2, e2, s2) { const i2 = this.yargs.getInternalMethods().getContext().commands; s2.match(/^-/) || i2[i2.length - 1] === s2 || this.previousArgHasChoices(e2) || this.usage.getCommands().forEach((s3) => { const i3 = o(s3[0]).cmd; if (-1 === e2.indexOf(i3)) if (this.zshShell) { const e3 = s3[1] || ""; t2.push(i3.replace(/:/g, "\\:") + ":" + e3); } else t2.push(i3); }); } optionCompletions(t2, e2, s2, i2) { if ((i2.match(/^-/) || "" === i2 && 0 === t2.length) && !this.previousArgHasChoices(e2)) { const s3 = this.yargs.getOptions(), n2 = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || []; Object.keys(s3.key).forEach((r2) => { const o2 = !!s3.configuration["boolean-negation"] && s3.boolean.includes(r2); n2.includes(r2) || s3.hiddenOptions.includes(r2) || this.argsContainKey(e2, r2, o2) || (this.completeOptionKey(r2, t2, i2), o2 && s3.default[r2] && this.completeOptionKey(`no-${r2}`, t2, i2)); }); } } choicesFromOptionsCompletions(t2, e2, s2, i2) { if (this.previousArgHasChoices(e2)) { const s3 = this.getPreviousArgChoices(e2); s3 && s3.length > 0 && t2.push(...s3.map((t3) => t3.replace(/:/g, "\\:"))); } } choicesFromPositionalsCompletions(t2, e2, s2, i2) { if ("" === i2 && t2.length > 0 && this.previousArgHasChoices(e2)) return; const n2 = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [], r2 = Math.max(this.indexAfterLastReset, this.yargs.getInternalMethods().getContext().commands.length + 1), o2 = n2[s2._.length - r2 - 1]; if (!o2) return; const a2 = this.yargs.getOptions().choices[o2] || []; for (const e3 of a2) e3.startsWith(i2) && t2.push(e3.replace(/:/g, "\\:")); } getPreviousArgChoices(t2) { if (t2.length < 1) return; let e2 = t2[t2.length - 1], s2 = ""; if (!e2.startsWith("-") && t2.length > 1 && (s2 = e2, e2 = t2[t2.length - 2]), !e2.startsWith("-")) return; const i2 = e2.replace(/^-+/, ""), n2 = this.yargs.getOptions(), r2 = [i2, ...this.yargs.getAliases()[i2] || []]; let o2; for (const t3 of r2) if (Object.prototype.hasOwnProperty.call(n2.key, t3) && Array.isArray(n2.choices[t3])) { o2 = n2.choices[t3]; break; } return o2 ? o2.filter((t3) => !s2 || t3.startsWith(s2)) : void 0; } previousArgHasChoices(t2) { const e2 = this.getPreviousArgChoices(t2); return void 0 !== e2 && e2.length > 0; } argsContainKey(t2, e2, s2) { const i2 = (e3) => -1 !== t2.indexOf((/^[^0-9]$/.test(e3) ? "-" : "--") + e3); if (i2(e2)) return true; if (s2 && i2(`no-${e2}`)) return true; if (this.aliases) { for (const t3 of this.aliases[e2]) if (i2(t3)) return true; } return false; } completeOptionKey(t2, e2, s2) { var i2, n2, r2; const o2 = this.usage.getDescriptions(), a2 = !/^--/.test(s2) && ((t3) => /^[^0-9]$/.test(t3))(t2) ? "-" : "--"; if (this.zshShell) { const s3 = null === (i2 = null == this ? void 0 : this.aliases) || void 0 === i2 ? void 0 : i2[t2].find((t3) => { const e3 = o2[t3]; return "string" == typeof e3 && e3.length > 0; }), h2 = s3 ? o2[s3] : void 0, l2 = null !== (r2 = null !== (n2 = o2[t2]) && void 0 !== n2 ? n2 : h2) && void 0 !== r2 ? r2 : ""; e2.push(a2 + `${t2.replace(/:/g, "\\:")}:${l2.replace("__yargsString__:", "").replace(/(\r\n|\n|\r)/gm, " ")}`); } else e2.push(a2 + t2); } customCompletion(t2, e2, s2, i2) { if (d(this.customCompletionFunction, null, this.shim), this.customCompletionFunction.length < 3) { const t3 = this.customCompletionFunction(s2, e2); return f(t3) ? t3.then((t4) => { this.shim.process.nextTick(() => { i2(null, t4); }); }).catch((t4) => { this.shim.process.nextTick(() => { i2(t4, void 0); }); }) : i2(null, t3); } return function(t3) { return t3.length > 3; }(this.customCompletionFunction) ? this.customCompletionFunction(s2, e2, (n2 = i2) => this.defaultCompletion(t2, e2, s2, n2), (t3) => { i2(null, t3); }) : this.customCompletionFunction(s2, e2, (t3) => { i2(null, t3); }); } getCompletion(t2, e2) { const s2 = t2.length ? t2[t2.length - 1] : "", i2 = this.yargs.parse(t2, true), n2 = this.customCompletionFunction ? (i3) => this.customCompletion(t2, i3, s2, e2) : (i3) => this.defaultCompletion(t2, i3, s2, e2); return f(i2) ? i2.then(n2) : n2(i2); } generateCompletionScript(t2, e2) { let s2 = this.zshShell ? `#compdef {{app_name}} ###-begin-{{app_name}}-completions-### # # yargs command completion script # # Installation: {{app_path}} {{completion_command}} >> ~/.zshrc # or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX. # _{{app_name}}_yargs_completions() { local reply local si=$IFS IFS=$' ' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) IFS=$si _describe 'values' reply } compdef _{{app_name}}_yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### ` : '###-begin-{{app_name}}-completions-###\n#\n# yargs command completion script\n#\n# Installation: {{app_path}} {{completion_command}} >> ~/.bashrc\n# or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.\n#\n_{{app_name}}_yargs_completions()\n{\n local cur_word args type_list\n\n cur_word="${COMP_WORDS[COMP_CWORD]}"\n args=("${COMP_WORDS[@]}")\n\n # ask yargs to generate completions.\n type_list=$({{app_path}} --get-yargs-completions "${args[@]}")\n\n COMPREPLY=( $(compgen -W "${type_list}" -- ${cur_word}) )\n\n # if no match was found, fall back to filename completion\n if [ ${#COMPREPLY[@]} -eq 0 ]; then\n COMPREPLY=()\n fi\n\n return 0\n}\ncomplete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}\n###-end-{{app_name}}-completions-###\n'; const i2 = this.shim.path.basename(t2); return t2.match(/\.js$/) && (t2 = `./${t2}`), s2 = s2.replace(/{{app_name}}/g, i2), s2 = s2.replace(/{{completion_command}}/g, e2), s2.replace(/{{app_path}}/g, t2); } registerFunction(t2) { this.customCompletionFunction = t2; } setParsed(t2) { this.aliases = t2.aliases; } }; function N(t2, e2) { if (0 === t2.length) return e2.length; if (0 === e2.length) return t2.length; const s2 = []; let i2, n2; for (i2 = 0; i2 <= e2.length; i2++) s2[i2] = [i2]; for (n2 = 0; n2 <= t2.length; n2++) s2[0][n2] = n2; for (i2 = 1; i2 <= e2.length; i2++) for (n2 = 1; n2 <= t2.length; n2++) e2.charAt(i2 - 1) === t2.charAt(n2 - 1) ? s2[i2][n2] = s2[i2 - 1][n2 - 1] : i2 > 1 && n2 > 1 && e2.charAt(i2 - 2) === t2.charAt(n2 - 1) && e2.charAt(i2 - 1) === t2.charAt(n2 - 2) ? s2[i2][n2] = s2[i2 - 2][n2 - 2] + 1 : s2[i2][n2] = Math.min(s2[i2 - 1][n2 - 1] + 1, Math.min(s2[i2][n2 - 1] + 1, s2[i2 - 1][n2] + 1)); return s2[e2.length][t2.length]; } var H = ["$0", "--", "_"]; var W; var z; var q2; var U; var F; var L; var V; var G; var R; var T; var B; var K; var Y; var J; var Z; var X; var Q; var tt; var et; var st; var it; var nt; var rt; var ot; var at; var ht; var lt; var ct; var ft; var dt; var ut; var pt; var gt; var mt; var yt; var bt = Symbol("copyDoubleDash"); var vt = Symbol("copyDoubleDash"); var Ot = Symbol("deleteFromParserHintObject"); var wt = Symbol("emitWarning"); var Ct = Symbol("freeze"); var jt = Symbol("getDollarZero"); var _t = Symbol("getParserConfiguration"); var Mt = Symbol("getUsageConfiguration"); var kt = Symbol("guessLocale"); var xt = Symbol("guessVersion"); var Et = Symbol("parsePositionalNumbers"); var At = Symbol("pkgUp"); var Pt = Symbol("populateParserHintArray"); var St = Symbol("populateParserHintSingleValueDictionary"); var $t = Symbol("populateParserHintArrayDictionary"); var It = Symbol("populateParserHintDictionary"); var Dt = Symbol("sanitizeKey"); var Nt = Symbol("setKey"); var Ht = Symbol("unfreeze"); var Wt = Symbol("validateAsync"); var zt = Symbol("getCommandInstance"); var qt = Symbol("getContext"); var Ut = Symbol("getHasOutput"); var Ft = Symbol("getLoggerInstance"); var Lt = Symbol("getParseContext"); var Vt = Symbol("getUsageInstance"); var Gt = Symbol("getValidationInstance"); var Rt = Symbol("hasParseCallback"); var Tt = Symbol("isGlobalContext"); var Bt = Symbol("postProcess"); var Kt = Symbol("rebase"); var Yt = Symbol("reset"); var Jt = Symbol("runYargsParserAndExecuteCommands"); var Zt = Symbol("runValidation"); var Xt = Symbol("setHasOutput"); var Qt = Symbol("kTrackManuallySetKeys"); var te = class { constructor(t2 = [], e2, s2, i2) { this.customScriptName = false, this.parsed = false, W.set(this, void 0), z.set(this, void 0), q2.set(this, { commands: [], fullCommands: [] }), U.set(this, null), F.set(this, null), L.set(this, "show-hidden"), V.set(this, null), G.set(this, true), R.set(this, {}), T.set(this, true), B.set(this, []), K.set(this, void 0), Y.set(this, {}), J.set(this, false), Z.set(this, null), X.set(this, true), Q.set(this, void 0), tt.set(this, ""), et.set(this, void 0), st.set(this, void 0), it.set(this, {}), nt.set(this, null), rt.set(this, null), ot.set(this, {}), at.set(this, {}), ht.set(this, void 0), lt.set(this, false), ct.set(this, void 0), ft.set(this, false), dt.set(this, false), ut.set(this, false), pt.set(this, void 0), gt.set(this, {}), mt.set(this, null), yt.set(this, void 0), O(this, ct, i2, "f"), O(this, ht, t2, "f"), O(this, z, e2, "f"), O(this, st, s2, "f"), O(this, K, new w(this), "f"), this.$0 = this[jt](), this[Yt](), O(this, W, v(this, W, "f"), "f"), O(this, pt, v(this, pt, "f"), "f"), O(this, yt, v(this, yt, "f"), "f"), O(this, et, v(this, et, "f"), "f"), v(this, et, "f").showHiddenOpt = v(this, L, "f"), O(this, Q, this[vt](), "f"); } addHelpOpt(t2, e2) { return h("[string|boolean] [string]", [t2, e2], arguments.length), v(this, Z, "f") && (this[Ot](v(this, Z, "f")), O(this, Z, null, "f")), false === t2 && void 0 === e2 || (O(this, Z, "string" == typeof t2 ? t2 : "help", "f"), this.boolean(v(this, Z, "f")), this.describe(v(this, Z, "f"), e2 || v(this, pt, "f").deferY18nLookup("Show help"))), this; } help(t2, e2) { return this.addHelpOpt(t2, e2); } addShowHiddenOpt(t2, e2) { if (h("[string|boolean] [string]", [t2, e2], arguments.length), false === t2 && void 0 === e2) return this; const s2 = "string" == typeof t2 ? t2 : v(this, L, "f"); return this.boolean(s2), this.describe(s2, e2 || v(this, pt, "f").deferY18nLookup("Show hidden options")), v(this, et, "f").showHiddenOpt = s2, this; } showHidden(t2, e2) { return this.addShowHiddenOpt(t2, e2); } alias(t2, e2) { return h(" [string|array]", [t2, e2], arguments.length), this[$t](this.alias.bind(this), "alias", t2, e2), this; } array(t2) { return h("", [t2], arguments.length), this[Pt]("array", t2), this[Qt](t2), this; } boolean(t2) { return h("", [t2], arguments.length), this[Pt]("boolean", t2), this[Qt](t2), this; } check(t2, e2) { return h(" [boolean]", [t2, e2], arguments.length), this.middleware((e3, s2) => j(() => t2(e3, s2.getOptions()), (s3) => (s3 ? ("string" == typeof s3 || s3 instanceof Error) && v(this, pt, "f").fail(s3.toString(), s3) : v(this, pt, "f").fail(v(this, ct, "f").y18n.__("Argument check failed: %s", t2.toString())), e3), (t3) => (v(this, pt, "f").fail(t3.message ? t3.message : t3.toString(), t3), e3)), false, e2), this; } choices(t2, e2) { return h(" [string|array]", [t2, e2], arguments.length), this[$t](this.choices.bind(this), "choices", t2, e2), this; } coerce(t2, s2) { if (h(" [function]", [t2, s2], arguments.length), Array.isArray(t2)) { if (!s2) throw new e("coerce callback must be provided"); for (const e2 of t2) this.coerce(e2, s2); return this; } if ("object" == typeof t2) { for (const e2 of Object.keys(t2)) this.coerce(e2, t2[e2]); return this; } if (!s2) throw new e("coerce callback must be provided"); return v(this, et, "f").key[t2] = true, v(this, K, "f").addCoerceMiddleware((i2, n2) => { let r2; return Object.prototype.hasOwnProperty.call(i2, t2) ? j(() => (r2 = n2.getAliases(), s2(i2[t2])), (e2) => { i2[t2] = e2; const s3 = n2.getInternalMethods().getParserConfiguration()["strip-aliased"]; if (r2[t2] && true !== s3) for (const s4 of r2[t2]) i2[s4] = e2; return i2; }, (t3) => { throw new e(t3.message); }) : i2; }, t2), this; } conflicts(t2, e2) { return h(" [string|array]", [t2, e2], arguments.length), v(this, yt, "f").conflicts(t2, e2), this; } config(t2 = "config", e2, s2) { return h("[object|string] [string|function] [function]", [t2, e2, s2], arguments.length), "object" != typeof t2 || Array.isArray(t2) ? ("function" == typeof e2 && (s2 = e2, e2 = void 0), this.describe(t2, e2 || v(this, pt, "f").deferY18nLookup("Path to JSON config file")), (Array.isArray(t2) ? t2 : [t2]).forEach((t3) => { v(this, et, "f").config[t3] = s2 || true; }), this) : (t2 = n(t2, v(this, z, "f"), this[_t]()["deep-merge-config"] || false, v(this, ct, "f")), v(this, et, "f").configObjects = (v(this, et, "f").configObjects || []).concat(t2), this); } completion(t2, e2, s2) { return h("[string] [string|boolean|function] [function]", [t2, e2, s2], arguments.length), "function" == typeof e2 && (s2 = e2, e2 = void 0), O(this, F, t2 || v(this, F, "f") || "completion", "f"), e2 || false === e2 || (e2 = "generate completion script"), this.command(v(this, F, "f"), e2), s2 && v(this, U, "f").registerFunction(s2), this; } command(t2, e2, s2, i2, n2, r2) { return h(" [string|boolean] [function|object] [function] [array] [boolean|string]", [t2, e2, s2, i2, n2, r2], arguments.length), v(this, W, "f").addHandler(t2, e2, s2, i2, n2, r2), this; } commands(t2, e2, s2, i2, n2, r2) { return this.command(t2, e2, s2, i2, n2, r2); } commandDir(t2, e2) { h(" [object]", [t2, e2], arguments.length); const s2 = v(this, st, "f") || v(this, ct, "f").require; return v(this, W, "f").addDirectory(t2, s2, v(this, ct, "f").getCallerFile(), e2), this; } count(t2) { return h("", [t2], arguments.length), this[Pt]("count", t2), this[Qt](t2), this; } default(t2, e2, s2) { return h(" [*] [string]", [t2, e2, s2], arguments.length), s2 && (u(t2, v(this, ct, "f")), v(this, et, "f").defaultDescription[t2] = s2), "function" == typeof e2 && (u(t2, v(this, ct, "f")), v(this, et, "f").defaultDescription[t2] || (v(this, et, "f").defaultDescription[t2] = v(this, pt, "f").functionDescription(e2)), e2 = e2.call()), this[St](this.default.bind(this), "default", t2, e2), this; } defaults(t2, e2, s2) { return this.default(t2, e2, s2); } demandCommand(t2 = 1, e2, s2, i2) { return h("[number] [number|string] [string|null|undefined] [string|null|undefined]", [t2, e2, s2, i2], arguments.length), "number" != typeof e2 && (s2 = e2, e2 = 1 / 0), this.global("_", false), v(this, et, "f").demandedCommands._ = { min: t2, max: e2, minMsg: s2, maxMsg: i2 }, this; } demand(t2, e2, s2) { return Array.isArray(e2) ? (e2.forEach((t3) => { d(s2, true, v(this, ct, "f")), this.demandOption(t3, s2); }), e2 = 1 / 0) : "number" != typeof e2 && (s2 = e2, e2 = 1 / 0), "number" == typeof t2 ? (d(s2, true, v(this, ct, "f")), this.demandCommand(t2, e2, s2, s2)) : Array.isArray(t2) ? t2.forEach((t3) => { d(s2, true, v(this, ct, "f")), this.demandOption(t3, s2); }) : "string" == typeof s2 ? this.demandOption(t2, s2) : true !== s2 && void 0 !== s2 || this.demandOption(t2), this; } demandOption(t2, e2) { return h(" [string]", [t2, e2], arguments.length), this[St](this.demandOption.bind(this), "demandedOptions", t2, e2), this; } deprecateOption(t2, e2) { return h(" [string|boolean]", [t2, e2], arguments.length), v(this, et, "f").deprecatedOptions[t2] = e2, this; } describe(t2, e2) { return h(" [string]", [t2, e2], arguments.length), this[Nt](t2, true), v(this, pt, "f").describe(t2, e2), this; } detectLocale(t2) { return h("", [t2], arguments.length), O(this, G, t2, "f"), this; } env(t2) { return h("[string|boolean]", [t2], arguments.length), false === t2 ? delete v(this, et, "f").envPrefix : v(this, et, "f").envPrefix = t2 || "", this; } epilogue(t2) { return h("", [t2], arguments.length), v(this, pt, "f").epilog(t2), this; } epilog(t2) { return this.epilogue(t2); } example(t2, e2) { return h(" [string]", [t2, e2], arguments.length), Array.isArray(t2) ? t2.forEach((t3) => this.example(...t3)) : v(this, pt, "f").example(t2, e2), this; } exit(t2, e2) { O(this, J, true, "f"), O(this, V, e2, "f"), v(this, T, "f") && v(this, ct, "f").process.exit(t2); } exitProcess(t2 = true) { return h("[boolean]", [t2], arguments.length), O(this, T, t2, "f"), this; } fail(t2) { if (h("", [t2], arguments.length), "boolean" == typeof t2 && false !== t2) throw new e("Invalid first argument. Expected function or boolean 'false'"); return v(this, pt, "f").failFn(t2), this; } getAliases() { return this.parsed ? this.parsed.aliases : {}; } async getCompletion(t2, e2) { return h(" [function]", [t2, e2], arguments.length), e2 ? v(this, U, "f").getCompletion(t2, e2) : new Promise((e3, s2) => { v(this, U, "f").getCompletion(t2, (t3, i2) => { t3 ? s2(t3) : e3(i2); }); }); } getDemandedOptions() { return h([], 0), v(this, et, "f").demandedOptions; } getDemandedCommands() { return h([], 0), v(this, et, "f").demandedCommands; } getDeprecatedOptions() { return h([], 0), v(this, et, "f").deprecatedOptions; } getDetectLocale() { return v(this, G, "f"); } getExitProcess() { return v(this, T, "f"); } getGroups() { return Object.assign({}, v(this, Y, "f"), v(this, at, "f")); } getHelp() { if (O(this, J, true, "f"), !v(this, pt, "f").hasCachedHelpMessage()) { if (!this.parsed) { const t3 = this[Jt](v(this, ht, "f"), void 0, void 0, 0, true); if (f(t3)) return t3.then(() => v(this, pt, "f").help()); } const t2 = v(this, W, "f").runDefaultBuilderOn(this); if (f(t2)) return t2.then(() => v(this, pt, "f").help()); } return Promise.resolve(v(this, pt, "f").help()); } getOptions() { return v(this, et, "f"); } getStrict() { return v(this, ft, "f"); } getStrictCommands() { return v(this, dt, "f"); } getStrictOptions() { return v(this, ut, "f"); } global(t2, e2) { return h(" [boolean]", [t2, e2], arguments.length), t2 = [].concat(t2), false !== e2 ? v(this, et, "f").local = v(this, et, "f").local.filter((e3) => -1 === t2.indexOf(e3)) : t2.forEach((t3) => { v(this, et, "f").local.includes(t3) || v(this, et, "f").local.push(t3); }), this; } group(t2, e2) { h(" ", [t2, e2], arguments.length); const s2 = v(this, at, "f")[e2] || v(this, Y, "f")[e2]; v(this, at, "f")[e2] && delete v(this, at, "f")[e2]; const i2 = {}; return v(this, Y, "f")[e2] = (s2 || []).concat(t2).filter((t3) => !i2[t3] && (i2[t3] = true)), this; } hide(t2) { return h("", [t2], arguments.length), v(this, et, "f").hiddenOptions.push(t2), this; } implies(t2, e2) { return h(" [number|string|array]", [t2, e2], arguments.length), v(this, yt, "f").implies(t2, e2), this; } locale(t2) { return h("[string]", [t2], arguments.length), void 0 === t2 ? (this[kt](), v(this, ct, "f").y18n.getLocale()) : (O(this, G, false, "f"), v(this, ct, "f").y18n.setLocale(t2), this); } middleware(t2, e2, s2) { return v(this, K, "f").addMiddleware(t2, !!e2, s2); } nargs(t2, e2) { return h(" [number]", [t2, e2], arguments.length), this[St](this.nargs.bind(this), "narg", t2, e2), this; } normalize(t2) { return h("", [t2], arguments.length), this[Pt]("normalize", t2), this; } number(t2) { return h("", [t2], arguments.length), this[Pt]("number", t2), this[Qt](t2), this; } option(t2, e2) { if (h(" [object]", [t2, e2], arguments.length), "object" == typeof t2) Object.keys(t2).forEach((e3) => { this.options(e3, t2[e3]); }); else { "object" != typeof e2 && (e2 = {}), this[Qt](t2), !v(this, mt, "f") || "version" !== t2 && "version" !== (null == e2 ? void 0 : e2.alias) || this[wt](['"version" is a reserved word.', "Please do one of the following:", '- Disable version with `yargs.version(false)` if using "version" as an option', "- Use the built-in `yargs.version` method instead (if applicable)", "- Use a different option key", "https://yargs.js.org/docs/#api-reference-version"].join("\n"), void 0, "versionWarning"), v(this, et, "f").key[t2] = true, e2.alias && this.alias(t2, e2.alias); const s2 = e2.deprecate || e2.deprecated; s2 && this.deprecateOption(t2, s2); const i2 = e2.demand || e2.required || e2.require; i2 && this.demand(t2, i2), e2.demandOption && this.demandOption(t2, "string" == typeof e2.demandOption ? e2.demandOption : void 0), e2.conflicts && this.conflicts(t2, e2.conflicts), "default" in e2 && this.default(t2, e2.default), void 0 !== e2.implies && this.implies(t2, e2.implies), void 0 !== e2.nargs && this.nargs(t2, e2.nargs), e2.config && this.config(t2, e2.configParser), e2.normalize && this.normalize(t2), e2.choices && this.choices(t2, e2.choices), e2.coerce && this.coerce(t2, e2.coerce), e2.group && this.group(t2, e2.group), (e2.boolean || "boolean" === e2.type) && (this.boolean(t2), e2.alias && this.boolean(e2.alias)), (e2.array || "array" === e2.type) && (this.array(t2), e2.alias && this.array(e2.alias)), (e2.number || "number" === e2.type) && (this.number(t2), e2.alias && this.number(e2.alias)), (e2.string || "string" === e2.type) && (this.string(t2), e2.alias && this.string(e2.alias)), (e2.count || "count" === e2.type) && this.count(t2), "boolean" == typeof e2.global && this.global(t2, e2.global), e2.defaultDescription && (v(this, et, "f").defaultDescription[t2] = e2.defaultDescription), e2.skipValidation && this.skipValidation(t2); const n2 = e2.describe || e2.description || e2.desc, r2 = v(this, pt, "f").getDescriptions(); Object.prototype.hasOwnProperty.call(r2, t2) && "string" != typeof n2 || this.describe(t2, n2), e2.hidden && this.hide(t2), e2.requiresArg && this.requiresArg(t2); } return this; } options(t2, e2) { return this.option(t2, e2); } parse(t2, e2, s2) { h("[string|array] [function|boolean|object] [function]", [t2, e2, s2], arguments.length), this[Ct](), void 0 === t2 && (t2 = v(this, ht, "f")), "object" == typeof e2 && (O(this, rt, e2, "f"), e2 = s2), "function" == typeof e2 && (O(this, nt, e2, "f"), e2 = false), e2 || O(this, ht, t2, "f"), v(this, nt, "f") && O(this, T, false, "f"); const i2 = this[Jt](t2, !!e2), n2 = this.parsed; return v(this, U, "f").setParsed(this.parsed), f(i2) ? i2.then((t3) => (v(this, nt, "f") && v(this, nt, "f").call(this, v(this, V, "f"), t3, v(this, tt, "f")), t3)).catch((t3) => { throw v(this, nt, "f") && v(this, nt, "f")(t3, this.parsed.argv, v(this, tt, "f")), t3; }).finally(() => { this[Ht](), this.parsed = n2; }) : (v(this, nt, "f") && v(this, nt, "f").call(this, v(this, V, "f"), i2, v(this, tt, "f")), this[Ht](), this.parsed = n2, i2); } parseAsync(t2, e2, s2) { const i2 = this.parse(t2, e2, s2); return f(i2) ? i2 : Promise.resolve(i2); } parseSync(t2, s2, i2) { const n2 = this.parse(t2, s2, i2); if (f(n2)) throw new e(".parseSync() must not be used with asynchronous builders, handlers, or middleware"); return n2; } parserConfiguration(t2) { return h("", [t2], arguments.length), O(this, it, t2, "f"), this; } pkgConf(t2, e2) { h(" [string]", [t2, e2], arguments.length); let s2 = null; const i2 = this[At](e2 || v(this, z, "f")); return i2[t2] && "object" == typeof i2[t2] && (s2 = n(i2[t2], e2 || v(this, z, "f"), this[_t]()["deep-merge-config"] || false, v(this, ct, "f")), v(this, et, "f").configObjects = (v(this, et, "f").configObjects || []).concat(s2)), this; } positional(t2, e2) { h(" ", [t2, e2], arguments.length); const s2 = ["default", "defaultDescription", "implies", "normalize", "choices", "conflicts", "coerce", "type", "describe", "desc", "description", "alias"]; e2 = g(e2, (t3, e3) => !("type" === t3 && !["string", "number", "boolean"].includes(e3)) && s2.includes(t3)); const i2 = v(this, q2, "f").fullCommands[v(this, q2, "f").fullCommands.length - 1], n2 = i2 ? v(this, W, "f").cmdToParseOptions(i2) : { array: [], alias: {}, default: {}, demand: {} }; return p(n2).forEach((s3) => { const i3 = n2[s3]; Array.isArray(i3) ? -1 !== i3.indexOf(t2) && (e2[s3] = true) : i3[t2] && !(s3 in e2) && (e2[s3] = i3[t2]); }), this.group(t2, v(this, pt, "f").getPositionalGroupName()), this.option(t2, e2); } recommendCommands(t2 = true) { return h("[boolean]", [t2], arguments.length), O(this, lt, t2, "f"), this; } required(t2, e2, s2) { return this.demand(t2, e2, s2); } require(t2, e2, s2) { return this.demand(t2, e2, s2); } requiresArg(t2) { return h(" [number]", [t2], arguments.length), "string" == typeof t2 && v(this, et, "f").narg[t2] || this[St](this.requiresArg.bind(this), "narg", t2, NaN), this; } showCompletionScript(t2, e2) { return h("[string] [string]", [t2, e2], arguments.length), t2 = t2 || this.$0, v(this, Q, "f").log(v(this, U, "f").generateCompletionScript(t2, e2 || v(this, F, "f") || "completion")), this; } showHelp(t2) { if (h("[string|function]", [t2], arguments.length), O(this, J, true, "f"), !v(this, pt, "f").hasCachedHelpMessage()) { if (!this.parsed) { const e3 = this[Jt](v(this, ht, "f"), void 0, void 0, 0, true); if (f(e3)) return e3.then(() => { v(this, pt, "f").showHelp(t2); }), this; } const e2 = v(this, W, "f").runDefaultBuilderOn(this); if (f(e2)) return e2.then(() => { v(this, pt, "f").showHelp(t2); }), this; } return v(this, pt, "f").showHelp(t2), this; } scriptName(t2) { return this.customScriptName = true, this.$0 = t2, this; } showHelpOnFail(t2, e2) { return h("[boolean|string] [string]", [t2, e2], arguments.length), v(this, pt, "f").showHelpOnFail(t2, e2), this; } showVersion(t2) { return h("[string|function]", [t2], arguments.length), v(this, pt, "f").showVersion(t2), this; } skipValidation(t2) { return h("", [t2], arguments.length), this[Pt]("skipValidation", t2), this; } strict(t2) { return h("[boolean]", [t2], arguments.length), O(this, ft, false !== t2, "f"), this; } strictCommands(t2) { return h("[boolean]", [t2], arguments.length), O(this, dt, false !== t2, "f"), this; } strictOptions(t2) { return h("[boolean]", [t2], arguments.length), O(this, ut, false !== t2, "f"), this; } string(t2) { return h("", [t2], arguments.length), this[Pt]("string", t2), this[Qt](t2), this; } terminalWidth() { return h([], 0), v(this, ct, "f").process.stdColumns; } updateLocale(t2) { return this.updateStrings(t2); } updateStrings(t2) { return h("", [t2], arguments.length), O(this, G, false, "f"), v(this, ct, "f").y18n.updateLocale(t2), this; } usage(t2, s2, i2, n2) { if (h(" [string|boolean] [function|object] [function]", [t2, s2, i2, n2], arguments.length), void 0 !== s2) { if (d(t2, null, v(this, ct, "f")), (t2 || "").match(/^\$0( |$)/)) return this.command(t2, s2, i2, n2); throw new e(".usage() description must start with $0 if being used as alias for .command()"); } return v(this, pt, "f").usage(t2), this; } usageConfiguration(t2) { return h("", [t2], arguments.length), O(this, gt, t2, "f"), this; } version(t2, e2, s2) { const i2 = "version"; if (h("[boolean|string] [string] [string]", [t2, e2, s2], arguments.length), v(this, mt, "f") && (this[Ot](v(this, mt, "f")), v(this, pt, "f").version(void 0), O(this, mt, null, "f")), 0 === arguments.length) s2 = this[xt](), t2 = i2; else if (1 === arguments.length) { if (false === t2) return this; s2 = t2, t2 = i2; } else 2 === arguments.length && (s2 = e2, e2 = void 0); return O(this, mt, "string" == typeof t2 ? t2 : i2, "f"), e2 = e2 || v(this, pt, "f").deferY18nLookup("Show version number"), v(this, pt, "f").version(s2 || void 0), this.boolean(v(this, mt, "f")), this.describe(v(this, mt, "f"), e2), this; } wrap(t2) { return h("", [t2], arguments.length), v(this, pt, "f").wrap(t2), this; } [(W = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), q2 = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap(), bt)](t2) { if (!t2._ || !t2["--"]) return t2; t2._.push.apply(t2._, t2["--"]); try { delete t2["--"]; } catch (t3) { } return t2; } [vt]() { return { log: (...t2) => { this[Rt]() || console.log(...t2), O(this, J, true, "f"), v(this, tt, "f").length && O(this, tt, v(this, tt, "f") + "\n", "f"), O(this, tt, v(this, tt, "f") + t2.join(" "), "f"); }, error: (...t2) => { this[Rt]() || console.error(...t2), O(this, J, true, "f"), v(this, tt, "f").length && O(this, tt, v(this, tt, "f") + "\n", "f"), O(this, tt, v(this, tt, "f") + t2.join(" "), "f"); } }; } [Ot](t2) { p(v(this, et, "f")).forEach((e2) => { if ("configObjects" === e2) return; const s2 = v(this, et, "f")[e2]; Array.isArray(s2) ? s2.includes(t2) && s2.splice(s2.indexOf(t2), 1) : "object" == typeof s2 && delete s2[t2]; }), delete v(this, pt, "f").getDescriptions()[t2]; } [wt](t2, e2, s2) { v(this, R, "f")[s2] || (v(this, ct, "f").process.emitWarning(t2, e2), v(this, R, "f")[s2] = true); } [Ct]() { v(this, B, "f").push({ options: v(this, et, "f"), configObjects: v(this, et, "f").configObjects.slice(0), exitProcess: v(this, T, "f"), groups: v(this, Y, "f"), strict: v(this, ft, "f"), strictCommands: v(this, dt, "f"), strictOptions: v(this, ut, "f"), completionCommand: v(this, F, "f"), output: v(this, tt, "f"), exitError: v(this, V, "f"), hasOutput: v(this, J, "f"), parsed: this.parsed, parseFn: v(this, nt, "f"), parseContext: v(this, rt, "f") }), v(this, pt, "f").freeze(), v(this, yt, "f").freeze(), v(this, W, "f").freeze(), v(this, K, "f").freeze(); } [jt]() { let t2, e2 = ""; return t2 = /\b(node|iojs|electron)(\.exe)?$/.test(v(this, ct, "f").process.argv()[0]) ? v(this, ct, "f").process.argv().slice(1, 2) : v(this, ct, "f").process.argv().slice(0, 1), e2 = t2.map((t3) => { const e3 = this[Kt](v(this, z, "f"), t3); return t3.match(/^(\/|([a-zA-Z]:)?\\)/) && e3.length < t3.length ? e3 : t3; }).join(" ").trim(), v(this, ct, "f").getEnv("_") && v(this, ct, "f").getProcessArgvBin() === v(this, ct, "f").getEnv("_") && (e2 = v(this, ct, "f").getEnv("_").replace(`${v(this, ct, "f").path.dirname(v(this, ct, "f").process.execPath())}/`, "")), e2; } [_t]() { return v(this, it, "f"); } [Mt]() { return v(this, gt, "f"); } [kt]() { if (!v(this, G, "f")) return; const t2 = v(this, ct, "f").getEnv("LC_ALL") || v(this, ct, "f").getEnv("LC_MESSAGES") || v(this, ct, "f").getEnv("LANG") || v(this, ct, "f").getEnv("LANGUAGE") || "en_US"; this.locale(t2.replace(/[.:].*/, "")); } [xt]() { return this[At]().version || "unknown"; } [Et](t2) { const e2 = t2["--"] ? t2["--"] : t2._; for (let t3, s2 = 0; void 0 !== (t3 = e2[s2]); s2++) v(this, ct, "f").Parser.looksLikeNumber(t3) && Number.isSafeInteger(Math.floor(parseFloat(`${t3}`))) && (e2[s2] = Number(t3)); return t2; } [At](t2) { const e2 = t2 || "*"; if (v(this, ot, "f")[e2]) return v(this, ot, "f")[e2]; let s2 = {}; try { let e3 = t2 || v(this, ct, "f").mainFilename; !t2 && v(this, ct, "f").path.extname(e3) && (e3 = v(this, ct, "f").path.dirname(e3)); const i2 = v(this, ct, "f").findUp(e3, (t3, e4) => e4.includes("package.json") ? "package.json" : void 0); d(i2, void 0, v(this, ct, "f")), s2 = JSON.parse(v(this, ct, "f").readFileSync(i2, "utf8")); } catch (t3) { } return v(this, ot, "f")[e2] = s2 || {}, v(this, ot, "f")[e2]; } [Pt](t2, e2) { (e2 = [].concat(e2)).forEach((e3) => { e3 = this[Dt](e3), v(this, et, "f")[t2].push(e3); }); } [St](t2, e2, s2, i2) { this[It](t2, e2, s2, i2, (t3, e3, s3) => { v(this, et, "f")[t3][e3] = s3; }); } [$t](t2, e2, s2, i2) { this[It](t2, e2, s2, i2, (t3, e3, s3) => { v(this, et, "f")[t3][e3] = (v(this, et, "f")[t3][e3] || []).concat(s3); }); } [It](t2, e2, s2, i2, n2) { if (Array.isArray(s2)) s2.forEach((e3) => { t2(e3, i2); }); else if (((t3) => "object" == typeof t3)(s2)) for (const e3 of p(s2)) t2(e3, s2[e3]); else n2(e2, this[Dt](s2), i2); } [Dt](t2) { return "__proto__" === t2 ? "___proto___" : t2; } [Nt](t2, e2) { return this[St](this[Nt].bind(this), "key", t2, e2), this; } [Ht]() { var t2, e2, s2, i2, n2, r2, o2, a2, h2, l2, c2, f2; const u2 = v(this, B, "f").pop(); let p2; d(u2, void 0, v(this, ct, "f")), t2 = this, e2 = this, s2 = this, i2 = this, n2 = this, r2 = this, o2 = this, a2 = this, h2 = this, l2 = this, c2 = this, f2 = this, { options: { set value(e3) { O(t2, et, e3, "f"); } }.value, configObjects: p2, exitProcess: { set value(t3) { O(e2, T, t3, "f"); } }.value, groups: { set value(t3) { O(s2, Y, t3, "f"); } }.value, output: { set value(t3) { O(i2, tt, t3, "f"); } }.value, exitError: { set value(t3) { O(n2, V, t3, "f"); } }.value, hasOutput: { set value(t3) { O(r2, J, t3, "f"); } }.value, parsed: this.parsed, strict: { set value(t3) { O(o2, ft, t3, "f"); } }.value, strictCommands: { set value(t3) { O(a2, dt, t3, "f"); } }.value, strictOptions: { set value(t3) { O(h2, ut, t3, "f"); } }.value, completionCommand: { set value(t3) { O(l2, F, t3, "f"); } }.value, parseFn: { set value(t3) { O(c2, nt, t3, "f"); } }.value, parseContext: { set value(t3) { O(f2, rt, t3, "f"); } }.value } = u2, v(this, et, "f").configObjects = p2, v(this, pt, "f").unfreeze(), v(this, yt, "f").unfreeze(), v(this, W, "f").unfreeze(), v(this, K, "f").unfreeze(); } [Wt](t2, e2) { return j(e2, (e3) => (t2(e3), e3)); } getInternalMethods() { return { getCommandInstance: this[zt].bind(this), getContext: this[qt].bind(this), getHasOutput: this[Ut].bind(this), getLoggerInstance: this[Ft].bind(this), getParseContext: this[Lt].bind(this), getParserConfiguration: this[_t].bind(this), getUsageConfiguration: this[Mt].bind(this), getUsageInstance: this[Vt].bind(this), getValidationInstance: this[Gt].bind(this), hasParseCallback: this[Rt].bind(this), isGlobalContext: this[Tt].bind(this), postProcess: this[Bt].bind(this), reset: this[Yt].bind(this), runValidation: this[Zt].bind(this), runYargsParserAndExecuteCommands: this[Jt].bind(this), setHasOutput: this[Xt].bind(this) }; } [zt]() { return v(this, W, "f"); } [qt]() { return v(this, q2, "f"); } [Ut]() { return v(this, J, "f"); } [Ft]() { return v(this, Q, "f"); } [Lt]() { return v(this, rt, "f") || {}; } [Vt]() { return v(this, pt, "f"); } [Gt]() { return v(this, yt, "f"); } [Rt]() { return !!v(this, nt, "f"); } [Tt]() { return v(this, X, "f"); } [Bt](t2, e2, s2, i2) { if (s2) return t2; if (f(t2)) return t2; e2 || (t2 = this[bt](t2)); return (this[_t]()["parse-positional-numbers"] || void 0 === this[_t]()["parse-positional-numbers"]) && (t2 = this[Et](t2)), i2 && (t2 = C(t2, this, v(this, K, "f").getMiddleware(), false)), t2; } [Yt](t2 = {}) { O(this, et, v(this, et, "f") || {}, "f"); const e2 = {}; e2.local = v(this, et, "f").local || [], e2.configObjects = v(this, et, "f").configObjects || []; const s2 = {}; e2.local.forEach((e3) => { s2[e3] = true, (t2[e3] || []).forEach((t3) => { s2[t3] = true; }); }), Object.assign(v(this, at, "f"), Object.keys(v(this, Y, "f")).reduce((t3, e3) => { const i2 = v(this, Y, "f")[e3].filter((t4) => !(t4 in s2)); return i2.length > 0 && (t3[e3] = i2), t3; }, {})), O(this, Y, {}, "f"); return ["array", "boolean", "string", "skipValidation", "count", "normalize", "number", "hiddenOptions"].forEach((t3) => { e2[t3] = (v(this, et, "f")[t3] || []).filter((t4) => !s2[t4]); }), ["narg", "key", "alias", "default", "defaultDescription", "config", "choices", "demandedOptions", "demandedCommands", "deprecatedOptions"].forEach((t3) => { e2[t3] = g(v(this, et, "f")[t3], (t4) => !s2[t4]); }), e2.envPrefix = v(this, et, "f").envPrefix, O(this, et, e2, "f"), O(this, pt, v(this, pt, "f") ? v(this, pt, "f").reset(s2) : P(this, v(this, ct, "f")), "f"), O(this, yt, v(this, yt, "f") ? v(this, yt, "f").reset(s2) : function(t3, e3, s3) { const i2 = s3.y18n.__, n2 = s3.y18n.__n, r2 = { nonOptionCount: function(s4) { const i3 = t3.getDemandedCommands(), r3 = s4._.length + (s4["--"] ? s4["--"].length : 0) - t3.getInternalMethods().getContext().commands.length; i3._ && (r3 < i3._.min || r3 > i3._.max) && (r3 < i3._.min ? void 0 !== i3._.minMsg ? e3.fail(i3._.minMsg ? i3._.minMsg.replace(/\$0/g, r3.toString()).replace(/\$1/, i3._.min.toString()) : null) : e3.fail(n2("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", r3, r3.toString(), i3._.min.toString())) : r3 > i3._.max && (void 0 !== i3._.maxMsg ? e3.fail(i3._.maxMsg ? i3._.maxMsg.replace(/\$0/g, r3.toString()).replace(/\$1/, i3._.max.toString()) : null) : e3.fail(n2("Too many non-option arguments: got %s, maximum of %s", "Too many non-option arguments: got %s, maximum of %s", r3, r3.toString(), i3._.max.toString())))); }, positionalCount: function(t4, s4) { s4 < t4 && e3.fail(n2("Not enough non-option arguments: got %s, need at least %s", "Not enough non-option arguments: got %s, need at least %s", s4, s4 + "", t4 + "")); }, requiredArguments: function(t4, s4) { let i3 = null; for (const e4 of Object.keys(s4)) Object.prototype.hasOwnProperty.call(t4, e4) && void 0 !== t4[e4] || (i3 = i3 || {}, i3[e4] = s4[e4]); if (i3) { const t5 = []; for (const e4 of Object.keys(i3)) { const s6 = i3[e4]; s6 && t5.indexOf(s6) < 0 && t5.push(s6); } const s5 = t5.length ? ` ${t5.join("\n")}` : ""; e3.fail(n2("Missing required argument: %s", "Missing required arguments: %s", Object.keys(i3).length, Object.keys(i3).join(", ") + s5)); } }, unknownArguments: function(s4, i3, o3, a3, h2 = true) { var l3; const c3 = t3.getInternalMethods().getCommandInstance().getCommands(), f2 = [], d2 = t3.getInternalMethods().getContext(); if (Object.keys(s4).forEach((e4) => { H.includes(e4) || Object.prototype.hasOwnProperty.call(o3, e4) || Object.prototype.hasOwnProperty.call(t3.getInternalMethods().getParseContext(), e4) || r2.isValidAndSomeAliasIsNotNew(e4, i3) || f2.push(e4); }), h2 && (d2.commands.length > 0 || c3.length > 0 || a3) && s4._.slice(d2.commands.length).forEach((t4) => { c3.includes("" + t4) || f2.push("" + t4); }), h2) { const e4 = (null === (l3 = t3.getDemandedCommands()._) || void 0 === l3 ? void 0 : l3.max) || 0, i4 = d2.commands.length + e4; i4 < s4._.length && s4._.slice(i4).forEach((t4) => { t4 = String(t4), d2.commands.includes(t4) || f2.includes(t4) || f2.push(t4); }); } f2.length && e3.fail(n2("Unknown argument: %s", "Unknown arguments: %s", f2.length, f2.map((t4) => t4.trim() ? t4 : `"${t4}"`).join(", "))); }, unknownCommands: function(s4) { const i3 = t3.getInternalMethods().getCommandInstance().getCommands(), r3 = [], o3 = t3.getInternalMethods().getContext(); return (o3.commands.length > 0 || i3.length > 0) && s4._.slice(o3.commands.length).forEach((t4) => { i3.includes("" + t4) || r3.push("" + t4); }), r3.length > 0 && (e3.fail(n2("Unknown command: %s", "Unknown commands: %s", r3.length, r3.join(", "))), true); }, isValidAndSomeAliasIsNotNew: function(e4, s4) { if (!Object.prototype.hasOwnProperty.call(s4, e4)) return false; const i3 = t3.parsed.newAliases; return [e4, ...s4[e4]].some((t4) => !Object.prototype.hasOwnProperty.call(i3, t4) || !i3[e4]); }, limitedChoices: function(s4) { const n3 = t3.getOptions(), r3 = {}; if (!Object.keys(n3.choices).length) return; Object.keys(s4).forEach((t4) => { -1 === H.indexOf(t4) && Object.prototype.hasOwnProperty.call(n3.choices, t4) && [].concat(s4[t4]).forEach((e4) => { -1 === n3.choices[t4].indexOf(e4) && void 0 !== e4 && (r3[t4] = (r3[t4] || []).concat(e4)); }); }); const o3 = Object.keys(r3); if (!o3.length) return; let a3 = i2("Invalid values:"); o3.forEach((t4) => { a3 += ` ${i2("Argument: %s, Given: %s, Choices: %s", t4, e3.stringifiedValues(r3[t4]), e3.stringifiedValues(n3.choices[t4]))}`; }), e3.fail(a3); } }; let o2 = {}; function a2(t4, e4) { const s4 = Number(e4); return "number" == typeof (e4 = isNaN(s4) ? e4 : s4) ? e4 = t4._.length >= e4 : e4.match(/^--no-.+/) ? (e4 = e4.match(/^--no-(.+)/)[1], e4 = !Object.prototype.hasOwnProperty.call(t4, e4)) : e4 = Object.prototype.hasOwnProperty.call(t4, e4), e4; } r2.implies = function(e4, i3) { h(" [array|number|string]", [e4, i3], arguments.length), "object" == typeof e4 ? Object.keys(e4).forEach((t4) => { r2.implies(t4, e4[t4]); }) : (t3.global(e4), o2[e4] || (o2[e4] = []), Array.isArray(i3) ? i3.forEach((t4) => r2.implies(e4, t4)) : (d(i3, void 0, s3), o2[e4].push(i3))); }, r2.getImplied = function() { return o2; }, r2.implications = function(t4) { const s4 = []; if (Object.keys(o2).forEach((e4) => { const i3 = e4; (o2[e4] || []).forEach((e5) => { let n3 = i3; const r3 = e5; n3 = a2(t4, n3), e5 = a2(t4, e5), n3 && !e5 && s4.push(` ${i3} -> ${r3}`); }); }), s4.length) { let t5 = `${i2("Implications failed:")} `; s4.forEach((e4) => { t5 += e4; }), e3.fail(t5); } }; let l2 = {}; r2.conflicts = function(e4, s4) { h(" [array|string]", [e4, s4], arguments.length), "object" == typeof e4 ? Object.keys(e4).forEach((t4) => { r2.conflicts(t4, e4[t4]); }) : (t3.global(e4), l2[e4] || (l2[e4] = []), Array.isArray(s4) ? s4.forEach((t4) => r2.conflicts(e4, t4)) : l2[e4].push(s4)); }, r2.getConflicting = () => l2, r2.conflicting = function(n3) { Object.keys(n3).forEach((t4) => { l2[t4] && l2[t4].forEach((s4) => { s4 && void 0 !== n3[t4] && void 0 !== n3[s4] && e3.fail(i2("Arguments %s and %s are mutually exclusive", t4, s4)); }); }), t3.getInternalMethods().getParserConfiguration()["strip-dashed"] && Object.keys(l2).forEach((t4) => { l2[t4].forEach((r3) => { r3 && void 0 !== n3[s3.Parser.camelCase(t4)] && void 0 !== n3[s3.Parser.camelCase(r3)] && e3.fail(i2("Arguments %s and %s are mutually exclusive", t4, r3)); }); }); }, r2.recommendCommands = function(t4, s4) { s4 = s4.sort((t5, e4) => e4.length - t5.length); let n3 = null, r3 = 1 / 0; for (let e4, i3 = 0; void 0 !== (e4 = s4[i3]); i3++) { const s5 = N(t4, e4); s5 <= 3 && s5 < r3 && (r3 = s5, n3 = e4); } n3 && e3.fail(i2("Did you mean %s?", n3)); }, r2.reset = function(t4) { return o2 = g(o2, (e4) => !t4[e4]), l2 = g(l2, (e4) => !t4[e4]), r2; }; const c2 = []; return r2.freeze = function() { c2.push({ implied: o2, conflicting: l2 }); }, r2.unfreeze = function() { const t4 = c2.pop(); d(t4, void 0, s3), { implied: o2, conflicting: l2 } = t4; }, r2; }(this, v(this, pt, "f"), v(this, ct, "f")), "f"), O(this, W, v(this, W, "f") ? v(this, W, "f").reset() : function(t3, e3, s3, i2) { return new M(t3, e3, s3, i2); }(v(this, pt, "f"), v(this, yt, "f"), v(this, K, "f"), v(this, ct, "f")), "f"), v(this, U, "f") || O(this, U, function(t3, e3, s3, i2) { return new D(t3, e3, s3, i2); }(this, v(this, pt, "f"), v(this, W, "f"), v(this, ct, "f")), "f"), v(this, K, "f").reset(), O(this, F, null, "f"), O(this, tt, "", "f"), O(this, V, null, "f"), O(this, J, false, "f"), this.parsed = false, this; } [Kt](t2, e2) { return v(this, ct, "f").path.relative(t2, e2); } [Jt](t2, s2, i2, n2 = 0, r2 = false) { let o2 = !!i2 || r2; t2 = t2 || v(this, ht, "f"), v(this, et, "f").__ = v(this, ct, "f").y18n.__, v(this, et, "f").configuration = this[_t](); const a2 = !!v(this, et, "f").configuration["populate--"], h2 = Object.assign({}, v(this, et, "f").configuration, { "populate--": true }), l2 = v(this, ct, "f").Parser.detailed(t2, Object.assign({}, v(this, et, "f"), { configuration: { "parse-positional-numbers": false, ...h2 } })), c2 = Object.assign(l2.argv, v(this, rt, "f")); let d2; const u2 = l2.aliases; let p2 = false, g2 = false; Object.keys(c2).forEach((t3) => { t3 === v(this, Z, "f") && c2[t3] ? p2 = true : t3 === v(this, mt, "f") && c2[t3] && (g2 = true); }), c2.$0 = this.$0, this.parsed = l2, 0 === n2 && v(this, pt, "f").clearCachedHelpMessage(); try { if (this[kt](), s2) return this[Bt](c2, a2, !!i2, false); if (v(this, Z, "f")) { [v(this, Z, "f")].concat(u2[v(this, Z, "f")] || []).filter((t3) => t3.length > 1).includes("" + c2._[c2._.length - 1]) && (c2._.pop(), p2 = true); } O(this, X, false, "f"); const h3 = v(this, W, "f").getCommands(), m2 = v(this, U, "f").completionKey in c2, y2 = p2 || m2 || r2; if (c2._.length) { if (h3.length) { let t3; for (let e2, s3 = n2 || 0; void 0 !== c2._[s3]; s3++) { if (e2 = String(c2._[s3]), h3.includes(e2) && e2 !== v(this, F, "f")) { const t4 = v(this, W, "f").runCommand(e2, this, l2, s3 + 1, r2, p2 || g2 || r2); return this[Bt](t4, a2, !!i2, false); } if (!t3 && e2 !== v(this, F, "f")) { t3 = e2; break; } } !v(this, W, "f").hasDefaultCommand() && v(this, lt, "f") && t3 && !y2 && v(this, yt, "f").recommendCommands(t3, h3); } v(this, F, "f") && c2._.includes(v(this, F, "f")) && !m2 && (v(this, T, "f") && E(true), this.showCompletionScript(), this.exit(0)); } if (v(this, W, "f").hasDefaultCommand() && !y2) { const t3 = v(this, W, "f").runCommand(null, this, l2, 0, r2, p2 || g2 || r2); return this[Bt](t3, a2, !!i2, false); } if (m2) { v(this, T, "f") && E(true); const s3 = (t2 = [].concat(t2)).slice(t2.indexOf(`--${v(this, U, "f").completionKey}`) + 1); return v(this, U, "f").getCompletion(s3, (t3, s4) => { if (t3) throw new e(t3.message); (s4 || []).forEach((t4) => { v(this, Q, "f").log(t4); }), this.exit(0); }), this[Bt](c2, !a2, !!i2, false); } if (v(this, J, "f") || (p2 ? (v(this, T, "f") && E(true), o2 = true, this.showHelp("log"), this.exit(0)) : g2 && (v(this, T, "f") && E(true), o2 = true, v(this, pt, "f").showVersion("log"), this.exit(0))), !o2 && v(this, et, "f").skipValidation.length > 0 && (o2 = Object.keys(c2).some((t3) => v(this, et, "f").skipValidation.indexOf(t3) >= 0 && true === c2[t3])), !o2) { if (l2.error) throw new e(l2.error.message); if (!m2) { const t3 = this[Zt](u2, {}, l2.error); i2 || (d2 = C(c2, this, v(this, K, "f").getMiddleware(), true)), d2 = this[Wt](t3, null != d2 ? d2 : c2), f(d2) && !i2 && (d2 = d2.then(() => C(c2, this, v(this, K, "f").getMiddleware(), false))); } } } catch (t3) { if (!(t3 instanceof e)) throw t3; v(this, pt, "f").fail(t3.message, t3); } return this[Bt](null != d2 ? d2 : c2, a2, !!i2, true); } [Zt](t2, s2, i2, n2) { const r2 = { ...this.getDemandedOptions() }; return (o2) => { if (i2) throw new e(i2.message); v(this, yt, "f").nonOptionCount(o2), v(this, yt, "f").requiredArguments(o2, r2); let a2 = false; v(this, dt, "f") && (a2 = v(this, yt, "f").unknownCommands(o2)), v(this, ft, "f") && !a2 ? v(this, yt, "f").unknownArguments(o2, t2, s2, !!n2) : v(this, ut, "f") && v(this, yt, "f").unknownArguments(o2, t2, {}, false, false), v(this, yt, "f").limitedChoices(o2), v(this, yt, "f").implications(o2), v(this, yt, "f").conflicting(o2); }; } [Xt]() { O(this, J, true, "f"); } [Qt](t2) { if ("string" == typeof t2) v(this, et, "f").key[t2] = true; else for (const e2 of t2) v(this, et, "f").key[e2] = true; } }; var ee; var se; var { readFileSync: ie } = require("fs"); var { inspect: ne } = require("util"); var { resolve: re } = require("path"); var oe = require_build(); var ae = require_build2(); var he; var le = { assert: { notStrictEqual: t.notStrictEqual, strictEqual: t.strictEqual }, cliui: require_build3(), findUp: require_sync(), getEnv: (t2) => process.env[t2], getCallerFile: require_get_caller_file(), getProcessArgvBin: y, inspect: ne, mainFilename: null !== (se = null === (ee = null === require || void 0 === require ? void 0 : require.main) || void 0 === ee ? void 0 : ee.filename) && void 0 !== se ? se : process.cwd(), Parser: ae, path: require("path"), process: { argv: () => process.argv, cwd: process.cwd, emitWarning: (t2, e2) => process.emitWarning(t2, e2), execPath: () => process.execPath, exit: (t2) => { process.exit(t2); }, nextTick: process.nextTick, stdColumns: void 0 !== process.stdout.columns ? process.stdout.columns : null }, readFileSync: ie, require, requireDirectory: require_require_directory(), stringWidth: require_string_width(), y18n: oe({ directory: re(__dirname, "../locales"), updateFiles: false }) }; var ce = (null === (he = null === process || void 0 === process ? void 0 : process.env) || void 0 === he ? void 0 : he.YARGS_MIN_NODE_VERSION) ? Number(process.env.YARGS_MIN_NODE_VERSION) : 12; if (process && process.version) { if (Number(process.version.match(/v([^.]+)/)[1]) < ce) throw Error(`yargs supports a minimum Node.js version of ${ce}. Read our version support policy: https://github.com/yargs/yargs#supported-nodejs-versions`); } var fe = require_build2(); var de; var ue = { applyExtends: n, cjsPlatformShim: le, Yargs: (de = le, (t2 = [], e2 = de.process.cwd(), s2) => { const i2 = new te(t2, e2, s2, de); return Object.defineProperty(i2, "argv", { get: () => i2.parse(), enumerable: true }), i2.help(), i2.version(), i2; }), argsert: h, isPromise: f, objFilter: g, parseCommand: o, Parser: fe, processArgv: b, YError: e }; module2.exports = ue; } }); // node_modules/yargs/yargs var require_yargs = __commonJS({ "node_modules/yargs/yargs"(exports2, module2) { var { applyExtends, cjsPlatformShim, Parser, Yargs, processArgv } = require_build4(); Yargs.applyExtends = (config, cwd, mergeExtends) => { return applyExtends(config, cwd, mergeExtends, cjsPlatformShim); }; Yargs.hideBin = processArgv.hideBin; Yargs.Parser = Parser; module2.exports = Yargs; } }); // node_modules/yargs/index.cjs var require_yargs2 = __commonJS({ "node_modules/yargs/index.cjs"(exports2, module2) { "use strict"; var { Yargs, processArgv } = require_build4(); Argv(processArgv.hideBin(process.argv)); module2.exports = Argv; function Argv(processArgs, cwd) { const argv = Yargs(processArgs, cwd, require); singletonify(argv); return argv; } function defineGetter(obj, key, getter) { Object.defineProperty(obj, key, { configurable: true, enumerable: true, get: getter }); } function lookupGetter(obj, key) { const desc = Object.getOwnPropertyDescriptor(obj, key); if (typeof desc !== "undefined") { return desc.get; } } function singletonify(inst) { [ ...Object.keys(inst), ...Object.getOwnPropertyNames(inst.constructor.prototype) ].forEach((key) => { if (key === "argv") { defineGetter(Argv, key, lookupGetter(inst, key)); } else if (typeof inst[key] === "function") { Argv[key] = inst[key].bind(inst); } else { defineGetter(Argv, "$0", () => inst.$0); defineGetter(Argv, "parsed", () => inst.parsed); } }); } } }); // node_modules/cosmiconfig/dist/cacheWrapper.js var require_cacheWrapper = __commonJS({ "node_modules/cosmiconfig/dist/cacheWrapper.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.cacheWrapper = cacheWrapper; exports2.cacheWrapperSync = cacheWrapperSync; async function cacheWrapper(cache, key, fn) { const cached = cache.get(key); if (cached !== void 0) { return cached; } const result = await fn(); cache.set(key, result); return result; } function cacheWrapperSync(cache, key, fn) { const cached = cache.get(key); if (cached !== void 0) { return cached; } const result = fn(); cache.set(key, result); return result; } } }); // node_modules/resolve-from/index.js var require_resolve_from = __commonJS({ "node_modules/resolve-from/index.js"(exports2, module2) { "use strict"; var path = require("path"); var Module = require("module"); var fs = require("fs"); var resolveFrom = (fromDir, moduleId, silent) => { if (typeof fromDir !== "string") { throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``); } if (typeof moduleId !== "string") { throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``); } try { fromDir = fs.realpathSync(fromDir); } catch (err) { if (err.code === "ENOENT") { fromDir = path.resolve(fromDir); } else if (silent) { return null; } else { throw err; } } const fromFile = path.join(fromDir, "noop.js"); const resolveFileName = () => Module._resolveFilename(moduleId, { id: fromFile, filename: fromFile, paths: Module._nodeModulePaths(fromDir) }); if (silent) { try { return resolveFileName(); } catch (err) { return null; } } return resolveFileName(); }; module2.exports = (fromDir, moduleId) => resolveFrom(fromDir, moduleId); module2.exports.silent = (fromDir, moduleId) => resolveFrom(fromDir, moduleId, true); } }); // node_modules/callsites/index.js var require_callsites = __commonJS({ "node_modules/callsites/index.js"(exports2, module2) { "use strict"; var callsites = () => { const _prepareStackTrace = Error.prepareStackTrace; Error.prepareStackTrace = (_, stack2) => stack2; const stack = new Error().stack.slice(1); Error.prepareStackTrace = _prepareStackTrace; return stack; }; module2.exports = callsites; module2.exports.default = callsites; } }); // node_modules/parent-module/index.js var require_parent_module = __commonJS({ "node_modules/parent-module/index.js"(exports2, module2) { "use strict"; var callsites = require_callsites(); module2.exports = (filepath) => { const stacks = callsites(); if (!filepath) { return stacks[2].getFileName(); } let seenVal = false; stacks.shift(); for (const stack of stacks) { const parentFilepath = stack.getFileName(); if (typeof parentFilepath !== "string") { continue; } if (parentFilepath === filepath) { seenVal = true; continue; } if (parentFilepath === "module.js") { continue; } if (seenVal && parentFilepath !== filepath) { return parentFilepath; } } }; } }); // node_modules/import-fresh/index.js var require_import_fresh = __commonJS({ "node_modules/import-fresh/index.js"(exports2, module2) { "use strict"; var path = require("path"); var resolveFrom = require_resolve_from(); var parentModule = require_parent_module(); module2.exports = (moduleId) => { if (typeof moduleId !== "string") { throw new TypeError("Expected a string"); } const parentPath = parentModule(__filename); const cwd = parentPath ? path.dirname(parentPath) : __dirname; const filePath = resolveFrom(cwd, moduleId); const oldModule = require.cache[filePath]; if (oldModule && oldModule.parent) { let i = oldModule.parent.children.length; while (i--) { if (oldModule.parent.children[i].id === filePath) { oldModule.parent.children.splice(i, 1); } } } delete require.cache[filePath]; const parent = require.cache[parentPath]; return parent === void 0 ? require(filePath) : parent.require(filePath); }; } }); // node_modules/is-arrayish/index.js var require_is_arrayish2 = __commonJS({ "node_modules/is-arrayish/index.js"(exports2, module2) { "use strict"; module2.exports = function isArrayish(obj) { if (!obj) { return false; } return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function; }; } }); // node_modules/error-ex/index.js var require_error_ex = __commonJS({ "node_modules/error-ex/index.js"(exports2, module2) { "use strict"; var util = require("util"); var isArrayish = require_is_arrayish2(); var errorEx = function errorEx2(name, properties) { if (!name || name.constructor !== String) { properties = name || {}; name = Error.name; } var errorExError = function ErrorEXError(message) { if (!this) { return new ErrorEXError(message); } message = message instanceof Error ? message.message : message || this.message; Error.call(this, message); Error.captureStackTrace(this, errorExError); this.name = name; Object.defineProperty(this, "message", { configurable: true, enumerable: false, get: function() { var newMessage = message.split(/\r?\n/g); for (var key in properties) { if (!properties.hasOwnProperty(key)) { continue; } var modifier = properties[key]; if ("message" in modifier) { newMessage = modifier.message(this[key], newMessage) || newMessage; if (!isArrayish(newMessage)) { newMessage = [newMessage]; } } } return newMessage.join("\n"); }, set: function(v) { message = v; } }); var overwrittenStack = null; var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack"); var stackGetter = stackDescriptor.get; var stackValue = stackDescriptor.value; delete stackDescriptor.value; delete stackDescriptor.writable; stackDescriptor.set = function(newstack) { overwrittenStack = newstack; }; stackDescriptor.get = function() { var stack = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g); if (!overwrittenStack) { stack[0] = this.name + ": " + this.message; } var lineCount = 1; for (var key in properties) { if (!properties.hasOwnProperty(key)) { continue; } var modifier = properties[key]; if ("line" in modifier) { var line = modifier.line(this[key]); if (line) { stack.splice(lineCount++, 0, " " + line); } } if ("stack" in modifier) { modifier.stack(this[key], stack); } } return stack.join("\n"); }; Object.defineProperty(this, "stack", stackDescriptor); }; if (Object.setPrototypeOf) { Object.setPrototypeOf(errorExError.prototype, Error.prototype); Object.setPrototypeOf(errorExError, Error); } else { util.inherits(errorExError, Error); } return errorExError; }; errorEx.append = function(str2, def) { return { message: function(v, message) { v = v || def; if (v) { message[0] += " " + str2.replace("%s", v.toString()); } return message; } }; }; errorEx.line = function(str2, def) { return { line: function(v) { v = v || def; if (v) { return str2.replace("%s", v.toString()); } return null; } }; }; module2.exports = errorEx; } }); // node_modules/json-parse-even-better-errors/index.js var require_json_parse_even_better_errors = __commonJS({ "node_modules/json-parse-even-better-errors/index.js"(exports2, module2) { "use strict"; var hexify = (char) => { const h = char.charCodeAt(0).toString(16).toUpperCase(); return "0x" + (h.length % 2 ? "0" : "") + h; }; var parseError = (e, txt, context) => { if (!txt) { return { message: e.message + " while parsing empty string", position: 0 }; } const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i); const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null; const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message; if (errIdx !== null && errIdx !== void 0) { const start = errIdx <= context ? 0 : errIdx - context; const end = errIdx + context >= txt.length ? txt.length : errIdx + context; const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "..."); const near = txt === slice ? "" : "near "; return { message: msg + ` while parsing ${near}${JSON.stringify(slice)}`, position: errIdx }; } else { return { message: msg + ` while parsing '${txt.slice(0, context * 2)}'`, position: 0 }; } }; var JSONParseError = class extends SyntaxError { constructor(er, txt, context, caller) { context = context || 20; const metadata = parseError(er, txt, context); super(metadata.message); Object.assign(this, metadata); this.code = "EJSONPARSE"; this.systemError = er; Error.captureStackTrace(this, caller || this.constructor); } get name() { return this.constructor.name; } set name(n) { } get [Symbol.toStringTag]() { return this.constructor.name; } }; var kIndent = Symbol.for("indent"); var kNewline = Symbol.for("newline"); var formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/; var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/; var parseJson = (txt, reviver, context) => { const parseText = stripBOM(txt); context = context || 20; try { const [, newline = "\n", indent = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [, "", ""]; const result = JSON.parse(parseText, reviver); if (result && typeof result === "object") { result[kNewline] = newline; result[kIndent] = indent; } return result; } catch (e) { if (typeof txt !== "string" && !Buffer.isBuffer(txt)) { const isEmptyArray = Array.isArray(txt) && txt.length === 0; throw Object.assign(new TypeError( `Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}` ), { code: "EJSONPARSE", systemError: e }); } throw new JSONParseError(e, parseText, context, parseJson); } }; var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, ""); module2.exports = parseJson; parseJson.JSONParseError = JSONParseError; parseJson.noExceptions = (txt, reviver) => { try { return JSON.parse(stripBOM(txt), reviver); } catch (e) { } }; } }); // node_modules/lines-and-columns/build/index.js var require_build5 = __commonJS({ "node_modules/lines-and-columns/build/index.js"(exports2) { "use strict"; exports2.__esModule = true; exports2.LinesAndColumns = void 0; var LF = "\n"; var CR = "\r"; var LinesAndColumns = ( /** @class */ function() { function LinesAndColumns2(string) { this.string = string; var offsets = [0]; for (var offset = 0; offset < string.length; ) { switch (string[offset]) { case LF: offset += LF.length; offsets.push(offset); break; case CR: offset += CR.length; if (string[offset] === LF) { offset += LF.length; } offsets.push(offset); break; default: offset++; break; } } this.offsets = offsets; } LinesAndColumns2.prototype.locationForIndex = function(index) { if (index < 0 || index > this.string.length) { return null; } var line = 0; var offsets = this.offsets; while (offsets[line + 1] <= index) { line++; } var column = index - offsets[line]; return { line, column }; }; LinesAndColumns2.prototype.indexForLocation = function(location) { var line = location.line, column = location.column; if (line < 0 || line >= this.offsets.length) { return null; } if (column < 0 || column > this.lengthOfLine(line)) { return null; } return this.offsets[line] + column; }; LinesAndColumns2.prototype.lengthOfLine = function(line) { var offset = this.offsets[line]; var nextOffset = line === this.offsets.length - 1 ? this.string.length : this.offsets[line + 1]; return nextOffset - offset; }; return LinesAndColumns2; }() ); exports2.LinesAndColumns = LinesAndColumns; exports2["default"] = LinesAndColumns; } }); // node_modules/js-tokens/index.js var require_js_tokens = __commonJS({ "node_modules/js-tokens/index.js"(exports2) { Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; exports2.matchToToken = function(match) { var token = { type: "invalid", value: match[0], closed: void 0 }; if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]); else if (match[5]) token.type = "comment"; else if (match[6]) token.type = "comment", token.closed = !!match[7]; else if (match[8]) token.type = "regex"; else if (match[9]) token.type = "number"; else if (match[10]) token.type = "name"; else if (match[11]) token.type = "punctuator"; else if (match[12]) token.type = "whitespace"; return token; }; } }); // node_modules/@babel/helper-validator-identifier/lib/identifier.js var require_identifier = __commonJS({ "node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isIdentifierChar = isIdentifierChar; exports2.isIdentifierName = isIdentifierName; exports2.isIdentifierStart = isIdentifierStart; var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC"; var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F"; var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); nonASCIIidentifierStartChars = nonASCIIidentifierChars = null; var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938, 6, 4191]; var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; function isInAstralSet(code, set) { let pos = 65536; for (let i = 0, length = set.length; i < length; i += 2) { pos += set[i]; if (pos > code) return false; pos += set[i + 1]; if (pos >= code) return true; } return false; } function isIdentifierStart(code) { if (code < 65) return code === 36; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes); } function isIdentifierChar(code) { if (code < 48) return code === 36; if (code < 58) return true; if (code < 65) return false; if (code <= 90) return true; if (code < 97) return code === 95; if (code <= 122) return true; if (code <= 65535) { return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code)); } return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes); } function isIdentifierName(name) { let isFirst = true; for (let i = 0; i < name.length; i++) { let cp = name.charCodeAt(i); if ((cp & 64512) === 55296 && i + 1 < name.length) { const trail = name.charCodeAt(++i); if ((trail & 64512) === 56320) { cp = 65536 + ((cp & 1023) << 10) + (trail & 1023); } } if (isFirst) { isFirst = false; if (!isIdentifierStart(cp)) { return false; } } else if (!isIdentifierChar(cp)) { return false; } } return !isFirst; } } }); // node_modules/@babel/helper-validator-identifier/lib/keyword.js var require_keyword = __commonJS({ "node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isKeyword = isKeyword; exports2.isReservedWord = isReservedWord; exports2.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord; exports2.isStrictBindReservedWord = isStrictBindReservedWord; exports2.isStrictReservedWord = isStrictReservedWord; var reservedWords = { keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"], strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"], strictBind: ["eval", "arguments"] }; var keywords2 = new Set(reservedWords.keyword); var reservedWordsStrictSet = new Set(reservedWords.strict); var reservedWordsStrictBindSet = new Set(reservedWords.strictBind); function isReservedWord(word, inModule) { return inModule && word === "await" || word === "enum"; } function isStrictReservedWord(word, inModule) { return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word); } function isStrictBindOnlyReservedWord(word) { return reservedWordsStrictBindSet.has(word); } function isStrictBindReservedWord(word, inModule) { return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word); } function isKeyword(word) { return keywords2.has(word); } } }); // node_modules/@babel/helper-validator-identifier/lib/index.js var require_lib6 = __commonJS({ "node_modules/@babel/helper-validator-identifier/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); Object.defineProperty(exports2, "isIdentifierChar", { enumerable: true, get: function() { return _identifier.isIdentifierChar; } }); Object.defineProperty(exports2, "isIdentifierName", { enumerable: true, get: function() { return _identifier.isIdentifierName; } }); Object.defineProperty(exports2, "isIdentifierStart", { enumerable: true, get: function() { return _identifier.isIdentifierStart; } }); Object.defineProperty(exports2, "isKeyword", { enumerable: true, get: function() { return _keyword.isKeyword; } }); Object.defineProperty(exports2, "isReservedWord", { enumerable: true, get: function() { return _keyword.isReservedWord; } }); Object.defineProperty(exports2, "isStrictBindOnlyReservedWord", { enumerable: true, get: function() { return _keyword.isStrictBindOnlyReservedWord; } }); Object.defineProperty(exports2, "isStrictBindReservedWord", { enumerable: true, get: function() { return _keyword.isStrictBindReservedWord; } }); Object.defineProperty(exports2, "isStrictReservedWord", { enumerable: true, get: function() { return _keyword.isStrictReservedWord; } }); var _identifier = require_identifier(); var _keyword = require_keyword(); } }); // node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js var require_escape_string_regexp = __commonJS({ "node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js"(exports2, module2) { "use strict"; var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; module2.exports = function(str2) { if (typeof str2 !== "string") { throw new TypeError("Expected a string"); } return str2.replace(matchOperatorsRe, "\\$&"); }; } }); // node_modules/@babel/highlight/node_modules/color-name/index.js var require_color_name2 = __commonJS({ "node_modules/@babel/highlight/node_modules/color-name/index.js"(exports2, module2) { "use strict"; module2.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; } }); // node_modules/@babel/highlight/node_modules/color-convert/conversions.js var require_conversions2 = __commonJS({ "node_modules/@babel/highlight/node_modules/color-convert/conversions.js"(exports2, module2) { var cssKeywords = require_color_name2(); var reverseKeywords = {}; for (key in cssKeywords) { if (cssKeywords.hasOwnProperty(key)) { reverseKeywords[cssKeywords[key]] = key; } } var key; var convert = module2.exports = { rgb: { channels: 3, labels: "rgb" }, hsl: { channels: 3, labels: "hsl" }, hsv: { channels: 3, labels: "hsv" }, hwb: { channels: 3, labels: "hwb" }, cmyk: { channels: 4, labels: "cmyk" }, xyz: { channels: 3, labels: "xyz" }, lab: { channels: 3, labels: "lab" }, lch: { channels: 3, labels: "lch" }, hex: { channels: 1, labels: ["hex"] }, keyword: { channels: 1, labels: ["keyword"] }, ansi16: { channels: 1, labels: ["ansi16"] }, ansi256: { channels: 1, labels: ["ansi256"] }, hcg: { channels: 3, labels: ["h", "c", "g"] }, apple: { channels: 3, labels: ["r16", "g16", "b16"] }, gray: { channels: 1, labels: ["gray"] } }; for (model in convert) { if (convert.hasOwnProperty(model)) { if (!("channels" in convert[model])) { throw new Error("missing channels property: " + model); } if (!("labels" in convert[model])) { throw new Error("missing channel labels property: " + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error("channel and label counts mismatch: " + model); } channels = convert[model].channels; labels = convert[model].labels; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], "channels", { value: channels }); Object.defineProperty(convert[model], "labels", { value: labels }); } } var channels; var labels; var model; convert.rgb.hsl = function(rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var min = Math.min(r, g, b); var max = Math.max(r, g, b); var delta = max - min; var h; var s; var l; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function(rgb) { var rdif; var gdif; var bdif; var h; var s; var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var v = Math.max(r, g, b); var diff = v - Math.min(r, g, b); var diffc = function(c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = 1 / 3 + rdif - bdif; } else if (b === v) { h = 2 / 3 + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function(rgb) { var r = rgb[0]; var g = rgb[1]; var b = rgb[2]; var h = convert.rgb.hsl(rgb)[0]; var w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function(rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var c; var m; var y; var k; k = Math.min(1 - r, 1 - g, 1 - b); c = (1 - r - k) / (1 - k) || 0; m = (1 - g - k) / (1 - k) || 0; y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; function comparativeDistance(x, y) { return Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2); } convert.rgb.keyword = function(rgb) { var reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } var currentClosestDistance = Infinity; var currentClosestKeyword; for (var keyword in cssKeywords) { if (cssKeywords.hasOwnProperty(keyword)) { var value = cssKeywords[keyword]; var distance = comparativeDistance(rgb, value); if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } } return currentClosestKeyword; }; convert.keyword.rgb = function(keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function(rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92; g = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92; b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; var x = r * 0.4124 + g * 0.3576 + b * 0.1805; var y = r * 0.2126 + g * 0.7152 + b * 0.0722; var z = r * 0.0193 + g * 0.1192 + b * 0.9505; return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function(rgb) { var xyz = convert.rgb.xyz(rgb); var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; l = 116 * y - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function(hsl) { var h = hsl[0] / 360; var s = hsl[1] / 100; var l = hsl[2] / 100; var t1; var t2; var t3; var rgb; var val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } t1 = 2 * l - t2; rgb = [0, 0, 0]; for (var i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function(hsl) { var h = hsl[0]; var s = hsl[1] / 100; var l = hsl[2] / 100; var smin = s; var lmin = Math.max(l, 0.01); var sv; var v; l *= 2; s *= l <= 1 ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; v = (l + s) / 2; sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function(hsv) { var h = hsv[0] / 60; var s = hsv[1] / 100; var v = hsv[2] / 100; var hi = Math.floor(h) % 6; var f = h - Math.floor(h); var p = 255 * v * (1 - s); var q2 = 255 * v * (1 - s * f); var t = 255 * v * (1 - s * (1 - f)); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q2, v, p]; case 2: return [p, v, t]; case 3: return [p, q2, v]; case 4: return [t, p, v]; case 5: return [v, p, q2]; } }; convert.hsv.hsl = function(hsv) { var h = hsv[0]; var s = hsv[1] / 100; var v = hsv[2] / 100; var vmin = Math.max(v, 0.01); var lmin; var sl; var l; l = (2 - s) * v; lmin = (2 - s) * vmin; sl = s * vmin; sl /= lmin <= 1 ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; convert.hwb.rgb = function(hwb) { var h = hwb[0] / 360; var wh = hwb[1] / 100; var bl = hwb[2] / 100; var ratio = wh + bl; var i; var v; var f; var n; if (ratio > 1) { wh /= ratio; bl /= ratio; } i = Math.floor(6 * h); v = 1 - bl; f = 6 * h - i; if ((i & 1) !== 0) { f = 1 - f; } n = wh + f * (v - wh); var r; var g; var b; switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function(cmyk) { var c = cmyk[0] / 100; var m = cmyk[1] / 100; var y = cmyk[2] / 100; var k = cmyk[3] / 100; var r; var g; var b; r = 1 - Math.min(1, c * (1 - k) + k); g = 1 - Math.min(1, m * (1 - k) + k); b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function(xyz) { var x = xyz[0] / 100; var y = xyz[1] / 100; var z = xyz[2] / 100; var r; var g; var b; r = x * 3.2406 + y * -1.5372 + z * -0.4986; g = x * -0.9689 + y * 1.8758 + z * 0.0415; b = x * 0.0557 + y * -0.204 + z * 1.057; r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92; g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92; b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function(xyz) { var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116; y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116; z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116; l = 116 * y - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function(lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var x; var y; var z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; var y2 = Math.pow(y, 3); var x2 = Math.pow(x, 3); var z2 = Math.pow(z, 3); y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function(lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var hr; var h; var c; hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function(lch) { var l = lch[0]; var c = lch[1]; var h = lch[2]; var a; var b; var hr; hr = h / 360 * 2 * Math.PI; a = c * Math.cos(hr); b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function(args) { var r = args[0]; var g = args[1]; var b = args[2]; var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; value = Math.round(value / 50); if (value === 0) { return 30; } var ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function(args) { return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function(args) { var r = args[0]; var g = args[1]; var b = args[2]; if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round((r - 8) / 247 * 24) + 232; } var ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function(args) { var color = args % 10; if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } var mult = (~~(args > 50) + 1) * 0.5; var r = (color & 1) * mult * 255; var g = (color >> 1 & 1) * mult * 255; var b = (color >> 2 & 1) * mult * 255; return [r, g, b]; }; convert.ansi256.rgb = function(args) { if (args >= 232) { var c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; var rem; var r = Math.floor(args / 36) / 5 * 255; var g = Math.floor((rem = args % 36) / 6) / 5 * 255; var b = rem % 6 / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function(args) { var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); var string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.hex.rgb = function(args) { var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } var colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split("").map(function(char) { return char + char; }).join(""); } var integer = parseInt(colorString, 16); var r = integer >> 16 & 255; var g = integer >> 8 & 255; var b = integer & 255; return [r, g, b]; }; convert.rgb.hcg = function(rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var max = Math.max(Math.max(r, g), b); var min = Math.min(Math.min(r, g), b); var chroma = max - min; var grayscale; var hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = (g - b) / chroma % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma + 4; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function(hsl) { var s = hsl[1] / 100; var l = hsl[2] / 100; var c = 1; var f = 0; if (l < 0.5) { c = 2 * s * l; } else { c = 2 * s * (1 - l); } if (c < 1) { f = (l - 0.5 * c) / (1 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function(hsv) { var s = hsv[1] / 100; var v = hsv[2] / 100; var c = s * v; var f = 0; if (c < 1) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function(hcg) { var h = hcg[0] / 360; var c = hcg[1] / 100; var g = hcg[2] / 100; if (c === 0) { return [g * 255, g * 255, g * 255]; } var pure = [0, 0, 0]; var hi = h % 1 * 6; var v = hi % 1; var w = 1 - v; var mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } mg = (1 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function(hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1 - c); var f = 0; if (v > 0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function(hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var l = g * (1 - c) + 0.5 * c; var s = 0; if (l > 0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function(hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function(hwb) { var w = hwb[1] / 100; var b = hwb[2] / 100; var v = 1 - b; var c = v - w; var g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function(apple) { return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; }; convert.rgb.apple = function(rgb) { return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; }; convert.gray.rgb = function(args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = convert.gray.hsv = function(args) { return [0, 0, args[0]]; }; convert.gray.hwb = function(gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function(gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function(gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function(gray) { var val = Math.round(gray[0] / 100 * 255) & 255; var integer = (val << 16) + (val << 8) + val; var string = integer.toString(16).toUpperCase(); return "000000".substring(string.length) + string; }; convert.rgb.gray = function(rgb) { var val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; } }); // node_modules/@babel/highlight/node_modules/color-convert/route.js var require_route2 = __commonJS({ "node_modules/@babel/highlight/node_modules/color-convert/route.js"(exports2, module2) { var conversions = require_conversions2(); function buildGraph() { var graph = {}; var models = Object.keys(conversions); for (var len = models.length, i = 0; i < len; i++) { graph[models[i]] = { // http://jsperf.com/1-vs-infinity // micro-opt, but this is simple. distance: -1, parent: null }; } return graph; } function deriveBFS(fromModel) { var graph = buildGraph(); var queue = [fromModel]; graph[fromModel].distance = 0; while (queue.length) { var current = queue.pop(); var adjacents = Object.keys(conversions[current]); for (var len = adjacents.length, i = 0; i < len; i++) { var adjacent = adjacents[i]; var node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function(args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { var path = [graph[toModel].parent, toModel]; var fn = conversions[graph[toModel].parent][toModel]; var cur = graph[toModel].parent; while (graph[cur].parent) { path.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path; return fn; } module2.exports = function(fromModel) { var graph = deriveBFS(fromModel); var conversion = {}; var models = Object.keys(graph); for (var len = models.length, i = 0; i < len; i++) { var toModel = models[i]; var node = graph[toModel]; if (node.parent === null) { continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; } }); // node_modules/@babel/highlight/node_modules/color-convert/index.js var require_color_convert2 = __commonJS({ "node_modules/@babel/highlight/node_modules/color-convert/index.js"(exports2, module2) { var conversions = require_conversions2(); var route = require_route2(); var convert = {}; var models = Object.keys(conversions); function wrapRaw(fn) { var wrappedFn = function(args) { if (args === void 0 || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } return fn(args); }; if ("conversion" in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { var wrappedFn = function(args) { if (args === void 0 || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } var result = fn(args); if (typeof result === "object") { for (var len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; if ("conversion" in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach(function(fromModel) { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels }); Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels }); var routes = route(fromModel); var routeModels = Object.keys(routes); routeModels.forEach(function(toModel) { var fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module2.exports = convert; } }); // node_modules/@babel/highlight/node_modules/ansi-styles/index.js var require_ansi_styles2 = __commonJS({ "node_modules/@babel/highlight/node_modules/ansi-styles/index.js"(exports2, module2) { "use strict"; var colorConvert = require_color_convert2(); var wrapAnsi16 = (fn, offset) => function() { const code = fn.apply(colorConvert, arguments); return `\x1B[${code + offset}m`; }; var wrapAnsi256 = (fn, offset) => function() { const code = fn.apply(colorConvert, arguments); return `\x1B[${38 + offset};5;${code}m`; }; var wrapAnsi16m = (fn, offset) => function() { const rgb = fn.apply(colorConvert, arguments); return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; }; function assembleStyles() { const codes = /* @__PURE__ */ new Map(); const styles = { modifier: { reset: [0, 0], // 21 isn't widely supported and 22 does the same thing bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], gray: [90, 39], // Bright color redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], // Bright color bgBlackBright: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } }; styles.color.grey = styles.color.gray; for (const groupName of Object.keys(styles)) { const group = styles[groupName]; for (const styleName of Object.keys(group)) { const style2 = group[styleName]; styles[styleName] = { open: `\x1B[${style2[0]}m`, close: `\x1B[${style2[1]}m` }; group[styleName] = styles[styleName]; codes.set(style2[0], style2[1]); } Object.defineProperty(styles, groupName, { value: group, enumerable: false }); Object.defineProperty(styles, "codes", { value: codes, enumerable: false }); } const ansi2ansi = (n) => n; const rgb2rgb = (r, g, b) => [r, g, b]; styles.color.close = "\x1B[39m"; styles.bgColor.close = "\x1B[49m"; styles.color.ansi = { ansi: wrapAnsi16(ansi2ansi, 0) }; styles.color.ansi256 = { ansi256: wrapAnsi256(ansi2ansi, 0) }; styles.color.ansi16m = { rgb: wrapAnsi16m(rgb2rgb, 0) }; styles.bgColor.ansi = { ansi: wrapAnsi16(ansi2ansi, 10) }; styles.bgColor.ansi256 = { ansi256: wrapAnsi256(ansi2ansi, 10) }; styles.bgColor.ansi16m = { rgb: wrapAnsi16m(rgb2rgb, 10) }; for (let key of Object.keys(colorConvert)) { if (typeof colorConvert[key] !== "object") { continue; } const suite = colorConvert[key]; if (key === "ansi16") { key = "ansi"; } if ("ansi16" in suite) { styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); } if ("ansi256" in suite) { styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); } if ("rgb" in suite) { styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); } } return styles; } Object.defineProperty(module2, "exports", { enumerable: true, get: assembleStyles }); } }); // node_modules/@babel/highlight/node_modules/supports-color/browser.js var require_browser3 = __commonJS({ "node_modules/@babel/highlight/node_modules/supports-color/browser.js"(exports2, module2) { "use strict"; module2.exports = { stdout: false, stderr: false }; } }); // node_modules/@babel/highlight/node_modules/chalk/templates.js var require_templates = __commonJS({ "node_modules/@babel/highlight/node_modules/chalk/templates.js"(exports2, module2) { "use strict"; var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi; var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g; var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/; var ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi; var ESCAPES = /* @__PURE__ */ new Map([ ["n", "\n"], ["r", "\r"], ["t", " "], ["b", "\b"], ["f", "\f"], ["v", "\v"], ["0", "\0"], ["\\", "\\"], ["e", "\x1B"], ["a", "\x07"] ]); function unescape2(c) { if (c[0] === "u" && c.length === 5 || c[0] === "x" && c.length === 3) { return String.fromCharCode(parseInt(c.slice(1), 16)); } return ESCAPES.get(c) || c; } function parseArguments(name, args) { const results = []; const chunks = args.trim().split(/\s*,\s*/g); let matches; for (const chunk of chunks) { if (!isNaN(chunk)) { results.push(Number(chunk)); } else if (matches = chunk.match(STRING_REGEX)) { results.push(matches[2].replace(ESCAPE_REGEX, (m, escape2, chr) => escape2 ? unescape2(escape2) : chr)); } else { throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`); } } return results; } function parseStyle(style2) { STYLE_REGEX.lastIndex = 0; const results = []; let matches; while ((matches = STYLE_REGEX.exec(style2)) !== null) { const name = matches[1]; if (matches[2]) { const args = parseArguments(name, matches[2]); results.push([name].concat(args)); } else { results.push([name]); } } return results; } function buildStyle(chalk, styles) { const enabled = {}; for (const layer of styles) { for (const style2 of layer.styles) { enabled[style2[0]] = layer.inverse ? null : style2.slice(1); } } let current = chalk; for (const styleName of Object.keys(enabled)) { if (Array.isArray(enabled[styleName])) { if (!(styleName in current)) { throw new Error(`Unknown Chalk style: ${styleName}`); } if (enabled[styleName].length > 0) { current = current[styleName].apply(current, enabled[styleName]); } else { current = current[styleName]; } } } return current; } module2.exports = (chalk, tmp) => { const styles = []; const chunks = []; let chunk = []; tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style2, close, chr) => { if (escapeChar) { chunk.push(unescape2(escapeChar)); } else if (style2) { const str2 = chunk.join(""); chunk = []; chunks.push(styles.length === 0 ? str2 : buildStyle(chalk, styles)(str2)); styles.push({ inverse, styles: parseStyle(style2) }); } else if (close) { if (styles.length === 0) { throw new Error("Found extraneous } in Chalk template literal"); } chunks.push(buildStyle(chalk, styles)(chunk.join(""))); chunk = []; styles.pop(); } else { chunk.push(chr); } }); chunks.push(chunk.join("")); if (styles.length > 0) { const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`; throw new Error(errMsg); } return chunks.join(""); }; } }); // node_modules/@babel/highlight/node_modules/chalk/index.js var require_chalk = __commonJS({ "node_modules/@babel/highlight/node_modules/chalk/index.js"(exports2, module2) { "use strict"; var escapeStringRegexp = require_escape_string_regexp(); var ansiStyles = require_ansi_styles2(); var stdoutColor = require_browser3().stdout; var template = require_templates(); var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm"); var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"]; var skipModels = /* @__PURE__ */ new Set(["gray"]); var styles = /* @__PURE__ */ Object.create(null); function applyOptions(obj, options2) { options2 = options2 || {}; const scLevel = stdoutColor ? stdoutColor.level : 0; obj.level = options2.level === void 0 ? scLevel : options2.level; obj.enabled = "enabled" in options2 ? options2.enabled : obj.level > 0; } function Chalk(options2) { if (!this || !(this instanceof Chalk) || this.template) { const chalk = {}; applyOptions(chalk, options2); chalk.template = function() { const args = [].slice.call(arguments); return chalkTag.apply(null, [chalk.template].concat(args)); }; Object.setPrototypeOf(chalk, Chalk.prototype); Object.setPrototypeOf(chalk.template, chalk); chalk.template.constructor = Chalk; return chalk.template; } applyOptions(this, options2); } if (isSimpleWindowsTerm) { ansiStyles.blue.open = "\x1B[94m"; } for (const key of Object.keys(ansiStyles)) { ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g"); styles[key] = { get() { const codes = ansiStyles[key]; return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key); } }; } styles.visible = { get() { return build.call(this, this._styles || [], true, "visible"); } }; ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g"); for (const model of Object.keys(ansiStyles.color.ansi)) { if (skipModels.has(model)) { continue; } styles[model] = { get() { const level = this.level; return function() { const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments); const codes = { open, close: ansiStyles.color.close, closeRe: ansiStyles.color.closeRe }; return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); }; } }; } ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g"); for (const model of Object.keys(ansiStyles.bgColor.ansi)) { if (skipModels.has(model)) { continue; } const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); styles[bgModel] = { get() { const level = this.level; return function() { const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments); const codes = { open, close: ansiStyles.bgColor.close, closeRe: ansiStyles.bgColor.closeRe }; return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model); }; } }; } var proto = Object.defineProperties(() => { }, styles); function build(_styles, _empty, key) { const builder = function() { return applyStyle.apply(builder, arguments); }; builder._styles = _styles; builder._empty = _empty; const self2 = this; Object.defineProperty(builder, "level", { enumerable: true, get() { return self2.level; }, set(level) { self2.level = level; } }); Object.defineProperty(builder, "enabled", { enumerable: true, get() { return self2.enabled; }, set(enabled) { self2.enabled = enabled; } }); builder.hasGrey = this.hasGrey || key === "gray" || key === "grey"; builder.__proto__ = proto; return builder; } function applyStyle() { const args = arguments; const argsLen = args.length; let str2 = String(arguments[0]); if (argsLen === 0) { return ""; } if (argsLen > 1) { for (let a = 1; a < argsLen; a++) { str2 += " " + args[a]; } } if (!this.enabled || this.level <= 0 || !str2) { return this._empty ? "" : str2; } const originalDim = ansiStyles.dim.open; if (isSimpleWindowsTerm && this.hasGrey) { ansiStyles.dim.open = ""; } for (const code of this._styles.slice().reverse()) { str2 = code.open + str2.replace(code.closeRe, code.open) + code.close; str2 = str2.replace(/\r?\n/g, `${code.close}$&${code.open}`); } ansiStyles.dim.open = originalDim; return str2; } function chalkTag(chalk, strings) { if (!Array.isArray(strings)) { return [].slice.call(arguments, 1).join(" "); } const args = [].slice.call(arguments, 2); const parts = [strings.raw[0]]; for (let i = 1; i < strings.length; i++) { parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&")); parts.push(String(strings.raw[i])); } return template(chalk, parts.join("")); } Object.defineProperties(Chalk.prototype, styles); module2.exports = Chalk(); module2.exports.supportsColor = stdoutColor; module2.exports.default = module2.exports; } }); // node_modules/@babel/highlight/lib/index.js var require_lib7 = __commonJS({ "node_modules/@babel/highlight/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.default = highlight; exports2.getChalk = getChalk; exports2.shouldHighlight = shouldHighlight; var _jsTokens = require_js_tokens(); var _helperValidatorIdentifier = require_lib6(); var _chalk = require_chalk(); var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]); function getDefs(chalk) { return { keyword: chalk.cyan, capitalized: chalk.yellow, jsxIdentifier: chalk.yellow, punctuator: chalk.yellow, number: chalk.magenta, string: chalk.green, regex: chalk.magenta, comment: chalk.grey, invalid: chalk.white.bgRed.bold }; } var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; var BRACKET = /^[()[\]{}]$/; var tokenize; { const JSX_TAG = /^[a-z][\w-]*$/i; const getTokenType = function(token, offset, text) { if (token.type === "name") { if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) { return "keyword"; } if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) == " colorize(str2)).join("\n"); } else { highlighted += value; } } return highlighted; } function shouldHighlight(options2) { return !!_chalk.supportsColor || options2.forceColor; } function getChalk(options2) { return options2.forceColor ? new _chalk.constructor({ enabled: true, level: 1 }) : _chalk; } function highlight(code, options2 = {}) { if (code !== "" && shouldHighlight(options2)) { const chalk = getChalk(options2); const defs = getDefs(chalk); return highlightTokens(defs, code); } else { return code; } } } }); // node_modules/@babel/code-frame/lib/index.js var require_lib8 = __commonJS({ "node_modules/@babel/code-frame/lib/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.codeFrameColumns = codeFrameColumns; exports2.default = _default; var _highlight = require_lib7(); var deprecationWarningShown = false; function getDefs(chalk) { return { gutter: chalk.grey, marker: chalk.red.bold, message: chalk.red.bold }; } var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; function getMarkerLines(loc, source, opts) { const startLoc = Object.assign({ column: 0, line: -1 }, loc.start); const endLoc = Object.assign({}, startLoc, loc.end); const { linesAbove = 2, linesBelow = 3 } = opts || {}; const startLine = startLoc.line; const startColumn = startLoc.column; const endLine = endLoc.line; const endColumn = endLoc.column; let start = Math.max(startLine - (linesAbove + 1), 0); let end = Math.min(source.length, endLine + linesBelow); if (startLine === -1) { start = 0; } if (endLine === -1) { end = source.length; } const lineDiff = endLine - startLine; const markerLines = {}; if (lineDiff) { for (let i = 0; i <= lineDiff; i++) { const lineNumber = i + startLine; if (!startColumn) { markerLines[lineNumber] = true; } else if (i === 0) { const sourceLength = source[lineNumber - 1].length; markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1]; } else if (i === lineDiff) { markerLines[lineNumber] = [0, endColumn]; } else { const sourceLength = source[lineNumber - i].length; markerLines[lineNumber] = [0, sourceLength]; } } } else { if (startColumn === endColumn) { if (startColumn) { markerLines[startLine] = [startColumn, 0]; } else { markerLines[startLine] = true; } } else { markerLines[startLine] = [startColumn, endColumn - startColumn]; } } return { start, end, markerLines }; } function codeFrameColumns(rawLines, loc, opts = {}) { const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts); const chalk = (0, _highlight.getChalk)(opts); const defs = getDefs(chalk); const maybeHighlight = (chalkFn, string) => { return highlighted ? chalkFn(string) : string; }; const lines = rawLines.split(NEWLINE); const { start, end, markerLines } = getMarkerLines(loc, lines, opts); const hasColumns = loc.start && typeof loc.start.column === "number"; const numberMaxWidth = String(end).length; const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines; let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => { const number = start + 1 + index; const paddedNumber = ` ${number}`.slice(-numberMaxWidth); const gutter = ` ${paddedNumber} |`; const hasMarker = markerLines[number]; const lastMarkerLine = !markerLines[number + 1]; if (hasMarker) { let markerLine = ""; if (Array.isArray(hasMarker)) { const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); const numberOfMarkers = hasMarker[1] || 1; markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); if (lastMarkerLine && opts.message) { markerLine += " " + maybeHighlight(defs.message, opts.message); } } return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join(""); } else { return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`; } }).join("\n"); if (opts.message && !hasColumns) { frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message} ${frame}`; } if (highlighted) { return chalk.reset(frame); } else { return frame; } } function _default(rawLines, lineNumber, colNumber, opts = {}) { if (!deprecationWarningShown) { deprecationWarningShown = true; const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`."; if (process.emitWarning) { process.emitWarning(message, "DeprecationWarning"); } else { const deprecationError = new Error(message); deprecationError.name = "DeprecationWarning"; console.warn(new Error(message)); } } colNumber = Math.max(colNumber, 0); const location = { start: { column: colNumber, line: lineNumber } }; return codeFrameColumns(rawLines, location, opts); } } }); // node_modules/parse-json/index.js var require_parse_json = __commonJS({ "node_modules/parse-json/index.js"(exports2, module2) { "use strict"; var errorEx = require_error_ex(); var fallback = require_json_parse_even_better_errors(); var { default: LinesAndColumns } = require_build5(); var { codeFrameColumns } = require_lib8(); var JSONError = errorEx("JSONError", { fileName: errorEx.append("in %s"), codeFrame: errorEx.append("\n\n%s\n") }); var parseJson = (string, reviver, filename) => { if (typeof reviver === "string") { filename = reviver; reviver = null; } try { try { return JSON.parse(string, reviver); } catch (error) { fallback(string, reviver); throw error; } } catch (error) { error.message = error.message.replace(/\n/g, ""); const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/); const jsonError = new JSONError(error); if (filename) { jsonError.fileName = filename; } if (indexMatch && indexMatch.length > 0) { const lines = new LinesAndColumns(string); const index = Number(indexMatch[1]); const location = lines.locationForIndex(index); const codeFrame = codeFrameColumns( string, { start: { line: location.line + 1, column: location.column + 1 } }, { highlightCode: true } ); jsonError.codeFrame = codeFrame; } throw jsonError; } }; parseJson.JSONError = JSONError; module2.exports = parseJson; } }); // node_modules/cosmiconfig/dist/loaders.js var require_loaders = __commonJS({ "node_modules/cosmiconfig/dist/loaders.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.loaders = void 0; var importFresh; var loadJs = function loadJs2(filepath) { if (importFresh === void 0) { importFresh = require_import_fresh(); } const result = importFresh(filepath); return result; }; var parseJson; var loadJson = function loadJson2(filepath, content) { if (parseJson === void 0) { parseJson = require_parse_json(); } try { const result = parseJson(content); return result; } catch (error) { error.message = `JSON Error in ${filepath}: ${error.message}`; throw error; } }; var yaml2; var loadYaml = function loadYaml2(filepath, content) { if (yaml2 === void 0) { yaml2 = require_js_yaml(); } try { const result = yaml2.load(content); return result; } catch (error) { error.message = `YAML Error in ${filepath}: ${error.message}`; throw error; } }; var loaders = { loadJs, loadJson, loadYaml }; exports2.loaders = loaders; } }); // node_modules/cosmiconfig/dist/getPropertyByPath.js var require_getPropertyByPath = __commonJS({ "node_modules/cosmiconfig/dist/getPropertyByPath.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getPropertyByPath = getPropertyByPath; function getPropertyByPath(source, path) { if (typeof path === "string" && Object.prototype.hasOwnProperty.call(source, path)) { return source[path]; } const parsedPath = typeof path === "string" ? path.split(".") : path; return parsedPath.reduce((previous, key) => { if (previous === void 0) { return previous; } return previous[key]; }, source); } } }); // node_modules/cosmiconfig/dist/ExplorerBase.js var require_ExplorerBase = __commonJS({ "node_modules/cosmiconfig/dist/ExplorerBase.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExplorerBase = void 0; exports2.getExtensionDescription = getExtensionDescription; var _path = _interopRequireDefault(require("path")); var _loaders = require_loaders(); var _getPropertyByPath = require_getPropertyByPath(); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var ExplorerBase = class { constructor(options2) { if (options2.cache === true) { this.loadCache = /* @__PURE__ */ new Map(); this.searchCache = /* @__PURE__ */ new Map(); } this.config = options2; this.validateConfig(); } clearLoadCache() { if (this.loadCache) { this.loadCache.clear(); } } clearSearchCache() { if (this.searchCache) { this.searchCache.clear(); } } clearCaches() { this.clearLoadCache(); this.clearSearchCache(); } validateConfig() { const config = this.config; config.searchPlaces.forEach((place) => { const loaderKey = _path.default.extname(place) || "noExt"; const loader = config.loaders[loaderKey]; if (!loader) { throw new Error(`No loader specified for ${getExtensionDescription(place)}, so searchPlaces item "${place}" is invalid`); } if (typeof loader !== "function") { throw new Error(`loader for ${getExtensionDescription(place)} is not a function (type provided: "${typeof loader}"), so searchPlaces item "${place}" is invalid`); } }); } shouldSearchStopWithResult(result) { if (result === null) return false; if (result.isEmpty && this.config.ignoreEmptySearchPlaces) return false; return true; } nextDirectoryToSearch(currentDir, currentResult) { if (this.shouldSearchStopWithResult(currentResult)) { return null; } const nextDir = nextDirUp(currentDir); if (nextDir === currentDir || currentDir === this.config.stopDir) { return null; } return nextDir; } loadPackageProp(filepath, content) { const parsedContent = _loaders.loaders.loadJson(filepath, content); const packagePropValue = (0, _getPropertyByPath.getPropertyByPath)(parsedContent, this.config.packageProp); return packagePropValue || null; } getLoaderEntryForFile(filepath) { if (_path.default.basename(filepath) === "package.json") { const loader2 = this.loadPackageProp.bind(this); return loader2; } const loaderKey = _path.default.extname(filepath) || "noExt"; const loader = this.config.loaders[loaderKey]; if (!loader) { throw new Error(`No loader specified for ${getExtensionDescription(filepath)}`); } return loader; } loadedContentToCosmiconfigResult(filepath, loadedContent) { if (loadedContent === null) { return null; } if (loadedContent === void 0) { return { filepath, config: void 0, isEmpty: true }; } return { config: loadedContent, filepath }; } validateFilePath(filepath) { if (!filepath) { throw new Error("load must pass a non-empty string"); } } }; exports2.ExplorerBase = ExplorerBase; function nextDirUp(dir) { return _path.default.dirname(dir); } function getExtensionDescription(filepath) { const ext = _path.default.extname(filepath); return ext ? `extension "${ext}"` : "files without extensions"; } } }); // node_modules/path-type/index.js var require_path_type = __commonJS({ "node_modules/path-type/index.js"(exports2) { "use strict"; var { promisify } = require("util"); var fs = require("fs"); async function isType(fsStatType, statsMethodName, filePath) { if (typeof filePath !== "string") { throw new TypeError(`Expected a string, got ${typeof filePath}`); } try { const stats = await promisify(fs[fsStatType])(filePath); return stats[statsMethodName](); } catch (error) { if (error.code === "ENOENT") { return false; } throw error; } } function isTypeSync(fsStatType, statsMethodName, filePath) { if (typeof filePath !== "string") { throw new TypeError(`Expected a string, got ${typeof filePath}`); } try { return fs[fsStatType](filePath)[statsMethodName](); } catch (error) { if (error.code === "ENOENT") { return false; } throw error; } } exports2.isFile = isType.bind(null, "stat", "isFile"); exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); } }); // node_modules/cosmiconfig/dist/getDirectory.js var require_getDirectory = __commonJS({ "node_modules/cosmiconfig/dist/getDirectory.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDirectory = getDirectory; exports2.getDirectorySync = getDirectorySync; var _path = _interopRequireDefault(require("path")); var _pathType = require_path_type(); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } async function getDirectory(filepath) { const filePathIsDirectory = await (0, _pathType.isDirectory)(filepath); if (filePathIsDirectory === true) { return filepath; } const directory2 = _path.default.dirname(filepath); return directory2; } function getDirectorySync(filepath) { const filePathIsDirectory = (0, _pathType.isDirectorySync)(filepath); if (filePathIsDirectory === true) { return filepath; } const directory2 = _path.default.dirname(filepath); return directory2; } } }); // node_modules/cosmiconfig/dist/readFile.js var require_readFile = __commonJS({ "node_modules/cosmiconfig/dist/readFile.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.readFile = readFile; exports2.readFileSync = readFileSync; var _fs = _interopRequireDefault(require("fs")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } async function fsReadFileAsync(pathname, encoding) { return new Promise((resolve, reject) => { _fs.default.readFile(pathname, encoding, (error, contents) => { if (error) { reject(error); return; } resolve(contents); }); }); } async function readFile(filepath, options2 = {}) { const throwNotFound = options2.throwNotFound === true; try { const content = await fsReadFileAsync(filepath, "utf8"); return content; } catch (error) { if (throwNotFound === false && (error.code === "ENOENT" || error.code === "EISDIR")) { return null; } throw error; } } function readFileSync(filepath, options2 = {}) { const throwNotFound = options2.throwNotFound === true; try { const content = _fs.default.readFileSync(filepath, "utf8"); return content; } catch (error) { if (throwNotFound === false && (error.code === "ENOENT" || error.code === "EISDIR")) { return null; } throw error; } } } }); // node_modules/cosmiconfig/dist/Explorer.js var require_Explorer = __commonJS({ "node_modules/cosmiconfig/dist/Explorer.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Explorer = void 0; var _path = _interopRequireDefault(require("path")); var _cacheWrapper = require_cacheWrapper(); var _ExplorerBase = require_ExplorerBase(); var _getDirectory = require_getDirectory(); var _readFile = require_readFile(); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Explorer = class extends _ExplorerBase.ExplorerBase { constructor(options2) { super(options2); } async search(searchFrom = process.cwd()) { const startDirectory = await (0, _getDirectory.getDirectory)(searchFrom); const result = await this.searchFromDirectory(startDirectory); return result; } async searchFromDirectory(dir) { const absoluteDir = _path.default.resolve(process.cwd(), dir); const run = async () => { const result = await this.searchDirectory(absoluteDir); const nextDir = this.nextDirectoryToSearch(absoluteDir, result); if (nextDir) { return this.searchFromDirectory(nextDir); } const transformResult = await this.config.transform(result); return transformResult; }; if (this.searchCache) { return (0, _cacheWrapper.cacheWrapper)(this.searchCache, absoluteDir, run); } return run(); } async searchDirectory(dir) { for await (const place of this.config.searchPlaces) { const placeResult = await this.loadSearchPlace(dir, place); if (this.shouldSearchStopWithResult(placeResult) === true) { return placeResult; } } return null; } async loadSearchPlace(dir, place) { const filepath = _path.default.join(dir, place); const fileContents = await (0, _readFile.readFile)(filepath); const result = await this.createCosmiconfigResult(filepath, fileContents); return result; } async loadFileContent(filepath, content) { if (content === null) { return null; } if (content.trim() === "") { return void 0; } const loader = this.getLoaderEntryForFile(filepath); try { return await loader(filepath, content); } catch (e) { e.filepath = filepath; throw e; } } async createCosmiconfigResult(filepath, content) { const fileContent = await this.loadFileContent(filepath, content); const result = this.loadedContentToCosmiconfigResult(filepath, fileContent); return result; } async load(filepath) { this.validateFilePath(filepath); const absoluteFilePath = _path.default.resolve(process.cwd(), filepath); const runLoad = async () => { const fileContents = await (0, _readFile.readFile)(absoluteFilePath, { throwNotFound: true }); const result = await this.createCosmiconfigResult(absoluteFilePath, fileContents); const transformResult = await this.config.transform(result); return transformResult; }; if (this.loadCache) { return (0, _cacheWrapper.cacheWrapper)(this.loadCache, absoluteFilePath, runLoad); } return runLoad(); } }; exports2.Explorer = Explorer; } }); // node_modules/cosmiconfig/dist/ExplorerSync.js var require_ExplorerSync = __commonJS({ "node_modules/cosmiconfig/dist/ExplorerSync.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExplorerSync = void 0; var _path = _interopRequireDefault(require("path")); var _cacheWrapper = require_cacheWrapper(); var _ExplorerBase = require_ExplorerBase(); var _getDirectory = require_getDirectory(); var _readFile = require_readFile(); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var ExplorerSync = class extends _ExplorerBase.ExplorerBase { constructor(options2) { super(options2); } searchSync(searchFrom = process.cwd()) { const startDirectory = (0, _getDirectory.getDirectorySync)(searchFrom); const result = this.searchFromDirectorySync(startDirectory); return result; } searchFromDirectorySync(dir) { const absoluteDir = _path.default.resolve(process.cwd(), dir); const run = () => { const result = this.searchDirectorySync(absoluteDir); const nextDir = this.nextDirectoryToSearch(absoluteDir, result); if (nextDir) { return this.searchFromDirectorySync(nextDir); } const transformResult = this.config.transform(result); return transformResult; }; if (this.searchCache) { return (0, _cacheWrapper.cacheWrapperSync)(this.searchCache, absoluteDir, run); } return run(); } searchDirectorySync(dir) { for (const place of this.config.searchPlaces) { const placeResult = this.loadSearchPlaceSync(dir, place); if (this.shouldSearchStopWithResult(placeResult) === true) { return placeResult; } } return null; } loadSearchPlaceSync(dir, place) { const filepath = _path.default.join(dir, place); const content = (0, _readFile.readFileSync)(filepath); const result = this.createCosmiconfigResultSync(filepath, content); return result; } loadFileContentSync(filepath, content) { if (content === null) { return null; } if (content.trim() === "") { return void 0; } const loader = this.getLoaderEntryForFile(filepath); try { return loader(filepath, content); } catch (e) { e.filepath = filepath; throw e; } } createCosmiconfigResultSync(filepath, content) { const fileContent = this.loadFileContentSync(filepath, content); const result = this.loadedContentToCosmiconfigResult(filepath, fileContent); return result; } loadSync(filepath) { this.validateFilePath(filepath); const absoluteFilePath = _path.default.resolve(process.cwd(), filepath); const runLoadSync = () => { const content = (0, _readFile.readFileSync)(absoluteFilePath, { throwNotFound: true }); const cosmiconfigResult = this.createCosmiconfigResultSync(absoluteFilePath, content); const transformResult = this.config.transform(cosmiconfigResult); return transformResult; }; if (this.loadCache) { return (0, _cacheWrapper.cacheWrapperSync)(this.loadCache, absoluteFilePath, runLoadSync); } return runLoadSync(); } }; exports2.ExplorerSync = ExplorerSync; } }); // node_modules/cosmiconfig/dist/types.js var require_types2 = __commonJS({ "node_modules/cosmiconfig/dist/types.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); } }); // node_modules/cosmiconfig/dist/index.js var require_dist2 = __commonJS({ "node_modules/cosmiconfig/dist/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.cosmiconfig = cosmiconfig; exports2.cosmiconfigSync = cosmiconfigSync; exports2.defaultLoaders = void 0; var _os = _interopRequireDefault(require("os")); var _Explorer = require_Explorer(); var _ExplorerSync = require_ExplorerSync(); var _loaders = require_loaders(); var _types = require_types2(); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function cosmiconfig(moduleName, options2 = {}) { const normalizedOptions = normalizeOptions(moduleName, options2); const explorer = new _Explorer.Explorer(normalizedOptions); return { search: explorer.search.bind(explorer), load: explorer.load.bind(explorer), clearLoadCache: explorer.clearLoadCache.bind(explorer), clearSearchCache: explorer.clearSearchCache.bind(explorer), clearCaches: explorer.clearCaches.bind(explorer) }; } function cosmiconfigSync(moduleName, options2 = {}) { const normalizedOptions = normalizeOptions(moduleName, options2); const explorerSync = new _ExplorerSync.ExplorerSync(normalizedOptions); return { search: explorerSync.searchSync.bind(explorerSync), load: explorerSync.loadSync.bind(explorerSync), clearLoadCache: explorerSync.clearLoadCache.bind(explorerSync), clearSearchCache: explorerSync.clearSearchCache.bind(explorerSync), clearCaches: explorerSync.clearCaches.bind(explorerSync) }; } var defaultLoaders = Object.freeze({ ".cjs": _loaders.loaders.loadJs, ".js": _loaders.loaders.loadJs, ".json": _loaders.loaders.loadJson, ".yaml": _loaders.loaders.loadYaml, ".yml": _loaders.loaders.loadYaml, noExt: _loaders.loaders.loadYaml }); exports2.defaultLoaders = defaultLoaders; var identity = function identity2(x) { return x; }; function normalizeOptions(moduleName, options2) { const defaults = { packageProp: moduleName, searchPlaces: ["package.json", `.${moduleName}rc`, `.${moduleName}rc.json`, `.${moduleName}rc.yaml`, `.${moduleName}rc.yml`, `.${moduleName}rc.js`, `.${moduleName}rc.cjs`, `.config/${moduleName}rc`, `.config/${moduleName}rc.json`, `.config/${moduleName}rc.yaml`, `.config/${moduleName}rc.yml`, `.config/${moduleName}rc.js`, `.config/${moduleName}rc.cjs`, `${moduleName}.config.js`, `${moduleName}.config.cjs`], ignoreEmptySearchPlaces: true, stopDir: _os.default.homedir(), cache: true, transform: identity, loaders: defaultLoaders }; const normalizedOptions = { ...defaults, ...options2, loaders: { ...defaults.loaders, ...options2.loaders } }; return normalizedOptions; } } }); // node_modules/import-from/index.js var require_import_from = __commonJS({ "node_modules/import-from/index.js"(exports2, module2) { "use strict"; var path = require("path"); var { createRequire } = require("module"); module2.exports = (fromDirectory, moduleId) => createRequire(path.resolve(fromDirectory, "noop.js"))(moduleId); module2.exports.silent = (fromDirectory, moduleId) => { try { return createRequire(path.resolve(fromDirectory, "noop.js"))(moduleId); } catch (e) { } }; } }); // node_modules/fs.realpath/old.js var require_old = __commonJS({ "node_modules/fs.realpath/old.js"(exports2) { var pathModule = require("path"); var isWindows = process.platform === "win32"; var fs = require("fs"); var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); function rethrow() { var callback; if (DEBUG) { var backtrace = new Error(); callback = debugCallback; } else callback = missingCallback; return callback; function debugCallback(err) { if (err) { backtrace.message = err.message; err = backtrace; missingCallback(err); } } function missingCallback(err) { if (err) { if (process.throwDeprecation) throw err; else if (!process.noDeprecation) { var msg = "fs: missing callback " + (err.stack || err.message); if (process.traceDeprecation) console.trace(msg); else console.error(msg); } } } } function maybeCallback(cb) { return typeof cb === "function" ? cb : rethrow(); } var normalize = pathModule.normalize; if (isWindows) { nextPartRe = /(.*?)(?:[\/\\]+|$)/g; } else { nextPartRe = /(.*?)(?:[\/]+|$)/g; } var nextPartRe; if (isWindows) { splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; } else { splitRootRe = /^[\/]*/; } var splitRootRe; exports2.realpathSync = function realpathSync(p, cache) { p = pathModule.resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return cache[p]; } var original = p, seenLinks = {}, knownHard = {}; var pos; var current; var base2; var previous; start(); function start() { var m = splitRootRe.exec(p); pos = m[0].length; current = m[0]; base2 = m[0]; previous = ""; if (isWindows && !knownHard[base2]) { fs.lstatSync(base2); knownHard[base2] = true; } } while (pos < p.length) { nextPartRe.lastIndex = pos; var result = nextPartRe.exec(p); previous = current; current += result[0]; base2 = previous + result[1]; pos = nextPartRe.lastIndex; if (knownHard[base2] || cache && cache[base2] === base2) { continue; } var resolvedLink; if (cache && Object.prototype.hasOwnProperty.call(cache, base2)) { resolvedLink = cache[base2]; } else { var stat = fs.lstatSync(base2); if (!stat.isSymbolicLink()) { knownHard[base2] = true; if (cache) cache[base2] = base2; continue; } var linkTarget = null; if (!isWindows) { var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); if (seenLinks.hasOwnProperty(id)) { linkTarget = seenLinks[id]; } } if (linkTarget === null) { fs.statSync(base2); linkTarget = fs.readlinkSync(base2); } resolvedLink = pathModule.resolve(previous, linkTarget); if (cache) cache[base2] = resolvedLink; if (!isWindows) seenLinks[id] = linkTarget; } p = pathModule.resolve(resolvedLink, p.slice(pos)); start(); } if (cache) cache[original] = p; return p; }; exports2.realpath = function realpath(p, cache, cb) { if (typeof cb !== "function") { cb = maybeCallback(cache); cache = null; } p = pathModule.resolve(p); if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { return process.nextTick(cb.bind(null, null, cache[p])); } var original = p, seenLinks = {}, knownHard = {}; var pos; var current; var base2; var previous; start(); function start() { var m = splitRootRe.exec(p); pos = m[0].length; current = m[0]; base2 = m[0]; previous = ""; if (isWindows && !knownHard[base2]) { fs.lstat(base2, function(err) { if (err) return cb(err); knownHard[base2] = true; LOOP(); }); } else { process.nextTick(LOOP); } } function LOOP() { if (pos >= p.length) { if (cache) cache[original] = p; return cb(null, p); } nextPartRe.lastIndex = pos; var result = nextPartRe.exec(p); previous = current; current += result[0]; base2 = previous + result[1]; pos = nextPartRe.lastIndex; if (knownHard[base2] || cache && cache[base2] === base2) { return process.nextTick(LOOP); } if (cache && Object.prototype.hasOwnProperty.call(cache, base2)) { return gotResolvedLink(cache[base2]); } return fs.lstat(base2, gotStat); } function gotStat(err, stat) { if (err) return cb(err); if (!stat.isSymbolicLink()) { knownHard[base2] = true; if (cache) cache[base2] = base2; return process.nextTick(LOOP); } if (!isWindows) { var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); if (seenLinks.hasOwnProperty(id)) { return gotTarget(null, seenLinks[id], base2); } } fs.stat(base2, function(err2) { if (err2) return cb(err2); fs.readlink(base2, function(err3, target) { if (!isWindows) seenLinks[id] = target; gotTarget(err3, target); }); }); } function gotTarget(err, target, base3) { if (err) return cb(err); var resolvedLink = pathModule.resolve(previous, target); if (cache) cache[base3] = resolvedLink; gotResolvedLink(resolvedLink); } function gotResolvedLink(resolvedLink) { p = pathModule.resolve(resolvedLink, p.slice(pos)); start(); } }; } }); // node_modules/fs.realpath/index.js var require_fs = __commonJS({ "node_modules/fs.realpath/index.js"(exports2, module2) { module2.exports = realpath; realpath.realpath = realpath; realpath.sync = realpathSync; realpath.realpathSync = realpathSync; realpath.monkeypatch = monkeypatch; realpath.unmonkeypatch = unmonkeypatch; var fs = require("fs"); var origRealpath = fs.realpath; var origRealpathSync = fs.realpathSync; var version = process.version; var ok = /^v[0-5]\./.test(version); var old = require_old(); function newError(er) { return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); } function realpath(p, cache, cb) { if (ok) { return origRealpath(p, cache, cb); } if (typeof cache === "function") { cb = cache; cache = null; } origRealpath(p, cache, function(er, result) { if (newError(er)) { old.realpath(p, cache, cb); } else { cb(er, result); } }); } function realpathSync(p, cache) { if (ok) { return origRealpathSync(p, cache); } try { return origRealpathSync(p, cache); } catch (er) { if (newError(er)) { return old.realpathSync(p, cache); } else { throw er; } } } function monkeypatch() { fs.realpath = realpath; fs.realpathSync = realpathSync; } function unmonkeypatch() { fs.realpath = origRealpath; fs.realpathSync = origRealpathSync; } } }); // node_modules/concat-map/index.js var require_concat_map = __commonJS({ "node_modules/concat-map/index.js"(exports2, module2) { module2.exports = function(xs, fn) { var res = []; for (var i = 0; i < xs.length; i++) { var x = fn(xs[i], i); if (isArray(x)) res.push.apply(res, x); else res.push(x); } return res; }; var isArray = Array.isArray || function(xs) { return Object.prototype.toString.call(xs) === "[object Array]"; }; } }); // node_modules/balanced-match/index.js var require_balanced_match = __commonJS({ "node_modules/balanced-match/index.js"(exports2, module2) { "use strict"; module2.exports = balanced; function balanced(a, b, str2) { if (a instanceof RegExp) a = maybeMatch(a, str2); if (b instanceof RegExp) b = maybeMatch(b, str2); var r = range(a, b, str2); return r && { start: r[0], end: r[1], pre: str2.slice(0, r[0]), body: str2.slice(r[0] + a.length, r[1]), post: str2.slice(r[1] + b.length) }; } function maybeMatch(reg, str2) { var m = str2.match(reg); return m ? m[0] : null; } balanced.range = range; function range(a, b, str2) { var begs, beg, left, right, result; var ai = str2.indexOf(a); var bi = str2.indexOf(b, ai + 1); var i = ai; if (ai >= 0 && bi > 0) { if (a === b) { return [ai, bi]; } begs = []; left = str2.length; while (i >= 0 && !result) { if (i == ai) { begs.push(i); ai = str2.indexOf(a, i + 1); } else if (begs.length == 1) { result = [begs.pop(), bi]; } else { beg = begs.pop(); if (beg < left) { left = beg; right = bi; } bi = str2.indexOf(b, i + 1); } i = ai < bi && ai >= 0 ? ai : bi; } if (begs.length) { result = [left, right]; } } return result; } } }); // node_modules/brace-expansion/index.js var require_brace_expansion = __commonJS({ "node_modules/brace-expansion/index.js"(exports2, module2) { var concatMap = require_concat_map(); var balanced = require_balanced_match(); module2.exports = expandTop; var escSlash = "\0SLASH" + Math.random() + "\0"; var escOpen = "\0OPEN" + Math.random() + "\0"; var escClose = "\0CLOSE" + Math.random() + "\0"; var escComma = "\0COMMA" + Math.random() + "\0"; var escPeriod = "\0PERIOD" + Math.random() + "\0"; function numeric(str2) { return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); } function escapeBraces(str2) { return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); } function unescapeBraces(str2) { return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); } function parseCommaParts(str2) { if (!str2) return [""]; var parts = []; var m = balanced("{", "}", str2); if (!m) return str2.split(","); var pre = m.pre; var body = m.body; var post = m.post; var p = pre.split(","); p[p.length - 1] += "{" + body + "}"; var postParts = parseCommaParts(post); if (post.length) { p[p.length - 1] += postParts.shift(); p.push.apply(p, postParts); } parts.push.apply(parts, p); return parts; } function expandTop(str2) { if (!str2) return []; if (str2.substr(0, 2) === "{}") { str2 = "\\{\\}" + str2.substr(2); } return expand(escapeBraces(str2), true).map(unescapeBraces); } function embrace(str2) { return "{" + str2 + "}"; } function isPadded(el) { return /^-?0\d/.test(el); } function lte(i, y) { return i <= y; } function gte(i, y) { return i >= y; } function expand(str2, isTop) { var expansions = []; var m = balanced("{", "}", str2); if (!m || /\$$/.test(m.pre)) return [str2]; var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); var isSequence = isNumericSequence || isAlphaSequence; var isOptions = m.body.indexOf(",") >= 0; if (!isSequence && !isOptions) { if (m.post.match(/,.*\}/)) { str2 = m.pre + "{" + m.body + escClose + m.post; return expand(str2); } return [str2]; } var n; if (isSequence) { n = m.body.split(/\.\./); } else { n = parseCommaParts(m.body); if (n.length === 1) { n = expand(n[0], false).map(embrace); if (n.length === 1) { var post = m.post.length ? expand(m.post, false) : [""]; return post.map(function(p) { return m.pre + n[0] + p; }); } } } var pre = m.pre; var post = m.post.length ? expand(m.post, false) : [""]; var N; if (isSequence) { var x = numeric(n[0]); var y = numeric(n[1]); var width = Math.max(n[0].length, n[1].length); var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; var test = lte; var reverse = y < x; if (reverse) { incr *= -1; test = gte; } var pad = n.some(isPadded); N = []; for (var i = x; test(i, y); i += incr) { var c; if (isAlphaSequence) { c = String.fromCharCode(i); if (c === "\\") c = ""; } else { c = String(i); if (pad) { var need = width - c.length; if (need > 0) { var z = new Array(need + 1).join("0"); if (i < 0) c = "-" + z + c.slice(1); else c = z + c; } } } N.push(c); } } else { N = concatMap(n, function(el) { return expand(el, false); }); } for (var j = 0; j < N.length; j++) { for (var k = 0; k < post.length; k++) { var expansion = pre + N[j] + post[k]; if (!isTop || isSequence || expansion) expansions.push(expansion); } } return expansions; } } }); // node_modules/minimatch/minimatch.js var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; var path = function() { try { return require("path"); } catch (e) { } }() || { sep: "/" }; minimatch.sep = path.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, "?": { open: "(?:", close: ")?" }, "+": { open: "(?:", close: ")+" }, "*": { open: "(?:", close: ")*" }, "@": { open: "(?:", close: ")" } }; var qmark = "[^/]"; var star = qmark + "*?"; var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; var reSpecials = charSet("().*{}+?[]^$\\!"); function charSet(s) { return s.split("").reduce(function(set, c) { set[c] = true; return set; }, {}); } var slashSplit = /\/+/; minimatch.filter = filter; function filter(pattern, options2) { options2 = options2 || {}; return function(p, i, list) { return minimatch(p, pattern, options2); }; } function ext(a, b) { b = b || {}; var t = {}; Object.keys(a).forEach(function(k) { t[k] = a[k]; }); Object.keys(b).forEach(function(k) { t[k] = b[k]; }); return t; } minimatch.defaults = function(def) { if (!def || typeof def !== "object" || !Object.keys(def).length) { return minimatch; } var orig = minimatch; var m = function minimatch2(p, pattern, options2) { return orig(p, pattern, ext(def, options2)); }; m.Minimatch = function Minimatch2(pattern, options2) { return new orig.Minimatch(pattern, ext(def, options2)); }; m.Minimatch.defaults = function defaults(options2) { return orig.defaults(ext(def, options2)).Minimatch; }; m.filter = function filter2(pattern, options2) { return orig.filter(pattern, ext(def, options2)); }; m.defaults = function defaults(options2) { return orig.defaults(ext(def, options2)); }; m.makeRe = function makeRe2(pattern, options2) { return orig.makeRe(pattern, ext(def, options2)); }; m.braceExpand = function braceExpand2(pattern, options2) { return orig.braceExpand(pattern, ext(def, options2)); }; m.match = function(list, pattern, options2) { return orig.match(list, pattern, ext(def, options2)); }; return m; }; Minimatch.defaults = function(def) { return minimatch.defaults(def).Minimatch; }; function minimatch(p, pattern, options2) { assertValidPattern(pattern); if (!options2) options2 = {}; if (!options2.nocomment && pattern.charAt(0) === "#") { return false; } return new Minimatch(pattern, options2).match(p); } function Minimatch(pattern, options2) { if (!(this instanceof Minimatch)) { return new Minimatch(pattern, options2); } assertValidPattern(pattern); if (!options2) options2 = {}; pattern = pattern.trim(); if (!options2.allowWindowsEscape && path.sep !== "/") { pattern = pattern.split(path.sep).join("/"); } this.options = options2; this.set = []; this.pattern = pattern; this.regexp = null; this.negate = false; this.comment = false; this.empty = false; this.partial = !!options2.partial; this.make(); } Minimatch.prototype.debug = function() { }; Minimatch.prototype.make = make; function make() { var pattern = this.pattern; var options2 = this.options; if (!options2.nocomment && pattern.charAt(0) === "#") { this.comment = true; return; } if (!pattern) { this.empty = true; return; } this.parseNegate(); var set = this.globSet = this.braceExpand(); if (options2.debug) this.debug = function debug() { console.error.apply(console, arguments); }; this.debug(this.pattern, set); set = this.globParts = set.map(function(s) { return s.split(slashSplit); }); this.debug(this.pattern, set); set = set.map(function(s, si, set2) { return s.map(this.parse, this); }, this); this.debug(this.pattern, set); set = set.filter(function(s) { return s.indexOf(false) === -1; }); this.debug(this.pattern, set); this.set = set; } Minimatch.prototype.parseNegate = parseNegate; function parseNegate() { var pattern = this.pattern; var negate = false; var options2 = this.options; var negateOffset = 0; if (options2.nonegate) return; for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { negate = !negate; negateOffset++; } if (negateOffset) this.pattern = pattern.substr(negateOffset); this.negate = negate; } minimatch.braceExpand = function(pattern, options2) { return braceExpand(pattern, options2); }; Minimatch.prototype.braceExpand = braceExpand; function braceExpand(pattern, options2) { if (!options2) { if (this instanceof Minimatch) { options2 = this.options; } else { options2 = {}; } } pattern = typeof pattern === "undefined" ? this.pattern : pattern; assertValidPattern(pattern); if (options2.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { return [pattern]; } return expand(pattern); } var MAX_PATTERN_LENGTH = 1024 * 64; var assertValidPattern = function(pattern) { if (typeof pattern !== "string") { throw new TypeError("invalid pattern"); } if (pattern.length > MAX_PATTERN_LENGTH) { throw new TypeError("pattern is too long"); } }; Minimatch.prototype.parse = parse2; var SUBPARSE = {}; function parse2(pattern, isSub) { assertValidPattern(pattern); var options2 = this.options; if (pattern === "**") { if (!options2.noglobstar) return GLOBSTAR; else pattern = "*"; } if (pattern === "") return ""; var re = ""; var hasMagic = !!options2.nocase; var escaping = false; var patternListStack = []; var negativeLists = []; var stateChar; var inClass = false; var reClassStart = -1; var classStart = -1; var patternStart = pattern.charAt(0) === "." ? "" : options2.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; var self2 = this; function clearStateChar() { if (stateChar) { switch (stateChar) { case "*": re += star; hasMagic = true; break; case "?": re += qmark; hasMagic = true; break; default: re += "\\" + stateChar; break; } self2.debug("clearStateChar %j %j", stateChar, re); stateChar = false; } } for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { this.debug("%s %s %s %j", pattern, i, re, c); if (escaping && reSpecials[c]) { re += "\\" + c; escaping = false; continue; } switch (c) { case "/": { return false; } case "\\": clearStateChar(); escaping = true; continue; case "?": case "*": case "+": case "@": case "!": this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); if (inClass) { this.debug(" in class"); if (c === "!" && i === classStart + 1) c = "^"; re += c; continue; } self2.debug("call clearStateChar %j", stateChar); clearStateChar(); stateChar = c; if (options2.noext) clearStateChar(); continue; case "(": if (inClass) { re += "("; continue; } if (!stateChar) { re += "\\("; continue; } patternListStack.push({ type: stateChar, start: i - 1, reStart: re.length, open: plTypes[stateChar].open, close: plTypes[stateChar].close }); re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; this.debug("plType %j %j", stateChar, re); stateChar = false; continue; case ")": if (inClass || !patternListStack.length) { re += "\\)"; continue; } clearStateChar(); hasMagic = true; var pl = patternListStack.pop(); re += pl.close; if (pl.type === "!") { negativeLists.push(pl); } pl.reEnd = re.length; continue; case "|": if (inClass || !patternListStack.length || escaping) { re += "\\|"; escaping = false; continue; } clearStateChar(); re += "|"; continue; case "[": clearStateChar(); if (inClass) { re += "\\" + c; continue; } inClass = true; classStart = i; reClassStart = re.length; re += c; continue; case "]": if (i === classStart + 1 || !inClass) { re += "\\" + c; escaping = false; continue; } var cs = pattern.substring(classStart + 1, i); try { RegExp("[" + cs + "]"); } catch (er) { var sp = this.parse(cs, SUBPARSE); re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; hasMagic = hasMagic || sp[1]; inClass = false; continue; } hasMagic = true; inClass = false; re += c; continue; default: clearStateChar(); if (escaping) { escaping = false; } else if (reSpecials[c] && !(c === "^" && inClass)) { re += "\\"; } re += c; } } if (inClass) { cs = pattern.substr(classStart + 1); sp = this.parse(cs, SUBPARSE); re = re.substr(0, reClassStart) + "\\[" + sp[0]; hasMagic = hasMagic || sp[1]; } for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { var tail = re.slice(pl.reStart + pl.open.length); this.debug("setting tail", re, pl); tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { if (!$2) { $2 = "\\"; } return $1 + $1 + $2 + "|"; }); this.debug("tail=%j\n %s", tail, tail, pl, re); var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; hasMagic = true; re = re.slice(0, pl.reStart) + t + "\\(" + tail; } clearStateChar(); if (escaping) { re += "\\\\"; } var addPatternStart = false; switch (re.charAt(0)) { case "[": case ".": case "(": addPatternStart = true; } for (var n = negativeLists.length - 1; n > -1; n--) { var nl = negativeLists[n]; var nlBefore = re.slice(0, nl.reStart); var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); var nlAfter = re.slice(nl.reEnd); nlLast += nlAfter; var openParensBefore = nlBefore.split("(").length - 1; var cleanAfter = nlAfter; for (i = 0; i < openParensBefore; i++) { cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); } nlAfter = cleanAfter; var dollar = ""; if (nlAfter === "" && isSub !== SUBPARSE) { dollar = "$"; } var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; re = newRe; } if (re !== "" && hasMagic) { re = "(?=.)" + re; } if (addPatternStart) { re = patternStart + re; } if (isSub === SUBPARSE) { return [re, hasMagic]; } if (!hasMagic) { return globUnescape(pattern); } var flags = options2.nocase ? "i" : ""; try { var regExp = new RegExp("^" + re + "$", flags); } catch (er) { return new RegExp("$."); } regExp._glob = pattern; regExp._src = re; return regExp; } minimatch.makeRe = function(pattern, options2) { return new Minimatch(pattern, options2 || {}).makeRe(); }; Minimatch.prototype.makeRe = makeRe; function makeRe() { if (this.regexp || this.regexp === false) return this.regexp; var set = this.set; if (!set.length) { this.regexp = false; return this.regexp; } var options2 = this.options; var twoStar = options2.noglobstar ? star : options2.dot ? twoStarDot : twoStarNoDot; var flags = options2.nocase ? "i" : ""; var re = set.map(function(pattern) { return pattern.map(function(p) { return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; }).join("\\/"); }).join("|"); re = "^(?:" + re + ")$"; if (this.negate) re = "^(?!" + re + ").*$"; try { this.regexp = new RegExp(re, flags); } catch (ex) { this.regexp = false; } return this.regexp; } minimatch.match = function(list, pattern, options2) { options2 = options2 || {}; var mm = new Minimatch(pattern, options2); list = list.filter(function(f) { return mm.match(f); }); if (mm.options.nonull && !list.length) { list.push(pattern); } return list; }; Minimatch.prototype.match = function match(f, partial) { if (typeof partial === "undefined") partial = this.partial; this.debug("match", f, this.pattern); if (this.comment) return false; if (this.empty) return f === ""; if (f === "/" && partial) return true; var options2 = this.options; if (path.sep !== "/") { f = f.split(path.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); var set = this.set; this.debug(this.pattern, "set", set); var filename; var i; for (i = f.length - 1; i >= 0; i--) { filename = f[i]; if (filename) break; } for (i = 0; i < set.length; i++) { var pattern = set[i]; var file = f; if (options2.matchBase && pattern.length === 1) { file = [filename]; } var hit = this.matchOne(file, pattern, partial); if (hit) { if (options2.flipNegate) return true; return !this.negate; } } if (options2.flipNegate) return false; return this.negate; }; Minimatch.prototype.matchOne = function(file, pattern, partial) { var options2 = this.options; this.debug( "matchOne", { "this": this, file, pattern } ); this.debug("matchOne", file.length, pattern.length); for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { this.debug("matchOne loop"); var p = pattern[pi]; var f = file[fi]; this.debug(pattern, p, f); if (p === false) return false; if (p === GLOBSTAR) { this.debug("GLOBSTAR", [pattern, p, f]); var fr = fi; var pr = pi + 1; if (pr === pl) { this.debug("** at the end"); for (; fi < fl; fi++) { if (file[fi] === "." || file[fi] === ".." || !options2.dot && file[fi].charAt(0) === ".") return false; } return true; } while (fr < fl) { var swallowee = file[fr]; this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { this.debug("globstar found match!", fr, fl, swallowee); return true; } else { if (swallowee === "." || swallowee === ".." || !options2.dot && swallowee.charAt(0) === ".") { this.debug("dot detected!", file, fr, pattern, pr); break; } this.debug("globstar swallow a segment, and continue"); fr++; } } if (partial) { this.debug("\n>>> no match, partial?", file, fr, pattern, pr); if (fr === fl) return true; } return false; } var hit; if (typeof p === "string") { hit = f === p; this.debug("string match", p, f, hit); } else { hit = f.match(p); this.debug("pattern match", p, f, hit); } if (!hit) return false; } if (fi === fl && pi === pl) { return true; } else if (fi === fl) { return partial; } else if (pi === pl) { return fi === fl - 1 && file[fi] === ""; } throw new Error("wtf?"); }; function globUnescape(s) { return s.replace(/\\(.)/g, "$1"); } function regExpEscape(s) { return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); } } }); // node_modules/inherits/inherits_browser.js var require_inherits_browser = __commonJS({ "node_modules/inherits/inherits_browser.js"(exports2, module2) { if (typeof Object.create === "function") { module2.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }); } }; } else { module2.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; var TempCtor = function() { }; TempCtor.prototype = superCtor.prototype; ctor.prototype = new TempCtor(); ctor.prototype.constructor = ctor; } }; } } }); // node_modules/path-is-absolute/index.js var require_path_is_absolute = __commonJS({ "node_modules/path-is-absolute/index.js"(exports2, module2) { "use strict"; function posix(path) { return path.charAt(0) === "/"; } function win32(path) { var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; var result = splitDeviceRe.exec(path); var device = result[1] || ""; var isUnc = Boolean(device && device.charAt(1) !== ":"); return Boolean(result[2] || isUnc); } module2.exports = process.platform === "win32" ? win32 : posix; module2.exports.posix = posix; module2.exports.win32 = win32; } }); // node_modules/glob/common.js var require_common2 = __commonJS({ "node_modules/glob/common.js"(exports2) { exports2.setopts = setopts; exports2.ownProp = ownProp; exports2.makeAbs = makeAbs; exports2.finish = finish; exports2.mark = mark; exports2.isIgnored = isIgnored; exports2.childrenIgnored = childrenIgnored; function ownProp(obj, field) { return Object.prototype.hasOwnProperty.call(obj, field); } var fs = require("fs"); var path = require("path"); var minimatch = require_minimatch(); var isAbsolute = require_path_is_absolute(); var Minimatch = minimatch.Minimatch; function alphasort(a, b) { return a.localeCompare(b, "en"); } function setupIgnores(self2, options2) { self2.ignore = options2.ignore || []; if (!Array.isArray(self2.ignore)) self2.ignore = [self2.ignore]; if (self2.ignore.length) { self2.ignore = self2.ignore.map(ignoreMap); } } function ignoreMap(pattern) { var gmatcher = null; if (pattern.slice(-3) === "/**") { var gpattern = pattern.replace(/(\/\*\*)+$/, ""); gmatcher = new Minimatch(gpattern, { dot: true }); } return { matcher: new Minimatch(pattern, { dot: true }), gmatcher }; } function setopts(self2, pattern, options2) { if (!options2) options2 = {}; if (options2.matchBase && -1 === pattern.indexOf("/")) { if (options2.noglobstar) { throw new Error("base matching requires globstar"); } pattern = "**/" + pattern; } self2.silent = !!options2.silent; self2.pattern = pattern; self2.strict = options2.strict !== false; self2.realpath = !!options2.realpath; self2.realpathCache = options2.realpathCache || /* @__PURE__ */ Object.create(null); self2.follow = !!options2.follow; self2.dot = !!options2.dot; self2.mark = !!options2.mark; self2.nodir = !!options2.nodir; if (self2.nodir) self2.mark = true; self2.sync = !!options2.sync; self2.nounique = !!options2.nounique; self2.nonull = !!options2.nonull; self2.nosort = !!options2.nosort; self2.nocase = !!options2.nocase; self2.stat = !!options2.stat; self2.noprocess = !!options2.noprocess; self2.absolute = !!options2.absolute; self2.fs = options2.fs || fs; self2.maxLength = options2.maxLength || Infinity; self2.cache = options2.cache || /* @__PURE__ */ Object.create(null); self2.statCache = options2.statCache || /* @__PURE__ */ Object.create(null); self2.symlinks = options2.symlinks || /* @__PURE__ */ Object.create(null); setupIgnores(self2, options2); self2.changedCwd = false; var cwd = process.cwd(); if (!ownProp(options2, "cwd")) self2.cwd = cwd; else { self2.cwd = path.resolve(options2.cwd); self2.changedCwd = self2.cwd !== cwd; } self2.root = options2.root || path.resolve(self2.cwd, "/"); self2.root = path.resolve(self2.root); if (process.platform === "win32") self2.root = self2.root.replace(/\\/g, "/"); self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); if (process.platform === "win32") self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); self2.nomount = !!options2.nomount; options2.nonegate = true; options2.nocomment = true; options2.allowWindowsEscape = false; self2.minimatch = new Minimatch(pattern, options2); self2.options = self2.minimatch.options; } function finish(self2) { var nou = self2.nounique; var all = nou ? [] : /* @__PURE__ */ Object.create(null); for (var i = 0, l = self2.matches.length; i < l; i++) { var matches = self2.matches[i]; if (!matches || Object.keys(matches).length === 0) { if (self2.nonull) { var literal = self2.minimatch.globSet[i]; if (nou) all.push(literal); else all[literal] = true; } } else { var m = Object.keys(matches); if (nou) all.push.apply(all, m); else m.forEach(function(m2) { all[m2] = true; }); } } if (!nou) all = Object.keys(all); if (!self2.nosort) all = all.sort(alphasort); if (self2.mark) { for (var i = 0; i < all.length; i++) { all[i] = self2._mark(all[i]); } if (self2.nodir) { all = all.filter(function(e) { var notDir = !/\/$/.test(e); var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; if (notDir && c) notDir = c !== "DIR" && !Array.isArray(c); return notDir; }); } } if (self2.ignore.length) all = all.filter(function(m2) { return !isIgnored(self2, m2); }); self2.found = all; } function mark(self2, p) { var abs = makeAbs(self2, p); var c = self2.cache[abs]; var m = p; if (c) { var isDir = c === "DIR" || Array.isArray(c); var slash = p.slice(-1) === "/"; if (isDir && !slash) m += "/"; else if (!isDir && slash) m = m.slice(0, -1); if (m !== p) { var mabs = makeAbs(self2, m); self2.statCache[mabs] = self2.statCache[abs]; self2.cache[mabs] = self2.cache[abs]; } } return m; } function makeAbs(self2, f) { var abs = f; if (f.charAt(0) === "/") { abs = path.join(self2.root, f); } else if (isAbsolute(f) || f === "") { abs = f; } else if (self2.changedCwd) { abs = path.resolve(self2.cwd, f); } else { abs = path.resolve(f); } if (process.platform === "win32") abs = abs.replace(/\\/g, "/"); return abs; } function isIgnored(self2, path2) { if (!self2.ignore.length) return false; return self2.ignore.some(function(item) { return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2)); }); } function childrenIgnored(self2, path2) { if (!self2.ignore.length) return false; return self2.ignore.some(function(item) { return !!(item.gmatcher && item.gmatcher.match(path2)); }); } } }); // node_modules/glob/sync.js var require_sync2 = __commonJS({ "node_modules/glob/sync.js"(exports2, module2) { module2.exports = globSync; globSync.GlobSync = GlobSync; var rp = require_fs(); var minimatch = require_minimatch(); var Minimatch = minimatch.Minimatch; var Glob = require_glob().Glob; var util = require("util"); var path = require("path"); var assert = require("assert"); var isAbsolute = require_path_is_absolute(); var common = require_common2(); var setopts = common.setopts; var ownProp = common.ownProp; var childrenIgnored = common.childrenIgnored; var isIgnored = common.isIgnored; function globSync(pattern, options2) { if (typeof options2 === "function" || arguments.length === 3) throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); return new GlobSync(pattern, options2).found; } function GlobSync(pattern, options2) { if (!pattern) throw new Error("must provide pattern"); if (typeof options2 === "function" || arguments.length === 3) throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); if (!(this instanceof GlobSync)) return new GlobSync(pattern, options2); setopts(this, pattern, options2); if (this.noprocess) return this; var n = this.minimatch.set.length; this.matches = new Array(n); for (var i = 0; i < n; i++) { this._process(this.minimatch.set[i], i, false); } this._finish(); } GlobSync.prototype._finish = function() { assert.ok(this instanceof GlobSync); if (this.realpath) { var self2 = this; this.matches.forEach(function(matchset, index) { var set = self2.matches[index] = /* @__PURE__ */ Object.create(null); for (var p in matchset) { try { p = self2._makeAbs(p); var real = rp.realpathSync(p, self2.realpathCache); set[real] = true; } catch (er) { if (er.syscall === "stat") set[self2._makeAbs(p)] = true; else throw er; } } }); } common.finish(this); }; GlobSync.prototype._process = function(pattern, index, inGlobStar) { assert.ok(this instanceof GlobSync); var n = 0; while (typeof pattern[n] === "string") { n++; } var prefix; switch (n) { case pattern.length: this._processSimple(pattern.join("/"), index); return; case 0: prefix = null; break; default: prefix = pattern.slice(0, n).join("/"); break; } var remain = pattern.slice(n); var read; if (prefix === null) read = "."; else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { return typeof p === "string" ? p : "[*]"; }).join("/"))) { if (!prefix || !isAbsolute(prefix)) prefix = "/" + prefix; read = prefix; } else read = prefix; var abs = this._makeAbs(read); if (childrenIgnored(this, read)) return; var isGlobStar = remain[0] === minimatch.GLOBSTAR; if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); else this._processReaddir(prefix, read, abs, remain, index, inGlobStar); }; GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { var entries = this._readdir(abs, inGlobStar); if (!entries) return; var pn = remain[0]; var negate = !!this.minimatch.negate; var rawGlob = pn._glob; var dotOk = this.dot || rawGlob.charAt(0) === "."; var matchedEntries = []; for (var i = 0; i < entries.length; i++) { var e = entries[i]; if (e.charAt(0) !== "." || dotOk) { var m; if (negate && !prefix) { m = !e.match(pn); } else { m = e.match(pn); } if (m) matchedEntries.push(e); } } var len = matchedEntries.length; if (len === 0) return; if (remain.length === 1 && !this.mark && !this.stat) { if (!this.matches[index]) this.matches[index] = /* @__PURE__ */ Object.create(null); for (var i = 0; i < len; i++) { var e = matchedEntries[i]; if (prefix) { if (prefix.slice(-1) !== "/") e = prefix + "/" + e; else e = prefix + e; } if (e.charAt(0) === "/" && !this.nomount) { e = path.join(this.root, e); } this._emitMatch(index, e); } return; } remain.shift(); for (var i = 0; i < len; i++) { var e = matchedEntries[i]; var newPattern; if (prefix) newPattern = [prefix, e]; else newPattern = [e]; this._process(newPattern.concat(remain), index, inGlobStar); } }; GlobSync.prototype._emitMatch = function(index, e) { if (isIgnored(this, e)) return; var abs = this._makeAbs(e); if (this.mark) e = this._mark(e); if (this.absolute) { e = abs; } if (this.matches[index][e]) return; if (this.nodir) { var c = this.cache[abs]; if (c === "DIR" || Array.isArray(c)) return; } this.matches[index][e] = true; if (this.stat) this._stat(e); }; GlobSync.prototype._readdirInGlobStar = function(abs) { if (this.follow) return this._readdir(abs, false); var entries; var lstat; var stat; try { lstat = this.fs.lstatSync(abs); } catch (er) { if (er.code === "ENOENT") { return null; } } var isSym = lstat && lstat.isSymbolicLink(); this.symlinks[abs] = isSym; if (!isSym && lstat && !lstat.isDirectory()) this.cache[abs] = "FILE"; else entries = this._readdir(abs, false); return entries; }; GlobSync.prototype._readdir = function(abs, inGlobStar) { var entries; if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs); if (ownProp(this.cache, abs)) { var c = this.cache[abs]; if (!c || c === "FILE") return null; if (Array.isArray(c)) return c; } try { return this._readdirEntries(abs, this.fs.readdirSync(abs)); } catch (er) { this._readdirError(abs, er); return null; } }; GlobSync.prototype._readdirEntries = function(abs, entries) { if (!this.mark && !this.stat) { for (var i = 0; i < entries.length; i++) { var e = entries[i]; if (abs === "/") e = abs + e; else e = abs + "/" + e; this.cache[e] = true; } } this.cache[abs] = entries; return entries; }; GlobSync.prototype._readdirError = function(f, er) { switch (er.code) { case "ENOTSUP": case "ENOTDIR": var abs = this._makeAbs(f); this.cache[abs] = "FILE"; if (abs === this.cwdAbs) { var error = new Error(er.code + " invalid cwd " + this.cwd); error.path = this.cwd; error.code = er.code; throw error; } break; case "ENOENT": case "ELOOP": case "ENAMETOOLONG": case "UNKNOWN": this.cache[this._makeAbs(f)] = false; break; default: this.cache[this._makeAbs(f)] = false; if (this.strict) throw er; if (!this.silent) console.error("glob error", er); break; } }; GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { var entries = this._readdir(abs, inGlobStar); if (!entries) return; var remainWithoutGlobStar = remain.slice(1); var gspref = prefix ? [prefix] : []; var noGlobStar = gspref.concat(remainWithoutGlobStar); this._process(noGlobStar, index, false); var len = entries.length; var isSym = this.symlinks[abs]; if (isSym && inGlobStar) return; for (var i = 0; i < len; i++) { var e = entries[i]; if (e.charAt(0) === "." && !this.dot) continue; var instead = gspref.concat(entries[i], remainWithoutGlobStar); this._process(instead, index, true); var below = gspref.concat(entries[i], remain); this._process(below, index, true); } }; GlobSync.prototype._processSimple = function(prefix, index) { var exists = this._stat(prefix); if (!this.matches[index]) this.matches[index] = /* @__PURE__ */ Object.create(null); if (!exists) return; if (prefix && isAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix); if (prefix.charAt(0) === "/") { prefix = path.join(this.root, prefix); } else { prefix = path.resolve(this.root, prefix); if (trail) prefix += "/"; } } if (process.platform === "win32") prefix = prefix.replace(/\\/g, "/"); this._emitMatch(index, prefix); }; GlobSync.prototype._stat = function(f) { var abs = this._makeAbs(f); var needDir = f.slice(-1) === "/"; if (f.length > this.maxLength) return false; if (!this.stat && ownProp(this.cache, abs)) { var c = this.cache[abs]; if (Array.isArray(c)) c = "DIR"; if (!needDir || c === "DIR") return c; if (needDir && c === "FILE") return false; } var exists; var stat = this.statCache[abs]; if (!stat) { var lstat; try { lstat = this.fs.lstatSync(abs); } catch (er) { if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { this.statCache[abs] = false; return false; } } if (lstat && lstat.isSymbolicLink()) { try { stat = this.fs.statSync(abs); } catch (er) { stat = lstat; } } else { stat = lstat; } } this.statCache[abs] = stat; var c = true; if (stat) c = stat.isDirectory() ? "DIR" : "FILE"; this.cache[abs] = this.cache[abs] || c; if (needDir && c === "FILE") return false; return c; }; GlobSync.prototype._mark = function(p) { return common.mark(this, p); }; GlobSync.prototype._makeAbs = function(f) { return common.makeAbs(this, f); }; } }); // node_modules/wrappy/wrappy.js var require_wrappy = __commonJS({ "node_modules/wrappy/wrappy.js"(exports2, module2) { module2.exports = wrappy; function wrappy(fn, cb) { if (fn && cb) return wrappy(fn)(cb); if (typeof fn !== "function") throw new TypeError("need wrapper function"); Object.keys(fn).forEach(function(k) { wrapper[k] = fn[k]; }); return wrapper; function wrapper() { var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } var ret = fn.apply(this, args); var cb2 = args[args.length - 1]; if (typeof ret === "function" && ret !== cb2) { Object.keys(cb2).forEach(function(k) { ret[k] = cb2[k]; }); } return ret; } } } }); // node_modules/once/once.js var require_once = __commonJS({ "node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { return once(this); }, configurable: true }); Object.defineProperty(Function.prototype, "onceStrict", { value: function() { return onceStrict(this); }, configurable: true }); }); function once(fn) { var f = function() { if (f.called) return f.value; f.called = true; return f.value = fn.apply(this, arguments); }; f.called = false; return f; } function onceStrict(fn) { var f = function() { if (f.called) throw new Error(f.onceError); f.called = true; return f.value = fn.apply(this, arguments); }; var name = fn.name || "Function wrapped with `once`"; f.onceError = name + " shouldn't be called more than once"; f.called = false; return f; } } }); // node_modules/inflight/inflight.js var require_inflight = __commonJS({ "node_modules/inflight/inflight.js"(exports2, module2) { var wrappy = require_wrappy(); var reqs = /* @__PURE__ */ Object.create(null); var once = require_once(); module2.exports = wrappy(inflight); function inflight(key, cb) { if (reqs[key]) { reqs[key].push(cb); return null; } else { reqs[key] = [cb]; return makeres(key); } } function makeres(key) { return once(function RES() { var cbs = reqs[key]; var len = cbs.length; var args = slice(arguments); try { for (var i = 0; i < len; i++) { cbs[i].apply(null, args); } } finally { if (cbs.length > len) { cbs.splice(0, len); process.nextTick(function() { RES.apply(null, args); }); } else { delete reqs[key]; } } }); } function slice(args) { var length = args.length; var array = []; for (var i = 0; i < length; i++) array[i] = args[i]; return array; } } }); // node_modules/glob/glob.js var require_glob = __commonJS({ "node_modules/glob/glob.js"(exports2, module2) { module2.exports = glob; var rp = require_fs(); var minimatch = require_minimatch(); var Minimatch = minimatch.Minimatch; var inherits = require_inherits_browser(); var EE = require("events").EventEmitter; var path = require("path"); var assert = require("assert"); var isAbsolute = require_path_is_absolute(); var globSync = require_sync2(); var common = require_common2(); var setopts = common.setopts; var ownProp = common.ownProp; var inflight = require_inflight(); var util = require("util"); var childrenIgnored = common.childrenIgnored; var isIgnored = common.isIgnored; var once = require_once(); function glob(pattern, options2, cb) { if (typeof options2 === "function") cb = options2, options2 = {}; if (!options2) options2 = {}; if (options2.sync) { if (cb) throw new TypeError("callback provided to sync glob"); return globSync(pattern, options2); } return new Glob(pattern, options2, cb); } glob.sync = globSync; var GlobSync = glob.GlobSync = globSync.GlobSync; glob.glob = glob; function extend(origin, add) { if (add === null || typeof add !== "object") { return origin; } var keys = Object.keys(add); var i = keys.length; while (i--) { origin[keys[i]] = add[keys[i]]; } return origin; } glob.hasMagic = function(pattern, options_) { var options2 = extend({}, options_); options2.noprocess = true; var g = new Glob(pattern, options2); var set = g.minimatch.set; if (!pattern) return false; if (set.length > 1) return true; for (var j = 0; j < set[0].length; j++) { if (typeof set[0][j] !== "string") return true; } return false; }; glob.Glob = Glob; inherits(Glob, EE); function Glob(pattern, options2, cb) { if (typeof options2 === "function") { cb = options2; options2 = null; } if (options2 && options2.sync) { if (cb) throw new TypeError("callback provided to sync glob"); return new GlobSync(pattern, options2); } if (!(this instanceof Glob)) return new Glob(pattern, options2, cb); setopts(this, pattern, options2); this._didRealPath = false; var n = this.minimatch.set.length; this.matches = new Array(n); if (typeof cb === "function") { cb = once(cb); this.on("error", cb); this.on("end", function(matches) { cb(null, matches); }); } var self2 = this; this._processing = 0; this._emitQueue = []; this._processQueue = []; this.paused = false; if (this.noprocess) return this; if (n === 0) return done(); var sync = true; for (var i = 0; i < n; i++) { this._process(this.minimatch.set[i], i, false, done); } sync = false; function done() { --self2._processing; if (self2._processing <= 0) { if (sync) { process.nextTick(function() { self2._finish(); }); } else { self2._finish(); } } } } Glob.prototype._finish = function() { assert(this instanceof Glob); if (this.aborted) return; if (this.realpath && !this._didRealpath) return this._realpath(); common.finish(this); this.emit("end", this.found); }; Glob.prototype._realpath = function() { if (this._didRealpath) return; this._didRealpath = true; var n = this.matches.length; if (n === 0) return this._finish(); var self2 = this; for (var i = 0; i < this.matches.length; i++) this._realpathSet(i, next); function next() { if (--n === 0) self2._finish(); } }; Glob.prototype._realpathSet = function(index, cb) { var matchset = this.matches[index]; if (!matchset) return cb(); var found = Object.keys(matchset); var self2 = this; var n = found.length; if (n === 0) return cb(); var set = this.matches[index] = /* @__PURE__ */ Object.create(null); found.forEach(function(p, i) { p = self2._makeAbs(p); rp.realpath(p, self2.realpathCache, function(er, real) { if (!er) set[real] = true; else if (er.syscall === "stat") set[p] = true; else self2.emit("error", er); if (--n === 0) { self2.matches[index] = set; cb(); } }); }); }; Glob.prototype._mark = function(p) { return common.mark(this, p); }; Glob.prototype._makeAbs = function(f) { return common.makeAbs(this, f); }; Glob.prototype.abort = function() { this.aborted = true; this.emit("abort"); }; Glob.prototype.pause = function() { if (!this.paused) { this.paused = true; this.emit("pause"); } }; Glob.prototype.resume = function() { if (this.paused) { this.emit("resume"); this.paused = false; if (this._emitQueue.length) { var eq = this._emitQueue.slice(0); this._emitQueue.length = 0; for (var i = 0; i < eq.length; i++) { var e = eq[i]; this._emitMatch(e[0], e[1]); } } if (this._processQueue.length) { var pq = this._processQueue.slice(0); this._processQueue.length = 0; for (var i = 0; i < pq.length; i++) { var p = pq[i]; this._processing--; this._process(p[0], p[1], p[2], p[3]); } } } }; Glob.prototype._process = function(pattern, index, inGlobStar, cb) { assert(this instanceof Glob); assert(typeof cb === "function"); if (this.aborted) return; this._processing++; if (this.paused) { this._processQueue.push([pattern, index, inGlobStar, cb]); return; } var n = 0; while (typeof pattern[n] === "string") { n++; } var prefix; switch (n) { case pattern.length: this._processSimple(pattern.join("/"), index, cb); return; case 0: prefix = null; break; default: prefix = pattern.slice(0, n).join("/"); break; } var remain = pattern.slice(n); var read; if (prefix === null) read = "."; else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { return typeof p === "string" ? p : "[*]"; }).join("/"))) { if (!prefix || !isAbsolute(prefix)) prefix = "/" + prefix; read = prefix; } else read = prefix; var abs = this._makeAbs(read); if (childrenIgnored(this, read)) return cb(); var isGlobStar = remain[0] === minimatch.GLOBSTAR; if (isGlobStar) this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); else this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); }; Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { var self2 = this; this._readdir(abs, inGlobStar, function(er, entries) { return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); }); }; Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { if (!entries) return cb(); var pn = remain[0]; var negate = !!this.minimatch.negate; var rawGlob = pn._glob; var dotOk = this.dot || rawGlob.charAt(0) === "."; var matchedEntries = []; for (var i = 0; i < entries.length; i++) { var e = entries[i]; if (e.charAt(0) !== "." || dotOk) { var m; if (negate && !prefix) { m = !e.match(pn); } else { m = e.match(pn); } if (m) matchedEntries.push(e); } } var len = matchedEntries.length; if (len === 0) return cb(); if (remain.length === 1 && !this.mark && !this.stat) { if (!this.matches[index]) this.matches[index] = /* @__PURE__ */ Object.create(null); for (var i = 0; i < len; i++) { var e = matchedEntries[i]; if (prefix) { if (prefix !== "/") e = prefix + "/" + e; else e = prefix + e; } if (e.charAt(0) === "/" && !this.nomount) { e = path.join(this.root, e); } this._emitMatch(index, e); } return cb(); } remain.shift(); for (var i = 0; i < len; i++) { var e = matchedEntries[i]; var newPattern; if (prefix) { if (prefix !== "/") e = prefix + "/" + e; else e = prefix + e; } this._process([e].concat(remain), index, inGlobStar, cb); } cb(); }; Glob.prototype._emitMatch = function(index, e) { if (this.aborted) return; if (isIgnored(this, e)) return; if (this.paused) { this._emitQueue.push([index, e]); return; } var abs = isAbsolute(e) ? e : this._makeAbs(e); if (this.mark) e = this._mark(e); if (this.absolute) e = abs; if (this.matches[index][e]) return; if (this.nodir) { var c = this.cache[abs]; if (c === "DIR" || Array.isArray(c)) return; } this.matches[index][e] = true; var st = this.statCache[abs]; if (st) this.emit("stat", e, st); this.emit("match", e); }; Glob.prototype._readdirInGlobStar = function(abs, cb) { if (this.aborted) return; if (this.follow) return this._readdir(abs, false, cb); var lstatkey = "lstat\0" + abs; var self2 = this; var lstatcb = inflight(lstatkey, lstatcb_); if (lstatcb) self2.fs.lstat(abs, lstatcb); function lstatcb_(er, lstat) { if (er && er.code === "ENOENT") return cb(); var isSym = lstat && lstat.isSymbolicLink(); self2.symlinks[abs] = isSym; if (!isSym && lstat && !lstat.isDirectory()) { self2.cache[abs] = "FILE"; cb(); } else self2._readdir(abs, false, cb); } }; Glob.prototype._readdir = function(abs, inGlobStar, cb) { if (this.aborted) return; cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); if (!cb) return; if (inGlobStar && !ownProp(this.symlinks, abs)) return this._readdirInGlobStar(abs, cb); if (ownProp(this.cache, abs)) { var c = this.cache[abs]; if (!c || c === "FILE") return cb(); if (Array.isArray(c)) return cb(null, c); } var self2 = this; self2.fs.readdir(abs, readdirCb(this, abs, cb)); }; function readdirCb(self2, abs, cb) { return function(er, entries) { if (er) self2._readdirError(abs, er, cb); else self2._readdirEntries(abs, entries, cb); }; } Glob.prototype._readdirEntries = function(abs, entries, cb) { if (this.aborted) return; if (!this.mark && !this.stat) { for (var i = 0; i < entries.length; i++) { var e = entries[i]; if (abs === "/") e = abs + e; else e = abs + "/" + e; this.cache[e] = true; } } this.cache[abs] = entries; return cb(null, entries); }; Glob.prototype._readdirError = function(f, er, cb) { if (this.aborted) return; switch (er.code) { case "ENOTSUP": case "ENOTDIR": var abs = this._makeAbs(f); this.cache[abs] = "FILE"; if (abs === this.cwdAbs) { var error = new Error(er.code + " invalid cwd " + this.cwd); error.path = this.cwd; error.code = er.code; this.emit("error", error); this.abort(); } break; case "ENOENT": case "ELOOP": case "ENAMETOOLONG": case "UNKNOWN": this.cache[this._makeAbs(f)] = false; break; default: this.cache[this._makeAbs(f)] = false; if (this.strict) { this.emit("error", er); this.abort(); } if (!this.silent) console.error("glob error", er); break; } return cb(); }; Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { var self2 = this; this._readdir(abs, inGlobStar, function(er, entries) { self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); }); }; Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { if (!entries) return cb(); var remainWithoutGlobStar = remain.slice(1); var gspref = prefix ? [prefix] : []; var noGlobStar = gspref.concat(remainWithoutGlobStar); this._process(noGlobStar, index, false, cb); var isSym = this.symlinks[abs]; var len = entries.length; if (isSym && inGlobStar) return cb(); for (var i = 0; i < len; i++) { var e = entries[i]; if (e.charAt(0) === "." && !this.dot) continue; var instead = gspref.concat(entries[i], remainWithoutGlobStar); this._process(instead, index, true, cb); var below = gspref.concat(entries[i], remain); this._process(below, index, true, cb); } cb(); }; Glob.prototype._processSimple = function(prefix, index, cb) { var self2 = this; this._stat(prefix, function(er, exists) { self2._processSimple2(prefix, index, er, exists, cb); }); }; Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { if (!this.matches[index]) this.matches[index] = /* @__PURE__ */ Object.create(null); if (!exists) return cb(); if (prefix && isAbsolute(prefix) && !this.nomount) { var trail = /[\/\\]$/.test(prefix); if (prefix.charAt(0) === "/") { prefix = path.join(this.root, prefix); } else { prefix = path.resolve(this.root, prefix); if (trail) prefix += "/"; } } if (process.platform === "win32") prefix = prefix.replace(/\\/g, "/"); this._emitMatch(index, prefix); cb(); }; Glob.prototype._stat = function(f, cb) { var abs = this._makeAbs(f); var needDir = f.slice(-1) === "/"; if (f.length > this.maxLength) return cb(); if (!this.stat && ownProp(this.cache, abs)) { var c = this.cache[abs]; if (Array.isArray(c)) c = "DIR"; if (!needDir || c === "DIR") return cb(null, c); if (needDir && c === "FILE") return cb(); } var exists; var stat = this.statCache[abs]; if (stat !== void 0) { if (stat === false) return cb(null, stat); else { var type = stat.isDirectory() ? "DIR" : "FILE"; if (needDir && type === "FILE") return cb(); else return cb(null, type, stat); } } var self2 = this; var statcb = inflight("stat\0" + abs, lstatcb_); if (statcb) self2.fs.lstat(abs, statcb); function lstatcb_(er, lstat) { if (lstat && lstat.isSymbolicLink()) { return self2.fs.stat(abs, function(er2, stat2) { if (er2) self2._stat2(f, abs, null, lstat, cb); else self2._stat2(f, abs, er2, stat2, cb); }); } else { self2._stat2(f, abs, er, lstat, cb); } } }; Glob.prototype._stat2 = function(f, abs, er, stat, cb) { if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { this.statCache[abs] = false; return cb(); } var needDir = f.slice(-1) === "/"; this.statCache[abs] = stat; if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) return cb(null, false, stat); var c = true; if (stat) c = stat.isDirectory() ? "DIR" : "FILE"; this.cache[abs] = this.cache[abs] || c; if (needDir && c === "FILE") return cb(); return cb(null, c, stat); }; } }); // node_modules/rimraf/rimraf.js var require_rimraf = __commonJS({ "node_modules/rimraf/rimraf.js"(exports2, module2) { var assert = require("assert"); var path = require("path"); var fs = require("fs"); var glob = void 0; try { glob = require_glob(); } catch (_err) { } var defaultGlobOpts = { nosort: true, silent: true }; var timeout = 0; var isWindows = process.platform === "win32"; var defaults = (options2) => { const methods = [ "unlink", "chmod", "stat", "lstat", "rmdir", "readdir" ]; methods.forEach((m) => { options2[m] = options2[m] || fs[m]; m = m + "Sync"; options2[m] = options2[m] || fs[m]; }); options2.maxBusyTries = options2.maxBusyTries || 3; options2.emfileWait = options2.emfileWait || 1e3; if (options2.glob === false) { options2.disableGlob = true; } if (options2.disableGlob !== true && glob === void 0) { throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); } options2.disableGlob = options2.disableGlob || false; options2.glob = options2.glob || defaultGlobOpts; }; var rimraf = (p, options2, cb) => { if (typeof options2 === "function") { cb = options2; options2 = {}; } assert(p, "rimraf: missing path"); assert.equal(typeof p, "string", "rimraf: path should be a string"); assert.equal(typeof cb, "function", "rimraf: callback function required"); assert(options2, "rimraf: invalid options argument provided"); assert.equal(typeof options2, "object", "rimraf: options should be object"); defaults(options2); let busyTries = 0; let errState = null; let n = 0; const next = (er) => { errState = errState || er; if (--n === 0) cb(errState); }; const afterGlob = (er, results) => { if (er) return cb(er); n = results.length; if (n === 0) return cb(); results.forEach((p2) => { const CB = (er2) => { if (er2) { if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options2.maxBusyTries) { busyTries++; return setTimeout(() => rimraf_(p2, options2, CB), busyTries * 100); } if (er2.code === "EMFILE" && timeout < options2.emfileWait) { return setTimeout(() => rimraf_(p2, options2, CB), timeout++); } if (er2.code === "ENOENT") er2 = null; } timeout = 0; next(er2); }; rimraf_(p2, options2, CB); }); }; if (options2.disableGlob || !glob.hasMagic(p)) return afterGlob(null, [p]); options2.lstat(p, (er, stat) => { if (!er) return afterGlob(null, [p]); glob(p, options2.glob, afterGlob); }); }; var rimraf_ = (p, options2, cb) => { assert(p); assert(options2); assert(typeof cb === "function"); options2.lstat(p, (er, st) => { if (er && er.code === "ENOENT") return cb(null); if (er && er.code === "EPERM" && isWindows) fixWinEPERM(p, options2, er, cb); if (st && st.isDirectory()) return rmdir(p, options2, er, cb); options2.unlink(p, (er2) => { if (er2) { if (er2.code === "ENOENT") return cb(null); if (er2.code === "EPERM") return isWindows ? fixWinEPERM(p, options2, er2, cb) : rmdir(p, options2, er2, cb); if (er2.code === "EISDIR") return rmdir(p, options2, er2, cb); } return cb(er2); }); }); }; var fixWinEPERM = (p, options2, er, cb) => { assert(p); assert(options2); assert(typeof cb === "function"); options2.chmod(p, 438, (er2) => { if (er2) cb(er2.code === "ENOENT" ? null : er); else options2.stat(p, (er3, stats) => { if (er3) cb(er3.code === "ENOENT" ? null : er); else if (stats.isDirectory()) rmdir(p, options2, er, cb); else options2.unlink(p, cb); }); }); }; var fixWinEPERMSync = (p, options2, er) => { assert(p); assert(options2); try { options2.chmodSync(p, 438); } catch (er2) { if (er2.code === "ENOENT") return; else throw er; } let stats; try { stats = options2.statSync(p); } catch (er3) { if (er3.code === "ENOENT") return; else throw er; } if (stats.isDirectory()) rmdirSync(p, options2, er); else options2.unlinkSync(p); }; var rmdir = (p, options2, originalEr, cb) => { assert(p); assert(options2); assert(typeof cb === "function"); options2.rmdir(p, (er) => { if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) rmkids(p, options2, cb); else if (er && er.code === "ENOTDIR") cb(originalEr); else cb(er); }); }; var rmkids = (p, options2, cb) => { assert(p); assert(options2); assert(typeof cb === "function"); options2.readdir(p, (er, files2) => { if (er) return cb(er); let n = files2.length; if (n === 0) return options2.rmdir(p, cb); let errState; files2.forEach((f) => { rimraf(path.join(p, f), options2, (er2) => { if (errState) return; if (er2) return cb(errState = er2); if (--n === 0) options2.rmdir(p, cb); }); }); }); }; var rimrafSync = (p, options2) => { options2 = options2 || {}; defaults(options2); assert(p, "rimraf: missing path"); assert.equal(typeof p, "string", "rimraf: path should be a string"); assert(options2, "rimraf: missing options"); assert.equal(typeof options2, "object", "rimraf: options should be object"); let results; if (options2.disableGlob || !glob.hasMagic(p)) { results = [p]; } else { try { options2.lstatSync(p); results = [p]; } catch (er) { results = glob.sync(p, options2.glob); } } if (!results.length) return; for (let i = 0; i < results.length; i++) { const p2 = results[i]; let st; try { st = options2.lstatSync(p2); } catch (er) { if (er.code === "ENOENT") return; if (er.code === "EPERM" && isWindows) fixWinEPERMSync(p2, options2, er); } try { if (st && st.isDirectory()) rmdirSync(p2, options2, null); else options2.unlinkSync(p2); } catch (er) { if (er.code === "ENOENT") return; if (er.code === "EPERM") return isWindows ? fixWinEPERMSync(p2, options2, er) : rmdirSync(p2, options2, er); if (er.code !== "EISDIR") throw er; rmdirSync(p2, options2, er); } } }; var rmdirSync = (p, options2, originalEr) => { assert(p); assert(options2); try { options2.rmdirSync(p); } catch (er) { if (er.code === "ENOENT") return; if (er.code === "ENOTDIR") throw originalEr; if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") rmkidsSync(p, options2); } }; var rmkidsSync = (p, options2) => { assert(p); assert(options2); options2.readdirSync(p).forEach((f) => rimrafSync(path.join(p, f), options2)); const retries = isWindows ? 100 : 1; let i = 0; do { let threw = true; try { const ret = options2.rmdirSync(p, options2); threw = false; return ret; } finally { if (++i < retries && threw) continue; } } while (true); }; module2.exports = rimraf; rimraf.sync = rimrafSync; } }); // node_modules/tmp/lib/tmp.js var require_tmp = __commonJS({ "node_modules/tmp/lib/tmp.js"(exports2, module2) { var fs = require("fs"); var os = require("os"); var path = require("path"); var crypto2 = require("crypto"); var _c = { fs: fs.constants, os: os.constants }; var rimraf = require_rimraf(); var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; var DEFAULT_TRIES = 3; var CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR); var IS_WIN32 = os.platform() === "win32"; var EBADF = _c.EBADF || _c.os.errno.EBADF; var ENOENT = _c.ENOENT || _c.os.errno.ENOENT; var DIR_MODE = 448; var FILE_MODE = 384; var EXIT = "exit"; var _removeObjects = []; var FN_RMDIR_SYNC = fs.rmdirSync.bind(fs); var FN_RIMRAF_SYNC = rimraf.sync; var _gracefulCleanup = false; function tmpName(options2, callback) { const args = _parseArguments(options2, callback), opts = args[0], cb = args[1]; try { _assertAndSanitizeOptions(opts); } catch (err) { return cb(err); } let tries = opts.tries; (function _getUniqueName() { try { const name = _generateTmpName(opts); fs.stat(name, function(err) { if (!err) { if (tries-- > 0) return _getUniqueName(); return cb(new Error("Could not get a unique tmp filename, max tries reached " + name)); } cb(null, name); }); } catch (err) { cb(err); } })(); } function tmpNameSync(options2) { const args = _parseArguments(options2), opts = args[0]; _assertAndSanitizeOptions(opts); let tries = opts.tries; do { const name = _generateTmpName(opts); try { fs.statSync(name); } catch (e) { return name; } } while (tries-- > 0); throw new Error("Could not get a unique tmp filename, max tries reached"); } function file(options2, callback) { const args = _parseArguments(options2, callback), opts = args[0], cb = args[1]; tmpName(opts, function _tmpNameCreated(err, name) { if (err) return cb(err); fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { if (err2) return cb(err2); if (opts.discardDescriptor) { return fs.close(fd, function _discardCallback(possibleErr) { return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false)); }); } else { const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false)); } }); }); } function fileSync(options2) { const args = _parseArguments(options2), opts = args[0]; const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; const name = tmpNameSync(opts); var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); if (opts.discardDescriptor) { fs.closeSync(fd); fd = void 0; } return { name, fd, removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true) }; } function dir(options2, callback) { const args = _parseArguments(options2, callback), opts = args[0], cb = args[1]; tmpName(opts, function _tmpNameCreated(err, name) { if (err) return cb(err); fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { if (err2) return cb(err2); cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); }); }); } function dirSync(options2) { const args = _parseArguments(options2), opts = args[0]; const name = tmpNameSync(opts); fs.mkdirSync(name, opts.mode || DIR_MODE); return { name, removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) }; } function _removeFileAsync(fdPath, next) { const _handler = function(err) { if (err && !_isENOENT(err)) { return next(err); } next(); }; if (0 <= fdPath[0]) fs.close(fdPath[0], function() { fs.unlink(fdPath[1], _handler); }); else fs.unlink(fdPath[1], _handler); } function _removeFileSync(fdPath) { let rethrownException = null; try { if (0 <= fdPath[0]) fs.closeSync(fdPath[0]); } catch (e) { if (!_isEBADF(e) && !_isENOENT(e)) throw e; } finally { try { fs.unlinkSync(fdPath[1]); } catch (e) { if (!_isENOENT(e)) rethrownException = e; } } if (rethrownException !== null) { throw rethrownException; } } function _prepareTmpFileRemoveCallback(name, fd, opts, sync) { const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync); const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync); if (!opts.keep) _removeObjects.unshift(removeCallbackSync); return sync ? removeCallbackSync : removeCallback; } function _prepareTmpDirRemoveCallback(name, opts, sync) { const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs); const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); if (!opts.keep) _removeObjects.unshift(removeCallbackSync); return sync ? removeCallbackSync : removeCallback; } function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) { let called = false; return function _cleanupCallback(next) { if (!called) { const toRemove = cleanupCallbackSync || _cleanupCallback; const index = _removeObjects.indexOf(toRemove); if (index >= 0) _removeObjects.splice(index, 1); called = true; if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) { return removeFunction(fileOrDirName); } else { return removeFunction(fileOrDirName, next || function() { }); } } }; } function _garbageCollector() { if (!_gracefulCleanup) return; while (_removeObjects.length) { try { _removeObjects[0](); } catch (e) { } } } function _randomChars(howMany) { let value = [], rnd = null; try { rnd = crypto2.randomBytes(howMany); } catch (e) { rnd = crypto2.pseudoRandomBytes(howMany); } for (var i = 0; i < howMany; i++) { value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); } return value.join(""); } function _isBlank(s) { return s === null || _isUndefined(s) || !s.trim(); } function _isUndefined(obj) { return typeof obj === "undefined"; } function _parseArguments(options2, callback) { if (typeof options2 === "function") { return [{}, options2]; } if (_isUndefined(options2)) { return [{}, callback]; } const actualOptions = {}; for (const key of Object.getOwnPropertyNames(options2)) { actualOptions[key] = options2[key]; } return [actualOptions, callback]; } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) return path.join(tmpDir, opts.dir, opts.name); if (!_isUndefined(opts.template)) return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); const name = [ opts.prefix ? opts.prefix : "tmp", "-", process.pid, "-", _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); return path.join(tmpDir, opts.dir, name); } function _assertAndSanitizeOptions(options2) { options2.tmpdir = _getTmpDir(options2); const tmpDir = options2.tmpdir; if (!_isUndefined(options2.name)) _assertIsRelative(options2.name, "name", tmpDir); if (!_isUndefined(options2.dir)) _assertIsRelative(options2.dir, "dir", tmpDir); if (!_isUndefined(options2.template)) { _assertIsRelative(options2.template, "template", tmpDir); if (!options2.template.match(TEMPLATE_PATTERN)) throw new Error(`Invalid template, found "${options2.template}".`); } if (!_isUndefined(options2.tries) && isNaN(options2.tries) || options2.tries < 0) throw new Error(`Invalid tries, found "${options2.tries}".`); options2.tries = _isUndefined(options2.name) ? options2.tries || DEFAULT_TRIES : 1; options2.keep = !!options2.keep; options2.detachDescriptor = !!options2.detachDescriptor; options2.discardDescriptor = !!options2.discardDescriptor; options2.unsafeCleanup = !!options2.unsafeCleanup; options2.dir = _isUndefined(options2.dir) ? "" : path.relative(tmpDir, _resolvePath(options2.dir, tmpDir)); options2.template = _isUndefined(options2.template) ? void 0 : path.relative(tmpDir, _resolvePath(options2.template, tmpDir)); options2.template = _isBlank(options2.template) ? void 0 : path.relative(options2.dir, options2.template); options2.name = _isUndefined(options2.name) ? void 0 : _sanitizeName(options2.name); options2.prefix = _isUndefined(options2.prefix) ? "" : options2.prefix; options2.postfix = _isUndefined(options2.postfix) ? "" : options2.postfix; } function _resolvePath(name, tmpDir) { const sanitizedName = _sanitizeName(name); if (sanitizedName.startsWith(tmpDir)) { return path.resolve(sanitizedName); } else { return path.resolve(path.join(tmpDir, sanitizedName)); } } function _sanitizeName(name) { if (_isBlank(name)) { return name; } return name.replace(/["']/g, ""); } function _assertIsRelative(name, option, tmpDir) { if (option === "name") { if (path.isAbsolute(name)) throw new Error(`${option} option must not contain an absolute path, found "${name}".`); let basename = path.basename(name); if (basename === ".." || basename === "." || basename !== name) throw new Error(`${option} option must not contain a path, found "${name}".`); } else { if (path.isAbsolute(name) && !name.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`); } let resolvedPath = _resolvePath(name, tmpDir); if (!resolvedPath.startsWith(tmpDir)) throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`); } } function _isEBADF(error) { return _isExpectedError(error, -EBADF, "EBADF"); } function _isENOENT(error) { return _isExpectedError(error, -ENOENT, "ENOENT"); } function _isExpectedError(error, errno, code) { return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno; } function setGracefulCleanup() { _gracefulCleanup = true; } function _getTmpDir(options2) { return path.resolve(_sanitizeName(options2 && options2.tmpdir || os.tmpdir())); } process.addListener(EXIT, _garbageCollector); Object.defineProperty(module2.exports, "tmpdir", { enumerable: true, configurable: false, get: function() { return _getTmpDir(); } }); module2.exports.dir = dir; module2.exports.dirSync = dirSync; module2.exports.file = file; module2.exports.fileSync = fileSync; module2.exports.tmpName = tmpName; module2.exports.tmpNameSync = tmpNameSync; module2.exports.setGracefulCleanup = setGracefulCleanup; } }); // node_modules/puppeteer-core/lib/cjs/third_party/mitt/index.js var require_mitt = __commonJS({ "node_modules/puppeteer-core/lib/cjs/third_party/mitt/index.js"(exports2, module2) { "use strict"; function mitt(n) { return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) { var i = n.get(t); i ? i.push(e) : n.set(t, [e]); }, off: function(t, e) { var i = n.get(t); i && (e ? i.splice(i.indexOf(e) >>> 0, 1) : n.set(t, [])); }, emit: function(t, e) { var i = n.get(t); i && i.slice().map(function(n2) { n2(e); }), (i = n.get("*")) && i.slice().map(function(n2) { n2(t, e); }); } }; } module2.exports = mitt; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js var require_EventEmitter = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/EventEmitter.js"(exports2) { "use strict"; var __importDefault = exports2 && exports2.__importDefault || function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EventEmitter = void 0; var index_js_1 = __importDefault(require_mitt()); var EventEmitter = class { /** * @internal */ constructor() { this.eventsMap = /* @__PURE__ */ new Map(); this.emitter = (0, index_js_1.default)(this.eventsMap); } /** * Bind an event listener to fire when an event occurs. * @param event - the event type you'd like to listen to. Can be a string or symbol. * @param handler - the function to be called when the event occurs. * @returns `this` to enable you to chain method calls. */ on(event, handler) { this.emitter.on(event, handler); return this; } /** * Remove an event listener from firing. * @param event - the event type you'd like to stop listening to. * @param handler - the function that should be removed. * @returns `this` to enable you to chain method calls. */ off(event, handler) { this.emitter.off(event, handler); return this; } /** * Remove an event listener. * @deprecated please use {@link EventEmitter.off} instead. */ removeListener(event, handler) { this.off(event, handler); return this; } /** * Add an event listener. * @deprecated please use {@link EventEmitter.on} instead. */ addListener(event, handler) { this.on(event, handler); return this; } /** * Emit an event and call any associated listeners. * * @param event - the event you'd like to emit * @param eventData - any data you'd like to emit with the event * @returns `true` if there are any listeners, `false` if there are not. */ emit(event, eventData) { this.emitter.emit(event, eventData); return this.eventListenersCount(event) > 0; } /** * Like `on` but the listener will only be fired once and then it will be removed. * @param event - the event you'd like to listen to * @param handler - the handler function to run when the event occurs * @returns `this` to enable you to chain method calls. */ once(event, handler) { const onceHandler = (eventData) => { handler(eventData); this.off(event, onceHandler); }; return this.on(event, onceHandler); } /** * Gets the number of listeners for a given event. * * @param event - the event to get the listener count for * @returns the number of listeners bound to the given event */ listenerCount(event) { return this.eventListenersCount(event); } /** * Removes all listeners. If given an event argument, it will remove only * listeners for that event. * @param event - the event to remove listeners for. * @returns `this` to enable you to chain method calls. */ removeAllListeners(event) { if (event) { this.eventsMap.delete(event); } else { this.eventsMap.clear(); } return this; } eventListenersCount(event) { var _a; return ((_a = this.eventsMap.get(event)) === null || _a === void 0 ? void 0 : _a.length) || 0; } }; exports2.EventEmitter = EventEmitter; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/api/Browser.js var require_Browser = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/api/Browser.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Browser = exports2.WEB_PERMISSION_TO_PROTOCOL_PERMISSION = void 0; var EventEmitter_js_1 = require_EventEmitter(); exports2.WEB_PERMISSION_TO_PROTOCOL_PERMISSION = /* @__PURE__ */ new Map([ ["geolocation", "geolocation"], ["midi", "midi"], ["notifications", "notifications"], // TODO: push isn't a valid type? // ['push', 'push'], ["camera", "videoCapture"], ["microphone", "audioCapture"], ["background-sync", "backgroundSync"], ["ambient-light-sensor", "sensors"], ["accelerometer", "sensors"], ["gyroscope", "sensors"], ["magnetometer", "sensors"], ["accessibility-events", "accessibilityEvents"], ["clipboard-read", "clipboardReadWrite"], ["clipboard-write", "clipboardReadWrite"], ["payment-handler", "paymentHandler"], ["persistent-storage", "durableStorage"], ["idle-detection", "idleDetection"], // chrome-specific permissions we have. ["midi-sysex", "midiSysex"] ]); var Browser = class extends EventEmitter_js_1.EventEmitter { /** * @internal */ constructor() { super(); } /** * @internal */ _attach() { throw new Error("Not implemented"); } /** * @internal */ _detach() { throw new Error("Not implemented"); } /** * @internal */ get _targets() { throw new Error("Not implemented"); } /** * The spawned browser process. Returns `null` if the browser instance was created with * {@link Puppeteer.connect}. */ process() { throw new Error("Not implemented"); } /** * @internal */ _getIsPageTargetCallback() { throw new Error("Not implemented"); } createIncognitoBrowserContext() { throw new Error("Not implemented"); } /** * Returns an array of all open browser contexts. In a newly created browser, this will * return a single instance of {@link BrowserContext}. */ browserContexts() { throw new Error("Not implemented"); } /** * Returns the default browser context. The default browser context cannot be closed. */ defaultBrowserContext() { throw new Error("Not implemented"); } _disposeContext() { throw new Error("Not implemented"); } /** * The browser websocket endpoint which can be used as an argument to * {@link Puppeteer.connect}. * * @returns The Browser websocket url. * * @remarks * * The format is `ws://${host}:${port}/devtools/browser/`. * * You can find the `webSocketDebuggerUrl` from `http://${host}:${port}/json/version`. * Learn more about the * {@link https://chromedevtools.github.io/devtools-protocol | devtools protocol} and * the {@link * https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target * | browser endpoint}. */ wsEndpoint() { throw new Error("Not implemented"); } /** * Promise which resolves to a new {@link Page} object. The Page is created in * a default browser context. */ newPage() { throw new Error("Not implemented"); } _createPageInContext() { throw new Error("Not implemented"); } /** * All active targets inside the Browser. In case of multiple browser contexts, returns * an array with all the targets in all browser contexts. */ targets() { throw new Error("Not implemented"); } /** * The target associated with the browser. */ target() { throw new Error("Not implemented"); } waitForTarget() { throw new Error("Not implemented"); } /** * An array of all open pages inside the Browser. * * @remarks * * In case of multiple browser contexts, returns an array with all the pages in all * browser contexts. Non-visible pages, such as `"background_page"`, will not be listed * here. You can find them using {@link Target.page}. */ pages() { throw new Error("Not implemented"); } /** * A string representing the browser name and version. * * @remarks * * For headless Chromium, this is similar to `HeadlessChrome/61.0.3153.0`. For * non-headless, this is similar to `Chrome/61.0.3153.0`. * * The format of browser.version() might change with future releases of Chromium. */ version() { throw new Error("Not implemented"); } /** * The browser's original user agent. Pages can override the browser user agent with * {@link Page.setUserAgent}. */ userAgent() { throw new Error("Not implemented"); } /** * Closes Chromium and all of its pages (if any were opened). The {@link Browser} object * itself is considered to be disposed and cannot be used anymore. */ close() { throw new Error("Not implemented"); } /** * Disconnects Puppeteer from the browser, but leaves the Chromium process running. * After calling `disconnect`, the {@link Browser} object is considered disposed and * cannot be used anymore. */ disconnect() { throw new Error("Not implemented"); } /** * Indicates that the browser is connected. */ isConnected() { throw new Error("Not implemented"); } }; exports2.Browser = Browser; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/api/BrowserContext.js var require_BrowserContext = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/api/BrowserContext.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.BrowserContext = void 0; var EventEmitter_js_1 = require_EventEmitter(); var BrowserContext = class extends EventEmitter_js_1.EventEmitter { /** * @internal */ constructor() { super(); } /** * An array of all active targets inside the browser context. */ targets() { throw new Error("Not implemented"); } waitForTarget() { throw new Error("Not implemented"); } /** * An array of all pages inside the browser context. * * @returns Promise which resolves to an array of all open pages. * Non visible pages, such as `"background_page"`, will not be listed here. * You can find them using {@link Target.page | the target page}. */ pages() { throw new Error("Not implemented"); } /** * Returns whether BrowserContext is incognito. * The default browser context is the only non-incognito browser context. * * @remarks * The default browser context cannot be closed. */ isIncognito() { throw new Error("Not implemented"); } overridePermissions() { throw new Error("Not implemented"); } /** * Clears all permission overrides for the browser context. * * @example * * ```ts * const context = browser.defaultBrowserContext(); * context.overridePermissions('https://example.com', ['clipboard-read']); * // do stuff .. * context.clearPermissionOverrides(); * ``` */ clearPermissionOverrides() { throw new Error("Not implemented"); } /** * Creates a new page in the browser context. */ newPage() { throw new Error("Not implemented"); } /** * The browser this browser context belongs to. */ browser() { throw new Error("Not implemented"); } /** * Closes the browser context. All the targets that belong to the browser context * will be closed. * * @remarks * Only incognito browser contexts can be closed. */ close() { throw new Error("Not implemented"); } get id() { return void 0; } }; exports2.BrowserContext = BrowserContext; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js var require_Page = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js"(exports2) { "use strict"; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _Page_handlerMap; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.unitToPixels = exports2.supportedMetrics = exports2.Page = void 0; var EventEmitter_js_1 = require_EventEmitter(); var Page = class extends EventEmitter_js_1.EventEmitter { /** * @internal */ constructor() { super(); _Page_handlerMap.set(this, /* @__PURE__ */ new WeakMap()); } /** * @returns `true` if drag events are being intercepted, `false` otherwise. */ isDragInterceptionEnabled() { throw new Error("Not implemented"); } /** * @returns `true` if the page has JavaScript enabled, `false` otherwise. */ isJavaScriptEnabled() { throw new Error("Not implemented"); } /** * Listen to page events. * * :::note * * This method exists to define event typings and handle proper wireup of * cooperative request interception. Actual event listening and dispatching is * delegated to {@link EventEmitter}. * * ::: */ on(eventName, handler) { if (eventName === "request") { const wrap2 = __classPrivateFieldGet(this, _Page_handlerMap, "f").get(handler) || ((event) => { event.enqueueInterceptAction(() => { return handler(event); }); }); __classPrivateFieldGet(this, _Page_handlerMap, "f").set(handler, wrap2); return super.on(eventName, wrap2); } return super.on(eventName, handler); } once(eventName, handler) { return super.once(eventName, handler); } off(eventName, handler) { if (eventName === "request") { handler = __classPrivateFieldGet(this, _Page_handlerMap, "f").get(handler) || handler; } return super.off(eventName, handler); } waitForFileChooser() { throw new Error("Not implemented"); } async setGeolocation() { throw new Error("Not implemented"); } /** * @returns A target this page was created from. */ target() { throw new Error("Not implemented"); } /** * Get the browser the page belongs to. */ browser() { throw new Error("Not implemented"); } /** * Get the browser context that the page belongs to. */ browserContext() { throw new Error("Not implemented"); } /** * @returns The page's main frame. * * @remarks * Page is guaranteed to have a main frame which persists during navigations. */ mainFrame() { throw new Error("Not implemented"); } get keyboard() { throw new Error("Not implemented"); } get touchscreen() { throw new Error("Not implemented"); } get coverage() { throw new Error("Not implemented"); } get tracing() { throw new Error("Not implemented"); } get accessibility() { throw new Error("Not implemented"); } /** * @returns An array of all frames attached to the page. */ frames() { throw new Error("Not implemented"); } /** * @returns all of the dedicated {@link * https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | * WebWorkers} associated with the page. * * @remarks * This does not contain ServiceWorkers */ workers() { throw new Error("Not implemented"); } async setRequestInterception() { throw new Error("Not implemented"); } async setDragInterception() { throw new Error("Not implemented"); } setOfflineMode() { throw new Error("Not implemented"); } emulateNetworkConditions() { throw new Error("Not implemented"); } setDefaultNavigationTimeout() { throw new Error("Not implemented"); } setDefaultTimeout() { throw new Error("Not implemented"); } /** * @returns Maximum time in milliseconds. */ getDefaultTimeout() { throw new Error("Not implemented"); } async $() { throw new Error("Not implemented"); } async $$() { throw new Error("Not implemented"); } async evaluateHandle() { throw new Error("Not implemented"); } async queryObjects() { throw new Error("Not implemented"); } async $eval() { throw new Error("Not implemented"); } async $$eval() { throw new Error("Not implemented"); } async $x() { throw new Error("Not implemented"); } async cookies() { throw new Error("Not implemented"); } async deleteCookie() { throw new Error("Not implemented"); } async setCookie() { throw new Error("Not implemented"); } async addScriptTag() { throw new Error("Not implemented"); } async addStyleTag() { throw new Error("Not implemented"); } async exposeFunction() { throw new Error("Not implemented"); } async authenticate() { throw new Error("Not implemented"); } async setExtraHTTPHeaders() { throw new Error("Not implemented"); } async setUserAgent() { throw new Error("Not implemented"); } /** * @returns Object containing metrics as key/value pairs. * * - `Timestamp` : The timestamp when the metrics sample was taken. * * - `Documents` : Number of documents in the page. * * - `Frames` : Number of frames in the page. * * - `JSEventListeners` : Number of events in the page. * * - `Nodes` : Number of DOM nodes in the page. * * - `LayoutCount` : Total number of full or partial page layout. * * - `RecalcStyleCount` : Total number of page style recalculations. * * - `LayoutDuration` : Combined durations of all page layouts. * * - `RecalcStyleDuration` : Combined duration of all page style * recalculations. * * - `ScriptDuration` : Combined duration of JavaScript execution. * * - `TaskDuration` : Combined duration of all tasks performed by the browser. * * - `JSHeapUsedSize` : Used JavaScript heap size. * * - `JSHeapTotalSize` : Total JavaScript heap size. * * @remarks * All timestamps are in monotonic time: monotonically increasing time * in seconds since an arbitrary point in the past. */ async metrics() { throw new Error("Not implemented"); } /** * * @returns * @remarks Shortcut for * {@link Frame.url | page.mainFrame().url()}. */ url() { throw new Error("Not implemented"); } async content() { throw new Error("Not implemented"); } async setContent() { throw new Error("Not implemented"); } async goto() { throw new Error("Not implemented"); } async reload() { throw new Error("Not implemented"); } async waitForNavigation() { throw new Error("Not implemented"); } async waitForRequest() { throw new Error("Not implemented"); } async waitForResponse() { throw new Error("Not implemented"); } async waitForNetworkIdle() { throw new Error("Not implemented"); } async waitForFrame() { throw new Error("Not implemented"); } async goBack() { throw new Error("Not implemented"); } async goForward() { throw new Error("Not implemented"); } /** * Brings page to front (activates tab). */ async bringToFront() { throw new Error("Not implemented"); } /** * Emulates a given device's metrics and user agent. * * To aid emulation, Puppeteer provides a list of known devices that can be * via {@link KnownDevices}. * * @remarks * This method is a shortcut for calling two methods: * {@link Page.setUserAgent} and {@link Page.setViewport}. * * @remarks * This method will resize the page. A lot of websites don't expect phones to * change size, so you should emulate before navigating to the page. * * @example * * ```ts * import {KnownDevices} from 'puppeteer'; * const iPhone = KnownDevices['iPhone 6']; * * (async () => { * const browser = await puppeteer.launch(); * const page = await browser.newPage(); * await page.emulate(iPhone); * await page.goto('https://www.google.com'); * // other actions... * await browser.close(); * })(); * ``` */ async emulate(device) { await Promise.all([ this.setUserAgent(device.userAgent), this.setViewport(device.viewport) ]); } async setJavaScriptEnabled() { throw new Error("Not implemented"); } async setBypassCSP() { throw new Error("Not implemented"); } async emulateMediaType() { throw new Error("Not implemented"); } async emulateCPUThrottling() { throw new Error("Not implemented"); } async emulateMediaFeatures() { throw new Error("Not implemented"); } async emulateTimezone() { throw new Error("Not implemented"); } async emulateIdleState() { throw new Error("Not implemented"); } async emulateVisionDeficiency() { throw new Error("Not implemented"); } async setViewport() { throw new Error("Not implemented"); } /** * @returns * * - `width`: page's width in pixels * * - `height`: page's height in pixels * * - `deviceScaleFactor`: Specify device scale factor (can be though of as * dpr). Defaults to `1`. * * - `isMobile`: Whether the meta viewport tag is taken into account. Defaults * to `false`. * * - `hasTouch`: Specifies if viewport supports touch events. Defaults to * `false`. * * - `isLandScape`: Specifies if viewport is in landscape mode. Defaults to * `false`. */ viewport() { throw new Error("Not implemented"); } async evaluate() { throw new Error("Not implemented"); } async evaluateOnNewDocument() { throw new Error("Not implemented"); } async setCacheEnabled() { throw new Error("Not implemented"); } async screenshot() { throw new Error("Not implemented"); } async createPDFStream() { throw new Error("Not implemented"); } async pdf() { throw new Error("Not implemented"); } /** * @returns The page's title * @remarks * Shortcut for {@link Frame.title | page.mainFrame().title()}. */ async title() { throw new Error("Not implemented"); } async close() { throw new Error("Not implemented"); } /** * Indicates that the page has been closed. * @returns */ isClosed() { throw new Error("Not implemented"); } get mouse() { throw new Error("Not implemented"); } click() { throw new Error("Not implemented"); } focus() { throw new Error("Not implemented"); } hover() { throw new Error("Not implemented"); } select() { throw new Error("Not implemented"); } tap() { throw new Error("Not implemented"); } type() { throw new Error("Not implemented"); } waitForTimeout() { throw new Error("Not implemented"); } async waitForSelector() { throw new Error("Not implemented"); } waitForXPath() { throw new Error("Not implemented"); } waitForFunction() { throw new Error("Not implemented"); } }; exports2.Page = Page; _Page_handlerMap = /* @__PURE__ */ new WeakMap(); exports2.supportedMetrics = /* @__PURE__ */ new Set([ "Timestamp", "Documents", "Frames", "JSEventListeners", "Nodes", "LayoutCount", "RecalcStyleCount", "LayoutDuration", "RecalcStyleDuration", "ScriptDuration", "TaskDuration", "JSHeapUsedSize", "JSHeapTotalSize" ]); exports2.unitToPixels = { px: 1, in: 96, cm: 37.8, mm: 3.78 }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/api/JSHandle.js var require_JSHandle = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/api/JSHandle.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.JSHandle = void 0; var JSHandle = class { /** * @internal */ constructor() { } /** * @internal */ get disposed() { throw new Error("Not implemented"); } /** * @internal */ executionContext() { throw new Error("Not implemented"); } /** * @internal */ get client() { throw new Error("Not implemented"); } async evaluate() { throw new Error("Not implemented"); } async evaluateHandle() { throw new Error("Not implemented"); } async getProperty() { throw new Error("Not implemented"); } /** * Gets a map of handles representing the properties of the current handle. * * @example * * ```ts * const listHandle = await page.evaluateHandle(() => document.body.children); * const properties = await listHandle.getProperties(); * const children = []; * for (const property of properties.values()) { * const element = property.asElement(); * if (element) { * children.push(element); * } * } * children; // holds elementHandles to all children of document.body * ``` */ async getProperties() { throw new Error("Not implemented"); } /** * @returns A vanilla object representing the serializable portions of the * referenced object. * @throws Throws if the object cannot be serialized due to circularity. * * @remarks * If the object has a `toJSON` function, it **will not** be called. */ async jsonValue() { throw new Error("Not implemented"); } /** * @returns Either `null` or the handle itself if the handle is an * instance of {@link ElementHandle}. */ asElement() { throw new Error("Not implemented"); } /** * Releases the object referenced by the handle for garbage collection. */ async dispose() { throw new Error("Not implemented"); } /** * Returns a string representation of the JSHandle. * * @remarks * Useful during debugging. */ toString() { throw new Error("Not implemented"); } /** * @internal */ get id() { throw new Error("Not implemented"); } /** * Provides access to the * [Protocol.Runtime.RemoteObject](https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject) * backing this handle. */ remoteObject() { throw new Error("Not implemented"); } }; exports2.JSHandle = JSHandle; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.js var require_ElementHandle = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/api/ElementHandle.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ElementHandle = void 0; var JSHandle_js_1 = require_JSHandle(); var ElementHandle = class extends JSHandle_js_1.JSHandle { /** * @internal */ constructor() { super(); } /** * @internal */ executionContext() { throw new Error("Not implemented"); } /** * @internal */ get client() { throw new Error("Not implemented"); } get frame() { throw new Error("Not implemented"); } async $() { throw new Error("Not implemented"); } async $$() { throw new Error("Not implemented"); } async $eval() { throw new Error("Not implemented"); } async $$eval() { throw new Error("Not implemented"); } async $x() { throw new Error("Not implemented"); } async waitForSelector() { throw new Error("Not implemented"); } async waitForXPath() { throw new Error("Not implemented"); } async toElement() { throw new Error("Not implemented"); } asElement() { return this; } /** * Resolves to the content frame for element handles referencing * iframe nodes, or null otherwise */ async contentFrame() { throw new Error("Not implemented"); } async clickablePoint() { throw new Error("Not implemented"); } /** * This method scrolls element into view if needed, and then * uses {@link Page.mouse} to hover over the center of the element. * If the element is detached from DOM, the method throws an error. */ async hover() { throw new Error("Not implemented"); } async click() { throw new Error("Not implemented"); } async drag() { throw new Error("Not implemented"); } async dragEnter() { throw new Error("Not implemented"); } async dragOver() { throw new Error("Not implemented"); } async drop() { throw new Error("Not implemented"); } async dragAndDrop() { throw new Error("Not implemented"); } async select() { throw new Error("Not implemented"); } async uploadFile() { throw new Error("Not implemented"); } /** * This method scrolls element into view if needed, and then uses * {@link Touchscreen.tap} to tap in the center of the element. * If the element is detached from DOM, the method throws an error. */ async tap() { throw new Error("Not implemented"); } async touchStart() { throw new Error("Not implemented"); } async touchMove() { throw new Error("Not implemented"); } async touchEnd() { throw new Error("Not implemented"); } /** * Calls {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus | focus} on the element. */ async focus() { throw new Error("Not implemented"); } async type() { throw new Error("Not implemented"); } async press() { throw new Error("Not implemented"); } /** * This method returns the bounding box of the element (relative to the main frame), * or `null` if the element is not visible. */ async boundingBox() { throw new Error("Not implemented"); } /** * This method returns boxes of the element, or `null` if the element is not visible. * * @remarks * * Boxes are represented as an array of points; * Each Point is an object `{x, y}`. Box points are sorted clock-wise. */ async boxModel() { throw new Error("Not implemented"); } async screenshot() { throw new Error("Not implemented"); } async isIntersectingViewport() { throw new Error("Not implemented"); } }; exports2.ElementHandle = ElementHandle; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/api/api.js var require_api = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/api/api.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); }; Object.defineProperty(exports2, "__esModule", { value: true }); __exportStar(require_Browser(), exports2); __exportStar(require_BrowserContext(), exports2); __exportStar(require_Page(), exports2); __exportStar(require_JSHandle(), exports2); __exportStar(require_ElementHandle(), exports2); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/Accessibility.js var require_Accessibility = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/Accessibility.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _Accessibility_client; var _AXNode_instances; var _AXNode_richlyEditable; var _AXNode_editable; var _AXNode_focusable; var _AXNode_hidden; var _AXNode_name; var _AXNode_role; var _AXNode_ignored; var _AXNode_cachedHasFocusableChild; var _AXNode_isPlainTextField; var _AXNode_isTextOnlyObject; var _AXNode_hasFocusableChild; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Accessibility = void 0; var Accessibility = class { /** * @internal */ constructor(client) { _Accessibility_client.set(this, void 0); __classPrivateFieldSet(this, _Accessibility_client, client, "f"); } /** * Captures the current state of the accessibility tree. * The returned object represents the root accessible node of the page. * * @remarks * * **NOTE** The Chromium accessibility tree contains nodes that go unused on * most platforms and by most screen readers. Puppeteer will discard them as * well for an easier to process tree, unless `interestingOnly` is set to * `false`. * * @example * An example of dumping the entire accessibility tree: * * ```ts * const snapshot = await page.accessibility.snapshot(); * console.log(snapshot); * ``` * * @example * An example of logging the focused node's name: * * ```ts * const snapshot = await page.accessibility.snapshot(); * const node = findFocusedNode(snapshot); * console.log(node && node.name); * * function findFocusedNode(node) { * if (node.focused) return node; * for (const child of node.children || []) { * const foundNode = findFocusedNode(child); * return foundNode; * } * return null; * } * ``` * * @returns An AXNode object representing the snapshot. */ async snapshot(options2 = {}) { var _a, _b; const { interestingOnly = true, root = null } = options2; const { nodes } = await __classPrivateFieldGet(this, _Accessibility_client, "f").send("Accessibility.getFullAXTree"); let backendNodeId; if (root) { const { node } = await __classPrivateFieldGet(this, _Accessibility_client, "f").send("DOM.describeNode", { objectId: root.id }); backendNodeId = node.backendNodeId; } const defaultRoot = AXNode.createTree(nodes); let needle = defaultRoot; if (backendNodeId) { needle = defaultRoot.find((node) => { return node.payload.backendDOMNodeId === backendNodeId; }); if (!needle) { return null; } } if (!interestingOnly) { return (_a = this.serializeTree(needle)[0]) !== null && _a !== void 0 ? _a : null; } const interestingNodes = /* @__PURE__ */ new Set(); this.collectInterestingNodes(interestingNodes, defaultRoot, false); if (!interestingNodes.has(needle)) { return null; } return (_b = this.serializeTree(needle, interestingNodes)[0]) !== null && _b !== void 0 ? _b : null; } serializeTree(node, interestingNodes) { const children = []; for (const child of node.children) { children.push(...this.serializeTree(child, interestingNodes)); } if (interestingNodes && !interestingNodes.has(node)) { return children; } const serializedNode = node.serialize(); if (children.length) { serializedNode.children = children; } return [serializedNode]; } collectInterestingNodes(collection, node, insideControl) { if (node.isInteresting(insideControl)) { collection.add(node); } if (node.isLeafNode()) { return; } insideControl = insideControl || node.isControl(); for (const child of node.children) { this.collectInterestingNodes(collection, child, insideControl); } } }; exports2.Accessibility = Accessibility; _Accessibility_client = /* @__PURE__ */ new WeakMap(); var AXNode = class { constructor(payload) { _AXNode_instances.add(this); this.children = []; _AXNode_richlyEditable.set(this, false); _AXNode_editable.set(this, false); _AXNode_focusable.set(this, false); _AXNode_hidden.set(this, false); _AXNode_name.set(this, void 0); _AXNode_role.set(this, void 0); _AXNode_ignored.set(this, void 0); _AXNode_cachedHasFocusableChild.set(this, void 0); this.payload = payload; __classPrivateFieldSet(this, _AXNode_name, this.payload.name ? this.payload.name.value : "", "f"); __classPrivateFieldSet(this, _AXNode_role, this.payload.role ? this.payload.role.value : "Unknown", "f"); __classPrivateFieldSet(this, _AXNode_ignored, this.payload.ignored, "f"); for (const property of this.payload.properties || []) { if (property.name === "editable") { __classPrivateFieldSet(this, _AXNode_richlyEditable, property.value.value === "richtext", "f"); __classPrivateFieldSet(this, _AXNode_editable, true, "f"); } if (property.name === "focusable") { __classPrivateFieldSet(this, _AXNode_focusable, property.value.value, "f"); } if (property.name === "hidden") { __classPrivateFieldSet(this, _AXNode_hidden, property.value.value, "f"); } } } find(predicate) { if (predicate(this)) { return this; } for (const child of this.children) { const result = child.find(predicate); if (result) { return result; } } return null; } isLeafNode() { if (!this.children.length) { return true; } if (__classPrivateFieldGet(this, _AXNode_instances, "m", _AXNode_isPlainTextField).call(this) || __classPrivateFieldGet(this, _AXNode_instances, "m", _AXNode_isTextOnlyObject).call(this)) { return true; } switch (__classPrivateFieldGet(this, _AXNode_role, "f")) { case "doc-cover": case "graphics-symbol": case "img": case "Meter": case "scrollbar": case "slider": case "separator": case "progressbar": return true; default: break; } if (__classPrivateFieldGet(this, _AXNode_instances, "m", _AXNode_hasFocusableChild).call(this)) { return false; } if (__classPrivateFieldGet(this, _AXNode_focusable, "f") && __classPrivateFieldGet(this, _AXNode_name, "f")) { return true; } if (__classPrivateFieldGet(this, _AXNode_role, "f") === "heading" && __classPrivateFieldGet(this, _AXNode_name, "f")) { return true; } return false; } isControl() { switch (__classPrivateFieldGet(this, _AXNode_role, "f")) { case "button": case "checkbox": case "ColorWell": case "combobox": case "DisclosureTriangle": case "listbox": case "menu": case "menubar": case "menuitem": case "menuitemcheckbox": case "menuitemradio": case "radio": case "scrollbar": case "searchbox": case "slider": case "spinbutton": case "switch": case "tab": case "textbox": case "tree": case "treeitem": return true; default: return false; } } isInteresting(insideControl) { const role = __classPrivateFieldGet(this, _AXNode_role, "f"); if (role === "Ignored" || __classPrivateFieldGet(this, _AXNode_hidden, "f") || __classPrivateFieldGet(this, _AXNode_ignored, "f")) { return false; } if (__classPrivateFieldGet(this, _AXNode_focusable, "f") || __classPrivateFieldGet(this, _AXNode_richlyEditable, "f")) { return true; } if (this.isControl()) { return true; } if (insideControl) { return false; } return this.isLeafNode() && !!__classPrivateFieldGet(this, _AXNode_name, "f"); } serialize() { const properties = /* @__PURE__ */ new Map(); for (const property of this.payload.properties || []) { properties.set(property.name.toLowerCase(), property.value.value); } if (this.payload.name) { properties.set("name", this.payload.name.value); } if (this.payload.value) { properties.set("value", this.payload.value.value); } if (this.payload.description) { properties.set("description", this.payload.description.value); } const node = { role: __classPrivateFieldGet(this, _AXNode_role, "f") }; const userStringProperties = [ "name", "value", "description", "keyshortcuts", "roledescription", "valuetext" ]; const getUserStringPropertyValue = (key) => { return properties.get(key); }; for (const userStringProperty of userStringProperties) { if (!properties.has(userStringProperty)) { continue; } node[userStringProperty] = getUserStringPropertyValue(userStringProperty); } const booleanProperties = [ "disabled", "expanded", "focused", "modal", "multiline", "multiselectable", "readonly", "required", "selected" ]; const getBooleanPropertyValue = (key) => { return properties.get(key); }; for (const booleanProperty of booleanProperties) { if (booleanProperty === "focused" && __classPrivateFieldGet(this, _AXNode_role, "f") === "RootWebArea") { continue; } const value = getBooleanPropertyValue(booleanProperty); if (!value) { continue; } node[booleanProperty] = getBooleanPropertyValue(booleanProperty); } const tristateProperties = ["checked", "pressed"]; for (const tristateProperty of tristateProperties) { if (!properties.has(tristateProperty)) { continue; } const value = properties.get(tristateProperty); node[tristateProperty] = value === "mixed" ? "mixed" : value === "true" ? true : false; } const numericalProperties = [ "level", "valuemax", "valuemin" ]; const getNumericalPropertyValue = (key) => { return properties.get(key); }; for (const numericalProperty of numericalProperties) { if (!properties.has(numericalProperty)) { continue; } node[numericalProperty] = getNumericalPropertyValue(numericalProperty); } const tokenProperties = [ "autocomplete", "haspopup", "invalid", "orientation" ]; const getTokenPropertyValue = (key) => { return properties.get(key); }; for (const tokenProperty of tokenProperties) { const value = getTokenPropertyValue(tokenProperty); if (!value || value === "false") { continue; } node[tokenProperty] = getTokenPropertyValue(tokenProperty); } return node; } static createTree(payloads) { const nodeById = /* @__PURE__ */ new Map(); for (const payload of payloads) { nodeById.set(payload.nodeId, new AXNode(payload)); } for (const node of nodeById.values()) { for (const childId of node.payload.childIds || []) { const child = nodeById.get(childId); if (child) { node.children.push(child); } } } return nodeById.values().next().value; } }; _AXNode_richlyEditable = /* @__PURE__ */ new WeakMap(), _AXNode_editable = /* @__PURE__ */ new WeakMap(), _AXNode_focusable = /* @__PURE__ */ new WeakMap(), _AXNode_hidden = /* @__PURE__ */ new WeakMap(), _AXNode_name = /* @__PURE__ */ new WeakMap(), _AXNode_role = /* @__PURE__ */ new WeakMap(), _AXNode_ignored = /* @__PURE__ */ new WeakMap(), _AXNode_cachedHasFocusableChild = /* @__PURE__ */ new WeakMap(), _AXNode_instances = /* @__PURE__ */ new WeakSet(), _AXNode_isPlainTextField = function _AXNode_isPlainTextField2() { if (__classPrivateFieldGet(this, _AXNode_richlyEditable, "f")) { return false; } if (__classPrivateFieldGet(this, _AXNode_editable, "f")) { return true; } return __classPrivateFieldGet(this, _AXNode_role, "f") === "textbox" || __classPrivateFieldGet(this, _AXNode_role, "f") === "searchbox"; }, _AXNode_isTextOnlyObject = function _AXNode_isTextOnlyObject2() { const role = __classPrivateFieldGet(this, _AXNode_role, "f"); return role === "LineBreak" || role === "text" || role === "InlineTextBox"; }, _AXNode_hasFocusableChild = function _AXNode_hasFocusableChild2() { if (__classPrivateFieldGet(this, _AXNode_cachedHasFocusableChild, "f") === void 0) { __classPrivateFieldSet(this, _AXNode_cachedHasFocusableChild, false, "f"); for (const child of this.children) { if (__classPrivateFieldGet(child, _AXNode_focusable, "f") || __classPrivateFieldGet(child, _AXNode_instances, "m", _AXNode_hasFocusableChild2).call(child)) { __classPrivateFieldSet(this, _AXNode_cachedHasFocusableChild, true, "f"); break; } } } return __classPrivateFieldGet(this, _AXNode_cachedHasFocusableChild, "f"); }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/util/assert.js var require_assert = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/util/assert.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.assert = void 0; var assert = (value, message) => { if (!value) { throw new Error(message); } }; exports2.assert = assert; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/util/AsyncIterableUtil.js var require_AsyncIterableUtil = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/util/AsyncIterableUtil.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AsyncIterableUtil = void 0; var AsyncIterableUtil = class { static async *map(iterable, map) { for await (const value of iterable) { yield await map(value); } } static async *flatMap(iterable, map) { for await (const value of iterable) { yield* map(value); } } static async collect(iterable) { const result = []; for await (const value of iterable) { result.push(value); } return result; } static async first(iterable) { for await (const value of iterable) { return value; } return; } }; exports2.AsyncIterableUtil = AsyncIterableUtil; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/util/ErrorLike.js var require_ErrorLike = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/util/ErrorLike.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isErrnoException = exports2.isErrorLike = void 0; function isErrorLike(obj) { return typeof obj === "object" && obj !== null && "name" in obj && "message" in obj; } exports2.isErrorLike = isErrorLike; function isErrnoException(obj) { return isErrorLike(obj) && ("errno" in obj || "code" in obj || "path" in obj || "syscall" in obj); } exports2.isErrnoException = isErrnoException; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/util/Function.js var require_Function = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/util/Function.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.interpolateFunction = exports2.stringifyFunction = exports2.createFunction = void 0; var createdFunctions = /* @__PURE__ */ new Map(); var createFunction = (functionValue) => { let fn = createdFunctions.get(functionValue); if (fn) { return fn; } fn = new Function(`return ${functionValue}`)(); createdFunctions.set(functionValue, fn); return fn; }; exports2.createFunction = createFunction; function stringifyFunction(fn) { let value = fn.toString(); try { new Function(`(${value})`); } catch (e) { let prefix = "function "; if (value.startsWith("async ")) { prefix = `async ${prefix}`; value = value.substring("async ".length); } value = `${prefix}${value}`; try { new Function(`(${value})`); } catch (e2) { throw new Error("Passed function cannot be serialized!"); } } return value; } exports2.stringifyFunction = stringifyFunction; var interpolateFunction = (fn, replacements) => { let value = stringifyFunction(fn); for (const [name, jsValue] of Object.entries(replacements)) { value = value.replace(new RegExp(`PLACEHOLDER\\(\\s*(?:'${name}'|"${name}")\\s*\\)`, "g"), jsValue); } return (0, exports2.createFunction)(value); }; exports2.interpolateFunction = interpolateFunction; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/HandleIterator.js var require_HandleIterator = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/HandleIterator.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.transposeIterableHandle = void 0; var DEFAULT_BATCH_SIZE = 20; async function* fastTransposeIteratorHandle(iterator, size = DEFAULT_BATCH_SIZE) { const array = await iterator.evaluateHandle(async (iterator2, size2) => { const results = []; while (results.length < size2) { const result = await iterator2.next(); if (result.done) { break; } results.push(result.value); } return results; }, size); const properties = await array.getProperties(); await array.dispose(); yield* properties.values(); return properties.size === 0; } async function* transposeIteratorHandle(iterator) { try { while (!(yield* fastTransposeIteratorHandle(iterator))) { } } finally { await iterator.dispose(); } } async function* transposeIterableHandle(handle) { yield* transposeIteratorHandle(await handle.evaluateHandle((iterable) => { return async function* () { yield* iterable; }(); })); } exports2.transposeIterableHandle = transposeIterableHandle; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/IsolatedWorlds.js var require_IsolatedWorlds = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/IsolatedWorlds.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PUPPETEER_WORLD = exports2.MAIN_WORLD = void 0; exports2.MAIN_WORLD = Symbol("mainWorld"); exports2.PUPPETEER_WORLD = Symbol("puppeteerWorld"); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/LazyArg.js var require_LazyArg = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/LazyArg.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _LazyArg_get; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.LazyArg = void 0; var LazyArg = class { constructor(get) { _LazyArg_get.set(this, void 0); __classPrivateFieldSet(this, _LazyArg_get, get, "f"); } async get(context) { return __classPrivateFieldGet(this, _LazyArg_get, "f").call(this, context); } }; exports2.LazyArg = LazyArg; _LazyArg_get = /* @__PURE__ */ new WeakMap(); LazyArg.create = (get) => { return new LazyArg(get); }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js var require_QueryHandler = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/QueryHandler.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.QueryHandler = void 0; var ElementHandle_js_1 = require_ElementHandle(); var assert_js_1 = require_assert(); var ErrorLike_js_1 = require_ErrorLike(); var Function_js_1 = require_Function(); var HandleIterator_js_1 = require_HandleIterator(); var IsolatedWorlds_js_1 = require_IsolatedWorlds(); var LazyArg_js_1 = require_LazyArg(); var QueryHandler = class { static get _querySelector() { if (this.querySelector) { return this.querySelector; } if (!this.querySelectorAll) { throw new Error("Cannot create default `querySelector`."); } return this.querySelector = (0, Function_js_1.interpolateFunction)(async (node, selector, PuppeteerUtil) => { const querySelectorAll = PLACEHOLDER("querySelectorAll"); const results = querySelectorAll(node, selector, PuppeteerUtil); for await (const result of results) { return result; } return null; }, { querySelectorAll: (0, Function_js_1.stringifyFunction)(this.querySelectorAll) }); } static get _querySelectorAll() { if (this.querySelectorAll) { return this.querySelectorAll; } if (!this.querySelector) { throw new Error("Cannot create default `querySelectorAll`."); } return this.querySelectorAll = (0, Function_js_1.interpolateFunction)(async function* (node, selector, PuppeteerUtil) { const querySelector = PLACEHOLDER("querySelector"); const result = await querySelector(node, selector, PuppeteerUtil); if (result) { yield result; } }, { querySelector: (0, Function_js_1.stringifyFunction)(this.querySelector) }); } /** * Queries for multiple nodes given a selector and {@link ElementHandle}. * * Akin to {@link Document.prototype.querySelectorAll}. */ static async *queryAll(element, selector) { const world = element.executionContext()._world; (0, assert_js_1.assert)(world); const handle = await element.evaluateHandle(this._querySelectorAll, selector, LazyArg_js_1.LazyArg.create((context) => { return context.puppeteerUtil; })); yield* (0, HandleIterator_js_1.transposeIterableHandle)(handle); } /** * Queries for a single node given a selector and {@link ElementHandle}. * * Akin to {@link Document.prototype.querySelector}. */ static async queryOne(element, selector) { const world = element.executionContext()._world; (0, assert_js_1.assert)(world); const result = await element.evaluateHandle(this._querySelector, selector, LazyArg_js_1.LazyArg.create((context) => { return context.puppeteerUtil; })); if (!(result instanceof ElementHandle_js_1.ElementHandle)) { await result.dispose(); return null; } return result; } /** * Waits until a single node appears for a given selector and * {@link ElementHandle}. * * This will always query the handle in the Puppeteer world and migrate the * result to the main world. */ static async waitFor(elementOrFrame, selector, options2) { let frame; let element; if (!(elementOrFrame instanceof ElementHandle_js_1.ElementHandle)) { frame = elementOrFrame; } else { frame = elementOrFrame.frame; element = await frame.worlds[IsolatedWorlds_js_1.PUPPETEER_WORLD].adoptHandle(elementOrFrame); } const { visible = false, hidden = false, timeout } = options2; try { const handle = await frame.worlds[IsolatedWorlds_js_1.PUPPETEER_WORLD].waitForFunction(async (PuppeteerUtil, query, selector2, root, visible2) => { const querySelector = PuppeteerUtil.createFunction(query); const node = await querySelector(root !== null && root !== void 0 ? root : document, selector2, PuppeteerUtil); return PuppeteerUtil.checkVisibility(node, visible2); }, { polling: visible || hidden ? "raf" : "mutation", root: element, timeout }, LazyArg_js_1.LazyArg.create((context) => { return context.puppeteerUtil; }), (0, Function_js_1.stringifyFunction)(this._querySelector), selector, element, visible ? true : hidden ? false : void 0); if (!(handle instanceof ElementHandle_js_1.ElementHandle)) { await handle.dispose(); return null; } return frame.worlds[IsolatedWorlds_js_1.MAIN_WORLD].transferHandle(handle); } catch (error) { if (!(0, ErrorLike_js_1.isErrorLike)(error)) { throw error; } error.message = `Waiting for selector \`${selector}\` failed: ${error.message}`; throw error; } finally { if (element) { await element.dispose(); } } } }; exports2.QueryHandler = QueryHandler; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.js var require_AriaQueryHandler = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/AriaQueryHandler.js"(exports2) { "use strict"; var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ARIAQueryHandler = void 0; var assert_js_1 = require_assert(); var AsyncIterableUtil_js_1 = require_AsyncIterableUtil(); var QueryHandler_js_1 = require_QueryHandler(); var queryAXTree = async (client, element, accessibleName, role) => { const { nodes } = await client.send("Accessibility.queryAXTree", { objectId: element.id, accessibleName, role }); return nodes.filter((node) => { return !node.role || node.role.value !== "StaticText"; }); }; var KNOWN_ATTRIBUTES = Object.freeze(["name", "role"]); var isKnownAttribute = (attribute) => { return KNOWN_ATTRIBUTES.includes(attribute); }; var normalizeValue = (value) => { return value.replace(/ +/g, " ").trim(); }; var ATTRIBUTE_REGEXP = /\[\s*(?\w+)\s*=\s*(?"|')(?\\.|.*?(?=\k))\k\s*\]/g; var parseARIASelector = (selector) => { const queryOptions = {}; const defaultName = selector.replace(ATTRIBUTE_REGEXP, (_, attribute, __, value) => { attribute = attribute.trim(); (0, assert_js_1.assert)(isKnownAttribute(attribute), `Unknown aria attribute "${attribute}" in selector`); queryOptions[attribute] = normalizeValue(value); return ""; }); if (defaultName && !queryOptions.name) { queryOptions.name = normalizeValue(defaultName); } return queryOptions; }; var ARIAQueryHandler = class extends QueryHandler_js_1.QueryHandler { static async *queryAll(element, selector) { const context = element.executionContext(); const { name, role } = parseARIASelector(selector); const results = await queryAXTree(context._client, element, name, role); const world = context._world; yield* AsyncIterableUtil_js_1.AsyncIterableUtil.map(results, (node) => { return world.adoptBackendNode(node.backendDOMNodeId); }); } }; exports2.ARIAQueryHandler = ARIAQueryHandler; _a = ARIAQueryHandler; ARIAQueryHandler.querySelector = async (node, selector, { ariaQuerySelector }) => { return ariaQuerySelector(node, selector); }; ARIAQueryHandler.queryOne = async (element, selector) => { var _b; return (_b = await AsyncIterableUtil_js_1.AsyncIterableUtil.first(_a.queryAll(element, selector))) !== null && _b !== void 0 ? _b : null; }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/environment.js var require_environment = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/environment.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFERRED_PROMISE_DEBUG_TIMEOUT = exports2.isNode = void 0; exports2.isNode = !!(typeof process !== "undefined" && process.version); exports2.DEFERRED_PROMISE_DEBUG_TIMEOUT = typeof process !== "undefined" && typeof process.env["PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT"] !== "undefined" ? Number(process.env["PUPPETEER_DEFERRED_PROMISE_DEBUG_TIMEOUT"]) : -1; } }); // node_modules/ms/index.js var require_ms4 = __commonJS({ "node_modules/ms/index.js"(exports2, module2) { var s = 1e3; var m = s * 60; var h = m * 60; var d = h * 24; var w = d * 7; var y = d * 365.25; module2.exports = function(val, options2) { options2 = options2 || {}; var type = typeof val; if (type === "string" && val.length > 0) { return parse2(val); } else if (type === "number" && isFinite(val)) { return options2.long ? fmtLong(val) : fmtShort(val); } throw new Error( "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; function parse2(str2) { str2 = String(str2); if (str2.length > 100) { return; } var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( str2 ); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || "ms").toLowerCase(); switch (type) { case "years": case "year": case "yrs": case "yr": case "y": return n * y; case "weeks": case "week": case "w": return n * w; case "days": case "day": case "d": return n * d; case "hours": case "hour": case "hrs": case "hr": case "h": return n * h; case "minutes": case "minute": case "mins": case "min": case "m": return n * m; case "seconds": case "second": case "secs": case "sec": case "s": return n * s; case "milliseconds": case "millisecond": case "msecs": case "msec": case "ms": return n; default: return void 0; } } function fmtShort(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return Math.round(ms / d) + "d"; } if (msAbs >= h) { return Math.round(ms / h) + "h"; } if (msAbs >= m) { return Math.round(ms / m) + "m"; } if (msAbs >= s) { return Math.round(ms / s) + "s"; } return ms + "ms"; } function fmtLong(ms) { var msAbs = Math.abs(ms); if (msAbs >= d) { return plural(ms, msAbs, d, "day"); } if (msAbs >= h) { return plural(ms, msAbs, h, "hour"); } if (msAbs >= m) { return plural(ms, msAbs, m, "minute"); } if (msAbs >= s) { return plural(ms, msAbs, s, "second"); } return ms + " ms"; } function plural(ms, msAbs, n, name) { var isPlural = msAbs >= n * 1.5; return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); } } }); // node_modules/debug/src/common.js var require_common3 = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; createDebug.default = createDebug; createDebug.coerce = coerce; createDebug.disable = disable; createDebug.enable = enable; createDebug.enabled = enabled; createDebug.humanize = require_ms4(); createDebug.destroy = destroy; Object.keys(env).forEach((key) => { createDebug[key] = env[key]; }); createDebug.names = []; createDebug.skips = []; createDebug.formatters = {}; function selectColor(namespace) { let hash = 0; for (let i = 0; i < namespace.length; i++) { hash = (hash << 5) - hash + namespace.charCodeAt(i); hash |= 0; } return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; } createDebug.selectColor = selectColor; function createDebug(namespace) { let prevTime; let enableOverride = null; let namespacesCache; let enabledCache; function debug(...args) { if (!debug.enabled) { return; } const self2 = debug; const curr = Number(new Date()); const ms = curr - (prevTime || curr); self2.diff = ms; self2.prev = prevTime; self2.curr = curr; prevTime = curr; args[0] = createDebug.coerce(args[0]); if (typeof args[0] !== "string") { args.unshift("%O"); } let index = 0; args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { if (match === "%%") { return "%"; } index++; const formatter = createDebug.formatters[format]; if (typeof formatter === "function") { const val = args[index]; match = formatter.call(self2, val); args.splice(index, 1); index--; } return match; }); createDebug.formatArgs.call(self2, args); const logFn = self2.log || createDebug.log; logFn.apply(self2, args); } debug.namespace = namespace; debug.useColors = createDebug.useColors(); debug.color = createDebug.selectColor(namespace); debug.extend = extend; debug.destroy = createDebug.destroy; Object.defineProperty(debug, "enabled", { enumerable: true, configurable: false, get: () => { if (enableOverride !== null) { return enableOverride; } if (namespacesCache !== createDebug.namespaces) { namespacesCache = createDebug.namespaces; enabledCache = createDebug.enabled(namespace); } return enabledCache; }, set: (v) => { enableOverride = v; } }); if (typeof createDebug.init === "function") { createDebug.init(debug); } return debug; } function extend(namespace, delimiter) { const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); newDebug.log = this.log; return newDebug; } function enable(namespaces) { createDebug.save(namespaces); createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; let i; const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); const len = split.length; for (i = 0; i < len; i++) { if (!split[i]) { continue; } namespaces = split[i].replace(/\*/g, ".*?"); if (namespaces[0] === "-") { createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); } else { createDebug.names.push(new RegExp("^" + namespaces + "$")); } } } function disable() { const namespaces = [ ...createDebug.names.map(toNamespace), ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) ].join(","); createDebug.enable(""); return namespaces; } function enabled(name) { if (name[name.length - 1] === "*") { return true; } let i; let len; for (i = 0, len = createDebug.skips.length; i < len; i++) { if (createDebug.skips[i].test(name)) { return false; } } for (i = 0, len = createDebug.names.length; i < len; i++) { if (createDebug.names[i].test(name)) { return true; } } return false; } function toNamespace(regexp) { return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); } function coerce(val) { if (val instanceof Error) { return val.stack || val.message; } return val; } function destroy() { console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } createDebug.enable(createDebug.load()); return createDebug; } module2.exports = setup; } }); // node_modules/debug/src/browser.js var require_browser4 = __commonJS({ "node_modules/debug/src/browser.js"(exports2, module2) { exports2.formatArgs = formatArgs; exports2.save = save; exports2.load = load; exports2.useColors = useColors; exports2.storage = localstorage(); exports2.destroy = (() => { let warned = false; return () => { if (!warned) { warned = true; console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } }; })(); exports2.colors = [ "#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC", "#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99", "#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC", "#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99", "#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00", "#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33", "#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300", "#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633", "#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066", "#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399", "#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00", "#FFCC33" ]; function useColors() { if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { return true; } if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { return false; } return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } function formatArgs(args) { args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); if (!this.useColors) { return; } const c = "color: " + this.color; args.splice(1, 0, c, "color: inherit"); let index = 0; let lastC = 0; args[0].replace(/%[a-zA-Z%]/g, (match) => { if (match === "%%") { return; } index++; if (match === "%c") { lastC = index; } }); args.splice(lastC, 0, c); } exports2.log = console.debug || console.log || (() => { }); function save(namespaces) { try { if (namespaces) { exports2.storage.setItem("debug", namespaces); } else { exports2.storage.removeItem("debug"); } } catch (error) { } } function load() { let r; try { r = exports2.storage.getItem("debug"); } catch (error) { } if (!r && typeof process !== "undefined" && "env" in process) { r = process.env.DEBUG; } return r; } function localstorage() { try { return localStorage; } catch (error) { } } module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { return JSON.stringify(v); } catch (error) { return "[UnexpectedJSONParseError]: " + error.message; } }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/Debug.js var require_Debug = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/Debug.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCapturedLogs = exports2.setLogCapture = exports2.debug = exports2.importDebug = void 0; var environment_js_1 = require_environment(); var debugModule = null; async function importDebug() { if (!debugModule) { debugModule = (await Promise.resolve().then(() => __importStar(require_browser4()))).default; } return debugModule; } exports2.importDebug = importDebug; var debug = (prefix) => { if (environment_js_1.isNode) { return async (...logArgs) => { if (captureLogs) { capturedLogs.push(prefix + logArgs); } (await importDebug())(prefix)(logArgs); }; } return (...logArgs) => { const debugLevel = globalThis.__PUPPETEER_DEBUG; if (!debugLevel) { return; } const everythingShouldBeLogged = debugLevel === "*"; const prefixMatchesDebugLevel = everythingShouldBeLogged || /** * If the debug level is `foo*`, that means we match any prefix that * starts with `foo`. If the level is `foo`, we match only the prefix * `foo`. */ (debugLevel.endsWith("*") ? prefix.startsWith(debugLevel) : prefix === debugLevel); if (!prefixMatchesDebugLevel) { return; } console.log(`${prefix}:`, ...logArgs); }; }; exports2.debug = debug; var capturedLogs = []; var captureLogs = false; function setLogCapture(value) { capturedLogs = []; captureLogs = value; } exports2.setLogCapture = setLogCapture; function getCapturedLogs() { return capturedLogs; } exports2.getCapturedLogs = getCapturedLogs; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.js var require_Errors = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/Errors.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _ProtocolError_code; var _ProtocolError_originalMessage; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.errors = exports2.ProtocolError = exports2.TimeoutError = exports2.CustomError = void 0; var CustomError = class extends Error { /** * @internal */ constructor(message) { super(message); this.name = this.constructor.name; Error.captureStackTrace(this, this.constructor); } }; exports2.CustomError = CustomError; var TimeoutError = class extends CustomError { }; exports2.TimeoutError = TimeoutError; var ProtocolError = class extends CustomError { constructor() { super(...arguments); _ProtocolError_code.set(this, void 0); _ProtocolError_originalMessage.set(this, ""); } /** * @internal */ set code(code) { __classPrivateFieldSet(this, _ProtocolError_code, code, "f"); } /** * @public */ get code() { return __classPrivateFieldGet(this, _ProtocolError_code, "f"); } /** * @internal */ set originalMessage(originalMessage) { __classPrivateFieldSet(this, _ProtocolError_originalMessage, originalMessage, "f"); } /** * @public */ get originalMessage() { return __classPrivateFieldGet(this, _ProtocolError_originalMessage, "f"); } }; exports2.ProtocolError = ProtocolError; _ProtocolError_code = /* @__PURE__ */ new WeakMap(), _ProtocolError_originalMessage = /* @__PURE__ */ new WeakMap(); exports2.errors = Object.freeze({ TimeoutError, ProtocolError }); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js var require_Connection = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _Connection_instances; var _Connection_url; var _Connection_transport; var _Connection_delay; var _Connection_lastId; var _Connection_sessions; var _Connection_closed; var _Connection_callbacks; var _Connection_manuallyAttached; var _Connection_onClose; var _CDPSessionImpl_sessionId; var _CDPSessionImpl_targetType; var _CDPSessionImpl_callbacks; var _CDPSessionImpl_connection; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isTargetClosedError = exports2.CDPSessionImpl = exports2.CDPSession = exports2.CDPSessionEmittedEvents = exports2.Connection = exports2.ConnectionEmittedEvents = void 0; var assert_js_1 = require_assert(); var Debug_js_1 = require_Debug(); var debugProtocolSend = (0, Debug_js_1.debug)("puppeteer:protocol:SEND \u25BA"); var debugProtocolReceive = (0, Debug_js_1.debug)("puppeteer:protocol:RECV \u25C0"); var EventEmitter_js_1 = require_EventEmitter(); var Errors_js_1 = require_Errors(); exports2.ConnectionEmittedEvents = { Disconnected: Symbol("Connection.Disconnected") }; var Connection = class extends EventEmitter_js_1.EventEmitter { constructor(url2, transport, delay = 0) { super(); _Connection_instances.add(this); _Connection_url.set(this, void 0); _Connection_transport.set(this, void 0); _Connection_delay.set(this, void 0); _Connection_lastId.set(this, 0); _Connection_sessions.set(this, /* @__PURE__ */ new Map()); _Connection_closed.set(this, false); _Connection_callbacks.set(this, /* @__PURE__ */ new Map()); _Connection_manuallyAttached.set(this, /* @__PURE__ */ new Set()); __classPrivateFieldSet(this, _Connection_url, url2, "f"); __classPrivateFieldSet(this, _Connection_delay, delay, "f"); __classPrivateFieldSet(this, _Connection_transport, transport, "f"); __classPrivateFieldGet(this, _Connection_transport, "f").onmessage = this.onMessage.bind(this); __classPrivateFieldGet(this, _Connection_transport, "f").onclose = __classPrivateFieldGet(this, _Connection_instances, "m", _Connection_onClose).bind(this); } static fromSession(session) { return session.connection(); } /** * @internal */ get _closed() { return __classPrivateFieldGet(this, _Connection_closed, "f"); } /** * @internal */ get _sessions() { return __classPrivateFieldGet(this, _Connection_sessions, "f"); } /** * @param sessionId - The session id * @returns The current CDP session if it exists */ session(sessionId) { return __classPrivateFieldGet(this, _Connection_sessions, "f").get(sessionId) || null; } url() { return __classPrivateFieldGet(this, _Connection_url, "f"); } send(method, ...paramArgs) { const params = paramArgs.length ? paramArgs[0] : void 0; const id = this._rawSend({ method, params }); return new Promise((resolve, reject) => { __classPrivateFieldGet(this, _Connection_callbacks, "f").set(id, { resolve, reject, error: new Errors_js_1.ProtocolError(), method }); }); } /** * @internal */ _rawSend(message) { var _a; const id = __classPrivateFieldSet(this, _Connection_lastId, (_a = __classPrivateFieldGet(this, _Connection_lastId, "f"), ++_a), "f"); const stringifiedMessage = JSON.stringify(Object.assign({}, message, { id })); debugProtocolSend(stringifiedMessage); __classPrivateFieldGet(this, _Connection_transport, "f").send(stringifiedMessage); return id; } /** * @internal */ async onMessage(message) { if (__classPrivateFieldGet(this, _Connection_delay, "f")) { await new Promise((f) => { return setTimeout(f, __classPrivateFieldGet(this, _Connection_delay, "f")); }); } debugProtocolReceive(message); const object = JSON.parse(message); if (object.method === "Target.attachedToTarget") { const sessionId = object.params.sessionId; const session = new CDPSessionImpl(this, object.params.targetInfo.type, sessionId); __classPrivateFieldGet(this, _Connection_sessions, "f").set(sessionId, session); this.emit("sessionattached", session); const parentSession = __classPrivateFieldGet(this, _Connection_sessions, "f").get(object.sessionId); if (parentSession) { parentSession.emit("sessionattached", session); } } else if (object.method === "Target.detachedFromTarget") { const session = __classPrivateFieldGet(this, _Connection_sessions, "f").get(object.params.sessionId); if (session) { session._onClosed(); __classPrivateFieldGet(this, _Connection_sessions, "f").delete(object.params.sessionId); this.emit("sessiondetached", session); const parentSession = __classPrivateFieldGet(this, _Connection_sessions, "f").get(object.sessionId); if (parentSession) { parentSession.emit("sessiondetached", session); } } } if (object.sessionId) { const session = __classPrivateFieldGet(this, _Connection_sessions, "f").get(object.sessionId); if (session) { session._onMessage(object); } } else if (object.id) { const callback = __classPrivateFieldGet(this, _Connection_callbacks, "f").get(object.id); if (callback) { __classPrivateFieldGet(this, _Connection_callbacks, "f").delete(object.id); if (object.error) { callback.reject(createProtocolError(callback.error, callback.method, object)); } else { callback.resolve(object.result); } } } else { this.emit(object.method, object.params); } } dispose() { __classPrivateFieldGet(this, _Connection_instances, "m", _Connection_onClose).call(this); __classPrivateFieldGet(this, _Connection_transport, "f").close(); } /** * @internal */ isAutoAttached(targetId) { return !__classPrivateFieldGet(this, _Connection_manuallyAttached, "f").has(targetId); } /** * @internal */ async _createSession(targetInfo, isAutoAttachEmulated = true) { if (!isAutoAttachEmulated) { __classPrivateFieldGet(this, _Connection_manuallyAttached, "f").add(targetInfo.targetId); } const { sessionId } = await this.send("Target.attachToTarget", { targetId: targetInfo.targetId, flatten: true }); __classPrivateFieldGet(this, _Connection_manuallyAttached, "f").delete(targetInfo.targetId); const session = __classPrivateFieldGet(this, _Connection_sessions, "f").get(sessionId); if (!session) { throw new Error("CDPSession creation failed."); } return session; } /** * @param targetInfo - The target info * @returns The CDP session that is created */ async createSession(targetInfo) { return await this._createSession(targetInfo, false); } }; exports2.Connection = Connection; _Connection_url = /* @__PURE__ */ new WeakMap(), _Connection_transport = /* @__PURE__ */ new WeakMap(), _Connection_delay = /* @__PURE__ */ new WeakMap(), _Connection_lastId = /* @__PURE__ */ new WeakMap(), _Connection_sessions = /* @__PURE__ */ new WeakMap(), _Connection_closed = /* @__PURE__ */ new WeakMap(), _Connection_callbacks = /* @__PURE__ */ new WeakMap(), _Connection_manuallyAttached = /* @__PURE__ */ new WeakMap(), _Connection_instances = /* @__PURE__ */ new WeakSet(), _Connection_onClose = function _Connection_onClose2() { if (__classPrivateFieldGet(this, _Connection_closed, "f")) { return; } __classPrivateFieldSet(this, _Connection_closed, true, "f"); __classPrivateFieldGet(this, _Connection_transport, "f").onmessage = void 0; __classPrivateFieldGet(this, _Connection_transport, "f").onclose = void 0; for (const callback of __classPrivateFieldGet(this, _Connection_callbacks, "f").values()) { callback.reject(rewriteError(callback.error, `Protocol error (${callback.method}): Target closed.`)); } __classPrivateFieldGet(this, _Connection_callbacks, "f").clear(); for (const session of __classPrivateFieldGet(this, _Connection_sessions, "f").values()) { session._onClosed(); } __classPrivateFieldGet(this, _Connection_sessions, "f").clear(); this.emit(exports2.ConnectionEmittedEvents.Disconnected); }; exports2.CDPSessionEmittedEvents = { Disconnected: Symbol("CDPSession.Disconnected") }; var CDPSession = class extends EventEmitter_js_1.EventEmitter { /** * @internal */ constructor() { super(); } connection() { throw new Error("Not implemented"); } send() { throw new Error("Not implemented"); } /** * Detaches the cdpSession from the target. Once detached, the cdpSession object * won't emit any events and can't be used to send messages. */ async detach() { throw new Error("Not implemented"); } /** * Returns the session's id. */ id() { throw new Error("Not implemented"); } }; exports2.CDPSession = CDPSession; var CDPSessionImpl = class extends CDPSession { /** * @internal */ constructor(connection, targetType, sessionId) { super(); _CDPSessionImpl_sessionId.set(this, void 0); _CDPSessionImpl_targetType.set(this, void 0); _CDPSessionImpl_callbacks.set(this, /* @__PURE__ */ new Map()); _CDPSessionImpl_connection.set(this, void 0); __classPrivateFieldSet(this, _CDPSessionImpl_connection, connection, "f"); __classPrivateFieldSet(this, _CDPSessionImpl_targetType, targetType, "f"); __classPrivateFieldSet(this, _CDPSessionImpl_sessionId, sessionId, "f"); } connection() { return __classPrivateFieldGet(this, _CDPSessionImpl_connection, "f"); } send(method, ...paramArgs) { if (!__classPrivateFieldGet(this, _CDPSessionImpl_connection, "f")) { return Promise.reject(new Error(`Protocol error (${method}): Session closed. Most likely the ${__classPrivateFieldGet(this, _CDPSessionImpl_targetType, "f")} has been closed.`)); } const params = paramArgs.length ? paramArgs[0] : void 0; const id = __classPrivateFieldGet(this, _CDPSessionImpl_connection, "f")._rawSend({ sessionId: __classPrivateFieldGet(this, _CDPSessionImpl_sessionId, "f"), method, params }); return new Promise((resolve, reject) => { __classPrivateFieldGet(this, _CDPSessionImpl_callbacks, "f").set(id, { resolve, reject, error: new Errors_js_1.ProtocolError(), method }); }); } /** * @internal */ _onMessage(object) { const callback = object.id ? __classPrivateFieldGet(this, _CDPSessionImpl_callbacks, "f").get(object.id) : void 0; if (object.id && callback) { __classPrivateFieldGet(this, _CDPSessionImpl_callbacks, "f").delete(object.id); if (object.error) { callback.reject(createProtocolError(callback.error, callback.method, object)); } else { callback.resolve(object.result); } } else { (0, assert_js_1.assert)(!object.id); this.emit(object.method, object.params); } } /** * Detaches the cdpSession from the target. Once detached, the cdpSession object * won't emit any events and can't be used to send messages. */ async detach() { if (!__classPrivateFieldGet(this, _CDPSessionImpl_connection, "f")) { throw new Error(`Session already detached. Most likely the ${__classPrivateFieldGet(this, _CDPSessionImpl_targetType, "f")} has been closed.`); } await __classPrivateFieldGet(this, _CDPSessionImpl_connection, "f").send("Target.detachFromTarget", { sessionId: __classPrivateFieldGet(this, _CDPSessionImpl_sessionId, "f") }); } /** * @internal */ _onClosed() { for (const callback of __classPrivateFieldGet(this, _CDPSessionImpl_callbacks, "f").values()) { callback.reject(rewriteError(callback.error, `Protocol error (${callback.method}): Target closed.`)); } __classPrivateFieldGet(this, _CDPSessionImpl_callbacks, "f").clear(); __classPrivateFieldSet(this, _CDPSessionImpl_connection, void 0, "f"); this.emit(exports2.CDPSessionEmittedEvents.Disconnected); } /** * Returns the session's id. */ id() { return __classPrivateFieldGet(this, _CDPSessionImpl_sessionId, "f"); } }; exports2.CDPSessionImpl = CDPSessionImpl; _CDPSessionImpl_sessionId = /* @__PURE__ */ new WeakMap(), _CDPSessionImpl_targetType = /* @__PURE__ */ new WeakMap(), _CDPSessionImpl_callbacks = /* @__PURE__ */ new WeakMap(), _CDPSessionImpl_connection = /* @__PURE__ */ new WeakMap(); function createProtocolError(error, method, object) { let message = `Protocol error (${method}): ${object.error.message}`; if ("data" in object.error) { message += ` ${object.error.data}`; } return rewriteError(error, message, object.error.message); } function rewriteError(error, message, originalMessage) { error.message = message; error.originalMessage = originalMessage !== null && originalMessage !== void 0 ? originalMessage : error.originalMessage; return error; } function isTargetClosedError(err) { return err.message.includes("Target closed") || err.message.includes("Session closed"); } exports2.isTargetClosedError = isTargetClosedError; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/generated/injected.js var require_injected = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/generated/injected.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.source = void 0; exports2.source = '"use strict";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === "object" || typeof from === "function") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);\n\n// src/injected/injected.ts\nvar injected_exports = {};\n__export(injected_exports, {\n default: () => injected_default\n});\nmodule.exports = __toCommonJS(injected_exports);\n\n// src/common/Errors.ts\nvar CustomError = class extends Error {\n constructor(message) {\n super(message);\n this.name = this.constructor.name;\n Error.captureStackTrace(this, this.constructor);\n }\n};\nvar TimeoutError = class extends CustomError {\n};\nvar ProtocolError = class extends CustomError {\n #code;\n #originalMessage = "";\n set code(code) {\n this.#code = code;\n }\n get code() {\n return this.#code;\n }\n set originalMessage(originalMessage) {\n this.#originalMessage = originalMessage;\n }\n get originalMessage() {\n return this.#originalMessage;\n }\n};\nvar errors = Object.freeze({\n TimeoutError,\n ProtocolError\n});\n\n// src/util/DeferredPromise.ts\nfunction createDeferredPromise(opts) {\n let isResolved = false;\n let isRejected = false;\n let resolver;\n let rejector;\n const taskPromise = new Promise((resolve, reject) => {\n resolver = resolve;\n rejector = reject;\n });\n const timeoutId = opts && opts.timeout > 0 ? setTimeout(() => {\n isRejected = true;\n rejector(new TimeoutError(opts.message));\n }, opts.timeout) : void 0;\n return Object.assign(taskPromise, {\n resolved: () => {\n return isResolved;\n },\n finished: () => {\n return isResolved || isRejected;\n },\n resolve: (value) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n isResolved = true;\n resolver(value);\n },\n reject: (err) => {\n clearTimeout(timeoutId);\n isRejected = true;\n rejector(err);\n }\n });\n}\n\n// src/util/Function.ts\nvar createdFunctions = /* @__PURE__ */ new Map();\nvar createFunction = (functionValue) => {\n let fn = createdFunctions.get(functionValue);\n if (fn) {\n return fn;\n }\n fn = new Function(`return ${functionValue}`)();\n createdFunctions.set(functionValue, fn);\n return fn;\n};\n\n// src/injected/ARIAQuerySelector.ts\nvar ARIAQuerySelector_exports = {};\n__export(ARIAQuerySelector_exports, {\n ariaQuerySelector: () => ariaQuerySelector,\n ariaQuerySelectorAll: () => ariaQuerySelectorAll\n});\nvar ariaQuerySelector = (root, selector) => {\n return window.__ariaQuerySelector(root, selector);\n};\nvar ariaQuerySelectorAll = async function* (root, selector) {\n yield* await window.__ariaQuerySelectorAll(root, selector);\n};\n\n// src/injected/CustomQuerySelector.ts\nvar CustomQuerySelector_exports = {};\n__export(CustomQuerySelector_exports, {\n customQuerySelectors: () => customQuerySelectors\n});\nvar CustomQuerySelectorRegistry = class {\n #selectors = /* @__PURE__ */ new Map();\n register(name, handler) {\n if (!handler.queryOne && handler.queryAll) {\n const querySelectorAll = handler.queryAll;\n handler.queryOne = (node, selector) => {\n for (const result of querySelectorAll(node, selector)) {\n return result;\n }\n return null;\n };\n } else if (handler.queryOne && !handler.queryAll) {\n const querySelector = handler.queryOne;\n handler.queryAll = (node, selector) => {\n const result = querySelector(node, selector);\n return result ? [result] : [];\n };\n } else if (!handler.queryOne || !handler.queryAll) {\n throw new Error("At least one query method must be defined.");\n }\n this.#selectors.set(name, {\n querySelector: handler.queryOne,\n querySelectorAll: handler.queryAll\n });\n }\n unregister(name) {\n this.#selectors.delete(name);\n }\n get(name) {\n return this.#selectors.get(name);\n }\n clear() {\n this.#selectors.clear();\n }\n};\nvar customQuerySelectors = new CustomQuerySelectorRegistry();\n\n// src/injected/PierceQuerySelector.ts\nvar PierceQuerySelector_exports = {};\n__export(PierceQuerySelector_exports, {\n pierceQuerySelector: () => pierceQuerySelector,\n pierceQuerySelectorAll: () => pierceQuerySelectorAll\n});\nvar pierceQuerySelector = (root, selector) => {\n let found = null;\n const search = (root2) => {\n const iter = document.createTreeWalker(root2, NodeFilter.SHOW_ELEMENT);\n do {\n const currentNode = iter.currentNode;\n if (currentNode.shadowRoot) {\n search(currentNode.shadowRoot);\n }\n if (currentNode instanceof ShadowRoot) {\n continue;\n }\n if (currentNode !== root2 && !found && currentNode.matches(selector)) {\n found = currentNode;\n }\n } while (!found && iter.nextNode());\n };\n if (root instanceof Document) {\n root = root.documentElement;\n }\n search(root);\n return found;\n};\nvar pierceQuerySelectorAll = (element, selector) => {\n const result = [];\n const collect = (root) => {\n const iter = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT);\n do {\n const currentNode = iter.currentNode;\n if (currentNode.shadowRoot) {\n collect(currentNode.shadowRoot);\n }\n if (currentNode instanceof ShadowRoot) {\n continue;\n }\n if (currentNode !== root && currentNode.matches(selector)) {\n result.push(currentNode);\n }\n } while (iter.nextNode());\n };\n if (element instanceof Document) {\n element = element.documentElement;\n }\n collect(element);\n return result;\n};\n\n// src/util/assert.ts\nvar assert = (value, message) => {\n if (!value) {\n throw new Error(message);\n }\n};\n\n// src/injected/Poller.ts\nvar MutationPoller = class {\n #fn;\n #root;\n #observer;\n #promise;\n constructor(fn, root) {\n this.#fn = fn;\n this.#root = root;\n }\n async start() {\n const promise = this.#promise = createDeferredPromise();\n const result = await this.#fn();\n if (result) {\n promise.resolve(result);\n return;\n }\n this.#observer = new MutationObserver(async () => {\n const result2 = await this.#fn();\n if (!result2) {\n return;\n }\n promise.resolve(result2);\n await this.stop();\n });\n this.#observer.observe(this.#root, {\n childList: true,\n subtree: true,\n attributes: true\n });\n }\n async stop() {\n assert(this.#promise, "Polling never started.");\n if (!this.#promise.finished()) {\n this.#promise.reject(new Error("Polling stopped"));\n }\n if (this.#observer) {\n this.#observer.disconnect();\n this.#observer = void 0;\n }\n }\n result() {\n assert(this.#promise, "Polling never started.");\n return this.#promise;\n }\n};\nvar RAFPoller = class {\n #fn;\n #promise;\n constructor(fn) {\n this.#fn = fn;\n }\n async start() {\n const promise = this.#promise = createDeferredPromise();\n const result = await this.#fn();\n if (result) {\n promise.resolve(result);\n return;\n }\n const poll = async () => {\n if (promise.finished()) {\n return;\n }\n const result2 = await this.#fn();\n if (!result2) {\n window.requestAnimationFrame(poll);\n return;\n }\n promise.resolve(result2);\n await this.stop();\n };\n window.requestAnimationFrame(poll);\n }\n async stop() {\n assert(this.#promise, "Polling never started.");\n if (!this.#promise.finished()) {\n this.#promise.reject(new Error("Polling stopped"));\n }\n }\n result() {\n assert(this.#promise, "Polling never started.");\n return this.#promise;\n }\n};\nvar IntervalPoller = class {\n #fn;\n #ms;\n #interval;\n #promise;\n constructor(fn, ms) {\n this.#fn = fn;\n this.#ms = ms;\n }\n async start() {\n const promise = this.#promise = createDeferredPromise();\n const result = await this.#fn();\n if (result) {\n promise.resolve(result);\n return;\n }\n this.#interval = setInterval(async () => {\n const result2 = await this.#fn();\n if (!result2) {\n return;\n }\n promise.resolve(result2);\n await this.stop();\n }, this.#ms);\n }\n async stop() {\n assert(this.#promise, "Polling never started.");\n if (!this.#promise.finished()) {\n this.#promise.reject(new Error("Polling stopped"));\n }\n if (this.#interval) {\n clearInterval(this.#interval);\n this.#interval = void 0;\n }\n }\n result() {\n assert(this.#promise, "Polling never started.");\n return this.#promise;\n }\n};\n\n// src/injected/TextContent.ts\nvar TRIVIAL_VALUE_INPUT_TYPES = /* @__PURE__ */ new Set(["checkbox", "image", "radio"]);\nvar isNonTrivialValueNode = (node) => {\n if (node instanceof HTMLSelectElement) {\n return true;\n }\n if (node instanceof HTMLTextAreaElement) {\n return true;\n }\n if (node instanceof HTMLInputElement && !TRIVIAL_VALUE_INPUT_TYPES.has(node.type)) {\n return true;\n }\n return false;\n};\nvar UNSUITABLE_NODE_NAMES = /* @__PURE__ */ new Set(["SCRIPT", "STYLE"]);\nvar isSuitableNodeForTextMatching = (node) => {\n return !UNSUITABLE_NODE_NAMES.has(node.nodeName) && !document.head?.contains(node);\n};\nvar textContentCache = /* @__PURE__ */ new WeakMap();\nvar eraseFromCache = (node) => {\n while (node) {\n textContentCache.delete(node);\n if (node instanceof ShadowRoot) {\n node = node.host;\n } else {\n node = node.parentNode;\n }\n }\n};\nvar observedNodes = /* @__PURE__ */ new WeakSet();\nvar textChangeObserver = new MutationObserver((mutations) => {\n for (const mutation of mutations) {\n eraseFromCache(mutation.target);\n }\n});\nvar createTextContent = (root) => {\n let value = textContentCache.get(root);\n if (value) {\n return value;\n }\n value = { full: "", immediate: [] };\n if (!isSuitableNodeForTextMatching(root)) {\n return value;\n }\n let currentImmediate = "";\n if (isNonTrivialValueNode(root)) {\n value.full = root.value;\n value.immediate.push(root.value);\n root.addEventListener(\n "input",\n (event) => {\n eraseFromCache(event.target);\n },\n { once: true, capture: true }\n );\n } else {\n for (let child = root.firstChild; child; child = child.nextSibling) {\n if (child.nodeType === Node.TEXT_NODE) {\n value.full += child.nodeValue ?? "";\n currentImmediate += child.nodeValue ?? "";\n continue;\n }\n if (currentImmediate) {\n value.immediate.push(currentImmediate);\n }\n currentImmediate = "";\n if (child.nodeType === Node.ELEMENT_NODE) {\n value.full += createTextContent(child).full;\n }\n }\n if (currentImmediate) {\n value.immediate.push(currentImmediate);\n }\n if (root instanceof Element && root.shadowRoot) {\n value.full += createTextContent(root.shadowRoot).full;\n }\n if (!observedNodes.has(root)) {\n textChangeObserver.observe(root, {\n childList: true,\n characterData: true\n });\n observedNodes.add(root);\n }\n }\n textContentCache.set(root, value);\n return value;\n};\n\n// src/injected/TextQuerySelector.ts\nvar TextQuerySelector_exports = {};\n__export(TextQuerySelector_exports, {\n textQuerySelectorAll: () => textQuerySelectorAll\n});\nvar textQuerySelectorAll = function* (root, selector) {\n let yielded = false;\n for (const node of root.childNodes) {\n if (node instanceof Element && isSuitableNodeForTextMatching(node)) {\n let matches;\n if (!node.shadowRoot) {\n matches = textQuerySelectorAll(node, selector);\n } else {\n matches = textQuerySelectorAll(node.shadowRoot, selector);\n }\n for (const match of matches) {\n yield match;\n yielded = true;\n }\n }\n }\n if (yielded) {\n return;\n }\n if (root instanceof Element && isSuitableNodeForTextMatching(root)) {\n const textContent = createTextContent(root);\n if (textContent.full.includes(selector)) {\n yield root;\n }\n }\n};\n\n// src/injected/PQuerySelector.ts\nvar PQuerySelector_exports = {};\n__export(PQuerySelector_exports, {\n pQuerySelector: () => pQuerySelector,\n pQuerySelectorAll: () => pQuerySelectorAll\n});\n\n// src/util/AsyncIterableUtil.ts\nvar AsyncIterableUtil = class {\n static async *map(iterable, map) {\n for await (const value of iterable) {\n yield await map(value);\n }\n }\n static async *flatMap(iterable, map) {\n for await (const value of iterable) {\n yield* map(value);\n }\n }\n static async collect(iterable) {\n const result = [];\n for await (const value of iterable) {\n result.push(value);\n }\n return result;\n }\n static async first(iterable) {\n for await (const value of iterable) {\n return value;\n }\n return;\n }\n};\n\n// src/util/ErrorLike.ts\nfunction isErrorLike(obj) {\n return typeof obj === "object" && obj !== null && "name" in obj && "message" in obj;\n}\n\n// src/injected/PSelectorParser.ts\nvar PUPPETEER_PSEUDO_ELEMENT = /^::-p-([-a-zA-Z_]+)\\(/;\nvar PSelectorParser = class {\n #input;\n #escaped = false;\n #quoted = false;\n #selectors = [[[]]];\n constructor(input) {\n this.#input = input;\n }\n get selectors() {\n return this.#selectors;\n }\n parse() {\n for (let i = 0; i < this.#input.length; ++i) {\n if (this.#escaped) {\n this.#escaped = false;\n continue;\n }\n switch (this.#input[i]) {\n case "\\\\": {\n this.#escaped = true;\n break;\n }\n case \'"\': {\n this.#quoted = !this.#quoted;\n break;\n }\n default: {\n if (this.#quoted) {\n break;\n }\n const remainder = this.#input.slice(i);\n if (remainder.startsWith(">>>>")) {\n this.#push(this.#input.slice(0, i));\n this.#input = remainder.slice(">>>>".length);\n this.#parseDeepChild();\n } else if (remainder.startsWith(">>>")) {\n this.#push(this.#input.slice(0, i));\n this.#input = remainder.slice(">>>".length);\n this.#parseDeepDescendent();\n } else {\n const result = PUPPETEER_PSEUDO_ELEMENT.exec(remainder);\n if (!result) {\n continue;\n }\n const [match, name] = result;\n this.#push(this.#input.slice(0, i));\n this.#input = remainder.slice(match.length);\n this.#push({\n name,\n value: this.#scanParameter()\n });\n }\n }\n }\n }\n this.#push(this.#input);\n }\n #push(selector) {\n if (typeof selector === "string") {\n selector = selector.trimEnd();\n if (selector.length === 0) {\n return;\n }\n }\n const roots = this.#selectors[this.#selectors.length - 1];\n roots[roots.length - 1].push(selector);\n }\n #parseDeepChild() {\n this.#selectors[this.#selectors.length - 1].push([]);\n }\n #parseDeepDescendent() {\n this.#selectors.push([[]]);\n }\n #scanParameter() {\n const char = this.#input[0];\n switch (char) {\n case "\'":\n case \'"\':\n this.#input = this.#input.slice(1);\n const parameter = this.#scanEscapedValueTill(char);\n if (!this.#input.startsWith(")")) {\n throw new Error("Expected \')\'");\n }\n this.#input = this.#input.slice(1);\n return parameter;\n default:\n return this.#scanEscapedValueTill(")");\n }\n }\n #scanEscapedValueTill(end) {\n let string = "";\n for (let i = 0; i < this.#input.length; ++i) {\n if (this.#escaped) {\n this.#escaped = false;\n string += this.#input[i];\n continue;\n }\n switch (this.#input[i]) {\n case "\\\\": {\n this.#escaped = true;\n break;\n }\n case end: {\n this.#input = this.#input.slice(i + 1);\n return string;\n }\n default: {\n string += this.#input[i];\n }\n }\n }\n throw new Error(`Expected \\`${end}\\``);\n }\n};\nfunction parsePSelectors(selector) {\n const parser = new PSelectorParser(selector);\n parser.parse();\n return parser.selectors;\n}\n\n// src/injected/util.ts\nvar util_exports = {};\n__export(util_exports, {\n checkVisibility: () => checkVisibility,\n deepChildren: () => deepChildren,\n deepDescendents: () => deepDescendents\n});\nvar HIDDEN_VISIBILITY_VALUES = ["hidden", "collapse"];\nvar checkVisibility = (node, visible) => {\n if (!node) {\n return visible === false;\n }\n if (visible === void 0) {\n return node;\n }\n const element = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;\n const style = window.getComputedStyle(element);\n const isVisible = style && !HIDDEN_VISIBILITY_VALUES.includes(style.visibility) && !isBoundingBoxEmpty(element);\n return visible === isVisible ? node : false;\n};\nfunction isBoundingBoxEmpty(element) {\n const rect = element.getBoundingClientRect();\n return rect.width === 0 || rect.height === 0;\n}\nfunction* deepChildren(root) {\n const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT);\n let node = walker.nextNode();\n for (; node; node = walker.nextNode()) {\n yield node.shadowRoot ?? node;\n }\n}\nfunction* deepDescendents(root) {\n const walkers = [document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT)];\n let walker;\n while (walker = walkers.shift()) {\n for (let node = walker.nextNode(); node; node = walker.nextNode()) {\n if (!node.shadowRoot) {\n yield node;\n continue;\n }\n walkers.push(\n document.createTreeWalker(node.shadowRoot, NodeFilter.SHOW_ELEMENT)\n );\n yield node.shadowRoot;\n }\n }\n}\n\n// src/injected/XPathQuerySelector.ts\nvar XPathQuerySelector_exports = {};\n__export(XPathQuerySelector_exports, {\n xpathQuerySelectorAll: () => xpathQuerySelectorAll\n});\nvar xpathQuerySelectorAll = function* (root, selector) {\n const doc = root.ownerDocument || document;\n const iterator = doc.evaluate(\n selector,\n root,\n null,\n XPathResult.ORDERED_NODE_ITERATOR_TYPE\n );\n let item;\n while (item = iterator.iterateNext()) {\n yield item;\n }\n};\n\n// src/injected/PQuerySelector.ts\nvar SelectorError = class extends Error {\n constructor(selector, message) {\n super(`${selector} is not a valid selector: ${message}`);\n }\n};\nvar PQueryEngine = class {\n #input;\n #deepShadowSelectors;\n #shadowSelectors;\n #selectors;\n #selector;\n elements;\n constructor(element, selector) {\n this.#input = selector.trim();\n if (this.#input.length === 0) {\n throw new SelectorError(this.#input, "The provided selector is empty.");\n }\n try {\n this.#deepShadowSelectors = parsePSelectors(this.#input);\n } catch (error) {\n if (!isErrorLike(error)) {\n throw new SelectorError(this.#input, String(error));\n }\n throw new SelectorError(this.#input, error.message);\n }\n if (this.#deepShadowSelectors.some((shadowSelectors) => {\n return shadowSelectors.some((selectors) => {\n return selectors.length === 0;\n });\n })) {\n throw new SelectorError(\n this.#input,\n "Multiple deep combinators found in sequence."\n );\n }\n this.#shadowSelectors = this.#deepShadowSelectors.shift();\n this.#selectors = this.#shadowSelectors.shift();\n this.#selector = this.#selectors.shift();\n this.elements = [element];\n }\n async run() {\n if (typeof this.#selector === "string") {\n switch (this.#selector.trimStart()) {\n case ":scope":\n this.#next();\n break;\n default:\n this.#selector = ` ${this.#selector}`;\n break;\n }\n }\n for (; this.#selector !== void 0; this.#next()) {\n const selector = this.#selector;\n const input = this.#input;\n this.elements = AsyncIterableUtil.flatMap(\n this.elements,\n async function* (element) {\n if (typeof selector === "string") {\n if (!element.parentElement) {\n yield* element.querySelectorAll(selector);\n return;\n }\n let index = 0;\n for (const child of element.parentElement.children) {\n ++index;\n if (child === element) {\n break;\n }\n }\n yield* element.parentElement.querySelectorAll(\n `:scope > :nth-child(${index})${selector}`\n );\n return;\n }\n switch (selector.name) {\n case "text":\n yield* textQuerySelectorAll(element, selector.value);\n break;\n case "xpath":\n yield* xpathQuerySelectorAll(element, selector.value);\n break;\n case "aria":\n yield* ariaQuerySelectorAll(element, selector.value);\n break;\n default:\n const querySelector = customQuerySelectors.get(selector.name);\n if (!querySelector) {\n throw new SelectorError(\n input,\n `Unknown selector type: ${selector.name}`\n );\n }\n yield* querySelector.querySelectorAll(element, selector.value);\n }\n }\n );\n }\n }\n #next() {\n if (this.#selectors.length === 0) {\n if (this.#shadowSelectors.length === 0) {\n if (this.#deepShadowSelectors.length === 0) {\n this.#selector = void 0;\n return;\n }\n this.elements = AsyncIterableUtil.flatMap(\n this.elements,\n function* (element) {\n yield* deepDescendents(element);\n }\n );\n this.#shadowSelectors = this.#deepShadowSelectors.shift();\n }\n this.elements = AsyncIterableUtil.flatMap(\n this.elements,\n function* (element) {\n yield* deepChildren(element);\n }\n );\n this.#selectors = this.#shadowSelectors.shift();\n }\n this.#selector = this.#selectors.shift();\n }\n};\nvar pQuerySelectorAll = async function* (root, selector) {\n const query = new PQueryEngine(root, selector);\n query.run();\n yield* query.elements;\n};\nvar pQuerySelector = async function(root, selector) {\n for await (const element of pQuerySelectorAll(root, selector)) {\n return element;\n }\n return null;\n};\n\n// src/injected/injected.ts\nvar PuppeteerUtil = Object.freeze({\n ...ARIAQuerySelector_exports,\n ...CustomQuerySelector_exports,\n ...PierceQuerySelector_exports,\n ...PQuerySelector_exports,\n ...TextQuerySelector_exports,\n ...util_exports,\n ...XPathQuerySelector_exports,\n createDeferredPromise,\n createFunction,\n createTextContent,\n IntervalPoller,\n isSuitableNodeForTextMatching,\n MutationPoller,\n RAFPoller\n});\nvar injected_default = PuppeteerUtil;\n'; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/ScriptInjector.js var require_ScriptInjector = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/ScriptInjector.js"(exports2) { "use strict"; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var _ScriptInjector_instances; var _ScriptInjector_updated; var _ScriptInjector_amendments; var _ScriptInjector_update; var _ScriptInjector_get; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.scriptInjector = void 0; var injected_js_1 = require_injected(); var ScriptInjector = class { constructor() { _ScriptInjector_instances.add(this); _ScriptInjector_updated.set(this, false); _ScriptInjector_amendments.set(this, /* @__PURE__ */ new Set()); } // Appends a statement of the form `(PuppeteerUtil) => {...}`. append(statement) { __classPrivateFieldGet(this, _ScriptInjector_instances, "m", _ScriptInjector_update).call(this, () => { __classPrivateFieldGet(this, _ScriptInjector_amendments, "f").add(statement); }); } pop(statement) { __classPrivateFieldGet(this, _ScriptInjector_instances, "m", _ScriptInjector_update).call(this, () => { __classPrivateFieldGet(this, _ScriptInjector_amendments, "f").delete(statement); }); } inject(inject, force = false) { if (__classPrivateFieldGet(this, _ScriptInjector_updated, "f") || force) { inject(__classPrivateFieldGet(this, _ScriptInjector_instances, "m", _ScriptInjector_get).call(this)); } __classPrivateFieldSet(this, _ScriptInjector_updated, false, "f"); } }; _ScriptInjector_updated = /* @__PURE__ */ new WeakMap(), _ScriptInjector_amendments = /* @__PURE__ */ new WeakMap(), _ScriptInjector_instances = /* @__PURE__ */ new WeakSet(), _ScriptInjector_update = function _ScriptInjector_update2(callback) { callback(); __classPrivateFieldSet(this, _ScriptInjector_updated, true, "f"); }, _ScriptInjector_get = function _ScriptInjector_get2() { return `(() => { const module = {}; ${injected_js_1.source} ${[...__classPrivateFieldGet(this, _ScriptInjector_amendments, "f")].map((statement) => { return `(${statement})(module.exports.default);`; }).join("")} return module.exports.default; })()`; }; exports2.scriptInjector = new ScriptInjector(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/CustomQueryHandler.js var require_CustomQueryHandler = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/CustomQueryHandler.js"(exports2) { "use strict"; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _CustomQueryHandlerRegistry_handlers; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.clearCustomQueryHandlers = exports2.customQueryHandlerNames = exports2.unregisterCustomQueryHandler = exports2.registerCustomQueryHandler = exports2.customQueryHandlers = exports2.CustomQueryHandlerRegistry = void 0; var assert_js_1 = require_assert(); var Function_js_1 = require_Function(); var QueryHandler_js_1 = require_QueryHandler(); var ScriptInjector_js_1 = require_ScriptInjector(); var CustomQueryHandlerRegistry = class { constructor() { _CustomQueryHandlerRegistry_handlers.set(this, /* @__PURE__ */ new Map()); } /** * @internal */ get(name) { const handler = __classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f").get(name); return handler ? handler[1] : void 0; } /** * Registers a {@link CustomQueryHandler | custom query handler}. * * @remarks * After registration, the handler can be used everywhere where a selector is * expected by prepending the selection string with `/`. The name is * only allowed to consist of lower- and upper case latin letters. * * @example * * ```ts * Puppeteer.customQueryHandlers.register('lit', { … }); * const aHandle = await page.$('lit/…'); * ``` * * @param name - Name to register under. * @param queryHandler - {@link CustomQueryHandler | Custom query handler} to * register. * * @internal */ register(name, handler) { var _a; if (__classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f").has(name)) { throw new Error(`Cannot register over existing handler: ${name}`); } (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f").has(name), `Cannot register over existing handler: ${name}`); (0, assert_js_1.assert)(/^[a-zA-Z]+$/.test(name), `Custom query handler names may only contain [a-zA-Z]`); (0, assert_js_1.assert)(handler.queryAll || handler.queryOne, `At least one query method must be implemented.`); const Handler = (_a = class extends QueryHandler_js_1.QueryHandler { }, _a.querySelectorAll = (0, Function_js_1.interpolateFunction)((node, selector, PuppeteerUtil) => { return PuppeteerUtil.customQuerySelectors.get(PLACEHOLDER("name")).querySelectorAll(node, selector); }, { name: JSON.stringify(name) }), _a.querySelector = (0, Function_js_1.interpolateFunction)((node, selector, PuppeteerUtil) => { return PuppeteerUtil.customQuerySelectors.get(PLACEHOLDER("name")).querySelector(node, selector); }, { name: JSON.stringify(name) }), _a); const registerScript = (0, Function_js_1.interpolateFunction)((PuppeteerUtil) => { PuppeteerUtil.customQuerySelectors.register(PLACEHOLDER("name"), { queryAll: PLACEHOLDER("queryAll"), queryOne: PLACEHOLDER("queryOne") }); }, { name: JSON.stringify(name), queryAll: handler.queryAll ? (0, Function_js_1.stringifyFunction)(handler.queryAll) : String(void 0), queryOne: handler.queryOne ? (0, Function_js_1.stringifyFunction)(handler.queryOne) : String(void 0) }).toString(); __classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f").set(name, [registerScript, Handler]); ScriptInjector_js_1.scriptInjector.append(registerScript); } /** * Unregisters the {@link CustomQueryHandler | custom query handler} for the * given name. * * @throws `Error` if there is no handler under the given name. * * @internal */ unregister(name) { const handler = __classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f").get(name); if (!handler) { throw new Error(`Cannot unregister unknown handler: ${name}`); } ScriptInjector_js_1.scriptInjector.pop(handler[0]); __classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f").delete(name); } /** * Gets the names of all {@link CustomQueryHandler | custom query handlers}. * * @internal */ names() { return [...__classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f").keys()]; } /** * Unregisters all custom query handlers. * * @internal */ clear() { for (const [registerScript] of __classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f")) { ScriptInjector_js_1.scriptInjector.pop(registerScript); } __classPrivateFieldGet(this, _CustomQueryHandlerRegistry_handlers, "f").clear(); } }; exports2.CustomQueryHandlerRegistry = CustomQueryHandlerRegistry; _CustomQueryHandlerRegistry_handlers = /* @__PURE__ */ new WeakMap(); exports2.customQueryHandlers = new CustomQueryHandlerRegistry(); function registerCustomQueryHandler(name, handler) { exports2.customQueryHandlers.register(name, handler); } exports2.registerCustomQueryHandler = registerCustomQueryHandler; function unregisterCustomQueryHandler(name) { exports2.customQueryHandlers.unregister(name); } exports2.unregisterCustomQueryHandler = unregisterCustomQueryHandler; function customQueryHandlerNames() { return exports2.customQueryHandlers.names(); } exports2.customQueryHandlerNames = customQueryHandlerNames; function clearCustomQueryHandlers() { exports2.customQueryHandlers.clear(); } exports2.clearCustomQueryHandlers = clearCustomQueryHandlers; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/PierceQueryHandler.js var require_PierceQueryHandler = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/PierceQueryHandler.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PierceQueryHandler = void 0; var QueryHandler_js_1 = require_QueryHandler(); var PierceQueryHandler = class extends QueryHandler_js_1.QueryHandler { }; exports2.PierceQueryHandler = PierceQueryHandler; PierceQueryHandler.querySelector = (element, selector, { pierceQuerySelector }) => { return pierceQuerySelector(element, selector); }; PierceQueryHandler.querySelectorAll = (element, selector, { pierceQuerySelectorAll }) => { return pierceQuerySelectorAll(element, selector); }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/PQueryHandler.js var require_PQueryHandler = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/PQueryHandler.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.PQueryHandler = void 0; var QueryHandler_js_1 = require_QueryHandler(); var PQueryHandler = class extends QueryHandler_js_1.QueryHandler { }; exports2.PQueryHandler = PQueryHandler; PQueryHandler.querySelectorAll = (element, selector, { pQuerySelectorAll }) => { return pQuerySelectorAll(element, selector); }; PQueryHandler.querySelector = (element, selector, { pQuerySelector }) => { return pQuerySelector(element, selector); }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/TextQueryHandler.js var require_TextQueryHandler = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/TextQueryHandler.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TextQueryHandler = void 0; var QueryHandler_js_1 = require_QueryHandler(); var TextQueryHandler = class extends QueryHandler_js_1.QueryHandler { }; exports2.TextQueryHandler = TextQueryHandler; TextQueryHandler.querySelectorAll = (element, selector, { textQuerySelectorAll }) => { return textQuerySelectorAll(element, selector); }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/XPathQueryHandler.js var require_XPathQueryHandler = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/XPathQueryHandler.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.XPathQueryHandler = void 0; var QueryHandler_js_1 = require_QueryHandler(); var XPathQueryHandler = class extends QueryHandler_js_1.QueryHandler { }; exports2.XPathQueryHandler = XPathQueryHandler; XPathQueryHandler.querySelectorAll = (element, selector, { xpathQuerySelectorAll }) => { return xpathQuerySelectorAll(element, selector); }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/GetQueryHandler.js var require_GetQueryHandler = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/GetQueryHandler.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getQueryHandlerAndSelector = exports2.getQueryHandlerByName = exports2.BUILTIN_QUERY_HANDLERS = void 0; var AriaQueryHandler_js_1 = require_AriaQueryHandler(); var CustomQueryHandler_js_1 = require_CustomQueryHandler(); var PierceQueryHandler_js_1 = require_PierceQueryHandler(); var PQueryHandler_js_1 = require_PQueryHandler(); var TextQueryHandler_js_1 = require_TextQueryHandler(); var XPathQueryHandler_js_1 = require_XPathQueryHandler(); exports2.BUILTIN_QUERY_HANDLERS = Object.freeze({ aria: AriaQueryHandler_js_1.ARIAQueryHandler, pierce: PierceQueryHandler_js_1.PierceQueryHandler, xpath: XPathQueryHandler_js_1.XPathQueryHandler, text: TextQueryHandler_js_1.TextQueryHandler }); var QUERY_SEPARATORS = ["=", "/"]; function getQueryHandlerByName(name) { if (name in exports2.BUILTIN_QUERY_HANDLERS) { return exports2.BUILTIN_QUERY_HANDLERS[name]; } return CustomQueryHandler_js_1.customQueryHandlers.get(name); } exports2.getQueryHandlerByName = getQueryHandlerByName; function getQueryHandlerAndSelector(selector) { for (const handlerMap of [ CustomQueryHandler_js_1.customQueryHandlers.names().map((name) => { return [name, CustomQueryHandler_js_1.customQueryHandlers.get(name)]; }), Object.entries(exports2.BUILTIN_QUERY_HANDLERS) ]) { for (const [name, QueryHandler] of handlerMap) { for (const separator of QUERY_SEPARATORS) { const prefix = `${name}${separator}`; if (selector.startsWith(prefix)) { selector = selector.slice(prefix.length); return { updatedSelector: selector, QueryHandler }; } } } } return { updatedSelector: selector, QueryHandler: PQueryHandler_js_1.PQueryHandler }; } exports2.getQueryHandlerAndSelector = getQueryHandlerAndSelector; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js var require_JSHandle2 = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js"(exports2) { "use strict"; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var _CDPJSHandle_disposed; var _CDPJSHandle_context; var _CDPJSHandle_remoteObject; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CDPJSHandle = void 0; var JSHandle_js_1 = require_JSHandle(); var assert_js_1 = require_assert(); var util_js_1 = require_util4(); var CDPJSHandle = class extends JSHandle_js_1.JSHandle { get disposed() { return __classPrivateFieldGet(this, _CDPJSHandle_disposed, "f"); } constructor(context, remoteObject) { super(); _CDPJSHandle_disposed.set(this, false); _CDPJSHandle_context.set(this, void 0); _CDPJSHandle_remoteObject.set(this, void 0); __classPrivateFieldSet(this, _CDPJSHandle_context, context, "f"); __classPrivateFieldSet(this, _CDPJSHandle_remoteObject, remoteObject, "f"); } executionContext() { return __classPrivateFieldGet(this, _CDPJSHandle_context, "f"); } get client() { return __classPrivateFieldGet(this, _CDPJSHandle_context, "f")._client; } /** * @see {@link ExecutionContext.evaluate} for more details. */ async evaluate(pageFunction, ...args) { return await this.executionContext().evaluate(pageFunction, this, ...args); } /** * @see {@link ExecutionContext.evaluateHandle} for more details. */ async evaluateHandle(pageFunction, ...args) { return await this.executionContext().evaluateHandle(pageFunction, this, ...args); } async getProperty(propertyName) { return this.evaluateHandle((object, propertyName2) => { return object[propertyName2]; }, propertyName); } async getProperties() { (0, assert_js_1.assert)(__classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f").objectId); const response = await this.client.send("Runtime.getProperties", { objectId: __classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f").objectId, ownProperties: true }); const result = /* @__PURE__ */ new Map(); for (const property of response.result) { if (!property.enumerable || !property.value) { continue; } result.set(property.name, (0, util_js_1.createJSHandle)(__classPrivateFieldGet(this, _CDPJSHandle_context, "f"), property.value)); } return result; } async jsonValue() { if (!__classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f").objectId) { return (0, util_js_1.valueFromRemoteObject)(__classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f")); } const value = await this.evaluate((object) => { return object; }); if (value === void 0) { throw new Error("Could not serialize referenced object"); } return value; } /** * @returns Either `null` or the handle itself if the handle is an * instance of {@link ElementHandle}. */ asElement() { return null; } async dispose() { if (__classPrivateFieldGet(this, _CDPJSHandle_disposed, "f")) { return; } __classPrivateFieldSet(this, _CDPJSHandle_disposed, true, "f"); await (0, util_js_1.releaseObject)(this.client, __classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f")); } toString() { if (!__classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f").objectId) { return "JSHandle:" + (0, util_js_1.valueFromRemoteObject)(__classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f")); } const type = __classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f").subtype || __classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f").type; return "JSHandle@" + type; } get id() { return __classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f").objectId; } remoteObject() { return __classPrivateFieldGet(this, _CDPJSHandle_remoteObject, "f"); } }; exports2.CDPJSHandle = CDPJSHandle; _CDPJSHandle_disposed = /* @__PURE__ */ new WeakMap(), _CDPJSHandle_context = /* @__PURE__ */ new WeakMap(), _CDPJSHandle_remoteObject = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/ElementHandle.js var require_ElementHandle2 = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/ElementHandle.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } __setModuleDefault(result, mod); return result; }; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _CDPElementHandle_instances; var _CDPElementHandle_frame; var _CDPElementHandle_jsHandle; var _CDPElementHandle_frameManager_get; var _CDPElementHandle_page_get; var _CDPElementHandle_scrollIntoViewIfNeeded; var _CDPElementHandle_getOOPIFOffsets; var _CDPElementHandle_getBoxModel; var _CDPElementHandle_fromProtocolQuad; var _CDPElementHandle_intersectQuadWithViewport; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CDPElementHandle = void 0; var ElementHandle_js_1 = require_ElementHandle(); var assert_js_1 = require_assert(); var GetQueryHandler_js_1 = require_GetQueryHandler(); var AsyncIterableUtil_js_1 = require_AsyncIterableUtil(); var util_js_1 = require_util4(); var JSHandle_js_1 = require_JSHandle2(); var applyOffsetsToQuad = (quad, offsetX, offsetY) => { return quad.map((part) => { return { x: part.x + offsetX, y: part.y + offsetY }; }); }; var CDPElementHandle = class extends ElementHandle_js_1.ElementHandle { constructor(context, remoteObject, frame) { super(); _CDPElementHandle_instances.add(this); _CDPElementHandle_frame.set(this, void 0); _CDPElementHandle_jsHandle.set(this, void 0); __classPrivateFieldSet(this, _CDPElementHandle_jsHandle, new JSHandle_js_1.CDPJSHandle(context, remoteObject), "f"); __classPrivateFieldSet(this, _CDPElementHandle_frame, frame, "f"); } /** * @internal */ executionContext() { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").executionContext(); } /** * @internal */ get client() { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").client; } get id() { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").id; } remoteObject() { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").remoteObject(); } async evaluate(pageFunction, ...args) { return this.executionContext().evaluate(pageFunction, this, ...args); } evaluateHandle(pageFunction, ...args) { return this.executionContext().evaluateHandle(pageFunction, this, ...args); } get frame() { return __classPrivateFieldGet(this, _CDPElementHandle_frame, "f"); } get disposed() { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").disposed; } async getProperty(propertyName) { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").getProperty(propertyName); } async getProperties() { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").getProperties(); } asElement() { return this; } async jsonValue() { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").jsonValue(); } toString() { return __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").toString(); } async dispose() { return await __classPrivateFieldGet(this, _CDPElementHandle_jsHandle, "f").dispose(); } async $(selector) { const { updatedSelector, QueryHandler } = (0, GetQueryHandler_js_1.getQueryHandlerAndSelector)(selector); return await QueryHandler.queryOne(this, updatedSelector); } async $$(selector) { const { updatedSelector, QueryHandler } = (0, GetQueryHandler_js_1.getQueryHandlerAndSelector)(selector); return AsyncIterableUtil_js_1.AsyncIterableUtil.collect(QueryHandler.queryAll(this, updatedSelector)); } async $eval(selector, pageFunction, ...args) { const elementHandle = await this.$(selector); if (!elementHandle) { throw new Error(`Error: failed to find element matching selector "${selector}"`); } const result = await elementHandle.evaluate(pageFunction, ...args); await elementHandle.dispose(); return result; } async $$eval(selector, pageFunction, ...args) { const results = await this.$$(selector); const elements = await this.evaluateHandle((_, ...elements2) => { return elements2; }, ...results); const [result] = await Promise.all([ elements.evaluate(pageFunction, ...args), ...results.map((results2) => { return results2.dispose(); }) ]); await elements.dispose(); return result; } async $x(expression) { if (expression.startsWith("//")) { expression = `.${expression}`; } return this.$$(`xpath/${expression}`); } async waitForSelector(selector, options2 = {}) { const { updatedSelector, QueryHandler } = (0, GetQueryHandler_js_1.getQueryHandlerAndSelector)(selector); return await QueryHandler.waitFor(this, updatedSelector, options2); } async waitForXPath(xpath, options2 = {}) { if (xpath.startsWith("//")) { xpath = `.${xpath}`; } return this.waitForSelector(`xpath/${xpath}`, options2); } async toElement(tagName) { const isMatchingTagName = await this.evaluate((node, tagName2) => { return node.nodeName === tagName2.toUpperCase(); }, tagName); if (!isMatchingTagName) { throw new Error(`Element is not a(n) \`${tagName}\` element`); } return this; } async contentFrame() { const nodeInfo = await this.client.send("DOM.describeNode", { objectId: this.remoteObject().objectId }); if (typeof nodeInfo.node.frameId !== "string") { return null; } return __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_frameManager_get).frame(nodeInfo.node.frameId); } async clickablePoint(offset) { const [result, layoutMetrics] = await Promise.all([ this.client.send("DOM.getContentQuads", { objectId: this.remoteObject().objectId }).catch(util_js_1.debugError), __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get)._client().send("Page.getLayoutMetrics") ]); if (!result || !result.quads.length) { throw new Error("Node is either not clickable or not an HTMLElement"); } const { clientWidth, clientHeight } = layoutMetrics.cssLayoutViewport || layoutMetrics.layoutViewport; const { offsetX, offsetY } = await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_getOOPIFOffsets).call(this, __classPrivateFieldGet(this, _CDPElementHandle_frame, "f")); const quads = result.quads.map((quad2) => { return __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_fromProtocolQuad).call(this, quad2); }).map((quad2) => { return applyOffsetsToQuad(quad2, offsetX, offsetY); }).map((quad2) => { return __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_intersectQuadWithViewport).call(this, quad2, clientWidth, clientHeight); }).filter((quad2) => { return computeQuadArea(quad2) > 1; }); if (!quads.length) { throw new Error("Node is either not clickable or not an HTMLElement"); } const quad = quads[0]; if (offset) { let minX = Number.MAX_SAFE_INTEGER; let minY = Number.MAX_SAFE_INTEGER; for (const point of quad) { if (point.x < minX) { minX = point.x; } if (point.y < minY) { minY = point.y; } } if (minX !== Number.MAX_SAFE_INTEGER && minY !== Number.MAX_SAFE_INTEGER) { return { x: minX + offset.x, y: minY + offset.y }; } } let x = 0; let y = 0; for (const point of quad) { x += point.x; y += point.y; } return { x: x / 4, y: y / 4 }; } /** * This method scrolls element into view if needed, and then * uses {@link Page.mouse} to hover over the center of the element. * If the element is detached from DOM, the method throws an error. */ async hover() { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const { x, y } = await this.clickablePoint(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).mouse.move(x, y); } /** * This method scrolls element into view if needed, and then * uses {@link Page.mouse} to click in the center of the element. * If the element is detached from DOM, the method throws an error. */ async click(options2 = {}) { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const { x, y } = await this.clickablePoint(options2.offset); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).mouse.click(x, y, options2); } /** * This method creates and captures a dragevent from the element. */ async drag(target) { (0, assert_js_1.assert)(__classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).isDragInterceptionEnabled(), "Drag Interception is not enabled!"); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const start = await this.clickablePoint(); return await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).mouse.drag(start, target); } async dragEnter(data = { items: [], dragOperationsMask: 1 }) { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const target = await this.clickablePoint(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).mouse.dragEnter(target, data); } async dragOver(data = { items: [], dragOperationsMask: 1 }) { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const target = await this.clickablePoint(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).mouse.dragOver(target, data); } async drop(data = { items: [], dragOperationsMask: 1 }) { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const destination = await this.clickablePoint(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).mouse.drop(destination, data); } async dragAndDrop(target, options2) { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const startPoint = await this.clickablePoint(); const targetPoint = await target.clickablePoint(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).mouse.dragAndDrop(startPoint, targetPoint, options2); } async select(...values) { for (const value of values) { (0, assert_js_1.assert)((0, util_js_1.isString)(value), 'Values must be strings. Found value "' + value + '" of type "' + typeof value + '"'); } return this.evaluate((element, vals) => { const values2 = new Set(vals); if (!(element instanceof HTMLSelectElement)) { throw new Error("Element is not a "); let path; try { path = await Promise.resolve().then(() => __importStar(require("path"))); } catch (error) { if (error instanceof TypeError) { throw new Error(`JSHandle#uploadFile can only be used in Node-like environments.`); } throw error; } const files2 = filePaths.map((filePath) => { if (path.win32.isAbsolute(filePath) || path.posix.isAbsolute(filePath)) { return filePath; } else { return path.resolve(filePath); } }); const { objectId } = this.remoteObject(); const { node } = await this.client.send("DOM.describeNode", { objectId }); const { backendNodeId } = node; if (files2.length === 0) { await this.evaluate((element) => { element.files = new DataTransfer().files; element.dispatchEvent(new Event("input", { bubbles: true })); element.dispatchEvent(new Event("change", { bubbles: true })); }); } else { await this.client.send("DOM.setFileInputFiles", { objectId, files: files2, backendNodeId }); } } async tap() { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const { x, y } = await this.clickablePoint(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).touchscreen.touchStart(x, y); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).touchscreen.touchEnd(); } async touchStart() { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const { x, y } = await this.clickablePoint(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).touchscreen.touchStart(x, y); } async touchMove() { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); const { x, y } = await this.clickablePoint(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).touchscreen.touchMove(x, y); } async touchEnd() { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).touchscreen.touchEnd(); } async focus() { await this.evaluate((element) => { if (!(element instanceof HTMLElement)) { throw new Error("Cannot focus non-HTMLElement"); } return element.focus(); }); } async type(text, options2) { await this.focus(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).keyboard.type(text, options2); } async press(key, options2) { await this.focus(); await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).keyboard.press(key, options2); } async boundingBox() { const result = await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_getBoxModel).call(this); if (!result) { return null; } const { offsetX, offsetY } = await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_getOOPIFOffsets).call(this, __classPrivateFieldGet(this, _CDPElementHandle_frame, "f")); const quad = result.model.border; const x = Math.min(quad[0], quad[2], quad[4], quad[6]); const y = Math.min(quad[1], quad[3], quad[5], quad[7]); const width = Math.max(quad[0], quad[2], quad[4], quad[6]) - x; const height = Math.max(quad[1], quad[3], quad[5], quad[7]) - y; return { x: x + offsetX, y: y + offsetY, width, height }; } async boxModel() { const result = await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_getBoxModel).call(this); if (!result) { return null; } const { offsetX, offsetY } = await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_getOOPIFOffsets).call(this, __classPrivateFieldGet(this, _CDPElementHandle_frame, "f")); const { content, padding, border, margin, width, height } = result.model; return { content: applyOffsetsToQuad(__classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_fromProtocolQuad).call(this, content), offsetX, offsetY), padding: applyOffsetsToQuad(__classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_fromProtocolQuad).call(this, padding), offsetX, offsetY), border: applyOffsetsToQuad(__classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_fromProtocolQuad).call(this, border), offsetX, offsetY), margin: applyOffsetsToQuad(__classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_fromProtocolQuad).call(this, margin), offsetX, offsetY), width, height }; } async screenshot(options2 = {}) { let needsViewportReset = false; let boundingBox = await this.boundingBox(); (0, assert_js_1.assert)(boundingBox, "Node is either not visible or not an HTMLElement"); const viewport = __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).viewport(); if (viewport && (boundingBox.width > viewport.width || boundingBox.height > viewport.height)) { const newViewport = { width: Math.max(viewport.width, Math.ceil(boundingBox.width)), height: Math.max(viewport.height, Math.ceil(boundingBox.height)) }; await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).setViewport(Object.assign({}, viewport, newViewport)); needsViewportReset = true; } await __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_scrollIntoViewIfNeeded).call(this); boundingBox = await this.boundingBox(); (0, assert_js_1.assert)(boundingBox, "Node is either not visible or not an HTMLElement"); (0, assert_js_1.assert)(boundingBox.width !== 0, "Node has 0 width."); (0, assert_js_1.assert)(boundingBox.height !== 0, "Node has 0 height."); const layoutMetrics = await this.client.send("Page.getLayoutMetrics"); const { pageX, pageY } = layoutMetrics.cssVisualViewport || layoutMetrics.layoutViewport; const clip = Object.assign({}, boundingBox); clip.x += pageX; clip.y += pageY; const imageData = await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).screenshot(Object.assign({}, { clip }, options2)); if (needsViewportReset && viewport) { await __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).setViewport(viewport); } return imageData; } async isIntersectingViewport(options2) { const { threshold = 0 } = options2 !== null && options2 !== void 0 ? options2 : {}; return await this.evaluate(async (element, threshold2) => { const visibleRatio = await new Promise((resolve) => { const observer = new IntersectionObserver((entries) => { resolve(entries[0].intersectionRatio); observer.disconnect(); }); observer.observe(element); }); return threshold2 === 1 ? visibleRatio === 1 : visibleRatio > threshold2; }, threshold); } }; exports2.CDPElementHandle = CDPElementHandle; _CDPElementHandle_frame = /* @__PURE__ */ new WeakMap(), _CDPElementHandle_jsHandle = /* @__PURE__ */ new WeakMap(), _CDPElementHandle_instances = /* @__PURE__ */ new WeakSet(), _CDPElementHandle_frameManager_get = function _CDPElementHandle_frameManager_get2() { return __classPrivateFieldGet(this, _CDPElementHandle_frame, "f")._frameManager; }, _CDPElementHandle_page_get = function _CDPElementHandle_page_get2() { return __classPrivateFieldGet(this, _CDPElementHandle_frame, "f").page(); }, _CDPElementHandle_scrollIntoViewIfNeeded = async function _CDPElementHandle_scrollIntoViewIfNeeded2() { const error = await this.evaluate(async (element) => { if (!element.isConnected) { return "Node is detached from document"; } if (element.nodeType !== Node.ELEMENT_NODE) { return "Node is not of type HTMLElement"; } return; }); if (error) { throw new Error(error); } try { await this.client.send("DOM.scrollIntoViewIfNeeded", { objectId: this.remoteObject().objectId }); } catch (_err) { await this.evaluate(async (element, pageJavascriptEnabled) => { const visibleRatio = async () => { return await new Promise((resolve) => { const observer = new IntersectionObserver((entries) => { resolve(entries[0].intersectionRatio); observer.disconnect(); }); observer.observe(element); }); }; if (!pageJavascriptEnabled || await visibleRatio() !== 1) { element.scrollIntoView({ block: "center", inline: "center", // @ts-expect-error Chrome still supports behavior: instant but // it's not in the spec so TS shouts We don't want to make this // breaking change in Puppeteer yet so we'll ignore the line. behavior: "instant" }); } }, __classPrivateFieldGet(this, _CDPElementHandle_instances, "a", _CDPElementHandle_page_get).isJavaScriptEnabled()); } }, _CDPElementHandle_getOOPIFOffsets = async function _CDPElementHandle_getOOPIFOffsets2(frame) { let offsetX = 0; let offsetY = 0; let currentFrame = frame; while (currentFrame && currentFrame.parentFrame()) { const parent = currentFrame.parentFrame(); if (!currentFrame.isOOPFrame() || !parent) { currentFrame = parent; continue; } const { backendNodeId } = await parent._client().send("DOM.getFrameOwner", { frameId: currentFrame._id }); const result = await parent._client().send("DOM.getBoxModel", { backendNodeId }); if (!result) { break; } const contentBoxQuad = result.model.content; const topLeftCorner = __classPrivateFieldGet(this, _CDPElementHandle_instances, "m", _CDPElementHandle_fromProtocolQuad).call(this, contentBoxQuad)[0]; offsetX += topLeftCorner.x; offsetY += topLeftCorner.y; currentFrame = parent; } return { offsetX, offsetY }; }, _CDPElementHandle_getBoxModel = function _CDPElementHandle_getBoxModel2() { const params = { objectId: this.id }; return this.client.send("DOM.getBoxModel", params).catch((error) => { return (0, util_js_1.debugError)(error); }); }, _CDPElementHandle_fromProtocolQuad = function _CDPElementHandle_fromProtocolQuad2(quad) { return [ { x: quad[0], y: quad[1] }, { x: quad[2], y: quad[3] }, { x: quad[4], y: quad[5] }, { x: quad[6], y: quad[7] } ]; }, _CDPElementHandle_intersectQuadWithViewport = function _CDPElementHandle_intersectQuadWithViewport2(quad, width, height) { return quad.map((point) => { return { x: Math.min(Math.max(point.x, 0), width), y: Math.min(Math.max(point.y, 0), height) }; }); }; function computeQuadArea(quad) { let area = 0; for (let i = 0; i < quad.length; ++i) { const p1 = quad[i]; const p2 = quad[(i + 1) % quad.length]; area += (p1.x * p2.y - p2.x * p1.y) / 2; } return Math.abs(area); } } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/util.js var require_util4 = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/util.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getReadableFromProtocolStream = exports2.getReadableAsBuffer = exports2.importFS = exports2.waitWithTimeout = exports2.pageBindingInitString = exports2.addPageBinding = exports2.evaluationString = exports2.createJSHandle = exports2.waitForEvent = exports2.isDate = exports2.isRegExp = exports2.isPlainObject = exports2.isNumber = exports2.isString = exports2.removeEventListeners = exports2.addEventListener = exports2.releaseObject = exports2.valueFromRemoteObject = exports2.getExceptionMessage = exports2.debugError = void 0; var environment_js_1 = require_environment(); var assert_js_1 = require_assert(); var ErrorLike_js_1 = require_ErrorLike(); var Debug_js_1 = require_Debug(); var ElementHandle_js_1 = require_ElementHandle2(); var Errors_js_1 = require_Errors(); var JSHandle_js_1 = require_JSHandle2(); exports2.debugError = (0, Debug_js_1.debug)("puppeteer:error"); function getExceptionMessage(exceptionDetails) { if (exceptionDetails.exception) { return exceptionDetails.exception.description || exceptionDetails.exception.value; } let message = exceptionDetails.text; if (exceptionDetails.stackTrace) { for (const callframe of exceptionDetails.stackTrace.callFrames) { const location = callframe.url + ":" + callframe.lineNumber + ":" + callframe.columnNumber; const functionName = callframe.functionName || ""; message += ` at ${functionName} (${location})`; } } return message; } exports2.getExceptionMessage = getExceptionMessage; function valueFromRemoteObject(remoteObject) { (0, assert_js_1.assert)(!remoteObject.objectId, "Cannot extract value when objectId is given"); if (remoteObject.unserializableValue) { if (remoteObject.type === "bigint" && typeof BigInt !== "undefined") { return BigInt(remoteObject.unserializableValue.replace("n", "")); } switch (remoteObject.unserializableValue) { case "-0": return -0; case "NaN": return NaN; case "Infinity": return Infinity; case "-Infinity": return -Infinity; default: throw new Error("Unsupported unserializable value: " + remoteObject.unserializableValue); } } return remoteObject.value; } exports2.valueFromRemoteObject = valueFromRemoteObject; async function releaseObject(client, remoteObject) { if (!remoteObject.objectId) { return; } await client.send("Runtime.releaseObject", { objectId: remoteObject.objectId }).catch((error) => { (0, exports2.debugError)(error); }); } exports2.releaseObject = releaseObject; function addEventListener(emitter, eventName, handler) { emitter.on(eventName, handler); return { emitter, eventName, handler }; } exports2.addEventListener = addEventListener; function removeEventListeners(listeners) { for (const listener of listeners) { listener.emitter.removeListener(listener.eventName, listener.handler); } listeners.length = 0; } exports2.removeEventListeners = removeEventListeners; var isString = (obj) => { return typeof obj === "string" || obj instanceof String; }; exports2.isString = isString; var isNumber = (obj) => { return typeof obj === "number" || obj instanceof Number; }; exports2.isNumber = isNumber; var isPlainObject = (obj) => { return typeof obj === "object" && (obj === null || obj === void 0 ? void 0 : obj.constructor) === Object; }; exports2.isPlainObject = isPlainObject; var isRegExp = (obj) => { return typeof obj === "object" && (obj === null || obj === void 0 ? void 0 : obj.constructor) === RegExp; }; exports2.isRegExp = isRegExp; var isDate = (obj) => { return typeof obj === "object" && (obj === null || obj === void 0 ? void 0 : obj.constructor) === Date; }; exports2.isDate = isDate; async function waitForEvent(emitter, eventName, predicate, timeout, abortPromise) { let eventTimeout; let resolveCallback; let rejectCallback; const promise = new Promise((resolve, reject) => { resolveCallback = resolve; rejectCallback = reject; }); const listener = addEventListener(emitter, eventName, async (event) => { if (!await predicate(event)) { return; } resolveCallback(event); }); if (timeout) { eventTimeout = setTimeout(() => { rejectCallback(new Errors_js_1.TimeoutError("Timeout exceeded while waiting for event")); }, timeout); } function cleanup() { removeEventListeners([listener]); clearTimeout(eventTimeout); } const result = await Promise.race([promise, abortPromise]).then((r) => { cleanup(); return r; }, (error) => { cleanup(); throw error; }); if ((0, ErrorLike_js_1.isErrorLike)(result)) { throw result; } return result; } exports2.waitForEvent = waitForEvent; function createJSHandle(context, remoteObject) { if (remoteObject.subtype === "node" && context._world) { return new ElementHandle_js_1.CDPElementHandle(context, remoteObject, context._world.frame()); } return new JSHandle_js_1.CDPJSHandle(context, remoteObject); } exports2.createJSHandle = createJSHandle; function evaluationString(fun, ...args) { if ((0, exports2.isString)(fun)) { (0, assert_js_1.assert)(args.length === 0, "Cannot evaluate a string with arguments"); return fun; } function serializeArgument(arg) { if (Object.is(arg, void 0)) { return "undefined"; } return JSON.stringify(arg); } return `(${fun})(${args.map(serializeArgument).join(",")})`; } exports2.evaluationString = evaluationString; function addPageBinding(type, name) { const callCDP = globalThis[name]; Object.assign(globalThis, { [name](...args) { var _a, _b, _c; const callPuppeteer = globalThis[name]; (_a = callPuppeteer.args) !== null && _a !== void 0 ? _a : callPuppeteer.args = /* @__PURE__ */ new Map(); (_b = callPuppeteer.callbacks) !== null && _b !== void 0 ? _b : callPuppeteer.callbacks = /* @__PURE__ */ new Map(); const seq = ((_c = callPuppeteer.lastSeq) !== null && _c !== void 0 ? _c : 0) + 1; callPuppeteer.lastSeq = seq; callPuppeteer.args.set(seq, args); callCDP(JSON.stringify({ type, name, seq, args, isTrivial: !args.some((value) => { return value instanceof Node; }) })); return new Promise((resolve, reject) => { callPuppeteer.callbacks.set(seq, { resolve(value) { callPuppeteer.args.delete(seq); resolve(value); }, reject(value) { callPuppeteer.args.delete(seq); reject(value); } }); }); } }); } exports2.addPageBinding = addPageBinding; function pageBindingInitString(type, name) { return evaluationString(addPageBinding, type, name); } exports2.pageBindingInitString = pageBindingInitString; async function waitWithTimeout(promise, taskName, timeout) { let reject; const timeoutError = new Errors_js_1.TimeoutError(`waiting for ${taskName} failed: timeout ${timeout}ms exceeded`); const timeoutPromise = new Promise((_res, rej) => { return reject = rej; }); let timeoutTimer = null; if (timeout) { timeoutTimer = setTimeout(() => { return reject(timeoutError); }, timeout); } try { return await Promise.race([promise, timeoutPromise]); } finally { if (timeoutTimer) { clearTimeout(timeoutTimer); } } } exports2.waitWithTimeout = waitWithTimeout; var fs = null; async function importFS() { if (!fs) { fs = await Promise.resolve().then(() => __importStar(require("fs"))); } return fs; } exports2.importFS = importFS; async function getReadableAsBuffer(readable, path) { const buffers = []; if (path) { let fs2; try { fs2 = (await importFS()).promises; } catch (error) { if (error instanceof TypeError) { throw new Error("Cannot write to a path outside of a Node-like environment."); } throw error; } const fileHandle = await fs2.open(path, "w+"); for await (const chunk of readable) { buffers.push(chunk); await fileHandle.writeFile(chunk); } await fileHandle.close(); } else { for await (const chunk of readable) { buffers.push(chunk); } } try { return Buffer.concat(buffers); } catch (error) { return null; } } exports2.getReadableAsBuffer = getReadableAsBuffer; async function getReadableFromProtocolStream(client, handle) { if (!environment_js_1.isNode) { throw new Error("Cannot create a stream outside of Node.js environment."); } const { Readable } = await Promise.resolve().then(() => __importStar(require("stream"))); let eof = false; return new Readable({ async read(size) { if (eof) { return; } const response = await client.send("IO.read", { handle, size }); this.push(response.data, response.base64Encoded ? "base64" : void 0); if (response.eof) { eof = true; await client.send("IO.close", { handle }); this.push(null); } } }); } exports2.getReadableFromProtocolStream = getReadableFromProtocolStream; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/Binding.js var require_Binding = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/Binding.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _Binding_name; var _Binding_fn; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Binding = void 0; var JSHandle_js_1 = require_JSHandle(); var ErrorLike_js_1 = require_ErrorLike(); var util_js_1 = require_util4(); var Binding = class { constructor(name, fn) { _Binding_name.set(this, void 0); _Binding_fn.set(this, void 0); __classPrivateFieldSet(this, _Binding_name, name, "f"); __classPrivateFieldSet(this, _Binding_fn, fn, "f"); } get name() { return __classPrivateFieldGet(this, _Binding_name, "f"); } /** * @param context - Context to run the binding in; the context should have * the binding added to it beforehand. * @param id - ID of the call. This should come from the CDP * `onBindingCalled` response. * @param args - Plain arguments from CDP. */ async run(context, id, args, isTrivial) { const garbage = []; try { if (!isTrivial) { const handles = await context.evaluateHandle((name, seq) => { return globalThis[name].args.get(seq); }, __classPrivateFieldGet(this, _Binding_name, "f"), id); try { const properties = await handles.getProperties(); for (const [index, handle] of properties) { if (index in args) { switch (handle.remoteObject().subtype) { case "node": args[+index] = handle; break; default: garbage.push(handle.dispose()); } } else { garbage.push(handle.dispose()); } } } finally { await handles.dispose(); } } await context.evaluate((name, seq, result) => { const callbacks = globalThis[name].callbacks; callbacks.get(seq).resolve(result); callbacks.delete(seq); }, __classPrivateFieldGet(this, _Binding_name, "f"), id, await __classPrivateFieldGet(this, _Binding_fn, "f").call(this, ...args)); for (const arg of args) { if (arg instanceof JSHandle_js_1.JSHandle) { garbage.push(arg.dispose()); } } } catch (error) { if ((0, ErrorLike_js_1.isErrorLike)(error)) { await context.evaluate((name, seq, message, stack) => { const error2 = new Error(message); error2.stack = stack; const callbacks = globalThis[name].callbacks; callbacks.get(seq).reject(error2); callbacks.delete(seq); }, __classPrivateFieldGet(this, _Binding_name, "f"), id, error.message, error.stack).catch(util_js_1.debugError); } else { await context.evaluate((name, seq, error2) => { const callbacks = globalThis[name].callbacks; callbacks.get(seq).reject(error2); callbacks.delete(seq); }, __classPrivateFieldGet(this, _Binding_name, "f"), id, error).catch(util_js_1.debugError); } } finally { await Promise.all(garbage); } } }; exports2.Binding = Binding; _Binding_name = /* @__PURE__ */ new WeakMap(), _Binding_fn = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js var require_ExecutionContext = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js"(exports2) { "use strict"; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var _ExecutionContext_instances; var _ExecutionContext_puppeteerUtil; var _ExecutionContext_installGlobalBinding; var _ExecutionContext_evaluate; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ExecutionContext = exports2.EVALUATION_SCRIPT_URL = void 0; var AsyncIterableUtil_js_1 = require_AsyncIterableUtil(); var Function_js_1 = require_Function(); var AriaQueryHandler_js_1 = require_AriaQueryHandler(); var Binding_js_1 = require_Binding(); var LazyArg_js_1 = require_LazyArg(); var ScriptInjector_js_1 = require_ScriptInjector(); var util_js_1 = require_util4(); var JSHandle_js_1 = require_JSHandle2(); var ElementHandle_js_1 = require_ElementHandle2(); exports2.EVALUATION_SCRIPT_URL = "pptr://__puppeteer_evaluation_script__"; var SOURCE_URL_REGEX = /^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m; var ExecutionContext = class { /** * @internal */ constructor(client, contextPayload, world) { _ExecutionContext_instances.add(this); _ExecutionContext_puppeteerUtil.set(this, void 0); this._client = client; this._world = world; this._contextId = contextPayload.id; if (contextPayload.name) { this._contextName = contextPayload.name; } } get puppeteerUtil() { ScriptInjector_js_1.scriptInjector.inject((script2) => { if (__classPrivateFieldGet(this, _ExecutionContext_puppeteerUtil, "f")) { __classPrivateFieldGet(this, _ExecutionContext_puppeteerUtil, "f").then((handle) => { handle.dispose(); }); } __classPrivateFieldSet(this, _ExecutionContext_puppeteerUtil, Promise.all([ __classPrivateFieldGet(this, _ExecutionContext_instances, "m", _ExecutionContext_installGlobalBinding).call(this, new Binding_js_1.Binding("__ariaQuerySelector", AriaQueryHandler_js_1.ARIAQueryHandler.queryOne)), __classPrivateFieldGet(this, _ExecutionContext_instances, "m", _ExecutionContext_installGlobalBinding).call(this, new Binding_js_1.Binding("__ariaQuerySelectorAll", async (element, selector) => { const results = AriaQueryHandler_js_1.ARIAQueryHandler.queryAll(element, selector); return element.executionContext().evaluateHandle((...elements) => { return elements; }, ...await AsyncIterableUtil_js_1.AsyncIterableUtil.collect(results)); })) ]).then(() => { return this.evaluateHandle(script2); }), "f"); }, !__classPrivateFieldGet(this, _ExecutionContext_puppeteerUtil, "f")); return __classPrivateFieldGet(this, _ExecutionContext_puppeteerUtil, "f"); } /** * Evaluates the given function. * * @example * * ```ts * const executionContext = await page.mainFrame().executionContext(); * const result = await executionContext.evaluate(() => Promise.resolve(8 * 7))* ; * console.log(result); // prints "56" * ``` * * @example * A string can also be passed in instead of a function: * * ```ts * console.log(await executionContext.evaluate('1 + 2')); // prints "3" * ``` * * @example * Handles can also be passed as `args`. They resolve to their referenced object: * * ```ts * const oneHandle = await executionContext.evaluateHandle(() => 1); * const twoHandle = await executionContext.evaluateHandle(() => 2); * const result = await executionContext.evaluate( * (a, b) => a + b, * oneHandle, * twoHandle * ); * await oneHandle.dispose(); * await twoHandle.dispose(); * console.log(result); // prints '3'. * ``` * * @param pageFunction - The function to evaluate. * @param args - Additional arguments to pass into the function. * @returns The result of evaluating the function. If the result is an object, * a vanilla object containing the serializable properties of the result is * returned. */ async evaluate(pageFunction, ...args) { return await __classPrivateFieldGet(this, _ExecutionContext_instances, "m", _ExecutionContext_evaluate).call(this, true, pageFunction, ...args); } /** * Evaluates the given function. * * Unlike {@link ExecutionContext.evaluate | evaluate}, this method returns a * handle to the result of the function. * * This method may be better suited if the object cannot be serialized (e.g. * `Map`) and requires further manipulation. * * @example * * ```ts * const context = await page.mainFrame().executionContext(); * const handle: JSHandle = await context.evaluateHandle( * () => Promise.resolve(self) * ); * ``` * * @example * A string can also be passed in instead of a function. * * ```ts * const handle: JSHandle = await context.evaluateHandle('1 + 2'); * ``` * * @example * Handles can also be passed as `args`. They resolve to their referenced object: * * ```ts * const bodyHandle: ElementHandle = * await context.evaluateHandle(() => { * return document.body; * }); * const stringHandle: JSHandle = await context.evaluateHandle( * body => body.innerHTML, * body * ); * console.log(await stringHandle.jsonValue()); // prints body's innerHTML * // Always dispose your garbage! :) * await bodyHandle.dispose(); * await stringHandle.dispose(); * ``` * * @param pageFunction - The function to evaluate. * @param args - Additional arguments to pass into the function. * @returns A {@link JSHandle | handle} to the result of evaluating the * function. If the result is a `Node`, then this will return an * {@link ElementHandle | element handle}. */ async evaluateHandle(pageFunction, ...args) { return __classPrivateFieldGet(this, _ExecutionContext_instances, "m", _ExecutionContext_evaluate).call(this, false, pageFunction, ...args); } }; exports2.ExecutionContext = ExecutionContext; _ExecutionContext_puppeteerUtil = /* @__PURE__ */ new WeakMap(), _ExecutionContext_instances = /* @__PURE__ */ new WeakSet(), _ExecutionContext_installGlobalBinding = async function _ExecutionContext_installGlobalBinding2(binding) { try { if (this._world) { this._world._bindings.set(binding.name, binding); await this._world._addBindingToContext(this, binding.name); } } catch (e) { } }, _ExecutionContext_evaluate = async function _ExecutionContext_evaluate2(returnByValue, pageFunction, ...args) { const suffix = `//# sourceURL=${exports2.EVALUATION_SCRIPT_URL}`; if ((0, util_js_1.isString)(pageFunction)) { const contextId = this._contextId; const expression = pageFunction; const expressionWithSourceUrl = SOURCE_URL_REGEX.test(expression) ? expression : expression + "\n" + suffix; const { exceptionDetails: exceptionDetails2, result: remoteObject2 } = await this._client.send("Runtime.evaluate", { expression: expressionWithSourceUrl, contextId, returnByValue, awaitPromise: true, userGesture: true }).catch(rewriteError); if (exceptionDetails2) { throw new Error("Evaluation failed: " + (0, util_js_1.getExceptionMessage)(exceptionDetails2)); } return returnByValue ? (0, util_js_1.valueFromRemoteObject)(remoteObject2) : (0, util_js_1.createJSHandle)(this, remoteObject2); } let callFunctionOnPromise; try { callFunctionOnPromise = this._client.send("Runtime.callFunctionOn", { functionDeclaration: `${(0, Function_js_1.stringifyFunction)(pageFunction)} ${suffix} `, executionContextId: this._contextId, arguments: await Promise.all(args.map(convertArgument.bind(this))), returnByValue, awaitPromise: true, userGesture: true }); } catch (error) { if (error instanceof TypeError && error.message.startsWith("Converting circular structure to JSON")) { error.message += " Recursive objects are not allowed."; } throw error; } const { exceptionDetails, result: remoteObject } = await callFunctionOnPromise.catch(rewriteError); if (exceptionDetails) { throw new Error("Evaluation failed: " + (0, util_js_1.getExceptionMessage)(exceptionDetails)); } return returnByValue ? (0, util_js_1.valueFromRemoteObject)(remoteObject) : (0, util_js_1.createJSHandle)(this, remoteObject); async function convertArgument(arg) { if (arg instanceof LazyArg_js_1.LazyArg) { arg = await arg.get(this); } if (typeof arg === "bigint") { return { unserializableValue: `${arg.toString()}n` }; } if (Object.is(arg, -0)) { return { unserializableValue: "-0" }; } if (Object.is(arg, Infinity)) { return { unserializableValue: "Infinity" }; } if (Object.is(arg, -Infinity)) { return { unserializableValue: "-Infinity" }; } if (Object.is(arg, NaN)) { return { unserializableValue: "NaN" }; } const objectHandle = arg && (arg instanceof JSHandle_js_1.CDPJSHandle || arg instanceof ElementHandle_js_1.CDPElementHandle) ? arg : null; if (objectHandle) { if (objectHandle.executionContext() !== this) { throw new Error("JSHandles can be evaluated only in the context they were created!"); } if (objectHandle.disposed) { throw new Error("JSHandle is disposed!"); } if (objectHandle.remoteObject().unserializableValue) { return { unserializableValue: objectHandle.remoteObject().unserializableValue }; } if (!objectHandle.remoteObject().objectId) { return { value: objectHandle.remoteObject().value }; } return { objectId: objectHandle.remoteObject().objectId }; } return { value: arg }; } }; var rewriteError = (error) => { if (error.message.includes("Object reference chain is too long")) { return { result: { type: "undefined" } }; } if (error.message.includes("Object couldn't be returned by value")) { return { result: { type: "undefined" } }; } if (error.message.endsWith("Cannot find context with specified id") || error.message.endsWith("Inspected target navigated or closed")) { throw new Error("Execution context was destroyed, most likely because of a navigation."); } throw error; }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/util/DeferredPromise.js var require_DeferredPromise = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/util/DeferredPromise.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDeferredPromise = void 0; var Errors_js_1 = require_Errors(); function createDeferredPromise(opts) { let isResolved = false; let isRejected = false; let resolver; let rejector; const taskPromise = new Promise((resolve, reject) => { resolver = resolve; rejector = reject; }); const timeoutId = opts && opts.timeout > 0 ? setTimeout(() => { isRejected = true; rejector(new Errors_js_1.TimeoutError(opts.message)); }, opts.timeout) : void 0; return Object.assign(taskPromise, { resolved: () => { return isResolved; }, finished: () => { return isResolved || isRejected; }, resolve: (value) => { if (timeoutId) { clearTimeout(timeoutId); } isResolved = true; resolver(value); }, reject: (err) => { clearTimeout(timeoutId); isRejected = true; rejector(err); } }); } exports2.createDeferredPromise = createDeferredPromise; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/WebWorker.js var require_WebWorker = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/WebWorker.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _WebWorker_executionContext; var _WebWorker_client; var _WebWorker_url; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.WebWorker = void 0; var EventEmitter_js_1 = require_EventEmitter(); var ExecutionContext_js_1 = require_ExecutionContext(); var JSHandle_js_1 = require_JSHandle2(); var util_js_1 = require_util4(); var DeferredPromise_js_1 = require_DeferredPromise(); var WebWorker = class extends EventEmitter_js_1.EventEmitter { /** * @internal */ constructor(client, url2, consoleAPICalled, exceptionThrown) { super(); _WebWorker_executionContext.set(this, (0, DeferredPromise_js_1.createDeferredPromise)()); _WebWorker_client.set(this, void 0); _WebWorker_url.set(this, void 0); __classPrivateFieldSet(this, _WebWorker_client, client, "f"); __classPrivateFieldSet(this, _WebWorker_url, url2, "f"); __classPrivateFieldGet(this, _WebWorker_client, "f").once("Runtime.executionContextCreated", async (event) => { const context = new ExecutionContext_js_1.ExecutionContext(client, event.context); __classPrivateFieldGet(this, _WebWorker_executionContext, "f").resolve(context); }); __classPrivateFieldGet(this, _WebWorker_client, "f").on("Runtime.consoleAPICalled", async (event) => { const context = await __classPrivateFieldGet(this, _WebWorker_executionContext, "f"); return consoleAPICalled(event.type, event.args.map((object) => { return new JSHandle_js_1.CDPJSHandle(context, object); }), event.stackTrace); }); __classPrivateFieldGet(this, _WebWorker_client, "f").on("Runtime.exceptionThrown", (exception) => { return exceptionThrown(exception.exceptionDetails); }); __classPrivateFieldGet(this, _WebWorker_client, "f").send("Runtime.enable").catch(util_js_1.debugError); } /** * @internal */ async executionContext() { return __classPrivateFieldGet(this, _WebWorker_executionContext, "f"); } /** * @returns The URL of this web worker. */ url() { return __classPrivateFieldGet(this, _WebWorker_url, "f"); } /** * If the function passed to the `worker.evaluate` returns a Promise, then * `worker.evaluate` would wait for the promise to resolve and return its * value. If the function passed to the `worker.evaluate` returns a * non-serializable value, then `worker.evaluate` resolves to `undefined`. * DevTools Protocol also supports transferring some additional values that * are not serializable by `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`, and * bigint literals. * Shortcut for `await worker.executionContext()).evaluate(pageFunction, ...args)`. * * @param pageFunction - Function to be evaluated in the worker context. * @param args - Arguments to pass to `pageFunction`. * @returns Promise which resolves to the return value of `pageFunction`. */ async evaluate(pageFunction, ...args) { const context = await __classPrivateFieldGet(this, _WebWorker_executionContext, "f"); return context.evaluate(pageFunction, ...args); } /** * The only difference between `worker.evaluate` and `worker.evaluateHandle` * is that `worker.evaluateHandle` returns in-page object (JSHandle). If the * function passed to the `worker.evaluateHandle` returns a `Promise`, then * `worker.evaluateHandle` would wait for the promise to resolve and return * its value. Shortcut for * `await worker.executionContext()).evaluateHandle(pageFunction, ...args)` * * @param pageFunction - Function to be evaluated in the page context. * @param args - Arguments to pass to `pageFunction`. * @returns Promise which resolves to the return value of `pageFunction`. */ async evaluateHandle(pageFunction, ...args) { const context = await __classPrivateFieldGet(this, _WebWorker_executionContext, "f"); return context.evaluateHandle(pageFunction, ...args); } }; exports2.WebWorker = WebWorker; _WebWorker_executionContext = /* @__PURE__ */ new WeakMap(), _WebWorker_client = /* @__PURE__ */ new WeakMap(), _WebWorker_url = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.js var require_ConsoleMessage = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/ConsoleMessage.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _ConsoleMessage_type; var _ConsoleMessage_text; var _ConsoleMessage_args; var _ConsoleMessage_stackTraceLocations; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ConsoleMessage = void 0; var ConsoleMessage = class { /** * @public */ constructor(type, text, args, stackTraceLocations) { _ConsoleMessage_type.set(this, void 0); _ConsoleMessage_text.set(this, void 0); _ConsoleMessage_args.set(this, void 0); _ConsoleMessage_stackTraceLocations.set(this, void 0); __classPrivateFieldSet(this, _ConsoleMessage_type, type, "f"); __classPrivateFieldSet(this, _ConsoleMessage_text, text, "f"); __classPrivateFieldSet(this, _ConsoleMessage_args, args, "f"); __classPrivateFieldSet(this, _ConsoleMessage_stackTraceLocations, stackTraceLocations, "f"); } /** * @returns The type of the console message. */ type() { return __classPrivateFieldGet(this, _ConsoleMessage_type, "f"); } /** * @returns The text of the console message. */ text() { return __classPrivateFieldGet(this, _ConsoleMessage_text, "f"); } /** * @returns An array of arguments passed to the console. */ args() { return __classPrivateFieldGet(this, _ConsoleMessage_args, "f"); } /** * @returns The location of the console message. */ location() { var _a; return (_a = __classPrivateFieldGet(this, _ConsoleMessage_stackTraceLocations, "f")[0]) !== null && _a !== void 0 ? _a : {}; } /** * @returns The array of locations on the stack of the console message. */ stackTrace() { return __classPrivateFieldGet(this, _ConsoleMessage_stackTraceLocations, "f"); } }; exports2.ConsoleMessage = ConsoleMessage; _ConsoleMessage_type = /* @__PURE__ */ new WeakMap(), _ConsoleMessage_text = /* @__PURE__ */ new WeakMap(), _ConsoleMessage_args = /* @__PURE__ */ new WeakMap(), _ConsoleMessage_stackTraceLocations = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.js var require_Coverage = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/Coverage.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _Coverage_jsCoverage; var _Coverage_cssCoverage; var _JSCoverage_instances; var _JSCoverage_client; var _JSCoverage_enabled; var _JSCoverage_scriptURLs; var _JSCoverage_scriptSources; var _JSCoverage_eventListeners; var _JSCoverage_resetOnNavigation; var _JSCoverage_reportAnonymousScripts; var _JSCoverage_includeRawScriptCoverage; var _JSCoverage_onExecutionContextsCleared; var _JSCoverage_onScriptParsed; var _CSSCoverage_instances; var _CSSCoverage_client; var _CSSCoverage_enabled; var _CSSCoverage_stylesheetURLs; var _CSSCoverage_stylesheetSources; var _CSSCoverage_eventListeners; var _CSSCoverage_resetOnNavigation; var _CSSCoverage_onExecutionContextsCleared; var _CSSCoverage_onStyleSheet; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.CSSCoverage = exports2.JSCoverage = exports2.Coverage = void 0; var assert_js_1 = require_assert(); var util_js_1 = require_util4(); var ExecutionContext_js_1 = require_ExecutionContext(); var util_js_2 = require_util4(); var Coverage = class { constructor(client) { _Coverage_jsCoverage.set(this, void 0); _Coverage_cssCoverage.set(this, void 0); __classPrivateFieldSet(this, _Coverage_jsCoverage, new JSCoverage(client), "f"); __classPrivateFieldSet(this, _Coverage_cssCoverage, new CSSCoverage(client), "f"); } /** * @param options - Set of configurable options for coverage defaults to * `resetOnNavigation : true, reportAnonymousScripts : false,` * `includeRawScriptCoverage : false, useBlockCoverage : true` * @returns Promise that resolves when coverage is started. * * @remarks * Anonymous scripts are ones that don't have an associated url. These are * scripts that are dynamically created on the page using `eval` or * `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous * scripts URL will start with `debugger://VM` (unless a magic //# sourceURL * comment is present, in which case that will the be URL). */ async startJSCoverage(options2 = {}) { return await __classPrivateFieldGet(this, _Coverage_jsCoverage, "f").start(options2); } /** * @returns Promise that resolves to the array of coverage reports for * all scripts. * * @remarks * JavaScript Coverage doesn't include anonymous scripts by default. * However, scripts with sourceURLs are reported. */ async stopJSCoverage() { return await __classPrivateFieldGet(this, _Coverage_jsCoverage, "f").stop(); } /** * @param options - Set of configurable options for coverage, defaults to * `resetOnNavigation : true` * @returns Promise that resolves when coverage is started. */ async startCSSCoverage(options2 = {}) { return await __classPrivateFieldGet(this, _Coverage_cssCoverage, "f").start(options2); } /** * @returns Promise that resolves to the array of coverage reports * for all stylesheets. * @remarks * CSS Coverage doesn't include dynamically injected style tags * without sourceURLs. */ async stopCSSCoverage() { return await __classPrivateFieldGet(this, _Coverage_cssCoverage, "f").stop(); } }; exports2.Coverage = Coverage; _Coverage_jsCoverage = /* @__PURE__ */ new WeakMap(), _Coverage_cssCoverage = /* @__PURE__ */ new WeakMap(); var JSCoverage = class { constructor(client) { _JSCoverage_instances.add(this); _JSCoverage_client.set(this, void 0); _JSCoverage_enabled.set(this, false); _JSCoverage_scriptURLs.set(this, /* @__PURE__ */ new Map()); _JSCoverage_scriptSources.set(this, /* @__PURE__ */ new Map()); _JSCoverage_eventListeners.set(this, []); _JSCoverage_resetOnNavigation.set(this, false); _JSCoverage_reportAnonymousScripts.set(this, false); _JSCoverage_includeRawScriptCoverage.set(this, false); __classPrivateFieldSet(this, _JSCoverage_client, client, "f"); } async start(options2 = {}) { (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _JSCoverage_enabled, "f"), "JSCoverage is already enabled"); const { resetOnNavigation = true, reportAnonymousScripts = false, includeRawScriptCoverage = false, useBlockCoverage = true } = options2; __classPrivateFieldSet(this, _JSCoverage_resetOnNavigation, resetOnNavigation, "f"); __classPrivateFieldSet(this, _JSCoverage_reportAnonymousScripts, reportAnonymousScripts, "f"); __classPrivateFieldSet(this, _JSCoverage_includeRawScriptCoverage, includeRawScriptCoverage, "f"); __classPrivateFieldSet(this, _JSCoverage_enabled, true, "f"); __classPrivateFieldGet(this, _JSCoverage_scriptURLs, "f").clear(); __classPrivateFieldGet(this, _JSCoverage_scriptSources, "f").clear(); __classPrivateFieldSet(this, _JSCoverage_eventListeners, [ (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _JSCoverage_client, "f"), "Debugger.scriptParsed", __classPrivateFieldGet(this, _JSCoverage_instances, "m", _JSCoverage_onScriptParsed).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _JSCoverage_client, "f"), "Runtime.executionContextsCleared", __classPrivateFieldGet(this, _JSCoverage_instances, "m", _JSCoverage_onExecutionContextsCleared).bind(this)) ], "f"); await Promise.all([ __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Profiler.enable"), __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Profiler.startPreciseCoverage", { callCount: __classPrivateFieldGet(this, _JSCoverage_includeRawScriptCoverage, "f"), detailed: useBlockCoverage }), __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Debugger.enable"), __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Debugger.setSkipAllPauses", { skip: true }) ]); } async stop() { (0, assert_js_1.assert)(__classPrivateFieldGet(this, _JSCoverage_enabled, "f"), "JSCoverage is not enabled"); __classPrivateFieldSet(this, _JSCoverage_enabled, false, "f"); const result = await Promise.all([ __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Profiler.takePreciseCoverage"), __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Profiler.stopPreciseCoverage"), __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Profiler.disable"), __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Debugger.disable") ]); (0, util_js_2.removeEventListeners)(__classPrivateFieldGet(this, _JSCoverage_eventListeners, "f")); const coverage = []; const profileResponse = result[0]; for (const entry of profileResponse.result) { let url2 = __classPrivateFieldGet(this, _JSCoverage_scriptURLs, "f").get(entry.scriptId); if (!url2 && __classPrivateFieldGet(this, _JSCoverage_reportAnonymousScripts, "f")) { url2 = "debugger://VM" + entry.scriptId; } const text = __classPrivateFieldGet(this, _JSCoverage_scriptSources, "f").get(entry.scriptId); if (text === void 0 || url2 === void 0) { continue; } const flattenRanges = []; for (const func of entry.functions) { flattenRanges.push(...func.ranges); } const ranges = convertToDisjointRanges(flattenRanges); if (!__classPrivateFieldGet(this, _JSCoverage_includeRawScriptCoverage, "f")) { coverage.push({ url: url2, ranges, text }); } else { coverage.push({ url: url2, ranges, text, rawScriptCoverage: entry }); } } return coverage; } }; exports2.JSCoverage = JSCoverage; _JSCoverage_client = /* @__PURE__ */ new WeakMap(), _JSCoverage_enabled = /* @__PURE__ */ new WeakMap(), _JSCoverage_scriptURLs = /* @__PURE__ */ new WeakMap(), _JSCoverage_scriptSources = /* @__PURE__ */ new WeakMap(), _JSCoverage_eventListeners = /* @__PURE__ */ new WeakMap(), _JSCoverage_resetOnNavigation = /* @__PURE__ */ new WeakMap(), _JSCoverage_reportAnonymousScripts = /* @__PURE__ */ new WeakMap(), _JSCoverage_includeRawScriptCoverage = /* @__PURE__ */ new WeakMap(), _JSCoverage_instances = /* @__PURE__ */ new WeakSet(), _JSCoverage_onExecutionContextsCleared = function _JSCoverage_onExecutionContextsCleared2() { if (!__classPrivateFieldGet(this, _JSCoverage_resetOnNavigation, "f")) { return; } __classPrivateFieldGet(this, _JSCoverage_scriptURLs, "f").clear(); __classPrivateFieldGet(this, _JSCoverage_scriptSources, "f").clear(); }, _JSCoverage_onScriptParsed = async function _JSCoverage_onScriptParsed2(event) { if (event.url === ExecutionContext_js_1.EVALUATION_SCRIPT_URL) { return; } if (!event.url && !__classPrivateFieldGet(this, _JSCoverage_reportAnonymousScripts, "f")) { return; } try { const response = await __classPrivateFieldGet(this, _JSCoverage_client, "f").send("Debugger.getScriptSource", { scriptId: event.scriptId }); __classPrivateFieldGet(this, _JSCoverage_scriptURLs, "f").set(event.scriptId, event.url); __classPrivateFieldGet(this, _JSCoverage_scriptSources, "f").set(event.scriptId, response.scriptSource); } catch (error) { (0, util_js_1.debugError)(error); } }; var CSSCoverage = class { constructor(client) { _CSSCoverage_instances.add(this); _CSSCoverage_client.set(this, void 0); _CSSCoverage_enabled.set(this, false); _CSSCoverage_stylesheetURLs.set(this, /* @__PURE__ */ new Map()); _CSSCoverage_stylesheetSources.set(this, /* @__PURE__ */ new Map()); _CSSCoverage_eventListeners.set(this, []); _CSSCoverage_resetOnNavigation.set(this, false); __classPrivateFieldSet(this, _CSSCoverage_client, client, "f"); } async start(options2 = {}) { (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _CSSCoverage_enabled, "f"), "CSSCoverage is already enabled"); const { resetOnNavigation = true } = options2; __classPrivateFieldSet(this, _CSSCoverage_resetOnNavigation, resetOnNavigation, "f"); __classPrivateFieldSet(this, _CSSCoverage_enabled, true, "f"); __classPrivateFieldGet(this, _CSSCoverage_stylesheetURLs, "f").clear(); __classPrivateFieldGet(this, _CSSCoverage_stylesheetSources, "f").clear(); __classPrivateFieldSet(this, _CSSCoverage_eventListeners, [ (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _CSSCoverage_client, "f"), "CSS.styleSheetAdded", __classPrivateFieldGet(this, _CSSCoverage_instances, "m", _CSSCoverage_onStyleSheet).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _CSSCoverage_client, "f"), "Runtime.executionContextsCleared", __classPrivateFieldGet(this, _CSSCoverage_instances, "m", _CSSCoverage_onExecutionContextsCleared).bind(this)) ], "f"); await Promise.all([ __classPrivateFieldGet(this, _CSSCoverage_client, "f").send("DOM.enable"), __classPrivateFieldGet(this, _CSSCoverage_client, "f").send("CSS.enable"), __classPrivateFieldGet(this, _CSSCoverage_client, "f").send("CSS.startRuleUsageTracking") ]); } async stop() { (0, assert_js_1.assert)(__classPrivateFieldGet(this, _CSSCoverage_enabled, "f"), "CSSCoverage is not enabled"); __classPrivateFieldSet(this, _CSSCoverage_enabled, false, "f"); const ruleTrackingResponse = await __classPrivateFieldGet(this, _CSSCoverage_client, "f").send("CSS.stopRuleUsageTracking"); await Promise.all([ __classPrivateFieldGet(this, _CSSCoverage_client, "f").send("CSS.disable"), __classPrivateFieldGet(this, _CSSCoverage_client, "f").send("DOM.disable") ]); (0, util_js_2.removeEventListeners)(__classPrivateFieldGet(this, _CSSCoverage_eventListeners, "f")); const styleSheetIdToCoverage = /* @__PURE__ */ new Map(); for (const entry of ruleTrackingResponse.ruleUsage) { let ranges = styleSheetIdToCoverage.get(entry.styleSheetId); if (!ranges) { ranges = []; styleSheetIdToCoverage.set(entry.styleSheetId, ranges); } ranges.push({ startOffset: entry.startOffset, endOffset: entry.endOffset, count: entry.used ? 1 : 0 }); } const coverage = []; for (const styleSheetId of __classPrivateFieldGet(this, _CSSCoverage_stylesheetURLs, "f").keys()) { const url2 = __classPrivateFieldGet(this, _CSSCoverage_stylesheetURLs, "f").get(styleSheetId); (0, assert_js_1.assert)(typeof url2 !== "undefined", `Stylesheet URL is undefined (styleSheetId=${styleSheetId})`); const text = __classPrivateFieldGet(this, _CSSCoverage_stylesheetSources, "f").get(styleSheetId); (0, assert_js_1.assert)(typeof text !== "undefined", `Stylesheet text is undefined (styleSheetId=${styleSheetId})`); const ranges = convertToDisjointRanges(styleSheetIdToCoverage.get(styleSheetId) || []); coverage.push({ url: url2, ranges, text }); } return coverage; } }; exports2.CSSCoverage = CSSCoverage; _CSSCoverage_client = /* @__PURE__ */ new WeakMap(), _CSSCoverage_enabled = /* @__PURE__ */ new WeakMap(), _CSSCoverage_stylesheetURLs = /* @__PURE__ */ new WeakMap(), _CSSCoverage_stylesheetSources = /* @__PURE__ */ new WeakMap(), _CSSCoverage_eventListeners = /* @__PURE__ */ new WeakMap(), _CSSCoverage_resetOnNavigation = /* @__PURE__ */ new WeakMap(), _CSSCoverage_instances = /* @__PURE__ */ new WeakSet(), _CSSCoverage_onExecutionContextsCleared = function _CSSCoverage_onExecutionContextsCleared2() { if (!__classPrivateFieldGet(this, _CSSCoverage_resetOnNavigation, "f")) { return; } __classPrivateFieldGet(this, _CSSCoverage_stylesheetURLs, "f").clear(); __classPrivateFieldGet(this, _CSSCoverage_stylesheetSources, "f").clear(); }, _CSSCoverage_onStyleSheet = async function _CSSCoverage_onStyleSheet2(event) { const header = event.header; if (!header.sourceURL) { return; } try { const response = await __classPrivateFieldGet(this, _CSSCoverage_client, "f").send("CSS.getStyleSheetText", { styleSheetId: header.styleSheetId }); __classPrivateFieldGet(this, _CSSCoverage_stylesheetURLs, "f").set(header.styleSheetId, header.sourceURL); __classPrivateFieldGet(this, _CSSCoverage_stylesheetSources, "f").set(header.styleSheetId, response.text); } catch (error) { (0, util_js_1.debugError)(error); } }; function convertToDisjointRanges(nestedRanges) { const points = []; for (const range of nestedRanges) { points.push({ offset: range.startOffset, type: 0, range }); points.push({ offset: range.endOffset, type: 1, range }); } points.sort((a, b) => { if (a.offset !== b.offset) { return a.offset - b.offset; } if (a.type !== b.type) { return b.type - a.type; } const aLength = a.range.endOffset - a.range.startOffset; const bLength = b.range.endOffset - b.range.startOffset; if (a.type === 0) { return bLength - aLength; } return aLength - bLength; }); const hitCountStack = []; const results = []; let lastOffset = 0; for (const point of points) { if (hitCountStack.length && lastOffset < point.offset && hitCountStack[hitCountStack.length - 1] > 0) { const lastResult = results[results.length - 1]; if (lastResult && lastResult.end === lastOffset) { lastResult.end = point.offset; } else { results.push({ start: lastOffset, end: point.offset }); } } lastOffset = point.offset; if (point.type === 0) { hitCountStack.push(point.range.count); } else { hitCountStack.pop(); } } return results.filter((range) => { return range.end - range.start > 0; }); } } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/Dialog.js var require_Dialog = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/Dialog.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _Dialog_client; var _Dialog_type; var _Dialog_message; var _Dialog_defaultValue; var _Dialog_handled; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Dialog = void 0; var assert_js_1 = require_assert(); var Dialog = class { /** * @internal */ constructor(client, type, message, defaultValue = "") { _Dialog_client.set(this, void 0); _Dialog_type.set(this, void 0); _Dialog_message.set(this, void 0); _Dialog_defaultValue.set(this, void 0); _Dialog_handled.set(this, false); __classPrivateFieldSet(this, _Dialog_client, client, "f"); __classPrivateFieldSet(this, _Dialog_type, type, "f"); __classPrivateFieldSet(this, _Dialog_message, message, "f"); __classPrivateFieldSet(this, _Dialog_defaultValue, defaultValue, "f"); } /** * @returns The type of the dialog. */ type() { return __classPrivateFieldGet(this, _Dialog_type, "f"); } /** * @returns The message displayed in the dialog. */ message() { return __classPrivateFieldGet(this, _Dialog_message, "f"); } /** * @returns The default value of the prompt, or an empty string if the dialog * is not a `prompt`. */ defaultValue() { return __classPrivateFieldGet(this, _Dialog_defaultValue, "f"); } /** * @param promptText - optional text that will be entered in the dialog * prompt. Has no effect if the dialog's type is not `prompt`. * * @returns A promise that resolves when the dialog has been accepted. */ async accept(promptText) { (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _Dialog_handled, "f"), "Cannot accept dialog which is already handled!"); __classPrivateFieldSet(this, _Dialog_handled, true, "f"); await __classPrivateFieldGet(this, _Dialog_client, "f").send("Page.handleJavaScriptDialog", { accept: true, promptText }); } /** * @returns A promise which will resolve once the dialog has been dismissed */ async dismiss() { (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _Dialog_handled, "f"), "Cannot dismiss dialog which is already handled!"); __classPrivateFieldSet(this, _Dialog_handled, true, "f"); await __classPrivateFieldGet(this, _Dialog_client, "f").send("Page.handleJavaScriptDialog", { accept: false }); } }; exports2.Dialog = Dialog; _Dialog_client = /* @__PURE__ */ new WeakMap(), _Dialog_type = /* @__PURE__ */ new WeakMap(), _Dialog_message = /* @__PURE__ */ new WeakMap(), _Dialog_defaultValue = /* @__PURE__ */ new WeakMap(), _Dialog_handled = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/EmulationManager.js var require_EmulationManager = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/EmulationManager.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _EmulationManager_client; var _EmulationManager_emulatingMobile; var _EmulationManager_hasTouch; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.EmulationManager = void 0; var EmulationManager = class { constructor(client) { _EmulationManager_client.set(this, void 0); _EmulationManager_emulatingMobile.set(this, false); _EmulationManager_hasTouch.set(this, false); __classPrivateFieldSet(this, _EmulationManager_client, client, "f"); } async emulateViewport(viewport) { const mobile = viewport.isMobile || false; const width = viewport.width; const height = viewport.height; const deviceScaleFactor = viewport.deviceScaleFactor || 1; const screenOrientation = viewport.isLandscape ? { angle: 90, type: "landscapePrimary" } : { angle: 0, type: "portraitPrimary" }; const hasTouch = viewport.hasTouch || false; await Promise.all([ __classPrivateFieldGet(this, _EmulationManager_client, "f").send("Emulation.setDeviceMetricsOverride", { mobile, width, height, deviceScaleFactor, screenOrientation }), __classPrivateFieldGet(this, _EmulationManager_client, "f").send("Emulation.setTouchEmulationEnabled", { enabled: hasTouch }) ]); const reloadNeeded = __classPrivateFieldGet(this, _EmulationManager_emulatingMobile, "f") !== mobile || __classPrivateFieldGet(this, _EmulationManager_hasTouch, "f") !== hasTouch; __classPrivateFieldSet(this, _EmulationManager_emulatingMobile, mobile, "f"); __classPrivateFieldSet(this, _EmulationManager_hasTouch, hasTouch, "f"); return reloadNeeded; } }; exports2.EmulationManager = EmulationManager; _EmulationManager_client = /* @__PURE__ */ new WeakMap(), _EmulationManager_emulatingMobile = /* @__PURE__ */ new WeakMap(), _EmulationManager_hasTouch = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.js var require_FileChooser = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/FileChooser.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _FileChooser_element; var _FileChooser_multiple; var _FileChooser_handled; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FileChooser = void 0; var assert_js_1 = require_assert(); var FileChooser = class { /** * @internal */ constructor(element, event) { _FileChooser_element.set(this, void 0); _FileChooser_multiple.set(this, void 0); _FileChooser_handled.set(this, false); __classPrivateFieldSet(this, _FileChooser_element, element, "f"); __classPrivateFieldSet(this, _FileChooser_multiple, event.mode !== "selectSingle", "f"); } /** * Whether file chooser allow for * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-multiple | multiple} * file selection. */ isMultiple() { return __classPrivateFieldGet(this, _FileChooser_multiple, "f"); } /** * Accept the file chooser request with given paths. * * @param filePaths - If some of the `filePaths` are relative paths, then * they are resolved relative to the * {@link https://nodejs.org/api/process.html#process_process_cwd | current working directory}. */ async accept(filePaths) { (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _FileChooser_handled, "f"), "Cannot accept FileChooser which is already handled!"); __classPrivateFieldSet(this, _FileChooser_handled, true, "f"); await __classPrivateFieldGet(this, _FileChooser_element, "f").uploadFile(...filePaths); } /** * Closes the file chooser without selecting any files. */ cancel() { (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _FileChooser_handled, "f"), "Cannot cancel FileChooser which is already handled!"); __classPrivateFieldSet(this, _FileChooser_handled, true, "f"); } }; exports2.FileChooser = FileChooser; _FileChooser_element = /* @__PURE__ */ new WeakMap(), _FileChooser_multiple = /* @__PURE__ */ new WeakMap(), _FileChooser_handled = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.js var require_HTTPRequest = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPRequest.js"(exports2) { "use strict"; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var _HTTPRequest_instances; var _HTTPRequest_client; var _HTTPRequest_isNavigationRequest; var _HTTPRequest_allowInterception; var _HTTPRequest_interceptionHandled; var _HTTPRequest_url; var _HTTPRequest_resourceType; var _HTTPRequest_method; var _HTTPRequest_postData; var _HTTPRequest_headers; var _HTTPRequest_frame; var _HTTPRequest_continueRequestOverrides; var _HTTPRequest_responseForRequest; var _HTTPRequest_abortErrorReason; var _HTTPRequest_interceptResolutionState; var _HTTPRequest_interceptHandlers; var _HTTPRequest_initiator; var _HTTPRequest_continue; var _HTTPRequest_respond; var _HTTPRequest_abort; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.InterceptResolutionAction = exports2.HTTPRequest = exports2.DEFAULT_INTERCEPT_RESOLUTION_PRIORITY = void 0; var assert_js_1 = require_assert(); var util_js_1 = require_util4(); exports2.DEFAULT_INTERCEPT_RESOLUTION_PRIORITY = 0; var HTTPRequest = class { /** * Warning! Using this client can break Puppeteer. Use with caution. * * @experimental */ get client() { return __classPrivateFieldGet(this, _HTTPRequest_client, "f"); } /** * @internal */ constructor(client, frame, interceptionId, allowInterception, event, redirectChain) { _HTTPRequest_instances.add(this); this._failureText = null; this._response = null; this._fromMemoryCache = false; _HTTPRequest_client.set(this, void 0); _HTTPRequest_isNavigationRequest.set(this, void 0); _HTTPRequest_allowInterception.set(this, void 0); _HTTPRequest_interceptionHandled.set(this, false); _HTTPRequest_url.set(this, void 0); _HTTPRequest_resourceType.set(this, void 0); _HTTPRequest_method.set(this, void 0); _HTTPRequest_postData.set(this, void 0); _HTTPRequest_headers.set(this, {}); _HTTPRequest_frame.set(this, void 0); _HTTPRequest_continueRequestOverrides.set(this, void 0); _HTTPRequest_responseForRequest.set(this, null); _HTTPRequest_abortErrorReason.set(this, null); _HTTPRequest_interceptResolutionState.set(this, { action: InterceptResolutionAction.None }); _HTTPRequest_interceptHandlers.set(this, void 0); _HTTPRequest_initiator.set(this, void 0); __classPrivateFieldSet(this, _HTTPRequest_client, client, "f"); this._requestId = event.requestId; __classPrivateFieldSet(this, _HTTPRequest_isNavigationRequest, event.requestId === event.loaderId && event.type === "Document", "f"); this._interceptionId = interceptionId; __classPrivateFieldSet(this, _HTTPRequest_allowInterception, allowInterception, "f"); __classPrivateFieldSet(this, _HTTPRequest_url, event.request.url, "f"); __classPrivateFieldSet(this, _HTTPRequest_resourceType, (event.type || "other").toLowerCase(), "f"); __classPrivateFieldSet(this, _HTTPRequest_method, event.request.method, "f"); __classPrivateFieldSet(this, _HTTPRequest_postData, event.request.postData, "f"); __classPrivateFieldSet(this, _HTTPRequest_frame, frame, "f"); this._redirectChain = redirectChain; __classPrivateFieldSet(this, _HTTPRequest_continueRequestOverrides, {}, "f"); __classPrivateFieldSet(this, _HTTPRequest_interceptHandlers, [], "f"); __classPrivateFieldSet(this, _HTTPRequest_initiator, event.initiator, "f"); for (const [key, value] of Object.entries(event.request.headers)) { __classPrivateFieldGet(this, _HTTPRequest_headers, "f")[key.toLowerCase()] = value; } } /** * @returns the URL of the request */ url() { return __classPrivateFieldGet(this, _HTTPRequest_url, "f"); } /** * @returns the `ContinueRequestOverrides` that will be used * if the interception is allowed to continue (ie, `abort()` and * `respond()` aren't called). */ continueRequestOverrides() { (0, assert_js_1.assert)(__classPrivateFieldGet(this, _HTTPRequest_allowInterception, "f"), "Request Interception is not enabled!"); return __classPrivateFieldGet(this, _HTTPRequest_continueRequestOverrides, "f"); } /** * @returns The `ResponseForRequest` that gets used if the * interception is allowed to respond (ie, `abort()` is not called). */ responseForRequest() { (0, assert_js_1.assert)(__classPrivateFieldGet(this, _HTTPRequest_allowInterception, "f"), "Request Interception is not enabled!"); return __classPrivateFieldGet(this, _HTTPRequest_responseForRequest, "f"); } /** * @returns the most recent reason for aborting the request */ abortErrorReason() { (0, assert_js_1.assert)(__classPrivateFieldGet(this, _HTTPRequest_allowInterception, "f"), "Request Interception is not enabled!"); return __classPrivateFieldGet(this, _HTTPRequest_abortErrorReason, "f"); } /** * @returns An InterceptResolutionState object describing the current resolution * action and priority. * * InterceptResolutionState contains: * action: InterceptResolutionAction * priority?: number * * InterceptResolutionAction is one of: `abort`, `respond`, `continue`, * `disabled`, `none`, or `already-handled`. */ interceptResolutionState() { if (!__classPrivateFieldGet(this, _HTTPRequest_allowInterception, "f")) { return { action: InterceptResolutionAction.Disabled }; } if (__classPrivateFieldGet(this, _HTTPRequest_interceptionHandled, "f")) { return { action: InterceptResolutionAction.AlreadyHandled }; } return { ...__classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f") }; } /** * @returns `true` if the intercept resolution has already been handled, * `false` otherwise. */ isInterceptResolutionHandled() { return __classPrivateFieldGet(this, _HTTPRequest_interceptionHandled, "f"); } /** * Adds an async request handler to the processing queue. * Deferred handlers are not guaranteed to execute in any particular order, * but they are guaranteed to resolve before the request interception * is finalized. */ enqueueInterceptAction(pendingHandler) { __classPrivateFieldGet(this, _HTTPRequest_interceptHandlers, "f").push(pendingHandler); } /** * Awaits pending interception handlers and then decides how to fulfill * the request interception. */ async finalizeInterceptions() { await __classPrivateFieldGet(this, _HTTPRequest_interceptHandlers, "f").reduce((promiseChain, interceptAction) => { return promiseChain.then(interceptAction); }, Promise.resolve()); const { action } = this.interceptResolutionState(); switch (action) { case "abort": return __classPrivateFieldGet(this, _HTTPRequest_instances, "m", _HTTPRequest_abort).call(this, __classPrivateFieldGet(this, _HTTPRequest_abortErrorReason, "f")); case "respond": if (__classPrivateFieldGet(this, _HTTPRequest_responseForRequest, "f") === null) { throw new Error("Response is missing for the interception"); } return __classPrivateFieldGet(this, _HTTPRequest_instances, "m", _HTTPRequest_respond).call(this, __classPrivateFieldGet(this, _HTTPRequest_responseForRequest, "f")); case "continue": return __classPrivateFieldGet(this, _HTTPRequest_instances, "m", _HTTPRequest_continue).call(this, __classPrivateFieldGet(this, _HTTPRequest_continueRequestOverrides, "f")); } } /** * Contains the request's resource type as it was perceived by the rendering * engine. */ resourceType() { return __classPrivateFieldGet(this, _HTTPRequest_resourceType, "f"); } /** * @returns the method used (`GET`, `POST`, etc.) */ method() { return __classPrivateFieldGet(this, _HTTPRequest_method, "f"); } /** * @returns the request's post body, if any. */ postData() { return __classPrivateFieldGet(this, _HTTPRequest_postData, "f"); } /** * @returns an object with HTTP headers associated with the request. All * header names are lower-case. */ headers() { return __classPrivateFieldGet(this, _HTTPRequest_headers, "f"); } /** * @returns A matching `HTTPResponse` object, or null if the response has not * been received yet. */ response() { return this._response; } /** * @returns the frame that initiated the request, or null if navigating to * error pages. */ frame() { return __classPrivateFieldGet(this, _HTTPRequest_frame, "f"); } /** * @returns true if the request is the driver of the current frame's navigation. */ isNavigationRequest() { return __classPrivateFieldGet(this, _HTTPRequest_isNavigationRequest, "f"); } /** * @returns the initiator of the request. */ initiator() { return __classPrivateFieldGet(this, _HTTPRequest_initiator, "f"); } /** * A `redirectChain` is a chain of requests initiated to fetch a resource. * @remarks * * `redirectChain` is shared between all the requests of the same chain. * * For example, if the website `http://example.com` has a single redirect to * `https://example.com`, then the chain will contain one request: * * ```ts * const response = await page.goto('http://example.com'); * const chain = response.request().redirectChain(); * console.log(chain.length); // 1 * console.log(chain[0].url()); // 'http://example.com' * ``` * * If the website `https://google.com` has no redirects, then the chain will be empty: * * ```ts * const response = await page.goto('https://google.com'); * const chain = response.request().redirectChain(); * console.log(chain.length); // 0 * ``` * * @returns the chain of requests - if a server responds with at least a * single redirect, this chain will contain all requests that were redirected. */ redirectChain() { return this._redirectChain.slice(); } /** * Access information about the request's failure. * * @remarks * * @example * * Example of logging all failed requests: * * ```ts * page.on('requestfailed', request => { * console.log(request.url() + ' ' + request.failure().errorText); * }); * ``` * * @returns `null` unless the request failed. If the request fails this can * return an object with `errorText` containing a human-readable error * message, e.g. `net::ERR_FAILED`. It is not guaranteed that there will be * failure text if the request fails. */ failure() { if (!this._failureText) { return null; } return { errorText: this._failureText }; } /** * Continues request with optional request overrides. * * @remarks * * To use this, request * interception should be enabled with {@link Page.setRequestInterception}. * * Exception is immediately thrown if the request interception is not enabled. * * @example * * ```ts * await page.setRequestInterception(true); * page.on('request', request => { * // Override headers * const headers = Object.assign({}, request.headers(), { * foo: 'bar', // set "foo" header * origin: undefined, // remove "origin" header * }); * request.continue({headers}); * }); * ``` * * @param overrides - optional overrides to apply to the request. * @param priority - If provided, intercept is resolved using * cooperative handling rules. Otherwise, intercept is resolved * immediately. */ async continue(overrides = {}, priority) { if (__classPrivateFieldGet(this, _HTTPRequest_url, "f").startsWith("data:")) { return; } (0, assert_js_1.assert)(__classPrivateFieldGet(this, _HTTPRequest_allowInterception, "f"), "Request Interception is not enabled!"); (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _HTTPRequest_interceptionHandled, "f"), "Request is already handled!"); if (priority === void 0) { return __classPrivateFieldGet(this, _HTTPRequest_instances, "m", _HTTPRequest_continue).call(this, overrides); } __classPrivateFieldSet(this, _HTTPRequest_continueRequestOverrides, overrides, "f"); if (__classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").priority === void 0 || priority > __classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").priority) { __classPrivateFieldSet(this, _HTTPRequest_interceptResolutionState, { action: InterceptResolutionAction.Continue, priority }, "f"); return; } if (priority === __classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").priority) { if (__classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").action === "abort" || __classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").action === "respond") { return; } __classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").action = InterceptResolutionAction.Continue; } return; } /** * Fulfills a request with the given response. * * @remarks * * To use this, request * interception should be enabled with {@link Page.setRequestInterception}. * * Exception is immediately thrown if the request interception is not enabled. * * @example * An example of fulfilling all requests with 404 responses: * * ```ts * await page.setRequestInterception(true); * page.on('request', request => { * request.respond({ * status: 404, * contentType: 'text/plain', * body: 'Not Found!', * }); * }); * ``` * * NOTE: Mocking responses for dataURL requests is not supported. * Calling `request.respond` for a dataURL request is a noop. * * @param response - the response to fulfill the request with. * @param priority - If provided, intercept is resolved using * cooperative handling rules. Otherwise, intercept is resolved * immediately. */ async respond(response, priority) { if (__classPrivateFieldGet(this, _HTTPRequest_url, "f").startsWith("data:")) { return; } (0, assert_js_1.assert)(__classPrivateFieldGet(this, _HTTPRequest_allowInterception, "f"), "Request Interception is not enabled!"); (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _HTTPRequest_interceptionHandled, "f"), "Request is already handled!"); if (priority === void 0) { return __classPrivateFieldGet(this, _HTTPRequest_instances, "m", _HTTPRequest_respond).call(this, response); } __classPrivateFieldSet(this, _HTTPRequest_responseForRequest, response, "f"); if (__classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").priority === void 0 || priority > __classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").priority) { __classPrivateFieldSet(this, _HTTPRequest_interceptResolutionState, { action: InterceptResolutionAction.Respond, priority }, "f"); return; } if (priority === __classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").priority) { if (__classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").action === "abort") { return; } __classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").action = InterceptResolutionAction.Respond; } } /** * Aborts a request. * * @remarks * To use this, request interception should be enabled with * {@link Page.setRequestInterception}. If it is not enabled, this method will * throw an exception immediately. * * @param errorCode - optional error code to provide. * @param priority - If provided, intercept is resolved using * cooperative handling rules. Otherwise, intercept is resolved * immediately. */ async abort(errorCode = "failed", priority) { if (__classPrivateFieldGet(this, _HTTPRequest_url, "f").startsWith("data:")) { return; } const errorReason = errorReasons[errorCode]; (0, assert_js_1.assert)(errorReason, "Unknown error code: " + errorCode); (0, assert_js_1.assert)(__classPrivateFieldGet(this, _HTTPRequest_allowInterception, "f"), "Request Interception is not enabled!"); (0, assert_js_1.assert)(!__classPrivateFieldGet(this, _HTTPRequest_interceptionHandled, "f"), "Request is already handled!"); if (priority === void 0) { return __classPrivateFieldGet(this, _HTTPRequest_instances, "m", _HTTPRequest_abort).call(this, errorReason); } __classPrivateFieldSet(this, _HTTPRequest_abortErrorReason, errorReason, "f"); if (__classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").priority === void 0 || priority >= __classPrivateFieldGet(this, _HTTPRequest_interceptResolutionState, "f").priority) { __classPrivateFieldSet(this, _HTTPRequest_interceptResolutionState, { action: InterceptResolutionAction.Abort, priority }, "f"); return; } } }; exports2.HTTPRequest = HTTPRequest; _HTTPRequest_client = /* @__PURE__ */ new WeakMap(), _HTTPRequest_isNavigationRequest = /* @__PURE__ */ new WeakMap(), _HTTPRequest_allowInterception = /* @__PURE__ */ new WeakMap(), _HTTPRequest_interceptionHandled = /* @__PURE__ */ new WeakMap(), _HTTPRequest_url = /* @__PURE__ */ new WeakMap(), _HTTPRequest_resourceType = /* @__PURE__ */ new WeakMap(), _HTTPRequest_method = /* @__PURE__ */ new WeakMap(), _HTTPRequest_postData = /* @__PURE__ */ new WeakMap(), _HTTPRequest_headers = /* @__PURE__ */ new WeakMap(), _HTTPRequest_frame = /* @__PURE__ */ new WeakMap(), _HTTPRequest_continueRequestOverrides = /* @__PURE__ */ new WeakMap(), _HTTPRequest_responseForRequest = /* @__PURE__ */ new WeakMap(), _HTTPRequest_abortErrorReason = /* @__PURE__ */ new WeakMap(), _HTTPRequest_interceptResolutionState = /* @__PURE__ */ new WeakMap(), _HTTPRequest_interceptHandlers = /* @__PURE__ */ new WeakMap(), _HTTPRequest_initiator = /* @__PURE__ */ new WeakMap(), _HTTPRequest_instances = /* @__PURE__ */ new WeakSet(), _HTTPRequest_continue = async function _HTTPRequest_continue2(overrides = {}) { const { url: url2, method, postData, headers } = overrides; __classPrivateFieldSet(this, _HTTPRequest_interceptionHandled, true, "f"); const postDataBinaryBase64 = postData ? Buffer.from(postData).toString("base64") : void 0; if (this._interceptionId === void 0) { throw new Error("HTTPRequest is missing _interceptionId needed for Fetch.continueRequest"); } await __classPrivateFieldGet(this, _HTTPRequest_client, "f").send("Fetch.continueRequest", { requestId: this._interceptionId, url: url2, method, postData: postDataBinaryBase64, headers: headers ? headersArray(headers) : void 0 }).catch((error) => { __classPrivateFieldSet(this, _HTTPRequest_interceptionHandled, false, "f"); return handleError(error); }); }, _HTTPRequest_respond = async function _HTTPRequest_respond2(response) { __classPrivateFieldSet(this, _HTTPRequest_interceptionHandled, true, "f"); const responseBody = response.body && (0, util_js_1.isString)(response.body) ? Buffer.from(response.body) : response.body || null; const responseHeaders = {}; if (response.headers) { for (const header of Object.keys(response.headers)) { const value = response.headers[header]; responseHeaders[header.toLowerCase()] = Array.isArray(value) ? value.map((item) => { return String(item); }) : String(value); } } if (response.contentType) { responseHeaders["content-type"] = response.contentType; } if (responseBody && !("content-length" in responseHeaders)) { responseHeaders["content-length"] = String(Buffer.byteLength(responseBody)); } const status = response.status || 200; if (this._interceptionId === void 0) { throw new Error("HTTPRequest is missing _interceptionId needed for Fetch.fulfillRequest"); } await __classPrivateFieldGet(this, _HTTPRequest_client, "f").send("Fetch.fulfillRequest", { requestId: this._interceptionId, responseCode: status, responsePhrase: STATUS_TEXTS[status], responseHeaders: headersArray(responseHeaders), body: responseBody ? responseBody.toString("base64") : void 0 }).catch((error) => { __classPrivateFieldSet(this, _HTTPRequest_interceptionHandled, false, "f"); return handleError(error); }); }, _HTTPRequest_abort = async function _HTTPRequest_abort2(errorReason) { __classPrivateFieldSet(this, _HTTPRequest_interceptionHandled, true, "f"); if (this._interceptionId === void 0) { throw new Error("HTTPRequest is missing _interceptionId needed for Fetch.failRequest"); } await __classPrivateFieldGet(this, _HTTPRequest_client, "f").send("Fetch.failRequest", { requestId: this._interceptionId, errorReason: errorReason || "Failed" }).catch(handleError); }; var InterceptResolutionAction; (function(InterceptResolutionAction2) { InterceptResolutionAction2["Abort"] = "abort"; InterceptResolutionAction2["Respond"] = "respond"; InterceptResolutionAction2["Continue"] = "continue"; InterceptResolutionAction2["Disabled"] = "disabled"; InterceptResolutionAction2["None"] = "none"; InterceptResolutionAction2["AlreadyHandled"] = "already-handled"; })(InterceptResolutionAction = exports2.InterceptResolutionAction || (exports2.InterceptResolutionAction = {})); var errorReasons = { aborted: "Aborted", accessdenied: "AccessDenied", addressunreachable: "AddressUnreachable", blockedbyclient: "BlockedByClient", blockedbyresponse: "BlockedByResponse", connectionaborted: "ConnectionAborted", connectionclosed: "ConnectionClosed", connectionfailed: "ConnectionFailed", connectionrefused: "ConnectionRefused", connectionreset: "ConnectionReset", internetdisconnected: "InternetDisconnected", namenotresolved: "NameNotResolved", timedout: "TimedOut", failed: "Failed" }; function headersArray(headers) { const result = []; for (const name in headers) { const value = headers[name]; if (!Object.is(value, void 0)) { const values = Array.isArray(value) ? value : [value]; result.push(...values.map((value2) => { return { name, value: value2 + "" }; })); } } return result; } async function handleError(error) { if (["Invalid header"].includes(error.originalMessage)) { throw error; } (0, util_js_1.debugError)(error); } var STATUS_TEXTS = { "100": "Continue", "101": "Switching Protocols", "102": "Processing", "103": "Early Hints", "200": "OK", "201": "Created", "202": "Accepted", "203": "Non-Authoritative Information", "204": "No Content", "205": "Reset Content", "206": "Partial Content", "207": "Multi-Status", "208": "Already Reported", "226": "IM Used", "300": "Multiple Choices", "301": "Moved Permanently", "302": "Found", "303": "See Other", "304": "Not Modified", "305": "Use Proxy", "306": "Switch Proxy", "307": "Temporary Redirect", "308": "Permanent Redirect", "400": "Bad Request", "401": "Unauthorized", "402": "Payment Required", "403": "Forbidden", "404": "Not Found", "405": "Method Not Allowed", "406": "Not Acceptable", "407": "Proxy Authentication Required", "408": "Request Timeout", "409": "Conflict", "410": "Gone", "411": "Length Required", "412": "Precondition Failed", "413": "Payload Too Large", "414": "URI Too Long", "415": "Unsupported Media Type", "416": "Range Not Satisfiable", "417": "Expectation Failed", "418": "I'm a teapot", "421": "Misdirected Request", "422": "Unprocessable Entity", "423": "Locked", "424": "Failed Dependency", "425": "Too Early", "426": "Upgrade Required", "428": "Precondition Required", "429": "Too Many Requests", "431": "Request Header Fields Too Large", "451": "Unavailable For Legal Reasons", "500": "Internal Server Error", "501": "Not Implemented", "502": "Bad Gateway", "503": "Service Unavailable", "504": "Gateway Timeout", "505": "HTTP Version Not Supported", "506": "Variant Also Negotiates", "507": "Insufficient Storage", "508": "Loop Detected", "510": "Not Extended", "511": "Network Authentication Required" }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.js var require_SecurityDetails = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/SecurityDetails.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _SecurityDetails_subjectName; var _SecurityDetails_issuer; var _SecurityDetails_validFrom; var _SecurityDetails_validTo; var _SecurityDetails_protocol; var _SecurityDetails_sanList; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SecurityDetails = void 0; var SecurityDetails = class { /** * @internal */ constructor(securityPayload) { _SecurityDetails_subjectName.set(this, void 0); _SecurityDetails_issuer.set(this, void 0); _SecurityDetails_validFrom.set(this, void 0); _SecurityDetails_validTo.set(this, void 0); _SecurityDetails_protocol.set(this, void 0); _SecurityDetails_sanList.set(this, void 0); __classPrivateFieldSet(this, _SecurityDetails_subjectName, securityPayload.subjectName, "f"); __classPrivateFieldSet(this, _SecurityDetails_issuer, securityPayload.issuer, "f"); __classPrivateFieldSet(this, _SecurityDetails_validFrom, securityPayload.validFrom, "f"); __classPrivateFieldSet(this, _SecurityDetails_validTo, securityPayload.validTo, "f"); __classPrivateFieldSet(this, _SecurityDetails_protocol, securityPayload.protocol, "f"); __classPrivateFieldSet(this, _SecurityDetails_sanList, securityPayload.sanList, "f"); } /** * @returns The name of the issuer of the certificate. */ issuer() { return __classPrivateFieldGet(this, _SecurityDetails_issuer, "f"); } /** * @returns {@link https://en.wikipedia.org/wiki/Unix_time | Unix timestamp} * marking the start of the certificate's validity. */ validFrom() { return __classPrivateFieldGet(this, _SecurityDetails_validFrom, "f"); } /** * @returns {@link https://en.wikipedia.org/wiki/Unix_time | Unix timestamp} * marking the end of the certificate's validity. */ validTo() { return __classPrivateFieldGet(this, _SecurityDetails_validTo, "f"); } /** * @returns The security protocol being used, e.g. "TLS 1.2". */ protocol() { return __classPrivateFieldGet(this, _SecurityDetails_protocol, "f"); } /** * @returns The name of the subject to which the certificate was issued. */ subjectName() { return __classPrivateFieldGet(this, _SecurityDetails_subjectName, "f"); } /** * @returns The list of {@link https://en.wikipedia.org/wiki/Subject_Alternative_Name | subject alternative names (SANs)} of the certificate. */ subjectAlternativeNames() { return __classPrivateFieldGet(this, _SecurityDetails_sanList, "f"); } }; exports2.SecurityDetails = SecurityDetails; _SecurityDetails_subjectName = /* @__PURE__ */ new WeakMap(), _SecurityDetails_issuer = /* @__PURE__ */ new WeakMap(), _SecurityDetails_validFrom = /* @__PURE__ */ new WeakMap(), _SecurityDetails_validTo = /* @__PURE__ */ new WeakMap(), _SecurityDetails_protocol = /* @__PURE__ */ new WeakMap(), _SecurityDetails_sanList = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.js var require_HTTPResponse = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/HTTPResponse.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _HTTPResponse_instances; var _HTTPResponse_client; var _HTTPResponse_request; var _HTTPResponse_contentPromise; var _HTTPResponse_bodyLoadedPromise; var _HTTPResponse_bodyLoadedPromiseFulfill; var _HTTPResponse_remoteAddress; var _HTTPResponse_status; var _HTTPResponse_statusText; var _HTTPResponse_url; var _HTTPResponse_fromDiskCache; var _HTTPResponse_fromServiceWorker; var _HTTPResponse_headers; var _HTTPResponse_securityDetails; var _HTTPResponse_timing; var _HTTPResponse_parseStatusTextFromExtrInfo; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HTTPResponse = void 0; var SecurityDetails_js_1 = require_SecurityDetails(); var Errors_js_1 = require_Errors(); var HTTPResponse = class { /** * @internal */ constructor(client, request2, responsePayload, extraInfo) { _HTTPResponse_instances.add(this); _HTTPResponse_client.set(this, void 0); _HTTPResponse_request.set(this, void 0); _HTTPResponse_contentPromise.set(this, null); _HTTPResponse_bodyLoadedPromise.set(this, void 0); _HTTPResponse_bodyLoadedPromiseFulfill.set(this, () => { }); _HTTPResponse_remoteAddress.set(this, void 0); _HTTPResponse_status.set(this, void 0); _HTTPResponse_statusText.set(this, void 0); _HTTPResponse_url.set(this, void 0); _HTTPResponse_fromDiskCache.set(this, void 0); _HTTPResponse_fromServiceWorker.set(this, void 0); _HTTPResponse_headers.set(this, {}); _HTTPResponse_securityDetails.set(this, void 0); _HTTPResponse_timing.set(this, void 0); __classPrivateFieldSet(this, _HTTPResponse_client, client, "f"); __classPrivateFieldSet(this, _HTTPResponse_request, request2, "f"); __classPrivateFieldSet(this, _HTTPResponse_bodyLoadedPromise, new Promise((fulfill) => { __classPrivateFieldSet(this, _HTTPResponse_bodyLoadedPromiseFulfill, fulfill, "f"); }), "f"); __classPrivateFieldSet(this, _HTTPResponse_remoteAddress, { ip: responsePayload.remoteIPAddress, port: responsePayload.remotePort }, "f"); __classPrivateFieldSet(this, _HTTPResponse_statusText, __classPrivateFieldGet(this, _HTTPResponse_instances, "m", _HTTPResponse_parseStatusTextFromExtrInfo).call(this, extraInfo) || responsePayload.statusText, "f"); __classPrivateFieldSet(this, _HTTPResponse_url, request2.url(), "f"); __classPrivateFieldSet(this, _HTTPResponse_fromDiskCache, !!responsePayload.fromDiskCache, "f"); __classPrivateFieldSet(this, _HTTPResponse_fromServiceWorker, !!responsePayload.fromServiceWorker, "f"); __classPrivateFieldSet(this, _HTTPResponse_status, extraInfo ? extraInfo.statusCode : responsePayload.status, "f"); const headers = extraInfo ? extraInfo.headers : responsePayload.headers; for (const [key, value] of Object.entries(headers)) { __classPrivateFieldGet(this, _HTTPResponse_headers, "f")[key.toLowerCase()] = value; } __classPrivateFieldSet(this, _HTTPResponse_securityDetails, responsePayload.securityDetails ? new SecurityDetails_js_1.SecurityDetails(responsePayload.securityDetails) : null, "f"); __classPrivateFieldSet(this, _HTTPResponse_timing, responsePayload.timing || null, "f"); } /** * @internal */ _resolveBody(err) { if (err) { return __classPrivateFieldGet(this, _HTTPResponse_bodyLoadedPromiseFulfill, "f").call(this, err); } return __classPrivateFieldGet(this, _HTTPResponse_bodyLoadedPromiseFulfill, "f").call(this); } /** * @returns The IP address and port number used to connect to the remote * server. */ remoteAddress() { return __classPrivateFieldGet(this, _HTTPResponse_remoteAddress, "f"); } /** * @returns The URL of the response. */ url() { return __classPrivateFieldGet(this, _HTTPResponse_url, "f"); } /** * @returns True if the response was successful (status in the range 200-299). */ ok() { return __classPrivateFieldGet(this, _HTTPResponse_status, "f") === 0 || __classPrivateFieldGet(this, _HTTPResponse_status, "f") >= 200 && __classPrivateFieldGet(this, _HTTPResponse_status, "f") <= 299; } /** * @returns The status code of the response (e.g., 200 for a success). */ status() { return __classPrivateFieldGet(this, _HTTPResponse_status, "f"); } /** * @returns The status text of the response (e.g. usually an "OK" for a * success). */ statusText() { return __classPrivateFieldGet(this, _HTTPResponse_statusText, "f"); } /** * @returns An object with HTTP headers associated with the response. All * header names are lower-case. */ headers() { return __classPrivateFieldGet(this, _HTTPResponse_headers, "f"); } /** * @returns {@link SecurityDetails} if the response was received over the * secure connection, or `null` otherwise. */ securityDetails() { return __classPrivateFieldGet(this, _HTTPResponse_securityDetails, "f"); } /** * @returns Timing information related to the response. */ timing() { return __classPrivateFieldGet(this, _HTTPResponse_timing, "f"); } /** * @returns Promise which resolves to a buffer with response body. */ buffer() { if (!__classPrivateFieldGet(this, _HTTPResponse_contentPromise, "f")) { __classPrivateFieldSet(this, _HTTPResponse_contentPromise, __classPrivateFieldGet(this, _HTTPResponse_bodyLoadedPromise, "f").then(async (error) => { if (error) { throw error; } try { const response = await __classPrivateFieldGet(this, _HTTPResponse_client, "f").send("Network.getResponseBody", { requestId: __classPrivateFieldGet(this, _HTTPResponse_request, "f")._requestId }); return Buffer.from(response.body, response.base64Encoded ? "base64" : "utf8"); } catch (error2) { if (error2 instanceof Errors_js_1.ProtocolError && error2.originalMessage === "No resource with given identifier found") { throw new Errors_js_1.ProtocolError("Could not load body for this request. This might happen if the request is a preflight request."); } throw error2; } }), "f"); } return __classPrivateFieldGet(this, _HTTPResponse_contentPromise, "f"); } /** * @returns Promise which resolves to a text representation of response body. */ async text() { const content = await this.buffer(); return content.toString("utf8"); } /** * * @returns Promise which resolves to a JSON representation of response body. * * @remarks * * This method will throw if the response body is not parsable via * `JSON.parse`. */ async json() { const content = await this.text(); return JSON.parse(content); } /** * @returns A matching {@link HTTPRequest} object. */ request() { return __classPrivateFieldGet(this, _HTTPResponse_request, "f"); } /** * @returns True if the response was served from either the browser's disk * cache or memory cache. */ fromCache() { return __classPrivateFieldGet(this, _HTTPResponse_fromDiskCache, "f") || __classPrivateFieldGet(this, _HTTPResponse_request, "f")._fromMemoryCache; } /** * @returns True if the response was served by a service worker. */ fromServiceWorker() { return __classPrivateFieldGet(this, _HTTPResponse_fromServiceWorker, "f"); } /** * @returns A {@link Frame} that initiated this response, or `null` if * navigating to error pages. */ frame() { return __classPrivateFieldGet(this, _HTTPResponse_request, "f").frame(); } }; exports2.HTTPResponse = HTTPResponse; _HTTPResponse_client = /* @__PURE__ */ new WeakMap(), _HTTPResponse_request = /* @__PURE__ */ new WeakMap(), _HTTPResponse_contentPromise = /* @__PURE__ */ new WeakMap(), _HTTPResponse_bodyLoadedPromise = /* @__PURE__ */ new WeakMap(), _HTTPResponse_bodyLoadedPromiseFulfill = /* @__PURE__ */ new WeakMap(), _HTTPResponse_remoteAddress = /* @__PURE__ */ new WeakMap(), _HTTPResponse_status = /* @__PURE__ */ new WeakMap(), _HTTPResponse_statusText = /* @__PURE__ */ new WeakMap(), _HTTPResponse_url = /* @__PURE__ */ new WeakMap(), _HTTPResponse_fromDiskCache = /* @__PURE__ */ new WeakMap(), _HTTPResponse_fromServiceWorker = /* @__PURE__ */ new WeakMap(), _HTTPResponse_headers = /* @__PURE__ */ new WeakMap(), _HTTPResponse_securityDetails = /* @__PURE__ */ new WeakMap(), _HTTPResponse_timing = /* @__PURE__ */ new WeakMap(), _HTTPResponse_instances = /* @__PURE__ */ new WeakSet(), _HTTPResponse_parseStatusTextFromExtrInfo = function _HTTPResponse_parseStatusTextFromExtrInfo2(extraInfo) { if (!extraInfo || !extraInfo.headersText) { return; } const firstLine = extraInfo.headersText.split("\r", 1)[0]; if (!firstLine) { return; } const match = firstLine.match(/[^ ]* [^ ]* (.*)/); if (!match) { return; } const statusText = match[1]; if (!statusText) { return; } return statusText; }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkEventManager.js var require_NetworkEventManager = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkEventManager.js"(exports2) { "use strict"; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _NetworkEventManager_requestWillBeSentMap; var _NetworkEventManager_requestPausedMap; var _NetworkEventManager_httpRequestsMap; var _NetworkEventManager_responseReceivedExtraInfoMap; var _NetworkEventManager_queuedRedirectInfoMap; var _NetworkEventManager_queuedEventGroupMap; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.NetworkEventManager = void 0; var NetworkEventManager = class { constructor() { _NetworkEventManager_requestWillBeSentMap.set(this, /* @__PURE__ */ new Map()); _NetworkEventManager_requestPausedMap.set(this, /* @__PURE__ */ new Map()); _NetworkEventManager_httpRequestsMap.set(this, /* @__PURE__ */ new Map()); _NetworkEventManager_responseReceivedExtraInfoMap.set(this, /* @__PURE__ */ new Map()); _NetworkEventManager_queuedRedirectInfoMap.set(this, /* @__PURE__ */ new Map()); _NetworkEventManager_queuedEventGroupMap.set(this, /* @__PURE__ */ new Map()); } forget(networkRequestId) { __classPrivateFieldGet(this, _NetworkEventManager_requestWillBeSentMap, "f").delete(networkRequestId); __classPrivateFieldGet(this, _NetworkEventManager_requestPausedMap, "f").delete(networkRequestId); __classPrivateFieldGet(this, _NetworkEventManager_queuedEventGroupMap, "f").delete(networkRequestId); __classPrivateFieldGet(this, _NetworkEventManager_queuedRedirectInfoMap, "f").delete(networkRequestId); __classPrivateFieldGet(this, _NetworkEventManager_responseReceivedExtraInfoMap, "f").delete(networkRequestId); } responseExtraInfo(networkRequestId) { if (!__classPrivateFieldGet(this, _NetworkEventManager_responseReceivedExtraInfoMap, "f").has(networkRequestId)) { __classPrivateFieldGet(this, _NetworkEventManager_responseReceivedExtraInfoMap, "f").set(networkRequestId, []); } return __classPrivateFieldGet(this, _NetworkEventManager_responseReceivedExtraInfoMap, "f").get(networkRequestId); } queuedRedirectInfo(fetchRequestId) { if (!__classPrivateFieldGet(this, _NetworkEventManager_queuedRedirectInfoMap, "f").has(fetchRequestId)) { __classPrivateFieldGet(this, _NetworkEventManager_queuedRedirectInfoMap, "f").set(fetchRequestId, []); } return __classPrivateFieldGet(this, _NetworkEventManager_queuedRedirectInfoMap, "f").get(fetchRequestId); } queueRedirectInfo(fetchRequestId, redirectInfo) { this.queuedRedirectInfo(fetchRequestId).push(redirectInfo); } takeQueuedRedirectInfo(fetchRequestId) { return this.queuedRedirectInfo(fetchRequestId).shift(); } numRequestsInProgress() { return [...__classPrivateFieldGet(this, _NetworkEventManager_httpRequestsMap, "f")].filter(([, request2]) => { return !request2.response(); }).length; } storeRequestWillBeSent(networkRequestId, event) { __classPrivateFieldGet(this, _NetworkEventManager_requestWillBeSentMap, "f").set(networkRequestId, event); } getRequestWillBeSent(networkRequestId) { return __classPrivateFieldGet(this, _NetworkEventManager_requestWillBeSentMap, "f").get(networkRequestId); } forgetRequestWillBeSent(networkRequestId) { __classPrivateFieldGet(this, _NetworkEventManager_requestWillBeSentMap, "f").delete(networkRequestId); } getRequestPaused(networkRequestId) { return __classPrivateFieldGet(this, _NetworkEventManager_requestPausedMap, "f").get(networkRequestId); } forgetRequestPaused(networkRequestId) { __classPrivateFieldGet(this, _NetworkEventManager_requestPausedMap, "f").delete(networkRequestId); } storeRequestPaused(networkRequestId, event) { __classPrivateFieldGet(this, _NetworkEventManager_requestPausedMap, "f").set(networkRequestId, event); } getRequest(networkRequestId) { return __classPrivateFieldGet(this, _NetworkEventManager_httpRequestsMap, "f").get(networkRequestId); } storeRequest(networkRequestId, request2) { __classPrivateFieldGet(this, _NetworkEventManager_httpRequestsMap, "f").set(networkRequestId, request2); } forgetRequest(networkRequestId) { __classPrivateFieldGet(this, _NetworkEventManager_httpRequestsMap, "f").delete(networkRequestId); } getQueuedEventGroup(networkRequestId) { return __classPrivateFieldGet(this, _NetworkEventManager_queuedEventGroupMap, "f").get(networkRequestId); } queueEventGroup(networkRequestId, event) { __classPrivateFieldGet(this, _NetworkEventManager_queuedEventGroupMap, "f").set(networkRequestId, event); } forgetQueuedEventGroup(networkRequestId) { __classPrivateFieldGet(this, _NetworkEventManager_queuedEventGroupMap, "f").delete(networkRequestId); } }; exports2.NetworkEventManager = NetworkEventManager; _NetworkEventManager_requestWillBeSentMap = /* @__PURE__ */ new WeakMap(), _NetworkEventManager_requestPausedMap = /* @__PURE__ */ new WeakMap(), _NetworkEventManager_httpRequestsMap = /* @__PURE__ */ new WeakMap(), _NetworkEventManager_responseReceivedExtraInfoMap = /* @__PURE__ */ new WeakMap(), _NetworkEventManager_queuedRedirectInfoMap = /* @__PURE__ */ new WeakMap(), _NetworkEventManager_queuedEventGroupMap = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/util/DebuggableDeferredPromise.js var require_DebuggableDeferredPromise = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/util/DebuggableDeferredPromise.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createDebuggableDeferredPromise = void 0; var environment_js_1 = require_environment(); var DeferredPromise_js_1 = require_DeferredPromise(); function createDebuggableDeferredPromise(message) { if (environment_js_1.DEFERRED_PROMISE_DEBUG_TIMEOUT > 0) { return (0, DeferredPromise_js_1.createDeferredPromise)({ message, timeout: environment_js_1.DEFERRED_PROMISE_DEBUG_TIMEOUT }); } return (0, DeferredPromise_js_1.createDeferredPromise)(); } exports2.createDebuggableDeferredPromise = createDebuggableDeferredPromise; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.js var require_NetworkManager = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/NetworkManager.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _NetworkManager_instances; var _NetworkManager_client; var _NetworkManager_ignoreHTTPSErrors; var _NetworkManager_frameManager; var _NetworkManager_networkEventManager; var _NetworkManager_extraHTTPHeaders; var _NetworkManager_credentials; var _NetworkManager_attemptedAuthentications; var _NetworkManager_userRequestInterceptionEnabled; var _NetworkManager_protocolRequestInterceptionEnabled; var _NetworkManager_userCacheDisabled; var _NetworkManager_emulatedNetworkConditions; var _NetworkManager_deferredInitPromise; var _NetworkManager_updateNetworkConditions; var _NetworkManager_updateProtocolRequestInterception; var _NetworkManager_cacheDisabled; var _NetworkManager_updateProtocolCacheDisabled; var _NetworkManager_onRequestWillBeSent; var _NetworkManager_onAuthRequired; var _NetworkManager_onRequestPaused; var _NetworkManager_patchRequestEventHeaders; var _NetworkManager_onRequest; var _NetworkManager_onRequestServedFromCache; var _NetworkManager_handleRequestRedirect; var _NetworkManager_emitResponseEvent; var _NetworkManager_onResponseReceived; var _NetworkManager_onResponseReceivedExtraInfo; var _NetworkManager_forgetRequest; var _NetworkManager_onLoadingFinished; var _NetworkManager_emitLoadingFinished; var _NetworkManager_onLoadingFailed; var _NetworkManager_emitLoadingFailed; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.NetworkManager = exports2.NetworkManagerEmittedEvents = void 0; var assert_js_1 = require_assert(); var EventEmitter_js_1 = require_EventEmitter(); var HTTPRequest_js_1 = require_HTTPRequest(); var HTTPResponse_js_1 = require_HTTPResponse(); var NetworkEventManager_js_1 = require_NetworkEventManager(); var util_js_1 = require_util4(); var DebuggableDeferredPromise_js_1 = require_DebuggableDeferredPromise(); exports2.NetworkManagerEmittedEvents = { Request: Symbol("NetworkManager.Request"), RequestServedFromCache: Symbol("NetworkManager.RequestServedFromCache"), Response: Symbol("NetworkManager.Response"), RequestFailed: Symbol("NetworkManager.RequestFailed"), RequestFinished: Symbol("NetworkManager.RequestFinished") }; var NetworkManager = class extends EventEmitter_js_1.EventEmitter { constructor(client, ignoreHTTPSErrors, frameManager) { super(); _NetworkManager_instances.add(this); _NetworkManager_client.set(this, void 0); _NetworkManager_ignoreHTTPSErrors.set(this, void 0); _NetworkManager_frameManager.set(this, void 0); _NetworkManager_networkEventManager.set(this, new NetworkEventManager_js_1.NetworkEventManager()); _NetworkManager_extraHTTPHeaders.set(this, {}); _NetworkManager_credentials.set(this, void 0); _NetworkManager_attemptedAuthentications.set(this, /* @__PURE__ */ new Set()); _NetworkManager_userRequestInterceptionEnabled.set(this, false); _NetworkManager_protocolRequestInterceptionEnabled.set(this, false); _NetworkManager_userCacheDisabled.set(this, false); _NetworkManager_emulatedNetworkConditions.set(this, { offline: false, upload: -1, download: -1, latency: 0 }); _NetworkManager_deferredInitPromise.set(this, void 0); __classPrivateFieldSet(this, _NetworkManager_client, client, "f"); __classPrivateFieldSet(this, _NetworkManager_ignoreHTTPSErrors, ignoreHTTPSErrors, "f"); __classPrivateFieldSet(this, _NetworkManager_frameManager, frameManager, "f"); __classPrivateFieldGet(this, _NetworkManager_client, "f").on("Fetch.requestPaused", __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onRequestPaused).bind(this)); __classPrivateFieldGet(this, _NetworkManager_client, "f").on("Fetch.authRequired", __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onAuthRequired).bind(this)); __classPrivateFieldGet(this, _NetworkManager_client, "f").on("Network.requestWillBeSent", __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onRequestWillBeSent).bind(this)); __classPrivateFieldGet(this, _NetworkManager_client, "f").on("Network.requestServedFromCache", __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onRequestServedFromCache).bind(this)); __classPrivateFieldGet(this, _NetworkManager_client, "f").on("Network.responseReceived", __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onResponseReceived).bind(this)); __classPrivateFieldGet(this, _NetworkManager_client, "f").on("Network.loadingFinished", __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onLoadingFinished).bind(this)); __classPrivateFieldGet(this, _NetworkManager_client, "f").on("Network.loadingFailed", __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onLoadingFailed).bind(this)); __classPrivateFieldGet(this, _NetworkManager_client, "f").on("Network.responseReceivedExtraInfo", __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onResponseReceivedExtraInfo).bind(this)); } /** * Initialize calls should avoid async dependencies between CDP calls as those * might not resolve until after the target is resumed causing a deadlock. */ initialize() { if (__classPrivateFieldGet(this, _NetworkManager_deferredInitPromise, "f")) { return __classPrivateFieldGet(this, _NetworkManager_deferredInitPromise, "f"); } __classPrivateFieldSet(this, _NetworkManager_deferredInitPromise, (0, DebuggableDeferredPromise_js_1.createDebuggableDeferredPromise)("NetworkManager initialization timed out"), "f"); const init = Promise.all([ __classPrivateFieldGet(this, _NetworkManager_ignoreHTTPSErrors, "f") ? __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Security.setIgnoreCertificateErrors", { ignore: true }) : null, __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Network.enable") ]); const deferredInitPromise = __classPrivateFieldGet(this, _NetworkManager_deferredInitPromise, "f"); init.then(() => { deferredInitPromise.resolve(); }).catch((err) => { deferredInitPromise.reject(err); }); return __classPrivateFieldGet(this, _NetworkManager_deferredInitPromise, "f"); } async authenticate(credentials) { __classPrivateFieldSet(this, _NetworkManager_credentials, credentials, "f"); await __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_updateProtocolRequestInterception).call(this); } async setExtraHTTPHeaders(extraHTTPHeaders) { __classPrivateFieldSet(this, _NetworkManager_extraHTTPHeaders, {}, "f"); for (const key of Object.keys(extraHTTPHeaders)) { const value = extraHTTPHeaders[key]; (0, assert_js_1.assert)((0, util_js_1.isString)(value), `Expected value of header "${key}" to be String, but "${typeof value}" is found.`); __classPrivateFieldGet(this, _NetworkManager_extraHTTPHeaders, "f")[key.toLowerCase()] = value; } await __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Network.setExtraHTTPHeaders", { headers: __classPrivateFieldGet(this, _NetworkManager_extraHTTPHeaders, "f") }); } extraHTTPHeaders() { return Object.assign({}, __classPrivateFieldGet(this, _NetworkManager_extraHTTPHeaders, "f")); } numRequestsInProgress() { return __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").numRequestsInProgress(); } async setOfflineMode(value) { __classPrivateFieldGet(this, _NetworkManager_emulatedNetworkConditions, "f").offline = value; await __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_updateNetworkConditions).call(this); } async emulateNetworkConditions(networkConditions) { __classPrivateFieldGet(this, _NetworkManager_emulatedNetworkConditions, "f").upload = networkConditions ? networkConditions.upload : -1; __classPrivateFieldGet(this, _NetworkManager_emulatedNetworkConditions, "f").download = networkConditions ? networkConditions.download : -1; __classPrivateFieldGet(this, _NetworkManager_emulatedNetworkConditions, "f").latency = networkConditions ? networkConditions.latency : 0; await __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_updateNetworkConditions).call(this); } async setUserAgent(userAgent, userAgentMetadata) { await __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Network.setUserAgentOverride", { userAgent, userAgentMetadata }); } async setCacheEnabled(enabled) { __classPrivateFieldSet(this, _NetworkManager_userCacheDisabled, !enabled, "f"); await __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_updateProtocolCacheDisabled).call(this); } async setRequestInterception(value) { __classPrivateFieldSet(this, _NetworkManager_userRequestInterceptionEnabled, value, "f"); await __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_updateProtocolRequestInterception).call(this); } }; exports2.NetworkManager = NetworkManager; _NetworkManager_client = /* @__PURE__ */ new WeakMap(), _NetworkManager_ignoreHTTPSErrors = /* @__PURE__ */ new WeakMap(), _NetworkManager_frameManager = /* @__PURE__ */ new WeakMap(), _NetworkManager_networkEventManager = /* @__PURE__ */ new WeakMap(), _NetworkManager_extraHTTPHeaders = /* @__PURE__ */ new WeakMap(), _NetworkManager_credentials = /* @__PURE__ */ new WeakMap(), _NetworkManager_attemptedAuthentications = /* @__PURE__ */ new WeakMap(), _NetworkManager_userRequestInterceptionEnabled = /* @__PURE__ */ new WeakMap(), _NetworkManager_protocolRequestInterceptionEnabled = /* @__PURE__ */ new WeakMap(), _NetworkManager_userCacheDisabled = /* @__PURE__ */ new WeakMap(), _NetworkManager_emulatedNetworkConditions = /* @__PURE__ */ new WeakMap(), _NetworkManager_deferredInitPromise = /* @__PURE__ */ new WeakMap(), _NetworkManager_instances = /* @__PURE__ */ new WeakSet(), _NetworkManager_updateNetworkConditions = async function _NetworkManager_updateNetworkConditions2() { await __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Network.emulateNetworkConditions", { offline: __classPrivateFieldGet(this, _NetworkManager_emulatedNetworkConditions, "f").offline, latency: __classPrivateFieldGet(this, _NetworkManager_emulatedNetworkConditions, "f").latency, uploadThroughput: __classPrivateFieldGet(this, _NetworkManager_emulatedNetworkConditions, "f").upload, downloadThroughput: __classPrivateFieldGet(this, _NetworkManager_emulatedNetworkConditions, "f").download }); }, _NetworkManager_updateProtocolRequestInterception = async function _NetworkManager_updateProtocolRequestInterception2() { const enabled = __classPrivateFieldGet(this, _NetworkManager_userRequestInterceptionEnabled, "f") || !!__classPrivateFieldGet(this, _NetworkManager_credentials, "f"); if (enabled === __classPrivateFieldGet(this, _NetworkManager_protocolRequestInterceptionEnabled, "f")) { return; } __classPrivateFieldSet(this, _NetworkManager_protocolRequestInterceptionEnabled, enabled, "f"); if (enabled) { await Promise.all([ __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_updateProtocolCacheDisabled).call(this), __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Fetch.enable", { handleAuthRequests: true, patterns: [{ urlPattern: "*" }] }) ]); } else { await Promise.all([ __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_updateProtocolCacheDisabled).call(this), __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Fetch.disable") ]); } }, _NetworkManager_cacheDisabled = function _NetworkManager_cacheDisabled2() { return __classPrivateFieldGet(this, _NetworkManager_userCacheDisabled, "f"); }, _NetworkManager_updateProtocolCacheDisabled = async function _NetworkManager_updateProtocolCacheDisabled2() { await __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Network.setCacheDisabled", { cacheDisabled: __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_cacheDisabled).call(this) }); }, _NetworkManager_onRequestWillBeSent = function _NetworkManager_onRequestWillBeSent2(event) { if (__classPrivateFieldGet(this, _NetworkManager_userRequestInterceptionEnabled, "f") && !event.request.url.startsWith("data:")) { const { requestId: networkRequestId } = event; __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").storeRequestWillBeSent(networkRequestId, event); const requestPausedEvent = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getRequestPaused(networkRequestId); if (requestPausedEvent) { const { requestId: fetchRequestId } = requestPausedEvent; __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_patchRequestEventHeaders).call(this, event, requestPausedEvent); __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onRequest).call(this, event, fetchRequestId); __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").forgetRequestPaused(networkRequestId); } return; } __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onRequest).call(this, event, void 0); }, _NetworkManager_onAuthRequired = function _NetworkManager_onAuthRequired2(event) { let response = "Default"; if (__classPrivateFieldGet(this, _NetworkManager_attemptedAuthentications, "f").has(event.requestId)) { response = "CancelAuth"; } else if (__classPrivateFieldGet(this, _NetworkManager_credentials, "f")) { response = "ProvideCredentials"; __classPrivateFieldGet(this, _NetworkManager_attemptedAuthentications, "f").add(event.requestId); } const { username, password } = __classPrivateFieldGet(this, _NetworkManager_credentials, "f") || { username: void 0, password: void 0 }; __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Fetch.continueWithAuth", { requestId: event.requestId, authChallengeResponse: { response, username, password } }).catch(util_js_1.debugError); }, _NetworkManager_onRequestPaused = function _NetworkManager_onRequestPaused2(event) { if (!__classPrivateFieldGet(this, _NetworkManager_userRequestInterceptionEnabled, "f") && __classPrivateFieldGet(this, _NetworkManager_protocolRequestInterceptionEnabled, "f")) { __classPrivateFieldGet(this, _NetworkManager_client, "f").send("Fetch.continueRequest", { requestId: event.requestId }).catch(util_js_1.debugError); } const { networkId: networkRequestId, requestId: fetchRequestId } = event; if (!networkRequestId) { return; } const requestWillBeSentEvent = (() => { const requestWillBeSentEvent2 = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getRequestWillBeSent(networkRequestId); if (requestWillBeSentEvent2 && (requestWillBeSentEvent2.request.url !== event.request.url || requestWillBeSentEvent2.request.method !== event.request.method)) { __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").forgetRequestWillBeSent(networkRequestId); return; } return requestWillBeSentEvent2; })(); if (requestWillBeSentEvent) { __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_patchRequestEventHeaders).call(this, requestWillBeSentEvent, event); __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onRequest).call(this, requestWillBeSentEvent, fetchRequestId); } else { __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").storeRequestPaused(networkRequestId, event); } }, _NetworkManager_patchRequestEventHeaders = function _NetworkManager_patchRequestEventHeaders2(requestWillBeSentEvent, requestPausedEvent) { requestWillBeSentEvent.request.headers = { ...requestWillBeSentEvent.request.headers, // includes extra headers, like: Accept, Origin ...requestPausedEvent.request.headers }; }, _NetworkManager_onRequest = function _NetworkManager_onRequest2(event, fetchRequestId) { let redirectChain = []; if (event.redirectResponse) { let redirectResponseExtraInfo = null; if (event.redirectHasExtraInfo) { redirectResponseExtraInfo = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").responseExtraInfo(event.requestId).shift(); if (!redirectResponseExtraInfo) { __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").queueRedirectInfo(event.requestId, { event, fetchRequestId }); return; } } const request3 = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getRequest(event.requestId); if (request3) { __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_handleRequestRedirect).call(this, request3, event.redirectResponse, redirectResponseExtraInfo); redirectChain = request3._redirectChain; } } const frame = event.frameId ? __classPrivateFieldGet(this, _NetworkManager_frameManager, "f").frame(event.frameId) : null; const request2 = new HTTPRequest_js_1.HTTPRequest(__classPrivateFieldGet(this, _NetworkManager_client, "f"), frame, fetchRequestId, __classPrivateFieldGet(this, _NetworkManager_userRequestInterceptionEnabled, "f"), event, redirectChain); __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").storeRequest(event.requestId, request2); this.emit(exports2.NetworkManagerEmittedEvents.Request, request2); request2.finalizeInterceptions(); }, _NetworkManager_onRequestServedFromCache = function _NetworkManager_onRequestServedFromCache2(event) { const request2 = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getRequest(event.requestId); if (request2) { request2._fromMemoryCache = true; } this.emit(exports2.NetworkManagerEmittedEvents.RequestServedFromCache, request2); }, _NetworkManager_handleRequestRedirect = function _NetworkManager_handleRequestRedirect2(request2, responsePayload, extraInfo) { const response = new HTTPResponse_js_1.HTTPResponse(__classPrivateFieldGet(this, _NetworkManager_client, "f"), request2, responsePayload, extraInfo); request2._response = response; request2._redirectChain.push(request2); response._resolveBody(new Error("Response body is unavailable for redirect responses")); __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_forgetRequest).call(this, request2, false); this.emit(exports2.NetworkManagerEmittedEvents.Response, response); this.emit(exports2.NetworkManagerEmittedEvents.RequestFinished, request2); }, _NetworkManager_emitResponseEvent = function _NetworkManager_emitResponseEvent2(responseReceived, extraInfo) { const request2 = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getRequest(responseReceived.requestId); if (!request2) { return; } const extraInfos = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").responseExtraInfo(responseReceived.requestId); if (extraInfos.length) { (0, util_js_1.debugError)(new Error("Unexpected extraInfo events for request " + responseReceived.requestId)); } const response = new HTTPResponse_js_1.HTTPResponse(__classPrivateFieldGet(this, _NetworkManager_client, "f"), request2, responseReceived.response, extraInfo); request2._response = response; this.emit(exports2.NetworkManagerEmittedEvents.Response, response); }, _NetworkManager_onResponseReceived = function _NetworkManager_onResponseReceived2(event) { const request2 = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getRequest(event.requestId); let extraInfo = null; if (request2 && !request2._fromMemoryCache && event.hasExtraInfo) { extraInfo = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").responseExtraInfo(event.requestId).shift(); if (!extraInfo) { __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").queueEventGroup(event.requestId, { responseReceivedEvent: event }); return; } } __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_emitResponseEvent).call(this, event, extraInfo); }, _NetworkManager_onResponseReceivedExtraInfo = function _NetworkManager_onResponseReceivedExtraInfo2(event) { const redirectInfo = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").takeQueuedRedirectInfo(event.requestId); if (redirectInfo) { __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").responseExtraInfo(event.requestId).push(event); __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_onRequest).call(this, redirectInfo.event, redirectInfo.fetchRequestId); return; } const queuedEvents = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getQueuedEventGroup(event.requestId); if (queuedEvents) { __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").forgetQueuedEventGroup(event.requestId); __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_emitResponseEvent).call(this, queuedEvents.responseReceivedEvent, event); if (queuedEvents.loadingFinishedEvent) { __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_emitLoadingFinished).call(this, queuedEvents.loadingFinishedEvent); } if (queuedEvents.loadingFailedEvent) { __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_emitLoadingFailed).call(this, queuedEvents.loadingFailedEvent); } return; } __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").responseExtraInfo(event.requestId).push(event); }, _NetworkManager_forgetRequest = function _NetworkManager_forgetRequest2(request2, events) { const requestId = request2._requestId; const interceptionId = request2._interceptionId; __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").forgetRequest(requestId); interceptionId !== void 0 && __classPrivateFieldGet(this, _NetworkManager_attemptedAuthentications, "f").delete(interceptionId); if (events) { __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").forget(requestId); } }, _NetworkManager_onLoadingFinished = function _NetworkManager_onLoadingFinished2(event) { const queuedEvents = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getQueuedEventGroup(event.requestId); if (queuedEvents) { queuedEvents.loadingFinishedEvent = event; } else { __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_emitLoadingFinished).call(this, event); } }, _NetworkManager_emitLoadingFinished = function _NetworkManager_emitLoadingFinished2(event) { var _a; const request2 = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getRequest(event.requestId); if (!request2) { return; } if (request2.response()) { (_a = request2.response()) === null || _a === void 0 ? void 0 : _a._resolveBody(null); } __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_forgetRequest).call(this, request2, true); this.emit(exports2.NetworkManagerEmittedEvents.RequestFinished, request2); }, _NetworkManager_onLoadingFailed = function _NetworkManager_onLoadingFailed2(event) { const queuedEvents = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getQueuedEventGroup(event.requestId); if (queuedEvents) { queuedEvents.loadingFailedEvent = event; } else { __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_emitLoadingFailed).call(this, event); } }, _NetworkManager_emitLoadingFailed = function _NetworkManager_emitLoadingFailed2(event) { const request2 = __classPrivateFieldGet(this, _NetworkManager_networkEventManager, "f").getRequest(event.requestId); if (!request2) { return; } request2._failureText = event.errorText; const response = request2.response(); if (response) { response._resolveBody(null); } __classPrivateFieldGet(this, _NetworkManager_instances, "m", _NetworkManager_forgetRequest).call(this, request2, true); this.emit(exports2.NetworkManagerEmittedEvents.RequestFailed, request2); }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js var require_LifecycleWatcher = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _LifecycleWatcher_instances; var _LifecycleWatcher_expectedLifecycle; var _LifecycleWatcher_frameManager; var _LifecycleWatcher_frame; var _LifecycleWatcher_timeout; var _LifecycleWatcher_navigationRequest; var _LifecycleWatcher_eventListeners; var _LifecycleWatcher_initialLoaderId; var _LifecycleWatcher_sameDocumentNavigationCompleteCallback; var _LifecycleWatcher_sameDocumentNavigationPromise; var _LifecycleWatcher_lifecycleCallback; var _LifecycleWatcher_lifecyclePromise; var _LifecycleWatcher_newDocumentNavigationCompleteCallback; var _LifecycleWatcher_newDocumentNavigationPromise; var _LifecycleWatcher_terminationCallback; var _LifecycleWatcher_terminationPromise; var _LifecycleWatcher_timeoutPromise; var _LifecycleWatcher_maximumTimer; var _LifecycleWatcher_hasSameDocumentNavigation; var _LifecycleWatcher_swapped; var _LifecycleWatcher_navigationResponseReceived; var _LifecycleWatcher_onRequest; var _LifecycleWatcher_onRequestFailed; var _LifecycleWatcher_onResponse; var _LifecycleWatcher_onFrameDetached; var _LifecycleWatcher_terminate; var _LifecycleWatcher_createTimeoutPromise; var _LifecycleWatcher_navigatedWithinDocument; var _LifecycleWatcher_navigated; var _LifecycleWatcher_frameSwapped; var _LifecycleWatcher_checkLifecycleComplete; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.LifecycleWatcher = void 0; var assert_js_1 = require_assert(); var util_js_1 = require_util4(); var DeferredPromise_js_1 = require_DeferredPromise(); var Errors_js_1 = require_Errors(); var FrameManager_js_1 = require_FrameManager(); var NetworkManager_js_1 = require_NetworkManager(); var Connection_js_1 = require_Connection(); var puppeteerToProtocolLifecycle = /* @__PURE__ */ new Map([ ["load", "load"], ["domcontentloaded", "DOMContentLoaded"], ["networkidle0", "networkIdle"], ["networkidle2", "networkAlmostIdle"] ]); var noop = () => { }; var LifecycleWatcher = class { constructor(frameManager, frame, waitUntil, timeout) { _LifecycleWatcher_instances.add(this); _LifecycleWatcher_expectedLifecycle.set(this, void 0); _LifecycleWatcher_frameManager.set(this, void 0); _LifecycleWatcher_frame.set(this, void 0); _LifecycleWatcher_timeout.set(this, void 0); _LifecycleWatcher_navigationRequest.set(this, null); _LifecycleWatcher_eventListeners.set(this, void 0); _LifecycleWatcher_initialLoaderId.set(this, void 0); _LifecycleWatcher_sameDocumentNavigationCompleteCallback.set(this, noop); _LifecycleWatcher_sameDocumentNavigationPromise.set(this, new Promise((fulfill) => { __classPrivateFieldSet(this, _LifecycleWatcher_sameDocumentNavigationCompleteCallback, fulfill, "f"); })); _LifecycleWatcher_lifecycleCallback.set(this, noop); _LifecycleWatcher_lifecyclePromise.set(this, new Promise((fulfill) => { __classPrivateFieldSet(this, _LifecycleWatcher_lifecycleCallback, fulfill, "f"); })); _LifecycleWatcher_newDocumentNavigationCompleteCallback.set(this, noop); _LifecycleWatcher_newDocumentNavigationPromise.set(this, new Promise((fulfill) => { __classPrivateFieldSet(this, _LifecycleWatcher_newDocumentNavigationCompleteCallback, fulfill, "f"); })); _LifecycleWatcher_terminationCallback.set(this, noop); _LifecycleWatcher_terminationPromise.set(this, new Promise((fulfill) => { __classPrivateFieldSet(this, _LifecycleWatcher_terminationCallback, fulfill, "f"); })); _LifecycleWatcher_timeoutPromise.set(this, void 0); _LifecycleWatcher_maximumTimer.set(this, void 0); _LifecycleWatcher_hasSameDocumentNavigation.set(this, void 0); _LifecycleWatcher_swapped.set(this, void 0); _LifecycleWatcher_navigationResponseReceived.set(this, void 0); if (Array.isArray(waitUntil)) { waitUntil = waitUntil.slice(); } else if (typeof waitUntil === "string") { waitUntil = [waitUntil]; } __classPrivateFieldSet(this, _LifecycleWatcher_initialLoaderId, frame._loaderId, "f"); __classPrivateFieldSet(this, _LifecycleWatcher_expectedLifecycle, waitUntil.map((value) => { const protocolEvent = puppeteerToProtocolLifecycle.get(value); (0, assert_js_1.assert)(protocolEvent, "Unknown value for options.waitUntil: " + value); return protocolEvent; }), "f"); __classPrivateFieldSet(this, _LifecycleWatcher_frameManager, frameManager, "f"); __classPrivateFieldSet(this, _LifecycleWatcher_frame, frame, "f"); __classPrivateFieldSet(this, _LifecycleWatcher_timeout, timeout, "f"); __classPrivateFieldSet(this, _LifecycleWatcher_eventListeners, [ (0, util_js_1.addEventListener)(frameManager.client, Connection_js_1.CDPSessionEmittedEvents.Disconnected, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_terminate).bind(this, new Error("Navigation failed because browser has disconnected!"))), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.LifecycleEvent, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameNavigatedWithinDocument, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_navigatedWithinDocument).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameNavigated, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_navigated).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameSwapped, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_frameSwapped).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f"), FrameManager_js_1.FrameManagerEmittedEvents.FrameDetached, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onFrameDetached).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager, NetworkManager_js_1.NetworkManagerEmittedEvents.Request, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onRequest).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager, NetworkManager_js_1.NetworkManagerEmittedEvents.Response, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onResponse).bind(this)), (0, util_js_1.addEventListener)(__classPrivateFieldGet(this, _LifecycleWatcher_frameManager, "f").networkManager, NetworkManager_js_1.NetworkManagerEmittedEvents.RequestFailed, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_onRequestFailed).bind(this)) ], "f"); __classPrivateFieldSet(this, _LifecycleWatcher_timeoutPromise, __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_createTimeoutPromise).call(this), "f"); __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).call(this); } async navigationResponse() { var _a; await ((_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _a === void 0 ? void 0 : _a.catch(() => { })); return __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f") ? __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f").response() : null; } sameDocumentNavigationPromise() { return __classPrivateFieldGet(this, _LifecycleWatcher_sameDocumentNavigationPromise, "f"); } newDocumentNavigationPromise() { return __classPrivateFieldGet(this, _LifecycleWatcher_newDocumentNavigationPromise, "f"); } lifecyclePromise() { return __classPrivateFieldGet(this, _LifecycleWatcher_lifecyclePromise, "f"); } timeoutOrTerminationPromise() { return Promise.race([__classPrivateFieldGet(this, _LifecycleWatcher_timeoutPromise, "f"), __classPrivateFieldGet(this, _LifecycleWatcher_terminationPromise, "f")]); } dispose() { (0, util_js_1.removeEventListeners)(__classPrivateFieldGet(this, _LifecycleWatcher_eventListeners, "f")); __classPrivateFieldGet(this, _LifecycleWatcher_maximumTimer, "f") !== void 0 && clearTimeout(__classPrivateFieldGet(this, _LifecycleWatcher_maximumTimer, "f")); } }; exports2.LifecycleWatcher = LifecycleWatcher; _LifecycleWatcher_expectedLifecycle = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_frameManager = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_frame = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_timeout = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_navigationRequest = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_eventListeners = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_initialLoaderId = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_sameDocumentNavigationCompleteCallback = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_sameDocumentNavigationPromise = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_lifecycleCallback = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_lifecyclePromise = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_newDocumentNavigationCompleteCallback = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_newDocumentNavigationPromise = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_terminationCallback = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_terminationPromise = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_timeoutPromise = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_maximumTimer = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_hasSameDocumentNavigation = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_swapped = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_navigationResponseReceived = /* @__PURE__ */ new WeakMap(), _LifecycleWatcher_instances = /* @__PURE__ */ new WeakSet(), _LifecycleWatcher_onRequest = function _LifecycleWatcher_onRequest2(request2) { var _a, _b; if (request2.frame() !== __classPrivateFieldGet(this, _LifecycleWatcher_frame, "f") || !request2.isNavigationRequest()) { return; } __classPrivateFieldSet(this, _LifecycleWatcher_navigationRequest, request2, "f"); (_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _a === void 0 ? void 0 : _a.resolve(); __classPrivateFieldSet(this, _LifecycleWatcher_navigationResponseReceived, (0, DeferredPromise_js_1.createDeferredPromise)(), "f"); if (request2.response() !== null) { (_b = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _b === void 0 ? void 0 : _b.resolve(); } }, _LifecycleWatcher_onRequestFailed = function _LifecycleWatcher_onRequestFailed2(request2) { var _a, _b; if (((_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f")) === null || _a === void 0 ? void 0 : _a._requestId) !== request2._requestId) { return; } (_b = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _b === void 0 ? void 0 : _b.resolve(); }, _LifecycleWatcher_onResponse = function _LifecycleWatcher_onResponse2(response) { var _a, _b; if (((_a = __classPrivateFieldGet(this, _LifecycleWatcher_navigationRequest, "f")) === null || _a === void 0 ? void 0 : _a._requestId) !== response.request()._requestId) { return; } (_b = __classPrivateFieldGet(this, _LifecycleWatcher_navigationResponseReceived, "f")) === null || _b === void 0 ? void 0 : _b.resolve(); }, _LifecycleWatcher_onFrameDetached = function _LifecycleWatcher_onFrameDetached2(frame) { if (__classPrivateFieldGet(this, _LifecycleWatcher_frame, "f") === frame) { __classPrivateFieldGet(this, _LifecycleWatcher_terminationCallback, "f").call(null, new Error("Navigating frame was detached")); return; } __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).call(this); }, _LifecycleWatcher_terminate = function _LifecycleWatcher_terminate2(error) { __classPrivateFieldGet(this, _LifecycleWatcher_terminationCallback, "f").call(null, error); }, _LifecycleWatcher_createTimeoutPromise = async function _LifecycleWatcher_createTimeoutPromise2() { if (!__classPrivateFieldGet(this, _LifecycleWatcher_timeout, "f")) { return new Promise(noop); } const errorMessage = "Navigation timeout of " + __classPrivateFieldGet(this, _LifecycleWatcher_timeout, "f") + " ms exceeded"; await new Promise((fulfill) => { return __classPrivateFieldSet(this, _LifecycleWatcher_maximumTimer, setTimeout(fulfill, __classPrivateFieldGet(this, _LifecycleWatcher_timeout, "f")), "f"); }); return new Errors_js_1.TimeoutError(errorMessage); }, _LifecycleWatcher_navigatedWithinDocument = function _LifecycleWatcher_navigatedWithinDocument2(frame) { if (frame !== __classPrivateFieldGet(this, _LifecycleWatcher_frame, "f")) { return; } __classPrivateFieldSet(this, _LifecycleWatcher_hasSameDocumentNavigation, true, "f"); __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).call(this); }, _LifecycleWatcher_navigated = function _LifecycleWatcher_navigated2(frame) { if (frame !== __classPrivateFieldGet(this, _LifecycleWatcher_frame, "f")) { return; } __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).call(this); }, _LifecycleWatcher_frameSwapped = function _LifecycleWatcher_frameSwapped2(frame) { if (frame !== __classPrivateFieldGet(this, _LifecycleWatcher_frame, "f")) { return; } __classPrivateFieldSet(this, _LifecycleWatcher_swapped, true, "f"); __classPrivateFieldGet(this, _LifecycleWatcher_instances, "m", _LifecycleWatcher_checkLifecycleComplete).call(this); }, _LifecycleWatcher_checkLifecycleComplete = function _LifecycleWatcher_checkLifecycleComplete2() { if (!checkLifecycle(__classPrivateFieldGet(this, _LifecycleWatcher_frame, "f"), __classPrivateFieldGet(this, _LifecycleWatcher_expectedLifecycle, "f"))) { return; } __classPrivateFieldGet(this, _LifecycleWatcher_lifecycleCallback, "f").call(this); if (__classPrivateFieldGet(this, _LifecycleWatcher_hasSameDocumentNavigation, "f")) { __classPrivateFieldGet(this, _LifecycleWatcher_sameDocumentNavigationCompleteCallback, "f").call(this); } if (__classPrivateFieldGet(this, _LifecycleWatcher_swapped, "f") || __classPrivateFieldGet(this, _LifecycleWatcher_frame, "f")._loaderId !== __classPrivateFieldGet(this, _LifecycleWatcher_initialLoaderId, "f")) { __classPrivateFieldGet(this, _LifecycleWatcher_newDocumentNavigationCompleteCallback, "f").call(this); } function checkLifecycle(frame, expectedLifecycle) { for (const event of expectedLifecycle) { if (!frame._lifecycleEvents.has(event)) { return false; } } for (const child of frame.childFrames()) { if (child._hasStartedLoading && !checkLifecycle(child, expectedLifecycle)) { return false; } } return true; } }; } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js var require_WaitTask = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js"(exports2) { "use strict"; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _WaitTask_world; var _WaitTask_polling; var _WaitTask_root; var _WaitTask_fn; var _WaitTask_args; var _WaitTask_timeout; var _WaitTask_result; var _WaitTask_poller; var _TaskManager_tasks; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.TaskManager = exports2.WaitTask = void 0; var DeferredPromise_js_1 = require_DeferredPromise(); var Function_js_1 = require_Function(); var Errors_js_1 = require_Errors(); var LazyArg_js_1 = require_LazyArg(); var WaitTask = class { constructor(world, options2, fn, ...args) { _WaitTask_world.set(this, void 0); _WaitTask_polling.set(this, void 0); _WaitTask_root.set(this, void 0); _WaitTask_fn.set(this, void 0); _WaitTask_args.set(this, void 0); _WaitTask_timeout.set(this, void 0); _WaitTask_result.set(this, (0, DeferredPromise_js_1.createDeferredPromise)()); _WaitTask_poller.set(this, void 0); __classPrivateFieldSet(this, _WaitTask_world, world, "f"); __classPrivateFieldSet(this, _WaitTask_polling, options2.polling, "f"); __classPrivateFieldSet(this, _WaitTask_root, options2.root, "f"); switch (typeof fn) { case "string": __classPrivateFieldSet(this, _WaitTask_fn, `() => {return (${fn});}`, "f"); break; default: __classPrivateFieldSet(this, _WaitTask_fn, (0, Function_js_1.stringifyFunction)(fn), "f"); break; } __classPrivateFieldSet(this, _WaitTask_args, args, "f"); __classPrivateFieldGet(this, _WaitTask_world, "f").taskManager.add(this); if (options2.timeout) { __classPrivateFieldSet(this, _WaitTask_timeout, setTimeout(() => { this.terminate(new Errors_js_1.TimeoutError(`Waiting failed: ${options2.timeout}ms exceeded`)); }, options2.timeout), "f"); } this.rerun(); } get result() { return __classPrivateFieldGet(this, _WaitTask_result, "f"); } async rerun() { try { switch (__classPrivateFieldGet(this, _WaitTask_polling, "f")) { case "raf": __classPrivateFieldSet(this, _WaitTask_poller, await __classPrivateFieldGet(this, _WaitTask_world, "f").evaluateHandle(({ RAFPoller, createFunction }, fn, ...args) => { const fun = createFunction(fn); return new RAFPoller(() => { return fun(...args); }); }, LazyArg_js_1.LazyArg.create((context) => { return context.puppeteerUtil; }), __classPrivateFieldGet(this, _WaitTask_fn, "f"), ...__classPrivateFieldGet(this, _WaitTask_args, "f")), "f"); break; case "mutation": __classPrivateFieldSet(this, _WaitTask_poller, await __classPrivateFieldGet(this, _WaitTask_world, "f").evaluateHandle(({ MutationPoller, createFunction }, root, fn, ...args) => { const fun = createFunction(fn); return new MutationPoller(() => { return fun(...args); }, root || document); }, LazyArg_js_1.LazyArg.create((context) => { return context.puppeteerUtil; }), __classPrivateFieldGet(this, _WaitTask_root, "f"), __classPrivateFieldGet(this, _WaitTask_fn, "f"), ...__classPrivateFieldGet(this, _WaitTask_args, "f")), "f"); break; default: __classPrivateFieldSet(this, _WaitTask_poller, await __classPrivateFieldGet(this, _WaitTask_world, "f").evaluateHandle(({ IntervalPoller, createFunction }, ms, fn, ...args) => { const fun = createFunction(fn); return new IntervalPoller(() => { return fun(...args); }, ms); }, LazyArg_js_1.LazyArg.create((context) => { return context.puppeteerUtil; }), __classPrivateFieldGet(this, _WaitTask_polling, "f"), __classPrivateFieldGet(this, _WaitTask_fn, "f"), ...__classPrivateFieldGet(this, _WaitTask_args, "f")), "f"); break; } await __classPrivateFieldGet(this, _WaitTask_poller, "f").evaluate((poller) => { poller.start(); }); const result = await __classPrivateFieldGet(this, _WaitTask_poller, "f").evaluateHandle((poller) => { return poller.result(); }); __classPrivateFieldGet(this, _WaitTask_result, "f").resolve(result); await this.terminate(); } catch (error) { const badError = this.getBadError(error); if (badError) { await this.terminate(badError); } } } async terminate(error) { __classPrivateFieldGet(this, _WaitTask_world, "f").taskManager.delete(this); if (__classPrivateFieldGet(this, _WaitTask_timeout, "f")) { clearTimeout(__classPrivateFieldGet(this, _WaitTask_timeout, "f")); } if (error && !__classPrivateFieldGet(this, _WaitTask_result, "f").finished()) { __classPrivateFieldGet(this, _WaitTask_result, "f").reject(error); } if (__classPrivateFieldGet(this, _WaitTask_poller, "f")) { try { await __classPrivateFieldGet(this, _WaitTask_poller, "f").evaluateHandle(async (poller) => { await poller.stop(); }); if (__classPrivateFieldGet(this, _WaitTask_poller, "f")) { await __classPrivateFieldGet(this, _WaitTask_poller, "f").dispose(); __classPrivateFieldSet(this, _WaitTask_poller, void 0, "f"); } } catch (e) { } } } /** * Not all errors lead to termination. They usually imply we need to rerun the task. */ getBadError(error) { if (error instanceof Error) { if (error.message.includes("Execution context is not available in detached frame")) { return new Error("Waiting failed: Frame detached"); } if (error.message.includes("Execution context was destroyed")) { return; } if (error.message.includes("Cannot find context with specified id")) { return; } } return error; } }; exports2.WaitTask = WaitTask; _WaitTask_world = /* @__PURE__ */ new WeakMap(), _WaitTask_polling = /* @__PURE__ */ new WeakMap(), _WaitTask_root = /* @__PURE__ */ new WeakMap(), _WaitTask_fn = /* @__PURE__ */ new WeakMap(), _WaitTask_args = /* @__PURE__ */ new WeakMap(), _WaitTask_timeout = /* @__PURE__ */ new WeakMap(), _WaitTask_result = /* @__PURE__ */ new WeakMap(), _WaitTask_poller = /* @__PURE__ */ new WeakMap(); var TaskManager = class { constructor() { _TaskManager_tasks.set(this, /* @__PURE__ */ new Set()); } add(task) { __classPrivateFieldGet(this, _TaskManager_tasks, "f").add(task); } delete(task) { __classPrivateFieldGet(this, _TaskManager_tasks, "f").delete(task); } terminateAll(error) { for (const task of __classPrivateFieldGet(this, _TaskManager_tasks, "f")) { task.terminate(error); } __classPrivateFieldGet(this, _TaskManager_tasks, "f").clear(); } async rerunAll() { await Promise.all([...__classPrivateFieldGet(this, _TaskManager_tasks, "f")].map((task) => { return task.rerun(); })); } }; exports2.TaskManager = TaskManager; _TaskManager_tasks = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/IsolatedWorld.js var require_IsolatedWorld = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/IsolatedWorld.js"(exports2) { "use strict"; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var _IsolatedWorld_instances; var _IsolatedWorld_frame; var _IsolatedWorld_document; var _IsolatedWorld_context; var _IsolatedWorld_detached; var _IsolatedWorld_contextBindings; var _IsolatedWorld_bindings; var _IsolatedWorld_taskManager; var _IsolatedWorld_client_get; var _IsolatedWorld_frameManager_get; var _IsolatedWorld_timeoutSettings_get; var _IsolatedWorld_mutex; var _IsolatedWorld_onBindingCalled; var _Mutex_locked; var _Mutex_acquirers; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.IsolatedWorld = void 0; var assert_js_1 = require_assert(); var DeferredPromise_js_1 = require_DeferredPromise(); var IsolatedWorlds_js_1 = require_IsolatedWorlds(); var LifecycleWatcher_js_1 = require_LifecycleWatcher(); var util_js_1 = require_util4(); var WaitTask_js_1 = require_WaitTask(); var IsolatedWorld = class { get taskManager() { return __classPrivateFieldGet(this, _IsolatedWorld_taskManager, "f"); } get _bindings() { return __classPrivateFieldGet(this, _IsolatedWorld_bindings, "f"); } constructor(frame) { _IsolatedWorld_instances.add(this); _IsolatedWorld_frame.set(this, void 0); _IsolatedWorld_document.set(this, void 0); _IsolatedWorld_context.set(this, (0, DeferredPromise_js_1.createDeferredPromise)()); _IsolatedWorld_detached.set(this, false); _IsolatedWorld_contextBindings.set(this, /* @__PURE__ */ new Set()); _IsolatedWorld_bindings.set(this, /* @__PURE__ */ new Map()); _IsolatedWorld_taskManager.set(this, new WaitTask_js_1.TaskManager()); _IsolatedWorld_mutex.set(this, new Mutex()); _IsolatedWorld_onBindingCalled.set(this, async (event) => { let payload; try { payload = JSON.parse(event.payload); } catch (e) { return; } const { type, name, seq, args, isTrivial } = payload; if (type !== "internal") { return; } if (!__classPrivateFieldGet(this, _IsolatedWorld_contextBindings, "f").has(name)) { return; } const context = await __classPrivateFieldGet(this, _IsolatedWorld_context, "f"); if (event.executionContextId !== context._contextId) { return; } const binding = this._bindings.get(name); await (binding === null || binding === void 0 ? void 0 : binding.run(context, seq, args, isTrivial)); }); __classPrivateFieldSet(this, _IsolatedWorld_frame, frame, "f"); __classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_client_get).on("Runtime.bindingCalled", __classPrivateFieldGet(this, _IsolatedWorld_onBindingCalled, "f")); } frame() { return __classPrivateFieldGet(this, _IsolatedWorld_frame, "f"); } clearContext() { __classPrivateFieldSet(this, _IsolatedWorld_document, void 0, "f"); __classPrivateFieldSet(this, _IsolatedWorld_context, (0, DeferredPromise_js_1.createDeferredPromise)(), "f"); } setContext(context) { __classPrivateFieldGet(this, _IsolatedWorld_contextBindings, "f").clear(); __classPrivateFieldGet(this, _IsolatedWorld_context, "f").resolve(context); __classPrivateFieldGet(this, _IsolatedWorld_taskManager, "f").rerunAll(); } hasContext() { return __classPrivateFieldGet(this, _IsolatedWorld_context, "f").resolved(); } _detach() { __classPrivateFieldSet(this, _IsolatedWorld_detached, true, "f"); __classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_client_get).off("Runtime.bindingCalled", __classPrivateFieldGet(this, _IsolatedWorld_onBindingCalled, "f")); __classPrivateFieldGet(this, _IsolatedWorld_taskManager, "f").terminateAll(new Error("waitForFunction failed: frame got detached.")); } executionContext() { if (__classPrivateFieldGet(this, _IsolatedWorld_detached, "f")) { throw new Error(`Execution context is not available in detached frame "${__classPrivateFieldGet(this, _IsolatedWorld_frame, "f").url()}" (are you trying to evaluate?)`); } if (__classPrivateFieldGet(this, _IsolatedWorld_context, "f") === null) { throw new Error(`Execution content promise is missing`); } return __classPrivateFieldGet(this, _IsolatedWorld_context, "f"); } async evaluateHandle(pageFunction, ...args) { const context = await this.executionContext(); return context.evaluateHandle(pageFunction, ...args); } async evaluate(pageFunction, ...args) { const context = await this.executionContext(); return context.evaluate(pageFunction, ...args); } async $(selector) { const document2 = await this.document(); return document2.$(selector); } async $$(selector) { const document2 = await this.document(); return document2.$$(selector); } async document() { if (__classPrivateFieldGet(this, _IsolatedWorld_document, "f")) { return __classPrivateFieldGet(this, _IsolatedWorld_document, "f"); } const context = await this.executionContext(); __classPrivateFieldSet(this, _IsolatedWorld_document, await context.evaluateHandle(() => { return document; }), "f"); return __classPrivateFieldGet(this, _IsolatedWorld_document, "f"); } async $x(expression) { const document2 = await this.document(); return document2.$x(expression); } async $eval(selector, pageFunction, ...args) { const document2 = await this.document(); return document2.$eval(selector, pageFunction, ...args); } async $$eval(selector, pageFunction, ...args) { const document2 = await this.document(); return document2.$$eval(selector, pageFunction, ...args); } async content() { return await this.evaluate(() => { let retVal = ""; if (document.doctype) { retVal = new XMLSerializer().serializeToString(document.doctype); } if (document.documentElement) { retVal += document.documentElement.outerHTML; } return retVal; }); } async setContent(html2, options2 = {}) { const { waitUntil = ["load"], timeout = __classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_timeoutSettings_get).navigationTimeout() } = options2; await this.evaluate((html3) => { document.open(); document.write(html3); document.close(); }, html2); const watcher = new LifecycleWatcher_js_1.LifecycleWatcher(__classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_frameManager_get), __classPrivateFieldGet(this, _IsolatedWorld_frame, "f"), waitUntil, timeout); const error = await Promise.race([ watcher.timeoutOrTerminationPromise(), watcher.lifecyclePromise() ]); watcher.dispose(); if (error) { throw error; } } async click(selector, options2) { const handle = await this.$(selector); (0, assert_js_1.assert)(handle, `No element found for selector: ${selector}`); await handle.click(options2); await handle.dispose(); } async focus(selector) { const handle = await this.$(selector); (0, assert_js_1.assert)(handle, `No element found for selector: ${selector}`); await handle.focus(); await handle.dispose(); } async hover(selector) { const handle = await this.$(selector); (0, assert_js_1.assert)(handle, `No element found for selector: ${selector}`); await handle.hover(); await handle.dispose(); } async select(selector, ...values) { const handle = await this.$(selector); (0, assert_js_1.assert)(handle, `No element found for selector: ${selector}`); const result = await handle.select(...values); await handle.dispose(); return result; } async tap(selector) { const handle = await this.$(selector); (0, assert_js_1.assert)(handle, `No element found for selector: ${selector}`); await handle.tap(); await handle.dispose(); } async type(selector, text, options2) { const handle = await this.$(selector); (0, assert_js_1.assert)(handle, `No element found for selector: ${selector}`); await handle.type(text, options2); await handle.dispose(); } async _addBindingToContext(context, name) { if (__classPrivateFieldGet(this, _IsolatedWorld_contextBindings, "f").has(name)) { return; } await __classPrivateFieldGet(this, _IsolatedWorld_mutex, "f").acquire(); try { await context._client.send("Runtime.addBinding", { name, executionContextName: context._contextName }); await context.evaluate(util_js_1.addPageBinding, "internal", name); __classPrivateFieldGet(this, _IsolatedWorld_contextBindings, "f").add(name); } catch (error) { if (error instanceof Error) { if (error.message.includes("Execution context was destroyed")) { return; } if (error.message.includes("Cannot find context with specified id")) { return; } } (0, util_js_1.debugError)(error); } finally { __classPrivateFieldGet(this, _IsolatedWorld_mutex, "f").release(); } } waitForFunction(pageFunction, options2 = {}, ...args) { const { polling = "raf", timeout = __classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_timeoutSettings_get).timeout(), root } = options2; if (typeof polling === "number" && polling < 0) { throw new Error("Cannot poll with non-positive interval"); } const waitTask = new WaitTask_js_1.WaitTask(this, { polling, root, timeout }, pageFunction, ...args); return waitTask.result; } async title() { return this.evaluate(() => { return document.title; }); } async adoptBackendNode(backendNodeId) { const executionContext = await this.executionContext(); const { object } = await __classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_client_get).send("DOM.resolveNode", { backendNodeId, executionContextId: executionContext._contextId }); return (0, util_js_1.createJSHandle)(executionContext, object); } async adoptHandle(handle) { const context = await this.executionContext(); (0, assert_js_1.assert)(handle.executionContext() !== context, "Cannot adopt handle that already belongs to this execution context"); const nodeInfo = await __classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_client_get).send("DOM.describeNode", { objectId: handle.id }); return await this.adoptBackendNode(nodeInfo.node.backendNodeId); } async transferHandle(handle) { const context = await this.executionContext(); if (handle.executionContext() === context) { return handle; } const info = await __classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_client_get).send("DOM.describeNode", { objectId: handle.remoteObject().objectId }); const newHandle = await this.adoptBackendNode(info.node.backendNodeId); await handle.dispose(); return newHandle; } }; exports2.IsolatedWorld = IsolatedWorld; _IsolatedWorld_frame = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_document = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_context = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_detached = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_contextBindings = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_bindings = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_taskManager = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_mutex = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_onBindingCalled = /* @__PURE__ */ new WeakMap(), _IsolatedWorld_instances = /* @__PURE__ */ new WeakSet(), _IsolatedWorld_client_get = function _IsolatedWorld_client_get2() { return __classPrivateFieldGet(this, _IsolatedWorld_frame, "f")._client(); }, _IsolatedWorld_frameManager_get = function _IsolatedWorld_frameManager_get2() { return __classPrivateFieldGet(this, _IsolatedWorld_frame, "f")._frameManager; }, _IsolatedWorld_timeoutSettings_get = function _IsolatedWorld_timeoutSettings_get2() { return __classPrivateFieldGet(this, _IsolatedWorld_instances, "a", _IsolatedWorld_frameManager_get).timeoutSettings; }; var Mutex = class { constructor() { _Mutex_locked.set(this, false); _Mutex_acquirers.set(this, []); } // This is FIFO. acquire() { if (!__classPrivateFieldGet(this, _Mutex_locked, "f")) { __classPrivateFieldSet(this, _Mutex_locked, true, "f"); return Promise.resolve(); } let resolve; const promise = new Promise((res) => { resolve = res; }); __classPrivateFieldGet(this, _Mutex_acquirers, "f").push(resolve); return promise; } release() { const resolve = __classPrivateFieldGet(this, _Mutex_acquirers, "f").shift(); if (!resolve) { __classPrivateFieldSet(this, _Mutex_locked, false, "f"); return; } resolve(); } }; _Mutex_locked = /* @__PURE__ */ new WeakMap(), _Mutex_acquirers = /* @__PURE__ */ new WeakMap(); } }); // node_modules/puppeteer-core/lib/cjs/puppeteer/common/Frame.js var require_Frame = __commonJS({ "node_modules/puppeteer-core/lib/cjs/puppeteer/common/Frame.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); } : function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; }); var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); } : function(o, v) { o["default"] = v; }); var __importStar = exports2 && exports2.__importStar || function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } __setModuleDefault(result, mod); return result; }; var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; }; var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _Frame_url; var _Frame_detached; var _Frame_client; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Frame = void 0; var ErrorLike_js_1 = require_ErrorLike(); var GetQueryHandler_js_1 = require_GetQueryHandler(); var IsolatedWorld_js_1 = require_IsolatedWorld(); var IsolatedWorlds_js_1 = require_IsolatedWorlds(); var LazyArg_js_1 = require_LazyArg(); var LifecycleWatcher_js_1 = require_LifecycleWatcher(); var util_js_1 = require_util4(); var Frame = class { /** * @internal */ constructor(frameManager, frameId, parentFrameId, client) { _Frame_url.set(this, ""); _Frame_detached.set(this, false); _Frame_client.set(this, void 0); this._loaderId = ""; this._hasStartedLoading = false; this._lifecycleEvents = /* @__PURE__ */ new Set(); this._frameManager = frameManager; __classPrivateFieldSet(this, _Frame_url, "", "f"); this._id = frameId; this._parentId = parentFrameId; __classPrivateFieldSet(this, _Frame_detached, false, "f"); this._loaderId = ""; this.updateClient(client); } /** * @internal */ updateClient(client) { __classPrivateFieldSet(this, _Frame_client, client, "f"); this.worlds = { [IsolatedWorlds_js_1.MAIN_WORLD]: new IsolatedWorld_js_1.IsolatedWorld(this), [IsolatedWorlds_js_1.PUPPETEER_WORLD]: new IsolatedWorld_js_1.IsolatedWorld(this) }; } /** * @returns The page associated with the frame. */ page() { return this._frameManager.page(); } /** * @returns `true` if the frame is an out-of-process (OOP) frame. Otherwise, * `false`. */ isOOPFrame() { return __classPrivateFieldGet(this, _Frame_client, "f") !== this._frameManager.client; } /** * Navigates a frame to the given url. * * @remarks * Navigation to `about:blank` or navigation to the same URL with a different * hash will succeed and return `null`. * * :::warning * * Headless mode doesn't support navigation to a PDF document. See the {@link * https://bugs.chromium.org/p/chromium/issues/detail?id=761295 | upstream * issue}. * * ::: * * @param url - the URL to navigate the frame to. This should include the * scheme, e.g. `https://`. * @param options - navigation options. `waitUntil` is useful to define when * the navigation should be considered successful - see the docs for * {@link PuppeteerLifeCycleEvent} for more details. * * @returns A promise which resolves to the main resource response. In case of * multiple redirects, the navigation will resolve with the response of the * last redirect. * @throws This method will throw an error if: * * - there's an SSL error (e.g. in case of self-signed certificates). * - target URL is invalid. * - the `timeout` is exceeded during navigation. * - the remote server does not respond or is unreachable. * - the main resource failed to load. * * This method will not throw an error when any valid HTTP status code is * returned by the remote server, including 404 "Not Found" and 500 "Internal * Server Error". The status code for such responses can be retrieved by * calling {@link HTTPResponse.status}. */ async goto(url2, options2 = {}) { const { referer = this._frameManager.networkManager.extraHTTPHeaders()["referer"], referrerPolicy = this._frameManager.networkManager.extraHTTPHeaders()["referer-policy"], waitUntil = ["load"], timeout = this._frameManager.timeoutSettings.navigationTimeout() } = options2; let ensureNewDocumentNavigation = false; const watcher = new LifecycleWatcher_js_1.LifecycleWatcher(this._frameManager, this, waitUntil, timeout); let error = await Promise.race([ navigate(__classPrivateFieldGet(this, _Frame_client, "f"), url2, referer, referrerPolicy, this._id), watcher.timeoutOrTerminationPromise() ]); if (!error) { error = await Promise.race([ watcher.timeoutOrTerminationPromise(), ensureNewDocumentNavigation ? watcher.newDocumentNavigationPromise() : watcher.sameDocumentNavigationPromise() ]); } try { if (error) { throw error; } return await watcher.navigationResponse(); } finally { watcher.dispose(); } async function navigate(client, url3, referrer, referrerPolicy2, frameId) { try { const response = await client.send("Page.navigate", { url: url3, referrer, frameId, referrerPolicy: referrerPolicy2 }); ensureNewDocumentNavigation = !!response.loaderId; if (response.errorText === "net::ERR_HTTP_RESPONSE_CODE_FAILURE") { return null; } return response.errorText ? new Error(`${response.errorText} at ${url3}`) : null; } catch (error2) { if ((0, ErrorLike_js_1.isErrorLike)(error2)) { return error2; } throw error2; } } } /** * Waits for the frame to navigate. It is useful for when you run code which * will indirectly cause the frame to navigate. * * Usage of the * {@link https://developer.mozilla.org/en-US/docs/Web/API/History_API | History API} * to change the URL is considered a navigation. * * @example * * ```ts * const [response] = await Promise.all([ * // The navigation promise resolves after navigation has finished * frame.waitForNavigation(), * // Clicking the link will indirectly cause a navigation * frame.click('a.my-link'), * ]); * ``` * * @param options - options to configure when the navigation is consided * finished. * @returns a promise that resolves when the frame navigates to a new URL. */ async waitForNavigation(options2 = {}) { const { waitUntil = ["load"], timeout = this._frameManager.timeoutSettings.navigationTimeout() } = options2; const watcher = new LifecycleWatcher_js_1.LifecycleWatcher(this._frameManager, this, waitUntil, timeout); const error = await Promise.race([ watcher.timeoutOrTerminationPromise(), watcher.sameDocumentNavigationPromise(), watcher.newDocumentNavigationPromise() ]); try { if (error) { throw error; } return await watcher.navigationResponse(); } finally { watcher.dispose(); } } /** * @internal */ _client() { return __classPrivateFieldGet(this, _Frame_client, "f"); } /** * @internal */ executionContext() { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].executionContext(); } /** * Behaves identically to {@link Page.evaluateHandle} except it's run within * the context of this frame. * * @see {@link Page.evaluateHandle} for details. */ async evaluateHandle(pageFunction, ...args) { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].evaluateHandle(pageFunction, ...args); } /** * Behaves identically to {@link Page.evaluate} except it's run within the * the context of this frame. * * @see {@link Page.evaluate} for details. */ async evaluate(pageFunction, ...args) { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].evaluate(pageFunction, ...args); } /** * Queries the frame for an element matching the given selector. * * @param selector - The selector to query for. * @returns A {@link ElementHandle | element handle} to the first element * matching the given selector. Otherwise, `null`. */ async $(selector) { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].$(selector); } /** * Queries the frame for all elements matching the given selector. * * @param selector - The selector to query for. * @returns An array of {@link ElementHandle | element handles} that point to * elements matching the given selector. */ async $$(selector) { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].$$(selector); } /** * Runs the given function on the first element matching the given selector in * the frame. * * If the given function returns a promise, then this method will wait till * the promise resolves. * * @example * * ```ts * const searchValue = await frame.$eval('#search', el => el.value); * ``` * * @param selector - The selector to query for. * @param pageFunction - The function to be evaluated in the frame's context. * The first element matching the selector will be passed to the function as * its first argument. * @param args - Additional arguments to pass to `pageFunction`. * @returns A promise to the result of the function. */ async $eval(selector, pageFunction, ...args) { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].$eval(selector, pageFunction, ...args); } /** * Runs the given function on an array of elements matching the given selector * in the frame. * * If the given function returns a promise, then this method will wait till * the promise resolves. * * @example * * ```js * const divsCounts = await frame.$$eval('div', divs => divs.length); * ``` * * @param selector - The selector to query for. * @param pageFunction - The function to be evaluated in the frame's context. * An array of elements matching the given selector will be passed to the * function as its first argument. * @param args - Additional arguments to pass to `pageFunction`. * @returns A promise to the result of the function. */ async $$eval(selector, pageFunction, ...args) { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].$$eval(selector, pageFunction, ...args); } /** * @deprecated Use {@link Frame.$$} with the `xpath` prefix. * * Example: `await frame.$$('xpath/' + xpathExpression)` * * This method evaluates the given XPath expression and returns the results. * If `xpath` starts with `//` instead of `.//`, the dot will be appended * automatically. * @param expression - the XPath expression to evaluate. */ async $x(expression) { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].$x(expression); } /** * Waits for an element matching the given selector to appear in the frame. * * This method works across navigations. * * @example * * ```ts * import puppeteer from 'puppeteer'; * * (async () => { * const browser = await puppeteer.launch(); * const page = await browser.newPage(); * let currentURL; * page * .mainFrame() * .waitForSelector('img') * .then(() => console.log('First URL with image: ' + currentURL)); * * for (currentURL of [ * 'https://example.com', * 'https://google.com', * 'https://bbc.com', * ]) { * await page.goto(currentURL); * } * await browser.close(); * })(); * ``` * * @param selector - The selector to query and wait for. * @param options - Options for customizing waiting behavior. * @returns An element matching the given selector. * @throws Throws if an element matching the given selector doesn't appear. */ async waitForSelector(selector, options2 = {}) { const { updatedSelector, QueryHandler } = (0, GetQueryHandler_js_1.getQueryHandlerAndSelector)(selector); return await QueryHandler.waitFor(this, updatedSelector, options2); } /** * @deprecated Use {@link Frame.waitForSelector} with the `xpath` prefix. * * Example: `await frame.waitForSelector('xpath/' + xpathExpression)` * * The method evaluates the XPath expression relative to the Frame. * If `xpath` starts with `//` instead of `.//`, the dot will be appended * automatically. * * Wait for the `xpath` to appear in page. If at the moment of calling the * method the `xpath` already exists, the method will return immediately. If * the xpath doesn't appear after the `timeout` milliseconds of waiting, the * function will throw. * * For a code example, see the example for {@link Frame.waitForSelector}. That * function behaves identically other than taking a CSS selector rather than * an XPath. * * @param xpath - the XPath expression to wait for. * @param options - options to configure the visibility of the element and how * long to wait before timing out. */ async waitForXPath(xpath, options2 = {}) { if (xpath.startsWith("//")) { xpath = `.${xpath}`; } return this.waitForSelector(`xpath/${xpath}`, options2); } /** * @example * The `waitForFunction` can be used to observe viewport size change: * * ```ts * import puppeteer from 'puppeteer'; * * (async () => { * . const browser = await puppeteer.launch(); * . const page = await browser.newPage(); * . const watchDog = page.mainFrame().waitForFunction('window.innerWidth < 100'); * . page.setViewport({width: 50, height: 50}); * . await watchDog; * . await browser.close(); * })(); * ``` * * To pass arguments from Node.js to the predicate of `page.waitForFunction` function: * * ```ts * const selector = '.foo'; * await frame.waitForFunction( * selector => !!document.querySelector(selector), * {}, // empty options object * selector * ); * ``` * * @param pageFunction - the function to evaluate in the frame context. * @param options - options to configure the polling method and timeout. * @param args - arguments to pass to the `pageFunction`. * @returns the promise which resolve when the `pageFunction` returns a truthy value. */ waitForFunction(pageFunction, options2 = {}, ...args) { return this.worlds[IsolatedWorlds_js_1.MAIN_WORLD].waitForFunction(pageFunction, options2, ...args); } /** * @returns The full HTML contents of the frame, including the DOCTYPE. */ async content() { return this.worlds[IsolatedWorlds_js_1.PUPPETEER_WORLD].content(); } /** * Set the content of the frame. * * @param html - HTML markup to assign to the page. * @param options - Options to configure how long before timing out and at * what point to consider the content setting successful. */ async setContent(html2, options2 = {}) { return this.worlds[IsolatedWorlds_js_1.PUPPETEER_WORLD].setContent(html2, options2); } /** * @returns The frame's `name` attribute as specified in the tag. * * @remarks * If the name is empty, it returns the `id` attribute instead. * * @remarks * This value is calculated once when the frame is created, and will not * update if the attribute is changed later. */ name() { return this._name || ""; } /** * @returns The frame's URL. */ url() { return __classPrivateFieldGet(this, _Frame_url, "f"); } /** * @returns The parent frame, if any. Detached and main frames return `null`. */ parentFrame() { return this._frameManager._frameTree.parentFrame(this._id) || null; } /** * @returns An array of child frames. */ childFrames() { return this._frameManager._frameTree.childFrames(this._id); } /** * @returns `true` if the frame has been detached. Otherwise, `false`. */ isDetached() { return __classPrivateFieldGet(this, _Frame_detached, "f"); } /** * Adds a `